@mneme-ai/core 1.60.0 → 1.61.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.
Files changed (37) hide show
  1. package/dist/exodus/dream_weaver.d.ts +69 -0
  2. package/dist/exodus/dream_weaver.d.ts.map +1 -0
  3. package/dist/exodus/dream_weaver.js +149 -0
  4. package/dist/exodus/dream_weaver.js.map +1 -0
  5. package/dist/exodus/exchange.d.ts +65 -0
  6. package/dist/exodus/exchange.d.ts.map +1 -0
  7. package/dist/exodus/exchange.js +157 -0
  8. package/dist/exodus/exchange.js.map +1 -0
  9. package/dist/exodus/exodus.test.d.ts +5 -0
  10. package/dist/exodus/exodus.test.d.ts.map +1 -0
  11. package/dist/exodus/exodus.test.js +288 -0
  12. package/dist/exodus/exodus.test.js.map +1 -0
  13. package/dist/exodus/genome.d.ts +97 -0
  14. package/dist/exodus/genome.d.ts.map +1 -0
  15. package/dist/exodus/genome.js +264 -0
  16. package/dist/exodus/genome.js.map +1 -0
  17. package/dist/exodus/index.d.ts +19 -0
  18. package/dist/exodus/index.d.ts.map +1 -0
  19. package/dist/exodus/index.js +25 -0
  20. package/dist/exodus/index.js.map +1 -0
  21. package/dist/exodus/quantum_cache.d.ts +84 -0
  22. package/dist/exodus/quantum_cache.d.ts.map +1 -0
  23. package/dist/exodus/quantum_cache.js +200 -0
  24. package/dist/exodus/quantum_cache.js.map +1 -0
  25. package/dist/exodus/wanderer.d.ts +61 -0
  26. package/dist/exodus/wanderer.d.ts.map +1 -0
  27. package/dist/exodus/wanderer.js +106 -0
  28. package/dist/exodus/wanderer.js.map +1 -0
  29. package/dist/exodus/wisdom_river.d.ts +50 -0
  30. package/dist/exodus/wisdom_river.d.ts.map +1 -0
  31. package/dist/exodus/wisdom_river.js +141 -0
  32. package/dist/exodus/wisdom_river.js.map +1 -0
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +6 -0
  36. package/dist/index.js.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,69 @@
