#!/usr/bin/env node /** * `pi-daddy` — scaffolding and ledger maintenance. * * Thin on purpose: argv in, `discoverSkillPackages` + `planInit` + `applyInit`, report out. Every decision * lives in `./init.ts`, `./grant-env.ts` and `./skill-packages.ts` as functions that touch no argv and print * nothing, so the scaffolding is testable without running a process — the same split `extensions/grants.ts` * was cut along after four wiring bugs in a row lived in the part nothing could test. * * **`parseArgs` is exported and tested, which it was not** (R-79). This file shipped with zero tests and * promptly earned two of them: an entry-point guard that was false for every installed copy (R-73), and an * unknown-option check that exempted `argv[0]` whenever `--dir` was absent, so `pi-daddy init --Force` * was accepted in silence — the exact failure the check's own comment says it prevents. */ import { type RefusedSkill, type SkillPackage } from "./kernel/skill-packages.ts"; export interface ParsedArgs { command: "init" | "ledger-repair" | "ledger-import" | "help" | "version"; importTarget?: string; /** `ledger repair `: the ledger file; `yes` applies, otherwise preview only. */ ledgerPath?: string; yes?: boolean; dir?: string; force: boolean; /** Non-empty means refuse: argv said something this program does not understand. */ errors: string[]; } /** * Parse argv. Pure, exported, and tested — argv handling is where both of this file's defects lived. * * Rule 8 throughout: an unrecognised option is refused rather than ignored, and `--dir` refuses a value * that looks like a flag, because `init --dir --force` used to scaffold into a directory named `--force` * with `force` simultaneously true. */ export declare function parseArgs(argv: string[]): ParsedArgs; /** Say what was refused and what the fix is. Each reason has a different one. */ /** Exported so the message an operator actually reads can be tested; `init` composes it, nothing else calls it. */ export declare function reportRefusal(pkg: SkillPackage, refusal: RefusedSkill): string; export declare function main(argv: string[]): Promise; //# sourceMappingURL=cli.d.ts.map