Files
Jarvis/packages/DevOverlay/README.md
james.maesandClaude Opus 4.7 508cf924d0 docs(packages): per-package README files
Adds README.md to each of the 13 SPM packages (AgentCore, Bus, Config,
DevOverlay, Harness, Keychain, Logging, MCP, Memory, Replay, Shell, Vision,
Voice). Each covers purpose, key public types, deps, consumers, invariants
(pulled from CLAUDE.md + grep-gates + audit findings), test stack, and
notable files. Memory README explicitly marks the package functionally OFF
until vec0.dylib + Ollama models land.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 17:13:33 -05:00

37 lines
1.4 KiB
Markdown

# DevOverlay
Cmd+Option+D toggleable debug panel. Shows current agent state, last 5 tool calls (inputs + outputs), context token count, and per-turn latency breakdown. Not user-facing — a developer tool.
## Key public types
| Type | Purpose |
|------|---------|
| `DevOverlayWindow` | The borderless `NSWindow` that hosts the SwiftUI view |
| `DevOverlayView` | SwiftUI panel — state, tool calls, tokens, latencies |
| `DevOverlayViewModel` | Subscribes to `OrchestratorEvent` + `MemoryEvent` streams |
| `DevOverlayBridge` | Wiring from AppDelegate (event-stream subscriber + window controller) |
## Depends on
`AgentCore`, `AgentOrchestrator`, `Logging`. External: `swift-log`.
## Used by
`App/AppDelegate`. Not consumed by other packages.
## Key invariants / contracts
- **Read-only consumer.** DevOverlay never mutates orchestrator/memory state — it only watches.
- **Latency tracking is wall-clock, not LLM-billed.** Per-turn breakdown shows network + decode + tool dispatch separately.
- **Token count is provider-reported usage.** Not a local re-tokenization.
## Tests
XCTest. Snapshot tests on view-model state transitions, integration with mock orchestrator events.
## Notable files
- `Sources/DevOverlay/DevOverlayView.swift` — SwiftUI panel
- `Sources/DevOverlay/DevOverlayViewModel.swift` — event-stream subscriber
- `Sources/DevOverlay/DevOverlayBridge.swift` — AppDelegate wiring