import { Command } from "commander"; import { type CurrencyResult, type UpdateChannel } from "@younndai/lyt-vault"; import { UPDATE_PLAN_PACKAGES, type RegistryPackageFactV1, type UpdatePlanV1 } from "../install/update-plan.js"; import { type InstallReconcilePlanV1 } from "../install/reconcile-engine.js"; import { type UpdateOperationHandleV1 } from "../install/update-operation.js"; import { type TargetProviderManifestV1 } from "../install/target-artifacts.js"; export interface UpdateChannelConfiguredV1 { readonly schema_id: "lyt.update-channel-configured"; readonly schema_version: Readonly<{ major: 1; minor: 0; }>; readonly channel: UpdateChannel; readonly persisted: true; readonly next_action: "lyt update --check --json"; } export declare function configureUpdateChannel(channel: UpdateChannel, write?: (value: UpdateChannel) => void): UpdateChannelConfiguredV1; export interface ReconcileReceiptV1 { schema_id: "lyt.receipt"; schema_version: Readonly<{ major: 1; minor: 0; }>; operation_id: string; attempt_id: string; status: string; operation: "install-reconcile"; mutations: Readonly<{ local: number; remote: number; }>; next_action: unknown; } export interface ReconcileEffectResult { exitCode: number; stdout: string; stderr: string; } export interface UpdateEffects { log: (msg: string) => void; error: (msg: string) => void; confirm: (prompt: string) => Promise; preparePlan: (currency: CurrencyResult) => Promise; revalidatePlan: (plan: UpdatePlanV1) => Promise; verifyInstalledPlan: (plan: UpdatePlanV1) => Promise; beginOperation: (plan: UpdatePlanV1) => Promise; stageArtifacts: (plan: UpdatePlanV1) => Promise; writeInstalledAnchor: (plan: UpdatePlanV1) => boolean; install: (plan: UpdatePlanV1, artifacts: readonly string[]) => number; reconcile: (plan: UpdatePlanV1) => ReconcileEffectResult; } export interface UpdateFlowResult { installed: boolean; reconciled: boolean; reconcileReceipt: ReconcileReceiptV1 | null; exitCode: number; nextAction?: string; updatePlan?: UpdatePlanV1; } export interface UpdateChannelResolution { channel: UpdateChannel | null; source: "persisted" | "explicit" | "interactive" | "unconfigured"; refusal?: "channel-unconfigured" | "channel-switch-requires-explicit"; nextAction?: string; } export declare function resolveConfiguredChannel(requested: UpdateChannel | undefined, persisted: UpdateChannel | null, opts: { switchChannel?: boolean; interactive: boolean; selectedInteractive?: UpdateChannel | null; }): UpdateChannelResolution; export declare function parseReconcileReceipt(raw: string, updatePlan?: UpdatePlanV1): ReconcileReceiptV1 | null; export declare function runUpdateFlow(result: CurrencyResult, opts: { yes?: boolean; interactive: boolean; allowDowngrade?: boolean; }, fx: UpdateEffects): Promise; export declare function resumeUpdateFlow(operationId: string, fx: UpdateEffects): Promise; export declare function providerDestinationsFromReconcilePlan(reconcilePlan: Pick): { object_id: string; kind: "manual" | "skill"; path: string; source_package: (typeof UPDATE_PLAN_PACKAGES)[number]; evidence_kind: "provider-content-digest"; expected_before_digest: string | null; expected_after_digest: string; }[]; export declare function targetProviderObjectsFromTargetManifests(reconcilePlan: Pick, manifests: readonly TargetProviderManifestV1[]): { object_id: string; kind: "directory-link" | "marker-file"; provider_package: (typeof UPDATE_PLAN_PACKAGES)[number]; provider_version: string; target_path: string; source_relative_path: string | null; content: string | null; expected_digest: string; expected_applied_digest: string; marker_begin: string | null; marker_end: string | null; }[]; export declare function prepareProductionUpdatePlan(currency: CurrencyResult): Promise; export declare function revalidateProductionUpdatePlan(plan: UpdatePlanV1): Promise; export declare function verifyProductionInstalledPlan(plan: UpdatePlanV1): Promise; export declare function installedEvidenceMatchesPlan(plan: UpdatePlanV1, installed: UpdatePlanV1["before_state"], graph: readonly RegistryPackageFactV1[]): boolean; export declare function npmInstallArgsForUpdatePlan(plan: UpdatePlanV1, artifactPaths: readonly string[]): readonly string[]; export declare function buildUpdateCommand(): Command; //# sourceMappingURL=update.d.ts.map