Async/liveness helpers for pixir delegate service commands.
This module is intentionally not a second scheduler. It projects delegate state from
the durable Session Log for status, and uses the existing Subagent Manager
only for bounded lifecycle actions such as cancel. The Log remains the source of
truth; Manager access is live-handle evidence that may be unavailable after a process
restart.
TODO(delegate-service-v1)
Grow this into richer daemon/IPC-backed attach progress once Delegate needs
cross-invocation streaming observation. Current owner-backed start, status,
attach, and cancel can report daemon residency when routed through a manual
workspace daemon, but attach remains a bounded snapshot rather than a stream.
The next slice should preserve the current split:
statusstays a durable Log projection and must remain useful after restart;cancelshould route through a live Delegate owner when one exists, and report an explicitowner_unavailable/stale_handleshape when it cannot affect running children;attachshould stream or snapshot progress without polling through shell loops;- response metadata should separate "request accepted" from "work complete" so
long-running service clients do not treat
ok: falserunning snapshots as errors.
Summary
Functions
Attach to Delegate evidence by returning a bounded durable snapshot.
Cancel live Subagent children for a Delegate handle when the Manager has handles.
Start a Delegate run with a current-runtime owner.
Return a durable Delegate status snapshot for a Delegate handle or parent Session.
Functions
Attach to Delegate evidence by returning a bounded durable snapshot.
Cancel live Subagent children for a Delegate handle when the Manager has handles.
Start a Delegate run with a current-runtime owner.
Return a durable Delegate status snapshot for a Delegate handle or parent Session.