Module rpc_types

Module rpc_types 

Source
Expand description

RPC wire format types: Rust equivalents of Go structs from pkg/wshutil/wshrpc.go and pkg/wshrpc/wshrpctypes.go.

Structs§

AgentArchiveRow
One row of the agent’s archive list. Mirrors RecentSessionRow preview shape so the frontend can reuse the same row component.
AgentConfigFile
A file to write as part of agent config.
AgentDefCreateFromTemplateResult
Response for agentdefcreatefromtemplate. The frontend uses definition_id to launch the freshly-created agent.
AgentDefHideResult
Response for agentdefhide / agentdefunhide. ok = true when a row was updated; false when the id didn’t match any row. (A row that exists but isn’t a template returns an RPC-level error, not ok: false — the caller should never have been able to send that id from the picker UI.)
AgentDefinitionExport
AgentDefinitionImport
AgentKillProcessCommand
Request for agent.kill-process — terminate a single PID if it’s in a given block’s tracker tree.
AgentKillResult
Response from agent.kill-process / agent.kill-tree. ok: true means the kill was dispatched; it does NOT guarantee the OS has fully torn down every descendant by the time the RPC returns. The swarm activity panel’s next refresh will reflect actual state.
AgentKillTreeCommand
Request for agent.kill-tree — nuke every process tracked under a given block.
AgentListEntry
A single entry in the agent.list response.
AgentListResult
Response from agent.list.
AgentOpenResult
Response from agent.open.
AgentOutputResult
Response from agent.output.
AgentProcessInfo
One tracked process row. Mirrors backend::process_tracker::TrackedProcess — defined here so the RPC layer can expose it without leaking the internal module shape.
AgentProcessListCommand
Request for agent.process-list — processes tracked under a given block.
AgentProcessListResult
Response from agent.process-list.
AgentSendResult
Response from agent.send.
AgentSessionAppendOutputResult
AgentSessionArchiveResult
AgentSessionReadResult
Response for agent:session:read. content == None means no zone / snapshot exists for this definition (NOT an error — fresh agent).
AgentSessionWriteStateResult
AgentSkillExport
AgentSkillImport
AgentStatusResult
Response from agent.status.
AgentStopResult
Response from agent.stop.
AgentTrackedBlocksResult
Response from agent.tracked-blocks — the list of block IDs for which a tracker exists. Swarm pane uses this to render per-agent groups.
BlockInfoData
Matches Go’s BlockInfoData
BlockfileLineCountResult
Response from blockfile:line_count.
BlockfileReadRangeResult
Response from blockfile:read_range.
BlockfileReadStateResult
Response from blockfile:read_state. content is the raw file bytes as a UTF-8 string, or null if the sidecar does not exist.
BlockfileWriteStateResult
Response from blockfile:write_state.
CheckCliAuthResult
Result from CheckCliAuthCommand
CommandAgentDefCreateFromTemplateData
Request for agentdefcreatefromtemplate. Clones a seeded template into a new user-owned definition. Phase 1 of the two-tier picker.
CommandAgentDefHideData
Request for agentdefhide / agentdefunhide. Phase 2 of the two-tier picker (Q2 Decision Y). The two RPCs share the same shape — the action is encoded in the command name, not the payload.
CommandAgentInputData
Data for AgentInputCommand — send a follow-up message (re-spawns with –resume).
CommandAgentOpenData
Request for agent.open — find or create an agent pane for the given agent_id.
CommandAgentOutputData
Request for agent.output — read buffered output lines from an agent pane.
CommandAgentSendData
Request for agent.send — send a message to an agent pane.
CommandAgentSessionAppendOutputData
Request for agent:session:append_output. Appends a single NDJSON line to output in agent:<definition_id>:current.
CommandAgentSessionArchiveData
Request for agent:session:archive. Snapshots agent:<defId>:current into agent:<defId>:archive:<now_ms> then clears the current zone. Returns the archive zoneid (empty if no-op).
CommandAgentSessionListArchivesData
Request for agent:session:list_archives.
CommandAgentSessionReadData
Request for agent:session:read.
CommandAgentSessionWriteStateData
Request for agent:session:write_state. Writes output.state.json into agent:<definition_id>:current (creates the zone if missing).
CommandAgentStatusData
Request for agent.status — query status of an agent pane.
CommandAgentStopApiData
Request for agent.stop — stop a running agent subprocess.
CommandAgentStopData
Data for AgentStopCommand — stop the running subprocess.
CommandAgentStreamData
Request for agent.stream — subscribe to live output from an agent pane.
CommandAppendAgentHistoryData
Input for appendagenthistory
CommandAuthenticateRtnData
Matches Go’s CommandAuthenticateRtnData
CommandAuthenticateTokenData
Matches Go’s CommandAuthenticateTokenData
CommandBindIdentityAccountData
CommandBlockInputData
Matches Go’s CommandBlockInputData
CommandBlockSetViewData
Matches Go’s CommandBlockSetViewData
CommandBlockfileLineCountData
Request for blockfile:line_count — count total lines in a blockfile.
CommandBlockfileReadRangeData
Request for blockfile:read_range — read a range of lines from a blockfile.
CommandBlockfileReadStateData
Request for blockfile:read_state — read a sidecar JSON file (e.g. output.state.json) associated with a block. Spec: docs/specs/SPEC_AGENT_PANE_STATE_PERSISTENCE_2026_05_15.md.
CommandBlockfileWriteStateData
Request for blockfile:write_state — atomically write a sidecar JSON file for a block. Uses tmp + fsync + rename to guarantee partial writes never surface to readers.
CommandCheckCliAuthData
Data for CheckCliAuthCommand — check if CLI is authenticated.
CommandControllerResyncData
Matches Go’s CommandControllerResyncData
CommandCreateAgentDefinitionData
Input for createagent
CommandCreateAgentInstanceData
CommandCreateAgentSkillData
Input for createagentskill
CommandCreateBlockData
Matches Go’s CommandCreateBlockData
CommandDeleteAgentDefinitionData
Input for deleteagent
CommandDeleteAgentInstanceData
CommandDeleteAgentSkillData
Input for deleteagentskill
CommandDeleteBlockData
Matches Go’s CommandDeleteBlockData
CommandDeleteIdentityAccountData
CommandDeleteIdentityBundleData
CommandDeleteMemoryData
CommandDisposeData
Matches Go’s CommandDisposeData
CommandEventReadHistoryData
Matches Go’s CommandEventReadHistoryData
CommandForkAgentDefinitionData
CommandGetAgentContentData
Input for getagentcontent
CommandGetAgentInstanceData
CommandGetAllAgentContentData
Input for getallagentcontent
CommandGetIdentityAccountData
CommandGetIdentityBundleData
CommandGetMemoryData
CommandGetMetaData
Matches Go’s CommandGetMetaData
CommandHideNamedAgentData
Request for hidenamedagent. Sets display_hidden = 1 on the row. Row + working directory remain on disk for audit + recovery (destructive deletion is a separate, confirm-gated flow).
CommandImportAgentDefinitionsData
Input for importagents
CommandImportAgentFromClawData
Input for importagentfromclaw
CommandInstallToolData
CommandLinkAgentIdentityData
CommandListAgentDefinitionsData
Optional filter input for listagents. When is_seeded is set, only definitions whose is_seeded column matches are returned (Some(1) → templates only; Some(0) → user-owned agents only). Absent / None = no filter — backward-compatible with callers that pass {} or null. Phase 1 of the two-tier picker (SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md).
CommandListAgentHistoryData
Input for listagenthistory
CommandListAgentIdentitiesData
CommandListAgentInstancesData
CommandListAgentSkillsData
Input for listagentskills
CommandListIdentityAccountsData
CommandListIdentityBindingsData
CommandListNamedAgentsData
Request for listnamedagents. The launch modal’s “Continue agent” dropdown calls this; an absent / zero limit defaults to 200 (capped at 1000 to keep the wire payload bounded).
CommandListRecentSessionsData
Request for listrecentsessions — powers the AgentPicker’s “Recent sessions” surface (cascade follow-up, 2026-05-23). Optional identity_id filter narrows the results to sessions that used the given identity bundle (matches db_agent_instances.identity_id). limit defaults to 20 (capped at 100); rows are sorted by the most-recent activity timestamp (filestore output.state.json modts when available, otherwise instance started_at).
CommandMessageData
Matches Go’s CommandMessageData
CommandPaneOpenData
Request for pane.open — create a new pane showing the given view.
CommandResolveCliData
Data for ResolveCliCommand — detect or install a CLI tool.
CommandResolveIdsData
Matches Go’s CommandResolveIdsData
CommandResolveIdsRtnData
Matches Go’s CommandResolveIdsRtnData
CommandRunCliLoginData
Input for RunCliLoginCommand — spawns the CLI login flow and extracts the OAuth URL
CommandSearchAgentHistoryData
Input for searchagenthistory
CommandSessionArchiveData
Request for session:archive — compress and archive a session’s FileStore output.
CommandSessionDigestData
Request for session:digest — generate or return a cached AI summary of the session.
CommandSessionExportData
Request for session:export — read session output and return as base64 JSONL.
CommandSessionRestoreData
Request for session:restore — decompress archive back into FileStore.
CommandSetAgentContentData
Input for setagentcontent
CommandSetMetaData
Matches Go’s CommandSetMetaData
CommandSubprocessSpawnData
Data for SubprocessSpawnCommand — spawn agent CLI for a single turn.
CommandToolDecisionData
Data for tooldecision — frontend’s reply to a per-tool-call permission gate. Today the backend validates the outcome and logs the decision; actual delivery to the agent CLI is deferred to PR-3b/PR-4 (rules persistence vs. interactive subprocess path). Spec: docs/specs/SPEC_DECISION_PROMPT_2026_04_24.md §9.1.
CommandUnbindIdentityAccountData
CommandUnlinkAgentIdentityData
CommandUpdateAgentDefinitionData
Input for updateagent
CommandUpdateAgentInstanceData
Mutable subset of AgentInstance for PATCH-style updates. Every field is optional — absent fields preserve their current value.
CommandUpdateAgentSkillData
Input for updateagentskill
CommandVarData
Matches Go’s CommandVarData
CommandVarResponseData
Matches Go’s CommandVarResponseData
CommandWaitForRouteData
Matches Go’s CommandWaitForRouteData
CommandWriteAgentConfigData
Data for WriteAgentConfigCommand — write config files atomically.
CommandWriteAgentConfigResult
Result of WriteAgentConfigCommand. Returns the final working directory used; callers should compare against the requested working_dir and patch cmd:cwd (via SetMeta) when they differ so the controller spawns the CLI in the actually-created dir.
ConnStatus
Matches Go’s ConnStatus
ExportAgentDefinitionsResult
Response for exportagents
FileData
Matches Go’s FileData
FileDataAt
Matches Go’s FileDataAt
FileInfo
Matches Go’s FileInfo
FileOpts
Matches Go’s FileOpts
GetToolStatusResult
ImportAgentDefinitionsResult
InstallFailure
InstallToolResult
NamedAgentRow
One row of the launch modal’s “Continue agent” dropdown. Joins db_agent_instances with db_agent_definitions (for the definition’s display name + provider) and db_identity_bundles / db_memory_bundles (for bundle names) so the frontend renders without further lookups.
PaneOpenResult
Response from pane.open.
RecentSessionRow
One row of the AgentPicker’s “Recent sessions” list. Mirrors NamedAgentRow but adds preview fields read from the per-block output.state.json snapshot in filestore. node_count == 0 and an empty preview mean the snapshot wasn’t readable (the block may pre-date the persistence flow or have crashed before its first 30s snapshot) — the row still surfaces so the user can reattach.
RemoteInfo
Matches Go’s RemoteInfo
ResolveCliResult
Result from ResolveCliCommand
RpcContext
Matches Go’s RpcContext
RpcMessage
Matches Go’s wshutil.RpcMessage from pkg/wshutil/wshrpc.go. This is the on-the-wire JSON envelope for all RPC communication.
RpcOpts
Matches Go’s RpcOpts
RunCliLoginResult
Result from RunCliLoginCommand
SessionArchiveResult
Response from session:archive.
SessionDigestResult
Response from session:digest.
SessionExportResult
Response from session:export.
SessionRestoreResult
Response from session:restore.
TimeSeriesData
Matches Go’s TimeSeriesData
WaveInfoData
Matches Go’s WaveInfoData
WaveNotificationOptions
Matches Go’s WaveNotificationOptions
WorkspaceInfoData
Matches Go’s WorkspaceInfoData

