Skip to main content

Module introspect

Module introspect 

Source
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§

AgentContext 🔒
The agent pane’s place in the object tree, resolved from its block id. Powers GET /api/v1/self and 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_id is 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 (in tabids or pinnedtabids), or None if no workspace references it.