import { type RequestType } from '../../services/artifacts/artifact-prerequisites.js'; import { type ProgramIO } from '../cli-helpers.js'; export type ArchetypeOptions = { project: string; json?: boolean; }; export type ExistingSystemOptions = { project: string; maxTokens?: string; maxSamples?: string; json?: boolean; }; export type RequestTypeSanityOptions = { project: string; type: RequestType; baseRef?: string; json?: boolean; }; export type FileSizeScanOptions = { project: string; baseRef?: string; threshold?: string; json?: boolean; }; export type ScanLibrariesOptions = { project: string; json?: boolean; }; export type AcceptanceCoverageOptions = { rid: string; project: string; sessionId?: string; json?: boolean; }; export type DiffVsScopeOptions = { rid: string; project: string; sessionId?: string; baseRef?: string; json?: boolean; }; /** `--format` accepts exactly these two values across the report subcommands. */ export type ScanOutputFormat = 'md' | 'json'; export type ApiSurfaceOptions = { project: string; format?: ScanOutputFormat; includeDirs?: string; maxPerKind?: number; json?: boolean; }; export type OrphanScope = 'working-tree' | 'git-diff' | 'all'; export type OrphanOptions = { project: string; format?: ScanOutputFormat; scope?: OrphanScope; strict?: boolean; json?: boolean; }; export type KarpathyScope = 'working-tree' | 'all'; export type KarpathyOptions = { project: string; format?: ScanOutputFormat; scope?: KarpathyScope; json?: boolean; }; export declare function parsePositiveInt(value: string | undefined, fallback: number): number; export declare function parseOptionalNonNegativeInt(value: string | undefined): number | undefined; export declare function parseRequestType(value: string): RequestType; export declare function parseScanOutputFormat(value: string): ScanOutputFormat; export declare function parseNonNegativeIntOption(value: string): number; export declare function parseOrphanScope(value: string): OrphanScope; export declare function parseKarpathyScope(value: string): KarpathyScope; /** * Everything `emitScanReport` needs. `renderMarkdown` is a thunk because the * original callbacks built the markdown at this exact point in the flow — after * the `--format json` branches have returned — and it must stay lazy so a * `--format json` run never renders markdown it would throw away. */ export type ScanReportOutput = { command: string; format?: ScanOutputFormat | undefined; json?: boolean | undefined; report: unknown; nextActions: string[]; renderMarkdown: () => string; }; /** * The output contract shared by `scan api-surface`, `scan orphan` and * `scan karpathy`: * - `--format json` without `--json` writes the bare report (no envelope); * - `--format json` with `--json` writes the ok/data/code envelope; * - otherwise markdown goes to stdout, and `--json` wraps it as * `{ markdown, report }` while the human path prints "Next actions:" to * stderr only when there is at least one. */ export declare function emitScanReport(io: ProgramIO, output: ScanReportOutput): void;