feat: add session perf metrics command

Merged
TH
9mo ago
+378-4

Summary

Add a session-level perf command (alias: metrics) that returns a JSON performance payload with startup timing.

  • Capture startup samples from open command round-trip timing (open-command-roundtrip) and persist them in session action history.
  • Expose perf through session handler + command schema + capability matrix + CLI rendering.
  • Add tests for parser aliasing, perf responses, and startup sample recording from open.
  • Document platform support and sampling method in README and docs.
  • Touched files: 11.
  • Scope note: remained in the session command family plus required parser/capability/docs/test wiring; no cross-family behavior expansion.
  • Known gap/follow-up: fps, memory, and cpu are currently explicit unavailable placeholders in the perf payload.

Fixes #101

Validation

  • pnpm typecheck
  • pnpm test:unit
  • pnpm test:smoke