import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; import { type SprintCollateCompleteEvent } from "../hook-dispatcher.js"; /** Payload for the sprint-collate-complete synthetic event (alias for test imports). */ export type SprintCollateCompleteEventPayload = SprintCollateCompleteEvent; /** * Sprint-ID shape gate. Bug IDs like `FORGE-BUG-015` or `BUG-031` do NOT * match — they lack the `-S\d+` suffix. Parity with plugin post-sprint.cjs. * * Pattern requires: * - One or more uppercase letters (e.g. FORGE, PROJECT) * - Literal `-S` * - One or more digits (sprint number) * * Examples: * FORGE-S21 → matches (sprint) * PROJECT-S3 → matches (sprint) * FORGE-BUG-015 → no match (bug ID) * BUG-031 → no match (bug ID — no uppercase prefix before -S) * FORGE-BUG-S21 → no match (segment before -S\d+ must be first after prefix) * * Note: plugin regex `\S*-S\d+` is anchored by the collate.cjs trigger context; * in the synthetic event path we have the sprintId directly so we can apply a * stricter full-string match. */ export declare const SPRINT_ID_REGEX: RegExp; export declare function isSprintId(id: string): boolean; /** * Create the sprint-collate-complete handler bound to the given pi ExtensionAPI. * Exported for unit testing — production code calls registerPostSprintHook. */ export declare function createPostSprintHookHandler(pi: ExtensionAPI): (event: SprintCollateCompleteEvent, ctx: ExtensionCommandContext) => Promise; /** * Register the post-sprint hook handler on the `sprint-collate-complete` * synthetic event. MUST be called BEFORE registerRunSprint in index.ts to * prevent the emit-before-consumer race. */ export declare function registerPostSprintHook(pi: ExtensionAPI): void;