import type { Terminal } from '@jupyterlab/services'; import type { ITerminalTracker } from '@jupyterlab/terminal'; import type { TranslationBundle } from '@jupyterlab/translation'; import { ISignal } from '@lumino/signaling'; import type { SessionRegistry } from './model'; import type { IAgentTerminalSession, IAgentTerminals } from './tokens'; /** * The {@link IAgentTerminals} implementation: a read-only view over the * terminals panel's {@link SessionRegistry} narrowed to sessions with a * detection-confirmed coding agent, plus the "send a prompt into one" * action. Lives in the `xtralab:terminals` plugin so the ask-agent popup * (and any future caller) can target running agents without duplicating the * detection plumbing. */ export declare class AgentTerminals implements IAgentTerminals { constructor(options: AgentTerminals.IOptions); sessions(): IAgentTerminalSession[]; get changed(): ISignal; sendPrompt(name: string, prompt: string): Promise; private _findWidget; private _onRegistryStateChanged; private _registry; private _tracker; private _terminals; private _detectCommands; private _isAgentCommand; private _trans; private _changed; } /** * A namespace for `AgentTerminals` statics. */ export declare namespace AgentTerminals { /** * Construction options for {@link AgentTerminals}. */ interface IOptions { /** * The panel's session registry — the source of the session snapshot. */ registry: SessionRegistry; /** * Tracker of open terminal widgets, to reuse an open tab's connection. */ tracker: ITerminalTracker; /** * The terminal session manager, for validation and ad-hoc connections. */ terminals: Terminal.IManager; /** * Names to detect — same list the registry polls with. */ detectCommands: () => string[]; /** * Whether a detected command belongs to a coding agent (not an editor). */ isAgentCommand: (command: string) => boolean; /** * Translation bundle for the error messages thrown to callers. */ trans: TranslationBundle; } }