M-2: define JarvisAPI.Settings protocol + adapter wrapping ConfigStore #105

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

Goal

Define JarvisAPI.Settings protocol and implement adapter wrapping ConfigStore. getSettings query + settingsChanged event.

Scope

  • JarvisAPI.Settings protocol
  • SettingsState codable struct exposing all configurable fields
  • SettingsAdapter wraps ConfigStore.perTurn() + LaunchSnapshot
  • settingsChanged event emits with changed key paths

Files

  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Settings.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Settings+Adapter.swift (new)

Acceptance

  • Protocol + adapter compile
  • getSettings() returns hydrated state from ConfigStore
  • settingsChanged event includes changedKeyPaths: [String]
  • getSettings.confirmationTimeoutSeconds field exposed (foreshadows R-008)

Test

Scenario stub S-SET-001 (round-trip getSettings) green in both transport modes.

Parent epic

#6

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.3 (M-2.1)

## Goal Define JarvisAPI.Settings protocol and implement adapter wrapping ConfigStore. getSettings query + settingsChanged event. ## Scope - `JarvisAPI.Settings` protocol - `SettingsState` codable struct exposing all configurable fields - `SettingsAdapter` wraps `ConfigStore.perTurn()` + `LaunchSnapshot` - `settingsChanged` event emits with changed key paths ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Settings.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Settings+Adapter.swift` (new) ## Acceptance - [ ] Protocol + adapter compile - [ ] `getSettings()` returns hydrated state from `ConfigStore` - [ ] `settingsChanged` event includes `changedKeyPaths: [String]` - [ ] `getSettings.confirmationTimeoutSeconds` field exposed (foreshadows R-008) ## Test Scenario stub `S-SET-001` (round-trip getSettings) green in both transport modes. ## Parent epic #6 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.3 (M-2.1)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#105