import type { ActiveActorObservation } from "../op/active-actor-observation.js"; import type { DestinationPolicyValue } from "../registry/destination-policy.js"; import { type CanonicalGithubPublicationTarget, type PermissionObservation, type PermissionObservationResult } from "../util/permission-observation.js"; export type DestinationRequest = { kind: "auto"; } | { kind: "local"; } | { kind: "target"; target: string; } | { kind: "inherit"; meshRid: string; }; export interface CreationSubjectFacts { kind: "mesh" | "vault"; repositoryName: string; } export type PlannedPodIdentityEffectV1 = { kind: "existing"; rid: string; } | { kind: "create"; rid: string; handle: string; }; export type PlannedMeshEffectV1 = { kind: "existing"; rid: string; name: string; } | { kind: "create"; rid: string; name: string; } | { kind: "none"; rid: ""; name: ""; }; export interface CreationIntendedEffectsV1 { operation_id: string; identity: PlannedPodIdentityEffectV1; mesh: PlannedMeshEffectV1; primary_vault_rid: string; vaults: readonly { kind: "create"; rid: string; memscope_rid: string; name: string; root: string; }[]; local_writes: readonly { root: string; exact_paths: readonly string[]; bounded_path_classes: readonly ("vault-scaffold" | "registry" | "destination-policy-ledger" | "federation-manifest-ledger" | "git-metadata")[]; }[]; registry_rows: readonly { table: "federation_state" | "meshes" | "vaults" | "mesh_vaults"; key: string; }[]; topology_bindings: readonly { mesh_rid: string; vault_rid: string; role: "main" | "member"; }[]; checkpoints: readonly { repository_root: string; exact_paths: readonly string[]; }[]; remote_effects: readonly []; } export declare function plannedMeshPodEffectPathsV1(includePodScaffold: boolean, includeMeshLedger?: boolean): string[]; export interface CreationPlanChildV1 { operation_id: string; request: DestinationRequest; subject: CreationSubjectFacts; logical_replay_key: string; intended_effects: CreationIntendedEffectsV1; } export declare function plannedSingleVaultEffectsV1(args: { operationId: string; pod?: { kind: "existing"; rid: string; } | { kind: "create"; handle: string; }; podRid?: string; mesh?: { kind: "existing" | "create"; name: string; rid?: string; }; vaultName: string; vaultRoot: string; template?: "empty" | "obsidian-default" | undefined; starterFigment?: boolean | undefined; }): CreationIntendedEffectsV1; export declare function mergeCreationIntendedEffectsV1(args: { primary: CreationIntendedEffectsV1; children: readonly CreationIntendedEffectsV1[]; }): CreationIntendedEffectsV1; export declare function creationPlanChildV1(plan: CreationPlanV1): CreationPlanChildV1; export declare function withCreationRepositoryEffectsV1(effects: CreationIntendedEffectsV1, repositories: readonly { repositoryRoot: string; exactPaths: readonly string[]; boundedPathClasses?: CreationIntendedEffectsV1["local_writes"][number]["bounded_path_classes"]; }[]): CreationIntendedEffectsV1; export interface ResolveCreationPlanV1Input { request: DestinationRequest; subject: CreationSubjectFacts; actor: ActiveActorObservation; intendedEffects: CreationIntendedEffectsV1; inherited?: { meshRid: string; policy: DestinationPolicyValue; } | null; permission?: PermissionObservation | null; children?: readonly CreationPlanChildV1[]; } export declare function deriveCreationOperationIdV1(input: { request: DestinationRequest; subject: CreationSubjectFacts; scope: string; }): string; export type CreationPlanDestinationSource = "mesh-explicit" | "vault-override" | "mesh-inherited" | "authenticated-default" | "auto-unavailable"; export type CreationPlanPolicySource = "explicit" | "vault-override" | "mesh-inherited" | "authenticated-default" | "auto-fallback-local"; export type CreationPlanV1 = { version: 1; request: DestinationRequest; subject: CreationSubjectFacts; intended_effects: CreationIntendedEffectsV1; children: readonly CreationPlanChildV1[]; logical_replay_key: string; attempt: { attempt_id: string; active_actor: ActiveActorObservation; permission_observation: PermissionObservation | null; permission_result: PermissionObservationResult | null; }; destination: { kind: "local"; source: Exclude; policy_source: CreationPlanPolicySource; inherited_mesh_rid?: string; } | { kind: "github"; target: CanonicalGithubPublicationTarget["value"]; source: Exclude; policy_source: Exclude; inherited_mesh_rid?: string; permission: PermissionObservationResult; }; publication: "not-published"; online_action: "none"; recommendation: "run-scoped-sync" | "configure-github-target" | null; }; export type ResolveCreationPlanV1Result = { kind: "plan"; plan: CreationPlanV1; } | { kind: "refusal"; code: string; message: string; next_action: string; }; export declare function resolveCreationPlanV1(input: ResolveCreationPlanV1Input): ResolveCreationPlanV1Result; export declare function derivePlannedCreationRid(operationId: string, label: string): string; //# sourceMappingURL=creation-plan.d.ts.map