import type { Tale } from "@taleseal/core"; /** * `taleseal init [claude|codex|cursor]` — the landing page's one command. Sets up the * chosen tool's plugin (marketplace install where the tool has a CLI, printed steps where * it does not), then publishes a live welcome tale — anonymously when no key is stored, * to the account when one is. Whatever happens to the tool setup, the publish half runs: * a failed plugin install prints manual steps and the page still goes live. * * Exit code doctrine: 0 for every HANDLED outcome (published; anonymous publishing * switched off; at capacity; tool CLI absent) — if init printed a next step a human can * follow, it did its job. 1 only for usage errors, a 426, and unexpected failures. */ export type InitTool = "claude" | "codex" | "cursor"; export declare const INIT_TOOLS: readonly ["claude", "codex", "cursor"]; /** * The welcome tale — the first page a new user ever sees, and a working demo of the * block vocabulary. Everything it states is true at publish time; no image blocks * (the anonymous route rejects them) and no line_chart (nothing to chart honestly). */ export declare function welcomeTale(tool: InitTool | undefined, opts: { mode: "anonymous" | "account"; now?: Date; }): Tale; export type SetupOutcome = { status: "installed"; lines: string[]; } | { status: "skipped"; lines: string[]; } | { status: "manual"; lines: string[]; } | { status: "absent"; lines: string[]; } | { status: "failed"; detail: string; lines: string[]; }; /** the spawnSync surface init uses — injectable so tests never shell out */ export type Runner = (cmd: string, args: string[]) => { status: number | null; error?: NodeJS.ErrnoException; stderr?: Buffer | string; }; export declare function runToolSetup(tool: InitTool | undefined, run?: Runner): SetupOutcome; export declare function initCommand(toolArg: string | undefined, opts: { json: boolean; client: string; run?: Runner; }): Promise;