knowns 0.8.3 → 0.8.5
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/dist/index.js +181 -113
- package/dist/mcp/server.js +16 -8
- package/dist/ui/assets/{index-DPSe8qqZ.js → index-BTMZF9sb.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +3 -15
package/dist/index.js
CHANGED
|
@@ -30454,7 +30454,7 @@ var require_view = __commonJS({
|
|
|
30454
30454
|
var dirname5 = path.dirname;
|
|
30455
30455
|
var basename3 = path.basename;
|
|
30456
30456
|
var extname = path.extname;
|
|
30457
|
-
var
|
|
30457
|
+
var join24 = path.join;
|
|
30458
30458
|
var resolve = path.resolve;
|
|
30459
30459
|
module2.exports = View;
|
|
30460
30460
|
function View(name, options2) {
|
|
@@ -30516,12 +30516,12 @@ var require_view = __commonJS({
|
|
|
30516
30516
|
};
|
|
30517
30517
|
View.prototype.resolve = function resolve2(dir, file3) {
|
|
30518
30518
|
var ext = this.ext;
|
|
30519
|
-
var path2 =
|
|
30519
|
+
var path2 = join24(dir, file3);
|
|
30520
30520
|
var stat3 = tryStat(path2);
|
|
30521
30521
|
if (stat3 && stat3.isFile()) {
|
|
30522
30522
|
return path2;
|
|
30523
30523
|
}
|
|
30524
|
-
path2 =
|
|
30524
|
+
path2 = join24(dir, basename3(file3, ext), "index" + ext);
|
|
30525
30525
|
stat3 = tryStat(path2);
|
|
30526
30526
|
if (stat3 && stat3.isFile()) {
|
|
30527
30527
|
return path2;
|
|
@@ -34166,7 +34166,7 @@ var require_send = __commonJS({
|
|
|
34166
34166
|
var Stream = __require("stream");
|
|
34167
34167
|
var util2 = __require("util");
|
|
34168
34168
|
var extname = path.extname;
|
|
34169
|
-
var
|
|
34169
|
+
var join24 = path.join;
|
|
34170
34170
|
var normalize = path.normalize;
|
|
34171
34171
|
var resolve = path.resolve;
|
|
34172
34172
|
var sep = path.sep;
|
|
@@ -34338,7 +34338,7 @@ var require_send = __commonJS({
|
|
|
34338
34338
|
return res;
|
|
34339
34339
|
}
|
|
34340
34340
|
parts = path2.split(sep);
|
|
34341
|
-
path2 = normalize(
|
|
34341
|
+
path2 = normalize(join24(root, path2));
|
|
34342
34342
|
} else {
|
|
34343
34343
|
if (UP_PATH_REGEXP.test(path2)) {
|
|
34344
34344
|
debug('malicious path "%s"', path2);
|
|
@@ -34471,7 +34471,7 @@ var require_send = __commonJS({
|
|
|
34471
34471
|
if (err) return self.onStatError(err);
|
|
34472
34472
|
return self.error(404);
|
|
34473
34473
|
}
|
|
34474
|
-
var p =
|
|
34474
|
+
var p = join24(path2, self._index[i]);
|
|
34475
34475
|
debug('stat "%s"', p);
|
|
34476
34476
|
fs.stat(p, function(err2, stat3) {
|
|
34477
34477
|
if (err2) return next(err2);
|
|
@@ -43479,19 +43479,22 @@ var import_prompts = __toESM(require_prompts3(), 1);
|
|
|
43479
43479
|
var core_rules_default = '# Core Rules\n\nYou MUST follow these rules. If you cannot follow any rule, stop and ask for guidance before proceeding.\n\n---\n\n## \u{1F3AF} The Golden Rule\n\n**If you want to change ANYTHING in a task or doc, use CLI commands or MCP tools. NEVER edit .md files directly.**\n\nWhy? Direct file editing breaks metadata synchronization, Git tracking, and relationships.\n\n---\n\n## \u26A0\uFE0F CRITICAL: The -a Flag Confusion\n\nThe `-a` flag means DIFFERENT things in different commands:\n\n| Command | `-a` Means | NOT This! |\n|---------|------------|-----------|\n| `task create` | `--assignee` (assign user) | ~~acceptance criteria~~ |\n| `task edit` | `--assignee` (assign user) | ~~acceptance criteria~~ |\n| `doc edit` | `--append` (append content) | ~~assignee~~ |\n\n### Acceptance Criteria: Use --ac\n\n```bash\n# \u274C WRONG: -a is assignee, NOT acceptance criteria!\nknowns task edit 35 -a "- [ ] Criterion" # Sets assignee to garbage!\nknowns task create "Title" -a "Criterion" # Sets assignee to garbage!\n\n# \u2705 CORRECT: Use --ac for acceptance criteria\nknowns task edit 35 --ac "Criterion one"\nknowns task edit 35 --ac "Criterion two"\nknowns task create "Title" --ac "Criterion one" --ac "Criterion two"\n```\n\n---\n\n## Core Principles\n\n| Rule | Description |\n|------|-------------|\n| **CLI/MCP Only** | Use commands for ALL operations. NEVER edit .md files directly |\n| **Docs First** | Read project docs BEFORE planning or coding |\n| **Time Tracking** | Always start timer when taking task, stop when done |\n| **Plan Approval** | Share plan with user, WAIT for approval before coding |\n| **Check AC After Work** | Only mark acceptance criteria done AFTER completing the work |\n\n---\n\n## The --plain Flag\n\n**ONLY for view/list/search commands (NOT create/edit):**\n\n```bash\n# \u2705 CORRECT\nknowns task <id> --plain\nknowns task list --plain\nknowns doc "path" --plain\nknowns doc list --plain\nknowns search "query" --plain\n\n# \u274C WRONG (create/edit don\'t support --plain)\nknowns task create "Title" --plain # ERROR!\nknowns task edit <id> -s done --plain # ERROR!\nknowns doc create "Title" --plain # ERROR!\nknowns doc edit "name" -c "..." --plain # ERROR!\n```\n\n---\n\n## Reference System\n\n| Context | Task Format | Doc Format |\n|---------|-------------|------------|\n| **Writing** (input) | `@task-<id>` | `@doc/<path>` |\n| **Reading** (output) | `@.knowns/tasks/task-<id>` | `@.knowns/docs/<path>.md` |\n\nFollow refs recursively until complete context gathered.\n\n---\n\n## Task IDs\n\n| Format | Example | Notes |\n|--------|---------|-------|\n| Sequential | `48`, `49` | Legacy numeric |\n| Hierarchical | `48.1`, `48.2` | Legacy subtasks |\n| Random | `qkh5ne` | Current (6-char) |\n\n**CRITICAL:** Use raw ID for `--parent`:\n```bash\n# \u2705 CORRECT\nknowns task create "Title" --parent 48\n\n# \u274C WRONG\nknowns task create "Title" --parent task-48\n```\n\n---\n\n## Status & Priority\n\n| Status | When |\n|--------|------|\n| `todo` | Not started (default) |\n| `in-progress` | Currently working |\n| `in-review` | PR submitted |\n| `blocked` | Waiting on dependency |\n| `done` | All criteria met |\n\n| Priority | Level |\n|----------|-------|\n| `low` | Nice-to-have |\n| `medium` | Normal (default) |\n| `high` | Urgent |\n';
|
|
43480
43480
|
|
|
43481
43481
|
// src/templates/guidelines/commands-reference.md
|
|
43482
|
-
var commands_reference_default = '#
|
|
43482
|
+
var commands_reference_default = '# Commands Reference\n\n## task create\n\n```bash\nknowns task create <title> [options]\n```\n\n| Flag | Short | Purpose |\n|------|-------|---------|\n| `--description` | `-d` | Task description |\n| `--ac` | | Acceptance criterion (repeatable) |\n| `--labels` | `-l` | Comma-separated labels |\n| `--assignee` | `-a` | Assign to user \u26A0\uFE0F |\n| `--priority` | | low/medium/high |\n| `--status` | `-s` | Initial status |\n| `--parent` | | Parent task ID (raw ID only!) |\n\n**\u26A0\uFE0F `-a` = assignee, NOT acceptance criteria! Use `--ac` for AC.**\n\n---\n\n## task edit\n\n```bash\nknowns task edit <id> [options]\n```\n\n| Flag | Short | Purpose |\n|------|-------|---------|\n| `--title` | `-t` | Change title |\n| `--description` | `-d` | Change description |\n| `--status` | `-s` | Change status |\n| `--priority` | | Change priority |\n| `--labels` | `-l` | Set labels |\n| `--assignee` | `-a` | Assign user \u26A0\uFE0F |\n| `--parent` | | Move to parent |\n| `--ac` | | Add acceptance criterion |\n| `--check-ac` | | Mark AC done (1-indexed) |\n| `--uncheck-ac` | | Unmark AC (1-indexed) |\n| `--remove-ac` | | Delete AC (1-indexed) |\n| `--plan` | | Set implementation plan |\n| `--notes` | | Replace notes |\n| `--append-notes` | | Add to notes |\n\n**\u26A0\uFE0F `-a` = assignee, NOT acceptance criteria! Use `--ac` for AC.**\n\n---\n\n## task view/list\n\n```bash\nknowns task <id> --plain # View single task\nknowns task list --plain # List all\nknowns task list --status in-progress --plain\nknowns task list --assignee @me --plain\nknowns task list --tree --plain # Tree hierarchy\n```\n\n---\n\n## doc create\n\n```bash\nknowns doc create <title> [options]\n```\n\n| Flag | Short | Purpose |\n|------|-------|---------|\n| `--description` | `-d` | Description |\n| `--tags` | `-t` | Comma-separated tags |\n| `--folder` | `-f` | Folder path |\n\n---\n\n## doc edit\n\n```bash\nknowns doc edit <name> [options]\n```\n\n| Flag | Short | Purpose |\n|------|-------|---------|\n| `--title` | `-t` | Change title |\n| `--description` | `-d` | Change description |\n| `--tags` | | Set tags |\n| `--content` | `-c` | Replace content |\n| `--append` | `-a` | Append content \u26A0\uFE0F |\n| `--content-file` | | Content from file |\n| `--append-file` | | Append from file |\n\n**\u26A0\uFE0F In doc edit, `-a` = append content, NOT assignee!**\n\n---\n\n## doc view/list\n\n```bash\nknowns doc <path> --plain # View single doc\nknowns doc list --plain # List all\nknowns doc list --tag api --plain # Filter by tag\n```\n\n---\n\n## time\n\n```bash\nknowns time start <id> # REQUIRED when taking task\nknowns time stop # REQUIRED when completing\nknowns time pause\nknowns time resume\nknowns time status\nknowns time add <id> <duration> -n "Note" -d "2025-01-01"\n```\n\n---\n\n## search\n\n```bash\nknowns search "query" --plain\nknowns search "auth" --type task --plain\nknowns search "api" --type doc --plain\nknowns search "bug" --type task --status in-progress --priority high --plain\n```\n\n---\n\n## Multi-line Input (Bash/Zsh)\n\n```bash\nknowns task edit <id> --plan $\'1. Step\\n2. Step\\n3. Step\'\n```\n';
|
|
43483
43483
|
|
|
43484
43484
|
// src/templates/guidelines/workflow-completion.md
|
|
43485
|
-
var workflow_completion_default = '# Task Completion
|
|
43485
|
+
var workflow_completion_default = '# Task Completion\n\n## Definition of Done\n\nA task is **Done** when ALL of these are complete:\n\n| Requirement | Command |\n|-------------|---------|\n| All AC checked | `knowns task edit <id> --check-ac N` |\n| Notes added | `knowns task edit <id> --notes "Summary"` |\n| Timer stopped | `knowns time stop` |\n| Status = done | `knowns task edit <id> -s done` |\n| Tests pass | Run test suite |\n\n---\n\n## Completion Steps\n\n```bash\n# 1. Verify all AC are checked\nknowns task <id> --plain\n\n# 2. Add implementation notes\nknowns task edit <id> --notes $\'## Summary\nWhat was done and key decisions.\'\n\n# 3. Stop timer (REQUIRED!)\nknowns time stop\n\n# 4. Mark done\nknowns task edit <id> -s done\n```\n\n---\n\n## Post-Completion Changes\n\nIf user requests changes after task is done:\n\n```bash\nknowns task edit <id> -s in-progress # Reopen\nknowns time start <id> # Restart timer\nknowns task edit <id> --ac "Fix: description"\nknowns task edit <id> --append-notes "\u{1F504} Reopened: reason"\n# Complete work, then follow completion steps again\n```\n\n---\n\n## Checklist\n\n- [ ] All AC checked (`--check-ac`)\n- [ ] Notes added (`--notes`)\n- [ ] Timer stopped (`time stop`)\n- [ ] Tests pass\n- [ ] Status = done (`-s done`)\n';
|
|
43486
43486
|
|
|
43487
43487
|
// src/templates/guidelines/workflow-creation.md
|
|
43488
|
-
var workflow_creation_default = '# Task Creation
|
|
43488
|
+
var workflow_creation_default = '# Task Creation\n\n## Before Creating\n\n```bash\n# Search for existing tasks first\nknowns search "keyword" --type task --plain\n```\n\n---\n\n## Create Task\n\n```bash\nknowns task create "Clear title (WHAT)" \\\n -d "Description (WHY)" \\\n --ac "Outcome 1" \\\n --ac "Outcome 2" \\\n --priority medium \\\n -l "labels"\n```\n\n---\n\n## Quality Guidelines\n\n### Title\n| \u274C Bad | \u2705 Good |\n|--------|---------|\n| Do auth stuff | Add JWT authentication |\n| Fix bug | Fix login timeout |\n\n### Description\nExplain WHY. Include doc refs: `@doc/security-patterns`\n\n### Acceptance Criteria\n**Outcome-focused, NOT implementation steps:**\n\n| \u274C Bad | \u2705 Good |\n|--------|---------|\n| Add handleLogin() function | User can login |\n| Use bcrypt | Passwords are hashed |\n| Add try-catch | Errors return proper HTTP codes |\n\n---\n\n## Subtasks\n\n```bash\nknowns task create "Parent task"\nknowns task create "Subtask" --parent 48 # Raw ID only!\n```\n\n---\n\n## Anti-Patterns\n\n- \u274C Too many AC in one task \u2192 Split into multiple tasks\n- \u274C Implementation steps as AC \u2192 Write outcomes instead\n- \u274C Skip search \u2192 Always check existing tasks first\n';
|
|
43489
43489
|
|
|
43490
43490
|
// src/templates/guidelines/workflow-execution.md
|
|
43491
|
-
var workflow_execution_default = '# Task Execution
|
|
43491
|
+
var workflow_execution_default = '# Task Execution\n\n## Step 1: Take Task\n\n```bash\nknowns task edit <id> -s in-progress -a @me\nknowns time start <id> # REQUIRED!\n```\n\n---\n\n## Step 2: Research\n\n```bash\n# Read task and follow ALL refs\nknowns task <id> --plain\n# @.knowns/docs/xxx.md \u2192 knowns doc "xxx" --plain\n# @.knowns/tasks/task-YY \u2192 knowns task YY --plain\n\n# Search related docs\nknowns search "keyword" --type doc --plain\n\n# Check similar done tasks\nknowns search "keyword" --type task --status done --plain\n```\n\n---\n\n## Step 3: Plan (BEFORE coding!)\n\n```bash\nknowns task edit <id> --plan $\'1. Research (see @doc/xxx)\n2. Implement\n3. Test\n4. Document\'\n```\n\n**\u26A0\uFE0F Share plan with user. WAIT for approval before coding.**\n\n---\n\n## Step 4: Implement\n\n```bash\n# Check AC only AFTER work is done\nknowns task edit <id> --check-ac 1\nknowns task edit <id> --append-notes "\u2713 Done: feature X"\n```\n\n---\n\n## Scope Changes\n\nIf new requirements emerge during work:\n\n```bash\n# Small: Add to current task\nknowns task edit <id> --ac "New requirement"\nknowns task edit <id> --append-notes "\u26A0\uFE0F Scope updated: reason"\n\n# Large: Ask user first, then create follow-up\nknowns task create "Follow-up: feature" -d "From task <id>"\n```\n\n**\u26A0\uFE0F Don\'t silently expand scope. Ask user first.**\n\n---\n\n## Key Rules\n\n1. **Plan before code** - Capture approach first\n2. **Wait for approval** - Don\'t start without OK\n3. **Check AC after work** - Not before\n4. **Ask on scope changes** - Don\'t expand silently\n';
|
|
43492
43492
|
|
|
43493
43493
|
// src/templates/guidelines/common-mistakes.md
|
|
43494
|
-
var common_mistakes_default = '# Common Mistakes\n\
|
|
43494
|
+
var common_mistakes_default = '# Common Mistakes\n\n## \u26A0\uFE0F CRITICAL: The -a Flag\n\n| Command | `-a` Means | NOT This! |\n|---------|------------|-----------|\n| `task create/edit` | `--assignee` | ~~acceptance criteria~~ |\n| `doc edit` | `--append` | ~~assignee~~ |\n\n```bash\n# \u274C WRONG (sets assignee to garbage!)\nknowns task edit 35 -a "Criterion text"\n\n# \u2705 CORRECT (use --ac)\nknowns task edit 35 --ac "Criterion text"\n```\n\n---\n\n## Quick Reference\n\n| \u274C DON\'T | \u2705 DO |\n|----------|-------|\n| Edit .md files directly | Use CLI commands |\n| `-a "criterion"` | `--ac "criterion"` |\n| `--parent task-48` | `--parent 48` (raw ID) |\n| `--plain` with create/edit | `--plain` only for view/list |\n| Check AC before work done | Check AC AFTER work done |\n| Code before plan approval | Wait for user approval |\n| Code before reading docs | Read docs FIRST |\n| Skip time tracking | Always `time start`/`stop` |\n| Ignore task refs | Follow ALL `@.knowns/...` refs |\n\n---\n\n## Error Recovery\n\n| Problem | Solution |\n|---------|----------|\n| Set assignee to AC text | `knowns task edit <id> -a @me` |\n| Forgot to stop timer | `knowns time add <id> <duration>` |\n| Checked AC too early | `knowns task edit <id> --uncheck-ac N` |\n| Task not found | `knowns task list --plain` |\n';
|
|
43495
|
+
|
|
43496
|
+
// src/templates/guidelines/context-optimization.md
|
|
43497
|
+
var context_optimization_default = '# Context Optimization\n\nOptimize your context usage to work more efficiently within token limits.\n\n---\n\n## Output Format\n\n```bash\n# \u274C Verbose output\nknowns task 42 --json\n\n# \u2705 Compact output (always use --plain)\nknowns task 42 --plain\n```\n\n---\n\n## Search Before Read\n\n```bash\n# \u274C Reading all docs to find info\nknowns doc "doc1" --plain\nknowns doc "doc2" --plain\nknowns doc "doc3" --plain\n\n# \u2705 Search first, then read only relevant docs\nknowns search "authentication" --type doc --plain\nknowns doc "security-patterns" --plain # Only the relevant one\n```\n\n---\n\n## Selective File Reading\n\n```bash\n# \u274C Reading entire large file\nRead file (2000+ lines)\n\n# \u2705 Read specific sections\nRead file with offset=100 limit=50\n```\n\n---\n\n## Compact Notes\n\n```bash\n# \u274C Verbose notes\nknowns task edit 42 --append-notes "I have successfully completed the implementation of the authentication middleware which validates JWT tokens and handles refresh logic..."\n\n# \u2705 Compact notes\nknowns task edit 42 --append-notes "\u2713 Auth middleware + JWT validation done"\n```\n\n---\n\n## Avoid Redundant Operations\n\n| Don\'t | Do Instead |\n|-------|------------|\n| Re-read files already in context | Reference from memory |\n| List tasks/docs multiple times | List once, remember results |\n| Quote entire file contents | Summarize key points |\n| Repeat full error messages | Reference error briefly |\n\n---\n\n## Efficient Workflow\n\n| Phase | Context-Efficient Approach |\n|-------|---------------------------|\n| **Research** | Search \u2192 Read only matches |\n| **Planning** | Brief plan, not detailed prose |\n| **Coding** | Read only files being modified |\n| **Notes** | Bullet points, not paragraphs |\n| **Completion** | Summary, not full log |\n\n---\n\n## Quick Rules\n\n1. **Always `--plain`** - Never use `--json` unless specifically needed\n2. **Search first** - Don\'t read all docs hoping to find info\n3. **Read selectively** - Use offset/limit for large files\n4. **Write concise** - Compact notes, not essays\n5. **Don\'t repeat** - Reference context already loaded\n6. **Summarize** - Key points, not full quotes\n';
|
|
43495
43498
|
|
|
43496
43499
|
// src/templates/guidelines/index.ts
|
|
43497
43500
|
var CORE_RULES = core_rules_default.trim();
|
|
@@ -43500,6 +43503,7 @@ var WORKFLOW_CREATION = workflow_creation_default.trim();
|
|
|
43500
43503
|
var WORKFLOW_EXECUTION = workflow_execution_default.trim();
|
|
43501
43504
|
var WORKFLOW_COMPLETION = workflow_completion_default.trim();
|
|
43502
43505
|
var COMMON_MISTAKES = common_mistakes_default.trim();
|
|
43506
|
+
var CONTEXT_OPTIMIZATION = context_optimization_default.trim();
|
|
43503
43507
|
var Guidelines = {
|
|
43504
43508
|
// Core rules - always needed
|
|
43505
43509
|
core: CORE_RULES,
|
|
@@ -43513,6 +43517,8 @@ var Guidelines = {
|
|
|
43513
43517
|
},
|
|
43514
43518
|
// Common mistakes
|
|
43515
43519
|
mistakes: COMMON_MISTAKES,
|
|
43520
|
+
// Context optimization
|
|
43521
|
+
contextOptimization: CONTEXT_OPTIMIZATION,
|
|
43516
43522
|
/**
|
|
43517
43523
|
* Get full guidelines (all sections combined)
|
|
43518
43524
|
*/
|
|
@@ -43520,6 +43526,8 @@ var Guidelines = {
|
|
|
43520
43526
|
const content = [
|
|
43521
43527
|
CORE_RULES,
|
|
43522
43528
|
"---",
|
|
43529
|
+
CONTEXT_OPTIMIZATION,
|
|
43530
|
+
"---",
|
|
43523
43531
|
COMMANDS_REFERENCE,
|
|
43524
43532
|
"---",
|
|
43525
43533
|
WORKFLOW_CREATION,
|
|
@@ -43538,16 +43546,16 @@ ${content}
|
|
|
43538
43546
|
return content;
|
|
43539
43547
|
},
|
|
43540
43548
|
/**
|
|
43541
|
-
* Get compact guidelines (core + mistakes only)
|
|
43549
|
+
* Get compact guidelines (core + context optimization + mistakes only)
|
|
43542
43550
|
*/
|
|
43543
43551
|
getCompact() {
|
|
43544
|
-
return [CORE_RULES, "---", COMMON_MISTAKES].join("\n\n");
|
|
43552
|
+
return [CORE_RULES, "---", CONTEXT_OPTIMIZATION, "---", COMMON_MISTAKES].join("\n\n");
|
|
43545
43553
|
},
|
|
43546
43554
|
/**
|
|
43547
43555
|
* Get guidelines for specific workflow stage
|
|
43548
43556
|
*/
|
|
43549
43557
|
getForStage(stage) {
|
|
43550
|
-
const sections = [CORE_RULES, "---"];
|
|
43558
|
+
const sections = [CORE_RULES, "---", CONTEXT_OPTIMIZATION, "---"];
|
|
43551
43559
|
switch (stage) {
|
|
43552
43560
|
case "creation":
|
|
43553
43561
|
sections.push(WORKFLOW_CREATION);
|
|
@@ -43592,11 +43600,11 @@ var INSTRUCTION_FILES = [
|
|
|
43592
43600
|
{ path: "GEMINI.md", name: "Gemini", selected: false },
|
|
43593
43601
|
{ path: ".github/copilot-instructions.md", name: "GitHub Copilot", selected: false }
|
|
43594
43602
|
];
|
|
43595
|
-
function getGuidelines(type, variant = "
|
|
43596
|
-
if (variant === "
|
|
43597
|
-
return
|
|
43603
|
+
function getGuidelines(type, variant = "general") {
|
|
43604
|
+
if (variant === "instruction") {
|
|
43605
|
+
return type === "mcp" ? MCP_INSTRUCTION : CLI_INSTRUCTION;
|
|
43598
43606
|
}
|
|
43599
|
-
return
|
|
43607
|
+
return Guidelines.getFull(true);
|
|
43600
43608
|
}
|
|
43601
43609
|
async function updateInstructionFile(filePath, guidelines) {
|
|
43602
43610
|
const fullPath = join3(PROJECT_ROOT, filePath);
|
|
@@ -43676,14 +43684,14 @@ Updating agent instruction files (${label2})...
|
|
|
43676
43684
|
message: "Select variant:",
|
|
43677
43685
|
choices: [
|
|
43678
43686
|
{
|
|
43679
|
-
title: "
|
|
43680
|
-
value: "instruction",
|
|
43681
|
-
description: "Just tells AI to call `knowns agents guideline` for rules"
|
|
43682
|
-
},
|
|
43683
|
-
{
|
|
43684
|
-
title: "Full (Embedded)",
|
|
43687
|
+
title: "Full (Recommended)",
|
|
43685
43688
|
value: "general",
|
|
43686
43689
|
description: "Complete guidelines embedded in file"
|
|
43690
|
+
},
|
|
43691
|
+
{
|
|
43692
|
+
title: "Minimal",
|
|
43693
|
+
value: "instruction",
|
|
43694
|
+
description: "Just tells AI to call `knowns agents guideline` for rules"
|
|
43687
43695
|
}
|
|
43688
43696
|
],
|
|
43689
43697
|
initial: 0
|
|
@@ -43775,10 +43783,10 @@ async function updateFiles(files, guidelines) {
|
|
|
43775
43783
|
}
|
|
43776
43784
|
console.log();
|
|
43777
43785
|
}
|
|
43778
|
-
var syncCommand = new Command("sync").description("Sync/update all agent instruction files with latest guidelines").option("--type <type>", "Guidelines type: cli or mcp", "cli").option("--
|
|
43786
|
+
var syncCommand = new Command("sync").description("Sync/update all agent instruction files with latest guidelines").option("--type <type>", "Guidelines type: cli or mcp", "cli").option("--minimal", "Use minimal instruction (default: full embedded guidelines)").option("--all", "Update all instruction files (including Gemini, Copilot)").action(async (options2) => {
|
|
43779
43787
|
try {
|
|
43780
43788
|
const type = options2.type === "mcp" ? "mcp" : "cli";
|
|
43781
|
-
const variant = options2.
|
|
43789
|
+
const variant = options2.minimal ? "instruction" : "general";
|
|
43782
43790
|
const guidelines = getGuidelines(type, variant);
|
|
43783
43791
|
const filesToUpdate = options2.all ? INSTRUCTION_FILES : INSTRUCTION_FILES.filter((f) => f.selected);
|
|
43784
43792
|
const variantLabel = variant === "instruction" ? " (minimal)" : " (full)";
|
|
@@ -43849,8 +43857,41 @@ function checkGitExists(projectRoot) {
|
|
|
43849
43857
|
process.exit(1);
|
|
43850
43858
|
}
|
|
43851
43859
|
}
|
|
43860
|
+
async function createMcpJsonFile(projectRoot) {
|
|
43861
|
+
const { writeFileSync: writeFileSync3, readFileSync: readFileSync4 } = await import("node:fs");
|
|
43862
|
+
const mcpJsonPath = join4(projectRoot, ".mcp.json");
|
|
43863
|
+
const mcpConfig = {
|
|
43864
|
+
mcpServers: {
|
|
43865
|
+
knowns: {
|
|
43866
|
+
command: "npx",
|
|
43867
|
+
args: ["-y", "knowns", "mcp"]
|
|
43868
|
+
}
|
|
43869
|
+
}
|
|
43870
|
+
};
|
|
43871
|
+
if (existsSync2(mcpJsonPath)) {
|
|
43872
|
+
try {
|
|
43873
|
+
const existing = JSON.parse(readFileSync4(mcpJsonPath, "utf-8"));
|
|
43874
|
+
if (existing?.mcpServers?.knowns) {
|
|
43875
|
+
console.log(source_default.gray(" .mcp.json already has knowns configuration"));
|
|
43876
|
+
return;
|
|
43877
|
+
}
|
|
43878
|
+
existing.mcpServers = {
|
|
43879
|
+
...existing.mcpServers,
|
|
43880
|
+
...mcpConfig.mcpServers
|
|
43881
|
+
};
|
|
43882
|
+
writeFileSync3(mcpJsonPath, JSON.stringify(existing, null, " "), "utf-8");
|
|
43883
|
+
console.log(source_default.green("\u2713 Added knowns to existing .mcp.json"));
|
|
43884
|
+
} catch {
|
|
43885
|
+
writeFileSync3(mcpJsonPath, JSON.stringify(mcpConfig, null, " "), "utf-8");
|
|
43886
|
+
console.log(source_default.green("\u2713 Created .mcp.json (replaced invalid file)"));
|
|
43887
|
+
}
|
|
43888
|
+
} else {
|
|
43889
|
+
writeFileSync3(mcpJsonPath, JSON.stringify(mcpConfig, null, " "), "utf-8");
|
|
43890
|
+
console.log(source_default.green("\u2713 Created .mcp.json for Claude Code MCP auto-discovery"));
|
|
43891
|
+
}
|
|
43892
|
+
}
|
|
43852
43893
|
async function updateGitignoreForIgnoredMode(projectRoot) {
|
|
43853
|
-
const { appendFileSync, readFileSync:
|
|
43894
|
+
const { appendFileSync, readFileSync: readFileSync4, writeFileSync: writeFileSync3 } = await import("node:fs");
|
|
43854
43895
|
const gitignorePath = join4(projectRoot, ".gitignore");
|
|
43855
43896
|
const knownsIgnorePattern = `
|
|
43856
43897
|
# knowns (ignore all except docs)
|
|
@@ -43859,7 +43900,7 @@ async function updateGitignoreForIgnoredMode(projectRoot) {
|
|
|
43859
43900
|
!.knowns/docs/**
|
|
43860
43901
|
`;
|
|
43861
43902
|
if (existsSync2(gitignorePath)) {
|
|
43862
|
-
const content =
|
|
43903
|
+
const content = readFileSync4(gitignorePath, "utf-8");
|
|
43863
43904
|
if (content.includes(".knowns/*")) {
|
|
43864
43905
|
console.log(source_default.gray(" .gitignore already has knowns pattern"));
|
|
43865
43906
|
return;
|
|
@@ -43867,7 +43908,7 @@ async function updateGitignoreForIgnoredMode(projectRoot) {
|
|
|
43867
43908
|
appendFileSync(gitignorePath, knownsIgnorePattern);
|
|
43868
43909
|
console.log(source_default.green("\u2713 Updated .gitignore with knowns pattern"));
|
|
43869
43910
|
} else {
|
|
43870
|
-
|
|
43911
|
+
writeFileSync3(gitignorePath, `${knownsIgnorePattern.trim()}
|
|
43871
43912
|
`, "utf-8");
|
|
43872
43913
|
console.log(source_default.green("\u2713 Created .gitignore with knowns pattern"));
|
|
43873
43914
|
}
|
|
@@ -43907,43 +43948,6 @@ async function runWizard() {
|
|
|
43907
43948
|
initial: 0
|
|
43908
43949
|
// git-tracked
|
|
43909
43950
|
},
|
|
43910
|
-
{
|
|
43911
|
-
type: "text",
|
|
43912
|
-
name: "defaultAssignee",
|
|
43913
|
-
message: "Default assignee (optional)",
|
|
43914
|
-
initial: "",
|
|
43915
|
-
format: (value) => value.trim() ? value.trim() : void 0
|
|
43916
|
-
},
|
|
43917
|
-
{
|
|
43918
|
-
type: "select",
|
|
43919
|
-
name: "defaultPriority",
|
|
43920
|
-
message: "Default priority for new tasks",
|
|
43921
|
-
choices: [
|
|
43922
|
-
{ title: "Low", value: "low" },
|
|
43923
|
-
{ title: "Medium", value: "medium" },
|
|
43924
|
-
{ title: "High", value: "high" }
|
|
43925
|
-
],
|
|
43926
|
-
initial: 1
|
|
43927
|
-
// medium
|
|
43928
|
-
},
|
|
43929
|
-
{
|
|
43930
|
-
type: "list",
|
|
43931
|
-
name: "defaultLabels",
|
|
43932
|
-
message: "Default labels (comma-separated, optional)",
|
|
43933
|
-
initial: "",
|
|
43934
|
-
separator: ","
|
|
43935
|
-
},
|
|
43936
|
-
{
|
|
43937
|
-
type: "select",
|
|
43938
|
-
name: "timeFormat",
|
|
43939
|
-
message: "Time format",
|
|
43940
|
-
choices: [
|
|
43941
|
-
{ title: "24-hour (14:30)", value: "24h" },
|
|
43942
|
-
{ title: "12-hour (2:30 PM)", value: "12h" }
|
|
43943
|
-
],
|
|
43944
|
-
initial: 0
|
|
43945
|
-
// 24h
|
|
43946
|
-
},
|
|
43947
43951
|
{
|
|
43948
43952
|
type: "select",
|
|
43949
43953
|
name: "guidelinesType",
|
|
@@ -43980,10 +43984,9 @@ async function runWizard() {
|
|
|
43980
43984
|
}
|
|
43981
43985
|
return {
|
|
43982
43986
|
name: response.name,
|
|
43983
|
-
|
|
43984
|
-
|
|
43985
|
-
|
|
43986
|
-
timeFormat: response.timeFormat,
|
|
43987
|
+
defaultPriority: "medium",
|
|
43988
|
+
defaultLabels: [],
|
|
43989
|
+
timeFormat: "24h",
|
|
43987
43990
|
gitTrackingMode: response.gitTrackingMode || "git-tracked",
|
|
43988
43991
|
guidelinesType: response.guidelinesType || "cli",
|
|
43989
43992
|
agentFiles: response.agentFiles || []
|
|
@@ -44026,57 +44029,35 @@ var initCommand = new Command("init").description("Initialize .knowns/ folder in
|
|
|
44026
44029
|
if (config2.gitTrackingMode === "git-ignored") {
|
|
44027
44030
|
await updateGitignoreForIgnoredMode(projectRoot);
|
|
44028
44031
|
}
|
|
44032
|
+
if (config2.guidelinesType === "mcp") {
|
|
44033
|
+
await createMcpJsonFile(projectRoot);
|
|
44034
|
+
}
|
|
44029
44035
|
const fileStore2 = new FileStore(projectRoot);
|
|
44030
44036
|
const project = await fileStore2.initProject(config2.name, {
|
|
44031
|
-
defaultAssignee: config2.defaultAssignee,
|
|
44032
44037
|
defaultPriority: config2.defaultPriority,
|
|
44033
44038
|
defaultLabels: config2.defaultLabels,
|
|
44034
44039
|
timeFormat: config2.timeFormat,
|
|
44035
44040
|
gitTrackingMode: config2.gitTrackingMode
|
|
44036
44041
|
});
|
|
44037
44042
|
console.log();
|
|
44038
|
-
console.log(source_default.green(
|
|
44039
|
-
console.log(source_default.gray(` Name: ${project.name}`));
|
|
44040
|
-
console.log(source_default.gray(` Location: ${knownsPath}`));
|
|
44041
|
-
console.log(
|
|
44042
|
-
source_default.gray(` Git Mode: ${config2.gitTrackingMode === "git-tracked" ? "Tracked (team)" : "Ignored (personal)"}`)
|
|
44043
|
-
);
|
|
44044
|
-
if (config2.defaultAssignee) {
|
|
44045
|
-
console.log(source_default.gray(` Default Assignee: ${config2.defaultAssignee}`));
|
|
44046
|
-
}
|
|
44047
|
-
console.log(source_default.gray(` Default Priority: ${config2.defaultPriority}`));
|
|
44048
|
-
if (config2.defaultLabels.length > 0) {
|
|
44049
|
-
console.log(source_default.gray(` Default Labels: ${config2.defaultLabels.join(", ")}`));
|
|
44050
|
-
}
|
|
44051
|
-
console.log(source_default.gray(` Time Format: ${config2.timeFormat}`));
|
|
44052
|
-
console.log();
|
|
44043
|
+
console.log(source_default.green(`\u2713 Project initialized: ${project.name}`));
|
|
44053
44044
|
if (config2.agentFiles.length > 0) {
|
|
44054
44045
|
const guidelines = getGuidelines(config2.guidelinesType);
|
|
44055
|
-
console.log(source_default.bold(`Updating AI instruction files (${config2.guidelinesType.toUpperCase()} version)...`));
|
|
44056
|
-
console.log();
|
|
44057
|
-
let syncedCount = 0;
|
|
44058
44046
|
for (const file3 of config2.agentFiles) {
|
|
44059
44047
|
try {
|
|
44060
44048
|
const result = await updateInstructionFile(file3.path, guidelines);
|
|
44061
44049
|
if (result.success) {
|
|
44062
|
-
syncedCount++;
|
|
44063
44050
|
const action = result.action === "created" ? "Created" : result.action === "appended" ? "Appended" : "Updated";
|
|
44064
|
-
console.log(source_default.green(`\u2713 ${action}
|
|
44051
|
+
console.log(source_default.green(`\u2713 ${action}: ${file3.path}`));
|
|
44065
44052
|
}
|
|
44066
|
-
} catch
|
|
44067
|
-
console.log(source_default.yellow(`\u26A0\uFE0F Skipped
|
|
44053
|
+
} catch {
|
|
44054
|
+
console.log(source_default.yellow(`\u26A0\uFE0F Skipped: ${file3.path}`));
|
|
44068
44055
|
}
|
|
44069
44056
|
}
|
|
44070
|
-
console.log();
|
|
44071
|
-
console.log(source_default.green(`\u2713 Synced guidelines to ${syncedCount} AI instruction file(s)`));
|
|
44072
|
-
} else {
|
|
44073
|
-
console.log(source_default.gray("Skipped AI instruction files (none selected)"));
|
|
44074
44057
|
}
|
|
44075
44058
|
console.log();
|
|
44076
|
-
console.log(source_default.cyan("
|
|
44077
|
-
console.log(source_default.gray('
|
|
44078
|
-
console.log(source_default.gray(" 2. List tasks: knowns task list"));
|
|
44079
|
-
console.log(source_default.gray(" 3. Open web UI: knowns browser"));
|
|
44059
|
+
console.log(source_default.cyan("Get started:"));
|
|
44060
|
+
console.log(source_default.gray(' knowns task create "My first task"'));
|
|
44080
44061
|
} catch (error48) {
|
|
44081
44062
|
console.error(source_default.red("\u2717 Failed to initialize project"));
|
|
44082
44063
|
if (error48 instanceof Error) {
|
|
@@ -62531,6 +62512,10 @@ var resetCommand = new Command("reset").description("Reset configuration to defa
|
|
|
62531
62512
|
});
|
|
62532
62513
|
var configCommand = new Command("config").description("Manage configuration settings").addCommand(listCommand3).addCommand(getCommand).addCommand(setCommand).addCommand(resetCommand);
|
|
62533
62514
|
|
|
62515
|
+
// src/commands/mcp.ts
|
|
62516
|
+
import { existsSync as existsSync18, readFileSync as readFileSync2, writeFileSync } from "node:fs";
|
|
62517
|
+
import { join as join22 } from "node:path";
|
|
62518
|
+
|
|
62534
62519
|
// src/mcp/server.ts
|
|
62535
62520
|
import { existsSync as existsSync17 } from "node:fs";
|
|
62536
62521
|
import { readFile as readFile15 } from "node:fs/promises";
|
|
@@ -70761,6 +70746,89 @@ if (isStandaloneServer) {
|
|
|
70761
70746
|
}
|
|
70762
70747
|
|
|
70763
70748
|
// src/commands/mcp.ts
|
|
70749
|
+
function getMcpConfig() {
|
|
70750
|
+
return {
|
|
70751
|
+
command: "npx",
|
|
70752
|
+
args: ["-y", "knowns", "mcp"]
|
|
70753
|
+
};
|
|
70754
|
+
}
|
|
70755
|
+
async function setupClaudeCode() {
|
|
70756
|
+
const { spawnSync } = await import("node:child_process");
|
|
70757
|
+
const claudeCheck = spawnSync("claude", ["--version"], { stdio: "pipe" });
|
|
70758
|
+
if (claudeCheck.status !== 0) {
|
|
70759
|
+
console.log(source_default.yellow("\u26A0\uFE0F Claude Code CLI not found"));
|
|
70760
|
+
console.log(source_default.gray(" Install Claude Code first: https://claude.ai/code"));
|
|
70761
|
+
console.log(source_default.gray(" After installing, run: knowns mcp setup"));
|
|
70762
|
+
return false;
|
|
70763
|
+
}
|
|
70764
|
+
const config2 = getMcpConfig();
|
|
70765
|
+
const configJson = JSON.stringify(config2);
|
|
70766
|
+
const result = spawnSync("claude", ["mcp", "add-json", "knowns", configJson], {
|
|
70767
|
+
stdio: "inherit"
|
|
70768
|
+
});
|
|
70769
|
+
if (result.status === 0) {
|
|
70770
|
+
console.log(source_default.green("\u2713 Added knowns MCP server to Claude Code"));
|
|
70771
|
+
console.log(source_default.gray(" Restart Claude Code to activate the server"));
|
|
70772
|
+
return true;
|
|
70773
|
+
}
|
|
70774
|
+
const altResult = spawnSync("claude", ["mcp", "add", "knowns", "--", "npx", "-y", "knowns", "mcp"], {
|
|
70775
|
+
stdio: "inherit"
|
|
70776
|
+
});
|
|
70777
|
+
if (altResult.status === 0) {
|
|
70778
|
+
console.log(source_default.green("\u2713 Added knowns MCP server to Claude Code"));
|
|
70779
|
+
console.log(source_default.gray(" Restart Claude Code to activate the server"));
|
|
70780
|
+
return true;
|
|
70781
|
+
}
|
|
70782
|
+
console.log(source_default.red("\u2717 Failed to add MCP server to Claude Code"));
|
|
70783
|
+
console.log(source_default.gray(" Try adding manually with:"));
|
|
70784
|
+
console.log(source_default.cyan(` claude mcp add-json knowns '${configJson}'`));
|
|
70785
|
+
return false;
|
|
70786
|
+
}
|
|
70787
|
+
function createProjectMcpJson(projectRoot) {
|
|
70788
|
+
const mcpJsonPath = join22(projectRoot, ".mcp.json");
|
|
70789
|
+
const mcpConfig = {
|
|
70790
|
+
mcpServers: {
|
|
70791
|
+
knowns: getMcpConfig()
|
|
70792
|
+
}
|
|
70793
|
+
};
|
|
70794
|
+
if (existsSync18(mcpJsonPath)) {
|
|
70795
|
+
try {
|
|
70796
|
+
const existing = JSON.parse(readFileSync2(mcpJsonPath, "utf-8"));
|
|
70797
|
+
if (existing?.mcpServers?.knowns) {
|
|
70798
|
+
console.log(source_default.gray(" .mcp.json already has knowns configuration"));
|
|
70799
|
+
return true;
|
|
70800
|
+
}
|
|
70801
|
+
existing.mcpServers = {
|
|
70802
|
+
...existing.mcpServers,
|
|
70803
|
+
...mcpConfig.mcpServers
|
|
70804
|
+
};
|
|
70805
|
+
writeFileSync(mcpJsonPath, JSON.stringify(existing, null, " "), "utf-8");
|
|
70806
|
+
console.log(source_default.green("\u2713 Added knowns to existing .mcp.json"));
|
|
70807
|
+
} catch {
|
|
70808
|
+
writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, " "), "utf-8");
|
|
70809
|
+
console.log(source_default.green("\u2713 Created .mcp.json (replaced invalid file)"));
|
|
70810
|
+
}
|
|
70811
|
+
} else {
|
|
70812
|
+
writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, " "), "utf-8");
|
|
70813
|
+
console.log(source_default.green("\u2713 Created .mcp.json for Claude Code project-level auto-discovery"));
|
|
70814
|
+
}
|
|
70815
|
+
return true;
|
|
70816
|
+
}
|
|
70817
|
+
var setupCommand = new Command("setup").description("Setup knowns MCP server in Claude Code").option("--project", "Only create .mcp.json in project (skip Claude Code setup)").option("--global", "Only setup in Claude Code globally (skip .mcp.json)").action(async (options2) => {
|
|
70818
|
+
const projectRoot = findProjectRoot();
|
|
70819
|
+
const doProject = options2.project || !options2.project && !options2.global;
|
|
70820
|
+
const doGlobal = options2.global || !options2.project && !options2.global;
|
|
70821
|
+
if (doProject) {
|
|
70822
|
+
if (projectRoot) {
|
|
70823
|
+
createProjectMcpJson(projectRoot);
|
|
70824
|
+
} else {
|
|
70825
|
+
console.log(source_default.yellow("\u26A0\uFE0F Not in a Knowns project. Run 'knowns init' first."));
|
|
70826
|
+
}
|
|
70827
|
+
}
|
|
70828
|
+
if (doGlobal) {
|
|
70829
|
+
await setupClaudeCode();
|
|
70830
|
+
}
|
|
70831
|
+
});
|
|
70764
70832
|
var mcpCommand = new Command("mcp").description("Start MCP server for AI agent integration (Claude Desktop, etc.)").option("-v, --verbose", "Enable verbose logging").option("--info", "Show configuration instructions").action(async (options2) => {
|
|
70765
70833
|
if (options2.info) {
|
|
70766
70834
|
showConfigInfo();
|
|
@@ -70779,7 +70847,7 @@ var mcpCommand = new Command("mcp").description("Start MCP server for AI agent i
|
|
|
70779
70847
|
console.error(source_default.red("Error:"), error48 instanceof Error ? error48.message : error48);
|
|
70780
70848
|
process.exit(1);
|
|
70781
70849
|
}
|
|
70782
|
-
});
|
|
70850
|
+
}).addCommand(setupCommand);
|
|
70783
70851
|
function showConfigInfo() {
|
|
70784
70852
|
const configExample = {
|
|
70785
70853
|
mcpServers: {
|
|
@@ -70823,10 +70891,10 @@ function showConfigInfo() {
|
|
|
70823
70891
|
}
|
|
70824
70892
|
|
|
70825
70893
|
// src/utils/update-notifier.ts
|
|
70826
|
-
import { existsSync as
|
|
70894
|
+
import { existsSync as existsSync19, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "node:fs";
|
|
70827
70895
|
import { mkdir as mkdir10 } from "node:fs/promises";
|
|
70828
70896
|
import { homedir } from "node:os";
|
|
70829
|
-
import { dirname as dirname4, join as
|
|
70897
|
+
import { dirname as dirname4, join as join23 } from "node:path";
|
|
70830
70898
|
var DEFAULT_TTL_MS = 60 * 60 * 1e3;
|
|
70831
70899
|
var DEFAULT_TIMEOUT_MS = 2e3;
|
|
70832
70900
|
function detectPackageManager(cwd) {
|
|
@@ -70839,10 +70907,10 @@ function detectPackageManager(cwd) {
|
|
|
70839
70907
|
if (ua.startsWith("yarn/")) return "yarn";
|
|
70840
70908
|
if (ua.startsWith("bun/")) return "bun";
|
|
70841
70909
|
if (ua.startsWith("npm/")) return "npm";
|
|
70842
|
-
if (
|
|
70843
|
-
if (
|
|
70844
|
-
if (
|
|
70845
|
-
if (
|
|
70910
|
+
if (existsSync19(join23(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
70911
|
+
if (existsSync19(join23(cwd, "yarn.lock"))) return "yarn";
|
|
70912
|
+
if (existsSync19(join23(cwd, "bun.lock"))) return "bun";
|
|
70913
|
+
if (existsSync19(join23(cwd, "package-lock.json"))) return "npm";
|
|
70846
70914
|
return "npm";
|
|
70847
70915
|
}
|
|
70848
70916
|
function compareVersions(a, b) {
|
|
@@ -70866,11 +70934,11 @@ function shouldSkip(args2, force) {
|
|
|
70866
70934
|
}
|
|
70867
70935
|
function getGlobalCachePath(explicit) {
|
|
70868
70936
|
if (explicit) return explicit;
|
|
70869
|
-
return
|
|
70937
|
+
return join23(homedir(), ".knowns", "cli-cache.json");
|
|
70870
70938
|
}
|
|
70871
70939
|
function readCache(cachePath) {
|
|
70872
70940
|
try {
|
|
70873
|
-
const raw =
|
|
70941
|
+
const raw = readFileSync3(cachePath, "utf-8");
|
|
70874
70942
|
const data = JSON.parse(raw);
|
|
70875
70943
|
if (typeof data.lastChecked === "number" && typeof data.latestVersion === "string") {
|
|
70876
70944
|
return data;
|
|
@@ -70882,10 +70950,10 @@ function readCache(cachePath) {
|
|
|
70882
70950
|
}
|
|
70883
70951
|
async function writeCache(cachePath, data) {
|
|
70884
70952
|
const dir = dirname4(cachePath);
|
|
70885
|
-
if (dir && !
|
|
70953
|
+
if (dir && !existsSync19(dir)) {
|
|
70886
70954
|
await mkdir10(dir, { recursive: true });
|
|
70887
70955
|
}
|
|
70888
|
-
|
|
70956
|
+
writeFileSync2(cachePath, JSON.stringify(data, null, 2), "utf-8");
|
|
70889
70957
|
}
|
|
70890
70958
|
async function fetchLatestVersion(packageName) {
|
|
70891
70959
|
try {
|
|
@@ -70948,7 +71016,7 @@ async function notifyCliUpdate(options2) {
|
|
|
70948
71016
|
// package.json
|
|
70949
71017
|
var package_default = {
|
|
70950
71018
|
name: "knowns",
|
|
70951
|
-
version: "0.8.
|
|
71019
|
+
version: "0.8.5",
|
|
70952
71020
|
description: "AI-native task and documentation management for dev teams",
|
|
70953
71021
|
module: "index.ts",
|
|
70954
71022
|
type: "module",
|