M-3: Diagnostics surface — getDevSnapshot/devSnapshotUpdated/toggleDevOverlay #109

Open
opened 2026-05-12 19:36:59 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-05-12 19:36:59 +00:00 (Migrated from github.com)

Goal

Define JarvisAPI.Diagnostics surface. Implement getDevSnapshot query, devSnapshotUpdated event, toggleDevOverlay command. Wraps DevOverlay package.

Scope

  • JarvisAPI.Diagnostics protocol
  • getDevSnapshot returns typed DevSnapshot (agent state, last 5 tool calls, context tokens, latency breakdown)
  • devSnapshotUpdated event fires per state change
  • toggleDevOverlay command (legacy hotkey or menu item)

Files

  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift (new)
  • packages/DevOverlay/ bridge

Acceptance

  • Protocol + adapter compile
  • getDevSnapshot() returns hydrated state
  • devSnapshotUpdated emits on state change
  • toggleDevOverlay toggles overlay visibility

Test

Scenarios S-DIAG-001..003 (DevSnapshot round-trip, stream, toggle) green in both transport modes.

Parent epic

#7

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.4 (M-3.1)

## Goal Define JarvisAPI.Diagnostics surface. Implement getDevSnapshot query, devSnapshotUpdated event, toggleDevOverlay command. Wraps DevOverlay package. ## Scope - `JarvisAPI.Diagnostics` protocol - `getDevSnapshot` returns typed `DevSnapshot` (agent state, last 5 tool calls, context tokens, latency breakdown) - `devSnapshotUpdated` event fires per state change - `toggleDevOverlay` command (legacy hotkey or menu item) ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Diagnostics+Adapter.swift` (new) - `packages/DevOverlay/` bridge ## Acceptance - [ ] Protocol + adapter compile - [ ] `getDevSnapshot()` returns hydrated state - [ ] `devSnapshotUpdated` emits on state change - [ ] `toggleDevOverlay` toggles overlay visibility ## Test Scenarios `S-DIAG-001..003` (DevSnapshot round-trip, stream, toggle) green in both transport modes. ## Parent epic #7 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.4 (M-3.1)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#109