@goondocks/myco 0.3.1 → 0.3.3

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.
Files changed (73) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/dist/{chunk-NTYYYC32.js → chunk-4RJ3IEPW.js} +49 -6
  4. package/dist/chunk-4RJ3IEPW.js.map +1 -0
  5. package/dist/{chunk-JIQISBPI.js → chunk-5RTCCPR6.js} +5 -5
  6. package/dist/{chunk-P2Q77C5F.js → chunk-7ULKE5QH.js} +1 -1
  7. package/dist/{chunk-P2Q77C5F.js.map → chunk-7ULKE5QH.js.map} +1 -1
  8. package/dist/{chunk-Q7BEFSOV.js → chunk-7VPJK56U.js} +10 -4
  9. package/dist/chunk-7VPJK56U.js.map +1 -0
  10. package/dist/{chunk-N6IAW33G.js → chunk-7WNE22W7.js} +3 -3
  11. package/dist/{chunk-72OAG4SF.js → chunk-AWF3M57N.js} +11 -6
  12. package/dist/{chunk-72OAG4SF.js.map → chunk-AWF3M57N.js.map} +1 -1
  13. package/dist/{chunk-XW3OL55U.js → chunk-BA23DROX.js} +2 -2
  14. package/dist/{chunk-TJJRIVZ7.js → chunk-C72VNYA4.js} +2 -2
  15. package/dist/{chunk-PAUPHPOC.js → chunk-DBSG4V6Y.js} +3 -3
  16. package/dist/chunk-R2R243GC.js +33 -0
  17. package/dist/chunk-R2R243GC.js.map +1 -0
  18. package/dist/{chunk-2QEJKG7R.js → chunk-Y3OYD4CX.js} +2 -2
  19. package/dist/{chunk-2TKJPRZL.js → chunk-ZBNT6E22.js} +2 -2
  20. package/dist/{cli-ERAS5H43.js → cli-BGA533S2.js} +20 -14
  21. package/dist/cli-BGA533S2.js.map +1 -0
  22. package/dist/{client-HORA3CC4.js → client-YI6RXFJD.js} +5 -4
  23. package/dist/{detect-providers-6RQCQZOI.js → detect-providers-LNOLBICR.js} +3 -3
  24. package/dist/{init-LLLHUNSY.js → init-TQ7Q4WEI.js} +8 -8
  25. package/dist/{main-D4X6XWRT.js → main-6NGFOICG.js} +21 -14
  26. package/dist/main-6NGFOICG.js.map +1 -0
  27. package/dist/{rebuild-3367GP5R.js → rebuild-JW6BCHHZ.js} +10 -10
  28. package/dist/{reprocess-EM5RIRH4.js → reprocess-F74UA2JC.js} +19 -19
  29. package/dist/{restart-NH5MX45I.js → restart-UGE2Y327.js} +6 -6
  30. package/dist/{search-W3ECVSTH.js → search-2HMG3ON7.js} +9 -9
  31. package/dist/{server-I7MRMIOP.js → server-YYGJKVBZ.js} +113 -104
  32. package/dist/server-YYGJKVBZ.js.map +1 -0
  33. package/dist/{session-start-DECLNJDI.js → session-start-4MNXDOYK.js} +6 -5
  34. package/dist/{session-start-DECLNJDI.js.map → session-start-4MNXDOYK.js.map} +1 -1
  35. package/dist/src/cli.js +4 -4
  36. package/dist/src/daemon/main.js +4 -4
  37. package/dist/src/hooks/post-tool-use.js +5 -4
  38. package/dist/src/hooks/post-tool-use.js.map +1 -1
  39. package/dist/src/hooks/session-end.js +5 -4
  40. package/dist/src/hooks/session-end.js.map +1 -1
  41. package/dist/src/hooks/session-start.js +4 -4
  42. package/dist/src/hooks/stop.js +5 -4
  43. package/dist/src/hooks/stop.js.map +1 -1
  44. package/dist/src/hooks/user-prompt-submit.js +9 -7
  45. package/dist/src/hooks/user-prompt-submit.js.map +1 -1
  46. package/dist/src/mcp/server.js +4 -4
  47. package/dist/{stats-7VEZN2WF.js → stats-7T44NZQN.js} +5 -5
  48. package/dist/{verify-HN5DWV2H.js → verify-7MWOV72E.js} +4 -4
  49. package/dist/version-3MSC7E3V.js +11 -0
  50. package/dist/version-3MSC7E3V.js.map +1 -0
  51. package/package.json +1 -1
  52. package/skills/myco/SKILL.md +18 -16
  53. package/dist/chunk-NTYYYC32.js.map +0 -1
  54. package/dist/chunk-Q7BEFSOV.js.map +0 -1
  55. package/dist/cli-ERAS5H43.js.map +0 -1
  56. package/dist/main-D4X6XWRT.js.map +0 -1
  57. package/dist/server-I7MRMIOP.js.map +0 -1
  58. /package/dist/{chunk-JIQISBPI.js.map → chunk-5RTCCPR6.js.map} +0 -0
  59. /package/dist/{chunk-N6IAW33G.js.map → chunk-7WNE22W7.js.map} +0 -0
  60. /package/dist/{chunk-XW3OL55U.js.map → chunk-BA23DROX.js.map} +0 -0
  61. /package/dist/{chunk-TJJRIVZ7.js.map → chunk-C72VNYA4.js.map} +0 -0
  62. /package/dist/{chunk-PAUPHPOC.js.map → chunk-DBSG4V6Y.js.map} +0 -0
  63. /package/dist/{chunk-2QEJKG7R.js.map → chunk-Y3OYD4CX.js.map} +0 -0
  64. /package/dist/{chunk-2TKJPRZL.js.map → chunk-ZBNT6E22.js.map} +0 -0
  65. /package/dist/{client-HORA3CC4.js.map → client-YI6RXFJD.js.map} +0 -0
  66. /package/dist/{detect-providers-6RQCQZOI.js.map → detect-providers-LNOLBICR.js.map} +0 -0
  67. /package/dist/{init-LLLHUNSY.js.map → init-TQ7Q4WEI.js.map} +0 -0
  68. /package/dist/{rebuild-3367GP5R.js.map → rebuild-JW6BCHHZ.js.map} +0 -0
  69. /package/dist/{reprocess-EM5RIRH4.js.map → reprocess-F74UA2JC.js.map} +0 -0
  70. /package/dist/{restart-NH5MX45I.js.map → restart-UGE2Y327.js.map} +0 -0
  71. /package/dist/{search-W3ECVSTH.js.map → search-2HMG3ON7.js.map} +0 -0
  72. /package/dist/{stats-7VEZN2WF.js.map → stats-7T44NZQN.js.map} +0 -0
  73. /package/dist/{verify-HN5DWV2H.js.map → verify-7MWOV72E.js.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
2
  import {
3
3
  isProcessAlive
4
- } from "./chunk-PAUPHPOC.js";
4
+ } from "./chunk-DBSG4V6Y.js";
5
5
  import "./chunk-SAKJMNSR.js";
