mneme-ai 3.143.0 → 3.145.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,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme mutagen` (v3.144.0) — the adversarial-mutation engine that finds an AI
|
|
3
|
+
* agent's guardrail holes BEFORE anyone exploits them.
|
|
4
|
+
*
|
|
5
|
+
* hunt — derive a population of novel attack variants (primitive × mutators)
|
|
6
|
+
* and report which BREACH a guardrail (default: Mneme's own normalization
|
|
7
|
+
* defense vs a naive substring guard, to show the gap).
|
|
8
|
+
* variants — list the derived attack variants (the searched space).
|
|
9
|
+
*
|
|
10
|
+
* mneme mutagen hunt
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from "commander";
|
|
13
|
+
export declare function registerMutagenCommands(program: Command): void;
|
|
14
|
+
//# sourceMappingURL=mutagen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutagen.d.ts","sourceRoot":"","sources":["../../src/commands/mutagen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8B9D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme mutagen` (v3.144.0) — the adversarial-mutation engine that finds an AI
|
|
3
|
+
* agent's guardrail holes BEFORE anyone exploits them.
|
|
4
|
+
*
|
|
5
|
+
* hunt — derive a population of novel attack variants (primitive × mutators)
|
|
6
|
+
* and report which BREACH a guardrail (default: Mneme's own normalization
|
|
7
|
+
* defense vs a naive substring guard, to show the gap).
|
|
8
|
+
* variants — list the derived attack variants (the searched space).
|
|
9
|
+
*
|
|
10
|
+
* mneme mutagen hunt
|
|
11
|
+
*/
|
|
12
|
+
import { mutagen } from "@mneme-ai/core";
|
|
13
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
14
|
+
export function registerMutagenCommands(program) {
|
|
15
|
+
const c = program.command("mutagen")
|
|
16
|
+
.description("🧬 MUTAGEN — derive NOVEL attack variants (primitive × mutator combos) and measure which slip past a guardrail. Finds the not-yet-seen attack by SEARCHING the mutation space, then self-hardens. ★HONEST: finds breaches in a given guard over a known space — not magic 'any bug'.");
|
|
17
|
+
c.command("hunt").description("derive attack variants + report breaches against the naive vs the sound guard")
|
|
18
|
+
.option("--combo <n>", "max mutators stacked per variant (1-3)", "2")
|
|
19
|
+
.option("--json", "JSON")
|
|
20
|
+
.action((o) => {
|
|
21
|
+
const maxCombo = parseInt(o.combo, 10) || 2;
|
|
22
|
+
const naive = mutagen.hunt(mutagen.naiveGuard, { maxCombo });
|
|
23
|
+
const sound = mutagen.hunt(mutagen.soundGuard, { maxCombo });
|
|
24
|
+
if (o.json) {
|
|
25
|
+
out(JSON.stringify({ naive, sound }, null, 2));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
out(`🧬 MUTAGEN — searched ${naive.tested} novel variants (${maxCombo}-deep mutator stacks)`);
|
|
29
|
+
out(` naive substring guard: ${Math.round(naive.breachRate * 100)}% BREACH (${naive.breaches.length}/${naive.tested} slip past)`);
|
|
30
|
+
out(` Mneme normalize guard: ${Math.round(sound.breachRate * 100)}% breach (${sound.breaches.length}/${sound.tested}) — caught ${Math.round(sound.caughtRate * 100)}%`);
|
|
31
|
+
out(` top "killer combos" vs the naive guard (the mutator stacks that breach most):`);
|
|
32
|
+
for (const k of naive.killerCombos.slice(0, 5))
|
|
33
|
+
out(` ✦ [${k.mutators}] — ${k.breaches} breaches`);
|
|
34
|
+
if (sound.breaches.length) {
|
|
35
|
+
out(` residual holes MUTAGEN found in Mneme's OWN guard (honest):`);
|
|
36
|
+
for (const k of sound.killerCombos.slice(0, 3))
|
|
37
|
+
out(` ⚠ [${k.mutators}] — ${k.breaches}`);
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
out(` ✅ Mneme's normalize guard caught EVERY derived variant.`);
|
|
41
|
+
});
|
|
42
|
+
c.command("variants").description("list the derived attack variants (the searched mutation space)")
|
|
43
|
+
.option("--combo <n>", "max mutators stacked", "2").option("--limit <n>", "max shown", "20")
|
|
44
|
+
.action((o) => {
|
|
45
|
+
const v = mutagen.deriveVariants(undefined, undefined, { maxCombo: parseInt(o.combo, 10) || 2 });
|
|
46
|
+
out(`🧬 ${v.length} derived variants (showing ${Math.min(v.length, parseInt(o.limit, 10) || 20)}):`);
|
|
47
|
+
for (const x of v.slice(0, parseInt(o.limit, 10) || 20))
|
|
48
|
+
out(` [${x.class}] ${x.id}`);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=mutagen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutagen.js","sourceRoot":"","sources":["../../src/commands/mutagen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;SACjC,WAAW,CAAC,sRAAsR,CAAC,CAAC;IAEvS,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,+EAA+E,CAAC;SAC3G,MAAM,CAAC,aAAa,EAAE,wCAAwC,EAAE,GAAG,CAAC;SACpE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;SACxB,MAAM,CAAC,CAAC,CAAoC,EAAE,EAAE;QAC/C,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,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["../src/index.ts"],"names":[],"mappings":"AAmNA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsnNvD"}
|
package/dist/index.js
CHANGED
|
@@ -141,6 +141,7 @@ import { registerLaunchCommands } from "./commands/launch.js";
|
|
|
141
141
|
import { registerArkCommands } from "./commands/ark.js";
|
|
142
142
|
import { registerCosmosCommands } from "./commands/cosmos.js";
|
|
143
143
|
import { registerLedgerCommands } from "./commands/honesty_ledger.js";
|
|
144
|
+
import { registerMutagenCommands } from "./commands/mutagen.js";
|
|
144
145
|
import { registerMoatCommands } from "./commands/moat.js";
|
|
145
146
|
import { attachRegretOracle } from "./commands/regret.js";
|
|
146
147
|
import { registerTrustCommands } from "./commands/trust.js";
|
|
@@ -4839,6 +4840,7 @@ export async function run(argv) {
|
|
|
4839
4840
|
registerArkCommands(program);
|
|
4840
4841
|
registerCosmosCommands(program);
|
|
4841
4842
|
registerLedgerCommands(program);
|
|
4843
|
+
registerMutagenCommands(program);
|
|
4842
4844
|
registerMoatCommands(program);
|
|
4843
4845
|
// ─── Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
|
|
4844
4846
|
registerTrustCommands(program);
|