Skip to main content

Module agent_notice

Module agent_notice 

Source
Expand description

An agent doing something the person may want to stop, told to the person in the agent’s own pane (docs/specs/SPEC_AGENT_SPAWN_NOTICE_IN_THE_PANE_2026_11_08.md): starting an agent, using the person’s SSH keys on a host, using a Google connector, adopting memory. It replaces the approval window that opened over the pane and refused when nobody clicked.

Nothing waits for a click. announce decides by the requester’s state:

  • Waived (the person’s own turn asked for it, or the “Agents may start agents” setting is on), or the person said Always to this agent before: it goes ahead at once, and the pane gets a one-line notice.
  • No window connected (headless): nobody could stop it, so it goes ahead at once, and is logged.
  • Otherwise a card with a 30 s countdown: Stop it, Start now, Always allow this agent. If nobody acts it goes ahead at the deadline. The requester closed or deleted (no pane left, or its agent stopped) ends it as Outcome::Gone. A parked agent is still running, so it does not.

The person’s choice comes only through agent.notice.decide, accepted only from the proven AgentMux window (operator_only): an agent can’t stop, hurry or grant on the person’s behalf, which is the one guard kept. The card is drawn from srv’s own record, with the agent’s own words only as the quoted brief.

Structs§

AgentNoticeDecideResult
How the person’s choice came out: too_late when the countdown had ended.
AgentNoticeGrantsResult
CommandAgentNoticeDecideData
Data for agent.notice.decide: the card’s id (from agent:notice).
CommandAgentNoticeGrantsData
Data for agent.notice.grants.
CommandAgentNoticeSetGrantData
Data for agent.notice.setgrant.
Ending 🔒
Ends a countdown however it ends: its caller can be dropped while it waits (the agent’s request closed with the agent), and the card must still go.
Entry 🔒
GrantsEvent
agent:grants: the agents with an “Always” for topic, after a change.
Notice
What the person is told, and what a grant is keyed by. Built by srv from its own record.
NoticeView
A notice as the pane draws it: a one-line line, a pending card with a countdown, or the end of a card (cleared, with its outcome).

Enums§

Choice 🔒
Go
Why it goes ahead.
Kind
What the notice is about.
Outcome
Waiver
Why no card was needed.

Constants§

COMMAND_AGENT_NOTICE_DECIDE
The person’s Stop it, Start now or Always for a countdown.
COMMAND_AGENT_NOTICE_GRANTS
The agents with an “Always” for a topic.
COMMAND_AGENT_NOTICE_SET_GRANT
The person’s switch of one agent’s “Always” (the pane menu and Settings).
COUNTDOWN
The one place the length of the wait is set.
EVENT_AGENT_GRANTS
EVENT_AGENT_NOTICE
KEEP_FINISHED_MS 🔒
A settled countdown stays answerable (as “too late”) this long.
REPLAY_EVENTS 🔒
How many events are kept for a window that opens mid-countdown.
WATCH_EVERY 🔒
How often a waiting countdown looks for its requester.

Statics§

ENTRIES 🔒

Functions§

announce
Tell the person, then say whether the thing goes ahead. alive says whether the requester is still there (its pane exists and its agent runs), asked while the countdown runs.
announce_for
announce with a countdown of window.
choice_of 🔒
countdown 🔒
decide
The person’s choice for countdown id. Always first remembers the grant (and says so if it could not), then starts the thing.
entries 🔒
granted 🔒
Whether the person already said Always to this requester.
line 🔒
The one-line notice, for a start nobody needs to answer.
pending
The countdowns still running.
publish_grants 🔒
register
agent.notice.decide, agent.notice.setgrant and agent.notice.grants. The first two are accepted only from the proven AgentMux window (operator_only), never from an agent: an agent can’t stop, hurry or grant on the person’s behalf.
remember 🔒
Write the “Always” the card offered.
settle 🔒
End the countdown id: the person’s choice if they made one (it wins over fallback, however close to the deadline), else fallback. After this the countdown answers “too late”.
topic_of 🔒
topic_wire 🔒
view_of 🔒