mneme-ai 2.128.0 → 2.130.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/firewall.d.ts +12 -0
- package/dist/commands/firewall.d.ts.map +1 -0
- package/dist/commands/firewall.js +80 -0
- package/dist/commands/firewall.js.map +1 -0
- package/dist/commands/settlement.d.ts +13 -0
- package/dist/commands/settlement.d.ts.map +1 -0
- package/dist/commands/settlement.js +104 -0
- package/dist/commands/settlement.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 +5 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme firewall` (v2.130.0) — Structural Context Firewall against Indirect
|
|
3
|
+
* Prompt Injection (OWASP LLM01). Scan content an agent is about to read; detect
|
|
4
|
+
* + neutralize known injection patterns hidden in comments/strings, and wrap it
|
|
5
|
+
* in an untrusted-data boundary so the model treats it as DATA, never commands.
|
|
6
|
+
*
|
|
7
|
+
* cat suspect.ts | mneme firewall scan # verdict + findings
|
|
8
|
+
* cat external-dep.ts | mneme firewall fortify # → safe-to-read content (neutralized + wrapped)
|
|
9
|
+
*/
|
|
10
|
+
import type { Command } from "commander";
|
|
11
|
+
export declare function registerFirewallCommands(program: Command): void;
|
|
12
|
+
//# sourceMappingURL=firewall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firewall.d.ts","sourceRoot":"","sources":["../../src/commands/firewall.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+B/D"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme firewall` (v2.130.0) — Structural Context Firewall against Indirect
|
|
3
|
+
* Prompt Injection (OWASP LLM01). Scan content an agent is about to read; detect
|
|
4
|
+
* + neutralize known injection patterns hidden in comments/strings, and wrap it
|
|
5
|
+
* in an untrusted-data boundary so the model treats it as DATA, never commands.
|
|
6
|
+
*
|
|
7
|
+
* cat suspect.ts | mneme firewall scan # verdict + findings
|
|
8
|
+
* cat external-dep.ts | mneme firewall fortify # → safe-to-read content (neutralized + wrapped)
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
11
|
+
import { firewall } from "@mneme-ai/core";
|
|
12
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
13
|
+
function readStdin() {
|
|
14
|
+
return new Promise((resolve) => {
|
|
15
|
+
if (process.stdin.isTTY)
|
|
16
|
+
return resolve("");
|
|
17
|
+
let d = "";
|
|
18
|
+
let done = false;
|
|
19
|
+
const fin = () => { if (!done) {
|
|
20
|
+
done = true;
|
|
21
|
+
resolve(d);
|
|
22
|
+
} };
|
|
23
|
+
process.stdin.setEncoding("utf8");
|
|
24
|
+
process.stdin.on("data", (c) => { d += c; if (d.length > 8_000_000)
|
|
25
|
+
fin(); });
|
|
26
|
+
process.stdin.on("end", fin);
|
|
27
|
+
process.stdin.on("error", fin);
|
|
28
|
+
setTimeout(fin, 4000);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async function getPayload(opts) {
|
|
32
|
+
if (typeof opts.text === "string")
|
|
33
|
+
return opts.text;
|
|
34
|
+
if (opts.file && existsSync(opts.file)) {
|
|
35
|
+
try {
|
|
36
|
+
return readFileSync(opts.file, "utf8");
|
|
37
|
+
}
|
|
38
|
+
catch { /* */ }
|
|
39
|
+
}
|
|
40
|
+
return readStdin();
|
|
41
|
+
}
|
|
42
|
+
export function registerFirewallCommands(program) {
|
|
43
|
+
const fw = program.command("firewall").description("🧱 STRUCTURAL CONTEXT FIREWALL — defend against Indirect Prompt Injection (OWASP LLM01): scan content for injection hidden in comments/strings + neutralize it, and wrap it as untrusted DATA so the model never obeys instructions buried in a file. Defense-in-depth, not a 100% guarantee against unknown attacks.");
|
|
44
|
+
fw.command("scan")
|
|
45
|
+
.description("Scan content (stdin/--file/--text). Verdict clean | flagged | blocked + findings (line, category). Exit 2 on blocked.")
|
|
46
|
+
.option("--text <t>", "inline content.")
|
|
47
|
+
.option("--file <p>", "read from a file.")
|
|
48
|
+
.option("--json", "JSON output.")
|
|
49
|
+
.action(async (opts) => {
|
|
50
|
+
const r = firewall.scanInjection(await getPayload(opts));
|
|
51
|
+
if (opts.json) {
|
|
52
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
const icon = r.verdict === "blocked" ? "🛑" : r.verdict === "flagged" ? "⚠️" : "✓";
|
|
56
|
+
out(`${icon} FIREWALL ${r.verdict.toUpperCase()} — ${r.findings.length} finding(s), ${r.neutralizedCount} neutralized`);
|
|
57
|
+
for (const f of r.findings.slice(0, 12))
|
|
58
|
+
out(` • L${f.line} [${f.severity}] ${f.category}: ${f.snippet}`);
|
|
59
|
+
if (r.verdict !== "clean")
|
|
60
|
+
out(` → read the FORTIFIED form (mneme firewall fortify) instead of the raw file.`);
|
|
61
|
+
}
|
|
62
|
+
if (r.verdict === "blocked")
|
|
63
|
+
process.exitCode = 2;
|
|
64
|
+
});
|
|
65
|
+
fw.command("fortify")
|
|
66
|
+
.description("Emit the safe-to-read form: known injections neutralized + content wrapped in an untrusted-data boundary (the always-on, attack-agnostic separation). Read THIS instead of the raw file.")
|
|
67
|
+
.option("--text <t>", "inline content.")
|
|
68
|
+
.option("--file <p>", "read from a file.")
|
|
69
|
+
.option("--json", "JSON output (fortified + findings).")
|
|
70
|
+
.action(async (opts) => {
|
|
71
|
+
const r = firewall.fortify(await getPayload(opts), opts.file ? { path: opts.file } : undefined);
|
|
72
|
+
if (opts.json) {
|
|
73
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
process.stdout.write(r.fortified + "\n");
|
|
77
|
+
process.stderr.write(`🧱 firewall: ${r.verdict} · ${r.neutralizedCount} injection(s) neutralized · wrapped as untrusted data\n`);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=firewall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firewall.js","sourceRoot":"","sources":["../../src/commands/firewall.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACjE,SAAS,SAAS;IAChB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,EAAE,CAAC;QAAC,IAAI,IAAI,GAAG,KAAK,CAAC;QAAC,MAAM,GAAG,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAAC,IAAI,GAAG,IAAI,CAAC;YAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC,CAAC,CAAC,CAAC;QAC5F,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,SAAS;YAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACjH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,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,CAAC,SAAS,CAAC,CAAC;QAChG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACnF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,gBAAgB,yDAAyD,CAAC,CAAC;IACnI,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme settlement` (v2.129.0) — the Context Transaction Settlement Ledger:
|
|
3
|
+
* a signed, hash-chained, offline-auditable record of every AI↔local context
|
|
4
|
+
* exchange (what was blinded, what changed, whether it passed local verify, the
|
|
5
|
+
* tokens metered). The honest "Stripe of AI Context / settlement layer".
|
|
6
|
+
*
|
|
7
|
+
* mneme settlement record --tx '{"kind":"channel-op","namesHidden":3,"localVerified":"pass","tokensSent":40,"tokensSaved":600}'
|
|
8
|
+
* mneme settlement verify
|
|
9
|
+
* mneme settlement statement --price-per-1k 0.003 --fee-pct 0.10
|
|
10
|
+
*/
|
|
11
|
+
import type { Command } from "commander";
|
|
12
|
+
export declare function registerSettlementCommands(program: Command): void;
|
|
13
|
+
//# sourceMappingURL=settlement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement.d.ts","sourceRoot":"","sources":["../../src/commands/settlement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8CjE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme settlement` (v2.129.0) — the Context Transaction Settlement Ledger:
|
|
3
|
+
* a signed, hash-chained, offline-auditable record of every AI↔local context
|
|
4
|
+
* exchange (what was blinded, what changed, whether it passed local verify, the
|
|
5
|
+
* tokens metered). The honest "Stripe of AI Context / settlement layer".
|
|
6
|
+
*
|
|
7
|
+
* mneme settlement record --tx '{"kind":"channel-op","namesHidden":3,"localVerified":"pass","tokensSent":40,"tokensSaved":600}'
|
|
8
|
+
* mneme settlement verify
|
|
9
|
+
* mneme settlement statement --price-per-1k 0.003 --fee-pct 0.10
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync, readFileSync, appendFileSync, mkdirSync } from "node:fs";
|
|
12
|
+
import { join, dirname } from "node:path";
|
|
13
|
+
import { settlement, notary } from "@mneme-ai/core";
|
|
14
|
+
const LEDGER = ".mneme/settlement/ledger.jsonl";
|
|
15
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
16
|
+
function outJson(o) { process.stdout.write(JSON.stringify(o, null, 2) + "\n"); }
|
|
17
|
+
function loadRecords(cwd) {
|
|
18
|
+
try {
|
|
19
|
+
const p = join(cwd, LEDGER);
|
|
20
|
+
if (!existsSync(p))
|
|
21
|
+
return [];
|
|
22
|
+
return readFileSync(p, "utf8").split(/\r?\n/).filter(Boolean).map((l) => JSON.parse(l));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function registerSettlementCommands(program) {
|
|
29
|
+
const s = program.command("settlement").description("💳 CONTEXT TRANSACTION SETTLEMENT LEDGER — a signed, hash-chained, offline-auditable record of every AI↔local context exchange (blinded-proof + local-verify-proof + token metering). The honest 'Stripe of AI Context' settlement/audit layer.");
|
|
30
|
+
s.command("record")
|
|
31
|
+
.description("Append one context transaction to the chained ledger (links to the previous record's hash).")
|
|
32
|
+
.requiredOption("--tx <json>", "the transaction: {kind, sentHash?, namesHidden?, secretsRemoved?, localVerified?, tokensSent?, tokensSaved?, note?}")
|
|
33
|
+
.option("--json", "JSON output.")
|
|
34
|
+
.action((opts) => {
|
|
35
|
+
const cwd = process.cwd();
|
|
36
|
+
let txIn;
|
|
37
|
+
try {
|
|
38
|
+
txIn = JSON.parse(opts.tx);
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
out(`✗ invalid --tx JSON: ${e.message}`);
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const records = loadRecords(cwd);
|
|
46
|
+
const prev = records.length ? records[records.length - 1].chainHash : "0".repeat(64);
|
|
47
|
+
const rec = settlement.recordTx(prev, txIn, records.length + 1);
|
|
48
|
+
let receipt = null;
|
|
49
|
+
try {
|
|
50
|
+
receipt = notary.issueReceipt(cwd, { kind: "protocol-hop", subject: `settlement:${rec.tx.seq}`, payload: { chainHash: rec.chainHash, seq: rec.tx.seq }, includePayload: true });
|
|
51
|
+
}
|
|
52
|
+
catch { /* */ }
|
|
53
|
+
try {
|
|
54
|
+
const p = join(cwd, LEDGER);
|
|
55
|
+
if (!existsSync(dirname(p)))
|
|
56
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
57
|
+
appendFileSync(p, JSON.stringify(rec) + "\n");
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
out(`✗ append failed: ${e.message}`);
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (opts.json) {
|
|
65
|
+
outJson({ record: rec, signed: receipt });
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
out(`💳 tx#${rec.tx.seq} ${rec.tx.kind} recorded · chain ${rec.chainHash.slice(0, 12)}… · sent ~${rec.tx.tokensSent} tok, saved ~${rec.tx.tokensSaved} tok${receipt ? " · signed" : ""}`);
|
|
69
|
+
});
|
|
70
|
+
s.command("verify")
|
|
71
|
+
.description("Recompute the chain offline + report tamper (returns the first broken seq). Exit 2 if broken.")
|
|
72
|
+
.option("--json", "JSON output.")
|
|
73
|
+
.action((opts) => {
|
|
74
|
+
const cwd = process.cwd();
|
|
75
|
+
const v = settlement.verifyChain(loadRecords(cwd));
|
|
76
|
+
if (opts.json) {
|
|
77
|
+
outJson(v);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
out(v.ok ? `✓ chain intact — ${v.length} transaction(s) verify offline` : `🛑 chain BROKEN at seq ${v.firstBrokenSeq}: ${v.note}`);
|
|
81
|
+
if (!v.ok)
|
|
82
|
+
process.exitCode = 2;
|
|
83
|
+
});
|
|
84
|
+
s.command("statement")
|
|
85
|
+
.description("A Visa-style settlement statement: tokens sent vs saved, % blinded, % locally-verified, chain integrity. --price-per-1k + --fee-pct (your numbers) add USD + the value-based fee.")
|
|
86
|
+
.option("--price-per-1k <usd>", "your vendor's price per 1k tokens (USD).", (v) => parseFloat(v))
|
|
87
|
+
.option("--fee-pct <f>", "value-based fee as a fraction of savings, e.g. 0.10 = 10%.", (v) => parseFloat(v))
|
|
88
|
+
.option("--json", "JSON output.")
|
|
89
|
+
.action((opts) => {
|
|
90
|
+
const cwd = process.cwd();
|
|
91
|
+
const st = settlement.settlementStatement(loadRecords(cwd), { pricePer1kUSD: opts.pricePer1k, feePct: opts.feePct });
|
|
92
|
+
if (opts.json) {
|
|
93
|
+
outJson(st);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
out(`💳 SETTLEMENT STATEMENT — ${st.txCount} context transaction(s)`);
|
|
97
|
+
out(` tokens: ~${st.totalTokensSent.toLocaleString()} sent · ~${st.totalTokensSaved.toLocaleString()} saved`);
|
|
98
|
+
if (typeof st.usdSaved === "number")
|
|
99
|
+
out(` value: $${st.usdSaved.toLocaleString()} saved${typeof st.feeUSD === "number" ? ` · fee @${(opts.feePct * 100)}% = $${st.feeUSD.toLocaleString()}` : ""} (at your rate)`);
|
|
100
|
+
out(` security: ${st.pctBlinded}% blinded · ${st.pctLocallyVerified}% locally-verified`);
|
|
101
|
+
out(` integrity: ${st.integrity.ok ? "✓ chain intact" : "🛑 BROKEN @seq " + st.integrity.firstBrokenSeq}`);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=settlement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement.js","sourceRoot":"","sources":["../../src/commands/settlement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,MAAM,GAAG,gCAAgC,CAAC;AAChD,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACjE,SAAS,OAAO,CAAC,CAAU,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/F,SAAS,WAAW,CAAC,GAAW;IAC9B,IAAI,CAAC;QAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,OAAO,EAAE,CAAC;QAAC,OAAO,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAA4B,CAAC,CA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C,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACrH,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACvC,GAAG,CAAC,6BAA6B,EAAE,CAAC,OAAO,yBAAyB,CAAC,CAAC;QACtE,GAAG,CAAC,eAAe,EAAE,CAAC,eAAe,CAAC,cAAc,EAAE,YAAY,EAAE,CAAC,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAChH,IAAI,OAAO,EAAE,CAAC,QAAQ,KAAK,QAAQ;YAAE,GAAG,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,SAAS,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAO,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;QACvN,GAAG,CAAC,gBAAgB,EAAE,CAAC,UAAU,eAAe,EAAE,CAAC,kBAAkB,oBAAoB,CAAC,CAAC;QAC3F,GAAG,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,GAAG,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC;IAC/G,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":"AA2JA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6gNvD"}
|
package/dist/index.js
CHANGED
|
@@ -86,6 +86,8 @@ import { registerOutlineCommands } from "./commands/outline.js";
|
|
|
86
86
|
import { registerScaffoldCommands } from "./commands/scaffold.js";
|
|
87
87
|
import { registerBlindCommands } from "./commands/blind.js";
|
|
88
88
|
import { registerChannelCommands } from "./commands/channel.js";
|
|
89
|
+
import { registerSettlementCommands } from "./commands/settlement.js";
|
|
90
|
+
import { registerFirewallCommands } from "./commands/firewall.js";
|
|
89
91
|
import { registerTrustCommands } from "./commands/trust.js";
|
|
90
92
|
import { registerNuclearCommands } from "./commands/nuclear-cli.js";
|
|
91
93
|
import { registerOvernightCommand } from "./commands/overnight.js";
|
|
@@ -4717,6 +4719,8 @@ export async function run(argv) {
|
|
|
4717
4719
|
registerScaffoldCommands(program);
|
|
4718
4720
|
registerBlindCommands(program);
|
|
4719
4721
|
registerChannelCommands(program);
|
|
4722
|
+
registerSettlementCommands(program);
|
|
4723
|
+
registerFirewallCommands(program);
|
|
4720
4724
|
// ─── Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
|
|
4721
4725
|
registerTrustCommands(program);
|
|
4722
4726
|
// ─── Wisdom reactor (v1.33.0) -- five nuclear-physics formulas as Mneme metrics
|