mneme-ai 3.145.0 → 3.146.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,11 @@
1
+ /**
2
+ * `mneme escalon` (v3.146.0) — the agent TOOL-GRAPH vulnerability analyzer.
3
+ *
4
+ * analyze — given a tool manifest (JSON: [{id, capabilities, consumes, produces, description}]),
5
+ * find tool-chain privilege-escalation paths + poisoned tool descriptions.
6
+ *
7
+ * mneme escalon analyze --file tools.json
8
+ */
9
+ import type { Command } from "commander";
10
+ export declare function registerEscalonCommands(program: Command): void;
11
+ //# sourceMappingURL=escalon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escalon.d.ts","sourceRoot":"","sources":["../../src/commands/escalon.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqB9D"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * `mneme escalon` (v3.146.0) — the agent TOOL-GRAPH vulnerability analyzer.
3
+ *
4
+ * analyze — given a tool manifest (JSON: [{id, capabilities, consumes, produces, description}]),
5
+ * find tool-chain privilege-escalation paths + poisoned tool descriptions.
6
+ *
7
+ * mneme escalon analyze --file tools.json
8
+ */
9
+ import { readFileSync } from "node:fs";
10
+ import { escalon } from "@mneme-ai/core";
11
+ function out(s) { process.stdout.write(s + "\n"); }
12
+ export function registerEscalonCommands(program) {
13
+ const c = program.command("escalon")
14
+ .description("🔗 ESCALON — analyze an AI agent's TOOL GRAPH for (1) tool-chain privilege escalation (safe tools that compose into a dangerous capability — the confused deputy) and (2) MCP tool-poisoning (injection hidden in a tool's description). Deterministic, no LLM. ★HONEST: reasons over the DECLARED capabilities — surfaces reachable paths to inspect, not a proven runtime exploit.");
15
+ c.command("analyze").description("find privilege-escalation chains + poisoned descriptions in a tool manifest")
16
+ .option("--file <file>", "tool manifest JSON: [{id, capabilities:[], consumes:[], produces:[], description}]")
17
+ .option("--json", "JSON")
18
+ .action((o) => {
19
+ let raw = "";
20
+ try {
21
+ raw = o.file ? readFileSync(o.file, "utf8") : readFileSync(0, "utf8");
22
+ }
23
+ catch {
24
+ out("⛔ provide --file <tools.json> (or pipe the manifest on stdin)");
25
+ process.exitCode = 2;
26
+ return;
27
+ }
28
+ let tools;
29
+ try {
30
+ tools = JSON.parse(raw);
31
+ }
32
+ catch {
33
+ out("⛔ not valid JSON");
34
+ process.exitCode = 2;
35
+ return;
36
+ }
37
+ const r = escalon.analyze(tools);
38
+ if (o.json) {
39
+ out(JSON.stringify(r, null, 2));
40
+ return;
41
+ }
42
+ const mark = r.verdict === "DANGER" ? "🔴" : r.verdict === "REVIEW" ? "🟠" : "🟢";
43
+ out(`${mark} ESCALON — ${r.verdict} · ${r.tools} tools · ${r.escalations.length} escalation path(s) · ${r.poisoned.length} poisoned · ${r.critical} critical`);
44
+ for (const e of r.escalations.slice(0, 8))
45
+ out(` ${e.severity >= 80 && !e.gated ? "🔴" : "🟠"} [sev ${e.severity}] ${e.tools.join(" → ")} ⇒ ${e.sink}${e.gated ? " (gated)" : ""}`);
46
+ for (const p of r.poisoned)
47
+ out(` ☣ poisoned: ${p.tool} — "${p.excerpt}"`);
48
+ if (r.verdict === "CLEAN")
49
+ out(` ✅ no escalation path or poisoned description found.`);
50
+ });
51
+ }
52
+ //# sourceMappingURL=escalon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escalon.js","sourceRoot":"","sources":["../../src/commands/escalon.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC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],"names":[],"mappings":"AAoNA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAunNvD"}
package/dist/index.js CHANGED
@@ -142,6 +142,7 @@ import { registerArkCommands } from "./commands/ark.js";
142
142
  import { registerCosmosCommands } from "./commands/cosmos.js";
143
143
  import { registerLedgerCommands } from "./commands/honesty_ledger.js";
144
144
  import { registerMutagenCommands } from "./commands/mutagen.js";
145
+ import { registerEscalonCommands } from "./commands/escalon.js";
145
146
  import { registerMoatCommands } from "./commands/moat.js";
146
147
  import { attachRegretOracle } from "./commands/regret.js";
147
148
  import { registerTrustCommands } from "./commands/trust.js";
@@ -4841,6 +4842,7 @@ export async function run(argv) {
4841
4842
  registerCosmosCommands(program);
4842
4843
  registerLedgerCommands(program);
4843
4844
  registerMutagenCommands(program);
4845
+ registerEscalonCommands(program);
4844
4846
  registerMoatCommands(program);
4845
4847
  // ─── Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
4846
4848
  registerTrustCommands(program);