@fungi.computer/issues 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/validator.d.ts +2 -0
- package/dist/validator.js +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Issues (`@fungi.computer/issues`)
|
|
2
2
|
|
|
3
3
|
Issues checks a folder of Markdown tickets in your repository and tells you
|
|
4
|
-
which ones are unblocked.
|
|
4
|
+
which ones are unblocked. `isTerminalIssueStatus(status)` shares the validator’s
|
|
5
|
+
resolved/wontfix rule with consumers that display the same issue graph.
|
|
5
6
|
|
|
6
7
|
```mermaid
|
|
7
8
|
flowchart LR
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { inspectIssueTree } from "./validator.js";
|
|
1
|
+
export { inspectIssueTree, isTerminalIssueStatus } from "./validator.js";
|
|
2
2
|
export type { IssueFrontmatter } from "./validator.js";
|
|
3
3
|
export { issueStatusSchema, issueDiagnosticSchema, issueSummarySchema, issueIndexRecordSchema, issueTrackerReportSchema, issueIndexSnapshotSchema, } from "./report.js";
|
|
4
4
|
export type { IssueStatus, IssueDiagnostic, IssueSummary, IssueIndexRecord, IssueTrackerReport, IssueIndexSnapshot, } from "./report.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { inspectIssueTree } from "./validator.js";
|
|
1
|
+
export { inspectIssueTree, isTerminalIssueStatus } from "./validator.js";
|
|
2
2
|
export { issueStatusSchema, issueDiagnosticSchema, issueSummarySchema, issueIndexRecordSchema, issueTrackerReportSchema, issueIndexSnapshotSchema, } from "./report.js";
|
|
3
3
|
export { issueIndexStateSchema } from "./report.js";
|
package/dist/validator.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { IssueStatus, IssueTrackerReport } from "./report.js";
|
|
2
|
+
/** Whether an issue is settled and no longer blocks dependent work. */
|
|
3
|
+
export declare function isTerminalIssueStatus(status: IssueStatus): boolean;
|
|
2
4
|
/** Ticket metadata accepted by the local issue frontmatter schema. */
|
|
3
5
|
export type IssueFrontmatter = {
|
|
4
6
|
/** Final slice wires all of this effort's user surfaces. */
|
package/dist/validator.js
CHANGED
|
@@ -7,6 +7,10 @@ import { matter } from "vfile-matter";
|
|
|
7
7
|
import issueFrontmatterSchema from "./issue-schema.js";
|
|
8
8
|
const ISSUE_PATH = /^(?<effort>[a-z0-9]+(?:-[a-z0-9]+)*)\/(?<number>[0-9]{2}[a-z]?)-[a-z0-9]+(?:-[a-z0-9]+)*\.md$/u;
|
|
9
9
|
const TERMINAL_STATUSES = new Set(["resolved", "wontfix"]);
|
|
10
|
+
/** Whether an issue is settled and no longer blocks dependent work. */
|
|
11
|
+
export function isTerminalIssueStatus(status) {
|
|
12
|
+
return TERMINAL_STATUSES.has(status);
|
|
13
|
+
}
|
|
10
14
|
const FRONTIER_STATUSES = new Set([
|
|
11
15
|
"ready-for-agent",
|
|
12
16
|
"ready-for-human",
|
|
@@ -63,7 +67,7 @@ function requiredSections(frontmatter) {
|
|
|
63
67
|
sections.splice(1, 0, "Reproduction");
|
|
64
68
|
if (frontmatter.type === "research" || frontmatter.type === "decision")
|
|
65
69
|
sections.splice(1, 0, "Answer");
|
|
66
|
-
if (
|
|
70
|
+
if (isTerminalIssueStatus(frontmatter.status))
|
|
67
71
|
sections.push("Resolution");
|
|
68
72
|
return sections;
|
|
69
73
|
}
|
|
@@ -230,7 +234,7 @@ function issueSummaries(records) {
|
|
|
230
234
|
blocked: record.frontmatter.blocked_by.some((blocker) => {
|
|
231
235
|
const blockingRecord = records.get(blocker);
|
|
232
236
|
return (blockingRecord === undefined ||
|
|
233
|
-
!
|
|
237
|
+
!isTerminalIssueStatus(blockingRecord.frontmatter.status));
|
|
234
238
|
}),
|
|
235
239
|
}));
|
|
236
240
|
}
|