Skip to content

feat: system-info telemetry tiles for CPU, memory, and disk (F006) - #7

Merged
nimat-dev merged 1 commit into
mainfrom
feat/F006
Oct 8, 2026
Merged

nimat-dev merged 1 commit into
mainfrom
feat/F006

Conversation

@nimat-dev

Copy link
Copy Markdown
Owner

Summary

This PR implements F006: System-info tiles (CPU / memory / disk), concluding Phase 02 (Terminal & telemetry).

Changes Included:

  1. Wire Protocol (@shellmind/protocol):
    • sys.request: Client request for telemetry metrics ({ diskPath?: string }).
    • sys.metrics: Agent response containing CpuMetrics (usage percentage, cores), MemoryMetrics (used bytes, total bytes, percentage), DiskMetrics (used bytes, total bytes, percentage, mount), uptime in seconds, host info, and timestamp.
    • Registered in KnownMessage union and MessageRegistry.
  2. Pure Core SysInfo Interface (@shellmind/agent):
    • ISysInfoProvider, SystemMetrics defined in packages/agent/src/core/sysinfo.ts with zero Node built-in or I/O imports.
  3. Node SysInfo Adapter (@shellmind/agent):
    • NodeSysInfoProvider in packages/agent/src/adapters/sysinfo/node-sysinfo.ts calculating CPU usage deltas across sampling intervals, total/free RAM from os, and disk metrics via fs.promises.statfs('/').
    • Wired into AgentDaemon message dispatcher.
  4. Mobile Client & UI (@shellmind/mobile):
    • AgentClient methods: requestSystemMetrics(), onSystemMetrics().
    • React Native component: SysInfoTiles.tsx displaying CPU, RAM, and Disk percentage bars with color-coded health states, core counts, and host/uptime pill.
    • Added stale indicator when disconnected.
    • Embedded into StatusScreen.tsx with auto-polling every 4 seconds.
  5. E2E & Verification:
    • Maestro flow specification .maestro/sysinfo_flow.yaml.
    • Integration tests in packages/agent/src/agent.test.ts and packages/mobile/src/mobile.test.ts.
    • 53/53 tests passing across monorepo packages.
    • Clean architecture verified with dependency-cruiser (0 violations).

@nimat-dev nimat-dev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maker-Checker Review: F006 (System-info tiles)

1. Acceptance Criteria Verification

  • Wire protocol messages: sys.request, sys.metrics registered in @shellmind/protocol.
  • Core sysinfo interface ISysInfoProvider in @shellmind/agent/src/core/sysinfo.ts has 0 I/O imports.
  • Node adapter NodeSysInfoProvider in @shellmind/agent/src/adapters/sysinfo/ wraps Node built-ins without extra binary dependencies.
  • Agent daemon message dispatch handles sys.request and sends sys.metrics.
  • Mobile client has requestSystemMetrics, onSystemMetrics.
  • Mobile component SysInfoTiles.tsx displays live CPU/RAM/Disk bars and host/uptime pill.
  • Edge cases handled: disk statfs fallback (null / "n/a"), disconnected stale badge, timer cleanup on unmount.
  • Clean architecture: dependency-cruiser passes with 0 violations.
  • 53/53 tests pass monorepo-wide.

2. Evaluation Scores

  • Acceptance: 5/5
  • Correctness: 5/5
  • Boundaries: 5/5
  • Modularity: 5/5
  • Evidence: 5/5
  • Average: 5.0 (PASS)

3. Decision

APPROVE. Ready for squash merge to main.

@nimat-dev
nimat-dev merged commit 6f43992 into main Oct 8, 2026
2 checks passed
@nimat-dev
nimat-dev deleted the feat/F006 branch October 8, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant