/** * Core CRUD operations for file-based issue tracking * * Issues are stored as markdown files with YAML frontmatter in the `issues/` directory. * * @module issues/core */ import { type FileSystem } from "../platform/compat/fs.js"; import type { CreateIssueOptions, Issue, IssueMetadata, ListIssuesOptions, ListIssuesResult, UpdateIssueOptions } from "./schemas/index.js"; /** * Default directory for issues */ export declare const ISSUES_DIR = "issues"; /** * Parse YAML frontmatter from markdown content */ export declare function parseFrontmatter(content: string): { frontmatter: string; body: string; } | null; /** * Minimal YAML parser for issue frontmatter. Handles ONLY the shapes this * module emits: flat `key: value` scalars, `[a, b]` inline arrays, and * block arrays (`-` items). Keys may contain letters, digits, `_` and `-`. * Values may contain colons (e.g. URLs) since only the first `:` splits the * line. Nested maps, multi-line/block scalars, anchors, and quoted keys are * NOT supported. Use a real YAML parser if the schema grows beyond this. */ export declare function parseYaml(yaml: string): Record; /** * Serialize metadata to YAML frontmatter */ export declare function serializeYaml(metadata: IssueMetadata): string; /** * Serialize issue to markdown file content */ export declare function serializeIssue(issue: Issue): string; /** * Parse issue from markdown file content */ export declare function parseIssue(content: string, path: string): Issue | null; /** * Issues manager for a project */ export declare class IssuesManager { private fs; private projectDir; private issuesDir; constructor(projectDir: string, fs?: FileSystem); /** * Ensure the issues directory exists */ ensureDir(): Promise; /** * Get all issue IDs in the project */ listIds(): Promise; /** * Create a new issue */ create(options: CreateIssueOptions): Promise; /** * Get an issue by ID */ get(id: string): Promise; /** * Update an existing issue */ update(id: string, options: UpdateIssueOptions): Promise; /** * Delete an issue */ delete(id: string): Promise; /** * List issues with filtering and sorting */ list(options?: ListIssuesOptions): Promise; /** * Close an issue */ close(id: string): Promise; /** * Reopen an issue */ reopen(id: string): Promise; /** * Add labels to an issue */ addLabels(id: string, labels: string[]): Promise; /** * Remove labels from an issue */ removeLabels(id: string, labels: string[]): Promise; } /** * Create an issues manager for a project directory */ export declare function createIssuesManager(projectDir: string, fs?: FileSystem): IssuesManager; //# sourceMappingURL=core.d.ts.map