mneme-ai 2.79.0 → 2.81.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/creditscore.d.ts +26 -0
- package/dist/commands/creditscore.d.ts.map +1 -0
- package/dist/commands/creditscore.js +81 -0
- package/dist/commands/creditscore.js.map +1 -0
- package/dist/commands/flight.d.ts +22 -0
- package/dist/commands/flight.d.ts.map +1 -0
- package/dist/commands/flight.js +83 -0
- package/dist/commands/flight.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.81.0 — `mneme creditscore <action>` (alias `trustscore`) · portable AI honesty credit score.
|
|
3
|
+
*
|
|
4
|
+
* Distinct from `mneme honesty` (which mints static HMAC SVG badge certs from the
|
|
5
|
+
* pulse ledger). This is the PORTABLE, Ed25519-signed, cross-agent honesty CREDIT
|
|
6
|
+
* SCORE an agent checks before delegating to another agent (💎5, on the NOTARY spine).
|
|
7
|
+
*
|
|
8
|
+
* mneme creditscore score --agent A --true N --false M [--partial P] [--sign] [--ttl-days D]
|
|
9
|
+
* mneme creditscore verify <file|-> [--min GOLD] [--issuer FP]
|
|
10
|
+
*/
|
|
11
|
+
export interface CreditScoreOpts {
|
|
12
|
+
cwd: string;
|
|
13
|
+
action: string;
|
|
14
|
+
agent?: string;
|
|
15
|
+
trueCount?: number;
|
|
16
|
+
falseCount?: number;
|
|
17
|
+
partialCount?: number;
|
|
18
|
+
sign?: boolean;
|
|
19
|
+
ttlDays?: number;
|
|
20
|
+
file?: string;
|
|
21
|
+
min?: string;
|
|
22
|
+
issuer?: string;
|
|
23
|
+
json?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function creditScoreCommand(o: CreditScoreOpts): Promise<number>;
|
|
26
|
+
//# sourceMappingURL=creditscore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creditscore.d.ts","sourceRoot":"","sources":["../../src/commands/creditscore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC5E"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.81.0 — `mneme creditscore <action>` (alias `trustscore`) · portable AI honesty credit score.
|
|
3
|
+
*
|
|
4
|
+
* Distinct from `mneme honesty` (which mints static HMAC SVG badge certs from the
|
|
5
|
+
* pulse ledger). This is the PORTABLE, Ed25519-signed, cross-agent honesty CREDIT
|
|
6
|
+
* SCORE an agent checks before delegating to another agent (💎5, on the NOTARY spine).
|
|
7
|
+
*
|
|
8
|
+
* mneme creditscore score --agent A --true N --false M [--partial P] [--sign] [--ttl-days D]
|
|
9
|
+
* mneme creditscore verify <file|-> [--min GOLD] [--issuer FP]
|
|
10
|
+
*/
|
|
11
|
+
import { writeSync, readFileSync } from "node:fs";
|
|
12
|
+
import * as core from "@mneme-ai/core";
|
|
13
|
+
function out(s) {
|
|
14
|
+
try {
|
|
15
|
+
writeSync(1, s);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
process.stdout.write(s);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const BANDS = new Set(["PLATINUM", "GOLD", "SILVER", "BRONZE", "UNTRUSTED", "UNMEASURED"]);
|
|
22
|
+
export async function creditScoreCommand(o) {
|
|
23
|
+
const h = core.honestyScore;
|
|
24
|
+
if (o.action === "score") {
|
|
25
|
+
if (!o.agent) {
|
|
26
|
+
out("✗ score requires --agent\n");
|
|
27
|
+
return 2;
|
|
28
|
+
}
|
|
29
|
+
const score = h.computeHonestyScore({
|
|
30
|
+
agent: o.agent,
|
|
31
|
+
trueCount: o.trueCount ?? 0,
|
|
32
|
+
falseCount: o.falseCount ?? 0,
|
|
33
|
+
partialCount: o.partialCount ?? 0,
|
|
34
|
+
});
|
|
35
|
+
if (o.sign) {
|
|
36
|
+
out(JSON.stringify(h.issueHonestyReceipt(o.cwd, score, { ttlDays: o.ttlDays }), null, 2) + "\n");
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
if (o.json) {
|
|
40
|
+
out(JSON.stringify(score, null, 2) + "\n");
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
out(`📊 HONESTY CREDIT SCORE — ${score.agent}\n score: ${score.score}/100 · band: ${score.band}\n verified: ${score.trueCount} true / ${score.falseCount} false${score.partialCount ? ` / ${score.partialCount} partial` : ""} (decisive ${score.decisive})\n Wilson-LB: ${(score.wilsonLB * 100).toFixed(1)}% (pessimistic — small samples score low by design)\n Add --sign to emit a portable, offline-verifiable receipt.\n`);
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
if (o.action === "verify") {
|
|
47
|
+
let raw;
|
|
48
|
+
try {
|
|
49
|
+
raw = o.file && o.file !== "-" ? readFileSync(o.file, "utf8") : readFileSync(0, "utf8");
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
out(`✗ cannot read receipt: ${e.message}\n`);
|
|
53
|
+
return 2;
|
|
54
|
+
}
|
|
55
|
+
let receipt;
|
|
56
|
+
try {
|
|
57
|
+
receipt = JSON.parse(raw);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
out("✗ receipt is not valid JSON\n");
|
|
61
|
+
return 2;
|
|
62
|
+
}
|
|
63
|
+
const minBand = o.min && BANDS.has(o.min) ? o.min : "SILVER";
|
|
64
|
+
const v = h.verifyHonestyReceipt(receipt);
|
|
65
|
+
const trust = h.shouldTrust(receipt, minBand, { expectedIssuerFingerprint: o.issuer });
|
|
66
|
+
if (o.json) {
|
|
67
|
+
out(JSON.stringify({ verify: v, trust }, null, 2) + "\n");
|
|
68
|
+
return v.valid && trust.trust ? 0 : 1;
|
|
69
|
+
}
|
|
70
|
+
if (!v.valid) {
|
|
71
|
+
out(`🔴 INVALID — ${v.reason}\n`);
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
const mark = trust.trust ? "🟢" : "🟡";
|
|
75
|
+
out(`${mark} ${v.score.agent}: score ${v.score.score}/100 (${v.score.band})${v.expired ? " ⏰ EXPIRED" : ""}\n issuer: ${v.issuerFingerprint}\n trust ≥ ${minBand}? ${trust.trust ? "YES" : "NO"} — ${trust.reason}\n`);
|
|
76
|
+
return trust.trust ? 0 : 1;
|
|
77
|
+
}
|
|
78
|
+
out(`✗ Unknown creditscore action "${o.action}". Try: score | verify\n`);
|
|
79
|
+
return 2;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=creditscore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creditscore.js","sourceRoot":"","sources":["../../src/commands/creditscore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAEvC,SAAS,GAAG,CAAC,CAAS;IACpB,IAAI,CAAC;QAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAA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CAAC,MAAM,0BAA0B,CAAC,CAAC;IACzE,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.80.0 — `mneme flight <action>` · the AI black box.
|
|
3
|
+
*
|
|
4
|
+
* mneme flight record --agent A --action "..." [--kind K] [--reasoning R] [--claim C] [--reality O] [--delta MATCH|CONTRADICT|UNVERIFIED]
|
|
5
|
+
* mneme flight replay — causal-order narrative + the incident moment
|
|
6
|
+
* mneme flight verify — verify the whole recorder offline (public-key)
|
|
7
|
+
* mneme flight seal — emit ONE court-admissible signed receipt
|
|
8
|
+
*/
|
|
9
|
+
export interface FlightOpts {
|
|
10
|
+
cwd: string;
|
|
11
|
+
action: string;
|
|
12
|
+
agent?: string;
|
|
13
|
+
frameKind?: string;
|
|
14
|
+
actionText?: string;
|
|
15
|
+
reasoning?: string;
|
|
16
|
+
claim?: string;
|
|
17
|
+
reality?: string;
|
|
18
|
+
delta?: string;
|
|
19
|
+
json?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function flightCommand(o: FlightOpts): Promise<number>;
|
|
22
|
+
//# sourceMappingURL=flight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flight.d.ts","sourceRoot":"","sources":["../../src/commands/flight.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAiDlE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2.80.0 — `mneme flight <action>` · the AI black box.
|
|
3
|
+
*
|
|
4
|
+
* mneme flight record --agent A --action "..." [--kind K] [--reasoning R] [--claim C] [--reality O] [--delta MATCH|CONTRADICT|UNVERIFIED]
|
|
5
|
+
* mneme flight replay — causal-order narrative + the incident moment
|
|
6
|
+
* mneme flight verify — verify the whole recorder offline (public-key)
|
|
7
|
+
* mneme flight seal — emit ONE court-admissible signed receipt
|
|
8
|
+
*/
|
|
9
|
+
import { writeSync } from "node:fs";
|
|
10
|
+
import * as core from "@mneme-ai/core";
|
|
11
|
+
function out(s) {
|
|
12
|
+
try {
|
|
13
|
+
writeSync(1, s);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
process.stdout.write(s);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const KINDS = new Set(["action", "decision", "claim", "tool-call", "payment", "observation"]);
|
|
20
|
+
const DELTAS = new Set(["MATCH", "CONTRADICT", "UNVERIFIED"]);
|
|
21
|
+
export async function flightCommand(o) {
|
|
22
|
+
const fr = core.flightRecorder;
|
|
23
|
+
if (o.action === "record") {
|
|
24
|
+
if (!o.agent || !o.actionText) {
|
|
25
|
+
out("✗ record requires --agent and --action\n");
|
|
26
|
+
return 2;
|
|
27
|
+
}
|
|
28
|
+
const f = fr.record(o.cwd, {
|
|
29
|
+
agent: o.agent,
|
|
30
|
+
kind: o.frameKind && KINDS.has(o.frameKind) ? o.frameKind : "action",
|
|
31
|
+
action: o.actionText,
|
|
32
|
+
reasoning: o.reasoning,
|
|
33
|
+
claim: o.claim,
|
|
34
|
+
observedReality: o.reality,
|
|
35
|
+
truthDelta: o.delta && DELTAS.has(o.delta) ? o.delta : undefined,
|
|
36
|
+
});
|
|
37
|
+
if (o.json) {
|
|
38
|
+
out(JSON.stringify(f, null, 2) + "\n");
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
const mark = f.truthDelta === "CONTRADICT" ? "🔴" : f.truthDelta === "MATCH" ? "🟢" : "⚪";
|
|
42
|
+
out(`🛫 recorded frame #${f.seq} ${mark} (${f.truthDelta}) — receipt ${f.receiptId.slice(0, 12)}…\n`);
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
if (o.action === "verify") {
|
|
46
|
+
const v = fr.verifyCdr(o.cwd, { sameIssuer: true });
|
|
47
|
+
if (o.json) {
|
|
48
|
+
out(JSON.stringify(v, null, 2) + "\n");
|
|
49
|
+
return v.valid ? 0 : 1;
|
|
50
|
+
}
|
|
51
|
+
out(v.valid ? `🟢 BLACK BOX INTACT — ${v.frames} frame(s) verify offline (signed + chained).\n` : `🔴 TAMPERED — ${v.reason} (at frame ${v.brokenAt}).\n`);
|
|
52
|
+
return v.valid ? 0 : 1;
|
|
53
|
+
}
|
|
54
|
+
if (o.action === "replay") {
|
|
55
|
+
const r = fr.replay(o.cwd);
|
|
56
|
+
if (o.json) {
|
|
57
|
+
out(JSON.stringify(r, null, 2) + "\n");
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
const lines = [];
|
|
61
|
+
lines.push(`🎞 FLIGHT REPLAY — ${r.frames} frame(s) · chain ${r.chainValid ? "VALID ✓" : "BROKEN ✗"}`);
|
|
62
|
+
lines.push(` match=${r.counts.match} contradict=${r.counts.contradict} unverified=${r.counts.unverified}`);
|
|
63
|
+
if (r.incidentSeq !== null)
|
|
64
|
+
lines.push(` 🔴 INCIDENT at frame #${r.incidentSeq} (first claim≠reality)`);
|
|
65
|
+
lines.push("");
|
|
66
|
+
for (const n of r.narrative)
|
|
67
|
+
lines.push(` ${n}`);
|
|
68
|
+
out(lines.join("\n") + "\n");
|
|
69
|
+
return 0;
|
|
70
|
+
}
|
|
71
|
+
if (o.action === "seal") {
|
|
72
|
+
const s = fr.seal(o.cwd);
|
|
73
|
+
if (o.json) {
|
|
74
|
+
out(JSON.stringify(s, null, 2) + "\n");
|
|
75
|
+
return 0;
|
|
76
|
+
}
|
|
77
|
+
out(`🔏 SEALED — ${s.frames} frame(s), ${s.contradictions} contradiction(s)${s.incidentSeq !== null ? ` (incident #${s.incidentSeq})` : ""}.\n head: ${s.head ?? "(empty)"}\n receipt: ${s.receipt.receiptId}\n issuer: ${s.receipt.issuerFingerprint}\n\n Hand the receipt to an auditor — it verifies offline (mneme notary verify).\n`);
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
out(`✗ Unknown flight action "${o.action}". Try: record | replay | verify | seal\n`);
|
|
81
|
+
return 2;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=flight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flight.js","sourceRoot":"","sources":["../../src/commands/flight.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAEvC,SAAS,GAAG,CAAC,CAAS;IACpB,IAAI,CAAC;QAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAAC,CAAC;AAC7D,CAAC;AAED,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;AAe9D,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,CAAa;IAC/C,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAA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F,CAAC,CAAC;QACnV,OAAO,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,4BAA4B,CAAC,CAAC,MAAM,2CAA2C,CAAC,CAAC;IACrF,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuIA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuIA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAs5MvD"}
|
package/dist/index.js
CHANGED
|
@@ -4209,6 +4209,69 @@ export async function run(argv) {
|
|
|
4209
4209
|
json: !!o.json,
|
|
4210
4210
|
}));
|
|
4211
4211
|
});
|
|
4212
|
+
// v2.80.0 — FLIGHT RECORDER (💎3). The tamper-evident, replayable AI black box,
|
|
4213
|
+
// built on the NOTARY spine — every frame is a signed, chained receipt the
|
|
4214
|
+
// whole recorder verifies offline; seal = one court-admissible artifact.
|
|
4215
|
+
program
|
|
4216
|
+
.command("flight <action>")
|
|
4217
|
+
.description("🛫 FLIGHT RECORDER — the AI black box. record/replay/verify/seal an agent's actions+reasoning+claim-vs-reality as signed, chained receipts (built on NOTARY). actions: record | replay | verify | seal.")
|
|
4218
|
+
.option("--agent <a>", "agent id (record)")
|
|
4219
|
+
.option("--action <text>", "what the agent did (record)")
|
|
4220
|
+
.option("--kind <k>", "action | decision | claim | tool-call | payment | observation", "action")
|
|
4221
|
+
.option("--reasoning <r>", "why — reasoning trace (record)")
|
|
4222
|
+
.option("--claim <c>", "a checkable claim the agent asserted (record)")
|
|
4223
|
+
.option("--reality <o>", "what was actually observed/true (record)")
|
|
4224
|
+
.option("--delta <d>", "explicit MATCH | CONTRADICT | UNVERIFIED (overrides heuristic)")
|
|
4225
|
+
.option("--json", "machine-readable output", false)
|
|
4226
|
+
.action(async (action, o) => {
|
|
4227
|
+
const { flightCommand } = await import("./commands/flight.js");
|
|
4228
|
+
process.exit(await flightCommand({
|
|
4229
|
+
cwd: process.cwd(),
|
|
4230
|
+
action,
|
|
4231
|
+
agent: o.agent,
|
|
4232
|
+
actionText: o.action,
|
|
4233
|
+
frameKind: o.kind,
|
|
4234
|
+
reasoning: o.reasoning,
|
|
4235
|
+
claim: o.claim,
|
|
4236
|
+
reality: o.reality,
|
|
4237
|
+
delta: o.delta,
|
|
4238
|
+
json: !!o.json,
|
|
4239
|
+
}));
|
|
4240
|
+
});
|
|
4241
|
+
// v2.81.0 — HONESTY CREDIT SCORE (💎5). Portable, signed honesty score an agent
|
|
4242
|
+
// checks before delegating to another agent (the truth axis ERC-8004 misses).
|
|
4243
|
+
// Distinct from `mneme honesty` (static HMAC SVG badge certs).
|
|
4244
|
+
program
|
|
4245
|
+
.command("creditscore <action>")
|
|
4246
|
+
.aliases(["trustscore"])
|
|
4247
|
+
.description("📊 HONESTY CREDIT SCORE — portable, Ed25519-signed honesty score (Wilson-LB on verified true-rate) an agent verifies OFFLINE before delegating to another. actions: score | verify <file|->. Built on NOTARY; a vendor can't self-promote.")
|
|
4248
|
+
.option("--agent <a>", "agent id (score)")
|
|
4249
|
+
.option("--true <n>", "count of claims verified TRUE (score)", (v) => Number(v))
|
|
4250
|
+
.option("--false <n>", "count of claims verified FALSE (score)", (v) => Number(v))
|
|
4251
|
+
.option("--partial <n>", "count of partially-true claims (score)", (v) => Number(v))
|
|
4252
|
+
.option("--sign", "emit a portable signed receipt instead of plain output (score)", false)
|
|
4253
|
+
.option("--ttl-days <d>", "validity window for a signed score (default 90)", (v) => Number(v))
|
|
4254
|
+
.option("--file <path>", "receipt file to verify (use '-' for stdin)")
|
|
4255
|
+
.option("--min <band>", "min band to trust: PLATINUM|GOLD|SILVER|BRONZE (verify)", "SILVER")
|
|
4256
|
+
.option("--issuer <fp>", "assert the issuer fingerprint you trust (verify)")
|
|
4257
|
+
.option("--json", "machine-readable output", false)
|
|
4258
|
+
.action(async (action, o) => {
|
|
4259
|
+
const { creditScoreCommand } = await import("./commands/creditscore.js");
|
|
4260
|
+
process.exit(await creditScoreCommand({
|
|
4261
|
+
cwd: process.cwd(),
|
|
4262
|
+
action,
|
|
4263
|
+
agent: o.agent,
|
|
4264
|
+
trueCount: o.true,
|
|
4265
|
+
falseCount: o.false,
|
|
4266
|
+
partialCount: o.partial,
|
|
4267
|
+
sign: !!o.sign,
|
|
4268
|
+
ttlDays: o.ttlDays,
|
|
4269
|
+
file: o.file,
|
|
4270
|
+
min: o.min,
|
|
4271
|
+
issuer: o.issuer,
|
|
4272
|
+
json: !!o.json,
|
|
4273
|
+
}));
|
|
4274
|
+
});
|
|
4212
4275
|
program
|
|
4213
4276
|
.command("atlas")
|
|
4214
4277
|
.description("🗺 ATLAS HELP — six-layer discovery (TASTE · BLOOM · HOT · TAGS · INTENT · FULL). AI agents read 200 bytes here instead of 14 KB from --help.")
|