Expand description
HTTP /agentmux/service dispatcher, split into concern-based submodules.
object/client/window/workspace/misc— the per-service RPC handlersdispatch_serviceroutes to.introspect— agent-facing read-only tree snapshots +AgentContextresolution (backs/api/v1/self,/layout, naming verbs).object_helpers— wave-object read/update/meta primitives.reducer_helpers— reducer dispatch / event publish / compensation.layout_helpers— layout-tree + pending-action writers used by the drag-and-drop / tear-off / redock handlers.
pub use re-exports keep every external call site
(crate::server::service::…, super::service::…) unchanged.
Modules§
- client 🔒
clientservice handler.- credential 🔒
credentialservice — the paired CEF host’s browser-pane Basic-Auth credential broker calls this, host→srv, to resolve an identity for a pane and to look up / save / delete / fill a stored site credential.- host_
ipc 🔒 host_ipcservice — the paired CEF host pushes its own CDP-automation credentials (ipc_port+ipc_token, gating/agentmux/browser/*on the host’s own IPC server) here once, at the host’s own startup, right after it learns this srv instance’s address. srv has no other way to learn these values — the host generatesipc_tokenfor itself and is the sole source of truth.- introspect 🔒
- Agent-facing introspection:
AgentContextresolution plus the read-only window → workspace → tab → pane snapshots that back/api/v1/self,/api/v1/layout, and the naming verbs. Pure mstore reads — no reducer. - layout_
helpers 🔒 - Layout-tree + pending-action writers used by the tear-off / promote /
redock handlers. SPEC_864 Phase 3/4 — all of them route through the
reducer (
seed_layout_via_reducer/queue_layout_actions_via_reducer); nothing here writes mstore directly anymore.setup_torn_off_block_layoutis re-exported crate-wide (the pane app-API uses it). - memory_
adopt 🔒 memoryadoptservice — the paired CEF host calls this, host→srv, once a human has confirmed in the host’s window which of an agent’s earlier accounts’ memory folders to adopt (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md §2.1.4, phase M3c).- misc 🔒
- Catch-all service handler for the smaller service namespaces (userinput / block / subagent / history / agent).
- object 🔒
objectservice handler (GetObject, CreateBlock, UpdateObject, …).- object_
helpers 🔒 - AgentMux-object read/update/meta primitives used by the
objectservice handler, plus the per-agent zoom mirror.update_object_metaandschedule_agent_zoom_mirrorare re-exported crate-wide. - reducer_
helpers 🔒 - Phase E.2c.2 reducer-dispatch helpers shared by the service handlers and
(via
crate::server::service::…) the sagas. - session_
restore 🔒 - Restore-on-relaunch (Feature 1 of
docs/specs/SPEC_SESSION_RESTORE_AND_SAVED_LAYOUTS_2026_08_13.md). - tab_
lifecycle 🔒 workspaceservice handlers — tab CRUD (CreateTab,SetActiveTab,CloseTab,UpdateTabIds,ReorderTab). Split out ofworkspace.rs; see that file’s dispatcher for the full method list.- tab_
move 🔒 workspaceservice handlers — drag-and-drop block/tab moves (MoveBlockToTab,PromoteBlockToTab,MoveTabToWorkspace,RestoreTornOffTab). Split out ofworkspace.rs; see that file’s dispatcher for the full method list.- tear_
off 🔒 workspaceservice handlers — floating-pane / torn-off tab flows (TearOffBlock,RedockFloatingPane,TearOffTab). Split out ofworkspace.rs; see that file’s dispatcher for the full method list.- window 🔒
windowservice handler (GetWindow, CreateWindow, CloseWindow, …).- window_
close 🔒 windowservice handler —CloseWindow. Split out ofwindow.rs; see that file’s dispatcher for the full method list.- window_
create 🔒 windowservice handler —CreateWindow. Split out ofwindow.rs; see that file’s dispatcher for the full method list.- window_
inherit 🔒 windowservice handlers —MarkWindowOpenandInheritWindowAppearance: a new window opens with the theme and opacity of the window that created it (docs/specs/SPEC_PER_WINDOW_THEME_AND_OPACITY_2026_10_12.md §6).- window_
mutate 🔒 windowservice handlers — window mutation RPCs (SwitchWorkspace,SetWindowPosAndSize,SetWindowOpacity,SetWindowTopology). Split out ofwindow.rs; see that file’s dispatcher for the full method list.- window_
query 🔒 windowservice handlers — read-only lookups (GetWindow,FindWindowByLabel). Split out ofwindow.rs; see that file’s dispatcher for the full method list.- workspace 🔒
workspaceservice handler (workspace + tab lifecycle, drag-and-drop moves).- workspace_
lifecycle 🔒 workspaceservice handlers — workspace CRUD (CreateWorkspace,GetWorkspace,DeleteWorkspace,UpdateWorkspace). Split out ofworkspace.rs; see that file’s dispatcher for the full method list.
Functions§
- dispatch_
service 🔒 - handle_
service 🔒 - run_
service_ 🔒call - Dispatch a service call and broadcast any resulting
MuxObjUpdates to the event bus — the shared core ofhandle_service. Factored out so the typed first-class agent-API verbs (e.g./api/v1/window/name) get byte-identical persistence + broadcast to a raw/agentmux/servicecall without re-implementing it. See SPEC_AGENT_API_FIRST_CLASS_SURFACE_2026_06_17.md.