mneme-ai 2.106.0 → 2.108.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/dig.d.ts +11 -0
- package/dist/commands/dig.d.ts.map +1 -0
- package/dist/commands/dig.js +175 -0
- package/dist/commands/dig.js.map +1 -0
- package/dist/commands/entropy.d.ts +9 -0
- package/dist/commands/entropy.d.ts.map +1 -0
- package/dist/commands/entropy.js +148 -0
- package/dist/commands/entropy.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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme dig` (v2.107.0) — DATA ARCHAEOLOGY. Distill PUBLIC content (that
|
|
3
|
+
* YOU fetched — a file, or an agent's WebFetch) into dense, signed,
|
|
4
|
+
* provenance-tracked facts, deduped + contradiction-gated through the
|
|
5
|
+
* Cognitive Cortex. Plus a robots/rate policy you clear before fetching, so
|
|
6
|
+
* ingest stays legitimate. Mneme never crawls — it makes what you ingest
|
|
7
|
+
* cryptographically accountable. Total: never throws.
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from "commander";
|
|
10
|
+
export declare function registerDigCommands(program: Command): void;
|
|
11
|
+
//# sourceMappingURL=dig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dig.d.ts","sourceRoot":"","sources":["../../src/commands/dig.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuE1D"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme dig` (v2.107.0) — DATA ARCHAEOLOGY. Distill PUBLIC content (that
|
|
3
|
+
* YOU fetched — a file, or an agent's WebFetch) into dense, signed,
|
|
4
|
+
* provenance-tracked facts, deduped + contradiction-gated through the
|
|
5
|
+
* Cognitive Cortex. Plus a robots/rate policy you clear before fetching, so
|
|
6
|
+
* ingest stays legitimate. Mneme never crawls — it makes what you ingest
|
|
7
|
+
* cryptographically accountable. Total: never throws.
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, appendFileSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
function writeJson(p) { process.stdout.write(JSON.stringify(p, null, 2) + "\n"); }
|
|
12
|
+
function writeText(l) { process.stdout.write(l + "\n"); }
|
|
13
|
+
async function core() {
|
|
14
|
+
try {
|
|
15
|
+
const c = (await import("@mneme-ai/core"));
|
|
16
|
+
if (c.archaeology && c.cortex)
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
catch { /* */ }
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
function provPath(cwd) { return join(cwd, ".mneme", "archaeology", "provenance.jsonl"); }
|
|
23
|
+
function cortexPath(cwd) { return join(cwd, ".mneme", "cortex", "store.json"); }
|
|
24
|
+
export function registerDigCommands(program) {
|
|
25
|
+
const d = program
|
|
26
|
+
.command("dig")
|
|
27
|
+
.description("⛏ DATA ARCHAEOLOGY — distill PUBLIC content into dense, SIGNED, provenance-tracked facts (deduped + contradiction-gated via the cortex). Every fact proves where it came from. `dig policy` checks robots before you fetch; `dig ingest` absorbs what you fetched; `dig provenance` proves a fact's source. Mneme never crawls — it makes ingest accountable.");
|
|
28
|
+
d.command("policy <url>")
|
|
29
|
+
.description("Clear a source BEFORE fetching: is this URL path allowed by robots.txt? (pass the fetched robots.txt with --robots-file). Keeps ingest legitimate.")
|
|
30
|
+
.option("--robots-file <f>", "path to the source's robots.txt")
|
|
31
|
+
.option("--agent <ua>", "user-agent", "mneme")
|
|
32
|
+
.option("--json", "JSON output.")
|
|
33
|
+
.action(async (url, opts) => {
|
|
34
|
+
const m = await core();
|
|
35
|
+
if (!m) {
|
|
36
|
+
writeText("✗ core unavailable");
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let robots = "";
|
|
41
|
+
try {
|
|
42
|
+
if (opts.robotsFile && existsSync(opts.robotsFile))
|
|
43
|
+
robots = readFileSync(opts.robotsFile, "utf8");
|
|
44
|
+
}
|
|
45
|
+
catch { /* */ }
|
|
46
|
+
let path = "/";
|
|
47
|
+
try {
|
|
48
|
+
path = new URL(url).pathname;
|
|
49
|
+
}
|
|
50
|
+
catch { /* */ }
|
|
51
|
+
const rules = m.archaeology.parseRobots(robots, opts.agent ?? "mneme");
|
|
52
|
+
const allowed = m.archaeology.isPathAllowed(rules, path);
|
|
53
|
+
if (opts.json) {
|
|
54
|
+
writeJson({ url, path, allowed, crawlDelaySec: rules.crawlDelaySec });
|
|
55
|
+
process.exitCode = allowed ? 0 : 1;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
writeText(allowed ? `✓ allowed — ${path}${rules.crawlDelaySec ? ` (respect crawl-delay ${rules.crawlDelaySec}s)` : ""}` : `✗ DISALLOWED by robots.txt — do not fetch ${path}`);
|
|
59
|
+
process.exitCode = allowed ? 0 : 1;
|
|
60
|
+
});
|
|
61
|
+
d.command("ingest")
|
|
62
|
+
.description("Distill fetched content into signed provenance-facts → append to the provenance ledger + contribute each to the cortex (deduped + contradiction-gated).")
|
|
63
|
+
.requiredOption("--url <u>", "the source URL (provenance)")
|
|
64
|
+
.option("--file <f>", "file with the fetched content")
|
|
65
|
+
.option("--content <c>", "inline content (else --file)")
|
|
66
|
+
.option("--max <n>", "max facts to distill", (v) => parseInt(v, 10), 50)
|
|
67
|
+
.option("--json", "JSON output.")
|
|
68
|
+
.action(async (opts) => {
|
|
69
|
+
const m = await core();
|
|
70
|
+
if (!m) {
|
|
71
|
+
writeText("✗ core unavailable");
|
|
72
|
+
process.exitCode = 1;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const cwd = process.cwd();
|
|
76
|
+
let content = opts.content ?? "";
|
|
77
|
+
if (!content && opts.file) {
|
|
78
|
+
try {
|
|
79
|
+
if (existsSync(opts.file))
|
|
80
|
+
content = readFileSync(opts.file, "utf8");
|
|
81
|
+
}
|
|
82
|
+
catch { /* */ }
|
|
83
|
+
}
|
|
84
|
+
if (!content) {
|
|
85
|
+
writeText("✗ no content (pass --file or --content)");
|
|
86
|
+
process.exitCode = 1;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const ing = m.archaeology.ingestSource(cwd, { url: opts.url, content, fetchedAt: Date.now() }, Date.now(), opts.max ?? 50);
|
|
90
|
+
// append to the signed provenance ledger
|
|
91
|
+
try {
|
|
92
|
+
const dir = join(cwd, ".mneme", "archaeology");
|
|
93
|
+
if (!existsSync(dir))
|
|
94
|
+
mkdirSync(dir, { recursive: true });
|
|
95
|
+
for (const f of ing.facts)
|
|
96
|
+
appendFileSync(provPath(cwd), JSON.stringify(f) + "\n");
|
|
97
|
+
}
|
|
98
|
+
catch { /* */ }
|
|
99
|
+
// contribute statements to the cortex
|
|
100
|
+
let store = { v: 1, entries: [] };
|
|
101
|
+
try {
|
|
102
|
+
if (existsSync(cortexPath(cwd)))
|
|
103
|
+
store = JSON.parse(readFileSync(cortexPath(cwd), "utf8"));
|
|
104
|
+
}
|
|
105
|
+
catch { /* */ }
|
|
106
|
+
const tally = {};
|
|
107
|
+
for (const f of ing.facts) {
|
|
108
|
+
const o = m.cortex.contribute(cwd, store, { agent: "archaeology", key: f.key, value: `${f.statement} [src: ${f.sourceUrl}]`, kind: "fact" }, Date.now());
|
|
109
|
+
store = o.store;
|
|
110
|
+
tally[o.result.verdict] = (tally[o.result.verdict] ?? 0) + 1;
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
const dir = join(cwd, ".mneme", "cortex");
|
|
114
|
+
if (!existsSync(dir))
|
|
115
|
+
mkdirSync(dir, { recursive: true });
|
|
116
|
+
writeFileSync(cortexPath(cwd), JSON.stringify(store, null, 2));
|
|
117
|
+
}
|
|
118
|
+
catch { /* */ }
|
|
119
|
+
if (opts.json) {
|
|
120
|
+
writeJson({ url: opts.url, distilled: ing.distilled, contentHash: ing.contentHash, cortex: tally });
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
writeText(`⛏ ingested ${opts.url}`);
|
|
124
|
+
writeText(` distilled ${ing.distilled} signed fact(s) → provenance ledger + cortex (${Object.entries(tally).map(([k, v]) => `${v} ${k}`).join(", ") || "—"})`);
|
|
125
|
+
for (const f of ing.facts.slice(0, 5))
|
|
126
|
+
writeText(` • ${f.statement.slice(0, 70)}`);
|
|
127
|
+
});
|
|
128
|
+
d.command("provenance <query>")
|
|
129
|
+
.description("Prove where an ingested fact came from: find matching facts in the signed ledger + verify each offline.")
|
|
130
|
+
.option("--json", "JSON output.")
|
|
131
|
+
.action(async (query, opts) => {
|
|
132
|
+
const m = await core();
|
|
133
|
+
if (!m) {
|
|
134
|
+
writeText("✗ core unavailable");
|
|
135
|
+
process.exitCode = 1;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const cwd = process.cwd();
|
|
139
|
+
if (!existsSync(provPath(cwd))) {
|
|
140
|
+
writeText("· no provenance ledger yet — run `mneme dig ingest` first");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const q = query.toLowerCase().split(/\W+/).filter((t) => t.length > 1);
|
|
144
|
+
const hits = [];
|
|
145
|
+
try {
|
|
146
|
+
for (const line of readFileSync(provPath(cwd), "utf8").split("\n")) {
|
|
147
|
+
if (!line.trim())
|
|
148
|
+
continue;
|
|
149
|
+
let f;
|
|
150
|
+
try {
|
|
151
|
+
f = JSON.parse(line);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
const hay = String(f.statement ?? "").toLowerCase();
|
|
157
|
+
if (q.some((t) => hay.includes(t)))
|
|
158
|
+
hits.push({ statement: String(f.statement), sourceUrl: String(f.sourceUrl), verified: m.archaeology.verifyProvenance(f).bound });
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch { /* */ }
|
|
162
|
+
if (opts.json) {
|
|
163
|
+
writeJson(hits.slice(0, 20));
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (hits.length === 0) {
|
|
167
|
+
writeText("· no ingested fact matches that query");
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
writeText(`PROVENANCE — ${hits.length} fact(s):`);
|
|
171
|
+
for (const h of hits.slice(0, 20))
|
|
172
|
+
writeText(` ${h.verified ? "✓" : "✗"} "${h.statement.slice(0, 60)}" ← ${h.sourceUrl}`);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=dig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dig.js","sourceRoot":"","sources":["../../src/commands/dig.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,SAAS,SAAS,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;AACjG,SAAS,SAAS,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAWvE,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QAAC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAwB,CAAC;QAAC,IAAI,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,MAAM;YAAE,O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AC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;oBAAE,IAAI,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YACvK,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;QACjB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACxD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC;YAAC,OAAO;QAAC,CAAC;QACtF,SAAS,CAAC,gBAAgB,IAAI,CAAC,MAAM,WAAW,CAAC,CAAC;QAClD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;YAAE,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IAC9H,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme entropy` (v2.108.0) — audited multi-source secrets. Mixes the OS
|
|
3
|
+
* CSPRNG + timing jitter + any physical/beacon sample you feed it, health-
|
|
4
|
+
* checks them, and emits a secret with a SIGNED provenance attestation
|
|
5
|
+
* (which sources, their health, the secret's hash — never the secret). Total.
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from "commander";
|
|
8
|
+
export declare function registerEntropyCommands(program: Command): void;
|
|
9
|
+
//# sourceMappingURL=entropy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entropy.d.ts","sourceRoot":"","sources":["../../src/commands/entropy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgCzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4D9D"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme entropy` (v2.108.0) — audited multi-source secrets. Mixes the OS
|
|
3
|
+
* CSPRNG + timing jitter + any physical/beacon sample you feed it, health-
|
|
4
|
+
* checks them, and emits a secret with a SIGNED provenance attestation
|
|
5
|
+
* (which sources, their health, the secret's hash — never the secret). Total.
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { randomBytes } from "node:crypto";
|
|
10
|
+
function writeJson(p) { process.stdout.write(JSON.stringify(p, null, 2) + "\n"); }
|
|
11
|
+
function writeText(l) { process.stdout.write(l + "\n"); }
|
|
12
|
+
async function core() {
|
|
13
|
+
try {
|
|
14
|
+
const c = (await import("@mneme-ai/core"));
|
|
15
|
+
if (c.entropy)
|
|
16
|
+
return c;
|
|
17
|
+
}
|
|
18
|
+
catch { /* */ }
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
/** Gather a (weak, supplementary) timing-jitter sample — defense in depth. */
|
|
22
|
+
function jitterSample(rounds = 4096) {
|
|
23
|
+
const acc = [];
|
|
24
|
+
let prev = Number(process.hrtime.bigint() & 0xffn);
|
|
25
|
+
for (let i = 0; i < rounds; i++) {
|
|
26
|
+
const t = Number(process.hrtime.bigint() & 0xffn);
|
|
27
|
+
acc.push((t ^ prev) & 0xff);
|
|
28
|
+
prev = t;
|
|
29
|
+
if (acc.length >= 256)
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
return Buffer.from(acc);
|
|
33
|
+
}
|
|
34
|
+
export function registerEntropyCommands(program) {
|
|
35
|
+
const e = program
|
|
36
|
+
.command("entropy")
|
|
37
|
+
.description("🎲 AUDITED ENTROPY — generate secrets/keys by MIXING every entropy source you have (OS CSPRNG + timing jitter + any physical/beacon sample), health-checked, with a SIGNED provenance attestation. Defense-in-depth + auditable; NOT a claim of magic unhackability.");
|
|
38
|
+
e.command("gen")
|
|
39
|
+
.description("Generate a secret from mixed, health-checked sources + a signed provenance attestation.")
|
|
40
|
+
.option("--bytes <n>", "secret length in bytes", (v) => parseInt(v, 10), 32)
|
|
41
|
+
.option("--physical <s>", "a physical/external sample to mix in (sensor reading, dice rolls, etc.)")
|
|
42
|
+
.option("--beacon-file <f>", "file with public randomness-beacon bytes to mix in")
|
|
43
|
+
.option("--hash-only", "print only the secret's hash + attestation (don't reveal the secret)")
|
|
44
|
+
.option("--json", "JSON output.")
|
|
45
|
+
.action(async (opts) => {
|
|
46
|
+
const m = await core();
|
|
47
|
+
if (!m) {
|
|
48
|
+
writeText("✗ core unavailable");
|
|
49
|
+
process.exitCode = 1;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const cwd = process.cwd();
|
|
53
|
+
const sources = [
|
|
54
|
+
{ id: "os-csprng", data: randomBytes(64) },
|
|
55
|
+
{ id: "timing-jitter", data: jitterSample() },
|
|
56
|
+
];
|
|
57
|
+
if (opts.physical)
|
|
58
|
+
sources.push({ id: "physical", data: opts.physical });
|
|
59
|
+
if (opts.beaconFile && existsSync(opts.beaconFile)) {
|
|
60
|
+
try {
|
|
61
|
+
sources.push({ id: "beacon", data: readFileSync(opts.beaconFile) });
|
|
62
|
+
}
|
|
63
|
+
catch { /* */ }
|
|
64
|
+
}
|
|
65
|
+
const sec = m.entropy.generateSecret(cwd, sources, opts.bytes ?? 32, Date.now());
|
|
66
|
+
// persist the attestation (not the secret) for later verification
|
|
67
|
+
try {
|
|
68
|
+
const dir = join(cwd, ".mneme", "entropy");
|
|
69
|
+
if (!existsSync(dir))
|
|
70
|
+
mkdirSync(dir, { recursive: true });
|
|
71
|
+
writeFileSync(join(dir, "last_attestation.json"), JSON.stringify(sec.attestation, null, 2));
|
|
72
|
+
}
|
|
73
|
+
catch { /* */ }
|
|
74
|
+
if (opts.json) {
|
|
75
|
+
writeJson({ secret: opts.hashOnly ? undefined : sec.secretHex, sourceIds: sec.sourceIds, sourceHealth: sec.sourceHealth, outputHealth: sec.outputHealth, attestation: sec.attestation });
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
writeText(`🎲 secret (${(opts.bytes ?? 32)} bytes) — sources: ${sec.sourceIds.join(" + ")}`);
|
|
79
|
+
if (!opts.hashOnly)
|
|
80
|
+
writeText(` ${sec.secretHex}`);
|
|
81
|
+
writeText(` output health: ${sec.outputHealth.passed ? "✓ passed" : "✗ failed"} · est. min-entropy ${sec.outputHealth.minEntropyBitsPerByte}/8 bits/byte`);
|
|
82
|
+
for (const h of sec.sourceHealth)
|
|
83
|
+
writeText(` ${h.passed ? "✓" : "⚠"} ${h.id}: min-entropy ${h.minEntropyBitsPerByte}`);
|
|
84
|
+
writeText(` ✓ signed provenance attestation → .mneme/entropy/last_attestation.json (verify with: mneme entropy verify)`);
|
|
85
|
+
});
|
|
86
|
+
e.command("verify")
|
|
87
|
+
.description("Verify a secret's provenance attestation offline (signature + that the secret matches, without the attestation ever containing it).")
|
|
88
|
+
.requiredOption("--secret <hex>", "the secret (hex) to verify")
|
|
89
|
+
.option("--attestation-file <f>", "attestation JSON (default: .mneme/entropy/last_attestation.json)")
|
|
90
|
+
.option("--json", "JSON output.")
|
|
91
|
+
.action(async (opts) => {
|
|
92
|
+
const m = await core();
|
|
93
|
+
if (!m) {
|
|
94
|
+
writeText("✗ core unavailable");
|
|
95
|
+
process.exitCode = 1;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const path = opts.attestationFile || join(process.cwd(), ".mneme", "entropy", "last_attestation.json");
|
|
99
|
+
if (!existsSync(path)) {
|
|
100
|
+
writeText(`✗ no attestation at ${path}`);
|
|
101
|
+
process.exitCode = 1;
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
let att;
|
|
105
|
+
try {
|
|
106
|
+
att = JSON.parse(readFileSync(path, "utf8"));
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
writeText("✗ attestation not valid JSON");
|
|
110
|
+
process.exitCode = 1;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const v = m.entropy.verifySecretAttestation(att, opts.secret);
|
|
114
|
+
if (opts.json) {
|
|
115
|
+
writeJson(v);
|
|
116
|
+
process.exitCode = v.bound ? 0 : 1;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
writeText(v.bound ? `✓ VERIFIED — ${v.reason}` : `✗ NOT VERIFIED — ${v.reason}`);
|
|
120
|
+
process.exitCode = v.bound ? 0 : 1;
|
|
121
|
+
});
|
|
122
|
+
e.command("health")
|
|
123
|
+
.description("Health-check a byte sample (monobit / runs / min-entropy) — catches a stuck or degraded entropy source.")
|
|
124
|
+
.requiredOption("--file <f>", "file to check")
|
|
125
|
+
.option("--json", "JSON output.")
|
|
126
|
+
.action(async (opts) => {
|
|
127
|
+
const m = await core();
|
|
128
|
+
if (!m) {
|
|
129
|
+
writeText("✗ core unavailable");
|
|
130
|
+
process.exitCode = 1;
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (!existsSync(opts.file)) {
|
|
134
|
+
writeText("✗ file not found");
|
|
135
|
+
process.exitCode = 1;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const h = m.entropy.healthCheck(readFileSync(opts.file));
|
|
139
|
+
if (opts.json) {
|
|
140
|
+
writeJson(h);
|
|
141
|
+
process.exitCode = h.passed ? 0 : 1;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
writeText(`${h.passed ? "✓ passed" : "✗ FAILED"} — monobit ${h.monobit.toFixed(3)} · est. min-entropy ${h.minEntropyBitsPerByte.toFixed(2)}/8`);
|
|
145
|
+
process.exitCode = h.passed ? 0 : 1;
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=entropy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entropy.js","sourceRoot":"","sources":["../../src/commands/entropy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,SAAS,SAAS,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;AACjG,SAAS,SAAS,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AASvE,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QAAC,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAA2B,CAAC;QAAC,IAAI,CAAC,CAAC,OAAO;YAAE,OAAO,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACtH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,8EAA8E;AAC9E,SAAS,YAAY,CAAC,MAAM,GAAG,IAAI;IACjC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI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C,CAAC,UAAU,cAAc,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAChJ,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,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":"AA6IA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAu+MvD"}
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,8 @@ import { registerHydraCommands } from "./commands/hydra.js";
|
|
|
72
72
|
import { registerWisdomGateCommands } from "./commands/wisdom_gates.js";
|
|
73
73
|
import { registerCortexCommands } from "./commands/cortex.js";
|
|
74
74
|
import { registerShellCommands } from "./commands/shell.js";
|
|
75
|
+
import { registerDigCommands } from "./commands/dig.js";
|
|
76
|
+
import { registerEntropyCommands } from "./commands/entropy.js";
|
|
75
77
|
import { registerTrustCommands } from "./commands/trust.js";
|
|
76
78
|
import { registerNuclearCommands } from "./commands/nuclear-cli.js";
|
|
77
79
|
import { registerOvernightCommand } from "./commands/overnight.js";
|
|
@@ -4689,6 +4691,8 @@ export async function run(argv) {
|
|
|
4689
4691
|
registerWisdomGateCommands(program);
|
|
4690
4692
|
registerCortexCommands(program);
|
|
4691
4693
|
registerShellCommands(program);
|
|
4694
|
+
registerDigCommands(program);
|
|
4695
|
+
registerEntropyCommands(program);
|
|
4692
4696
|
// ─── Trust calibrator (v1.31.0) -- per-subsystem precision/recall/band
|
|
4693
4697
|
registerTrustCommands(program);
|
|
4694
4698
|
// ─── Wisdom reactor (v1.33.0) -- five nuclear-physics formulas as Mneme metrics
|