Shell API
Shell API
Classes
- ShellApi
Live and archived cross-thread snapshots. Thread shells carry optional
latestRunStopRequested: whether the latest run has an interruption request. OptionalblockedOnThreadWaitreports whether the active run is blocked on thread-wait work. Older servers can omit these fields. Reading them does not request a stop or change wait behavior. OptionallastErrorCodeis the current provider failure code, or null when none applies; older servers can omit it. A pending runtime request summary carries optional booleanblocking: false for an async question the run can keep working past. Older servers can omit it. Reading this metadata does not answer a request or change run behavior. Linked pull request snapshot authors carry optional booleanisBotthrough shell snapshots and updates. True, false, omission and unknown actor metadata survive; malformed values fail decoding. This metadata does not grant permissions.
ShellApi
Live and archived cross-thread snapshots. Thread shells carry optional
latestRunStopRequested: whether the latest run has an interruption request.
Optional blockedOnThreadWait reports whether the active run is blocked on
thread-wait work. Older servers can omit these fields. Reading them does not
request a stop or change wait behavior. Optional lastErrorCode is the current
provider failure code, or null when none applies; older servers can omit it.
A pending runtime request summary carries optional boolean blocking: false
for an async question the run can keep working past. Older servers can omit
it. Reading this metadata does not answer a request or change run behavior.
Linked pull request snapshot authors carry optional boolean isBot through
shell snapshots and updates. True, false, omission and unknown actor metadata
survive; malformed values fail decoding. This metadata does not grant permissions.
Kind: global class
shellApi.snapshot()
Projects plus active and archived thread shells, over HTTP.
snapshot(
signal?: AbortSignal,
options?: ShellOmitOptions,
): Promise<OrchestrationV2ShellSnapshot>;
Kind: instance method of ShellApi
shellApi.archivedSnapshot()
Archived thread shells and projects, over RPC. The server has no live archived stream.
archivedSnapshot(signal?: AbortSignal): Promise<OrchestrationV2ArchivedShellSnapshot>;
Kind: instance method of ShellApi
shellApi.threadFamily()
The active threads that share this thread’s root, in any run state: the root, its forks and their subagent trees. An unknown thread has an empty family.
threadFamily(threadId: ThreadId, signal?: AbortSignal): Promise<OrchestrationV2ThreadFamily>;
Kind: instance method of ShellApi
shellApi.worktreeThreadIds()
Active threads on a worktree path, including subagent children a snapshot can leave out.
async worktreeThreadIds(worktreePath: string, signal?: AbortSignal): Promise<ThreadId[]>;
Kind: instance method of ShellApi
shellApi.olderSettledThreads()
A page of older settled threads below the cursor; limit: 0 fills only counts.
olderSettledThreads(
input: OrchestrationV2GetOlderSettledThreadsInput,
signal?: AbortSignal,
): Promise<OrchestrationV2OlderSettledThreadsPage>;
Kind: instance method of ShellApi
shellApi.watch()
Subscribes with orchestration.subscribeShell; resubscribes after a dropped socket.
watch(options: ShellWatchOptions = {}): AsyncIterable<ShellWatchItem>;
Kind: instance method of ShellApi