knowns 0.3.1 → 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/CHANGELOG.md +36 -321
- package/CLAUDE.md +22 -8
- package/README.md +8 -1
- package/dist/index.js +1204 -213
- package/dist/mcp/server.js +47 -13
- package/dist/ui/assets/{index-BqJqFGQL.js → index-BdxLDbKo.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
package/dist/mcp/server.js
CHANGED
|
@@ -31480,6 +31480,22 @@ var FileStore = class {
|
|
|
31480
31480
|
return null;
|
|
31481
31481
|
}
|
|
31482
31482
|
}
|
|
31483
|
+
/**
|
|
31484
|
+
* Skipped files due to parse errors (for graceful degradation)
|
|
31485
|
+
*/
|
|
31486
|
+
skippedFiles = [];
|
|
31487
|
+
/**
|
|
31488
|
+
* Get list of skipped files from last load
|
|
31489
|
+
*/
|
|
31490
|
+
getSkippedFiles() {
|
|
31491
|
+
return this.skippedFiles;
|
|
31492
|
+
}
|
|
31493
|
+
/**
|
|
31494
|
+
* Clear skipped files list
|
|
31495
|
+
*/
|
|
31496
|
+
clearSkippedFiles() {
|
|
31497
|
+
this.skippedFiles = [];
|
|
31498
|
+
}
|
|
31483
31499
|
/**
|
|
31484
31500
|
* Get all tasks
|
|
31485
31501
|
*/
|
|
@@ -31488,24 +31504,42 @@ var FileStore = class {
|
|
|
31488
31504
|
const files = await readdir(this.tasksPath);
|
|
31489
31505
|
const taskFiles = files.filter((f) => f.startsWith("task-") && f.endsWith(".md"));
|
|
31490
31506
|
const allTimeEntries = await this.loadTimeEntries();
|
|
31507
|
+
this.skippedFiles = [];
|
|
31491
31508
|
const tasksMap = /* @__PURE__ */ new Map();
|
|
31492
31509
|
for (const taskFile of taskFiles) {
|
|
31493
|
-
|
|
31494
|
-
|
|
31495
|
-
|
|
31496
|
-
|
|
31497
|
-
|
|
31498
|
-
|
|
31499
|
-
|
|
31500
|
-
|
|
31501
|
-
|
|
31502
|
-
|
|
31503
|
-
|
|
31504
|
-
|
|
31505
|
-
|
|
31510
|
+
try {
|
|
31511
|
+
const filePath = join2(this.tasksPath, taskFile);
|
|
31512
|
+
const content = await file2(filePath).text();
|
|
31513
|
+
const taskData = parseTaskMarkdown(content);
|
|
31514
|
+
if (taskData.id) {
|
|
31515
|
+
const timeEntries = (allTimeEntries[taskData.id] || []).map((e) => ({
|
|
31516
|
+
...e,
|
|
31517
|
+
startedAt: new Date(e.startedAt),
|
|
31518
|
+
endedAt: e.endedAt ? new Date(e.endedAt) : void 0
|
|
31519
|
+
}));
|
|
31520
|
+
tasksMap.set(taskData.id, {
|
|
31521
|
+
...taskData,
|
|
31522
|
+
subtasks: [],
|
|
31523
|
+
timeEntries
|
|
31524
|
+
});
|
|
31525
|
+
} else {
|
|
31526
|
+
this.skippedFiles.push({
|
|
31527
|
+
file: taskFile,
|
|
31528
|
+
error: "Missing task ID in frontmatter"
|
|
31529
|
+
});
|
|
31530
|
+
}
|
|
31531
|
+
} catch (parseError) {
|
|
31532
|
+
this.skippedFiles.push({
|
|
31533
|
+
file: taskFile,
|
|
31534
|
+
error: parseError instanceof Error ? parseError.message : String(parseError)
|
|
31506
31535
|
});
|
|
31507
31536
|
}
|
|
31508
31537
|
}
|
|
31538
|
+
if (this.skippedFiles.length > 0) {
|
|
31539
|
+
console.warn(
|
|
31540
|
+
`\u26A0 Skipped ${this.skippedFiles.length} corrupted task file(s). Run "knowns task validate <id>" or "knowns task repair <id>" to fix.`
|
|
31541
|
+
);
|
|
31542
|
+
}
|
|
31509
31543
|
for (const task of tasksMap.values()) {
|
|
31510
31544
|
const subtasks = [];
|
|
31511
31545
|
for (const otherTask of tasksMap.values()) {
|