import type { SkillActor } from "@opengeni/contracts"; import { type Database } from "./database.js"; import { type SkillSourceReleaseHead } from "./skill-source-release-impact.js"; export type SkillSourceReleaseReceipt = { skillId: string; revisionId: string | null; disposition: "deactivated" | "preserved" | "inactive"; eventId: string | null; warning: string | null; }; /** Caller supplies workspace/subject RLS; never bypass registry visibility for a preview. */ export declare function readSkillSourceReleaseHeads(db: Database, workspaceId: string, facetInstallationIds: readonly string[]): Promise; export declare class SkillSourceRemovalAuthorityError extends Error { readonly code = "skill_source_removal_requires_human"; constructor(); } /** Never disclose the identity of a head absent from the caller's locked snapshot. */ export declare class SkillSourceReleaseSnapshotChangedError extends Error { constructor(); } /** * Called inside the source-owner removal transaction, with source installations * locked. Distribution identity/history stays bound after uninstall, so reinstall * finds the same head. This is not a new service/API-key governance authority. */ export declare function releaseOrphanedSkillHeads(db: Database, input: { workspaceId: string; facetInstallationIds: readonly string[]; skillActor?: SkillActor; /** Exact heads already locked before the caller compared removal impact. */ lockedHeadIds?: readonly string[]; }): Promise;