Expand description
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.
Structs§
- Agent
Context 🔒 - The agent pane’s place in the object tree, resolved from its block id.
Powers
GET /api/v1/selfand lets naming verbs default to “my own X”.
Functions§
- agent_
layout 🔒 - Read-only snapshot of the window → workspace → tab → pane tree, for agent
introspection (
GET /api/v1/layout). Pure mstore reads — no reducer, so it’s hermetic and safe. Lookups use linear scans (a handful of objects). - agent_
tabs 🔒 - Flat list of tabs (id, name, pane count). When
workspace_idis given, only that workspace’s tabs are returned. - agent_
windows 🔒 - Flat list of all windows (id, display name, assigned workspace).
- agent_
workspaces 🔒 - Flat list of all workspaces (id, name, tab count, active tab).
- resolve_
agent_ 🔒context - Walk block → tab → workspace → window from an agent pane’s block id.
- workspace_
id_ 🔒for_ tab - Find the id of the workspace that owns
tab_id(intabidsorpinnedtabids), orNoneif no workspace references it.