Skip to main content

Module muxspect_instances

Module muxspect_instances 

Source
Expand description

muxspect instances and muxspect --channel <name> <command>: look at another AgentMux instance on this machine from inside one (docs/specs/SPEC_MUXSPECT_CROSS_TIER_INSTANCE_INSPECTION_2026_09_02.md §2.3, §2.4).

GET /api/v1/muxspect/instances lists the live instances from backend::instance_registry. forward_to_channel is a layer on muxspect’s read routes: a request carrying ?channel=<name> is sent, as it is minus that parameter, to that instance’s own route and its answer returned. The layer sits on the routes named in routes.rs only. dock/clear and every other write is never behind it, so no instance can change another’s state through this.

Constants§

FORWARD_TIMEOUT 🔒
How long a forwarded request may take. These are diagnostic reads of a local process: a instance that does not answer in this time is reported, not waited for.
MAX_FORWARDED_BYTES 🔒
The most of a forwarded answer that is passed on.

Functions§

error_response 🔒
forward 🔒
Send GET <path>?<query> to the live instance on channel. live lists the live instances of dir (the real process table in production; a test passes its own).
forward_client 🔒
forward_timeout 🔒
How long the forwarded request for path may take: FORWARD_TIMEOUT, except for the one read that samples for a while on purpose (muxspect browsers).
forward_to_channel
A layer for muxspect’s read routes. Without ?channel=, or naming this instance’s own channel, the request is served here as always.
handle_muxspect_instances
GET /api/v1/muxspect/instances: every live AgentMux instance on this machine (the caller’s own is marked self), without their keys.
listing_body 🔒
read_capped 🔒
The body of resp, read chunk by chunk so that no more than cap bytes are ever held: None when it is larger (known from its Content-Length, or found out as it streams in).
relay 🔒
The other instance’s answer, as it gave it: its status, its content type and its body.
split_channel 🔒
The channel parameter of a query, and the query without it. None when the request names no channel (an empty channel= names none).