import type { IssueSeverity, IssueStatus as CanonicalIssueStatus, IssuePriority as CanonicalIssuePriority } from './domain/issue.js'; export type IssueStatus = CanonicalIssueStatus; export type IssuePriority = CanonicalIssuePriority; export interface SentinelIssue { id: string; title: string; project: string; status: IssueStatus; priority?: IssuePriority; epicId?: string; tags?: string[]; created_at?: string; updated_at?: string; description?: string; [key: string]: unknown; } export interface CreateIssueInput { projectId: string; title: string; description?: string; epicId?: string; priority?: IssuePriority; tags?: string[]; /** Optional. Defaults to 'med'. Distinct from priority — see createIssue. */ severity?: IssueSeverity; /** * Who is working on it — EPIC-0040. A prefixed identity: user:, * agent: or human:. Rejected if it names a team. */ assignee?: string; /** Which team owns it — EPIC-0040. `team:`, minted by HQ. */ team?: string; } export interface CreateIssueOutput extends SentinelIssue { filePath: string; } /** * Safely parse YAML content that might contain multiple documents (frontmatter format). * Returns the first document's contents, or throws if no valid document found. */ export declare function safeParseYaml(content: string): Record; /** * List all issues for a project * Reads from both .decibel/ and decibel/ paths, deduping by filename */ export declare function listIssuesForProject(projectId: string): Promise; /** * Create a new issue for a project */ /** * Create an issue. * * EPIC-0038 Phase 5: this used to be the second writer. It emitted `.yml` while * the facade path (src/tools/sentinel.ts -> FsIssueRepository) emitted `.md`, * into the same directory, from the same ISS-NNNN space. Converging the files * while both writers ran would have left this one re-emitting `.yml` behind the * migration — which is why the epic sequences behaviour before representation. * * So it now delegates. The name, the input contract and the return shape are * all preserved; only the bytes on disk change. `SentinelIssue` is a subset of * the canonical `Issue`, so the mapping back is total rather than lossy: * `details` carries what this API calls `description`, and everything else is * the same field under the same name. * * One field needs a decision rather than a mapping. This API has no `severity` * and the canonical model wants one, so callers may now pass it and it defaults * to 'med' — the neutral middle of ['low','med','high','critical'] — rather * than inventing a severity from `priority`, which answers a different question * (how bad it is, versus when it gets worked on). */ export declare function createIssue(input: CreateIssueInput): Promise; /** * Get a single issue by ID (e.g., "ISS-0005") with full content */ export declare function getIssueById(projectId: string, issueId: string): Promise; export interface UpdateIssueInput { projectId: string; issueId: string; status?: IssueStatus; priority?: IssuePriority; tags?: string[]; note?: string; /** * Reassign — EPIC-0040. A prefixed identity, or the empty string to * UNASSIGN. The empty string is a deliberate part of the interface: without * it there is no way to take an assignee off, and "leave it set forever" is * not a reassignment model. */ assignee?: string; /** Move to another team, or the empty string to clear it. */ team?: string; } export interface UpdateIssueOutput extends SentinelIssue { filePath: string; changes: string[]; } /** * Update an existing issue — status, priority, tags, and/or append a note. * Reads the YAML file, applies changes, writes back. */ export declare function updateIssue(input: UpdateIssueInput): Promise; /** * Filter issues by status */ export declare function filterByStatus(issues: SentinelIssue[], status: IssueStatus): SentinelIssue[]; /** * Filter issues by epic ID */ export declare function filterByEpicId(issues: SentinelIssue[], epicId: string): SentinelIssue[]; //# sourceMappingURL=sentinelIssues.d.ts.map