import type { ExtensionType } from "./common.js"; export type SourceAuthorityRelationship = { readonly kind: "root"; } | { readonly kind: "member"; readonly root: string; }; export type WorkspaceAuthorityStatus = "usable" | "missing" | "constraint-mismatch" | "wrong-origin" | "corrupt" | "incomplete" | "locally-modified" | "not-applicable"; export interface SourceAuthorityTarget { readonly type: ExtensionType; readonly name: string; readonly identity: string; } export interface SourceAuthorityInput { readonly target: SourceAuthorityTarget; readonly relationship: SourceAuthorityRelationship; readonly requested: { readonly identity: string; readonly workspace: boolean; }; readonly configured?: { readonly identity: string; readonly workspace: boolean; readonly version?: string; readonly status?: WorkspaceAuthorityStatus; }; readonly requiredVersionRange?: string; readonly allowWorkspaceReplacement?: boolean; } export type SourceAuthorityBlockedCause = "workspace-source-replacement" | "workspace-identity-mismatch" | "workspace-version-incompatible" | "workspace-unusable"; export interface SourceAuthorityBlockedFact { readonly id: string; readonly target: SourceAuthorityTarget; readonly relationship: SourceAuthorityRelationship; readonly requestedSource: string; readonly configuredSource: string; readonly cause: SourceAuthorityBlockedCause; readonly detail: string; readonly workspaceVersion?: string; readonly requiredVersionRange?: string; readonly recovery: ReadonlyArray<{ readonly description: string; }>; } export type SourceAuthorityDecision = { readonly kind: "allow-requested"; } | { readonly kind: "workspace-satisfied"; readonly target: SourceAuthorityTarget; readonly relationship: Extract; readonly configuredSource: string; readonly workspaceVersion?: string; } | { readonly kind: "blocked"; readonly fact: SourceAuthorityBlockedFact; }; export declare const evaluateSourceAuthority: (input: SourceAuthorityInput) => SourceAuthorityDecision; //# sourceMappingURL=source-authority.d.ts.map