import { LabIcon } from '@jupyterlab/ui-components'; /** * The shape of an agent card on the launcher. The `command` is the literal * text typed into the new terminal session — interactive shells expand * aliases, so users can point at `claude`, `cl`, or whatever runs their * preferred wrapper. */ export interface IAgent { id: string; label: string; caption: string; command: string; icon: LabIcon; rank: number; /** * When false, the launcher skips the `which`-based availability check for * this entry — useful for aliases or shell functions that aren't on PATH * but still resolve when typed in a real terminal. Defaults to true. */ requireAvailable: boolean; /** * Argv tokens spliced between `command` and a shell-quoted prompt when * the user types one into the launcher's prompt box. The semantics: * * - `[]` → prompt is appended as a positional argument: * ` 'PROMPT'`. (Used by claude, codex, vibe.) * - `['-i']` / `['--prompt']` → the prompt is preceded by a flag: * ` -i 'PROMPT'`. (Used by copilot, opencode.) * - `undefined` → the agent does not accept an initial prompt. The * launcher dims the agent's button while the prompt textarea is * non-empty, so the user gets a clear signal rather than a silently * dropped prompt. * * The prompt itself is always single-quoted with embedded single quotes * escaped, so multi-line prompts and shell metacharacters are safe. */ promptArgs?: string[]; } /** * The settings-side shape: every field except `id` is optional, so a user * can override a single field on a default agent (e.g. swap the command for * an alias) without restating the whole entry. New ids define brand-new * agent cards. */ export interface IAgentSettings { id: string; label?: string; caption?: string; command?: string; /** * Inline SVG for a custom agent's icon. Required for new ids whose icon * isn't shipped with xtralab; ignored for default ids unless explicitly * set (in which case it overrides the built-in). */ iconSvg?: string; rank?: number; /** * When false, the agent is hidden from the launcher and the command * palette. Defaults to true. */ enabled?: boolean; /** * See `IAgent.requireAvailable`. Defaults to true for a built-in agent that * still uses its shipped command, and to false once you override the * `command` (a user-chosen command — often a shell alias — is trusted and * always shown). Set it explicitly to force the check on or off. */ requireAvailable?: boolean; /** * See `IAgent.promptArgs`. Pass an empty array to mark the agent as * accepting a positional prompt; pass an array like `["-p"]` to use a * flag. Pass `null` to explicitly turn off prompt support for an agent * that has it on by default. */ promptArgs?: string[] | null; } /** * The built-in agents projected into the JSON settings shape * ({@link IAgentSettings}), dropping the runtime-only {@link LabIcon}. * {@link registerLauncherSchemaDefaults} injects this as the `agents` setting's * schema default so the Settings Editor shows the shipped list. */ export declare function defaultAgentSettings(): IAgentSettings[]; /** * Merge xtralab's defaults with the user's settings. Default entries keep * their built-in fields unless explicitly overridden; user-only entries are * appended. `enabled: false` filters an entry out of the result entirely * (so callers don't need to check the flag again). * * Overriding a built-in agent's `command` also turns its `requireAvailable` * off, so the card survives the launcher's `which`-based availability filter * even when the new command is a shell alias the server can't resolve. See the * built-in branch below for the rationale. */ export declare function mergeAgents(overrides: IAgentSettings[]): IAgent[];