/** * Issue Tracker - persistent bug/feature tracking with one Markdown file * per issue (YAML-ish frontmatter + Markdown body + appended comments). * * Issues are cached in memory after first load and kept fresh via a native * fs.watch on the items directory (debounced full rescan) - see * ensureIndexLoaded()/startWatcher() below. This mirrors the dependency-free * watcher convention used by src/server-watcher.ts. */ export type IssueType = 'bug' | 'feature'; export type IssueStatus = 'pending' | 'acknowledged' | 'in_progress' | 'fixed' | 'implemented'; export interface IssueComment { timestamp: Date; text: string; } export interface TrackedIssue { id: number; type: IssueType; status: IssueStatus; title: string; body: string; labels: string[]; comments: IssueComment[]; sequenceFile: string; startUrl: string; reportedAt: Date; acknowledgedAt?: Date; startedAt?: Date; resolvedAt?: Date; recordingName: string; /** Absolute path to the issue's .md file on disk. */ filePath: string; } export interface IssueFilter { type?: IssueType; status?: IssueStatus; includeCompleted?: boolean; /** Match issues that have ANY of these labels. */ labels?: string[]; } /** * Pure, I/O-free frontmatter parse - exported for reuse by callers (e.g. the * dashboard) that need to read issue metadata from an arbitrary project's * directory without going through this module's own path config. */ export declare function parseIssueFrontmatter(raw: string): Record | null; /** Filename for an issue's repro sequence JSON (lives in issues/sequences/). */ export declare function generateSequenceFilename(type: IssueType, id: number, title: string): string; /** Filename for an issue's own Markdown file (lives in issues/items/). */ export declare function generateIssueFilename(type: IssueType, id: number, title: string): string; /** * Test-only: resets in-memory state (closing any active watcher) so the next * ensureIndexLoaded() re-scans from disk. Not part of the tool-facing API. */ export declare function __resetForTests(): void; /** Initialize the issue tracker - ensures the index is loaded (migrating legacy CSV data if present). */ export declare function initializeTracker(): Promise; export declare function addIssue(params: { type: IssueType; title: string; sequenceFile?: string; recordingName?: string; initialStatus?: IssueStatus; startUrl?: string; body?: string; labels?: string[]; }): Promise; export declare function getIssue(id: number): Promise; export declare function getIssues(filter?: IssueFilter): Promise; export declare function updateIssueStatus(id: number, status: IssueStatus): Promise; export declare function updateIssueSequenceFile(id: number, sequenceFile: string): Promise; /** Append a comment to an issue's Markdown timeline. */ export declare function addIssueComment(id: number, text: string): Promise; /** * Save a sequence file to the issues folder and link it to an issue */ export declare function saveIssueSequence(issueId: number, issueType: IssueType, issueTitle: string, sequenceData: Record, comment?: string): Promise<{ success: boolean; filename?: string; error?: string; }>; /** * Acknowledge all pending bugs (sets status to 'acknowledged') */ export declare function acknowledgeAllBugs(): Promise; /** * Check if there are pending bugs that should block tools */ export declare function hasPendingBugs(): Promise; /** * Get pending bugs for blocking message */ export declare function getPendingBugs(): Promise; /** * Get the sequences directory path for issues */ export declare function getIssueSequencesDir(): string; /** * Get the items directory path for issues (one .md file per issue) */ export declare function getIssueItemsDir(): string; export declare const getInteractionSequencesDir: typeof getIssueSequencesDir; /** * Get issues indexed by their sequence filename */ export declare function getIssuesBySequenceFile(): Promise>; //# sourceMappingURL=issue-tracker.d.ts.map