import type { Config } from './config/config.schema.js'; import type { PathCtx } from './config/paths.js'; import type { ClaudeInvoker } from './invoker.js'; import type { LimitVerdict } from './usage/limit-probe.js'; import type { BlockedWatchOptions } from './launcher/blocked-watch.js'; /** Everything a command needs: paths context, config, output sink, and flags. */ export interface CliContext { ctx: PathCtx; config: Config; /** Injected in tests; resolved lazily from config otherwise (see getClaude). */ claude?: ClaudeInvoker; /** Injected in tests: overrides the API limit verification (usage/limit-probe). */ verifyCap?: (renderedText: string) => Promise; /** * Injected in tests: how quickly a session counts as blocked. Production uses * the defaults in blocked-watch (three walls over two minutes), which no test * can wait for. */ blockedWatch?: BlockedWatchOptions; /** Injected in tests: overrides the API lookup of who a stored login belongs to. */ lookupOwner?: (dir: string) => Promise; out: (message: string) => void; /** ccx's own status messages. MUST go to stderr so it never corrupts a run's stdout protocol. */ err?: (message: string) => void; json: boolean; quiet: boolean; } export interface BuildContextOptions { ctx?: PathCtx; json?: boolean; quiet?: boolean; out?: (message: string) => void; err?: (message: string) => void; } /** Assemble the runtime context for real CLI use. */ export declare function buildContext(options?: BuildContextOptions): CliContext; /** Resolve the claude invoker lazily so commands that never touch claude never look it up. */ export declare function getClaude(context: CliContext): ClaudeInvoker;