import { CLICommand, CommandArgument, CommandProcessor, CommandResult, ProcessRunOptions } from '../../utils/types.js'; import { FlagConfig } from './cliArgv.js'; /** Options for running the bundled `now-sdk` CLI from `BaseCLICommand.runBundledSdk`. */ export interface RunSdkOptions { subcommand?: string | readonly string[]; flags?: Record; positionals?: readonly string[]; fixedFlags?: readonly string[]; includeDebug?: boolean; /** Working directory to run in; defaults to the neutral package root. */ cwd?: string; /** Timeout in ms; defaults to `this.timeoutMs`. */ timeoutMs?: number; signal?: AbortSignal; processOptions?: ProcessRunOptions; } /** The `debug` argument, which `buildSdkArgv` maps to `--debug`. */ export declare const DEBUG_ARGUMENT: CommandArgument; /** * Base abstract class for all CLI commands * Implements the Template Method pattern for validation */ export declare abstract class BaseCLICommand implements CLICommand { protected commandProcessor: CommandProcessor; abstract name: string; abstract description: string; abstract arguments: CommandArgument[]; timeoutMs?: number; constructor(commandProcessor: CommandProcessor); abstract execute(args: Record): Promise; private inputSchema?; /** * Validate the arguments with the command's input schema: the same one * `tools/call` enforces (required arguments, types, each argument's domain, * and no control characters in plain text). A caller that reaches `execute()` * directly, such as the internal `AuthCommand` run, is held to the same * contract. There is no shell-metacharacter check: the executor spawns * shell-free, every option is one `--flag=value` entry (`cliOption`), and the * one path a shell sees shell-escapes every entry (`CLICmdWriter`). * @param args The arguments to validate * @throws Error naming every argument that fails */ protected validateArgs(args: Record): void; /** * Resolve the bundled `now-sdk` CLI, assemble argv via `buildSdkArgv`, and * invoke `commandProcessor.process`. Defaults cwd to the neutral package root * for commands that do not depend on a Fluent project. */ protected runBundledSdk(args: Record, options: RunSdkOptions): Promise; } //# sourceMappingURL=baseCommand.d.ts.map