Expand description
Whether the actor a request names is the agent that sent it — identity
M4a-2 (docs/specs/SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md
§6.5.3, §6.5.6).
An actor site is a handler whose request says who is acting: a memory
owner, a global-memory writer, a work claimer or creator, an inject or bus
sender, a cron creator, a UI-automation signer (§6.5.2 item 4). When the
request is Caller::Agent, the named actor is checked against that
UID’s own row, and one of these is counted per site:
m4.actor_mismatch.<site>— the name is none of the row’s {slug, display name,instance_name}, matched as the M3 resolver matches (Store::agents_matching_name): slug exactly, the others ASCII case-insensitively. A name that would not select the caller’s row.m4.actor_ambiguous.<site>— the name selects the caller’s row, but not by its slug, and also selects another row — any row, a template included: the colliding-name case, in which a slug-keyed consumer (memory) resolves to the other agent, and the template-stub case of #3573.m4.actor_absent.<site>— an attributed request that names no actor.m4.actor_unchecked.<site>— the caller’s row could not be read.
Never refused, never awaited, and nothing is written: the check runs detached on the blocking pool; the handler does not await it, though it contends for the store’s connection lock like any store read (§7); M4c dual-writes the UID. This only measures how often the name and the token disagree before anything relies on the token. Unattributed requests are not checked — there is no row to compare with, and most are the UI (§6.5.1).
Macros§
Enums§
Constants§
- NO_
TOKEN 🔒 - What a route that acts for an agent says to a request with no token of this srv’s.
- TOKEN_
NAMES_ 🔒ANOTHER - What it says when the token is another agent’s, or the name is one more than one agent answers to.
Functions§
- check_
actor 🔒 - Count
actoragainst the caller’s row atsite. A no-op for an Unattributed caller. Never fails and is never awaited: the store reads run detached on the blocking pool (inline under test, so tests can read the counters right after the request). - check_
carried_ 🔒uid - A work claim also carries the claimer’s UID (
agent_uid, identity M1a). A carried UID that is not the token’s is counted on its own, since it is the UID — not the name — that M3 writes toclaimed_by_uid. - classify 🔒
- What to count for
actoragainst the caller’srow;Nonewhen the name is the caller’s own.rows_namedlists every row the name selects, templates included (Store::rows_answering_to); it is asked only when the name selects the caller’s row other than by its slug. - count_
against_ 🔒row - jekt_
sender_ 🔒by_ token - Identity M4d-4: whether a host-tier jekt is from the agent it claims by
its token (
audit_source_uidis the request’s Caller). Far-side receivers have no Caller and keep checking the signature, which is still sent. - names_
the_ 🔒caller - Whether
actoris a name the agent behinduidanswers to: its slug, display or instance name, or one it was renamed from (a running agent keeps sending under the name its environment held at launch). A name that also selects another row, or a row that can’t be read, is not held against it. - names_
the_ 🔒row - Whether
actorwould selectrowby name (see the module doc). - own_
agent_ 🔒only - An agent acts on its own panes only: a request that carries an agent’s token is refused when the pane (or agent) it acts on belongs to another. A request with no token (the window, a peer srv) is not compared, nor is a target that has no agent.
- own_
pane_ 🔒by_ token - Identity M4d-4: the pane of a caller whose token names it under its own
slug, from its UID’s registration, with no key to check.
None(today’s name path) for anyone else, or before the UID registers. - proven_
slug 🔒 - The slug of the agent behind
uidwhenactoris a name only that agent answers to: its slug, a display or instance name no other agent shares, or a name it was renamed from. A name another row also answers to, or a row that can’t be read, proves nothing (unlikenames_the_caller, which gives them the benefit of the doubt). - require_
actor 🔒 check_actorthat refuses: a request whose token names an agent may claim only that agent as its sender.Okfor an Unattributed caller (no token to compare with: the UI,muxsh, a peer srv), for a request that names no actor, and when the caller’s row can’t be read. The error is the handler’s answer.- require_
own_ 🔒block_ transcript require_own_transcriptfor a call that names a pane’s block instead of an agent: the archive or restore of that block’s transcript. An agent’s connection may act only on the block its own agent is running on (a block with no running agent is the window’s alone); any other connection must be the AgentMux window, proven by the host.- require_
own_ 🔒transcript - A WebSocket write to one agent’s transcript or session state. A connection
that registered as an agent (with its token) may write only its own agent’s;
any other connection must be the AgentMux window, proven by the host.
Holding the instance auth key proves nothing, because every agent holds it.
targetis the agent’s definition id or its slug;whatcompletes “FORBIDDEN: …” when a connection that isn’t the window is refused. - require_
token 🔒 - For a route that acts for the agent its token names (its memory, accounts,
presets): the request must carry a token this srv minted. Without one the
route has no one to act for, and a body’s
agent_idis only a claim, so it is refused instead of being taken at its word. - require_
token_ 🔒actor - For a route that records who acted: the agent the request’s token names, as
(slug, uid).claimedis the name the request gives for itself, and an empty one leaves the token to decide alone. Refused without a token, and whenclaimedis not a name only that agent answers to, so what is recorded is what the server proved and never a body field. - require_
token_ 🔒naming - Like
require_actor, but for a route that acts for an agent and has no meaning without one: the request must carry the token of the agent it names. A request with no token (or one this srv didn’t mint) is refused instead of being taken at its word, and so is one whose token names another agent. - source_
from_ 🔒token - A caller its token names that sent no source (
muxsh agent sendin an agent’s shell) is that agent: the source becomes its slug, so tier 4 can relay it and srv can sign it (SPEC_WAN_JEKT_SIGNED_BY_SRV_2026_10_14.md §3.1 rule 2). A source the caller did send is kept, and is signed only if it is the token’s own (wan_signer). - uid_
has_ 🔒slug - Identity M4d-4: whether
uid’s own row hasnameas its slug, exactly (spec §6.5.10 rule ii: never its display or instance name), so a request carryinguid’s token undernameis that agent by its token. - uid_
owns_ 🔒name - Whether
uid’s row is the one agent this instance knows byname: its slug isnameignoring case, and no other row’s slug folds toname. Every per-name key (host HMAC, LAN, WAN) is stored under the folded name, so a second row differing only in case (Victimbesidevictim) would hold the first one’s keys; for such a name nobody is its owner. - wan_
signer 🔒 - The agent srv may sign a WAN jekt as: its
source_agent, when the request’s own caller (caller_uid, from its token or a cron job’s creator; never anything a hop carries) owns that name (uid_owns_name, §3.1 rules 1 and 2). The name is compared ignoring case, as the keys are stored: an agent sends asQTest, its slug isqtest.