Constants§

CLIENT_TYPE_BLOCK_CONTROLLER
CLIENT_TYPE_CONN_SERVER
COMMAND_ACTIVITY
COMMAND_AGENT_DEF_CREATE_FROM_TEMPLATE
Two-tier picker (Phase 1 — SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md). Clone a seeded template into a new user-owned agent definition with is_seeded = 0. Copies provider + cmd + env + auth-config fields from the template, applies the caller-supplied name + bindings, returns the new definition_id so the frontend can immediately launch. Rejects non-template ids + duplicate user-agent names.
COMMAND_AGENT_DEF_HIDE
Two-tier picker (Phase 2 — SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md Q2 Decision Y). Set the user_hidden flag on a seeded template so it disappears from the default + New from template list. Idempotent; rejects user-owned (is_seeded = 0) definitions — those use deleteagent instead. Manifest re-sync resets user_hidden = 0 for any newly-added template id so fresh templates always surface once.
COMMAND_AGENT_DEF_LIST_HIDDEN_TEMPLATES
Two-tier picker (Phase 2). Return only the hidden templates (is_seeded = 1 AND user_hidden = 1). Backs the settings UI’s list of templates the user can unhide. The picker proper never calls this — it uses listagents (which excludes hidden rows by default).
COMMAND_AGENT_DEF_UNHIDE
Two-tier picker (Phase 2). Inverse of agentdefhide — set user_hidden = 0 so a previously-hidden template reappears in the picker’s templates tier. Powers the settings “Hidden templates” unhide affordance. Same validation as hide.
COMMAND_AGENT_INPUT
COMMAND_AGENT_KILL_PROCESS
Terminate a single process by PID if it’s a member of a given block’s tracker tree. Silently no-ops if the PID isn’t tracked. Returns AgentKillResult { ok: bool }.
COMMAND_AGENT_KILL_TREE
Terminate the entire process tree for a given block. On Windows: TerminateJobObject. On Linux: cgroup.kill. On macOS: killpg. Returns AgentKillResult { ok: true } even when there are no members (idempotent).
COMMAND_AGENT_LIST
COMMAND_AGENT_OPEN
COMMAND_AGENT_OUTPUT
COMMAND_AGENT_PROCESS_LIST
List every OS process currently tracked for a given agent block. Returns AgentProcessListResult. Consumed by the swarm activity panel. See backend::process_tracker.
COMMAND_AGENT_SEND
COMMAND_AGENT_SESSION_APPEND_OUTPUT
COMMAND_AGENT_SESSION_ARCHIVE
COMMAND_AGENT_SESSION_LIST_ARCHIVES
COMMAND_AGENT_SESSION_READ
COMMAND_AGENT_SESSION_WRITE_STATE
COMMAND_AGENT_STATUS
COMMAND_AGENT_STOP
COMMAND_AGENT_STOP_API
COMMAND_AGENT_STREAM
COMMAND_AGENT_TRACKED_BLOCKS
List every block currently tracked (for the swarm aggregate view). Returns AgentTrackedBlocksResult.
COMMAND_AI_SEND_MESSAGE
COMMAND_APPEND_AGENT_HISTORY
COMMAND_APP_INFO
COMMAND_AUTHENTICATE
COMMAND_AUTHENTICATE_TOKEN
COMMAND_BIND_IDENTITY_ACCOUNT
COMMAND_BLOCKFILE_LINE_COUNT
COMMAND_BLOCKFILE_READ_RANGE
COMMAND_BLOCKFILE_READ_STATE
COMMAND_BLOCKFILE_WRITE_STATE
COMMAND_BLOCKS_LIST
COMMAND_BLOCK_INFO
COMMAND_CAPTURE_BLOCK_SCREENSHOT
COMMAND_CHECK_CLI_AUTH
COMMAND_CONN_CONNECT
COMMAND_CONN_DISCONNECT
COMMAND_CONN_ENSURE
COMMAND_CONN_LIST
COMMAND_CONN_LIST_AWS
COMMAND_CONN_STATUS
COMMAND_CONTROLLER_INPUT
COMMAND_CONTROLLER_RESTART
COMMAND_CONTROLLER_RESYNC
COMMAND_CONTROLLER_STOP
COMMAND_CREATE_AGENT
COMMAND_CREATE_AGENT_INSTANCE
COMMAND_CREATE_AGENT_SKILL
COMMAND_CREATE_BLOCK
COMMAND_DELETE_AGENT
COMMAND_DELETE_AGENT_INSTANCE
COMMAND_DELETE_AGENT_SKILL
COMMAND_DELETE_BLOCK
COMMAND_DELETE_DRONE
COMMAND_DELETE_IDENTITY_ACCOUNT
COMMAND_DELETE_IDENTITY_BUNDLE
COMMAND_DELETE_MEMORY
COMMAND_DISPOSE
COMMAND_EVENT_PUBLISH
COMMAND_EVENT_READ_HISTORY
COMMAND_EVENT_RECV
COMMAND_EVENT_SUB
COMMAND_EVENT_UNSUB
COMMAND_EVENT_UNSUB_ALL
COMMAND_EXPORT_AGENTS
COMMAND_FILE_APPEND
COMMAND_FILE_APPEND_IJSON
COMMAND_FILE_COPY
COMMAND_FILE_JOIN
COMMAND_FILE_MOVE
COMMAND_FILE_READ
COMMAND_FILE_READ_STREAM
COMMAND_FILE_SHARE_CAPABILITY
COMMAND_FILE_STREAM_TAR
COMMAND_FILE_WRITE
COMMAND_FOCUS_WINDOW
COMMAND_FORK_AGENT_DEFINITION
COMMAND_GET_AGENT_CONTENT
COMMAND_GET_AGENT_INSTANCE
COMMAND_GET_AI_RATE_LIMIT
COMMAND_GET_ALL_AGENT_CONTENT
COMMAND_GET_DRONE
COMMAND_GET_FULL_CONFIG
COMMAND_GET_IDENTITY_ACCOUNT
COMMAND_GET_IDENTITY_BUNDLE
COMMAND_GET_MEMORY
COMMAND_GET_META
COMMAND_GET_RT_INFO
COMMAND_GET_TOOL_STATUS
COMMAND_GET_UPDATE_CHANNEL
COMMAND_GET_VAR
COMMAND_HIDE_NAMED_AGENT
v8 — soft-delete (hide) a named agent instance from the dropdown. Row + working directory remain on disk for audit + recovery.
COMMAND_IMPORT_AGENTS
COMMAND_IMPORT_AGENT_FROM_CLAW
COMMAND_INSTALL_TOOL
COMMAND_LINK_AGENT_IDENTITY
COMMAND_LIST_AGENTS
COMMAND_LIST_AGENT_HISTORY
COMMAND_LIST_AGENT_IDENTITIES
COMMAND_LIST_AGENT_INSTANCES
COMMAND_LIST_AGENT_SKILLS
COMMAND_LIST_DRONES
COMMAND_LIST_DRONE_RUNS
COMMAND_LIST_IDENTITY_ACCOUNTS
COMMAND_LIST_IDENTITY_BINDINGS
COMMAND_LIST_IDENTITY_BUNDLES
COMMAND_LIST_MEMORIES
COMMAND_LIST_NAMED_AGENTS
v8 — list named agent instances for the launch modal’s “Continue agent” dropdown. Filters to non-hidden rows with a non-empty instance_name, joined with definition + identity + memory bundles.
COMMAND_LIST_RECENT_SESSIONS
Cascade follow-up (2026-05-23) — list recent agent sessions with conversation previews extracted from the filestore output.state.json snapshot. Powers the AgentPicker’s “Recent sessions” surface so a pane crash that orphans a conversation becomes recoverable from normal UI. See docs/recovery/MAKS_CONVERSATION_2026_05_23.md.
COMMAND_MESSAGE
COMMAND_MKDIR
COMMAND_NOTIFY
COMMAND_PANE_OPEN
COMMAND_REMOTE_FILE_DELETE
COMMAND_REMOTE_FILE_INFO
COMMAND_REMOTE_FILE_JOIN
COMMAND_REMOTE_FILE_TOUCH
COMMAND_REMOTE_GET_INFO
COMMAND_REMOTE_INSTALL_RC_FILES
COMMAND_REMOTE_MKDIR
COMMAND_REMOTE_STREAM_FILE
COMMAND_REMOTE_TAR_STREAM
COMMAND_REMOTE_WRITE_FILE
COMMAND_RESEED_AGENTS
COMMAND_RESOLVE_CLI
COMMAND_RESOLVE_IDS
COMMAND_ROUTE_ANNOUNCE
COMMAND_ROUTE_UNANNOUNCE
COMMAND_RUN_DRONE
COMMAND_SEARCH_AGENT_HISTORY
COMMAND_SESSION_ARCHIVE
COMMAND_SESSION_DIGEST
COMMAND_SESSION_EXPORT
COMMAND_SESSION_RESTORE
COMMAND_SET_AGENT_CONTENT
COMMAND_SET_CONFIG
COMMAND_SET_CONNECTIONS_CONFIG
COMMAND_SET_META
COMMAND_SET_RT_INFO
COMMAND_SET_VAR
COMMAND_SET_VIEW
COMMAND_STREAM_CPU_DATA
COMMAND_STREAM_TEST
COMMAND_SUBPROCESS_SPAWN
COMMAND_TERM_GET_SCROLLBACK_LINES
COMMAND_TEST
COMMAND_TOOL_DECISION
Per-tool-call permission decision RPC. Frontend sends after the user clicks Allow / Deny in AgentDecisionPanel. Today the handler validates the payload and logs the decision (audit trail); actual delivery to the agent CLI — rules persistence vs. interactive subprocess — is deferred to PR-3b/PR-4 per docs/specs/SPEC_DECISION_PROMPT_2026_04_24.md §9.1.
COMMAND_UNBIND_IDENTITY_ACCOUNT
COMMAND_UNLINK_AGENT_IDENTITY
COMMAND_UPDATE_AGENT
COMMAND_UPDATE_AGENT_INSTANCE
COMMAND_UPDATE_AGENT_SKILL
COMMAND_UPSERT_DRONE
COMMAND_UPSERT_IDENTITY_ACCOUNT
COMMAND_UPSERT_IDENTITY_BUNDLE
COMMAND_UPSERT_MEMORY
COMMAND_VDOM_ASYNC_INITIATION
COMMAND_VDOM_CREATE_CONTEXT
COMMAND_VDOM_RENDER
COMMAND_VDOM_URL_REQUEST
COMMAND_WEB_SELECTOR
COMMAND_WORKSPACE_LIST
COMMAND_WRITE_AGENT_CONFIG
COMMAND_WSL_DEFAULT_DISTRO
COMMAND_WSL_LIST
COMMAND_WSL_STATUS
CREATE_BLOCK_ACTION_REPLACE
CREATE_BLOCK_ACTION_SPLIT_DOWN
CREATE_BLOCK_ACTION_SPLIT_LEFT
CREATE_BLOCK_ACTION_SPLIT_RIGHT
CREATE_BLOCK_ACTION_SPLIT_UP
DIR_CHUNK_SIZE
FILE_CHUNK_SIZE
LOCAL_CONN_NAME
MAX_DIR_SIZE
MAX_FILE_SIZE
RPC_TYPE_CALL
RPC_TYPE_COMPLEX
RPC_TYPE_RESPONSE_STREAM
RPC_TYPE_STREAMING_REQUEST

Functions§

default_agent_icon 🔒
default_agent_type 🔒
default_history_limit 🔒
default_skill_type 🔒
is_zero_i64 🔒
is_zero_usize 🔒