TerminalApiTransport
interfaceWhat every lane hands createTerminalApi: the host's terminal catalog and the requests a mod may make of it. The extension host and the webview runtime each implement this over their own RPC; the API on top is one implementation.
Import
import { TerminalApiTransport } from '@modular/sdk';Members16
- agentSnapshot
TerminalAgentCatalogSnapshot- snapshot
TerminalCatalogSnapshot- borrow()
(id: TerminalId, authority: TerminalAuthority, signal: HostActionAbortSignal | undefined) => Promise<TerminalAcquireResultDto>- close()
(request: TerminalCloseRequestDto, signal: HostActionAbortSignal | undefined) => Promise<TerminalOperationResultDto>- content()
(id: TerminalId, signal: HostActionAbortSignal | undefined) => Promise<TerminalContentResultDto>The host's bounded content for a terminal the mod may read.
- control()
(request: TerminalControlRequestDto, signal: HostActionAbortSignal | undefined) => Promise<TerminalOperationResultDto>- create()
(key: TerminalOwnershipKey, options: TerminalCreateOptions, signal: HostActionAbortSignal | undefined) => Promise<TerminalAcquireResultDto>- dispose()
() => anyDispose this object.
- execute()
(request: TerminalExecuteRequestDto, signal: HostActionAbortSignal | undefined) => Promise<TerminalExecuteResultDto>- promoteAgent()
(id: TerminalId, signal: HostActionAbortSignal | undefined) => Promise<TerminalAgentAcquireResultDto>- readAgentTranscript()
(id: TerminalId, signal: HostActionAbortSignal | undefined) => Promise<TerminalAgentTranscriptResultDto>- runAgent()
(request: TerminalAgentRunRequestDto, signal: HostActionAbortSignal | undefined) => Promise<TerminalAgentRunResultDto>- startAgent()
(key: TerminalOwnershipKey, options: TerminalAgentStartOptions, signal: HostActionAbortSignal | undefined) => Promise<TerminalAgentStartResultDto>- subscribe()
(listener: (snapshot: TerminalCatalogSnapshot) => void) => Disposable- subscribeAgents()
(listener: (snapshot: TerminalAgentCatalogSnapshot) => void) => Disposable- subscribeOutput()
(id: TerminalId, listener: (event: TerminalOutputEvent) => void, signal: HostActionAbortSignal | undefined) => Promise<TerminalOutputSubscriptionResult>Stream the host's output for a terminal the mod may read.