mneme-ai 2.212.0 → 2.213.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/keryx.d.ts +11 -0
- package/dist/commands/keryx.d.ts.map +1 -0
- package/dist/commands/keryx.js +42 -0
- package/dist/commands/keryx.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `mneme keryx` (v2.213.0) — KERYX, the gate-as-a-service relay protocol surface.
|
|
3
|
+
* The PROTOCOL is shipped + measured (keryxGauntlet=100). The hosted relay server + per-
|
|
4
|
+
* provider webhook adapters (LINE / Slack / Discord) deploy on top of `gephyra serve`.
|
|
5
|
+
* keryx demo — show a signed ask/answer envelope round-trip
|
|
6
|
+
* keryx verify <file> — verify an envelope JSON offline (needs --secret)
|
|
7
|
+
* keryx status — protocol + gauntlet status
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from "commander";
|
|
10
|
+
export declare function registerKeryxCommands(program: Command): void;
|
|
11
|
+
//# sourceMappingURL=keryx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keryx.d.ts","sourceRoot":"","sources":["../../src/commands/keryx.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB5D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { keryx } from "@mneme-ai/core";
|
|
3
|
+
function out(s) { process.stdout.write(s + "\n"); }
|
|
4
|
+
export function registerKeryxCommands(program) {
|
|
5
|
+
const k = program.command("keryx").description("🏛 KERYX — the herald: a dumb, signed relay so ANY chat (LINE/Slack/Discord/Telegram) can reach your local agent behind NAT. Only a summary+hash crosses; answers are signed + replay-proof.");
|
|
6
|
+
k.command("status", { isDefault: true }).description("Protocol + gauntlet status.").action(() => {
|
|
7
|
+
const g = keryx.keryxGauntlet();
|
|
8
|
+
out(`🏛 KERYX protocol — gauntlet ${g.score}/100 (${g.checks.filter((c) => c.pass).length}/${g.checks.length}). Channel-agnostic, signed, replay-proof, raw-free.`);
|
|
9
|
+
out(" Deploy the relay on `gephyra serve` (your DO droplet); the daemon connects OUT (behind NAT). See docs/KERYX.md.");
|
|
10
|
+
});
|
|
11
|
+
k.command("demo").description("Show a signed ask→answer round-trip (no network).").action(() => {
|
|
12
|
+
const secret = "demo-daemon-key", now = Date.now();
|
|
13
|
+
const ask = keryx.buildAsk(secret, { id: "demo1", channel: "line", summary: "Deploy to prod?", rawCommand: "kubectl apply -f prod.yaml", nonce: "n1", now });
|
|
14
|
+
const ans = keryx.buildAnswer(secret, ask, "deny", now + 1500);
|
|
15
|
+
out("ASK (agent → human, via relay):");
|
|
16
|
+
out(" " + JSON.stringify({ kind: ask.kind, channel: ask.channel, payload: ask.payload, commandHash: ask.commandHash.slice(0, 12) + "…", sig: ask.sig.slice(0, 12) + "…" }));
|
|
17
|
+
out(" raw command NEVER crosses · verify offline: " + keryx.verifyEnvelope(secret, ask, now + 100).ok);
|
|
18
|
+
out("ANSWER (human → agent, via relay):");
|
|
19
|
+
out(" " + JSON.stringify({ kind: ans.kind, payload: ans.payload, boundToAsk: ans.id === ask.id }));
|
|
20
|
+
out(" forged by relay (wrong key)? " + keryx.verifyEnvelope("wrong", ask, now + 100).ok + " ← the relay can route but never fabricate");
|
|
21
|
+
});
|
|
22
|
+
k.command("verify <file>").description("Verify an envelope JSON offline.").requiredOption("--secret <s>", "the daemon shared key")
|
|
23
|
+
.action((file, o) => {
|
|
24
|
+
if (!existsSync(file)) {
|
|
25
|
+
out("file not found");
|
|
26
|
+
process.exitCode = 2;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const e = JSON.parse(readFileSync(file, "utf8"));
|
|
31
|
+
const r = keryx.verifyEnvelope(o.secret, e, Date.now());
|
|
32
|
+
out(`${r.ok ? "✓" : "✗"} ${r.reason}`);
|
|
33
|
+
if (!r.ok)
|
|
34
|
+
process.exitCode = 2;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
out("✗ invalid envelope JSON");
|
|
38
|
+
process.exitCode = 2;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=keryx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keryx.js","sourceRoot":"","sources":["../../src/commands/keryx.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,SAAS,GAAG,CAAC,CAAS,IAAU,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjE,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,8LAA8L,CAAC,CAAC;IAE/O,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QAC9F,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAChC,GAAG,CAAC,gCAAgC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,sD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;IACjE,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":"AA2LA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2lNvD"}
|
package/dist/index.js
CHANGED
|
@@ -104,6 +104,7 @@ import { registerHeartbeatCommands } from "./commands/heartbeat.js";
|
|
|
104
104
|
import { registerReckonCommands } from "./commands/reckon.js";
|
|
105
105
|
import { registerSuccessionCommands } from "./commands/succession.js";
|
|
106
106
|
import { registerPagerCommands } from "./commands/pager.js";
|
|
107
|
+
import { registerKeryxCommands } from "./commands/keryx.js";
|
|
107
108
|
import { registerAdamasCommands } from "./commands/adamas.js";
|
|
108
109
|
import { registerPrismCommands } from "./commands/prism.js";
|
|
109
110
|
import { registerGoldilocksCommands } from "./commands/goldilocks.js";
|
|
@@ -4775,6 +4776,7 @@ export async function run(argv) {
|
|
|
4775
4776
|
registerReckonCommands(program);
|
|
4776
4777
|
registerSuccessionCommands(program);
|
|
4777
4778
|
registerPagerCommands(program);
|
|
4779
|
+
registerKeryxCommands(program);
|
|
4778
4780
|
registerAdamasCommands(program);
|
|
4779
4781
|
registerPrismCommands(program);
|
|
4780
4782
|
registerGoldilocksCommands(program);
|