Backplane. AgentRuntime. Codex. HistoryNotes behaviour
(backplane_agent_runtime v1.10.92)
Copy Markdown
Explicit host-selected transport for Codex encrypted History/Notes.
Configure ExtensionRuntime with history_notes: %{mode: :remote_encrypted, adapter: MyTransport, context: host_context, request_context: %{session_id: id, current_agent_name: name}, output_policy: policy}. The host verifies backend
capability and supplies authentication through its adapter context.
execute/3 receives the admitted operation, owner scope and adapter context.
Its :history_notes_request contains trusted :path, :body and :headers.
The body retains opaque argument strings and adds trusted context. The backend
applies the output policy before encryption. Return {:ok, %{"encrypted_output" => ciphertext, "images" => optional_images}} or an existing runtime Error.
Ordinary JSON results without encrypted_output use one text content block,
followed by their independent images, matching the pinned Codex fallback.
Output uses portable canonical content maps and rejects oversized results whole.
cancel/3 receives the same invocation plus its stop generation, registration
and cleanup deadline. It must retire the actual local transport workers and
return an existing ToolEffects.Cancellation assertion. A remote operation's
business outcome remains unknown. Missing or invalid retirement evidence keeps
cancellation uncertain. Both callbacks execute outside the extension GenServer.
Summary
Callbacks
@callback cancel(map(), map(), term()) :: {:ok, Backplane.AgentRuntime.ToolEffects.Cancellation.t()} | {:error, Backplane.AgentRuntime.Error.t()}
@callback execute(map(), map(), term()) :: {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()}