import type { ParsedSlashCommand, SlashCommandResult, SlashCommandRuntime } from "../types.js"; export interface ParsedSubcommand { verb: string; rest: string; } export type ConfigScope = "user" | "project"; export interface NamedScopeArgs { name?: string; scope: ConfigScope; error?: string; } /** * Parse a slash-invocation string into `name`/`args`. * * The separator is the earliest whitespace or `:` character so that both * `/foo bar` and `/foo:bar` map to `{ name: "foo", args: "bar" }`. */ export declare function parseSlashCommand(text: string): ParsedSlashCommand | null; /** * Mark a command as fully consumed in the ACP shape. * * Pass `agentInvoked` when the command scheduled a real agent turn whose events * will stream after it returns (e.g. `/retry`). RPC hosts use that marker to * tell local-only commands apart from work that starts a turn, so reporting * `agentInvoked: false` there would have them finalize the request while the * agent is still running. * * Pass `failed` when the command consumed the input but did not accomplish * what was asked (usage error, unknown server, refused operation): interactive * hosts ignore it, print mode turns it into a nonzero exit code so `omp -p` * automation does not treat a failed builtin as success. */ export declare function commandConsumed(options?: { agentInvoked?: boolean; failed?: boolean; }): { consumed: true; agentInvoked?: boolean; failed?: boolean; }; /** * Emit a usage/error message and consume the command as failed: the command * consumed the input but did not accomplish what was asked. Interactive hosts * ignore the marker; print mode turns it into a nonzero exit code so `omp -p` * automation does not treat a failed builtin as success. */ export declare function usage(text: string, runtime: SlashCommandRuntime): Promise; /** Split ` ` on the first whitespace; lowercases `verb`. */ export declare function parseSubcommand(input: string): ParsedSubcommand; export declare function errorMessage(error: unknown): string; /** * Parse ` [--scope project|user]`-style argument strings used by * remove/rm-style subcommands. `name` is optional so callers can surface * "name required" diagnostics with their own messaging. */ export declare function parseNamedScopeArgs(rest: string, invalidScopeMessage: string): NamedScopeArgs;