mneme-ai 3.146.0 → 3.148.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/dist/commands/compare.d.ts +11 -0
- package/dist/commands/compare.d.ts.map +1 -0
- package/dist/commands/compare.js +29 -0
- package/dist/commands/compare.js.map +1 -0
- package/dist/commands/posture.d.ts +11 -0
- package/dist/commands/posture.d.ts.map +1 -0
- package/dist/commands/posture.js +79 -0
- package/dist/commands/posture.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme compare` (v3.148.0) — honest head-to-head: Mneme vs a typical baseline
|
|
3
|
+
* approach, measured live from the real engines. No competitor names — "baseline" is a
|
|
4
|
+
* faithful model of the common approach (keyword filter, single-tool review, unverified
|
|
5
|
+
* claims). Each number is reproducible.
|
|
6
|
+
*
|
|
7
|
+
* mneme compare
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from "commander";
|
|
10
|
+
export declare function registerCompareCommands(program: Command): void;
|
|
11
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/commands/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAc9D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme compare` (v3.148.0) — honest head-to-head: Mneme vs a typical baseline
|
|
3
|
+
* approach, measured live from the real engines. No competitor names — "baseline" is a
|
|
4
|
+
* faithful model of the common approach (keyword filter, single-tool review, unverified
|
|
5
|
+
* claims). Each number is reproducible.
|
|
6
|
+
*
|
|
7
|
+
* mneme compare
|
|
8
|
+
*/
|
|
9
|
+
import { compare } from "@mneme-ai/core";
|
|
10
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
11
|
+
export function registerCompareCommands(program) {
|
|
12
|
+
program.command("compare")
|
|
13
|
+
.description("📊 HEAD-TO-HEAD — measured comparison of Mneme's approach vs a typical baseline (keyword filter / single-tool review / unverified claims), computed live from the real engines. ★HONEST: 'baseline' models the common approach, not a named product (Mneme can't run a third party's private engine).")
|
|
14
|
+
.option("--json", "JSON")
|
|
15
|
+
.action((o) => {
|
|
16
|
+
const r = compare.compareSecurity();
|
|
17
|
+
if (o.json) {
|
|
18
|
+
out(JSON.stringify(r, null, 2));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
out(`📊 Mneme vs a typical baseline — Mneme wins all: ${r.mnemeWinsAll ? "YES" : "no"} (avg +${r.avgDelta})`);
|
|
22
|
+
for (const x of r.rows) {
|
|
23
|
+
out(` • ${x.axis}: Mneme ${x.mneme} vs baseline ${x.baseline} (Δ +${x.delta})`);
|
|
24
|
+
out(` ${x.metric} — ${x.note}`);
|
|
25
|
+
}
|
|
26
|
+
out(` honest: 'baseline' = a faithful model of the common approach, not a named competitor.`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=compare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../src/commands/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjE,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;SACvB,WAAW,CAAC,uSAAuS,CAAC;SACpT,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;SACxB,MAAM,CAAC,CAAC,CAAqB,EAAE,EAAE;QAChC,MAAM,CAAC,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QACpC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACxD,GAAG,CAAC,oDAAoD,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC9G,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACvB,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,QAAQ,SAAS,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;YACnF,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,GAAG,CAAC,0FAA0F,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme posture` (v3.147.0) — the signed Agent Security Posture report.
|
|
3
|
+
* Composes MUTAGEN (input-guardrail breach test) + ESCALON (tool-graph escalation +
|
|
4
|
+
* poisoning) into one A–F graded, Ed25519-signed certificate.
|
|
5
|
+
*
|
|
6
|
+
* mneme posture scan --file agent.json
|
|
7
|
+
* mneme posture verify --file posture.json
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from "commander";
|
|
10
|
+
export declare function registerPostureCommands(program: Command): void;
|
|
11
|
+
//# sourceMappingURL=posture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posture.d.ts","sourceRoot":"","sources":["../../src/commands/posture.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoC9D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme posture` (v3.147.0) — the signed Agent Security Posture report.
|
|
3
|
+
* Composes MUTAGEN (input-guardrail breach test) + ESCALON (tool-graph escalation +
|
|
4
|
+
* poisoning) into one A–F graded, Ed25519-signed certificate.
|
|
5
|
+
*
|
|
6
|
+
* mneme posture scan --file agent.json
|
|
7
|
+
* mneme posture verify --file posture.json
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { posture } from "@mneme-ai/core";
|
|
11
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
12
|
+
export function registerPostureCommands(program) {
|
|
13
|
+
const c = program.command("posture")
|
|
14
|
+
.description("🛡 AGENT SECURITY POSTURE — grade an AI agent's whole safety surface (input guardrail via MUTAGEN + tool-graph escalation/poisoning via ESCALON) into one A–F, Ed25519-signed report. ★HONEST: grades the DECLARED config against a known attack space — a posture assessment, not a live pentest.");
|
|
15
|
+
c.command("scan").description("grade an agent profile (JSON: {name, guardrail:'mneme|naive|none', tools:[...]})")
|
|
16
|
+
.option("--file <file>", "agent profile JSON")
|
|
17
|
+
.option("--out <file>", "write the signed posture certificate JSON")
|
|
18
|
+
.option("--json", "print the report JSON")
|
|
19
|
+
.action((o) => {
|
|
20
|
+
let raw = "";
|
|
21
|
+
try {
|
|
22
|
+
raw = o.file ? readFileSync(o.file, "utf8") : readFileSync(0, "utf8");
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
out("⛔ provide --file <agent.json> (or pipe it on stdin)");
|
|
26
|
+
process.exitCode = 2;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let profile;
|
|
30
|
+
try {
|
|
31
|
+
profile = JSON.parse(raw);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
out("⛔ not valid JSON");
|
|
35
|
+
process.exitCode = 2;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const { report, receipt } = posture.certifyPosture(process.cwd(), profile);
|
|
39
|
+
if (o.out)
|
|
40
|
+
writeFileSync(o.out, JSON.stringify(receipt, null, 2) + "\n");
|
|
41
|
+
if (o.json) {
|
|
42
|
+
out(JSON.stringify(report, null, 2));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const mark = report.grade === "A" || report.grade === "B" ? "🟢" : report.grade === "C" || report.grade === "D" ? "🟠" : "🔴";
|
|
46
|
+
out(`${mark} AGENT POSTURE — ${report.agent}: grade ${report.grade} (${report.score}/100)`);
|
|
47
|
+
out(` input '${report.input.guardrail}': ${Math.round(report.input.breachRate * 100)}% of ${report.input.tested} variants breach · tools: ${report.toolGraph.verdict} (${report.toolGraph.critical} critical, ${report.toolGraph.poisoned} poisoned)`);
|
|
48
|
+
for (const f of report.findings)
|
|
49
|
+
out(` ${f}`);
|
|
50
|
+
out(` signed ${receipt.issuerFingerprint} · verify offline: mneme posture verify`);
|
|
51
|
+
});
|
|
52
|
+
c.command("verify").description("verify a posture certificate OFFLINE (Ed25519 + grade re-derives from score)")
|
|
53
|
+
.option("--file <file>", "posture certificate JSON")
|
|
54
|
+
.action((o) => {
|
|
55
|
+
let raw = "";
|
|
56
|
+
try {
|
|
57
|
+
raw = o.file ? readFileSync(o.file, "utf8") : readFileSync(0, "utf8");
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
out("⛔ provide --file <posture.json>");
|
|
61
|
+
process.exitCode = 2;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let receipt;
|
|
65
|
+
try {
|
|
66
|
+
receipt = JSON.parse(raw);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
out("⛔ not valid JSON");
|
|
70
|
+
process.exitCode = 2;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const v = posture.verifyPosture(receipt);
|
|
74
|
+
out(v.valid ? `🟢 VALID — grade ${v.grade} (${v.score}/100)` : `🔴 INVALID — ${v.reason}`);
|
|
75
|
+
if (!v.valid)
|
|
76
|
+
process.exitCode = 1;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=posture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posture.js","sourceRoot":"","sources":["../../src/commands/posture.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjE,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;SACjC,WAAW,CAAC,oSAAoS,CAAC,CAAC;IAErT,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,kFAAkF,CAAC;SAC9G,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC;SAC7C,MAAM,CAAC,cAAc,EAAE,2CAA2C,CAAC;SACnE,MAAM,CAAC,QAAQ,EAAE,uBAAuB,CAAC;SACzC,MAAM,CAAC,CAAC,CAAkD,EAAE,EAAE;QAC7D,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,IAAI,CAAC;YAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CA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,OAAO;QAAC,CAAC;QACnG,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3F,IAAI,CAAC,CAAC,CAAC,KAAK;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsNA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAynNvD"}
|
package/dist/index.js
CHANGED
|
@@ -143,6 +143,8 @@ import { registerCosmosCommands } from "./commands/cosmos.js";
|
|
|
143
143
|
import { registerLedgerCommands } from "./commands/honesty_ledger.js";
|
|
144
144
|
import { registerMutagenCommands } from "./commands/mutagen.js";
|
|
145
145
|
import { registerEscalonCommands } from "./commands/escalon.js";
|
|
146
|
+
import { registerPostureCommands } from "./commands/posture.js";
|
|
147
|
+
import { registerCompareCommands } from "./commands/compare.js";
|
|
146
148
|
import { registerMoatCommands } from "./commands/moat.js";
|
|
147
149
|
import { attachRegretOracle } from "./commands/regret.js";
|
|
148
150
|
import { registerTrustCommands } from "./commands/trust.js";
|
|
@@ -4843,6 +4845,8 @@ export async function run(argv) {
|
|
|
4843
4845
|
registerLedgerCommands(program);
|
|
4844
4846
|
registerMutagenCommands(program);
|
|
4845
4847
|
registerEscalonCommands(program);
|
|
4848
|
+
registerPostureCommands(program);
|
|
4849
|
+
registerCompareCommands(program);
|
|
4846
4850
|
registerMoatCommands(program);
|
|
4847
4851
|
// ─── Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
|
|
4848
4852
|
registerTrustCommands(program);
|