import { type CommitVerdict } from "../registry/assert-committed.js"; import { type InitOptions, type InitResult } from "../scaffold/init.js"; import { type LocalCheckpointResult } from "../scaffold/local-checkpoint.js"; import type { FederationGhClient, FederationRepoVisibility } from "../util/gh-federation.js"; import type { MeshGhClient } from "../util/gh-mesh.js"; import { type CreationMutationEvidence } from "../op/creation-mutation-journal.js"; import type { CreationPlanV1 } from "./creation-plan.js"; import { type VaultCreationBinding } from "./vault-init-preflight.js"; export interface InitFlowResult extends InitResult { registered: boolean; committed: CommitVerdict; unverifiedNote: string | null; federationSelfHealed: { handle: string; fedRidHex: string; branch: "fresh" | "adopted"; visibility: FederationRepoVisibility; statusVoiceEmitted: string; } | null; meshAssignment: { meshRidHex: string; meshName: string; autoNormalizedFrom: string | null; meshAutoCreated: boolean; statusVoiceEmitted: string; pushTarget: string | null; pushKind: string | null; ownCreated: boolean; } | null; creation: { plan: CreationPlanV1; checkpoints: LocalCheckpointResult[]; mutations: CreationMutationEvidence; } | null; } export interface FederationSelfHealOptions { enabled?: boolean | undefined; ghClient?: FederationGhClient | undefined; handle?: string | undefined; pushOnSelfHeal?: boolean | undefined; } export interface MeshSelfHealOptions { enabled?: boolean | undefined; meshName?: string | undefined; pushOnSelfHeal?: boolean | undefined; pushTo?: string | undefined; ghClient?: MeshGhClient | undefined; creation?: VaultCreationBinding | undefined; } export interface InitFlowOptions extends InitOptions { creation: VaultCreationBinding; selfHeal?: { federation?: FederationSelfHealOptions; mesh?: MeshSelfHealOptions; }; } export interface ShouldSelfHealProbe { readFederationStateForHandle(handle: string): Promise; localFederationDirExists(handle: string): boolean; } export declare function shouldSelfHealFederation(opts: InitFlowOptions, probe: ShouldSelfHealProbe): Promise<{ handle: string; } | null>; export declare class HomeMeshNotFoundError extends Error { readonly errorCode = "home-mesh-not-found"; readonly meshName: string; constructor(meshName: string); } export declare class VaultAlreadyExistsError extends Error { readonly errorCode = "vault-already-exists"; readonly vaultName: string; constructor(vaultName: string); } export declare function initVaultFlow(opts: InitFlowOptions): Promise; //# sourceMappingURL=init.d.ts.map