Skip to content

feat(provider-tangle): consume sidecar capability discovery and interaction ledger (retained-control phase 2) #154

Description

@drewstone

Context

agent-sdk#146 phase 1 shipped (agent-provider-tangle@0.7.0): capability claims now derive from a probed SDK surface, and the provider claims retained control only when cancelRun is proven. The ADC server surface it needs also landed on agent-dev-container develop:

  • authenticated GET /capabilities (PR #5316) — the deployed run-control facts.
  • durable interaction-response ledger (PR #5317) — retry-safe answer/permission/plan with replay and conflict acknowledgements.

Remaining work (phase 2)

  1. Consume GET /capabilities instead of inferring from SDK method presence. The provider must call box.capabilities() (or the SDK wrapper) and gate its capability document on the deployed sidecar's reported facts, not the linked SDK class. box.capabilities() returns null on a pre-capability sidecar — treat null as fail-closed (no retained control claim).
  2. Implement respondToInteraction over the retained SandboxSession, mapping canonical InteractionResponseCommand (question / permission / plan) to session.answer / respondToPermission / approvePlan / rejectPlan, returning InteractionAcknowledgement (applied / already_resolved_same / already_resolved_different / binding_mismatch). Stop deleting interactions from the capability document; emit an InteractionCapabilities document narrowed by what the session exposes. The server ledger already gives retry-safe semantics.
  3. Fresh-process reconstruction proof: today the retained-control tests reconnect in-process. Add a proof that provider.get reconstructs the exact environment and session in a fresh process using only the persisted control reference.

Not in scope (separate issues)

  • Workspace branching — no idempotent server surface exists yet.
  • Create receipt (new vs idempotent replay) — needs a new agent-interface contract.

Refs #146

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions