/** * Pure command-line parsing for `hikoutei infer`. * * This module owns flag syntax and defaults only; it never touches the * filesystem, imports user modules, or contacts Google Sheets. The result is * an explicit union so the CLI entry can branch on help / valid / invalid * without inspecting message text. * * Infer (spike): read-only sampling of an existing spreadsheet tab to print * a copy-pasteable `defineTypedSheetsEntity(...)` block. The flow never * writes to the spreadsheet or provisions anything. */ import { type SetupFailure } from "./errors.js"; /** Default number of data rows sampled from the tab (header excluded). */ export declare const INFER_DEFAULT_LIMIT = 100; /** Hard cap on sampled data rows so one run cannot page a whole spreadsheet. */ export declare const INFER_MAX_LIMIT = 1000; /** Parsed and defaulted infer options handed to the infer flow. */ export interface InferOptions { /** Spreadsheet URL; falls back to `HIKOUTEI_SYNC_SPREADSHEET_URL`. */ readonly spreadsheetUrl?: string; /** Existing tab to sample (required). */ readonly tabName: string; /** PK header override; defaults to the first column. */ readonly pkHeader?: string; /** Data rows sampled below the header row (1..1000, default 100). */ readonly limit: number; /** Service-account key file; falls back to `GOOGLE_APPLICATION_CREDENTIALS`. */ readonly credentialsPath?: string; /** * Descriptor-file path written after the block is printed (`--emit`). * The file carries the versioned JSON form of the same inference, so a * later `createTypedSheets({ descriptors })` / `adopt --descriptor` * reuses it without manual `--map` flags. */ readonly emitPath?: string; /** Overwrite the `--emit` target when it already exists (`--force`). */ readonly force: boolean; } /** Discriminated result of `parseInferArgs`. */ export type InferArgsParseResult = { readonly status: "help"; readonly helpText: string; } | { readonly status: "valid"; readonly options: InferOptions; } | { readonly status: "invalid"; readonly failure: SetupFailure; }; export declare const INFER_HELP_TEXT: string; /** Parses and defaults `hikoutei infer` arguments. */ export declare function parseInferArgs(argv: readonly string[]): InferArgsParseResult; //# sourceMappingURL=inferArgs.d.ts.map