Backplane.AgentRuntime.Codex.MultiAgent (backplane_agent_runtime v1.10.52)

Copy Markdown

Supervised Codex V1/V2 collaboration runtime.

The process owns only collaboration state and waiters. Child work is executed by real Conversation processes under a DynamicSupervisor.

Summary

Functions

Binds a normalized host contract to one collaboration action in this manager.

Executes an admitted host invocation using its immutable collaboration binding.

Cancels only the current child interaction identified by the exact correlation.

Returns a specification to start this module under a supervisor.

Completes a persisted stage without the source manager or executing any effect.

Sends a bounded notification only to an expected live recipient turn.

Consumes an independently persisted exact child retirement receipt.

Seals a fenced, host-only manager or exact child recovery inventory.

Resolves an observed child interaction after its checkpoint is acknowledged.

Seals portable export evidence before losing a fenced source manager.

Functions

bind_contract(runtime, action, attrs)

@spec bind_contract(pid(), atom(), map()) ::
  {:ok, Backplane.AgentRuntime.Codex.Contract.t()}
  | {:error, Backplane.AgentRuntime.Error.t()}

Binds a normalized host contract to one collaboration action in this manager.

The returned contract does not grant authority. Hosts must explicitly grant its name, revision and collaboration_binding.fingerprint in tool_bindings. Argument/result conversion belongs to its trusted registered backend.

call(operation)

call_bound(operation, canonical_arguments)

@spec call_bound(map(), map()) :: Backplane.AgentRuntime.ToolEffects.result()

Executes an admitted host invocation using its immutable collaboration binding.

The original invocation and arguments remain the effect/refusal identity; canonical_arguments are separately converted by the trusted host adapter.

cancel_interaction(runtime, correlation, reason)

Cancels only the current child interaction identified by the exact correlation.

Success acknowledges terminal persistence and confirmed resource settlement. The reason is diagnostic text (at most 1024 bytes), not a stop policy. An unknown outcome must be reconciled through observation, never retried.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

close_session(runtime)

close_session(runtime, owner_id, incarnation)

complete_child_export(config, stage_ref, retirement_receipt_ref)

Completes a persisted stage without the source manager or executing any effect.

Only exact Goal acknowledgements and recovery fences may follow its checkpoint. The host must explicitly refresh stale retirement receipts before completion.

contracts(profile, runtime, opts \\ [])

@spec contracts(:v1 | :v2, pid(), keyword()) :: [map()]

detach_parent(runtime, binding)

export_child(runtime, target, receipt_ref)

notify_active(runtime, sender, recipient, notification)

Sends a bounded notification only to an expected live recipient turn.

sender is the trusted Runtime operation (including incarnation and Session resource owner). recipient is an identity from this manager's snapshot and includes manager_id, agent_id, run_id and incarnation. notification contains stable id, text and optional serializable metadata. Skips never enter mailboxes; ambiguous delivery is an error and must be reconciled rather than retried.

rebind_parent(runtime, binding, authority, catalog_revision \\ 1)

reconcile_child(runtime, receipt_ref)

Consumes an independently persisted exact child retirement receipt.

reconcile_close(runtime, receipt_ref)

recovery_manifest(runtime, target)

Seals a fenced, host-only manager or exact child recovery inventory.

resolve_interaction(runtime, correlation, value)

Resolves an observed child interaction after its checkpoint is acknowledged.

Correlation must come from the current manager snapshot or observation stream. An unknown outcome must be reconciled through observation, never retried.

restore_child(runtime, archive)

snapshot(runtime)

stage_child_export(runtime, target, opts \\ [])

Seals portable export evidence before losing a fenced source manager.

The host must durably persist the complete returned record under one immutable recovery evidence reference. Goal delivery may remain pending. :host_metadata optionally replaces the child's bounded metadata in the resulting archive.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

subscribe(runtime, observer \\ self())

transfer_ready(runtime)

unsubscribe(runtime, observer \\ self())