feat(sdk-swift): add fleet terminal sessions

Merged
KH
2mo ago
+1400-51

Summary

  • add AgentClient.terminals as the typed Swift SDK surface for hosted fleet terminal discovery and attach
  • own ticket creation, same-origin WebSocket validation, bounded reconnect, ordered acknowledged input, resize, correlated snapshots, and structured close in the SDK
  • report the broker delivery-mode revision on ready and use compare-and-set restoration so detach cannot overwrite a concurrent operator change
  • extend the broker terminal lane with explicit snapshot correlation and delivery-state readiness

Chief and other native clients only provide an agent name, mode, renderer, and user input. They do not discover nodes, shell out, or implement Relaycast terminal frames.

Dependency

Validation

  • swift build --package-path packages/sdk-swift --target AgentRelaySDK
  • full broker suite: 923 passed, 4 environment-gated ignored; continuity/wire/journal integration tests passed
  • targeted terminal protocol and delivery-state tests passed
  • cargo fmt --all -- --check
  • git diff --check

Swift XCTest execution is unavailable under the active Command Line Tools-only installation (no such module XCTest); the SDK target itself builds cleanly.