/** * Passthrough / daemon command sets — extracted into a leaf module so both the * command router ({@link ../core/command-handler.js}) and the `/botconfig` config * store ({@link ../services/bot-config-store.js}) can share the normalization * without a circular import (command-handler already imports the config store). */ /** * Slash commands handled by the daemon itself (open a conversation / act on the * chat) rather than relayed to the CLI. Used both for routing and to reject * `customPassthroughCommands` entries that would shadow a daemon command. */ export declare const DAEMON_COMMANDS: Set; /** * Slash commands that are forwarded verbatim to the underlying CLI (e.g. * Claude Code's `/compact`, `/model`, `/usage`). The daemon does NOT handle * these — it just relays them to the worker via a raw_input IPC message, * bypassing the normal prompt-wrapping and bracketed-paste path so the CLI's * own slash-command parser sees them. */ export declare const PASSTHROUGH_COMMANDS: Set; /** * Shape of a slash-command token: leading `/`, an alphanumeric first char, then * `[a-z0-9:_-]`. Shared by passthrough normalization AND the grant-restriction * gate ({@link ../daemon.js}'s `grantRestrictedSlashCommandText`) so a custom * passthrough command can't slip past the restriction check via a shape one * recognizes but the other doesn't (e.g. `/foo:bar`, `/1cmd` — colon / leading * digit). Keep the two in lockstep: anything passthrough accepts must also be * recognized as a command by the restriction gate. */ export declare const SLASH_COMMAND_SHAPE: RegExp; /** * Normalize a single custom passthrough command: lowercase, must match the * slash-command shape, and must not shadow a daemon command (passthrough is * checked BEFORE DAEMON_COMMANDS in the router). Returns null for anything that * doesn't qualify. Does NOT prepend the leading `/` — callers that accept bare * user input should add it first (see {@link parseCustomPassthroughInput}). */ export declare function normalizePassthroughCommand(cmd: unknown): string | null; /** * Parse free-text dashboard / `/botconfig` input (comma, space or newline * separated) into a normalized, deduped custom passthrough command list. The * leading `/` is optional per token (so users can type `goal export` or * `/goal, /export`); illegal and daemon-shadowing tokens are dropped. Mirrors * the normalization {@link ../bot-registry.js}'s parseBotConfigsFromText applies * when loading bots.json, so a round-trip through the card is stable. */ export declare function parseCustomPassthroughInput(raw: string): string[]; /** * Parse free-text input for `canTalkDaemonCommands` — the inverse filter of * {@link parseCustomPassthroughInput}: after the same normalization (lowercase, * auto `/`), keep ONLY entries that ARE daemon commands. The default stringList * parser (parseCustomPassthroughInput) rejects every daemon command, so wiring * it to this field would silently drop all valid input. */ export declare function parseCanTalkDaemonCommandsInput(raw: string): string[]; //# sourceMappingURL=passthrough-commands.d.ts.map