Skip to main content

TerminalApiLease

interface
interface TerminalApiLease

Import

import { TerminalApiLease } from '@modular/sdk';

Members7

agents
TerminalAgentApi

Provider-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()
() => any

Dispose this object.

findOwned()
(key: string) => OwnedTerminal | TerminalError

Return 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.