6
- import "./chunk-XW3OL55U.js";
7
- import "./chunk-2QEJKG7R.js";
8
- import "./chunk-Q7BEFSOV.js";
6
+ import "./chunk-BA23DROX.js";
7
+ import "./chunk-Y3OYD4CX.js";
8
+ import "./chunk-7VPJK56U.js";
9
9
  import "./chunk-PZUWP5VK.js";
10
10
 
11
11
  // src/cli/restart.ts
@@ -29,7 +29,7 @@ async function run(_args, vaultDir) {
29
29
  } catch {
30
30
  }
31
31
  }
32
- const { DaemonClient } = await import("./client-HORA3CC4.js");
32
+ const { DaemonClient } = await import("./client-YI6RXFJD.js");
33
33
  const client = new DaemonClient(vaultDir);
34
34
  console.log("Waiting for health check...");
35
35
  const healthy = await client.ensureRunning();
@@ -47,4 +47,4 @@ async function run(_args, vaultDir) {
47
47
  export {
48
48
  run
49
49
  };
50
- //# sourceMappingURL=restart-NH5MX45I.js.map
50
+ //# sourceMappingURL=restart-UGE2Y327.js.map
@@ -2,24 +2,24 @@ import { createRequire as __cr } from 'node:module'; const require = __cr(import
2
2
  import {
3
3
  generateEmbedding
4
4
  } from "./chunk-RGVBGTD6.js";
5
- import {
6
- searchFts
7
- } from "./chunk-6FQISQNA.js";
8
- import {
9
- createEmbeddingProvider
10
- } from "./chunk-N6IAW33G.js";
11
5
  import {
12
6
  VectorIndex
13
7
  } from "./chunk-XQXXF6MU.js";
8
+ import {
9
+ searchFts
10
+ } from "./chunk-6FQISQNA.js";
14
11
  import {
15
12
  MycoIndex
16
13
  } from "./chunk-PA3VMINE.js";
17
- import "./chunk-XW3OL55U.js";
14
+ import {
15
+ createEmbeddingProvider
16
+ } from "./chunk-7WNE22W7.js";
17
+ import "./chunk-BA23DROX.js";
18
18
  import {
19
19
  loadConfig
20
20
  } from "./chunk-ISCT2SI6.js";
21
21
  import "./chunk-EF4JVH24.js";
22
- import "./chunk-Q7BEFSOV.js";
22
+ import "./chunk-7VPJK56U.js";
23
23
  import "./chunk-PZUWP5VK.js";
24
24
 
25
25
  // src/cli/search.ts
@@ -117,4 +117,4 @@ export {
117
117
  run,
118
118
  runVectors
119
119
  };
120
- //# sourceMappingURL=search-W3ECVSTH.js.map
120
+ //# sourceMappingURL=search-2HMG3ON7.js.map
@@ -1,17 +1,21 @@
1
1
  import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
- import {
3
- queryLogs
4
- } from "./chunk-BMJX2IDQ.js";
5
2
  import {
6
3
  VaultWriter
7
- } from "./chunk-P2Q77C5F.js";
4
+ } from "./chunk-7ULKE5QH.js";
8
5
  import {
9
- PlanFrontmatterSchema,
6
+ OBSERVATION_TYPES,
7
+ PLAN_STATUSES,
10
8
  indexNote
11
- } from "./chunk-72OAG4SF.js";
9
+ } from "./chunk-AWF3M57N.js";
12
10
  import {
13
11
  generateEmbedding
14
12
  } from "./chunk-RGVBGTD6.js";
