/**
 * Claude subcommand detection.
 *
 * Claude Code's CLI accepts both an interactive session form (`claude [prompt]`,
 * possibly with `--print`) and explicit subcommands (`claude agents`,
 * `claude doctor`, `claude mcp`, ...). Subcommand parsers reject most top-level
 * session flags — e.g. `claude agents --append-system-prompt foo` exits with
 * `error: unknown option '--append-system-prompt'`.
 *
 * CCS injects WebSearch / image-analysis / browser steering args
 * (`--append-system-prompt`, `--disallowedTools`) for interactive sessions.
 * Those flags must be skipped when the user is actually invoking a Claude
 * subcommand, otherwise the subcommand fails or falls back to non-interactive
 * mode (e.g. `claude agents` printing the list instead of opening the agent
 * view — see issue #1218).
 *
 * Detection walks args left-to-right, skipping known value-taking top-level
 * flags, and reports whether the first positional token matches a known
 * Claude subcommand.
 */
/// <reference types="node" />
/// <reference types="bun-types" />
/**
 * Returns true when `args` look like a Claude subcommand invocation.
 *
 * Heuristic:
 *   1. Walk args until the `--` terminator or end.
 *   2. If `--print` is present before the first positional token, treat as
 *      prompt/headless session mode (never a subcommand launch).
 *   3. Skip known value-taking flags together with their next token.
 *   4. Skip unknown `--flag=value` forms and bare `--flag` / `-x` tokens.
 *   5. The first remaining positional token is the candidate.
 *   5. Match against CLAUDE_SUBCOMMANDS.
 *
 * Anything after the candidate is irrelevant — once a subcommand is in play,
 * the rest of the line belongs to that subcommand.
 */
export declare function isClaudeSubcommandInvocation(args: readonly string[]): boolean;
/**
 * Returns the Claude subcommand name when `args` look like a subcommand
 * invocation, otherwise null. Uses the same scan as
 * `isClaudeSubcommandInvocation` so callers can branch on the specific
 * subcommand (e.g. `agents` allows flags that other subcommands reject).
 */
export declare function getClaudeSubcommandName(args: readonly string[]): string | null;
export declare function stripClaudeSubcommandSessionArgs(args: readonly string[]): string[];
export declare function stripClaudeCodeFeatureBlockingEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Return a shallow copy of `env` with subcommand-blocking telemetry vars
 * removed. Caller is responsible for only invoking this when args are a
 * Claude subcommand invocation.
 */
export declare function stripSubcommandBlockingEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
//# sourceMappingURL=claude-subcommand-detector.d.ts.map