Skip to main content

Module endpoint_notice

Module endpoint_notice 

Source
Expand description

The notice that goes with pointing an agent at another model server (Agents env_set of ANTHROPIC_BASE_URL and the variables that go with it, backend::agent_env), and the window in which anyone can undo it.

The change is written at once and applies at the agent’s next launch. For WINDOW_MS after it, a card in the agent’s pane and a line in My Agents say who pointed it where, with an Undo that puts the environment back as it was. Past the window the change stands and is changed like any other, in My Agents or by env_set. The notice holds the text from before server-side only: it can hold the operator’s own variables, so the event carries the address and model names and never it.

Structs§

EndpointNoticeEvent
agent:endpoint-notice: an agent’s model server was changed, or the change was undone.
Pointed
What the change leaves the agent pointed at, from the new environment text.

Enums§

Refusal
Why an Undo was not done.

Constants§

WINDOW_MS
How long an Undo is offered.

Functions§

agent_id_of
The agent a held notice is for, if it is still held.
check_for_undo
Checks the notice id for an Undo: the text to put back and the event that says it was undone. current is the environment as stored now. The notice stays held until finish_undo, so a write that fails can be tried again inside the window.
finish_undo
The environment was put back: the notice cannot be undone again.
open
Opens the notice for a change and keeps what Undo needs. Returns the event to publish.
pointed
Where new points the agent, against old.