import type { PathIdentity, RootIdentity } from './filesystem.js'; import type { OwnershipLedger } from './ownership-ledger.js'; import type { VerifiedRetiredArtifactInventory } from './retired-artifact-inventory.js'; export type RuntimeId = 'claude' | 'codex' | 'gemini' | 'cursor'; export type ArtifactRuntime = RuntimeId | 'shared'; export type InstallProfile = 'core' | 'manager' | 'designer' | 'slack-service' | 'full' | 'custom'; export type InstallComponent = 'agents' | 'commands' | 'knowledge' | 'knowledge-discovery' | 'templates' | 'connectors' | 'security-core'; export type ConflictKind = 'foreign' | 'modified-owned' | 'case-collision' | 'stale-plan' | 'unsafe-path' | 'manual-recovery'; export declare const installComponents: readonly InstallComponent[]; export declare const requiredSecurityPolicyPaths: readonly ["canonical/policies/external-content.md", "canonical/policies/html-sandbox.md", "canonical/policies/pseudonymization.md", "canonical/policies/secret-handling.md"]; export interface InstallArtifact { readonly runtime: ArtifactRuntime; readonly component: InstallComponent; readonly path: string; readonly content: string; } export interface InstallRequest { readonly location: string; readonly productVersion: string; readonly profile: InstallProfile; readonly runtimes: readonly RuntimeId[]; readonly components: readonly string[]; readonly artifacts: readonly InstallArtifact[]; /** Full packaged inventory used to authenticate repository-local ownership claims. */ readonly ownershipArtifacts?: readonly InstallArtifact[]; /** Signed, immutable old-release claims; authorization-only and never installed. */ readonly retiredOwnershipArtifacts?: VerifiedRetiredArtifactInventory; readonly mode?: 'install' | 'update'; } export interface InstallConflict { readonly kind: ConflictKind; readonly path: string; readonly message: string; } interface OperationBase { readonly path: string; readonly runtime: ArtifactRuntime; readonly component: InstallComponent; readonly beforeSha256: string | null; } export interface WritePlanOperation extends OperationBase { readonly kind: 'write'; readonly content: string; readonly sha256: string; } export interface DeletePlanOperation extends OperationBase { readonly kind: 'delete'; readonly content?: never; readonly sha256?: never; readonly beforeSha256: string; readonly priorOwner: { readonly runtime: ArtifactRuntime; readonly component: InstallComponent; }; } export type PlanOperation = WritePlanOperation | DeletePlanOperation; export interface PlanPathPrecondition { readonly path: string; readonly expectedSha256: string | null; readonly targetIdentity: PathIdentity | null; readonly ancestorIdentities: readonly { readonly path: string; readonly identity: PathIdentity; }[]; } export interface InstallPlan { readonly schemaVersion: '2.0.0'; readonly transactionId: string; readonly planDigest: string; readonly location: string; readonly rootIdentity: RootIdentity; readonly productVersion: string; readonly mode: 'install' | 'update' | 'uninstall' | 'rollback'; readonly rollbackOf?: string; readonly selection: { readonly profile: InstallProfile; readonly runtimes: readonly RuntimeId[]; readonly components: readonly InstallComponent[]; }; readonly expectedLedgerRevision: number; readonly expectedLedgerDigest: string | null; readonly beforeLedger: OwnershipLedger | null; readonly desiredLedger: OwnershipLedger; readonly expectedAbsent: readonly string[]; readonly pathPreconditions: readonly PlanPathPrecondition[]; readonly operations: readonly PlanOperation[]; readonly conflicts: readonly InstallConflict[]; } export interface LifecycleResult { readonly status: 'committed' | 'blocked' | 'busy' | 'manual-recovery' | 'rolled-back'; readonly transactionId?: string; readonly changed: readonly string[]; readonly conflicts: readonly InstallConflict[]; } export {};