Files
Shivam Sharma c1929c2b5b feat(orchestration-v2): add subagent observability data model
Introduces the schema, storage, and migration for richer subagent
tracking. Nothing produces the new data yet — adapters populate neutral
defaults so every subagent row remains valid — which keeps this change
reviewable as a pure data-model step.

Contracts gain a reusable subagent identity: per-activation records
(SubagentActivationId, OrchestrationV2SubagentActivation), cumulative
usage, a role, recent activity, and workflow grouping. A subagent may
now also rest at "idle" between activations.

Because a subagent status is not a turn item status, the two are bridged
by an explicit mapping rather than a copy. The Record type makes that
total: adding a subagent status without giving it a timeline meaning is
a compile error. Without it, a producer can emit a turn item whose own
schema cannot decode it, which is unrecoverable — the projection rebuild
then fails on every subsequent startup and the server cannot boot.

Migration 043 backfills existing rows so old events stay readable. Its
riskiest path is a partially-migrated row, where already-present JSON is
round-tripped through COALESCE; a test pins that structured values keep
their JSON subtype rather than being rewritten as quoted strings.

Also narrows event-envelope attribution in ProviderEventIngestor: a
payload carrying an explicit null run or node id now keeps that null
instead of inheriting the ambient run. Activations legitimately have no
run id, and the envelope is persistence metadata only — routing reads
payload fields — but this does change stored metadata for existing
event types that already pass explicit nulls.
2026-08-04 01:08:02 +05:30
..

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.