Skip to main content

Module route_audience

Module route_audience 

Source
Expand description

Which of srv’s routes a container agent may call: a route srv serves is for everyone unless an entry here says otherwise, and a path that is neither served nor named here is refused.

The rule (operator, 2026-10-28): a sandbox agent can do everything a native agent can do except directly update and run files on the machine. Audience::Everyone is the normal answer, so it is not written down: declaring a route (srv’s server/route_table.rs) is what makes it everyone’s. EXCEPTIONS is the whole boundary: a NativeOnly entry names the host capability (host_exec, host_write or host_read) that is the reason and tells the caller what to do instead; an AppOnly entry is the app’s own plumbing. docs/specs/container-agent-runtime.md has the table of what is refused and why.

Who each route is for is pinned, one line per route, in srv’s server/tests/route_audience.snapshot.txt: a new route adds a line there that says everyone unless an entry here names it, so a route cannot be added without its audience being read. A path under srv’s route namespaces that is neither served nor named, such as a route registered some way the table does not know, is refused with a message that says so; the container listener logs the path. Matched on the raw path, exactly as the router matches it.

Enums§

Match
How an entry matches a path.

Constants§

APP_ONLY
The app’s own plumbing: approvals and state the user’s windows report.
DESKTOP
Driving the operating system.
EXCEPTIONS
The routes that are not for everyone, first match wins. Every other route srv serves is for everyone.
GATEWAY
Generic gateways that reach everything else.
GLOBAL_MEMORY
Global Memory is composed into every native agent’s context at launch.
HOST_COMMANDS
Run a command on the host, in any form.
HOST_FILES
Reading host files for the windows.
INSTANCE_ONLY
Peer-to-peer routes between AgentMux instances.
LOCAL_SCRIPTS
The local hook an event job offers to scripts on this computer.
SRV_DOES_IT
Srv does this for a container agent.
STREAMED_BROWSER
A streamed Browser pane runs its page in the server’s own network position.
UNCLASSIFIED
What a path with no entry is told.
UPGRADE
Replacing the app.

Functions§

audience_of
The audience of path: what an entry of EXCEPTIONS says, else everyone when srv serves a route at path, else None.
refusal
Why a container agent may not call path, or None when it may. A path with no audience is refused as UNCLASSIFIED when it is under srv’s route namespaces. Any other path is what the router’s fallback serves (the frontend’s files, or a 404), as it always was.

Type Aliases§

Served
Whether srv serves a route at a path. Srv answers it from its route table and hands it to whoever asks here, so nothing in this crate can ask without saying what is served.