M-1: implement Self surface adapter wrapping SelfStateAdapter; plumb events #101

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

Goal

Implement Self surface conformer wrapping SelfStateAdapter + plumb selfStateChanged / tccStatusChanged events through to JarvisHost.events. Reuses existing in-process tools.

Scope

  • SelfSurfaceAdapter wraps SelfStateAdapter + permission probes
  • tccStatusChanged documented as 'fires on probe' (boot, applicationDidBecomeActive, _forceTCCStatus), not on user toggle (R-010)
  • Bridge SelfStateAdapter updates to JarvisHost.events stream

Files

  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Self+Adapter.swift (new)
  • App/AppDelegate.swift:686-689 — wire conformer
  • App/AppDelegate.swift permission-probe path → tccStatusChanged emit

Acceptance

  • SelfSurfaceAdapter conforms to JarvisAPI.Self
  • getSelfState() returns hydrated state
  • tccStatusChanged emits on applicationDidBecomeActive re-probe
  • Unit test asserts probe-driven semantics documented

Test

Scenario S-SELF-001 (getSelfState happy path) green in both transport modes.

Parent epic

#5

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.2 (M-1.1, M-1.2)
.planning/architecture/REVIEW-MIGRATION-RISK.md R-010

## Goal Implement Self surface conformer wrapping SelfStateAdapter + plumb selfStateChanged / tccStatusChanged events through to JarvisHost.events. Reuses existing in-process tools. ## Scope - `SelfSurfaceAdapter` wraps `SelfStateAdapter` + permission probes - `tccStatusChanged` documented as 'fires on probe' (boot, applicationDidBecomeActive, _forceTCCStatus), not on user toggle (R-010) - Bridge `SelfStateAdapter` updates to `JarvisHost.events` stream ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Self+Adapter.swift` (new) - `App/AppDelegate.swift:686-689` — wire conformer - `App/AppDelegate.swift` permission-probe path → tccStatusChanged emit ## Acceptance - [ ] `SelfSurfaceAdapter` conforms to `JarvisAPI.Self` - [ ] `getSelfState()` returns hydrated state - [ ] `tccStatusChanged` emits on `applicationDidBecomeActive` re-probe - [ ] Unit test asserts probe-driven semantics documented ## Test Scenario `S-SELF-001` (getSelfState happy path) green in both transport modes. ## Parent epic #5 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.2 (M-1.1, M-1.2) `.planning/architecture/REVIEW-MIGRATION-RISK.md` R-010
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#101