M-0: scaffold packages/JarvisAPI/ package skeleton (types only, no conformers) #90

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

Goal

Scaffold packages/JarvisAPI/ as a types-only package (protocols, structs, enums) with no conformers and no call sites in App/.

Scope

  • New SPM package packages/JarvisAPI/
  • Source layout: Sources/JarvisAPI/{Surfaces,Commands,Events,Queries,Errors}.swift, JarvisHost.swift
  • Typed JarvisHost.boot() async -> Result<JarvisHost, BootError> per OQ-T6
  • NO conformers; NO imports from App/

Files

  • packages/JarvisAPI/Package.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Surfaces.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Commands.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Events.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Queries.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/Errors.swift (new)
  • packages/JarvisAPI/Sources/JarvisAPI/JarvisHost.swift (new)

Acceptance

  • swift test --package-path packages/JarvisAPI green (types compile)
  • No import JarvisAPI in App/ yet
  • All Surface protocols defined with empty method bodies (fatalError) or default implementations

Test

swift build --package-path packages/JarvisAPI succeeds; swift test --package-path packages/JarvisAPI runs (empty suite ok).

Parent epic

#4

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.1 (M-0.1)
.planning/architecture/JARVIS-API-DESIGN-v0.1.md (all surface defs)

## Goal Scaffold packages/JarvisAPI/ as a types-only package (protocols, structs, enums) with no conformers and no call sites in App/. ## Scope - New SPM package `packages/JarvisAPI/` - Source layout: `Sources/JarvisAPI/{Surfaces,Commands,Events,Queries,Errors}.swift`, `JarvisHost.swift` - Typed `JarvisHost.boot() async -> Result<JarvisHost, BootError>` per OQ-T6 - NO conformers; NO imports from App/ ## Files - `packages/JarvisAPI/Package.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Commands.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Events.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Queries.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Errors.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/JarvisHost.swift` (new) ## Acceptance - [ ] `swift test --package-path packages/JarvisAPI` green (types compile) - [ ] No `import JarvisAPI` in `App/` yet - [ ] All Surface protocols defined with empty method bodies (`fatalError`) or default implementations ## Test `swift build --package-path packages/JarvisAPI` succeeds; `swift test --package-path packages/JarvisAPI` runs (empty suite ok). ## Parent epic #4 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.1 (M-0.1) `.planning/architecture/JARVIS-API-DESIGN-v0.1.md` (all surface defs)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#90