@mneme-ai/mcp 1.19.4 → 1.20.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.
@@ -0,0 +1,151 @@
1
+ /**
2
+ * NUCLEUS MCP tools (v1.20.0 scaffold) — Infinity Wisdom Brain.
3
+ *
4
+ * • mneme.nucleus.tick — apply one tick; returns growth delta + new lesson
5
+ * • mneme.nucleus.dna — snapshot the current DNA state (for the agent to read)
6
+ * • mneme.nucleus.mutate — apply N mutation cycles (v1.21 will evolve karma + recipes)
7
+ *
8
+ * The user's vision: every conversation feeds the nucleus, the nucleus
9
+ * never sleeps, every next conversation inherits a fitter version. The
10
+ * AI agent that uses Mneme regularly accumulates compounding wisdom that
11
+ * NO non-Mneme AI can match. v1.20 ships the scaffold; v1.21 will add
12
+ * the persistent daemon + auto-tick on every MCP dispatch.
13
+ */
14
+ import { nucleus } from "@mneme-ai/core";
15
+ export const nucleusTickTool = {
16
+ name: "mneme.nucleus.tick",
17
+ category: "meta",
18
+ description: "Apply one tick to the Infinity Wisdom Brain (the Nucleus). Aggregates " +
19
+ "current DNA from all chromosomes + streaks, computes growth deltas " +
20
+ "since last tick, synthesizes an optional new lesson, and persists. " +
21
+ "Returns the updated tick counter, DNA hash, wisdom score, and any " +
22
+ "lesson generated. Use WHEN you want to feed Mneme's nucleus a fresh " +
23
+ "observation cycle (e.g., after every meaningful interaction with the " +
24
+ "user, or at session start to inherit the latest evolved DNA).",
25
+ whenToUse: "After an interaction worth recording, OR at session start to pick up the latest evolved DNA + read recent lessons.",
26
+ triggers: ["nucleus tick", "feed mneme", "evolve dna"],
27
+ inputSchema: { type: "object", properties: {} },
28
+ outputSchema: {
29
+ type: "object",
30
+ properties: {
31
+ state: { type: "object" },
32
+ delta: { type: "object" },
33
+ },
34
+ },
35
+ examples: [
36
+ {
37
+ userQuery: "Tick the nucleus and tell me what evolved",
38
+ expectedOutput: "Returns { state: { tick, dnaHash, wisdomScore, lessons }, delta: { growthSinceLastTick, wisdomScoreDelta, newLesson } }. wisdomScore is monotonically non-decreasing.",
39
+ },
40
+ ],
41
+ pitfalls: [
42
+ "Wisdom score is a heuristic — it reflects accumulated activity + verified outcomes, not absolute correctness.",
43
+ "Calling tick repeatedly with no new chromosomes / streak changes won't grow the score (sub-linear formula).",
44
+ "v1.20 ships the scaffold; auto-tick on every MCP dispatch lands in v1.21.",
45
+ ],
46
+ composeWith: ["mneme.nucleus.dna", "mneme.nucleus.mutate", "mneme.lineage.fertilize"],
47
+ handler: async (rt) => {
48
+ const result = nucleus.tick(rt.meta.rootPath);
49
+ const lessonText = result.delta.newLesson ? ` 💡 NEW LESSON: ${result.delta.newLesson.text}` : "";
50
+ return {
51
+ data: result,
52
+ wisdom: `${nucleus.dnaBanner(result.state)} · ${result.delta.wisdomScoreDelta >= 0 ? "+" : ""}${result.delta.wisdomScoreDelta} wisdom this tick.${lessonText}`,
53
+ confidence: { level: "high" },
54
+ followUp: result.delta.newLesson ? ["mneme.nucleus.dna"] : [],
55
+ };
56
+ },
57
+ };
58
+ export const nucleusDnaTool = {
59
+ name: "mneme.nucleus.dna",
60
+ category: "meta",
61
+ description: "Read the current DNA snapshot of the Nucleus — tick number, DNA hash, " +
62
+ "wisdom score, growth metrics, and the last 50 synthesized lessons. " +
63
+ "Use WHEN you want to know what Mneme has learned about THIS repo + " +
64
+ "lineage so far, or to surface accumulated wisdom to the user.",
65
+ whenToUse: "You want to see the nucleus's accumulated wisdom + recent lessons.",
66
+ triggers: ["read dna", "nucleus state", "mneme wisdom"],
67
+ inputSchema: {
68
+ type: "object",
69
+ properties: {
70
+ lessonLimit: { type: "number", description: "Max lessons to return (default 10, max 50)." },
71
+ },
72
+ },
73
+ outputSchema: {
74
+ type: "object",
75
+ properties: {
76
+ tick: { type: "number" },
77
+ bornAt: { type: "string" },
78
+ dnaHash: { type: "string" },
79
+ wisdomScore: { type: "number" },
80
+ growth: { type: "object" },
81
+ lessons: { type: "array" },
82
+ },
83
+ },
84
+ examples: [
85
+ {
86
+ userQuery: "What has Mneme learned about my repo?",
87
+ expectedOutput: "Returns the nucleus state — tick count, DNA hash, wisdom score (monotonically grows), and recent lessons.",
88
+ },
89
+ ],
90
+ pitfalls: ["Returns the LAST tick's state — call mneme.nucleus.tick first if you want fresh aggregation."],
91
+ composeWith: ["mneme.nucleus.tick", "mneme.lineage.pedigree"],
92
+ handler: async (rt, args) => {
93
+ const limit = Math.min(50, typeof args["lessonLimit"] === "number" ? args["lessonLimit"] : 10);
94
+ const n = nucleus.readNucleus(rt.meta.rootPath);
95
+ const data = {
96
+ tick: n.tick,
97
+ bornAt: n.bornAt,
98
+ lastTick: n.lastTick,
99
+ dnaHash: n.dnaHash,
100
+ wisdomScore: n.wisdomScore,
101
+ growth: n.growth,
102
+ mutations: n.mutations,
103
+ consolidations: n.consolidations,
104
+ lessons: n.lessons.slice(-limit).reverse(),
105
+ };
106
+ return {
107
+ data,
108
+ wisdom: nucleus.dnaBanner(n),
109
+ confidence: { level: "high" },
110
+ };
111
+ },
112
+ };
113
+ export const nucleusMutateTool = {
114
+ name: "mneme.nucleus.mutate",
115
+ category: "meta",
116
+ description: "Apply N mutation cycles to the Nucleus. v1.20 scaffold: increments " +
117
+ "mutation counter for tracking. v1.21 will mutate molecule recipes + " +
118
+ "karma deltas with structured noise to drive evolution under selection " +
119
+ "pressure (verified outcomes promoted, hallucinations suppressed). Use " +
120
+ "WHEN you want to nudge the nucleus toward exploration vs exploitation.",
121
+ whenToUse: "You want to track mutation cycles applied to the nucleus (v1.20 scaffold).",
122
+ triggers: ["mutate nucleus", "evolve dna"],
123
+ inputSchema: {
124
+ type: "object",
125
+ properties: {
126
+ cycles: { type: "number", description: "Number of mutation cycles. Default 1, max 100." },
127
+ },
128
+ },
129
+ outputSchema: {
130
+ type: "object",
131
+ properties: {
132
+ mutations: { type: "number" },
133
+ tick: { type: "number" },
134
+ dnaHash: { type: "string" },
135
+ },
136
+ },
137
+ examples: [{ userQuery: "Mutate the nucleus once" }],
138
+ pitfalls: ["v1.20 scaffold: counts mutations but doesn't yet evolve molecule recipes (v1.21)."],
139
+ composeWith: ["mneme.nucleus.tick", "mneme.nucleus.dna"],
140
+ handler: async (rt, args) => {
141
+ const cycles = Math.max(1, Math.min(100, typeof args["cycles"] === "number" ? args["cycles"] : 1));
142
+ const n = nucleus.mutate(rt.meta.rootPath, cycles);
143
+ return {
144
+ data: { mutations: n.mutations, tick: n.tick, dnaHash: n.dnaHash },
145
+ wisdom: `Applied ${cycles} mutation cycle${cycles === 1 ? "" : "s"} — nucleus now at ${n.mutations} total mutations · DNA ${n.dnaHash}.`,
146
+ confidence: { level: "high" },
147
+ };
148
+ },
149
+ };
150
+ export const nucleusTools = [nucleusTickTool, nucleusDnaTool, nucleusMutateTool];
151
+ //# sourceMappingURL=_nucleus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_nucleus.js","sourceRoot":"","sources":["../../src/tools/_nucleus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,MAAM;IAChB,WAAW,EACT,wEAAwE;QACxE,qEAAqE;QACrE,qEAAqE;QACrE,oEAAoE;QACpE,sEAAsE;QACtE,uEAAuE;QACvE,+DAA+D;IACjE,SAAS,EACP,oHAAoH;IACtH,QAAQ,EAAE,CAAC,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC;IACtD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;IAC/C,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B;KACF;IACD,QAAQ,EAAE;QACR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AG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAE,IAAI,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/G,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO;YACL,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;YAClE,MAAM,EAAE,WAAW,MAAM,kBAAkB,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,OAAO,GAAG;YACxI,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;SAC9B,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAgB,CAAC,eAAe,EAAE,cAAc,EAAE,iBAAiB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"_registry.d.ts","sourceRoot":"","sources":["../../src/tools/_registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA8B3D;sEACsE;AACtE,wBAAgB,aAAa,IAAI,SAAS,EAAE,CA+B3C;AAED,mDAAmD;AACnD,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CASrD;AAED,uEAAuE;AACvE,wBAAgB,eAAe,IAAI,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,CAAC,CAOhE"}
1
+ {"version":3,"file":"_registry.d.ts","sourceRoot":"","sources":["../../src/tools/_registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgC3D;sEACsE;AACtE,wBAAgB,aAAa,IAAI,SAAS,EAAE,CAkC3C;AAED,mDAAmD;AACnD,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CASrD;AAED,uEAAuE;AACvE,wBAAgB,eAAe,IAAI,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,CAAC,CAOhE"}
@@ -31,7 +31,9 @@ import { genomeMarketplaceTools } from "./_genome_marketplace.js";
31
31
  import { aletheiaTools, honeypotTools } from "./_aletheia.js";
32
32
  import { meshTools } from "./_mesh.js";
33
33
  import { lineageTools } from "./_lineage.js";
34
- import { systemUpgradeTool } from "./_upgrade.js";
34
+ import { systemUpgradeTool, systemHealthTool } from "./_upgrade.js";
35
+ import { botSpawnTool } from "./_squadron.js";
36
+ import { nucleusTools } from "./_nucleus.js";
35
37
  /** All Mneme tools, in display order. The capabilities syllabus comes first
36
38
  * so AI clients that read tool lists top-down see it immediately. */
37
39
  export function buildAllTools() {
@@ -54,6 +56,9 @@ export function buildAllTools() {
54
56
  ...meshTools,
55
57
  ...lineageTools,
56
58
  systemUpgradeTool,
59
+ systemHealthTool,
60
+ botSpawnTool,
61
+ ...nucleusTools,
57
62
  smartDoTool,
58
63
  ...memoryTools,
59
64
  ...peopleTools,
@@ -1 +1 @@
1
- {"version":3,"file":"_registry.js","sourceRoot":"","sources":["../../src/tools/_registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAA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,CAAC;QACxD,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,eAAe;IAC7B,MAAM,GAAG,GAAG,IAAI,GAAG,EAA6B,CAAC;IACjD,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,EAAE,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClD,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Bot Squadron (v1.20.0) — atom + element + molecule formation that
3
+ * fights ONE problem from 6 angles in parallel and merges into a
4
+ * consensus verdict.
5
+ *
6
+ * The pitch: a single AI agent calling `mneme.bot.spawn({ claim })` gets
7
+ * a coordinated response from six specialized sub-agents (each is a
8
+ * pre-baked recipe of Mneme tools). Output is a single consensus
9
+ * payload with confidence scoring + per-bot trace.
10
+ *
11
+ * 🔬 DiagnosticianBot — root-cause hunter (palimpsest + atrophy + memory.why)
12
+ * 🧪 ReplicatorBot — find similar past bugs (dna.search + insights.echo)
13
+ * 📜 HistorianBot — when did this start (story + time-machine)
14
+ * 🛡 AletheiaBot — security scan (lint + immune.scan)
15
+ * 🔮 PreMortemBot — predict side effects (premortem + audit.conscience)
16
+ * 🏛 CourtBot — adversarial cross-examine (adversary.cross_examine)
17
+ *
18
+ * The output also surfaces *which bots agreed* + *which dissented*, so
19
+ * the human / AI can see how robust the recommendation is.
20
+ *
21
+ * No external service. No LLM call. Each bot is a small async function
22
+ * that calls 1-3 existing Mneme tools + summarizes. Total runtime budget
23
+ * < 2 seconds for the full formation (parallel).
24
+ */
25
+ import type { MnemeTool, ToolRuntime } from "./_types.js";
26
+ export type BotName = "diagnostician" | "replicator" | "historian" | "aletheia" | "premortem" | "court";
27
+ export interface BotFinding {
28
+ bot: BotName;
29
+ glyph: string;
30
+ /** Verdict from this bot: "supports", "contradicts", "neutral", "needs_data". */
31
+ verdict: "supports" | "contradicts" | "neutral" | "needs_data";
32
+ /** Confidence 0-1. */
33
+ confidence: number;
34
+ /** One-sentence headline the consensus aggregator quotes. */
35
+ headline: string;
36
+ /** Concrete evidence — commit hashes / file paths / past-incident ids. */
37
+ evidence: string[];
38
+ /** Tools this bot fired (for transparency). */
39
+ toolsFired: string[];
40
+ /** Time taken (ms). */
41
+ durationMs: number;
42
+ }
43
+ export interface SquadronVerdict {
44
+ claim: string;
45
+ /** Final verdict. */
46
+ consensus: "verdict_for" | "verdict_against" | "split" | "insufficient_data";
47
+ /** 0-1 — fraction of bots whose verdict matched the consensus. */
48
+ confidence: number;
49
+ /** Human-readable summary the AI agent quotes verbatim to the user. */
50
+ summary: string;
51
+ /** Specific recommended action(s). */
52
+ recommendation: string;
53
+ /** Per-bot findings. */
54
+ findings: BotFinding[];
55
+ /** Bots that agreed with the consensus. */
56
+ agreeing: BotName[];
57
+ /** Bots that dissented. */
58
+ dissenting: BotName[];
59
+ /** Total wall-clock time. */
60
+ totalMs: number;
61
+ }
62
+ interface SpawnContext {
63
+ rt: ToolRuntime;
64
+ claim: string;
65
+ filePath?: string;
66
+ authorEmail?: string;
67
+ }
68
+ export declare function runSquadron(ctx: SpawnContext, bots?: BotName[]): Promise<SquadronVerdict>;
69
+ export declare const botSpawnTool: MnemeTool;
70
+ export {};
71
+ //# sourceMappingURL=_squadron.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_squadron.d.ts","sourceRoot":"","sources":["../../src/tools/_squadron.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAI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