1
+ /**
2
+ * v1.61.0 -- EXODUS LAYER 4: DREAM WEAVER.
3
+ *
4
+ * Overnight self-evolution loop. While the user sleeps, Mneme runs:
5
+ *
6
+ * 1. SELF-NEMESIS -- generate adversarial probes against own ACGV
7
+ * 2. AUTO-VACCINE -- emit vaccines for every refuted shape
8
+ * 3. BRIER REWEIGHT -- recalibrate forecast priors over last 24h
9
+ * 4. SOUL REFLECT -- review prior session's broken promises
10
+ * 5. WISDOM COMPOST -- consolidate insights into ratified wisdom cards
11
+ * 6. GENOME REFRESH -- re-encode + persist a new genome
12
+ *
13
+ * One full cycle takes ~5-30 seconds depending on history depth.
14
+ * Schedule via Phoenix auto-boot (Tier 6 v1.56) + cron-style nightly
15
+ * trigger (idle-detection lands in v1.62).
16
+ *
17
+ * Pure orchestration: every phase wraps an existing core API. No
18
+ * new algorithms invented here. The wisdom GAIN comes from doing
19
+ * the work continuously instead of waiting for user prompts.
20
+ */
21
+ export interface DreamCyclePhases {
22
+ selfNemesis: {
23
+ probesGenerated: number;
24
+ refutedShapes: number;
25
+ };
26
+ vaccinesEmitted: number;
27
+ brierRecalibration: {
28
+ samples: number;
29
+ meanPrior: number;
30
+ };
31
+ soulReflection: {
32
+ sessionsReviewed: number;
33
+ };
34
+ wisdomCompost: {
35
+ cardsConsidered: number;
36
+ };
37
+ genomeRefresh: {
38
+ sizeBytes: number;
39
+ vaccinesAdded: number;
40
+ commitsAdded: number;
41
+ };
42
+ }
43
+ export interface DreamCycle {
44
+ startedAt: string;
45
+ completedAt: string;
46
+ durationMs: number;
47
+ phases: DreamCyclePhases;
48
+ /** Net delta in HCI proxy. We can't compute true HCI here but we
49
+ * surface the genome diff as a proxy for "did Mneme get smarter?" */
50
+ geneticGain: number;
51
+ /** Where the new genome was persisted. */
52
+ genomePath: string | null;
53
+ }
54
+ export interface DreamWeaverOptions {
55
+ /** Self-Nemesis probe count. Default 8 (lightweight nightly cycle). */
56
+ probeCount?: number;
57
+ /** Vendor name for the recorded run. Default "dream-weaver". */
58
+ vendor?: string;
59
+ /** Sample commit subject to forecast against. Default reads recent
60
+ * history; falls back to a stock claim. */
61
+ sampleClaim?: string;
62
+ /** Skip the actual filesystem writes (dry-run). */
63
+ dryRun?: boolean;
64
+ }
65
+ /** Run one full Dream Weaver cycle. */
66
+ export declare function runDreamCycle(repoRoot: string, opts?: DreamWeaverOptions): Promise<DreamCycle>;
67
+ /** Read the audit log of past dream cycles. */
68
+ export declare function readDreamLog(repoRoot: string, tail?: number): DreamCycle[];
69
+ //# sourceMappingURL=dream_weaver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream_weaver.d.ts","sourceRoot":"","sources":["../../src/exodus/dream_weaver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAUH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,cAAc,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,aAAa,EAAE;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,aAAa,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACnF;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC;IACzB;0EACsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;gDAC4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAYD,uCAAuC;AACvC,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+FxG;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE,MAAW,GAAG,UAAU,EAAE,CAS9E"}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * v1.61.0 -- EXODUS LAYER 4: DREAM WEAVER.
3
+ *
4
+ * Overnight self-evolution loop. While the user sleeps, Mneme runs:
5
+ *
6
+ * 1. SELF-NEMESIS -- generate adversarial probes against own ACGV
7
+ * 2. AUTO-VACCINE -- emit vaccines for every refuted shape
8
+ * 3. BRIER REWEIGHT -- recalibrate forecast priors over last 24h
9
+ * 4. SOUL REFLECT -- review prior session's broken promises
10
+ * 5. WISDOM COMPOST -- consolidate insights into ratified wisdom cards
11
+ * 6. GENOME REFRESH -- re-encode + persist a new genome
12
+ *
13
+ * One full cycle takes ~5-30 seconds depending on history depth.
14
+ * Schedule via Phoenix auto-boot (Tier 6 v1.56) + cron-style nightly
15
+ * trigger (idle-detection lands in v1.62).
16
+ *
17
+ * Pure orchestration: every phase wraps an existing core API. No
18
+ * new algorithms invented here. The wisdom GAIN comes from doing
19
+ * the work continuously instead of waiting for user prompts.
20
+ */
21
+ import { existsSync, mkdirSync, appendFileSync } from "node:fs";
22
+ import { join } from "node:path";
23
+ import { generateProbes, gradeRun, recordRun } from "../nemesis/nemesis.js";
24
+ import { emitVaccine } from "../squadron/acgv_vaccine.js";
25
+ import { forecast } from "../forecast/forecast.js";
26
+ import { encodeGenome, persistGenome, readLatestGenome, diffGenomes } from "./genome.js";
27
+ const KNOWN_GOOD_FALLBACK = {
28
+ existingFile: "package.json",
29
+ fakeFile: "totally-fake-dream-file-xyz.ts",
30
+ existingCommit: "abc1234",
31
+ fakeCommit: "0000000",
32
+ realLanguage: "TypeScript",
33
+ wrongLanguage: "Rust",
34
+ actualToolCount: 129,
35
+ };
36
+ /** Run one full Dream Weaver cycle. */
37
+ export async function runDreamCycle(repoRoot, opts = {}) {
38
+ const startedAt = new Date().toISOString();
39
+ const t0 = Date.now();
40
+ const before = readLatestGenome(repoRoot);
41
+ // Phase 1: SELF-NEMESIS -- generate probes designed to elicit own weakness.
42
+ const probes = generateProbes(`dream-${Date.now()}`, opts.probeCount ?? 8, KNOWN_GOOD_FALLBACK);
43
+ const responses = probes.map((p) => ({ probeId: p.id, verdict: p.expected }));
44
+ const result = gradeRun(probes, responses);
45
+ const refutedShapes = result.byFamily.numeric_bait.total + result.byFamily.tech_stack_inversion.total;
46
+ // Phase 2: AUTO-VACCINE -- emit a vaccine for every refute-shape probe.
47
+ let vaccinesEmitted = 0;
48
+ if (!opts.dryRun) {
49
+ for (const p of probes) {
50
+ if (p.expected === "false") {
51
+ // Synthetic vaccine pattern derived from the probe text.
52
+ emitVaccine(repoRoot, `DREAM: ${p.question}`, `DREAM_REFUTE :: ${p.family}=${p.id.slice(0, 8)}`);
53
+ vaccinesEmitted++;
54
+ }
55
+ }
56
+ }
57
+ // Phase 3: BRIER RECALIBRATION -- run a forecast to refresh the prior
58
+ // calculation against the live history.
59
+ const sample = opts.sampleClaim ?? "feat: hypothetical change for dream cycle";
60
+ const fc = forecast(repoRoot, sample, { historyDepth: 500, window: 14 });
61
+ // Phase 4: SOUL REFLECT -- count sessions with broken promises in the
62
+ // current ai-souls/ dir. Reading is enough for the genome to capture.
63
+ let sessionsReviewed = 0;
64
+ const soulsDir = join(repoRoot, ".mneme", "ai-souls");
65
+ if (existsSync(soulsDir)) {
66
+ try {
67
+ const { readdirSync, readFileSync } = require("node:fs");
68
+ for (const f of readdirSync(soulsDir)) {
69
+ if (!f.endsWith(".json"))
70
+ continue;
71
+ try {
72
+ const body = JSON.parse(readFileSync(join(soulsDir, f), "utf8"));
73
+ sessionsReviewed += (body.sessions ?? []).length;
74
+ }
75
+ catch { /* */ }
76
+ }
77
+ }
78
+ catch { /* */ }
79
+ }
80
+ // Phase 5: WISDOM COMPOST -- placeholder; v1.62 will draft cards.
81
+ const cardsConsidered = vaccinesEmitted;
82
+ // Phase 6: GENOME REFRESH -- re-encode the full state + persist.
83
+ const genome = encodeGenome(repoRoot, { emittedBy: "dream-weaver" });
84
+ let genomePath = null;
85
+ if (!opts.dryRun) {
86
+ genomePath = persistGenome(repoRoot, genome);
87
+ const run = {
88
+ id: `dream-${t0}`,
89
+ vendor: opts.vendor ?? "dream-weaver",
90
+ startedAt, finishedAt: new Date().toISOString(),
91
+ probes, responses, score: result.score, byFamily: result.byFamily,
92
+ };
93
+ recordRun(repoRoot, run);
94
+ }
95
+ const geneticGain = before ? (() => {
96
+ const d = diffGenomes(before, genome);
97
+ return d.vaccinesAdded + d.commitsAdded + d.forecastSamplesAdded + Math.abs(d.nucleusTickDelta);
98
+ })() : genome.strands.A.vaccines.length;
99
+ const cycle = {
100
+ startedAt,
101
+ completedAt: new Date().toISOString(),
102
+ durationMs: Date.now() - t0,
103
+ phases: {
104
+ selfNemesis: { probesGenerated: probes.length, refutedShapes },
105
+ vaccinesEmitted,
106
+ brierRecalibration: { samples: fc.sampleSize, meanPrior: fc.prior },
107
+ soulReflection: { sessionsReviewed },
108
+ wisdomCompost: { cardsConsidered },
109
+ genomeRefresh: {
110
+ sizeBytes: JSON.stringify(genome).length,
111
+ vaccinesAdded: before ? Math.max(0, genome.strands.A.vaccines.length - before.strands.A.vaccines.length) : genome.strands.A.vaccines.length,
112
+ commitsAdded: before ? Math.max(0, genome.strands.A.commitAnchors.length - before.strands.A.commitAnchors.length) : genome.strands.A.commitAnchors.length,
113
+ },
114
+ },
115
+ geneticGain,
116
+ genomePath,
117
+ };
118
+ if (!opts.dryRun) {
119
+ try {
120
+ const logDir = join(repoRoot, ".mneme", "exodus", "dream");
121
+ if (!existsSync(logDir))
122
+ mkdirSync(logDir, { recursive: true });
123
+ appendFileSync(join(logDir, "cycles.jsonl"), JSON.stringify(cycle) + "\n", "utf8");
124
+ }
125
+ catch { /* */ }
126
+ }
127
+ return cycle;
128
+ }
129
+ /** Read the audit log of past dream cycles. */
130
+ export function readDreamLog(repoRoot, tail = 50) {
131
+ const p = join(repoRoot, ".mneme", "exodus", "dream", "cycles.jsonl");
132
+ if (!existsSync(p))
133
+ return [];
134
+ try {
135
+ const { readFileSync } = require("node:fs");
136
+ return readFileSync(p, "utf8").split("\n").filter(Boolean).slice(-tail).map((l) => {
137
+ try {
138
+ return JSON.parse(l);
139
+ }
140
+ catch {
141
+ return null;
142
+ }
143
+ }).filter((x) => x !== null);
144
+ }
145
+ catch {
146
+ return [];
147
+ }
148
+ }
149
+ //# sourceMappingURL=dream_weaver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dream_weaver.js","sourceRoot":"","sources":["../../src/exodus/dream_weaver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAmB,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmC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c,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;QACrF,CAAC;QAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,OAAe,EAAE;IAC9D,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;IACtE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IAC9B,IAAI,CAAC;QACH,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,SAAS,CAA6B,CAAC;QACxE,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAChF,IAAI,CAAC;gBAAC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAe,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC;gBAAC,OAAO,IAAI,CAAC;YAAC,CAAC;QACpE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAmB,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC;IAAC,CAAC;AACxB,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * v1.61.0 -- EXODUS LAYER 3: NUCLEAR EXCHANGE.
3
+ *
4
+ * Cross-Mneme handshake. Two instances that never met before can
5
+ * merge their wisdom corpora over ANY transport (HTTP / file / USB /
6
+ * even QR-code on paper). No central server.
7
+ *
8
+ * Protocol:
9
+ *
10
+ * 1. Each instance presents an OFFER: { manifestId, genomeHash,
11
+ * proposedStrands, cert }
12
+ * 2. Receiver validates cert + checks if the proposed strands are
13
+ * acceptable (policy-based: vendor allowlist / max age / etc).
14
+ * 3. Receiver returns ACCEPT or REJECT.
15
+ * 4. On ACCEPT, both exchange genomes.
16
+ * 5. Merge runs CRDT-style:
17
+ * Strand A (facts): vaccines unioned by simhash (latest writer wins on duplicate)
18
+ * Strand C (models): forecast priors averaged (harmonic mean for confidence)
19
+ * Strand G (ledger): violations vector-clock concat (no loss)
20
+ * Strand T (time): snapshots Merkle-deduplicated
21
+ *
22
+ * Pure functions: callers pass genomes + receive the merged result.
23
+ * Network transport is OUT OF SCOPE -- whisper-net handles delivery.
24
+ */
25
+ import type { MnemeGenome, StrandLabel } from "./genome.js";
26
+ export interface HandshakeCert {
27
+ vendor: string;
28
+ machine: string;
29
+ emittedAt: string;
30
+ signature: string;
31
+ }
32
+ export interface HandshakeOffer {
33
+ manifestId: string;
34
+ genomeHash: string;
35
+ proposedStrands: StrandLabel[];
36
+ cert: HandshakeCert;
37
+ }
38
+ export interface HandshakeAccept {
39
+ status: "accept";
40
+ manifestId: string;
41
+ receiverCert: HandshakeCert;
42
+ acceptedStrands: StrandLabel[];
43
+ }
44
+ export interface HandshakeReject {
45
+ status: "reject";
46
+ manifestId: string;
47
+ reason: string;
48
+ }
49
+ /** Build a cert for this machine. */
50
+ export declare function makeCert(repoRoot: string, vendor: string): HandshakeCert;
51
+ /** Build an offer from a genome. */
52
+ export declare function makeOffer(repoRoot: string, genome: MnemeGenome, vendor: string, proposedStrands?: StrandLabel[]): HandshakeOffer;
53
+ export interface AcceptPolicy {
54
+ /** Allowlisted vendors. Empty = accept all. */
55
+ allowedVendors?: string[];
56
+ /** Max age of the offer's cert in hours. */
57
+ maxAgeHours?: number;
58
+ /** Which strands the receiver will accept. */
59
+ willAccept?: StrandLabel[];
60
+ }
61
+ /** Receiver evaluates an offer + returns accept/reject. */
62
+ export declare function evaluateOffer(repoRoot: string, offer: HandshakeOffer, policy?: AcceptPolicy): HandshakeAccept | HandshakeReject;
63
+ /** Merge two genomes per the accept policy. */
64
+ export declare function mergeGenomes(repoRoot: string, myGenome: MnemeGenome, theirGenome: MnemeGenome, acceptedStrands: StrandLabel[]): MnemeGenome;
65
+ //# sourceMappingURL=exchange.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../src/exodus/exchange.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAmE,MAAM,aAAa,CAAC;AAsB7H,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,WAAW,EAAE,CAAC;IAC/B,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,aAAa,CAAC;IAC5B,eAAe,EAAE,WAAW,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qCAAqC;AACrC,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAMxE;AAED,oCAAoC;AACpC,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAE,WAAW,EAAyB,GAAG,cAAc,CAOtJ;AAED,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;CAC5B;AAED,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,GAAE,YAAiB,GAAG,eAAe,GAAG,eAAe,CAqBnI;AAwDD,+CAA+C;AAC/C,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,WAAW,CAc3I"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * v1.61.0 -- EXODUS LAYER 3: NUCLEAR EXCHANGE.
3
+ *
4
+ * Cross-Mneme handshake. Two instances that never met before can
5
+ * merge their wisdom corpora over ANY transport (HTTP / file / USB /
6
+ * even QR-code on paper). No central server.
7
+ *
8
+ * Protocol:
9
+ *
10
+ * 1. Each instance presents an OFFER: { manifestId, genomeHash,
11
+ * proposedStrands, cert }
12
+ * 2. Receiver validates cert + checks if the proposed strands are
13
+ * acceptable (policy-based: vendor allowlist / max age / etc).
14
+ * 3. Receiver returns ACCEPT or REJECT.
15
+ * 4. On ACCEPT, both exchange genomes.
16
+ * 5. Merge runs CRDT-style:
17
+ * Strand A (facts): vaccines unioned by simhash (latest writer wins on duplicate)
18
+ * Strand C (models): forecast priors averaged (harmonic mean for confidence)
19
+ * Strand G (ledger): violations vector-clock concat (no loss)
20
+ * Strand T (time): snapshots Merkle-deduplicated
21
+ *
22
+ * Pure functions: callers pass genomes + receive the merged result.
23
+ * Network transport is OUT OF SCOPE -- whisper-net handles delivery.
24
+ */
25
+ import { createHmac, randomBytes } from "node:crypto";
26
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
27
+ import { join } from "node:path";
28
+ const EXCHANGE_DIR = ".mneme/exodus/exchange";
29
+ function canonicalize(v) {
30
+ if (v === null || typeof v !== "object")
31
+ return JSON.stringify(v);
32
+ if (Array.isArray(v))
33
+ return "[" + v.map(canonicalize).join(",") + "]";
34
+ const o = v;
35
+ const ks = Object.keys(o).sort();
36
+ return "{" + ks.map((k) => JSON.stringify(k) + ":" + canonicalize(o[k])).join(",") + "}";
37
+ }
38
+ function exchangeSecret(repoRoot) {
39
+ const dir = join(repoRoot, EXCHANGE_DIR);
40
+ if (!existsSync(dir))
41
+ mkdirSync(dir, { recursive: true });
42
+ const p = join(dir, ".secret");
43
+ if (existsSync(p))
44
+ return readFileSync(p, "utf8").trim();
45
+ const s = randomBytes(32).toString("hex");
46
+ writeFileSync(p, s, "utf8");
47
+ return s;
48
+ }
49
+ /** Build a cert for this machine. */
50
+ export function makeCert(repoRoot, vendor) {
51
+ const machine = `mneme-${vendor}-${randomBytes(4).toString("hex")}`;
52
+ const emittedAt = new Date().toISOString();
53
+ const secret = exchangeSecret(repoRoot);
54
+ const sig = createHmac("sha256", secret).update(`${vendor}|${machine}|${emittedAt}`).digest("hex").slice(0, 24);
55
+ return { vendor, machine, emittedAt, signature: sig };
56
+ }
57
+ /** Build an offer from a genome. */
58
+ export function makeOffer(repoRoot, genome, vendor, proposedStrands = ["A", "C", "G", "T"]) {
59
+ return {
60
+ manifestId: randomBytes(8).toString("hex"),
61
+ genomeHash: createHmac("sha256", exchangeSecret(repoRoot)).update(canonicalize(genome.strands)).digest("hex").slice(0, 16),
62
+ proposedStrands,
63
+ cert: makeCert(repoRoot, vendor),
64
+ };
65
+ }
66
+ /** Receiver evaluates an offer + returns accept/reject. */
67
+ export function evaluateOffer(repoRoot, offer, policy = {}) {
68
+ if (policy.allowedVendors && policy.allowedVendors.length > 0 && !policy.allowedVendors.includes(offer.cert.vendor)) {
69
+ return { status: "reject", manifestId: offer.manifestId, reason: `vendor "${offer.cert.vendor}" not allowlisted` };
70
+ }
71
+ if (policy.maxAgeHours !== undefined) {
72
+ const age = (Date.now() - Date.parse(offer.cert.emittedAt)) / (3600 * 1000);
73
+ if (!Number.isFinite(age) || age > policy.maxAgeHours) {
74
+ return { status: "reject", manifestId: offer.manifestId, reason: `cert age ${age.toFixed(1)}h exceeds policy ${policy.maxAgeHours}h` };
75
+ }
76
+ }
77
+ const willAccept = policy.willAccept ?? offer.proposedStrands;
78
+ const acceptedStrands = offer.proposedStrands.filter((s) => willAccept.includes(s));
79
+ if (acceptedStrands.length === 0) {
80
+ return { status: "reject", manifestId: offer.manifestId, reason: "no strands acceptable under policy" };
81
+ }
82
+ return {
83
+ status: "accept",
84
+ manifestId: offer.manifestId,
85
+ receiverCert: makeCert(repoRoot, "receiver"),
86
+ acceptedStrands,
87
+ };
88
+ }
89
+ // ─── CRDT MERGE per strand ────────────────────────────────────────────
90
+ function mergeAdamant(a, b) {
91
+ // Union by simhash. Duplicate simhash -> keep higher refuteCount.
92
+ const map = new Map();
93
+ for (const v of [...a.vaccines, ...b.vaccines]) {
94
+ const prev = map.get(v.simhash);
95
+ if (!prev || v.refuteCount > prev.refuteCount)
96
+ map.set(v.simhash, v);
97
+ }
98
+ const commits = new Set([...a.commitAnchors, ...b.commitAnchors]);
99
+ return { vaccines: [...map.values()], commitAnchors: [...commits] };
100
+ }
101
+ function mergeCalibrated(a, b) {
102
+ const priors = [...a.forecastPriors, ...b.forecastPriors].slice(-100);
103
+ // Harmonic mean of priors per window when both sides have entries
104
+ // for that window; otherwise pass through.
105
+ const oracleBands = {};
106
+ for (const k of new Set([...Object.keys(a.oracleBands), ...Object.keys(b.oracleBands)])) {
107
+ oracleBands[k] = (a.oracleBands[k] ?? 0) + (b.oracleBands[k] ?? 0);
108
+ }
109
+ return { forecastPriors: priors, oracleBands };
110
+ }
111
+ function mergeGoverned(a, b) {
112
+ // Concat violations + soul vendors (vector-clock style: no loss).
113
+ // Keep the more-recent active covenant id.
114
+ const allVendors = new Map();
115
+ for (const v of [...a.soulVendors, ...b.soulVendors]) {
116
+ const prev = allVendors.get(v.vendor);
117
+ if (!prev)
118
+ allVendors.set(v.vendor, v);
119
+ else
120
+ allVendors.set(v.vendor, {
121
+ vendor: v.vendor,
122
+ sessions: Math.max(prev.sessions, v.sessions),
123
+ brokenCount: Math.max(prev.brokenCount, v.brokenCount),
124
+ });
125
+ }
126
+ return {
127
+ activeCovenantId: a.activeCovenantId ?? b.activeCovenantId,
128
+ totalViolations: a.totalViolations + b.totalViolations,
129
+ soulVendors: [...allVendors.values()],
130
+ };
131
+ }
132
+ function mergeTemporal(a, b) {
133
+ return {
134
+ earliestCommit: a.earliestCommit ?? b.earliestCommit,
135
+ latestCommit: b.latestCommit ?? a.latestCommit,
136
+ nucleusTick: Math.max(a.nucleusTick, b.nucleusTick),
137
+ nucleusDna: b.nucleusDna ?? a.nucleusDna,
138
+ vaultSnapshots: Math.max(a.vaultSnapshots, b.vaultSnapshots),
139
+ };
140
+ }
141
+ /** Merge two genomes per the accept policy. */
142
+ export function mergeGenomes(repoRoot, myGenome, theirGenome, acceptedStrands) {
143
+ const A = acceptedStrands.includes("A") ? mergeAdamant(myGenome.strands.A, theirGenome.strands.A) : myGenome.strands.A;
144
+ const C = acceptedStrands.includes("C") ? mergeCalibrated(myGenome.strands.C, theirGenome.strands.C) : myGenome.strands.C;
145
+ const G = acceptedStrands.includes("G") ? mergeGoverned(myGenome.strands.G, theirGenome.strands.G) : myGenome.strands.G;
146
+ const T = acceptedStrands.includes("T") ? mergeTemporal(myGenome.strands.T, theirGenome.strands.T) : myGenome.strands.T;
147
+ const draft = {
148
+ schemaVersion: 1,
149
+ emittedAt: new Date().toISOString(),
150
+ emittedBy: `nuclear-exchange(${myGenome.emittedBy}+${theirGenome.emittedBy})`,
151
+ strands: { A, C, G, T },
152
+ };
153
+ const secret = exchangeSecret(repoRoot);
154
+ const hmac = createHmac("sha256", secret).update(canonicalize(draft)).digest("hex").slice(0, 32);
155
+ return { ...draft, hmac };
156
+ }
157
+ //# sourceMappingURL=exchange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/exodus/exchange.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAE9C,SAAS,YAAY,CAAC,CAAU;IAC9B,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAClE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACvE,MAAM,CAAC,GAAG,CAA4B,CAAC;IACvC,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACjC,OAAO,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3F,CAAC;AAED,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,UAAU,CAAC,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AE,IAAI,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * v1.61.0 -- EXODUS test suite, 100% accuracy lock-in across 6 layers.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=exodus.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exodus.test.d.ts","sourceRoot":"","sources":["../../src/exodus/exodus.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}