import type { JupyterFrontEnd } from '@jupyterlab/application'; import type { MainAreaWidget } from '@jupyterlab/apputils'; import type { ITerminal } from '@jupyterlab/terminal'; import type { CommandRegistry } from '@lumino/commands'; import { type IDisposable } from '@lumino/disposable'; import type { IAgentSessions } from '../agentSessions'; import type { IAgent } from './agents'; /** * The command id for opening the launcher. */ export declare const CREATE_LAUNCHER_COMMAND = "launcher:create"; /** * Register a JupyterLab command per agent. Each command opens a new * terminal via `terminal:create-new` and feeds the agent's shell command * into the fresh session as if the user had typed it. * * Returns a single disposable that tears down every registered command — * the launcher disposes the previous set before re-registering on settings * changes so the command palette stays in sync with the configured agents. * * When an `agentSessions` registry is supplied, each launch tags its terminal * session with the agent's command, so the terminals panel can badge the row * with the agent's logo immediately (before server-side detection confirms * it). */ export declare function registerAgentCommands(app: JupyterFrontEnd, agents: IAgent[], agentSessions?: IAgentSessions | null): IDisposable; /** * Open a fresh terminal, type `invocation` into it as if the user had, and * label the tab. Shared by the per-agent launch commands and the launcher's * editor tile so the fiddly "wait for the websocket, then write stdin" * sequence lives in one place. * * `onSession`, when given, is called once with the new session's name right * after the terminal is revealed. Callers use it to optimistically tag the * session so the terminals panel can badge it with the agent's (or editor's) * logo before server-side detection confirms the running process. * * Resolves with the host `MainAreaWidget` so the caller can place it — the * launcher swaps it into its own tab. */ export declare function launchInTerminal(commands: CommandRegistry, options: { cwd?: string; /** * The literal command line typed into the fresh terminal. */ invocation: string; /** * Tab/title label applied once the command is sent. */ label: string; onSession?: (sessionName: string) => void; }): Promise>;