@mneme-ai/core 2.19.13 → 2.19.15

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 (51) hide show
  1. package/dist/chimera_embedder/chimera_embedder.test.d.ts +2 -0
  2. package/dist/chimera_embedder/chimera_embedder.test.d.ts.map +1 -0
  3. package/dist/chimera_embedder/chimera_embedder.test.js +158 -0
  4. package/dist/chimera_embedder/chimera_embedder.test.js.map +1 -0
  5. package/dist/chimera_embedder/index.d.ts +92 -0
  6. package/dist/chimera_embedder/index.d.ts.map +1 -0
  7. package/dist/chimera_embedder/index.js +157 -0
  8. package/dist/chimera_embedder/index.js.map +1 -0
  9. package/dist/cli_dreams/cli_dreams.test.d.ts +2 -0
  10. package/dist/cli_dreams/cli_dreams.test.d.ts.map +1 -0
  11. package/dist/cli_dreams/cli_dreams.test.js +161 -0
  12. package/dist/cli_dreams/cli_dreams.test.js.map +1 -0
  13. package/dist/cli_dreams/index.d.ts +124 -0
  14. package/dist/cli_dreams/index.d.ts.map +1 -0
  15. package/dist/cli_dreams/index.js +205 -0
  16. package/dist/cli_dreams/index.js.map +1 -0
  17. package/dist/consequence_ledger/consequence_ledger.test.d.ts +2 -0
  18. package/dist/consequence_ledger/consequence_ledger.test.d.ts.map +1 -0
  19. package/dist/consequence_ledger/consequence_ledger.test.js +140 -0
  20. package/dist/consequence_ledger/consequence_ledger.test.js.map +1 -0
  21. package/dist/consequence_ledger/index.d.ts +114 -0
  22. package/dist/consequence_ledger/index.d.ts.map +1 -0
  23. package/dist/consequence_ledger/index.js +234 -0
  24. package/dist/consequence_ledger/index.js.map +1 -0
  25. package/dist/cosmic/aurelian_v1914.test.d.ts +2 -0
  26. package/dist/cosmic/aurelian_v1914.test.d.ts.map +1 -0
  27. package/dist/cosmic/aurelian_v1914.test.js +59 -0
  28. package/dist/cosmic/aurelian_v1914.test.js.map +1 -0
  29. package/dist/cosmic/aurelian_v1915.test.d.ts +2 -0
  30. package/dist/cosmic/aurelian_v1915.test.d.ts.map +1 -0
  31. package/dist/cosmic/aurelian_v1915.test.js +34 -0
  32. package/dist/cosmic/aurelian_v1915.test.js.map +1 -0
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +4 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/truth_forensic_pipeline/index.d.ts +133 -0
  38. package/dist/truth_forensic_pipeline/index.d.ts.map +1 -0
  39. package/dist/truth_forensic_pipeline/index.js +346 -0
  40. package/dist/truth_forensic_pipeline/index.js.map +1 -0
  41. package/dist/truth_forensic_pipeline/truth_forensic_pipeline.test.d.ts +2 -0
  42. package/dist/truth_forensic_pipeline/truth_forensic_pipeline.test.d.ts.map +1 -0
  43. package/dist/truth_forensic_pipeline/truth_forensic_pipeline.test.js +256 -0
  44. package/dist/truth_forensic_pipeline/truth_forensic_pipeline.test.js.map +1 -0
  45. package/dist/whats_new.d.ts.map +1 -1
  46. package/dist/whats_new.js +16 -0
  47. package/dist/whats_new.js.map +1 -1
  48. package/dist/wrapper_genesis/index.d.ts.map +1 -1
  49. package/dist/wrapper_genesis/index.js +16 -0
  50. package/dist/wrapper_genesis/index.js.map +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,133 @@
