feat(plugin-sdk): expose optional GPU and disk metrics - #172
Conversation
Greptile SummaryThe PR extends
Confidence Score: 4/5The PR should not merge until multi-device GPU values satisfy the advertised aggregate contract; probe latency and missing conformance coverage are additional non-blocking issues. The new collectors consistently select the busiest GPU or engine rather than aggregate machine utilization, so supported multi-device hosts can return materially misleading SDK data. Files Needing Attention: apps/desktop/src/system-metrics.ts, packages/sdk/src/index.ts, packages/sdk/src/check-plugin-sdk.ts Important Files Changed
Sequence DiagramsequenceDiagram
participant P as Plugin
participant B as SDK bridge
participant C as Host metrics cache
participant M as Platform probes
P->>B: ctx.system.metrics()
B->>C: capabilities.system.metrics()
alt cache valid
C-->>B: cached GPU/disk fields
else cache expired
C->>M: GPU command/sysfs probe + statfs
M-->>C: optional aggregate fields
C-->>B: CPU/memory + optional GPU/disk
end
B-->>P: OpenPetsSystemMetrics
Reviews (1): Last reviewed commit: "feat(plugin-sdk): expose optional GPU an..." | Re-trigger Greptile |
|
Addressed all Greptile findings in
Focused system-metrics test and the SDK contract test pass. Greptile re-review reports no findings. |
Summary
ctx.system.metrics()Validation
The full desktop test build is currently blocked before compilation by pnpm 11 rejecting the repository’s pre-existing unresolved
openclawandtree-sitter-bashbuild approvals.