mneme-ai 2.138.0 โ†’ 2.140.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,15 @@
1
+ /**
2
+ * `mneme pce` (v2.139.0) โ€” Proof-Carrying Edit (๐Ÿ’Ž2). Attach a SIGNED certificate
3
+ * to an AI's diff that statically proves what it touches + introduces, so a
4
+ * reviewer/CI trusts the analysis offline without re-running it or trusting the
5
+ * author. Tampering with the diff OR the cert is caught.
6
+ *
7
+ * git diff | mneme pce --scope "src/**" --forbid network,childProcess
8
+ * mneme pce --diff change.patch --json > passport.json
9
+ * git diff | mneme pce verify --passport passport.json --scope "src/**"
10
+ *
11
+ * Exit 2 on BLOCK (out-of-scope ยท secret added ยท forbidden primitive) โ€” CI-gate.
12
+ */
13
+ import type { Command } from "commander";
14
+ export declare function registerPceCommands(program: Command): void;
15
+ //# sourceMappingURL=pce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pce.d.ts","sourceRoot":"","sources":["../../src/commands/pce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAazC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0C1D"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * `mneme pce` (v2.139.0) โ€” Proof-Carrying Edit (๐Ÿ’Ž2). Attach a SIGNED certificate
3
+ * to an AI's diff that statically proves what it touches + introduces, so a
4
+ * reviewer/CI trusts the analysis offline without re-running it or trusting the
5
+ * author. Tampering with the diff OR the cert is caught.
6
+ *
7
+ * git diff | mneme pce --scope "src/**" --forbid network,childProcess
8
+ * mneme pce --diff change.patch --json > passport.json
9
+ * git diff | mneme pce verify --passport passport.json --scope "src/**"
10
+ *
11
+ * Exit 2 on BLOCK (out-of-scope ยท secret added ยท forbidden primitive) โ€” CI-gate.
12
+ */
13
+ import { existsSync, readFileSync } from "node:fs";
14
+ import { pce, notary } from "@mneme-ai/core";
15
+ function out(s) { process.stdout.write(s + "\n"); }
16
+ function readDiff(file) {
17
+ try {
18
+ if (file && file !== "-" && existsSync(file))
19
+ return readFileSync(file, "utf8");
20
+ return readFileSync(0, "utf8"); // stdin
21
+ }
22
+ catch {
23
+ return "";
24
+ }
25
+ }
26
+ function splitList(v) { return typeof v === "string" && v.trim() ? v.split(",").map((s) => s.trim()).filter(Boolean) : []; }
27
+ export function registerPceCommands(program) {
28
+ const cmd = program
29
+ .command("pce")
30
+ .description("๐Ÿ’Ž PCE โ€” Proof-Carrying Edit. Attach a SIGNED certificate to an AI's diff that statically PROVES what it does/doesn't do โ€” which paths it touches, whether it stays inside a declared --scope, the dangerous primitives it introduces (eval/childProcess/fsDelete/network/dynamicImport), add/delete balance, and secret literals. A reviewer/CI verifies it OFFLINE (trusts the analysis, not the author); tampering with the diff OR the cert is caught. Exit 2 on BLOCK. HONEST: static lexical+structural analysis โ€” proves declared checkable properties, NOT total runtime safety.")
31
+ .argument("[action]", "omit to certify; 'verify' to check a passport")
32
+ .option("--diff <file>", "unified diff file (default: stdin)")
33
+ .option("--scope <globs>", "comma-separated allowed path globs (e.g. \"src/**,test/**\")")
34
+ .option("--forbid <names>", "comma-separated primitives to BLOCK: eval,childProcess,fsDelete,network,dynamicImport")
35
+ .option("--passport <file>", "(verify) the passport JSON to check against the diff")
36
+ .option("--json", "JSON output")
37
+ .action((action, opts) => {
38
+ const diff = readDiff(opts.diff);
39
+ const analysisOpts = { declaredScope: splitList(opts.scope), forbidPrimitives: splitList(opts.forbid) };
40
+ if (action === "verify") {
41
+ if (!opts.passport || !existsSync(opts.passport)) {
42
+ out("โœ— --passport <file> required for verify");
43
+ process.exitCode = 2;
44
+ return;
45
+ }
46
+ let passport;
47
+ try {
48
+ const j = JSON.parse(readFileSync(opts.passport, "utf8"));
49
+ passport = (j.passport ?? j);
50
+ }
51
+ catch {
52
+ out("โœ— could not parse passport JSON");
53
+ process.exitCode = 2;
54
+ return;
55
+ }
56
+ const v = pce.verifyPassport(diff, passport, analysisOpts);
57
+ if (opts.json) {
58
+ out(JSON.stringify(v, null, 2));
59
+ }
60
+ else {
61
+ out(`${v.ok ? "โœ“ VERIFIED" : "๐Ÿ›‘ INVALID"} โ€” ${v.reason}`);
62
+ }
63
+ process.exitCode = v.ok ? 0 : 2;
64
+ return;
65
+ }
66
+ const passport = pce.buildPassport(diff, analysisOpts);
67
+ const cwd = process.cwd();
68
+ let receipt = null;
69
+ try {
70
+ receipt = notary.issueReceipt(cwd, { kind: "claim-verdict", subject: `pce:${passport.verdict}:${passport.diffHash.slice(0, 12)}`, payload: { diffHash: passport.diffHash, verdict: passport.verdict, propsHash: undefined }, includePayload: true });
71
+ }
72
+ catch { /* */ }
73
+ if (opts.json) {
74
+ out(JSON.stringify({ passport, signed: receipt }, null, 2));
75
+ process.exitCode = passport.verdict === "BLOCK" ? 2 : 0;
76
+ return;
77
+ }
78
+ const icon = passport.verdict === "PASS" ? "๐ŸŸข" : passport.verdict === "REVIEW" ? "๐ŸŸก" : "๐Ÿ›‘";
79
+ const p = passport.properties;
80
+ out(`${icon} PCE ${passport.verdict} โ€” ${p.touchedPaths.length} file(s), net ${p.netLines >= 0 ? "+" : ""}${p.netLines} lines`);
81
+ for (const path of p.touchedPaths.slice(0, 20))
82
+ out(` โ€ข ${path}`);
83
+ const intro = Object.entries(p.introducedPrimitives).filter(([, v]) => v).map(([k]) => k);
84
+ if (intro.length)
85
+ out(` primitives introduced: ${intro.join(", ")}`);
86
+ if (p.secretsAdded)
87
+ out(` โš  secret-looking literal added`);
88
+ if (!p.inScope)
89
+ out(` โš  out of scope: ${p.outOfScopePaths.join(", ")}`);
90
+ for (const r of passport.reasons)
91
+ out(` โ†’ ${r}`);
92
+ out(` diffHash ${passport.diffHash.slice(0, 16)}โ€ฆ ${receipt ? "ยท signed (verify offline with the NOTARY public key)" : ""}`);
93
+ process.exitCode = passport.verdict === "BLOCK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C1E,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO;YAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACnD,GAAG,CAAC,eAAe,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/H,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IACL,KAAK,GAAG,CAAC;AACX,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `mneme regret` (v2.140.0) โ€” the REGRET ORACLE (๐Ÿ’Ž3). A signed, cross-vendor
3
+ * calibration of how often an edit carrying a given signal was ACTUALLY
4
+ * regretted later (reverted / test failed). Backward-looking, not fortune-telling.
5
+ *
6
+ * mneme regret record --features "primitive:network,area:auth,vendor:grok" --regretted
7
+ * git diff | mneme regret record --diff - --vendor grok --regretted # auto-derive signals
8
+ * git diff | mneme regret score --diff - --vendor grok
9
+ * mneme regret vendors
10
+ *
11
+ * `score` exit 2 on band HIGH (CI-gate). Honest: a historical base rate with a
12
+ * Wilson interval + UNKNOWN when support is thin โ€” never a prediction.
13
+ */
14
+ import type { Command } from "commander";
15
+ /**
16
+ * Attach the REGRET ORACLE calibration as subcommands of the EXISTING `regret`
17
+ * command (which lists reverted commits โ€” the raw outcome source). So:
18
+ * mneme regret โ†’ the git revert/hotfix lister (unchanged)
19
+ * mneme regret score โ†’ calibrated regret base rate for an edit's signals
20
+ * mneme regret record โ†’ record an outcome into the calibration ledger
21
+ * mneme regret vendors โ†’ cross-vendor regret comparison
22
+ */
23
+ export declare function attachRegretOracle(regretCmd: Command): void;
24
+ //# sourceMappingURL=regret.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regret.d.ts","sourceRoot":"","sources":["../../src/commands/regret.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuCzC;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAoD3D"}
@@ -0,0 +1,155 @@
1
+ /**
2
+ * `mneme regret` (v2.140.0) โ€” the REGRET ORACLE (๐Ÿ’Ž3). A signed, cross-vendor
3
+ * calibration of how often an edit carrying a given signal was ACTUALLY
4
+ * regretted later (reverted / test failed). Backward-looking, not fortune-telling.
5
+ *
6
+ * mneme regret record --features "primitive:network,area:auth,vendor:grok" --regretted
7
+ * git diff | mneme regret record --diff - --vendor grok --regretted # auto-derive signals
8
+ * git diff | mneme regret score --diff - --vendor grok
9
+ * mneme regret vendors
10
+ *
11
+ * `score` exit 2 on band HIGH (CI-gate). Honest: a historical base rate with a
12
+ * Wilson interval + UNKNOWN when support is thin โ€” never a prediction.
13
+ */
14
+ import { existsSync, readFileSync, mkdirSync, appendFileSync } from "node:fs";
15
+ import { join, dirname } from "node:path";
16
+ import { regret, pce, notary } from "@mneme-ai/core";
17
+ function out(s) { process.stdout.write(s + "\n"); }
18
+ const LEDGER = ".mneme/regret/outcomes.jsonl";
19
+ function splitList(v) { return typeof v === "string" && v.trim() ? v.split(",").map((s) => s.trim()).filter(Boolean) : []; }
20
+ function readDiff(file) { try {
21
+ if (file && file !== "-" && existsSync(file))
22
+ return readFileSync(file, "utf8");
23
+ if (file === "-")
24
+ return readFileSync(0, "utf8");
25
+ }
26
+ catch { /* */ } return ""; }
27
+ /** Derive observable signals from a diff (via PCE's static analysis) + a vendor. */
28
+ function deriveFeatures(diff, vendor) {
29
+ const f = [];
30
+ try {
31
+ const props = pce.analyzeDiff(diff);
32
+ for (const [k, v] of Object.entries(props.introducedPrimitives))
33
+ if (v)
34
+ f.push(`primitive:${k.toLowerCase()}`);
35
+ if (props.massDeletion)
36
+ f.push("mass-deletion");
37
+ if (props.touchedPaths.some((p) => /delete/.test(p))) { /* noop */ }
38
+ // top-level dir as "area:*"
39
+ for (const p of props.touchedPaths) {
40
+ const top = p.split("/")[0];
41
+ if (top)
42
+ f.push(`area:${top.toLowerCase()}`);
43
+ }
44
+ f.push(props.touchedPaths.length > 5 ? "breadth:wide" : "breadth:narrow");
45
+ }
46
+ catch { /* */ }
47
+ if (vendor)
48
+ f.push(`vendor:${vendor.toLowerCase()}`);
49
+ return Array.from(new Set(f));
50
+ }
51
+ function loadModel(cwd) {
52
+ const p = join(cwd, LEDGER);
53
+ const events = [];
54
+ if (existsSync(p)) {
55
+ for (const line of readFileSync(p, "utf8").split("\n")) {
56
+ if (!line.trim())
57
+ continue;
58
+ try {
59
+ const j = JSON.parse(line);
60
+ if (Array.isArray(j.features))
61
+ events.push({ features: j.features, regretted: j.regretted === true });
62
+ }
63
+ catch { /* */ }
64
+ }
65
+ }
66
+ return regret.buildRegretModel(events);
67
+ }
68
+ /**
69
+ * Attach the REGRET ORACLE calibration as subcommands of the EXISTING `regret`
70
+ * command (which lists reverted commits โ€” the raw outcome source). So:
71
+ * mneme regret โ†’ the git revert/hotfix lister (unchanged)
72
+ * mneme regret score โ†’ calibrated regret base rate for an edit's signals
73
+ * mneme regret record โ†’ record an outcome into the calibration ledger
74
+ * mneme regret vendors โ†’ cross-vendor regret comparison
75
+ */
76
+ export function attachRegretOracle(regretCmd) {
77
+ regretCmd
78
+ .command("score")
79
+ .description("๐Ÿ’Ž REGRET ORACLE โ€” calibrated regret base rate for an edit's signals (Wilson 95% LOWER bound of the riskiest signal, UNKNOWN when support is thin). Pass --diff - to derive signals via PCE. Exit 2 on HIGH. HONEST: a backward-looking historical base rate, not a prediction.")
80
+ .option("--features <list>", "comma-separated signals (e.g. \"primitive:network,area:auth,vendor:grok\")")
81
+ .option("--diff <file>", "derive signals from a unified diff (PCE static analysis); '-' = stdin")
82
+ .option("--vendor <name>", "tag the vendor (adds vendor:<name>)")
83
+ .option("--min-support <n>", "min samples before a signal counts (default 5)", (v) => parseInt(v, 10))
84
+ .option("--json", "JSON output")
85
+ .action((opts) => {
86
+ const cwd = process.cwd();
87
+ const features = opts.diff !== undefined ? deriveFeatures(readDiff(opts.diff), opts.vendor) : (() => { const f = splitList(opts.features); if (opts.vendor)
88
+ f.push(`vendor:${opts.vendor.toLowerCase()}`); return f; })();
89
+ const model = loadModel(cwd);
90
+ const s = regret.scoreRegret(model, features, opts.minSupport !== undefined ? { minSupport: opts.minSupport } : undefined);
91
+ let receipt = null;
92
+ try {
93
+ receipt = notary.issueReceipt(cwd, { kind: "claim-verdict", subject: `regret:${s.band}`, payload: { band: s.band, lb: s.regretRateLowerBound, support: s.support }, includePayload: true });
94
+ }
95
+ catch { /* */ }
96
+ if (opts.json) {
97
+ out(JSON.stringify({ ...s, signed: receipt }, null, 2));
98
+ process.exitCode = s.band === "HIGH" ? 2 : 0;
99
+ return;
100
+ }
101
+ const icon = s.band === "HIGH" ? "๐Ÿ›‘" : s.band === "ELEVATED" ? "๐ŸŸก" : s.band === "LOW" ? "๐ŸŸข" : "โ”";
102
+ out(`${icon} REGRET ${s.band}${s.band !== "UNKNOWN" ? ` โ€” โ‰ฅ${(s.regretRateLowerBound * 100).toFixed(1)}% of similar edits were regretted (Wilson LB ยท ${(s.observedRate * 100).toFixed(0)}% observed ยท n=${s.support})` : " โ€” not enough recorded outcomes for these signals"}`);
103
+ for (const d of s.drivers)
104
+ out(` โ€ข ${d.feature}: ${(d.wilsonLow * 100).toFixed(1)}% LB (n=${d.n})`);
105
+ out(` ${s.note}`);
106
+ if (receipt)
107
+ out(` โœ“ signed (verify offline with the NOTARY public key)`);
108
+ process.exitCode = s.band === "HIGH" ? 2 : 0;
109
+ });
110
+ regretCmd
111
+ .command("record")
112
+ .description("๐Ÿ’Ž REGRET ORACLE โ€” record one real outcome (signals + --regretted) into the signed calibration ledger.")
113
+ .option("--features <list>", "comma-separated signals")
114
+ .option("--diff <file>", "derive signals from a unified diff; '-' = stdin")
115
+ .option("--vendor <name>", "tag the vendor")
116
+ .option("--regretted", "this outcome WAS regretted (reverted / test failed)")
117
+ .action((opts) => {
118
+ const cwd = process.cwd();
119
+ const features = opts.diff !== undefined ? deriveFeatures(readDiff(opts.diff), opts.vendor) : (() => { const f = splitList(opts.features); if (opts.vendor)
120
+ f.push(`vendor:${opts.vendor.toLowerCase()}`); return f; })();
121
+ if (!features.length) {
122
+ out("โœ— no signals โ€” pass --features or --diff");
123
+ process.exitCode = 2;
124
+ return;
125
+ }
126
+ try {
127
+ const p = join(cwd, LEDGER);
128
+ if (!existsSync(dirname(p)))
129
+ mkdirSync(dirname(p), { recursive: true });
130
+ appendFileSync(p, JSON.stringify({ features, regretted: opts.regretted === true, at: Date.now() }) + "\n");
131
+ }
132
+ catch { /* */ }
133
+ out(`โœ“ recorded outcome (${opts.regretted ? "REGRETTED" : "stable"}): ${features.join(", ")}`);
134
+ });
135
+ regretCmd
136
+ .command("vendors")
137
+ .description("๐Ÿ’Ž REGRET ORACLE โ€” cross-vendor regret comparison (Wilson LB, riskiest first).")
138
+ .option("--json", "JSON output")
139
+ .action((opts) => {
140
+ const vr = regret.vendorRegret(loadModel(process.cwd()));
141
+ if (opts.json) {
142
+ out(JSON.stringify(vr, null, 2));
143
+ return;
144
+ }
145
+ if (!vr.length) {
146
+ out("๐Ÿ’Ž Regret Oracle โ€” no vendor-tagged outcomes recorded yet.");
147
+ return;
148
+ }
149
+ out("๐Ÿ’Ž Regret Oracle โ€” cross-vendor regret (riskiest first, Wilson 95% LB):");
150
+ for (const v of vr)
151
+ out(` ${v.feature.replace("vendor:", "").padEnd(10)} ${(v.wilsonLow * 100).toFixed(1)}% LB ยท ${(v.rate * 100).toFixed(0)}% observed ยท n=${v.n}`);
152
+ out(" (historical base rate from your own revert/test outcomes โ€” not a prediction.)");
153
+ });
154
+ }
155
+ //# sourceMappingURL=regret.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvK,GAAG,CAAC,kFAAkF,CAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgKA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAshNvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkKA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA0hNvD"}
package/dist/index.js CHANGED
@@ -93,6 +93,8 @@ import { registerBootCommands } from "./commands/boot.js";
93
93
  import { registerElleipsisCommands } from "./commands/elleipsis.js";
94
94
  import { registerSteleCommands } from "./commands/stele.js";
95
95
  import { registerAxiaCommands } from "./commands/axia.js";
96
+ import { registerPceCommands } from "./commands/pce.js";
97
+ import { attachRegretOracle } from "./commands/regret.js";
96
98
  import { registerTrustCommands } from "./commands/trust.js";
97
99
  import { registerNuclearCommands } from "./commands/nuclear-cli.js";
98
100
  import { registerOvernightCommand } from "./commands/overnight.js";
@@ -1751,7 +1753,7 @@ export async function run(argv) {
1751
1753
  process.exit(await chatCommand({ cwd: process.cwd(), noLlm: opts.llm === false }));
1752
1754
  });
1753
1755
  // โ”€โ”€โ”€ Sprint 4 killer commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
1754
- program
1756
+ const regretCmd = program
1755
1757
  .command("regret", { hidden: true })
1756
1758
  .description("Surface commits that were shipped and immediately fixed/reverted")
1757
1759
  .option("--window-days <n>", "follow-up window", (v) => Number(v), 7)
@@ -1763,6 +1765,9 @@ export async function run(argv) {
1763
1765
  json: opts.json,
1764
1766
  }));
1765
1767
  });
1768
+ // ๐Ÿ’Ž v2.140.0 โ€” attach the REGRET ORACLE calibration as subcommands
1769
+ // (`regret score|record|vendors`); bare `regret` stays the git revert lister.
1770
+ attachRegretOracle(regretCmd);
1766
1771
  program
1767
1772
  .command("bus-factor", { hidden: true })
1768
1773
  .description("Identify single-source-of-truth knowledge holders + pairing recommendations")
@@ -4735,6 +4740,7 @@ export async function run(argv) {
4735
4740
  registerElleipsisCommands(program);
4736
4741
  registerSteleCommands(program);
4737
4742
  registerAxiaCommands(program);
4743
+ registerPceCommands(program);
4738
4744
  // โ”€โ”€โ”€ Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
4739
4745
  registerTrustCommands(program);
4740
4746
  // โ”€โ”€โ”€ Wisdom reactor (v1.33.0) -- five nuclear-physics formulas as Mneme metrics