M-7: Turn surface — submitTurn/cancelTurn/bargeIn/respondToConfirmation #136

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

Goal

Define JarvisAPI.Turn surface: submitTurn, cancelTurn, bargeIn, respondToConfirmation. bargeIn → Result<BargeInAccepted, BargeInError> (F-004). cancelTurn documented post-cancel silence (F-005). images: removed from submitTurn (F-007); frame attach is implicit-via-state.

Scope

  • 4 commands with typed Result returns
  • submitTurn(text:source:) -> TurnAccepted
  • cancelTurn(turnId:) -> Result<Void, TurnError>
  • bargeIn(text:source:) -> Result<BargeInAccepted, BargeInError>
  • respondToConfirmation(confirmationId:, outcome:) -> Result<Void, ConfirmationError>
  • No images: param on submitTurn (F-007)

Files

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

Acceptance

  • 4 commands implemented and round-trip
  • No images: in submitTurn wire shape
  • bargeIn returns typed Result
  • cancelTurn returns Result

Test

S-TURN-002..005 cover each command.

Parent epic

#11

Source

.planning/architecture/JARVIS-API-MIGRATION-PLAN.md §2.8 (M-7.2)
.planning/architecture/JARVIS-API-DESIGN-v0.2.md F-004, F-005, F-007

## Goal Define JarvisAPI.Turn surface: submitTurn, cancelTurn, bargeIn, respondToConfirmation. bargeIn → Result<BargeInAccepted, BargeInError> (F-004). cancelTurn documented post-cancel silence (F-005). images: removed from submitTurn (F-007); frame attach is implicit-via-state. ## Scope - 4 commands with typed Result returns - `submitTurn(text:source:) -> TurnAccepted` - `cancelTurn(turnId:) -> Result<Void, TurnError>` - `bargeIn(text:source:) -> Result<BargeInAccepted, BargeInError>` - `respondToConfirmation(confirmationId:, outcome:) -> Result<Void, ConfirmationError>` - No `images:` param on `submitTurn` (F-007) ## Files - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Turn.swift` (new) - `packages/JarvisAPI/Sources/JarvisAPI/Surfaces/Turn+Adapter.swift` (new) ## Acceptance - [ ] 4 commands implemented and round-trip - [ ] No `images:` in submitTurn wire shape - [ ] bargeIn returns typed Result - [ ] cancelTurn returns Result ## Test `S-TURN-002..005` cover each command. ## Parent epic #11 ## Source `.planning/architecture/JARVIS-API-MIGRATION-PLAN.md` §2.8 (M-7.2) `.planning/architecture/JARVIS-API-DESIGN-v0.2.md` F-004, F-005, F-007
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/Jarvis#136