import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Option from "effect/Option"; import * as Path from "effect/Path"; import { type AppError } from "../app-error/index.js"; import type { ExtensionRef } from "../extensions/index.js"; import { type AcceptedExtensionResolution, type CanonicalObservation } from "./canonical-observation.js"; import type { DesiredExtensionNode } from "./desired-state-graph.js"; import type { WorkspaceMutationsService } from "./service-interface.js"; interface AcceptedCanonicalRefArgs { readonly workspace: WorkspaceMutationsService; readonly type: DesiredExtensionNode["type"]; readonly name: string; } export interface AcceptedCanonicalObservation { readonly desired: DesiredExtensionNode; readonly accepted?: AcceptedExtensionResolution; readonly observation: CanonicalObservation; } export interface UsableAcceptedCanonicalObservation extends AcceptedCanonicalObservation { readonly observation: CanonicalObservation & { readonly status: "usable"; readonly path: string; }; } export interface UsableAcceptedCanonical extends UsableAcceptedCanonicalObservation { readonly ref: ExtensionRef; } /** Canonical package AXM may delete when removing desired state. Authored source is durable. */ export declare const removableAcceptedCanonicalPath: (canonical: Option.Option) => Option.Option; /** Exact acquired canonical path reconstructed directly from accepted lock authority. */ export declare const acceptedLockedCanonicalPath: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, Path.Path>; /** * Capture exact cleanup for a superseded accepted package. The old path is * read before the lock transition; the returned effect runs afterward and * removes only that path when the replacement canonical path differs. */ export declare const prepareAcceptedCanonicalTransition: (args: AcceptedCanonicalRefArgs & { readonly ref: ExtensionRef; }) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; /** Reconstruct a ref directly from accepted lock authority without desired reachability. */ export declare const acceptedLockedResolutionRef: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; /** * Reconstruct the immutable source reference recorded for a desired extension, * even when its canonical materialization is absent or divergent. */ export declare const acceptedResolutionRef: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export declare const acceptedCanonicalObservation: ({ workspace, type, name, }: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export declare const usableAcceptedCanonicalObservation: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export declare const usableAcceptedCanonical: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export declare const usableAcceptedCanonicalRef: (args: AcceptedCanonicalRefArgs) => Effect.Effect, AppError, FileSystem.FileSystem | Path.Path>; export {}; //# sourceMappingURL=accepted-canonical-ref.d.ts.map