Ports main's features onto the V2 orchestrator and wire protocol: - HTTP snapshot loading (#3719): new OrchestrationV2ThreadDetailSnapshot contract, /api/orchestration/{shell,threads/:threadId} endpoints served from the V2 engine (orchestration-v2/http.ts), afterSequence resume on the V2 subscribeShell/subscribeThread WS methods, and V2-typed client snapshot loaders wired into shell/thread sync with warm-cache resume. - Thread cache now persists the snapshot sequence (cache schema v3) so warm caches resume via afterSequence instead of refetching. - Mobile: main's react-navigation architecture retained; branch's V2 surfaces (relationships banner, queue control, activity inspector, work-log thread links, fork-from-run) ported off expo-router; thread status presentation and awareness diagnostics mapped to V2 runtime fields; pending-task start-turn helper gains creationSource "mobile". - Retired v1-only additions from main (v1 RPC schemas, session/latestTurn awareness heuristics, v1 engine test updates) where the branch already replaced those systems with V2 equivalents. Co-Authored-By: Claude Fable 5 <[email protected]>
Client Runtime
Shared client behavior for web and mobile. Public APIs are organized by package subpath. The package intentionally has no root export.
Public subpaths
| Subpath | Responsibility |
|---|---|
authorization |
Bearer and DPoP authorization plus token persistence contracts |
connection |
Targets, catalog, supervision, retries, registry, and onboarding |
environment |
Environment identity, descriptors, endpoints, and scoped keys |
errors |
Shared client error inspection |
operations |
Multi-step application workflows |
operations/projects |
Multi-step project creation workflows |
platform |
Platform capability and persistence service contracts |
relay |
Managed relay API and environment discovery |
rpc |
HTTP/RPC clients, protocol, sessions, and subscriptions |
state/<domain> |
Focused shared state, retention, reducers, and Atom constructors |
Dependency direction
Platform applications provide platform services. connection composes those
capabilities with authorization, relay, and rpc to supervise environment
sessions. Independent state modules consume the connection registry and expose
focused state or Atom constructors to application-owned runtimes.
Applications should import the narrowest relevant subpath. There is no broad
state export: use domain paths such as state/shell, state/threads,
state/terminal, or state/vcs. Subpath indices and explicitly exported domain
files are public API boundaries; all other files remain implementation details.