TerminalApiLease
interfaceImport
import { TerminalApiLease } from '@modular/sdk';Members7
- 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: TerminalId, request: { readonly authority: 'observe'; }) => Promise<ObservedTerminal | TerminalError> | (id: TerminalId, request: { readonly authority: 'control'; }) => Promise<ControlledTerminal | TerminalError>Borrow an existing terminal without taking ownership.
- create()
(options?: TerminalCreateOptions) => Promise<OwnedTerminal | TerminalError>Create a new terminal owned by the current mod.
- dispose()
() => anyDispose this object.
- findOwned()
(key: string) => OwnedTerminal | TerminalErrorReturn the open mod-owned terminal at `key` without creating one.
- getOrCreate()
(key: string, options?: TerminalCreateOptions) => Promise<OwnedTerminal | TerminalError>Reuse the mod-owned terminal at `key`, or create it once.