Returns the billing mode the runtime uses for this run (unknown when unsure).
The invocation.
The actual mode; the default unknown refuses every run (fail closed).
Returns the tool class the runtime actually loaded (07 2.11).
The tool class; the default is chat.
Runs the runtime; called only after 200 on startRun.
Returning ends the run completed unless the handler finished it or waits for input;
RuntimeFailure ends it failed with runtime_error, any other error with
adapter_error. After run.cancel_requested the adapter ends the run cancelled without
waiting for this promise; watch run.cancelled to stop the runtime.
The invocation.
The started run.
A promise that resolves when the runtime is done.
Returns choices for an autocomplete request before it expires.
Never call a model here (R-AG-14): typing must cost nothing and never hang.
The request.
Aborted when the request expires.
At most command.autocomplete_max_choices choices.
Handles a command invocation (command.invoked); it never starts, resumes or ends a run.
The invocation.
The adapter's run the command names, if it is running here.
A promise that resolves when handled.
Handles an event without an invocation token (for example agent.config_changed).
The event.
A promise that resolves when handled.
Handles a follow-up message of a running or resumed run.
The agent.followup invocation.
The run.
A promise that resolves when handled.
Handles an interaction with a component of a running or resumed run.
The interaction.created invocation.
The run.
A promise that resolves when handled.
Gets ready for a run before it starts (load context, pick a model); no runtime yet.
The invocation.
The run (not started: no patches yet).
The options of startRun.
The runtime side of an adapter; extend it and override AgentHandler.prepare and AgentHandler.execute.
Every method that belongs to a run runs inside the run's SR9 binding: each request of the adapter's client carries the run's newest invocation token.