import type { Issue } from "../domain.js"; import type { ApprovalGate, ApprovalRecord, DecisionReason, SdlcPolicy, Track, WorkContract, WorkDecision, WorkItem, WorkSource } from "./schema.js"; export declare function maxTrack(left: Track, right: Track): Track; export declare function contentRevision(value: unknown): string; export declare function contractRevision(contract: WorkContract): string; export declare function workRevision(contract: WorkContract, source: WorkSource): string; export declare function gateRevision(contract: WorkContract, gate: ApprovalGate): string; /** * A short code for the gate's contract content, without the assessed source * revision so it can be printed in the issue it describes. */ export declare function approvalCode(contract: WorkContract, gate: ApprovalGate): string; /** The comment an allowed approver posts on the issue to approve a gate. */ export declare function approvalComment(contract: WorkContract, gate: ApprovalGate): string; export declare function issueRevision(issue: Issue): string; export declare function issueSource(provider: "github" | "gitlab", issue: Issue): WorkSource; export declare function sourceKey(source: WorkSource): string; /** A hosted source observed after assessment invalidates the contract until reassessed. */ export declare function sourceIsStale(work: Pick): boolean; export declare function matchesPath(path: string, patterns: string[]): boolean; export declare function resolveTrack(contract: WorkContract, policy: SdlcPolicy, actualPaths?: string[]): { track: Track; reasons: string[]; }; export declare function assessReadiness(contract: WorkContract, approvals: ApprovalRecord[], policy: SdlcPolicy): WorkDecision; /** * The complete readiness verdict for a persisted Work Item: contract readiness, * current approvals, and whether its hosted source changed since assessment. */ export declare function evaluateWork(work: Pick, approvals: ApprovalRecord[], policy: SdlcPolicy): WorkDecision; export declare function reassessChanges(contract: WorkContract, admittedTrack: Track, policy: SdlcPolicy, paths: string[]): DecisionReason[];