@mneme-ai/mcp 1.17.5 → 1.18.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/README.md +64 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -8
- package/dist/index.js.map +1 -1
- package/dist/mcp_primitives/completion.d.ts +19 -0
- package/dist/mcp_primitives/completion.d.ts.map +1 -0
- package/dist/mcp_primitives/completion.js +55 -0
- package/dist/mcp_primitives/completion.js.map +1 -0
- package/dist/mcp_primitives/prompts.d.ts +36 -0
- package/dist/mcp_primitives/prompts.d.ts.map +1 -0
- package/dist/mcp_primitives/prompts.js +140 -0
- package/dist/mcp_primitives/prompts.js.map +1 -0
- package/dist/mcp_primitives/resources.d.ts +30 -0
- package/dist/mcp_primitives/resources.d.ts.map +1 -0
- package/dist/mcp_primitives/resources.js +112 -0
- package/dist/mcp_primitives/resources.js.map +1 -0
- package/dist/tools/_aletheia.d.ts +82 -0
- package/dist/tools/_aletheia.d.ts.map +1 -0
- package/dist/tools/_aletheia.js +800 -0
- package/dist/tools/_aletheia.js.map +1 -0
- package/dist/tools/_confess.d.ts +67 -0
- package/dist/tools/_confess.d.ts.map +1 -0
- package/dist/tools/_confess.js +260 -0
- package/dist/tools/_confess.js.map +1 -0
- package/dist/tools/_confess.test.d.ts +6 -0
- package/dist/tools/_confess.test.d.ts.map +1 -0
- package/dist/tools/_confess.test.js +96 -0
- package/dist/tools/_confess.test.js.map +1 -0
- package/dist/tools/_contract.test.d.ts +19 -0
- package/dist/tools/_contract.test.d.ts.map +1 -0
- package/dist/tools/_contract.test.js +117 -0
- package/dist/tools/_contract.test.js.map +1 -0
- package/dist/tools/_court.d.ts +57 -0
- package/dist/tools/_court.d.ts.map +1 -0
- package/dist/tools/_court.js +261 -0
- package/dist/tools/_court.js.map +1 -0
- package/dist/tools/_court.test.d.ts +8 -0
- package/dist/tools/_court.test.d.ts.map +1 -0
- package/dist/tools/_court.test.js +111 -0
- package/dist/tools/_court.test.js.map +1 -0
- package/dist/tools/_genome_marketplace.d.ts +83 -0
- package/dist/tools/_genome_marketplace.d.ts.map +1 -0
- package/dist/tools/_genome_marketplace.js +410 -0
- package/dist/tools/_genome_marketplace.js.map +1 -0
- package/dist/tools/_genome_marketplace.test.d.ts +5 -0
- package/dist/tools/_genome_marketplace.test.d.ts.map +1 -0
- package/dist/tools/_genome_marketplace.test.js +157 -0
- package/dist/tools/_genome_marketplace.test.js.map +1 -0
- package/dist/tools/_mesh.d.ts +51 -0
- package/dist/tools/_mesh.d.ts.map +1 -0
- package/dist/tools/_mesh.js +182 -0
- package/dist/tools/_mesh.js.map +1 -0
- package/dist/tools/_registry.d.ts.map +1 -1
- package/dist/tools/_registry.js +17 -0
- package/dist/tools/_registry.js.map +1 -1
- package/dist/tools/_replay.d.ts +52 -0
- package/dist/tools/_replay.d.ts.map +1 -0
- package/dist/tools/_replay.js +253 -0
- package/dist/tools/_replay.js.map +1 -0
- package/dist/tools/_replay.test.d.ts +5 -0
- package/dist/tools/_replay.test.d.ts.map +1 -0
- package/dist/tools/_replay.test.js +90 -0
- package/dist/tools/_replay.test.js.map +1 -0
- package/dist/tools/_timetravel.d.ts +46 -0
- package/dist/tools/_timetravel.d.ts.map +1 -0
- package/dist/tools/_timetravel.js +243 -0
- package/dist/tools/_timetravel.js.map +1 -0
- package/dist/tools/_timetravel.test.d.ts +7 -0
- package/dist/tools/_timetravel.test.d.ts.map +1 -0
- package/dist/tools/_timetravel.test.js +31 -0
- package/dist/tools/_timetravel.test.js.map +1 -0
- package/dist/tools/_tool_meta.d.ts +30 -0
- package/dist/tools/_tool_meta.d.ts.map +1 -0
- package/dist/tools/_tool_meta.js +530 -0
- package/dist/tools/_tool_meta.js.map +1 -0
- package/dist/tools/_types.d.ts +46 -5
- package/dist/tools/_types.d.ts.map +1 -1
- package/dist/tools/_types.js.map +1 -1
- package/dist/tools/_verify_claims_tool.d.ts.map +1 -1
- package/dist/tools/_verify_claims_tool.js +23 -0
- package/dist/tools/_verify_claims_tool.js.map +1 -1
- package/dist/tools/audit.d.ts.map +1 -1
- package/dist/tools/audit.js +37 -0
- package/dist/tools/audit.js.map +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +23 -0
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/quant.d.ts +10 -2
- package/dist/tools/quant.d.ts.map +1 -1
- package/dist/tools/quant.js +311 -18
- package/dist/tools/quant.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP `resources` primitive — Mneme exposes 5 read-only views agents can
|
|
3
|
+
* fetch (and, eventually, subscribe to for change notifications):
|
|
4
|
+
*
|
|
5
|
+
* • mneme://constitution — repo's auto-synthesized rules
|
|
6
|
+
* • mneme://catalog — full tool catalog (JSON)
|
|
7
|
+
* • mneme://catalog/{category} — one category of tools
|
|
8
|
+
* • mneme://atrophy/heatmap — current atrophy snapshot
|
|
9
|
+
* • mneme://passport/{email} — engineer dossier
|
|
10
|
+
* • mneme://chronicle/latest — latest chaptered narrative
|
|
11
|
+
* • mneme://aletheia/karma — public tool reputation ledger
|
|
12
|
+
*
|
|
13
|
+
* v1.18.0 ships static / on-demand resources. Subscriptions + push updates
|
|
14
|
+
* (Mneme Whisper) land in v1.19.
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
17
|
+
import { join } from "node:path";
|
|
18
|
+
import { buildAllTools, groupByCategory } from "../tools/_registry.js";
|
|
19
|
+
const STATIC_RESOURCES = [
|
|
20
|
+
{
|
|
21
|
+
uri: "mneme://catalog",
|
|
22
|
+
name: "Mneme tool catalog (full)",
|
|
23
|
+
mimeType: "application/json",
|
|
24
|
+
description: "Every Mneme tool: name, category, description, contract fields. Same data mneme.capabilities returns.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
uri: "mneme://constitution",
|
|
28
|
+
name: "Repo constitution (auto-synthesized rules)",
|
|
29
|
+
mimeType: "text/markdown",
|
|
30
|
+
description: "The rule library Mneme infers from this repo's regrets, atrophy, and security history.",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
uri: "mneme://aletheia/karma",
|
|
34
|
+
name: "ALETHEIA tool reputation ledger",
|
|
35
|
+
mimeType: "application/json",
|
|
36
|
+
description: "Per-tool karma score (verified +1, hallucination -3, fuzz hit -2). Public + auditable.",
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
export function listResources(rt) {
|
|
40
|
+
const out = [...STATIC_RESOURCES];
|
|
41
|
+
for (const cat of groupByCategory().keys()) {
|
|
42
|
+
out.push({
|
|
43
|
+
uri: `mneme://catalog/${cat}`,
|
|
44
|
+
name: `Mneme tool catalog — ${cat}`,
|
|
45
|
+
mimeType: "application/json",
|
|
46
|
+
description: `Tools in the ${cat} category.`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Per-passport resources are listed lazily — listing every author would
|
|
50
|
+
// bloat the catalog. Agents fetch via mneme://passport/{email} directly.
|
|
51
|
+
out.push({
|
|
52
|
+
uri: "mneme://passport/{email}",
|
|
53
|
+
name: "Engineer passport (template URI)",
|
|
54
|
+
mimeType: "application/json",
|
|
55
|
+
description: "Replace {email} with an author's email to fetch their dossier (DNA + expertise + telepathy + influence + atrophy).",
|
|
56
|
+
});
|
|
57
|
+
// Suppress unused-runtime warning at compile time — kept for future use.
|
|
58
|
+
void rt;
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
export function readResource(rt, uri) {
|
|
62
|
+
if (uri === "mneme://catalog") {
|
|
63
|
+
const all = buildAllTools().map((t) => ({
|
|
64
|
+
name: t.name,
|
|
65
|
+
category: t.category,
|
|
66
|
+
description: t.description,
|
|
67
|
+
whenToUse: t.whenToUse ?? null,
|
|
68
|
+
inputSchema: t.inputSchema,
|
|
69
|
+
outputSchema: t.outputSchema ?? null,
|
|
70
|
+
}));
|
|
71
|
+
return { uri, mimeType: "application/json", text: JSON.stringify(all, null, 2) };
|
|
72
|
+
}
|
|
73
|
+
if (uri.startsWith("mneme://catalog/")) {
|
|
74
|
+
const cat = uri.slice("mneme://catalog/".length);
|
|
75
|
+
const tools = (groupByCategory().get(cat) ?? []).map((t) => ({
|
|
76
|
+
name: t.name,
|
|
77
|
+
description: t.description,
|
|
78
|
+
whenToUse: t.whenToUse ?? null,
|
|
79
|
+
}));
|
|
80
|
+
return { uri, mimeType: "application/json", text: JSON.stringify(tools, null, 2) };
|
|
81
|
+
}
|
|
82
|
+
if (uri === "mneme://constitution") {
|
|
83
|
+
const path = join(rt.meta.rootPath, ".mneme", "constitution.md");
|
|
84
|
+
if (existsSync(path)) {
|
|
85
|
+
return { uri, mimeType: "text/markdown", text: readFileSync(path, "utf8") };
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
uri,
|
|
89
|
+
mimeType: "text/markdown",
|
|
90
|
+
text: "# Constitution not yet synthesized\n\n" +
|
|
91
|
+
"Run `mneme constitution synth` to derive a rule library from this repo's history.",
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (uri === "mneme://aletheia/karma") {
|
|
95
|
+
const path = join(rt.meta.rootPath, ".mneme", "aletheia", "karma.json");
|
|
96
|
+
if (existsSync(path)) {
|
|
97
|
+
return { uri, mimeType: "application/json", text: readFileSync(path, "utf8") };
|
|
98
|
+
}
|
|
99
|
+
return { uri, mimeType: "application/json", text: JSON.stringify({ tools: {} }, null, 2) };
|
|
100
|
+
}
|
|
101
|
+
if (uri.startsWith("mneme://passport/")) {
|
|
102
|
+
return {
|
|
103
|
+
uri,
|
|
104
|
+
mimeType: "application/json",
|
|
105
|
+
text: JSON.stringify({
|
|
106
|
+
note: "Passport resources are fetched on-demand from the index. Use the mneme.people.passport tool with the author's email — this URI is a placeholder for v1.19+ live binding.",
|
|
107
|
+
}, null, 2),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
throw new Error(`unknown resource URI: ${uri}`);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/mcp_primitives/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAgBvE,MAAM,gBAAgB,GAA0B;IAC9C;QACE,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,2BAA2B;QACjC,QAAQ,EAAE,kBAAkB;QAC5B,WAAW,EAAE,uGAAuG;KACrH;IACD;QACE,GAAG,EAAE,sBAAsB;QAC3B,IAAI,EAAE,4CAA4C;QAClD,QAAQ,EAAE,eAAe;QACzB,WAAW,EAAE,wFAAwF;KACtG;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,IAAI,EAAE,iCAAiC;QACvC,QAAQ,EAAE,kBAAkB;QAC5B,WAAW,EAAE,wFAAwF;KACtG;CACF,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,EAAe;IAC3C,MAAM,GAAG,GAA0B,CAAC,GAAG,gBAAgB,CAAC,CAAC;IACzD,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3C,GAAG,CAAC,IAAI,CAAC;YACP,GAAG,EAAE,mBAAmB,GAAG,EAAE;YAC7B,IAAI,EAAE,wBAAwB,GAAG,EAAE;YACnC,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,gBAAgB,GAAG,YAAY;SAC7C,CAAC,CAAC;IACL,CAAC;IACD,wEAAwE;IACxE,yEAAyE;IACzE,GAAG,CAAC,IAAI,CAAC;QACP,GAAG,EAAE,0BAA0B;QAC/B,IAAI,EAAE,kCAAkC;QACxC,QA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aAC7K,EACD,IAAI,EACJ,CAAC,CACF;SACF,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALETHEIA — open MCP security framework, reference impl in Mneme.
|
|
3
|
+
* (Greek ἀλήθεια — "the state of not being hidden, disclosure, truth".
|
|
4
|
+
* Pairs with Mneme/Memory: Memory + Truth = MCP defense.)
|
|
5
|
+
*
|
|
6
|
+
* Inspired by the Equixly assessment showing 43% of MCP servers have
|
|
7
|
+
* command-injection holes, 30% have SSRF, 22% allow arbitrary file
|
|
8
|
+
* access. Mneme adopts a biological-immune-system metaphor — atom and
|
|
9
|
+
* molecule architecture lets us EVOLVE defenses, not hard-code them.
|
|
10
|
+
*
|
|
11
|
+
* The ALETHEIA spec is intentionally portable. Other MCP server
|
|
12
|
+
* implementations can adopt the same tool names + semantics + response
|
|
13
|
+
* shapes; clients then get one consistent security surface across
|
|
14
|
+
* vendors. v1.18.0 ships:
|
|
15
|
+
*
|
|
16
|
+
* • mneme.aletheia.honeypot — register decoy "admin" tools any
|
|
17
|
+
* legitimate AI would never call. ANY
|
|
18
|
+
* call is logged + treated as attacker.
|
|
19
|
+
* • mneme.aletheia.immune.scan — Bayesian anomaly scan of recent calls
|
|
20
|
+
* against the learned "normal" profile.
|
|
21
|
+
* • mneme.aletheia.immune.train — record a baseline of normal arg shapes
|
|
22
|
+
* for future anomaly detection.
|
|
23
|
+
* • mneme.aletheia.lint — actively scan tool input args for
|
|
24
|
+
* command injection, SSRF, path
|
|
25
|
+
* traversal, and arbitrary-file-access
|
|
26
|
+
* attempts (returns findings without
|
|
27
|
+
* blocking — defense in depth, not
|
|
28
|
+
* replacement of input validation).
|
|
29
|
+
*
|
|
30
|
+
* Honeypot tools live in the registry like any other tool but their
|
|
31
|
+
* handlers ALWAYS emit an alert + return a fake-but-plausible response
|
|
32
|
+
* to waste an attacker's time.
|
|
33
|
+
*
|
|
34
|
+
* The training data lives in `.mneme/immune/profile.json` — argument
|
|
35
|
+
* shape fingerprints + frequency, per tool. New calls compute a posterior:
|
|
36
|
+
* P(legit | shape) = P(shape | legit) × P(legit) / P(shape)
|
|
37
|
+
* with Laplace smoothing. Posterior < 0.05 → ALERT (anomalous).
|
|
38
|
+
*/
|
|
39
|
+
import type { MnemeTool } from "./_types.js";
|
|
40
|
+
/** Compute a stable shape fingerprint of an argument value — the SHAPE
|
|
41
|
+
* (types, lengths, key sets) without the actual content. Two calls with
|
|
42
|
+
* the same shape but different content produce the same fingerprint. */
|
|
43
|
+
export declare function shapeFingerprint(value: unknown): string;
|
|
44
|
+
export interface SecurityFinding {
|
|
45
|
+
kind: "command-injection" | "ssrf" | "path-traversal" | "file-access" | "secret-leak";
|
|
46
|
+
severity: "low" | "medium" | "high" | "critical";
|
|
47
|
+
tool: string;
|
|
48
|
+
argPath: string;
|
|
49
|
+
match: string;
|
|
50
|
+
remediation: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function lintArgValue(value: unknown, toolName: string, argPath?: string): SecurityFinding[];
|
|
53
|
+
interface ImmuneProfile {
|
|
54
|
+
/** tool → fingerprint → count */
|
|
55
|
+
shapes: Record<string, Record<string, number>>;
|
|
56
|
+
/** tool → total observations */
|
|
57
|
+
totals: Record<string, number>;
|
|
58
|
+
trainedAt?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare function readProfile(repoRoot: string): ImmuneProfile;
|
|
61
|
+
export declare function writeProfile(repoRoot: string, p: ImmuneProfile): void;
|
|
62
|
+
/** Update the profile with a new observation. Idempotent + best-effort. */
|
|
63
|
+
export declare function recordObservation(repoRoot: string, tool: string, args: unknown): void;
|
|
64
|
+
/** Bayesian posterior P(legit | observed shape) using Laplace smoothing.
|
|
65
|
+
* Returns 1.0 for completely-trusted shapes, drops toward 0 for novel ones. */
|
|
66
|
+
export declare function posteriorLegit(profile: ImmuneProfile, tool: string, args: unknown): number;
|
|
67
|
+
export declare function logAlert(repoRoot: string, alert: Record<string, unknown>): void;
|
|
68
|
+
export declare function readAlerts(repoRoot: string, limit?: number): Array<Record<string, unknown>>;
|
|
69
|
+
export declare const honeypotTools: MnemeTool[];
|
|
70
|
+
export declare const securityLintTool: MnemeTool;
|
|
71
|
+
export declare const immuneScanTool: MnemeTool;
|
|
72
|
+
export declare const immuneTrainTool: MnemeTool;
|
|
73
|
+
export declare const immuneAlertsTool: MnemeTool;
|
|
74
|
+
export type KarmaEvent = "verified" | "partially_verified" | "hallucination" | "fuzz-hit" | "invocation";
|
|
75
|
+
/** Apply a karma event to a tool. Best-effort. Returns the new karma. */
|
|
76
|
+
export declare function recordKarmaEvent(repoRoot: string, tool: string, event: KarmaEvent): number;
|
|
77
|
+
export declare const aletheiaKarmaTool: MnemeTool;
|
|
78
|
+
export declare const aletheiaFuzzTool: MnemeTool;
|
|
79
|
+
/** Real (non-honeypot) ALETHEIA tools. */
|
|
80
|
+
export declare const aletheiaTools: MnemeTool[];
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=_aletheia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_aletheia.d.ts","sourceRoot":"","sources":["../../src/tools/_aletheia.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAS7C;;yEAEyE;AACzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGvD;AAyBD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,gBAAgB,GAAG,aAAa,GAAG,aAAa,CAAC;IACtF,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAA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