knowns 0.1.3 → 0.1.4
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/CLAUDE.md +236 -160
- package/README.md +38 -2
- package/dist/index.js +5353 -216
- package/dist/mcp/server.js +32 -14
- package/dist/ui/index.css +3091 -1
- package/dist/ui/main.css +1 -1
- package/dist/ui/main.js +250 -229
- package/package.json +23 -3
package/dist/mcp/server.js
CHANGED
|
@@ -25654,18 +25654,29 @@ class StdioServerTransport {
|
|
|
25654
25654
|
import { mkdir as mkdir2, readdir } from "fs/promises";
|
|
25655
25655
|
import { join as join2 } from "path";
|
|
25656
25656
|
// src/models/project.ts
|
|
25657
|
-
function createDefaultProjectSettings() {
|
|
25657
|
+
function createDefaultProjectSettings(overrides) {
|
|
25658
25658
|
return {
|
|
25659
25659
|
defaultPriority: "medium",
|
|
25660
|
-
statuses: ["todo", "in-progress", "in-review", "done", "blocked"]
|
|
25660
|
+
statuses: ["todo", "in-progress", "in-review", "done", "blocked", "on-hold", "urgent"],
|
|
25661
|
+
statusColors: {
|
|
25662
|
+
todo: "gray",
|
|
25663
|
+
"in-progress": "blue",
|
|
25664
|
+
"in-review": "purple",
|
|
25665
|
+
done: "green",
|
|
25666
|
+
blocked: "red",
|
|
25667
|
+
"on-hold": "yellow",
|
|
25668
|
+
urgent: "orange"
|
|
25669
|
+
},
|
|
25670
|
+
visibleColumns: ["todo", "in-progress", "blocked", "done", "in-review"],
|
|
25671
|
+
...overrides
|
|
25661
25672
|
};
|
|
25662
25673
|
}
|
|
25663
|
-
function createProject(name, id) {
|
|
25674
|
+
function createProject(name, id, settingsOverrides) {
|
|
25664
25675
|
return {
|
|
25665
25676
|
name,
|
|
25666
25677
|
id: id || name.toLowerCase().replace(/\s+/g, "-"),
|
|
25667
25678
|
createdAt: new Date,
|
|
25668
|
-
settings: createDefaultProjectSettings()
|
|
25679
|
+
settings: createDefaultProjectSettings(settingsOverrides)
|
|
25669
25680
|
};
|
|
25670
25681
|
}
|
|
25671
25682
|
// src/models/version.ts
|
|
@@ -25908,6 +25919,13 @@ function serializeTaskMarkdown(task) {
|
|
|
25908
25919
|
return import_gray_matter.default.stringify(body, frontmatter);
|
|
25909
25920
|
}
|
|
25910
25921
|
function parseBodySections(body) {
|
|
25922
|
+
const description = hasSectionMarkers(body, "description") ? extractSectionContent(body, "description") : undefined;
|
|
25923
|
+
const implementationPlan = hasSectionMarkers(body, "plan") ? extractSectionContent(body, "plan") : undefined;
|
|
25924
|
+
const implementationNotes = hasSectionMarkers(body, "notes") ? extractSectionContent(body, "notes") : undefined;
|
|
25925
|
+
let acceptanceCriteria;
|
|
25926
|
+
if (hasSectionMarkers(body, "ac")) {
|
|
25927
|
+
acceptanceCriteria = body.substring(body.indexOf("<!-- AC:BEGIN -->"), body.indexOf("<!-- AC:END -->") + "<!-- AC:END -->".length);
|
|
25928
|
+
}
|
|
25911
25929
|
const sections = {};
|
|
25912
25930
|
const lines = body.split(`
|
|
25913
25931
|
`);
|
|
@@ -25933,14 +25951,11 @@ function parseBodySections(body) {
|
|
|
25933
25951
|
sections[currentSection] = sectionContent.join(`
|
|
25934
25952
|
`).trim();
|
|
25935
25953
|
}
|
|
25936
|
-
const description = sections.description ? hasSectionMarkers(sections.description, "description") ? extractSectionContent(sections.description, "description") : sections.description : undefined;
|
|
25937
|
-
const implementationPlan = sections.implementationPlan ? hasSectionMarkers(sections.implementationPlan, "plan") ? extractSectionContent(sections.implementationPlan, "plan") : sections.implementationPlan : undefined;
|
|
25938
|
-
const implementationNotes = sections.implementationNotes ? hasSectionMarkers(sections.implementationNotes, "notes") ? extractSectionContent(sections.implementationNotes, "notes") : sections.implementationNotes : undefined;
|
|
25939
25954
|
return {
|
|
25940
|
-
description,
|
|
25941
|
-
acceptanceCriteria: sections.acceptanceCriteria,
|
|
25942
|
-
implementationPlan,
|
|
25943
|
-
implementationNotes
|
|
25955
|
+
description: description || sections.description,
|
|
25956
|
+
acceptanceCriteria: acceptanceCriteria || sections.acceptanceCriteria,
|
|
25957
|
+
implementationPlan: implementationPlan || sections.implementationPlan,
|
|
25958
|
+
implementationNotes: implementationNotes || sections.implementationNotes
|
|
25944
25959
|
};
|
|
25945
25960
|
}
|
|
25946
25961
|
function sectionTitleToKey(title) {
|
|
@@ -26058,7 +26073,7 @@ class FileStore {
|
|
|
26058
26073
|
this.projectRoot = projectRoot;
|
|
26059
26074
|
this.basePath = join2(projectRoot, ".knowns");
|
|
26060
26075
|
this.tasksPath = join2(this.basePath, "tasks");
|
|
26061
|
-
this.projectPath = join2(this.basePath, "
|
|
26076
|
+
this.projectPath = join2(this.basePath, "config.json");
|
|
26062
26077
|
this.timeEntriesPath = join2(this.basePath, "time-entries.json");
|
|
26063
26078
|
this.versionStore = new VersionStore(projectRoot);
|
|
26064
26079
|
}
|
|
@@ -26074,11 +26089,11 @@ class FileStore {
|
|
|
26074
26089
|
async saveTimeEntries(entries) {
|
|
26075
26090
|
await Bun.write(this.timeEntriesPath, JSON.stringify(entries, null, 2));
|
|
26076
26091
|
}
|
|
26077
|
-
async initProject(name) {
|
|
26092
|
+
async initProject(name, settings) {
|
|
26078
26093
|
await mkdir2(this.basePath, { recursive: true });
|
|
26079
26094
|
await mkdir2(this.tasksPath, { recursive: true });
|
|
26080
26095
|
await this.versionStore.init();
|
|
26081
|
-
const project = createProject(name);
|
|
26096
|
+
const project = createProject(name, undefined, settings);
|
|
26082
26097
|
await this.saveProject(project);
|
|
26083
26098
|
return project;
|
|
26084
26099
|
}
|
|
@@ -26325,6 +26340,9 @@ function resolveDocReferences(content, projectRoot) {
|
|
|
26325
26340
|
if (link.target.startsWith("../")) {
|
|
26326
26341
|
continue;
|
|
26327
26342
|
}
|
|
26343
|
+
if (/^(task-)?\d+(\.md)?$/.test(link.target)) {
|
|
26344
|
+
continue;
|
|
26345
|
+
}
|
|
26328
26346
|
let filename = link.target;
|
|
26329
26347
|
filename = filename.replace(/^\.\//, "");
|
|
26330
26348
|
if (!filename.endsWith(".md")) {
|