1
+ /**
2
+ * v2.19.15 — MNEME TRUTH FORENSIC PIPELINE (the verify command that calls its own bluff)
3
+ *
4
+ * "Every AI verify tool today asks the wrong question: 'is this claim
5
+ * supported?'. It scrapes the codebase for keyword matches and rubber-
6
+ * stamps anything that has a hit. When the claim says 'Mneme registers
7
+ * 4 mneme.nexus.* tools', it sees the words 'mneme' and 'tools' in
8
+ * the codebase and certifies TRUSTWORTHY — even if the actual count
9
+ * is 0. This is the W2 disease.
10
+ *
11
+ * Mneme's TRUTH FORENSIC PIPELINE inverts the question: 'what would
12
+ * REFUTE this claim, and have we searched + failed to find every
13
+ * refutation?'. For the AI-tool-self-description class (which is the
14
+ * most common verify target for AI agents) we ship a SNIFFER that
15
+ * extracts verifiable assertions (mneme.X.Y exists, 'N mneme.X.*
16
+ * tools', 'ships M MCP tools', version=X) and CHECKS them against
17
+ * Mneme's own ground truth (the live MCP catalog + installed version).
18
+ *
19
+ * For self-description claims, the pipeline is VENDOR-AGNOSTIC AND
20
+ * OFFLINE — no LLM call needed. For generic claims, it composes onto
21
+ * INVERSE-LLM (v2.19.3) + NEGATIVE-EVIDENCE (v2.19.13) for the same
22
+ * burden-of-proof inversion. The W2 lie becomes structurally
23
+ * impossible."
24
+ *
25
+ * Architecture:
26
+ * - 5 built-in SNIFFERS that extract verifiable assertions from claim text:
27
+ * • sniffMcpToolExact: "ships mneme.X.Y" / "registers mneme.X.Y"
28
+ * • sniffMcpFamilyCount: "N mneme.X.* tools"
29
+ * • sniffMcpTotalCount: "ships N MCP tools" / "N tools total"
30
+ * • sniffVersion: "v2.19.X" / "version 2.19.X"
31
+ * • sniffFilePath: "the file packages/.../foo.ts"
32
+ * - `forensicVerify({claim, mcpCatalog, installedVersion, ...})` —
33
+ * parse assertions → check each against ground truth → apply
34
+ * negative-evidence rules → issue HMAC-signed certificate.
35
+ * - Verdict bands: ACCEPTED + cert / REJECTED + defeating evidence /
36
+ * UNKNOWN + untested assertions.
37
+ *
38
+ * Honest scope:
39
+ * - Built-in sniffers cover AI-tool-self-description claims (the W2
40
+ * class). For generic factual claims, caller supplies refutations +
41
+ * search outcomes (composes onto v2.19.13 NEGATIVE-EVIDENCE).
42
+ * - "ACCEPTED" means every SNIFFED assertion grounded. Untested
43
+ * unsniffable claim text doesn't auto-accept — it returns UNKNOWN
44
+ * unless caller supplies vendor refutations + searches.
45
+ * - Certificate is HMAC-signed so a forged verdict is detectable.
46
+ */
47
+ declare const PROTOCOL_VERSION: 1;
48
+ export type AssertionKind = "mcp_tool_exact" | "mcp_family_count" | "mcp_total_count" | "version_exact" | "file_path";
49
+ export interface FactAssertion {
50
+ kind: AssertionKind;
51
+ /** Human-readable rendering of the assertion. */
52
+ asserted: string;
53
+ /** Structured value for ground-truth lookup. */
54
+ value: unknown;
55
+ }
56
+ export type AssertionSubVerdict = "supported" | "refuted" | "untested";
57
+ export interface AssertionResult {
58
+ kind: AssertionKind;
59
+ asserted: string;
60
+ sub_verdict: AssertionSubVerdict;
61
+ evidence?: string;
62
+ observed?: unknown;
63
+ expected?: unknown;
64
+ }
65
+ export type ForensicVerdict = "ACCEPTED" | "REJECTED" | "UNKNOWN";
66
+ export interface ForensicCertificate {
67
+ v: typeof PROTOCOL_VERSION;
68
+ claim: string;
69
+ claimSha: string;
70
+ assertions: AssertionResult[];
71
+ verdict: ForensicVerdict;
72
+ ts: number;
73
+ hmac: string;
74
+ }
75
+ export interface ForensicResult {
76
+ verdict: ForensicVerdict;
77
+ claim: string;
78
+ assertions: AssertionResult[];
79
+ /** Set when verdict='REJECTED' — the assertion(s) whose ground-truth refuted. */
80
+ refutedAssertions: AssertionResult[];
81
+ /** Set when verdict='UNKNOWN' — claim had no sniffable assertions and no caller-supplied refutations. */
82
+ untested?: boolean;
83
+ certificate: ForensicCertificate;
84
+ /** Plain-English explanation safe to show non-engineers. */
85
+ explanation: string;
86
+ }
87
+ /** Extract exact `mneme.X.Y` tool-name mentions from claim text. */
88
+ export declare function sniffMcpToolExact(claim: string): FactAssertion[];
89
+ /** Extract "N mneme.X.* tools" family-count assertions. */
90
+ export declare function sniffMcpFamilyCount(claim: string): FactAssertion[];
91
+ /** Extract "ships N MCP tools" / "N tools total" claims. */
92
+ export declare function sniffMcpTotalCount(claim: string): FactAssertion[];
93
+ /** Extract "v2.19.X" / "version 2.19.X" version claims. */
94
+ export declare function sniffVersion(claim: string): FactAssertion[];
95
+ /** Extract file paths mentioned in claim. */
96
+ export declare function sniffFilePath(claim: string): FactAssertion[];
97
+ export declare function sniffAllAssertions(claim: string): FactAssertion[];
98
+ export interface GroundTruth {
99
+ mcpCatalog?: string[];
100
+ installedVersion?: string;
101
+ fileExists?: (path: string) => boolean;
102
+ }
103
+ export interface ForensicInput {
104
+ claim: string;
105
+ groundTruth?: GroundTruth;
106
+ /** Optional caller-supplied generic refutations (composes with v2.19.13 NEGATIVE-EVIDENCE). */
107
+ externalRefutationsFound?: number;
108
+ nowMs?: number;
109
+ secret?: string;
110
+ }
111
+ /**
112
+ * Run the full forensic pipeline:
113
+ * 1. Sniff assertions from claim text.
114
+ * 2. Check each against ground truth.
115
+ * 3. Apply negative-evidence rule:
116
+ * ANY assertion 'refuted' → REJECTED
117
+ * else ALL assertions 'supported' → ACCEPTED
118
+ * else (some 'untested' / no sniff hits) → UNKNOWN
119
+ * 4. Issue HMAC-signed certificate.
120
+ * 5. Produce plain-English explanation.
121
+ */
122
+ export declare function forensicVerify(input: ForensicInput): ForensicResult;
123
+ export declare function verifyForensicCertificate(cert: ForensicCertificate, secret?: string): {
124
+ ok: boolean;
125
+ reason?: string;
126
+ };
127
+ export declare function classifyClaim(claim: string): {
128
+ assertionsExpected: number;
129
+ classes: AssertionKind[];
130
+ };
131
+ export declare function formatForensicLine(r: ForensicResult): string;
132
+ export {};
133
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/truth_forensic_pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAIH,QAAA,MAAM,gBAAgB,EAAG,CAAU,CAAC;AAEpC,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,kBAAkB,GAClB,iBAAiB,GACjB,eAAe,GACf,WAAW,CAAC;AAEhB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa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,aAAa,EAAE,CAU5D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAQjE;AAID,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AA4FD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,+FAA+F;IAC/F,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAqDnE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAOtH;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAC5C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B,CAIA;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,CAM5D"}
@@ -0,0 +1,346 @@
1
+ /**
2
+ * v2.19.15 — MNEME TRUTH FORENSIC PIPELINE (the verify command that calls its own bluff)
3
+ *
4
+ * "Every AI verify tool today asks the wrong question: 'is this claim
5
+ * supported?'. It scrapes the codebase for keyword matches and rubber-
6
+ * stamps anything that has a hit. When the claim says 'Mneme registers
7
+ * 4 mneme.nexus.* tools', it sees the words 'mneme' and 'tools' in
8
+ * the codebase and certifies TRUSTWORTHY — even if the actual count
9
+ * is 0. This is the W2 disease.
10
+ *
11
+ * Mneme's TRUTH FORENSIC PIPELINE inverts the question: 'what would
12
+ * REFUTE this claim, and have we searched + failed to find every
13
+ * refutation?'. For the AI-tool-self-description class (which is the
14
+ * most common verify target for AI agents) we ship a SNIFFER that
15
+ * extracts verifiable assertions (mneme.X.Y exists, 'N mneme.X.*
16
+ * tools', 'ships M MCP tools', version=X) and CHECKS them against
17
+ * Mneme's own ground truth (the live MCP catalog + installed version).
18
+ *
19
+ * For self-description claims, the pipeline is VENDOR-AGNOSTIC AND
20
+ * OFFLINE — no LLM call needed. For generic claims, it composes onto
21
+ * INVERSE-LLM (v2.19.3) + NEGATIVE-EVIDENCE (v2.19.13) for the same
22
+ * burden-of-proof inversion. The W2 lie becomes structurally
23
+ * impossible."
24
+ *
25
+ * Architecture:
26
+ * - 5 built-in SNIFFERS that extract verifiable assertions from claim text:
27
+ * • sniffMcpToolExact: "ships mneme.X.Y" / "registers mneme.X.Y"
28
+ * • sniffMcpFamilyCount: "N mneme.X.* tools"
29
+ * • sniffMcpTotalCount: "ships N MCP tools" / "N tools total"
30
+ * • sniffVersion: "v2.19.X" / "version 2.19.X"
31
+ * • sniffFilePath: "the file packages/.../foo.ts"
32
+ * - `forensicVerify({claim, mcpCatalog, installedVersion, ...})` —
33
+ * parse assertions → check each against ground truth → apply
34
+ * negative-evidence rules → issue HMAC-signed certificate.
35
+ * - Verdict bands: ACCEPTED + cert / REJECTED + defeating evidence /
36
+ * UNKNOWN + untested assertions.
37
+ *
38
+ * Honest scope:
39
+ * - Built-in sniffers cover AI-tool-self-description claims (the W2
40
+ * class). For generic factual claims, caller supplies refutations +
41
+ * search outcomes (composes onto v2.19.13 NEGATIVE-EVIDENCE).
42
+ * - "ACCEPTED" means every SNIFFED assertion grounded. Untested
43
+ * unsniffable claim text doesn't auto-accept — it returns UNKNOWN
44
+ * unless caller supplies vendor refutations + searches.
45
+ * - Certificate is HMAC-signed so a forged verdict is detectable.
46
+ */
47
+ import { createHmac, timingSafeEqual } from "node:crypto";
48
+ const PROTOCOL_VERSION = 1;
49
+ function canon(v) {
50
+ if (v === null || typeof v !== "object")
51
+ return JSON.stringify(v);
52
+ if (Array.isArray(v))
53
+ return "[" + v.map(canon).join(",") + "]";
54
+ const keys = Object.keys(v).sort();
55
+ return "{" + keys.map((k) => JSON.stringify(k) + ":" + canon(v[k])).join(",") + "}";
56
+ }
57
+ function defaultSecret() {
58
+ return process.env["MNEME_TRUTH_SECRET"] || `mneme-truth-forensic-v${PROTOCOL_VERSION}`;
59
+ }
60
+ function sha256Hex(s) {
61
+ return createHmac("sha256", "mneme-truth-claim-id").update(s).digest("hex");
62
+ }
63
+ function signCertificate(body, secret) {
64
+ return createHmac("sha256", secret).update(canon(body)).digest("hex");
65
+ }
66
+ function safeEqHex(a, b) {
67
+ try {
68
+ return timingSafeEqual(Buffer.from(a, "hex"), Buffer.from(b, "hex"));
69
+ }
70
+ catch {
71
+ return false;
72
+ }
73
+ }
74
+ // ─── SNIFFERS ────────────────────────────────────────────────────────────
75
+ /** Extract exact `mneme.X.Y` tool-name mentions from claim text. */
76
+ export function sniffMcpToolExact(claim) {
77
+ const re = /\bmneme\.[a-z_][a-z0-9_]*\.[a-z_][a-z0-9_]*\b/g;
78
+ const hits = new Set();
79
+ let m;
80
+ while ((m = re.exec(claim)) !== null)
81
+ hits.add(m[0]);
82
+ return Array.from(hits).map((name) => ({
83
+ kind: "mcp_tool_exact",
84
+ asserted: `MCP tool '${name}' is registered`,
85
+ value: { toolName: name },
86
+ }));
87
+ }
88
+ /** Extract "N mneme.X.* tools" family-count assertions. */
89
+ export function sniffMcpFamilyCount(claim) {
90
+ const re = /\b(\d+)\s+mneme\.([a-z_][a-z0-9_]*)\.(\*|tools?)\s*(?:mcp\s+)?(?:tools?)?/gi;
91
+ const re2 = /\bregisters?\s+(\d+)\s+mneme\.([a-z_][a-z0-9_]*)\.\*/gi;
92
+ const hits = new Map();
93
+ for (const r of [re, re2]) {
94
+ let m;
95
+ while ((m = r.exec(claim)) !== null) {
96
+ const n = parseInt(m[1], 10);
97
+ const family = m[2].toLowerCase();
98
+ // Last-wins per family (claim might restate)
99
+ hits.set(family, n);
100
+ }
101
+ }
102
+ return Array.from(hits.entries()).map(([family, n]) => ({
103
+ kind: "mcp_family_count",
104
+ asserted: `MCP family 'mneme.${family}.*' has exactly ${n} tools`,
105
+ value: { family, expectedCount: n },
106
+ }));
107
+ }
108
+ /** Extract "ships N MCP tools" / "N tools total" claims. */
109
+ export function sniffMcpTotalCount(claim) {
110
+ const patterns = [
111
+ /\bships?\s+(\d+)\s+mcp\s+tools?\b/i,
112
+ /\b(\d+)\s+(?:total\s+)?mcp\s+tools?\b/i,
113
+ /\bregisters?\s+(\d+)\s+(?:total\s+)?mcp\s+tools?\b/i,
114
+ /\b(\d+)\s+tools?\s+total\b/i,
115
+ ];
116
+ for (const re of patterns) {
117
+ const m = claim.match(re);
118
+ if (m) {
119
+ const n = parseInt(m[1], 10);
120
+ return [{
121
+ kind: "mcp_total_count",
122
+ asserted: `Mneme ships exactly ${n} MCP tools total`,
123
+ value: { expectedCount: n },
124
+ }];
125
+ }
126
+ }
127
+ return [];
128
+ }
129
+ /** Extract "v2.19.X" / "version 2.19.X" version claims. */
130
+ export function sniffVersion(claim) {
131
+ const re = /\bv?(\d+\.\d+\.\d+)\b/g;
132
+ const hits = new Set();
133
+ let m;
134
+ while ((m = re.exec(claim)) !== null)
135
+ hits.add(m[1]);
136
+ return Array.from(hits).map((ver) => ({
137
+ kind: "version_exact",
138
+ asserted: `installed version equals ${ver}`,
139
+ value: { version: ver },
140
+ }));
141
+ }
142
+ /** Extract file paths mentioned in claim. */
143
+ export function sniffFilePath(claim) {
144
+ const re = /\b((?:packages|scripts|tests|src)\/[\w./-]+\.(?:ts|tsx|js|mjs|cjs|md|json|mdx))\b/g;
145
+ const hits = new Set();
146
+ let m;
147
+ while ((m = re.exec(claim)) !== null)
148
+ hits.add(m[1]);
149
+ return Array.from(hits).map((p) => ({
150
+ kind: "file_path",
151
+ asserted: `file '${p}' exists`,
152
+ value: { path: p },
153
+ }));
154
+ }
155
+ export function sniffAllAssertions(claim) {
156
+ return [
157
+ ...sniffMcpToolExact(claim),
158
+ ...sniffMcpFamilyCount(claim),
159
+ ...sniffMcpTotalCount(claim),
160
+ ...sniffVersion(claim),
161
+ ...sniffFilePath(claim),
162
+ ];
163
+ }
164
+ function checkAssertion(a, gt) {
165
+ if (a.kind === "mcp_tool_exact") {
166
+ const v = a.value;
167
+ if (!gt.mcpCatalog) {
168
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "no mcpCatalog supplied to checker" };
169
+ }
170
+ const found = gt.mcpCatalog.includes(v.toolName);
171
+ return {
172
+ kind: a.kind,
173
+ asserted: a.asserted,
174
+ sub_verdict: found ? "supported" : "refuted",
175
+ evidence: found ? `tool '${v.toolName}' is in the live MCP catalog` : `tool '${v.toolName}' NOT FOUND in the live MCP catalog (${gt.mcpCatalog.length} tools registered)`,
176
+ observed: found,
177
+ expected: true,
178
+ };
179
+ }
180
+ if (a.kind === "mcp_family_count") {
181
+ const v = a.value;
182
+ if (!gt.mcpCatalog) {
183
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "no mcpCatalog supplied" };
184
+ }
185
+ const prefix = `mneme.${v.family}.`;
186
+ const actual = gt.mcpCatalog.filter((t) => t.startsWith(prefix)).length;
187
+ const supported = actual === v.expectedCount;
188
+ return {
189
+ kind: a.kind,
190
+ asserted: a.asserted,
191
+ sub_verdict: supported ? "supported" : "refuted",
192
+ evidence: supported
193
+ ? `live catalog has exactly ${actual} tools matching '${prefix}*'`
194
+ : `live catalog has ${actual} tools matching '${prefix}*', not ${v.expectedCount} — claim refuted`,
195
+ observed: actual,
196
+ expected: v.expectedCount,
197
+ };
198
+ }
199
+ if (a.kind === "mcp_total_count") {
200
+ const v = a.value;
201
+ if (!gt.mcpCatalog) {
202
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "no mcpCatalog supplied" };
203
+ }
204
+ const actual = gt.mcpCatalog.length;
205
+ const supported = actual === v.expectedCount;
206
+ return {
207
+ kind: a.kind,
208
+ asserted: a.asserted,
209
+ sub_verdict: supported ? "supported" : "refuted",
210
+ evidence: supported
211
+ ? `live catalog has exactly ${actual} tools`
212
+ : `live catalog has ${actual} tools, not ${v.expectedCount} — claim refuted`,
213
+ observed: actual,
214
+ expected: v.expectedCount,
215
+ };
216
+ }
217
+ if (a.kind === "version_exact") {
218
+ const v = a.value;
219
+ if (!gt.installedVersion) {
220
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "no installedVersion supplied" };
221
+ }
222
+ const supported = gt.installedVersion === v.version;
223
+ return {
224
+ kind: a.kind,
225
+ asserted: a.asserted,
226
+ sub_verdict: supported ? "supported" : "refuted",
227
+ evidence: supported
228
+ ? `installed version is ${gt.installedVersion}`
229
+ : `installed version is ${gt.installedVersion}, not ${v.version} — claim refuted`,
230
+ observed: gt.installedVersion,
231
+ expected: v.version,
232
+ };
233
+ }
234
+ if (a.kind === "file_path") {
235
+ const v = a.value;
236
+ if (!gt.fileExists) {
237
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "no fileExists checker supplied" };
238
+ }
239
+ const found = gt.fileExists(v.path);
240
+ return {
241
+ kind: a.kind,
242
+ asserted: a.asserted,
243
+ sub_verdict: found ? "supported" : "refuted",
244
+ evidence: found ? `file '${v.path}' exists on disk` : `file '${v.path}' does NOT exist — claim refuted`,
245
+ observed: found,
246
+ expected: true,
247
+ };
248
+ }
249
+ return { kind: a.kind, asserted: a.asserted, sub_verdict: "untested", evidence: "unknown assertion kind" };
250
+ }
251
+ /**
252
+ * Run the full forensic pipeline:
253
+ * 1. Sniff assertions from claim text.
254
+ * 2. Check each against ground truth.
255
+ * 3. Apply negative-evidence rule:
256
+ * ANY assertion 'refuted' → REJECTED
257
+ * else ALL assertions 'supported' → ACCEPTED
258
+ * else (some 'untested' / no sniff hits) → UNKNOWN
259
+ * 4. Issue HMAC-signed certificate.
260
+ * 5. Produce plain-English explanation.
261
+ */
262
+ export function forensicVerify(input) {
263
+ const ts = input.nowMs ?? Date.now();
264
+ const secret = input.secret ?? defaultSecret();
265
+ const assertions = sniffAllAssertions(input.claim);
266
+ const results = assertions.map((a) => checkAssertion(a, input.groundTruth ?? {}));
267
+ const refuted = results.filter((r) => r.sub_verdict === "refuted");
268
+ const supported = results.filter((r) => r.sub_verdict === "supported");
269
+ const untested = results.filter((r) => r.sub_verdict === "untested");
270
+ // Negative-evidence rule
271
+ let verdict;
272
+ if (refuted.length > 0)
273
+ verdict = "REJECTED";
274
+ else if ((input.externalRefutationsFound ?? 0) > 0)
275
+ verdict = "REJECTED";
276
+ else if (assertions.length > 0 && untested.length === 0)
277
+ verdict = "ACCEPTED";
278
+ else
279
+ verdict = "UNKNOWN";
280
+ const claimSha = sha256Hex(input.claim).slice(0, 32);
281
+ const certBody = {
282
+ v: PROTOCOL_VERSION,
283
+ claim: input.claim,
284
+ claimSha,
285
+ assertions: results,
286
+ verdict,
287
+ ts,
288
+ };
289
+ const cert = { ...certBody, hmac: signCertificate(certBody, secret) };
290
+ // Plain-English explanation
291
+ const lines = [];
292
+ if (verdict === "ACCEPTED") {
293
+ lines.push(`✅ TRUTH-FORENSIC verdict: ACCEPTED. Every assertion sniffed from the claim grounded against Mneme's live state.`);
294
+ for (const r of supported)
295
+ lines.push(` ✓ ${r.asserted} — ${r.evidence}`);
296
+ }
297
+ else if (verdict === "REJECTED") {
298
+ lines.push(`❌ TRUTH-FORENSIC verdict: REJECTED. Claim contains assertion(s) refuted by Mneme's live state — DO NOT trust this claim.`);
299
+ for (const r of refuted)
300
+ lines.push(` ✗ ${r.asserted} — ${r.evidence}`);
301
+ if (supported.length > 0) {
302
+ lines.push(`(Other parts of the claim grounded: ${supported.length} supported assertion(s).)`);
303
+ }
304
+ }
305
+ else {
306
+ if (assertions.length === 0) {
307
+ lines.push(`❓ TRUTH-FORENSIC verdict: UNKNOWN. No verifiable assertions sniffed from the claim. Mneme refuses to auto-accept untested claims.`);
308
+ lines.push(`Tip: rephrase to include checkable specifics — e.g., a tool name 'mneme.X.Y', a count 'N mneme.X.* tools', or a file path.`);
309
+ }
310
+ else {
311
+ lines.push(`❓ TRUTH-FORENSIC verdict: UNKNOWN. Sniffed ${assertions.length} assertion(s) but ${untested.length} could not be checked (missing ground truth).`);
312
+ for (const r of untested)
313
+ lines.push(` ? ${r.asserted} — ${r.evidence}`);
314
+ }
315
+ }
316
+ return {
317
+ verdict,
318
+ claim: input.claim,
319
+ assertions: results,
320
+ refutedAssertions: refuted,
321
+ untested: assertions.length === 0,
322
+ certificate: cert,
323
+ explanation: lines.join("\n"),
324
+ };
325
+ }
326
+ export function verifyForensicCertificate(cert, secret) {
327
+ const { hmac, ...body } = cert;
328
+ const expected = signCertificate(body, secret ?? defaultSecret());
329
+ if (!safeEqHex(expected, hmac)) {
330
+ return { ok: false, reason: "HMAC mismatch — forged certificate or wrong secret" };
331
+ }
332
+ return { ok: true };
333
+ }
334
+ export function classifyClaim(claim) {
335
+ const assertions = sniffAllAssertions(claim);
336
+ const classes = Array.from(new Set(assertions.map((a) => a.kind)));
337
+ return { assertionsExpected: assertions.length, classes };
338
+ }
339
+ export function formatForensicLine(r) {
340
+ const tag = r.verdict === "ACCEPTED" ? "✅" : r.verdict === "REJECTED" ? "❌" : "❓";
341
+ const sup = r.assertions.filter((x) => x.sub_verdict === "supported").length;
342
+ const ref = r.refutedAssertions.length;
343
+ const unt = r.assertions.filter((x) => x.sub_verdict === "untested").length;
344
+ return `${tag} TRUTH-FORENSIC · ${r.verdict} · sniffed=${r.assertions.length} (✓${sup} ✗${ref} ?${unt})`;
345
+ }
346
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/truth_forensic_pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,UAAU,CAAC,CAAC,MAAM,CAAC;IAC5E,OAAO,GAAG,GAAG,qBAAqB,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,UAAU,CAAC,MAAM,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,GAAG,CAAC;AAC3G,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=truth_forensic_pipeline.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"truth_forensic_pipeline.test.d.ts","sourceRoot":"","sources":["../../src/truth_forensic_pipeline/truth_forensic_pipeline.test.ts"],"names":[],"mappings":""}