import type { ContextPackFormat, ContextPackRetrievalStrategy, ContextPackTaskKind } from '../contracts/context-pack.js'; import type { ExtractionMode } from '../contracts/generation-policy.js'; import { type InstallPlatform, type InstallProfile } from '../infrastructure/install.js'; export declare class UsageError extends Error { constructor(message: string); } export type QueryRankBy = 'relevance' | 'degree'; export interface QueryCliOptions { question: string; mode: 'bfs' | 'dfs'; tokenBudget: number; graphPath: string; rankBy: QueryRankBy; community: number | null; fileType: string | null; } export interface PackCliOptions { prompt: string; budget: number; task: ContextPackTaskKind; taskExplicit?: boolean; graphPath: string; requireFreshGraph?: boolean; requireFreshContext?: boolean; format?: ContextPackFormat; why?: boolean; verbose?: boolean; /** #75 manual override for the retrieval gate. When set (0-5), the gate * emits a decision with reason 'manual override' at the supplied level * instead of running its heuristic classifier on the prompt. */ retrievalLevel?: 0 | 1 | 2 | 3 | 4 | 5; retrievalStrategy?: ContextPackRetrievalStrategy; } export interface TryCliOptions { prompt: string; path: string; } export interface HandoffCliOptions { prompt: string; budget: number; task: ContextPackTaskKind; graphPath: string; consumer: 'generic' | 'codex' | 'cursor' | 'copilot'; requireFreshGraph?: boolean; requireFreshContext?: boolean; allowSnippets?: boolean; } export type PromptCliProvider = 'claude' | 'gemini'; export interface PromptCliOptions { prompt: string; provider: PromptCliProvider; graphPath: string; requireFreshGraph?: boolean; requireFreshContext?: boolean; } export interface PathCliOptions { source: string; target: string; graphPath: string; maxHops: number; } export interface DiffCliOptions { baselineGraphPath: string; graphPath: string; limit: number; } export interface ExplainCliOptions { label: string; graphPath: string; relation: string; } export interface AddCliOptions { url: string; path: string; followSymlinks: boolean; noHtml: boolean; } export interface SaveResultCliOptions { question: string; answer: string; queryType: string; sourceNodes: string[]; memoryDir: string; } export interface BenchmarkCliOptions { graphPath: string; questionsPath: string | null; execTemplate: string; yes: boolean; } export interface BenchSuiteCliOptions { repo: string | null; task: string | null; reposManifestPath: string | null; tasksManifestPath: string | null; mode: 'cold' | 'warm' | 'all'; trials: number; outputDir: string; execTemplate: string; dryRun: boolean; yes: boolean; } export interface CompareCliOptions { question: string | null; graphPath: string; execTemplate: string; questionsPath: string | null; outputDir: string; task: 'explain' | 'implement'; baselineMode: 'full' | 'bounded' | 'pack_only' | 'native_agent'; perArmTimeoutSeconds: number; validationTimeoutSeconds: number; heartbeatIntervalMs: number; strictMadarFirst: boolean; strictBenchmarkReadiness: boolean; allowNoInstall: boolean; yes: boolean; limit: number | null; why?: boolean; } export interface ReviewCompareCliOptions { graphPath: string; execTemplate: string; outputDir: string; baseBranch: string | null; budget: number | null; yes: boolean; } export interface TimeTravelCliOptions { fromRef: string; toRef: string; view: 'summary' | 'risk' | 'drift' | 'timeline'; json: boolean; refresh: boolean; limit: number; } export interface GenerateCliOptions { path: string; update: boolean; clusterOnly: boolean; watch: boolean; directed: boolean; followSymlinks: boolean; respectGitignore: boolean; debounceSeconds: number; noHtml: boolean; wiki: boolean; obsidian: boolean; obsidianDir: string | null; svg: boolean; graphml: boolean; neo4j: boolean; neo4jPushUri: string | null; neo4jUser: string | null; neo4jPassword: string | null; neo4jDatabase: string | null; includeDocs: boolean; docs: boolean; strictIndexing: boolean; maxIndexingFailed: number; maxIndexingUnsupported: number; /** Default auto mode uses SPI where it is capable and legacy elsewhere. */ extractionMode: ExtractionMode; } export interface WatchCliOptions { path: string; followSymlinks: boolean; respectGitignore: boolean; debounceSeconds: number; noHtml: boolean; } export interface ServeCliOptions { graphPath: string; host: string; port: number; transport: 'http' | 'stdio'; autoRefresh: boolean; } export interface DoctorCliOptions { graphPath: string; } export interface SummaryCliOptions { graphPath: string; } export interface ProofReportCliOptions { graphPath: string; outputDir: string; compareDir: string; packPath: string | null; } export interface HookCliOptions { action: 'install' | 'uninstall' | 'status'; } export interface InstallCliOptions { platform: InstallPlatform; } export type TelemetryCliOptions = { action: 'enable' | 'disable' | 'status' | 'clear'; } | { action: 'report'; spoolPaths: string[]; }; export declare const INSTALL_USAGE = "Usage: madar install [platform|--platform P]"; export interface PlatformActionCliOptions { action: 'install' | 'uninstall'; profile?: InstallProfile; } export declare function parseQueryArgs(args: string[]): QueryCliOptions; export declare function parsePackArgs(args: string[]): PackCliOptions; export declare function parseTryArgs(args: string[]): TryCliOptions; export declare function parseHandoffArgs(args: string[]): HandoffCliOptions; export declare function parsePromptArgs(args: string[]): PromptCliOptions; export declare function parsePathArgs(args: string[]): PathCliOptions; export declare function parseDiffArgs(args: string[]): DiffCliOptions; export declare function parseExplainArgs(args: string[]): ExplainCliOptions; export declare function parseAddArgs(args: string[]): AddCliOptions; export declare function parseSaveResultArgs(args: string[]): SaveResultCliOptions; export declare function parseBenchmarkArgs(args: string[], commandName?: string): BenchmarkCliOptions; export declare function parseBenchSuiteArgs(args: string[]): BenchSuiteCliOptions; export declare function parseCompareArgs(args: string[]): CompareCliOptions; export declare function parseReviewCompareArgs(args: string[]): ReviewCompareCliOptions; export declare function parseTimeTravelArgs(args: string[]): TimeTravelCliOptions; export declare function parseGenerateArgs(args: string[]): GenerateCliOptions; export declare function parseWatchArgs(args: string[]): WatchCliOptions; export declare function parseServeArgs(args: string[]): ServeCliOptions; export declare function parseDoctorArgs(args: string[], commandName?: 'doctor' | 'status'): DoctorCliOptions; export declare function parseSummaryArgs(args: string[]): SummaryCliOptions; export declare function parseProofReportArgs(args: string[]): ProofReportCliOptions; export declare function parseHookArgs(args: string[]): HookCliOptions; export declare function parseTelemetryArgs(args: string[]): TelemetryCliOptions; export declare function parseInstallArgs(args: string[], defaultPlatform: InstallPlatform): InstallCliOptions; export declare function parsePlatformActionArgs(command: string, args: string[]): PlatformActionCliOptions;