TerminalApi
interfaceTop-level terminal catalog, borrowing, and ownership capability.
Import
import { TerminalApi } from '@modular/sdk';Members6
- agents
TerminalAgentApiProvider-native Claude and Codex sessions running in integrated terminals.
- snapshot
ReadonlySignal<TerminalCatalogSnapshot>Atomic live catalog of every integrated terminal and the active terminal.
- borrow
(id: string & $brand<'TerminalId'>, request: { authority: 'observe' }) => Promise<TerminalError | TerminalReference> | (id: string & $brand<'TerminalId'>, request: { authority: 'control' }) => Promise<TerminalError | ControlledTerminal>Borrow an existing terminal without taking ownership.
- create
(options?: TerminalCreateOptions) => Promise<TerminalError | OwnedTerminal>Create a new terminal owned by the current mod.
- findOwned
(key: string) => OwnedTerminal | nullReturn the open mod-owned terminal at `key` without creating one.
- getOrCreate
(key: string, options?: TerminalCreateOptions) => Promise<TerminalError | OwnedTerminal>Reuse the mod-owned terminal at `key`, or create it once.