Skip to content

workspace.state.v1

Read workspace state

Returns a bounded structural snapshot of workspaces, tabs, and panes.

At a glance

Callable byagent, cli, plugin
Effectread — Reads state and changes nothing.
Confirmationnever — Runs without asking.
Idempotencynone
Leaves the machineno
Provided bydev.tenon.core
Contract classsealed

Input

PropertyRequiredTypeConstraints
cursornostringlength 0–512
limitnointegerrange 1–256

Output

PropertyRequiredTypeConstraints
activePaneIDyesstring | null
activeWorkspaceIDyesstringformat uuid, length 36–36, pattern-checked
nextCursoryesstring | null
nodesyes{activeTabID, id, kind, name, path, selected} | {activePaneID, id, kind, selected, workspaceID} | {content, frame, id, kind, tabID}[]items 0–256
snapshotIDyesstringformat uuid, length 36–36, pattern-checked

Errors it can return

These are this contract’s own failures, on top of the lifecycle errors every intent can settle with. See Errors.

  • dev.tenon.core.cursor-invalidated
  • dev.tenon.core.workspace-unavailable

Call it

From a plugin — declare it in intents.uses first:

js
const result = await tenon.intents.send("workspace.state.v1", {})
if (!result.ok) throw new Error(result.error.code)

From a shell:

sh
tenon-cli intent send workspace.state.v1 --input '{}'

Ask your own build for this same contract with tenon-cli intent describe workspace.state.v1.