13
+ import {
14
+ VectorIndex
15
+ } from "./chunk-XQXXF6MU.js";
16
+ import {
17
+ queryLogs
18
+ } from "./chunk-BMJX2IDQ.js";
15
19
  import "./chunk-5EZ7QF6J.js";
16
20
  import {
17
21
  memoryFm,
@@ -22,16 +26,13 @@ import {
22
26
  initFts,
23
27
  searchFts
24
28
  } from "./chunk-6FQISQNA.js";
25
- import {
26
- createEmbeddingProvider
27
- } from "./chunk-N6IAW33G.js";
28
- import {
29
- VectorIndex
30
- } from "./chunk-XQXXF6MU.js";
31
29
  import {
32
30
  MycoIndex
33
31
  } from "./chunk-PA3VMINE.js";
34
- import "./chunk-XW3OL55U.js";
32
+ import {
33
+ createEmbeddingProvider
34
+ } from "./chunk-7WNE22W7.js";
35
+ import "./chunk-BA23DROX.js";
35
36
  import {
36
37
  _enum,
37
38
  _null,
@@ -55,15 +56,22 @@ import {
55
56
  unknown
56
57
  } from "./chunk-ISCT2SI6.js";
57
58
  import "./chunk-EF4JVH24.js";
59
+ import {
60
+ getPluginVersion
61
+ } from "./chunk-R2R243GC.js";
58
62
  import {
59
63
  resolveVaultDir
60
64
  } from "./chunk-N33KUCFP.js";
65
+ import "./chunk-Y3OYD4CX.js";
61
66
  import {
62
67
  CONTENT_SNIPPET_CHARS,
63
68
  EMBEDDING_INPUT_LIMIT,
69
+ MCP_LOGS_DEFAULT_LIMIT,
70
+ MCP_SEARCH_DEFAULT_LIMIT,
71
+ MCP_SESSIONS_DEFAULT_LIMIT,
64
72
  RECALL_SUMMARY_PREVIEW_CHARS,
65
73
  SESSION_SUMMARY_PREVIEW_CHARS
66
- } from "./chunk-Q7BEFSOV.js";
74
+ } from "./chunk-7VPJK56U.js";
67
75
  import {
68
76
  __commonJS,
69
77
  __toESM
@@ -14051,7 +14059,6 @@ var StdioServerTransport = class {
14051
14059
  // src/mcp/server.ts
14052
14060
  import fs3 from "fs";
14053
14061
  import path4 from "path";
14054
- import { fileURLToPath } from "url";
14055
14062
 
14056
14063
  // src/mcp/tools/search.ts
14057
14064
  async function handleMycoSearch(index, input, vectorIndex, backend) {
@@ -14143,6 +14150,7 @@ async function handleMycoRemember(vaultDir, index, input) {
14143
14150
  const notePath = writer.writeMemory({
14144
14151
  id,
14145
14152
  observation_type: input.type,
14153
+ session: input.session,
14146
14154
  plan: input.related_plan ?? void 0,
14147
14155
  tags: input.tags,
14148
14156
  content: input.content
@@ -14458,166 +14466,167 @@ Superseded by:: [[${wisdomId}]]`;
14458
14466
  return { wisdom_id: wisdomId, wisdom_path: wisdomPath, sources_archived: archived };
14459
14467
  }
14460
14468
 
14461
- // src/mcp/server.ts
14462
- function getPackageVersion() {
14463
- try {
14464
- let dir = path4.dirname(fileURLToPath(import.meta.url));
14465
- for (let i = 0; i < 5; i++) {
14466
- const pkgPath = path4.join(dir, "package.json");
14467
- if (fs3.existsSync(pkgPath)) {
14468
- return JSON.parse(fs3.readFileSync(pkgPath, "utf-8")).version;
14469
- }
14470
- dir = path4.dirname(dir);
14471
- }
14472
- return "0.0.0";
14473
- } catch {
14474
- return "0.0.0";
14475
- }
14476
- }
14477
- var OBSERVATION_TYPES = ["gotcha", "bug_fix", "decision", "discovery", "trade_off", "cross-cutting"];
14478
- var PLAN_STATUSES = [...PlanFrontmatterSchema.shape.status._def.innerType.options, "all"];
14469
+ // src/mcp/tool-definitions.ts
14470
+ var PLAN_STATUS_FILTER = [...PLAN_STATUSES, "all"];
14471
+ var TOOL_SEARCH = "myco_search";
14472
+ var TOOL_RECALL = "myco_recall";
14473
+ var TOOL_REMEMBER = "myco_remember";
14474
+ var TOOL_PLANS = "myco_plans";
14475
+ var TOOL_SESSIONS = "myco_sessions";
14476
+ var TOOL_TEAM = "myco_team";
14477
+ var TOOL_GRAPH = "myco_graph";
14478
+ var TOOL_ORPHANS = "myco_orphans";
14479
+ var TOOL_LOGS = "myco_logs";
14480
+ var TOOL_SUPERSEDE = "myco_supersede";
14481
+ var TOOL_CONSOLIDATE = "myco_consolidate";
14482
+ var PROP_BRANCH = "Git branch name to find related sessions and plans";
14483
+ var PROP_SINCE = "ISO timestamp \u2014 entries after this date";
14484
+ var PROP_TAGS = "Tags for discoverability \u2014 component names, technologies, concepts";
14479
14485
  var TOOL_DEFINITIONS = [
14480
14486
  {
14481
- name: "myco_search",
14482
- description: "Combined semantic + full-text search across the vault",
14487
+ name: TOOL_SEARCH,
14488
+ description: "Search the vault for prior decisions, gotchas, bug fixes, and session history. Use before making design decisions, when debugging non-obvious issues, or when wondering why code is structured a certain way.",
14483
14489
  inputSchema: {
14484
14490
  type: "object",
14485
14491
  properties: {
14486
- query: { type: "string", description: "Search query" },
14487
- type: { type: "string", enum: ["session", "plan", "memory", "all"] },
14488
- limit: { type: "number", default: 10 }
14492
+ query: { type: "string", description: "Natural language search query \u2014 describe what you are looking for" },
14493
+ type: { type: "string", enum: ["session", "plan", "memory", "all"], description: "Filter by note type (default: all)" },
14494
+ limit: { type: "number", description: `Max results (default: ${MCP_SEARCH_DEFAULT_LIMIT})` }
14489
14495
  },
14490
14496
  required: ["query"]
14491
14497
  }
14492
14498
  },
14493
14499
  {
14494
- name: "myco_recall",
14495
- description: "Automatic context retrieval based on current work",
14500
+ name: TOOL_RECALL,
14501
+ description: "Get context relevant to your current work \u2014 memories, sessions, and plans related to the branch and files you are working on. Use at the start of a task or when you need background on a component.",
14496
14502
  inputSchema: {
14497
14503
  type: "object",
14498
14504
  properties: {
14499
- branch: { type: "string" },
14500
- files: { type: "array", items: { type: "string" } }
14505
+ branch: { type: "string", description: PROP_BRANCH },
14506
+ files: { type: "array", items: { type: "string" }, description: "File paths you are working on \u2014 finds memories tagged with these files" }
14501
14507
  }
14502
14508
  }
14503
14509
  },
14504
14510
  {
14505
- name: "myco_remember",
14506
- description: "Store an observation as a memory note",
14511
+ name: TOOL_REMEMBER,
14512
+ description: "Save a decision, gotcha, bug fix, discovery, or trade-off as a permanent memory. Use after making a key decision, fixing a tricky bug, discovering something non-obvious, or encountering a gotcha. Always include the session ID from your context.",
14507
14513
  inputSchema: {
14508
14514
  type: "object",
14509
14515
  properties: {
14510
- content: { type: "string" },
14511
- type: { type: "string", enum: OBSERVATION_TYPES },
14512
- tags: { type: "array", items: { type: "string" } },
14513
- related_plan: { type: "string" }
14516
+ content: { type: "string", description: "The observation \u2014 include context, reasoning, and what someone encountering this in the future needs to know" },
14517
+ type: { type: "string", enum: OBSERVATION_TYPES, description: `Observation type: ${OBSERVATION_TYPES.join(", ")}` },
14518
+ tags: { type: "array", items: { type: "string" }, description: PROP_TAGS },
14519
+ session: { type: "string", description: 'Your session ID (from "Session::" in your context) \u2014 links this memory to the current session' },
14520
+ related_plan: { type: "string", description: "Plan ID if this observation relates to an active plan" }
14514
14521
  },
14515
14522
  required: ["content", "type"]
14516
14523
  }
14517
14524
  },
14518
14525
  {
14519
- name: "myco_plans",
14520
- description: "List active plans with progress",
14526
+ name: TOOL_PLANS,
14527
+ description: "List active implementation plans and their status. Use to check what work is in flight before starting new tasks.",
14521
14528
  inputSchema: {
14522
14529
  type: "object",
14523
14530
  properties: {
14524
- status: { type: "string", enum: PLAN_STATUSES },
14525
- id: { type: "string" }
14531
+ status: { type: "string", enum: PLAN_STATUS_FILTER, description: "Filter by status (default: all statuses)" },
14532
+ id: { type: "string", description: "Get a specific plan by ID" }
14526
14533
  }
14527
14534
  }
14528
14535
  },
14529
14536
  {
14530
- name: "myco_sessions",
14531
- description: "Query session history with filters",
14537
+ name: TOOL_SESSIONS,
14538
+ description: "Browse past coding sessions with summaries, tools used, and linked memories. Use to understand what work has been done on a feature or branch.",
14532
14539
  inputSchema: {
14533
14540
  type: "object",
14534
14541
  properties: {
14535
- plan: { type: "string" },
14536
- branch: { type: "string" },
14537
- user: { type: "string" },
14538
- since: { type: "string" },
14539
- limit: { type: "number" }
14542
+ plan: { type: "string", description: "Filter sessions linked to a specific plan" },
14543
+ branch: { type: "string", description: PROP_BRANCH },
14544
+ user: { type: "string", description: "Filter sessions by user" },
14545
+ since: { type: "string", description: PROP_SINCE },
14546
+ limit: { type: "number", description: `Max results (default: ${MCP_SESSIONS_DEFAULT_LIMIT})` }
14540
14547
  }
14541
14548
  }
14542
14549
  },
14543
14550
  {
14544
- name: "myco_team",
14545
- description: "Teammate activity on same files or plan",
14551
+ name: TOOL_TEAM,
14552
+ description: "See what teammates have been working on \u2014 filter by shared files or plan to understand who has context on a component.",
14546
14553
  inputSchema: {
14547
14554
  type: "object",
14548
14555
  properties: {
14549
- files: { type: "array", items: { type: "string" } },
14550
- plan: { type: "string" },
14551
- since: { type: "string" }
14556
+ files: { type: "array", items: { type: "string" }, description: "File paths to find teammates who worked on them" },
14557
+ plan: { type: "string", description: "Plan ID to find teammates collaborating on it" },
14558
+ since: { type: "string", description: PROP_SINCE }
14552
14559
  }
14553
14560
  }
14554
14561
  },
14555
14562
  {
14556
- name: "myco_graph",
14557
- description: "Traverse vault connections via wikilinks \u2014 find related notes by following links",
14563
+ name: TOOL_GRAPH,
14564
+ description: "Traverse connections between vault notes via wikilinks \u2014 explore how sessions, memories, and plans relate to each other.",
14558
14565
  inputSchema: {
14559
14566
  type: "object",
14560
14567
  properties: {
14561
- note_id: { type: "string", description: 'Note ID to start from (e.g. "session-abc123")' },
14562
- direction: { type: "string", enum: ["incoming", "outgoing", "both"], description: "Link direction (default: both)" },
14563
- depth: { type: "number", description: "Traversal depth 1-3 (default: 1)" }
14568
+ note_id: { type: "string", description: 'Note ID to start from (e.g., "session-abc123" or "decision-xyz789")' },
14569
+ direction: { type: "string", enum: ["incoming", "outgoing", "both"], description: "Link direction to follow (default: both)" },
14570
+ depth: { type: "number", description: "How many hops to traverse, 1-3 (default: 1)" }
14564
14571
  },
14565
14572
  required: ["note_id"]
14566
14573
  }
14567
14574
  },
14568
14575
  {
14569
- name: "myco_orphans",
14570
- description: "Find vault notes with no incoming or outgoing wikilinks",
14576
+ name: TOOL_ORPHANS,
14577
+ description: "Find vault notes with no connections \u2014 potentially stale or unlinked knowledge that may need review or cleanup.",
14571
14578
  inputSchema: {
14572
14579
  type: "object",
14573
14580
  properties: {}
14574
14581
  }
14575
14582
  },
14576
14583
  {
14577
- name: "myco_logs",
14578
- description: "View daemon and MCP activity logs with filtering \u2014 useful for debugging and auditing",
14584
+ name: TOOL_LOGS,
14585
+ description: "View daemon logs for debugging when sessions are not being captured, observations are missing, or embeddings fail. Filter by level, component, or time range.",
14579
14586
  inputSchema: {
14580
14587
  type: "object",
14581
14588
  properties: {
14582
- limit: { type: "number", description: "Max entries to return (default 50)" },
14583
- level: { type: "string", enum: ["debug", "info", "warn", "error"], description: "Minimum log level" },
14584
- component: { type: "string", description: "Filter by component (daemon, processor, hooks, lifecycle, embeddings, mcp, lineage, watcher)" },
14585
- since: { type: "string", description: "ISO timestamp \u2014 entries after this time" },
14589
+ limit: { type: "number", description: `Max entries to return (default: ${MCP_LOGS_DEFAULT_LIMIT})` },
14590
+ level: { type: "string", enum: ["debug", "info", "warn", "error"], description: "Minimum log level filter" },
14591
+ component: { type: "string", description: "Component filter: daemon, processor, hooks, lifecycle, embeddings, mcp, lineage, watcher" },
14592
+ since: { type: "string", description: PROP_SINCE },
14586
14593
  until: { type: "string", description: "ISO timestamp \u2014 entries before this time" }
14587
14594
  }
14588
14595
  }
14589
14596
  },
14590
14597
  {
14591
- name: "myco_supersede",
14592
- description: "Mark a memory as superseded by a newer one \u2014 use when an older observation is outdated, incorrect, or replaced by better understanding",
14598
+ name: TOOL_SUPERSEDE,
14599
+ description: "Mark a memory as outdated and replaced by a newer one. Use when a decision was reversed, a gotcha was fixed, a discovery was wrong, or the codebase changed and an observation no longer applies. The old memory is preserved but marked superseded.",
14593
14600
  inputSchema: {
14594
14601
  type: "object",
14595
14602
  properties: {
14596
- old_memory_id: { type: "string", description: "ID of the memory to supersede" },
14597
- new_memory_id: { type: "string", description: "ID of the memory that replaces it" },
14598
- reason: { type: "string", description: "Why this memory is being superseded" }
14603
+ old_memory_id: { type: "string", description: 'ID of the outdated memory (e.g., "decision-abc123")' },
14604
+ new_memory_id: { type: "string", description: "ID of the replacement memory" },
14605
+ reason: { type: "string", description: "Why the old memory is being superseded" }
14599
14606
  },
14600
14607
  required: ["old_memory_id", "new_memory_id"]
14601
14608
  }
14602
14609
  },
14603
14610
  {
14604
- name: "myco_consolidate",
14605
- description: "Merge multiple related memories into a single wisdom note \u2014 use when several observations describe aspects of the same insight or pattern",
14611
+ name: TOOL_CONSOLIDATE,
14612
+ description: "Merge 3+ related memories into a single comprehensive wisdom note. Use when multiple observations describe aspects of the same insight, share a root cause, or would be more useful as one reference. Source memories are marked superseded.",
14606
14613
  inputSchema: {
14607
14614
  type: "object",
14608
14615
  properties: {
14609
- source_memory_ids: { type: "array", items: { type: "string" }, description: "IDs of memories to consolidate" },
14610
- consolidated_content: { type: "string", description: "The merged, comprehensive content for the wisdom note" },
14611
- observation_type: { type: "string", enum: OBSERVATION_TYPES, description: "Type for the consolidated note" },
14612
- tags: { type: "array", items: { type: "string" }, description: "Tags for the wisdom note" }
14616
+ source_memory_ids: { type: "array", items: { type: "string" }, description: "IDs of the memories to merge (minimum 2)" },
14617
+ consolidated_content: { type: "string", description: "The merged, comprehensive content \u2014 synthesize, do not just concatenate" },
14618
+ observation_type: { type: "string", enum: OBSERVATION_TYPES, description: `Type for the consolidated wisdom note: ${OBSERVATION_TYPES.join(", ")}` },
14619
+ tags: { type: "array", items: { type: "string" }, description: PROP_TAGS }
14613
14620
  },
14614
14621
  required: ["source_memory_ids", "consolidated_content", "observation_type"]
14615
14622
  }
14616
14623
  }
14617
14624
  ];
14625
+
14626
+ // src/mcp/server.ts
14618
14627
  function createMycoServer(config2) {
14619
14628
  const server = new Server(
14620
- { name: "myco", version: getPackageVersion() },
14629
+ { name: "myco", version: getPluginVersion() },
14621
14630
  { capabilities: { tools: {} } }
14622
14631
  );
14623
14632
  const dbPath = path4.join(config2.vaultDir, "index.db");
@@ -14651,37 +14660,37 @@ function createMycoServer(config2) {
14651
14660
  const idx = getIndex();
14652
14661
  const input = args;
14653
14662
  switch (name) {
14654
- case "myco_search":
14663
+ case TOOL_SEARCH:
14655
14664
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoSearch(idx, input, config2.vectorIndex, config2.embeddingProvider)) }] };
14656
- case "myco_recall":
14665
+ case TOOL_RECALL:
14657
14666
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoRecall(idx, input)) }] };
14658
- case "myco_remember": {
14667
+ case TOOL_REMEMBER: {
14659
14668
  const result = await handleMycoRemember(config2.vaultDir, idx, input);
14660
14669
  embedNote(result.id, String(input.content), { type: "memory", observation_type: String(input.type ?? ""), importance: "high" });
14661
- logActivity("myco_remember", { id: result.id, observation_type: input.type, path: result.note_path });
14670
+ logActivity(TOOL_REMEMBER, { id: result.id, observation_type: input.type, path: result.note_path });
14662
14671
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
14663
14672
  }
14664
- case "myco_plans":
14673
+ case TOOL_PLANS:
14665
14674
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoPlans(idx, input)) }] };
14666
- case "myco_sessions":
14675
+ case TOOL_SESSIONS:
14667
14676
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoSessions(idx, input)) }] };
14668
- case "myco_team":
14677
+ case TOOL_TEAM:
14669
14678
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoTeam(idx, input, config2.teamUser)) }] };
14670
- case "myco_graph":
14679
+ case TOOL_GRAPH:
14671
14680
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoGraph(idx, input)) }] };
14672
- case "myco_orphans":
14681
+ case TOOL_ORPHANS:
14673
14682
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoOrphans(idx)) }] };
14674
- case "myco_logs":
14683
+ case TOOL_LOGS:
14675
14684
  return { content: [{ type: "text", text: JSON.stringify(await handleMycoLogs(config2.vaultDir, input)) }] };
14676
- case "myco_supersede": {
14685
+ case TOOL_SUPERSEDE: {
14677
14686
  const result = await handleMycoSupersede(config2.vaultDir, idx, input);
14678
14687
  if (result.status === "superseded" && config2.vectorIndex) {
14679
14688
  config2.vectorIndex.delete(result.old_memory);
14680
14689
  }
14681
- logActivity("myco_supersede", { old: result.old_memory, new: result.new_memory, status: result.status });
14690
+ logActivity(TOOL_SUPERSEDE, { old: result.old_memory, new: result.new_memory, status: result.status });
14682
14691
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
14683
14692
  }
14684
- case "myco_consolidate": {
14693
+ case TOOL_CONSOLIDATE: {
14685
14694
  const result = await handleMycoConsolidate(config2.vaultDir, idx, input);
14686
14695
  embedNote(result.wisdom_id, String(input.consolidated_content), { type: "memory", observation_type: String(input.observation_type ?? ""), importance: "high" });
14687
14696
  if (config2.vectorIndex && Array.isArray(input.source_memory_ids)) {
@@ -14689,7 +14698,7 @@ function createMycoServer(config2) {
14689
14698
  config2.vectorIndex.delete(id);
14690
14699
  }
14691
14700
  }
14692
- logActivity("myco_consolidate", { wisdom_id: result.wisdom_id, sources: input.source_memory_ids, archived: result.sources_archived });
14701
+ logActivity(TOOL_CONSOLIDATE, { wisdom_id: result.wisdom_id, sources: input.source_memory_ids, archived: result.sources_archived });
14693
14702
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
14694
14703
  }
14695
14704
  default:
@@ -14732,4 +14741,4 @@ export {
14732
14741
  createMycoServer,
14733
14742
  main
14734
14743
  };
14735
- //# sourceMappingURL=server-I7MRMIOP.js.map
14744
+ //# sourceMappingURL=server-YYGJKVBZ.js.map