/** * Production wiring for `hikoutei adopt`. * * Owns the real-world dependencies the testable flow deliberately avoids: * loading the application's entity definitions from a module (`--entities`, * a dynamic import whose side effect registers the entities), resolving the * adopted entity's token, and building the runner around the PUBLIC * `createTypedSheetsWithSync()` factory. The runner closes the runtime after * a successful adopt so the CLI process can exit (adoption is a one-shot * migration, not a long-lived service host). */ import type { HikouteiEntity } from "../sync-engine/api/entity.js"; import { type AdoptOptions } from "./adoptArgs.js"; /** * Resolves a `--descriptor` adoption: reads the JSON file, validates it * with the same rules `defineTypedSheetsEntity` enforces (version mismatch * and malformed fields fail with `invalid_entity_descriptor`), rejects an * already-registered entity name with `duplicate_entity`, and registers the * file through the same builder adopt requires. The header→property * columnMap comes from the file's `header` fields; an explicit `--map` wins * on a conflict. File content is never echoed (redaction); only the reason * and the descriptor path are reported. */ export declare function loadDescriptorAdoption(options: AdoptOptions): Promise<{ readonly entityName: string; readonly columnMap: Record; readonly entities: readonly HikouteiEntity[]; }>; /** * Runs the `hikoutei adopt` CLI with the given argument vector (without the * leading "adopt" subcommand). Exported so the bin router can delegate and * tests can drive it with injected argv. */ export declare function runAdoptMain(argv: readonly string[]): Promise; //# sourceMappingURL=adoptMain.d.ts.map