export interface BugRecord { bugId?: string; status?: string; summaries?: Record; [key: string]: unknown; } export declare function readBugRecord(bugId: string, storeCli: string, cwd: string): BugRecord | null; export declare function computeNextBugId(bugIds: string[], prefix: string): string; export declare function assignNextBugId(storeCli: string, cwd: string, prefix?: string): string; export declare function extractBugIdFromReportText(text: string, prefix: string): string | null; export declare function preCreateBug(bugId: string, title: string, storeCli: string, cwd: string): boolean; /** * Scan tool_execution_end events to extract the bugId written by a triage * subagent. Returns the LAST matching tool call's bugId, or null if none found. * * In pi runtime, the forge_store tool is registered as "forge_store" (not * "store-cli"). In Claude Code runtime, subagents may shell out via Bash. * This function covers all three paths. */ export declare function extractBugIdFromEvents(events: Array<{ toolName?: string; result?: unknown; }>, prefix?: string): string | null;