Skip to main content

Module remote_ops

Module remote_ops 

Source
Expand description

Remote operations: an agent does on another proven machine what it can do on its own (docs/specs/SPEC_AGENTS_OPERATE_OTHER_MACHINES_2026_10_30.md).

The transport (this module’s receive and send) owns the signature, the audience, the clock window, the nonce, the machine’s proof, the off switch and both audit rows. An operation is a handler that gets a RemoteCaller and its params and never sees the envelope: it runs the same code a local call runs, with RemoteCaller::actor as the actor, and anything that is sensitive locally files the same sensitive request.

To add an operation: write async fn in a file of its own, and add one arm to lookup.

Modules§

agent_ops 🔒
agents.start, agents.open, agents.stop, agents.set_seat, agents.rename, agents.update (model and effort), agents.env_get and agents.env_set: an agent controls another machine’s agents as it controls its own (spec §4.3, P3). Each runs the code of the local Agents action with the remote agent (slug@machine) as the actor, so every rule a local caller meets is met here too: a stop of another agent waits for the person’s keep-running window, a start counts against the sender’s start limit, an environment refuses the names an agent may not set. The agent a call names is one on this machine; an id or slug, as a local call takes it.
app_ops 🔒
app.version and app.health: the first operations, both reads (spec §4.3). Nothing here returns a credential, a path or an address.
audit_ops 🔒
audit.query: a paired computer reads this computer’s Audit, and this computer reads theirs (SPEC_AUDIT_LIVE_LOG_OF_EVERY_AGENT_ACTION_2026_11_03.md §3.6 point 5). A read, answered only when the owner turned on audit:sharewithpaired (off unless set, like tower:sharewithpaired), and only to a peer whose install this computer has approved: the rows name agents and what they did. The answer is the first page of the machine scope, the same rows the window lists, with no message text, and without the links that only work here (a pane, a history, a Kanban task). The asking computer shows the rows and forgets them: nothing is stored, and the cloud never carries them.
disk_cleanup_op 🔒
app.disk.cleanup: ask this machine to clear its agents’ idle build folders (spec §4.3). Like app.upgrade it starts nothing by itself: it files the disk_cleanup sensitive request, so this machine’s super agent decides and the person here sees the banner and can veto the countdown. The requester is agent@machine, never anything that reads as the operator.
disk_ops 🔒
app.disk.report: what is filling this machine’s disk that AgentMux made (spec §4.3), a read. The free space of the volumes AgentMux uses, the largest build folders (target) in the agents’ workspaces with the agent that owns each, and the folders of older versions in this channel. Paths are relative to the AgentMux home or the agents’ folder; nothing outside them is named.
fleet_sync 🔒
Keeps the fleet’s Global Memory in step (task #12439, section 4.6): the sending half of memory.global.put, .remove and .list.
google_ops 🔒
google.status and google.grant (docs/specs/SPEC_GOOGLE_PHASE_B_AGENTMUXS_OWN_CLIENT_2026_11_01.md §7): which Google accounts are connected here and who holds what, and turning a service of one on or off for an agent on this machine. Both run the code the Google tool’s status and grant run; a grant is recorded as the remote agent, slug@machine, in the account’s log and the window notice. connect has no remote form: the sign-in is a person’s, at the machine that holds the account.
identity_ops 🔒
identity.accounts and identity.switch (spec §4.3, §4.4): the signed-in accounts here with their stable id and quota, and moving an agent to one. Both run the code a local Identity call runs (server::account_episodes); a switch is audited as the remote agent, slug@machine, never as the operator, and never on the strength of the signed agent_uid.
live_facts_ops 🔒
agents.status (live facts spec §6.2): this machine’s agents with the facts a peer asked for, the answer the discovery route gives a local agent (live_facts::handler::answer), as a signed read. It carries state, model and counts only: no message text, prompt, transcript, credential or account email, and no pane or folder of this machine.
log_ops 🔒
app.logs.tail: the last lines of this AgentMux’s own srv or host log (spec §4.3), a read. Token shapes, private keys and card or ID numbers are hidden line by line, and the answer carries no path: only the lines and when the file was last written.
memory 🔒
memory.global.put, memory.global.remove and memory.global.list: one Global Memory for the fleet (task #12439, section 4.6). The rules for which write wins and what is never touched are in backend::memory::fleet; these are the thin handlers the transport calls.
move_audit 🔒
The audit rows of a move, on both computers (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 7(p)). One row per step the people on either side may want to read back: the source’s offered, accepted or refused, transferred (a count) and completed; the destination’s received, refused, registered and aborted. Every row is agent.move.<step>, names who asked, the agent, the other computer and sizes, and carries the move’s id as its request id, so the rows of one move on both computers can be put side by side. Never content: no chunk, key or archive path goes in a row. The destination’s consent is a sensitive request with its own rows (sensitive.*); the source’s whole call keeps its agent.move row.
move_capacity 🔒
What this computer has to take an agent in, for the preflight and the offer (docs/specs/SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER_2026_11_24.md section 7, row m). The preflight reports the numbers; an offer for an archive this computer cannot hold is refused with them and what to free, and there is no override. A figure that cannot be read is not a refusal: it is reported as unknown.
move_consent 🔒
The decision on an agent moving to this computer (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 6.3, step D of the build). An offer that passed its checks is filed here as the agent_move_in sensitive request: this computer’s super agent reviews it, and the person sees a banner naming the agent, where it comes from, who asked, what it carries and how big it is, with a countdown they can stop. The banner’s words come from the source’s signed summary, never from anything the offer carries outside it, and say the agent’s history is carried as it is.
move_harness 🔒
Whether the agent’s harness (its CLI) can run on this computer (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 7, rows c and 7.3 “missing CLI”), judged once when the offer arrives from the harness the signed offer names. A harness this computer has needs no word. One it does not have but installs itself is said in what the person decides on and installs at the agent’s first start (npm ones; the others are installed from the Toolchain pane first, and the words say so). One this computer cannot have at all (a harness it does not know, or a custom one that is not here) refuses the offer before anything is sent, naming it.
move_key_request 🔒
The Vault request for a key a moved agent’s route needs and this computer does not have (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 7.3, “route and key”). A move never copies a key’s value; the agent arrives on its harness’s own sign-in and the person is asked, in the Vault, to add the key. The request names the agent (by its uid, the id the agent’s own requests carry, which is how its My Agents row and the Vault pane find it) and the key’s label and nothing else, and it is the same request an agent’s own Vault request would file: the person fills the entry in or dismisses it, and nothing waits on the answer.
move_ops 🔒
The destination’s operations for a move of an agent to this computer (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 6.2, step D of the build): agent.move.preflight, .offer, .chunk, .status and .abort. Each is a write operation, so the transport has already required a LAN-verified caller whose install this computer trusts.
moved_ops 🔒
agent.moved (SPEC_MOVE_AN_AGENT_TO_ANOTHER_COMPUTER section 6.2 and 6.5): the computer an agent left tells the computers that hold its name that it went to another install, with a statement signed by its install key. It is believed only from the install the name’s pin is bound to, so a paired computer that never hosted the agent cannot rewrite a lead or a message route by claiming the agent moved. Taking it moves no pin: the new key is pinned when it is shown with the destination’s own certificate (reactive::lan_handover).
op 🔒
A remote operation: a typed request one AgentMux sends another on behalf of one of its agents, which the receiving AgentMux carries out itself (docs/specs/SPEC_AGENTS_OPERATE_OTHER_MACHINES_2026_10_30.md §4.1).
receive 🔒
The receiving half: POST /agentmux/remote/op on the peer listener (spec §4.1-4.2, §6). Every refusal is an answer, status: refused with a refused_reason, never a prompt and never a downgrade; the order below is the order of the checks.
reclaim_op 🔒
app.history_reclaim: ask this machine to give the shared pane-history store’s free space back at its next start, withdraw that, or read where it stands (spec §4.3). It is the local App history_reclaim unchanged (app_api::agent_history_reclaim), recorded as agent@machine. Nothing runs now, and the person sees the request pending in History > Storage.
send 🔒
The sending half (spec §4.1, §4.8): an agent asks this machine’s srv to run an operation on another machine. srv builds the envelope, signs it with the agent’s own LAN key (the agent’s process never holds the signing step, as for a jekt from an agent that signed nothing), sends it to the peer and returns the peer’s answer. It writes remote.request to this machine’s audit trail, by agent@machine.
signin_ops 🔒
identity.signin.* (spec §4.4, D6): signing in an account on this machine for an agent somewhere else. The provider’s own login runs here, under an account directory srv mints; the caller gets the link and the session, and later the account’s id and email, and never a token or a path. The caller shows the link where the person is reading, and the credentials stay on this machine. A session belongs to the caller that started it, as the transport proved it (slug@machine): another caller can’t read it or finish it.
sync_loop 🔒
The sync layer’s loop on the LAN (SPEC_USER_DATA_SYNC_LAYER §4.2): the sending half of the sync.* ops. Every few seconds (or at once when something calls wake) this machine looks at the collections it is a member of and, for each other member it can see on the LAN, runs one round (backend::user_sync::round) when something changed here since the last round with it, when it has not been synced for a while (to heal a lost push), or when it was never synced. A peer that is offline, unproven or without the ops is left alone until a retry time. Nothing is sent when nothing changed, so the audit trails carry only real work.
sync_ops 🔒
sync.hello, sync.pull, sync.push, sync.members, sync.join and sync.keys: the transport’s thin handlers over the sync layer’s op bodies (backend::user_sync::ops, SPEC_USER_DATA_SYNC_LAYER). Each is a write op, so the transport has already required a certificate from an install this machine trusts. The caller the layer sees is that install’s id: the member of a collection is the install that holds this computer’s sync lock, so a request is answered only while this install holds it, and only for a caller that is a current member of the collection it names. Nothing here sends anything or reaches the relay. A join waits for a person unless the collection allows it; the collection’s keys reach a member sealed to its box key and never otherwise.
tasks 🔒
tasks.enqueue and tasks.list (spec §4.3, phase P3): file a task on this machine’s board for one of its agents, and read the board. The logic is work_remote; these only give it the transport’s verified caller.
upgrade_op 🔒
app.upgrade: ask this machine to upgrade itself (spec §4.3). A remote request never starts anything by itself and is never “the user’s own turn”: it is filed as the same sensitive request a local agent’s App upgrade files, so this machine’s super agent decides and the person here sees the banner and can veto the countdown, whoever is or is not at the screen (SPEC_SUPER_AGENT_2026_10_25.md). The requester is agent@machine on the request, the banner and the audit, never anything that reads as the operator.
upgrade_watch 🔒
Telling an agent how the upgrade it asked another machine for ended.
zoom_ops 🔒
zoom.get, zoom.check, zoom.set, zoom.fit, zoom.reset and zoom.undo: an agent zooms the panes of another machine as it zooms its own (docs/specs/SPEC_MUXAPI_ZOOM_2026_11_24.md §8.2). Each runs the code of the local Zoom action, with the remote agent (slug@machine, from the verified key) as the name the notice shows and the write limit counts, so every rule a local call meets is met here too.

Structs§

Op 🔒
One operation: its handler, and whether it changes anything on this machine.
RemoteCaller 🔒
Who asks, as the receiving machine proved it.
RemoteRefusal 🔒
An operation that did not run, and why. code is snake_case and goes to the requester as refused_reason; message is for the requester’s agent to read. A plain failure uses failed.

Enums§

Verification 🔒
How the requesting machine was proven.

Functions§

enabled 🔒
Whether this machine takes remote operations: on unless network:remote_ops is false.
lookup 🔒
The operation op, if this build has one. One arm per operation: say whether it reads or writes.
max_params_of 🔒
The params limit of op: its own, or the default for one this build does not know.

Type Aliases§

OpFn 🔒
RemoteResult 🔒
Ok is the operation’s result (status done).