mneme-ai 2.65.0 → 2.67.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/index.d.ts.map +1 -1
- package/dist/index.js +154 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
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,CA8rMvD"}
|
package/dist/index.js
CHANGED
|
@@ -4682,6 +4682,100 @@ export async function run(argv) {
|
|
|
4682
4682
|
process.exitCode = 1;
|
|
4683
4683
|
}
|
|
4684
4684
|
});
|
|
4685
|
+
// v2.66.0 — REFLOG: cross-session time-machine.
|
|
4686
|
+
const reflogParent = program
|
|
4687
|
+
.command("reflog")
|
|
4688
|
+
.description("v2.66 — time-machine: per-file checkpoints + selective rewind. Default = list checkpoints.")
|
|
4689
|
+
.action(async () => {
|
|
4690
|
+
try {
|
|
4691
|
+
const core = await import("@mneme-ai/core");
|
|
4692
|
+
const list = core.reflog.listCheckpoints(process.cwd());
|
|
4693
|
+
const led = core.reflog.verifyLedgerChain(process.cwd());
|
|
4694
|
+
process.stdout.write(JSON.stringify({ ok: led.ok, checkpoints: list, ledger: led }, null, 2) + "\n");
|
|
4695
|
+
}
|
|
4696
|
+
catch (e) {
|
|
4697
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4698
|
+
process.exitCode = 1;
|
|
4699
|
+
}
|
|
4700
|
+
});
|
|
4701
|
+
reflogParent.command("checkpoint")
|
|
4702
|
+
.description("Create an HMAC-signed checkpoint of all tracked files with pheromone tag.")
|
|
4703
|
+
.option("--label <text>", "Optional label (e.g. 'before refactor')")
|
|
4704
|
+
.option("--include <list>", "Comma-separated include globs", (v) => v.split(",").map((s) => s.trim()).filter(Boolean), ["**/*"])
|
|
4705
|
+
.option("--exclude <list>", "Comma-separated additional exclude globs", (v) => v.split(",").map((s) => s.trim()).filter(Boolean), [])
|
|
4706
|
+
.option("--max-files <n>", "Max files to track (default 5000)", (v) => Number(v), 5000)
|
|
4707
|
+
.action(async (opts) => {
|
|
4708
|
+
try {
|
|
4709
|
+
const core = await import("@mneme-ai/core");
|
|
4710
|
+
const r = core.reflog.createCheckpoint({ cwd: process.cwd(), label: opts.label, include: opts.include, exclude: opts.exclude, maxFiles: opts.maxFiles });
|
|
4711
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4712
|
+
}
|
|
4713
|
+
catch (e) {
|
|
4714
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4715
|
+
process.exitCode = 1;
|
|
4716
|
+
}
|
|
4717
|
+
});
|
|
4718
|
+
reflogParent.command("list")
|
|
4719
|
+
.description("List all checkpoints with timestamps + pheromone tags.")
|
|
4720
|
+
.action(async () => {
|
|
4721
|
+
try {
|
|
4722
|
+
const core = await import("@mneme-ai/core");
|
|
4723
|
+
const list = core.reflog.listCheckpoints(process.cwd());
|
|
4724
|
+
process.stdout.write(JSON.stringify({ ok: true, count: list.length, checkpoints: list }, null, 2) + "\n");
|
|
4725
|
+
}
|
|
4726
|
+
catch (e) {
|
|
4727
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4728
|
+
process.exitCode = 1;
|
|
4729
|
+
}
|
|
4730
|
+
});
|
|
4731
|
+
reflogParent.command("rewind")
|
|
4732
|
+
.description("PREVIEW a rewind proposal (dry-run by design). Returns toRevert + toKeep with HMAC proof. Apply manually via your IDE.")
|
|
4733
|
+
.option("--since <window>", "Time window like '2h', '30m', '1d'")
|
|
4734
|
+
.option("--checkpoint <id>", "Specific checkpoint id")
|
|
4735
|
+
.option("--include <list>", "Comma-separated include globs", (v) => v.split(",").map((s) => s.trim()).filter(Boolean), [])
|
|
4736
|
+
.option("--exclude <list>", "Comma-separated exclude globs (e.g. 'tests/**')", (v) => v.split(",").map((s) => s.trim()).filter(Boolean), [])
|
|
4737
|
+
.option("--pheromone <name>", "Only rewind files where target checkpoint pheromone equals this")
|
|
4738
|
+
.option("--banner", "Render ASCII banner instead of JSON")
|
|
4739
|
+
.action(async (opts) => {
|
|
4740
|
+
try {
|
|
4741
|
+
const core = await import("@mneme-ai/core");
|
|
4742
|
+
const r = core.reflog.rewindPreview({
|
|
4743
|
+
cwd: process.cwd(),
|
|
4744
|
+
since: opts.since,
|
|
4745
|
+
checkpointId: opts.checkpoint,
|
|
4746
|
+
include: opts.include,
|
|
4747
|
+
exclude: opts.exclude,
|
|
4748
|
+
pheromone: opts.pheromone,
|
|
4749
|
+
});
|
|
4750
|
+
if (opts.banner)
|
|
4751
|
+
process.stdout.write(core.reflog.renderRewindBanner(r) + "\n");
|
|
4752
|
+
else
|
|
4753
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4754
|
+
if (!r.ok)
|
|
4755
|
+
process.exitCode = 1;
|
|
4756
|
+
}
|
|
4757
|
+
catch (e) {
|
|
4758
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4759
|
+
process.exitCode = 1;
|
|
4760
|
+
}
|
|
4761
|
+
});
|
|
4762
|
+
reflogParent.command("audit")
|
|
4763
|
+
.description("Verify HMAC-chained reflog ledger + last N entries.")
|
|
4764
|
+
.option("--limit <n>", "Max rows", (v) => Number(v), 20)
|
|
4765
|
+
.action(async (opts) => {
|
|
4766
|
+
try {
|
|
4767
|
+
const core = await import("@mneme-ai/core");
|
|
4768
|
+
const led = core.reflog.verifyLedgerChain(process.cwd());
|
|
4769
|
+
const rows = core.reflog.readLedger(process.cwd());
|
|
4770
|
+
process.stdout.write(JSON.stringify({ ok: led.ok, totalRows: led.rows, brokenAt: led.brokenAt, recent: rows.slice(-(opts.limit ?? 20)) }, null, 2) + "\n");
|
|
4771
|
+
if (!led.ok)
|
|
4772
|
+
process.exitCode = 1;
|
|
4773
|
+
}
|
|
4774
|
+
catch (e) {
|
|
4775
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4776
|
+
process.exitCode = 1;
|
|
4777
|
+
}
|
|
4778
|
+
});
|
|
4685
4779
|
// v2.65.0 — SWARM BUS: cross-agent message bus.
|
|
4686
4780
|
const swarmBusParent = program
|
|
4687
4781
|
.command("swarm_bus")
|
|
@@ -5335,6 +5429,66 @@ export async function run(argv) {
|
|
|
5335
5429
|
process.exitCode = 1;
|
|
5336
5430
|
}
|
|
5337
5431
|
});
|
|
5432
|
+
// v2.67.0 — PROTOPLASM: live atom embedded in every function. Per-
|
|
5433
|
+
// function super_quan probe (statistical + quantum-inspired) with HMAC-
|
|
5434
|
+
// chained findings ledger. Healthy → trigger crawl_planner; broken →
|
|
5435
|
+
// wisdom_space root-cause + heal. Cytoplasm that self-monitors.
|
|
5436
|
+
const protoplasmParent = program
|
|
5437
|
+
.command("protoplasm")
|
|
5438
|
+
.description("v2.67 — PROTOPLASM live-atom probe. Default action = report.")
|
|
5439
|
+
.action(async () => {
|
|
5440
|
+
try {
|
|
5441
|
+
const core = await import("@mneme-ai/core");
|
|
5442
|
+
const r = core.protoplasm.manualProbeReport(core.protoplasm.DEFAULT_PROTOPLASM_CONFIG);
|
|
5443
|
+
process.stdout.write(JSON.stringify({ ok: true, report: r }, null, 2) + "\n");
|
|
5444
|
+
}
|
|
5445
|
+
catch (e) {
|
|
5446
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
5447
|
+
process.exitCode = 1;
|
|
5448
|
+
}
|
|
5449
|
+
});
|
|
5450
|
+
protoplasmParent.command("report")
|
|
5451
|
+
.description("Show current ledger health + last 10 findings")
|
|
5452
|
+
.action(async () => {
|
|
5453
|
+
try {
|
|
5454
|
+
const core = await import("@mneme-ai/core");
|
|
5455
|
+
const r = core.protoplasm.manualProbeReport(core.protoplasm.DEFAULT_PROTOPLASM_CONFIG);
|
|
5456
|
+
process.stdout.write(JSON.stringify({ ok: true, report: r }, null, 2) + "\n");
|
|
5457
|
+
}
|
|
5458
|
+
catch (e) {
|
|
5459
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
5460
|
+
process.exitCode = 1;
|
|
5461
|
+
}
|
|
5462
|
+
});
|
|
5463
|
+
protoplasmParent.command("verify_chain")
|
|
5464
|
+
.description("Verify HMAC chain integrity on findings ledger")
|
|
5465
|
+
.option("--ledger <path>", "ledger path", ".mneme/protoplasm/findings.jsonl")
|
|
5466
|
+
.action(async (opts) => {
|
|
5467
|
+
try {
|
|
5468
|
+
const core = await import("@mneme-ai/core");
|
|
5469
|
+
const r = core.protoplasm.verifyChain(opts.ledger, process.env["MNEME_PROTOPLASM_KEY"] ?? "dev-protoplasm-key");
|
|
5470
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
5471
|
+
if (!r.ok)
|
|
5472
|
+
process.exitCode = 1;
|
|
5473
|
+
}
|
|
5474
|
+
catch (e) {
|
|
5475
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
5476
|
+
process.exitCode = 1;
|
|
5477
|
+
}
|
|
5478
|
+
});
|
|
5479
|
+
protoplasmParent.command("registry")
|
|
5480
|
+
.description("Snapshot in-process probe registry (which functions are wrapped + sample counts)")
|
|
5481
|
+
.action(async () => {
|
|
5482
|
+
try {
|
|
5483
|
+
const core = await import("@mneme-ai/core");
|
|
5484
|
+
const snap = core.protoplasm.snapshotRegistry();
|
|
5485
|
+
process.stdout.write(JSON.stringify({ ok: true, totalFunctions: snap.length, registry: snap.map((s) => ({ fnId: s.fnId, samples: s.samples })) }, null, 2) + "\n");
|
|
5486
|
+
}
|
|
5487
|
+
catch (e) {
|
|
5488
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
5489
|
+
process.exitCode = 1;
|
|
5490
|
+
}
|
|
5491
|
+
});
|
|
5338
5492
|
// v2.59.0 — SDK SURFACE AUDITOR: gate-self-verification.
|
|
5339
5493
|
// Empirically imports @mneme-ai/sdk + checks the external public
|
|
5340
5494
|
// surface matches WIRING DOCTOR's claims. Closes the v2.58 blind-spot
|