mneme-ai 3.12.0 → 3.13.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,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme infra` (v3.13.0) — INFRA PROVENANCE: where + when your agent run executed.
|
|
3
|
+
* infra → where am I running (provider/region/gpu), signed
|
|
4
|
+
* infra attest --out a.json → a NOTARY-signed attestation (verify offline)
|
|
5
|
+
* infra residency --allow eu- … → data-residency check (EU AI Act-style)
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from "commander";
|
|
8
|
+
export declare function registerInfraCommands(program: Command): void;
|
|
9
|
+
//# sourceMappingURL=infra.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infra.d.ts","sourceRoot":"","sources":["../../src/commands/infra.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsB5D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { hostname, cpus } from "node:os";
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { infraProvenance, notary } from "@mneme-ai/core";
|
|
4
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
5
|
+
function capture() {
|
|
6
|
+
return infraProvenance.captureInfra({ env: process.env, host: hostname(), platform: process.platform, arch: process.arch, cpus: cpus().length }, Date.now());
|
|
7
|
+
}
|
|
8
|
+
function show(a) {
|
|
9
|
+
out(`🛰 INFRA PROVENANCE — ${a.provider}${a.region ? ` · ${a.region}` : ""}${a.service ? ` · ${a.service}` : ""}${a.gpu ? ` · ${a.gpu} GPU` : ""}`);
|
|
10
|
+
out(` ${a.platform}/${a.arch} · ${a.cpus} cpu · host ${a.host.slice(0, 12)}… (hashed) · fingerprint ${a.fingerprint.slice(0, 16)}…`);
|
|
11
|
+
out(` signals: ${a.signals.length ? a.signals.join(", ") : "(none — local)"}`);
|
|
12
|
+
}
|
|
13
|
+
export function registerInfraCommands(program) {
|
|
14
|
+
const k = program.command("infra").description("🛰 INFRA PROVENANCE — a neutral, signed, offline-verifiable record of WHERE (which rented compute provider/region) + WHEN your agent run executed. Detects migration drift + checks data-residency. Honest: attests the environment as the host declares it — not a TEE/hardware proof.")
|
|
15
|
+
.action(() => show(capture()));
|
|
16
|
+
k.command("attest").description("Capture + NOTARY-sign this run's infra attestation (anyone verifies it offline).")
|
|
17
|
+
.option("--out <file>", "write the signed attestation").action((o) => {
|
|
18
|
+
const a = capture();
|
|
19
|
+
let signed = a;
|
|
20
|
+
try {
|
|
21
|
+
signed = notary.issueReceipt(process.cwd(), { kind: "protocol-hop", subject: `infra:${a.fingerprint}`, payload: a, includePayload: true, issuedAt: Date.now() });
|
|
22
|
+
}
|
|
23
|
+
catch { /* */ }
|
|
24
|
+
if (o.out)
|
|
25
|
+
writeFileSync(o.out, JSON.stringify(signed, null, 2), "utf8");
|
|
26
|
+
show(a);
|
|
27
|
+
out(o.out ? ` 🛰 signed → ${o.out} (verify offline with the embedded key)` : " (pass --out to write the signed attestation)");
|
|
28
|
+
});
|
|
29
|
+
k.command("residency").description("Check this run against a data-residency policy. allow entries: a region, a prefix ('eu-'), or 'provider:*'.")
|
|
30
|
+
.requiredOption("--allow <regions...>", "allowed regions/prefixes/provider wildcards")
|
|
31
|
+
.action((o) => {
|
|
32
|
+
const a = capture();
|
|
33
|
+
const v = infraProvenance.dataResidencyCheck(a, o.allow);
|
|
34
|
+
out(`${v.compliant ? "🟢 COMPLIANT" : "🔴 OUTSIDE POLICY"} — ${v.reason}`);
|
|
35
|
+
out(` provider ${v.provider} · region ${v.region ?? "unknown"} · policy [${o.allow.join(", ")}]`);
|
|
36
|
+
if (!v.compliant)
|
|
37
|
+
process.exitCode = 2;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
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,CAAC,CAAC,CAAC,CAAC;QACR,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,yCAAyC,CAAC,CAAC,CAAC,iDAAiD,CAAC,CAAC;IACpI,CAAC,CAAC,CAAC;IAEL,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,6GAA6G,CAAC;SAC9I,cAAc,CAAC,sBAAsB,EAAE,6CAA6C,CAAC;SACrF,MAAM,CAAC,CAAC,CAAsB,EAAE,EAAE;QACjC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;QAAC,MAAM,CAAC,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC9E,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3E,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,aAAa,CAAC,CAAC,MAAM,IAAI,SAAS,cAAc,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,CAAC,CAAC,SAAS;YAAE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACzC,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":"AAiMA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAimNvD"}
|
package/dist/index.js
CHANGED
|
@@ -110,6 +110,7 @@ import { registerSkillscanCommands } from "./commands/skillscan.js";
|
|
|
110
110
|
import { registerMcpgateCommands } from "./commands/mcpgate.js";
|
|
111
111
|
import { registerAgentcertCommands } from "./commands/agentcert.js";
|
|
112
112
|
import { registerThymosCommands } from "./commands/thymos.js";
|
|
113
|
+
import { registerInfraCommands } from "./commands/infra.js";
|
|
113
114
|
import { registerAdamasCommands } from "./commands/adamas.js";
|
|
114
115
|
import { registerPrismCommands } from "./commands/prism.js";
|
|
115
116
|
import { registerGoldilocksCommands } from "./commands/goldilocks.js";
|
|
@@ -4787,6 +4788,7 @@ export async function run(argv) {
|
|
|
4787
4788
|
registerMcpgateCommands(program);
|
|
4788
4789
|
registerAgentcertCommands(program);
|
|
4789
4790
|
registerThymosCommands(program);
|
|
4791
|
+
registerInfraCommands(program);
|
|
4790
4792
|
registerAdamasCommands(program);
|
|
4791
4793
|
registerPrismCommands(program);
|
|
4792
4794
|
registerGoldilocksCommands(program);
|