import { spawnSync } from "node:child_process"; import { connectPodFlow } from "./federation/connect.js"; import { reconcilePublishFlow } from "./federation/reconcile-publish.js"; import { adoptAndPrimeFlow } from "./adopt-and-prime.js"; import { embeddingsOfferGate } from "./embeddings-offer.js"; import { type CreationPlanV1 } from "./creation-plan.js"; import type { CreationMutationEvidence } from "../op/creation-mutation-journal.js"; import { type Platform } from "../util/installer.js"; export type AgentRuntimeChoice = "claude" | "codex"; export interface IPromptHandler { ask(question: string, defaultValue?: string): Promise; confirm(question: string, defaultValue?: boolean): Promise; select(question: string, options: { label: string; value: T; }[]): Promise; } export interface WizardPhaseResult { phase: number; name: string; ok: boolean; message: string; skipped?: boolean; data?: { vaultPath?: string; branch?: "fresh" | "adopted"; reconstructExitCode?: number; creation?: { plan: CreationPlanV1; mutations: CreationMutationEvidence; }; }; } export interface WizardRunOptions { promptHandler: IPromptHandler; dryRun: boolean; spawnFn?: typeof spawnSync; adoptFlowOverride?: typeof adoptAndPrimeFlow; connectFlowOverride?: typeof connectPodFlow; publishFlowOverride?: typeof reconcilePublishFlow; embeddingsOfferOverride?: typeof embeddingsOfferGate; } export interface WizardRunResult { status: "completed" | "halted"; phases: WizardPhaseResult[]; creation?: { plan: CreationPlanV1; mutations: CreationMutationEvidence; }; } export declare function runWizard(opts: WizardRunOptions): Promise; export interface WizardPublishPromptDeps { isTty: boolean; publishFlow?: unknown; } export declare function maybePromptAndPublishWizard(_ph: IPromptHandler, deps: WizardPublishPromptDeps): Promise; export declare function chooseProvisionalIdentity(ph: IPromptHandler, dryRun: boolean, isTty: boolean): Promise; export declare function chooseInitialMeshName(ph: IPromptHandler, dryRun: boolean, isTty: boolean): Promise; export declare function phase1_detectInstallNode(ph: IPromptHandler, platform: Platform, dryRun: boolean): Promise; export declare function phase2_detectInstallGhCli(ph: IPromptHandler, platform: Platform, dryRun: boolean): Promise; export declare function phase3_installAgentRuntime(runtime: AgentRuntimeChoice, dryRun: boolean, spawn: typeof spawnSync): Promise; export declare function parseGhHandleFromStatus(output: string): string; export declare function phase4_ghAuthLogin(dryRun: boolean, spawn: typeof spawnSync): Promise; export declare function phase4b_installSkills(dryRun: boolean, spawn: typeof spawnSync): Promise; export declare function phase5_runAgentManualInject(dryRun: boolean, spawn: typeof spawnSync): Promise; export interface FederationProbeResult { exists: boolean; } export type GhFederationProbe = (handle: string, spawn: typeof spawnSync) => FederationProbeResult; export declare function defaultGhFederationProbe(handle: string, spawn: typeof spawnSync): FederationProbeResult; export declare function phase5c_crossMachineAdoptDetect(handle: string, dryRun: boolean, spawn: typeof spawnSync, probeFn?: GhFederationProbe): Promise; export declare function phase_adoptPod(opts: WizardRunOptions): Promise; export declare function phase6_createPersonalMesh(dryRun: boolean, options?: { handle: string; connected: boolean; meshName?: string; }): Promise; export declare function phase8_connectAndPublishPod(dryRun: boolean, deps?: { connectFlow?: typeof connectPodFlow | undefined; publishFlow?: typeof reconcilePublishFlow | undefined; }): Promise; export declare function phase7_createFirstVault(mainVaultPath: string, dryRun: boolean, mainVaultName?: string): Promise; export declare function phase8_initFederationRepo(dryRun: boolean, localOnly?: boolean): Promise; export declare function phase9_podMapInit(_owner: string, _dryRun: boolean): Promise; export declare function phase10_firstUseDemo(vaultPath: string, dryRun: boolean): Promise; export declare class ReadlinePromptHandler implements IPromptHandler { private rl; ask(question: string, defaultValue?: string): Promise; confirm(question: string, defaultValue?: boolean): Promise; select(question: string, options: { label: string; value: T; }[]): Promise; close(): void; } //# sourceMappingURL=wizard.d.ts.map