/** * daemon/forge-release.ts — a closed issue gives its claim back. * * Forge issues are the status channel, so they must clean up after themselves: * when one is closed, the claim (assignee `claude`, label `in-progress`, the * same convention as `pai issue claim|release`) is removed. Nothing is ever * closed or reopened here; closing stays a person's word. */ export declare const CLAIM_ASSIGNEE = "claude"; export declare const CLAIM_LABEL = "in-progress"; export interface Release { assignees?: string[]; labelId?: number; } /** Minimal forge surface, so tests can fake it. Paths are relative to the repo API root. */ export interface ReleaseClient { get(path: string): Promise; patch(path: string, body: unknown): Promise; del(path: string): Promise; } /** The issue number of a closed-issue event, else undefined (other actions and PRs). */ export declare function closedIssue(payload: any): number | undefined; /** What to release given the issue as the forge holds it now. Empty = nothing to do. */ export declare function decideRelease(issue: any): Release; /** Apply the release for a closed-issue event. Returns what was done, for the log. */ export declare function releaseClosed(payload: any, client: ReleaseClient): Promise; /** * Webhook entry point, called after the signature check. Never throws. * The forge is taken from the payload's repository, which must match the * route's own `owner/name` when the route records one. */ export declare function releaseOnClose(routeRepo: string | undefined, payload: any, token?: string | undefined, fetchImpl?: typeof fetch): Promise; /** * True when the event is the echo of a claim release on a closed issue: only * unassigned/label_updated, the issue closed, no claim marker left, and * nothing added since the last event the daemon saw for it. The payload * carries no diff, so "nothing added" is judged against that memory; with no * memory, a `closed` event within 120 s stands in. Every event updates the memory. */ export declare function isClaimReleaseEcho(payload: any, now?: number): boolean; //# sourceMappingURL=forge-release.d.ts.map