/** * Plan/28 — Mirror of the Pi SDK's built-in slash commands. * * The SDK `@mariozechner/pi-coding-agent` defines `BUILTIN_SLASH_COMMANDS` * in `dist/core/slash-commands.js` but does NOT re-export it from the main * package entry, and the `exports` field of its `package.json` blocks deep * imports. So pi-extension carries this manually-maintained mirror until * an upstream PR exposes the constant publicly. * * **Maintenance**: when bumping `@mariozechner/pi-coding-agent`, diff the * runtime's `BUILTIN_SLASH_COMMANDS` against this file and update names, * descriptions, and the invokable / takes_args flags. The Wave 0 scout of * plan/28 captured the 0.73.1 baseline; later bumps should leave a * one-liner note here documenting which SDK version was synced. * * Synced from SDK version: **0.73.1**. * * **Invokability**: a builtin is `invokable: true` only when an entry in * `ExtensionContextActions` lets the extension run it without simulating * keyboard input in the TUI. The full mapping lives in `dispatcher.ts` * (Wave B Slice 2). When more upstream APIs land, flip more flags to * `true` here and add the corresponding dispatch in `dispatcher.ts`. */ import type { WireCommand } from "../protocol/types.js"; /** * A built-in slash command as exposed by the Pi TUI. Mirror of the SDK's * `BuiltinSlashCommand` interface, kept local to avoid the deep-import. */ export interface BuiltinMirrorEntry { /** Slash name without the leading `/`. */ name: string; /** One-line description shown in the app picker. */ description: string; /** * Whether the extension API can invoke this builtin programmatically * via `ExtensionContextActions`. Stays `false` until plan/28 Wave B * Slice 2 wires the dispatcher AND the underlying SDK action exists. */ invokable: boolean; /** * Whether the builtin meaningfully accepts free-text arguments after * its name (e.g. `/model claude-opus-4-7`, `/name `). * Used by the app to decide whether to keep the input editable after * the chip is placed. */ takes_args: boolean; } export declare const BUILTIN_SLASH_COMMANDS_MIRROR: readonly BuiltinMirrorEntry[]; /** * Lookup helper used by the dispatcher. Returns the mirror entry for a * builtin name, or `undefined` if `name` is not a known builtin. */ export declare function findBuiltin(name: string): BuiltinMirrorEntry | undefined; /** * Project a mirror entry to the wire schema. Shared by the list_commands * handler so the mirror and the wire stay in lockstep. */ export declare function builtinToWire(entry: BuiltinMirrorEntry): WireCommand;