Skip to main content

Module service

Module service 

Source
Expand description

HTTP /agentmux/service dispatcher, split into concern-based submodules.

  • object / client / window / workspace / misc — the per-service RPC handlers dispatch_service routes to.
  • introspect — agent-facing read-only tree snapshots + AgentContext resolution (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 🔒
client service handler.
credential 🔒
credential service — 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_ipc service — 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 generates ipc_token for itself and is the sole source of truth.
introspect 🔒
Agent-facing introspection: AgentContext resolution 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_layout is re-exported crate-wide (the pane app-API uses it).
memory_adopt 🔒
memoryadopt service — 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 🔒
object service handler (GetObject, CreateBlock, UpdateObject, …).
object_helpers 🔒
AgentMux-object read/update/meta primitives used by the object service handler, plus the per-agent zoom mirror. update_object_meta and schedule_agent_zoom_mirror are 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 🔒
workspace service handlers — tab CRUD (CreateTab, SetActiveTab, CloseTab, UpdateTabIds, ReorderTab). Split out of workspace.rs; see that file’s dispatcher for the full method list.
tab_move 🔒
workspace service handlers — drag-and-drop block/tab moves (MoveBlockToTab, PromoteBlockToTab, MoveTabToWorkspace, RestoreTornOffTab). Split out of workspace.rs; see that file’s dispatcher for the full method list.
tear_off 🔒
workspace service handlers — floating-pane / torn-off tab flows (TearOffBlock, RedockFloatingPane, TearOffTab). Split out of workspace.rs; see that file’s dispatcher for the full method list.
window 🔒
window service handler (GetWindow, CreateWindow, CloseWindow, …).
window_close 🔒
window service handler — CloseWindow. Split out of window.rs; see that file’s dispatcher for the full method list.
window_create 🔒
window service handler — CreateWindow. Split out of window.rs; see that file’s dispatcher for the full method list.
window_inherit 🔒
window service handlers — MarkWindowOpen and InheritWindowAppearance: 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 🔒
window service handlers — window mutation RPCs (SwitchWorkspace, SetWindowPosAndSize, SetWindowOpacity, SetWindowTopology). Split out of window.rs; see that file’s dispatcher for the full method list.
window_query 🔒
window service handlers — read-only lookups (GetWindow, FindWindowByLabel). Split out of window.rs; see that file’s dispatcher for the full method list.
workspace 🔒
workspace service handler (workspace + tab lifecycle, drag-and-drop moves).
workspace_lifecycle 🔒
workspace service handlers — workspace CRUD (CreateWorkspace, GetWorkspace, DeleteWorkspace, UpdateWorkspace). Split out of workspace.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 of handle_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/service call without re-implementing it. See SPEC_AGENT_API_FIRST_CLASS_SURFACE_2026_06_17.md.