mneme-ai 2.57.0 → 2.59.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 +209 -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,CA29KvD"}
|
package/dist/index.js
CHANGED
|
@@ -4630,6 +4630,215 @@ export async function run(argv) {
|
|
|
4630
4630
|
process.exitCode = 1;
|
|
4631
4631
|
}
|
|
4632
4632
|
});
|
|
4633
|
+
// v2.58.0 — AUTOPROBE primitive: empirical proof-of-life coverage.
|
|
4634
|
+
// Spawns `mneme <tool> --help` for every uncovered tool and records
|
|
4635
|
+
// invocability as a 3rd coverage source (in addition to TG claims +
|
|
4636
|
+
// READONLY patterns). Lets the release gate hit 100% coverage with
|
|
4637
|
+
// REAL empirical evidence (every tool actually runs), not faked.
|
|
4638
|
+
const autoprobeParent = program
|
|
4639
|
+
.command("autoprobe")
|
|
4640
|
+
.description("v2.58 — AUTOPROBE coverage: spawn --help on uncovered tools + persist HMAC-signed report.")
|
|
4641
|
+
.action(async () => {
|
|
4642
|
+
try {
|
|
4643
|
+
const core = await import("@mneme-ai/core");
|
|
4644
|
+
const cov = core.releaseGate.crossCheckFromDisk(process.cwd(), { threshold: 100 });
|
|
4645
|
+
const r = core.autoprobe.runAutoprobe({ tools: cov.uncovered, cwd: process.cwd() });
|
|
4646
|
+
process.stdout.write(JSON.stringify({ ok: r.brokenCount === 0, summary: { tested: r.totalTested, invocable: r.invocableCount, broken: r.brokenCount, totalLatencyMs: r.totalLatencyMs }, brokenTools: r.results.filter((x) => !x.invocable) }, null, 2) + "\n");
|
|
4647
|
+
}
|
|
4648
|
+
catch (e) {
|
|
4649
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4650
|
+
process.exitCode = 1;
|
|
4651
|
+
}
|
|
4652
|
+
});
|
|
4653
|
+
autoprobeParent.command("run")
|
|
4654
|
+
.description("v2.58 — same as `mneme autoprobe` default; explicit form.")
|
|
4655
|
+
.action(async () => {
|
|
4656
|
+
try {
|
|
4657
|
+
const core = await import("@mneme-ai/core");
|
|
4658
|
+
const cov = core.releaseGate.crossCheckFromDisk(process.cwd(), { threshold: 100 });
|
|
4659
|
+
const r = core.autoprobe.runAutoprobe({ tools: cov.uncovered, cwd: process.cwd() });
|
|
4660
|
+
process.stdout.write(JSON.stringify({ ok: r.brokenCount === 0, summary: { tested: r.totalTested, invocable: r.invocableCount, broken: r.brokenCount, totalLatencyMs: r.totalLatencyMs }, brokenTools: r.results.filter((x) => !x.invocable) }, null, 2) + "\n");
|
|
4661
|
+
}
|
|
4662
|
+
catch (e) {
|
|
4663
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4664
|
+
process.exitCode = 1;
|
|
4665
|
+
}
|
|
4666
|
+
});
|
|
4667
|
+
autoprobeParent.command("report")
|
|
4668
|
+
.description("v2.58 — show the last fresh AUTOPROBE report from .mneme/autoprobe/last_run.json.")
|
|
4669
|
+
.action(async () => {
|
|
4670
|
+
try {
|
|
4671
|
+
const core = await import("@mneme-ai/core");
|
|
4672
|
+
const r = core.autoprobe.loadFreshAutoprobeReport(process.cwd());
|
|
4673
|
+
if (!r) {
|
|
4674
|
+
process.stdout.write(JSON.stringify({ ok: false, hint: "no fresh AUTOPROBE report (run `mneme autoprobe run` first)" }) + "\n");
|
|
4675
|
+
process.exitCode = 1;
|
|
4676
|
+
return;
|
|
4677
|
+
}
|
|
4678
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4679
|
+
}
|
|
4680
|
+
catch (e) {
|
|
4681
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4682
|
+
process.exitCode = 1;
|
|
4683
|
+
}
|
|
4684
|
+
});
|
|
4685
|
+
// v2.59.0 — SDK SURFACE AUDITOR: gate-self-verification.
|
|
4686
|
+
// Empirically imports @mneme-ai/sdk + checks the external public
|
|
4687
|
+
// surface matches WIRING DOCTOR's claims. Closes the v2.58 blind-spot
|
|
4688
|
+
// bug class (WIRING DOCTOR said wired but external `import { ... }
|
|
4689
|
+
// from "@mneme-ai/sdk"` returned undefined).
|
|
4690
|
+
const sdkAuditorParent = program
|
|
4691
|
+
.command("sdk_auditor")
|
|
4692
|
+
.description("v2.59 — empirically audit @mneme-ai/sdk external public surface; default = run + persist + report.")
|
|
4693
|
+
.action(async () => {
|
|
4694
|
+
try {
|
|
4695
|
+
const core = await import("@mneme-ai/core");
|
|
4696
|
+
const r = await core.sdkAuditor.auditSdkSurface({ cwd: process.cwd() });
|
|
4697
|
+
core.sdkAuditor.persistAuditorReport(process.cwd(), r);
|
|
4698
|
+
process.stdout.write(JSON.stringify({ ok: r.ok, totalExports: r.totalExports, okCount: r.okCount, brokenCount: r.brokenCount, broken: r.findings.filter((f) => !f.present) }, null, 2) + "\n");
|
|
4699
|
+
if (!r.ok)
|
|
4700
|
+
process.exitCode = 1;
|
|
4701
|
+
}
|
|
4702
|
+
catch (e) {
|
|
4703
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4704
|
+
process.exitCode = 1;
|
|
4705
|
+
}
|
|
4706
|
+
});
|
|
4707
|
+
sdkAuditorParent.command("run")
|
|
4708
|
+
.description("v2.59 — same as `mneme sdk_auditor` default.")
|
|
4709
|
+
.action(async () => {
|
|
4710
|
+
try {
|
|
4711
|
+
const core = await import("@mneme-ai/core");
|
|
4712
|
+
const r = await core.sdkAuditor.auditSdkSurface({ cwd: process.cwd() });
|
|
4713
|
+
core.sdkAuditor.persistAuditorReport(process.cwd(), r);
|
|
4714
|
+
process.stdout.write(JSON.stringify({ ok: r.ok, totalExports: r.totalExports, okCount: r.okCount, brokenCount: r.brokenCount, broken: r.findings.filter((f) => !f.present) }, null, 2) + "\n");
|
|
4715
|
+
if (!r.ok)
|
|
4716
|
+
process.exitCode = 1;
|
|
4717
|
+
}
|
|
4718
|
+
catch (e) {
|
|
4719
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4720
|
+
process.exitCode = 1;
|
|
4721
|
+
}
|
|
4722
|
+
});
|
|
4723
|
+
sdkAuditorParent.command("consistency")
|
|
4724
|
+
.description("v2.59 — cross-check SDK_AUDITOR vs WIRING DOCTOR for gate-agreement (contradictions = release block).")
|
|
4725
|
+
.action(async () => {
|
|
4726
|
+
try {
|
|
4727
|
+
const core = await import("@mneme-ai/core");
|
|
4728
|
+
const wd = core.wiringDoctor.diagnose(process.cwd());
|
|
4729
|
+
const auditor = await core.sdkAuditor.auditSdkSurface({ cwd: process.cwd() });
|
|
4730
|
+
const r = core.sdkAuditor.crossCheckGates(wd, auditor);
|
|
4731
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4732
|
+
if (!r.ok)
|
|
4733
|
+
process.exitCode = 1;
|
|
4734
|
+
}
|
|
4735
|
+
catch (e) {
|
|
4736
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4737
|
+
process.exitCode = 1;
|
|
4738
|
+
}
|
|
4739
|
+
});
|
|
4740
|
+
// v2.58.0 — LIVING LAB primitive: 24/7 autonomous test bot.
|
|
4741
|
+
const livingLabParent = program
|
|
4742
|
+
.command("living_lab")
|
|
4743
|
+
.description("v2.58 — 24/7 LIVING LAB test bot. Default action = status.")
|
|
4744
|
+
.action(async () => {
|
|
4745
|
+
try {
|
|
4746
|
+
const core = await import("@mneme-ai/core");
|
|
4747
|
+
const hb = core.livingLab.readHeartbeat(process.cwd());
|
|
4748
|
+
const fresh = core.livingLab.isHeartbeatFresh(process.cwd());
|
|
4749
|
+
const open = core.livingLab.openFindings(process.cwd()).length;
|
|
4750
|
+
process.stdout.write(JSON.stringify({ ok: fresh && open === 0, heartbeat: hb, fresh, openFindings: open, hint: !hb ? "no heartbeat — run `mneme living_lab start --interval 300`" : !fresh ? "heartbeat stale — daemon may be down" : open > 0 ? `${open} open finding(s) blocking release` : "all clear" }, null, 2) + "\n");
|
|
4751
|
+
}
|
|
4752
|
+
catch (e) {
|
|
4753
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4754
|
+
process.exitCode = 1;
|
|
4755
|
+
}
|
|
4756
|
+
});
|
|
4757
|
+
livingLabParent.command("tick")
|
|
4758
|
+
.description("Run a single in-process LIVING LAB tick (probe ONE tool + update learning + maybe file finding).")
|
|
4759
|
+
.action(async () => {
|
|
4760
|
+
try {
|
|
4761
|
+
const core = await import("@mneme-ai/core");
|
|
4762
|
+
const r = core.livingLab.runLivingLabTick({ cwd: process.cwd() });
|
|
4763
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4764
|
+
}
|
|
4765
|
+
catch (e) {
|
|
4766
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4767
|
+
process.exitCode = 1;
|
|
4768
|
+
}
|
|
4769
|
+
});
|
|
4770
|
+
livingLabParent.command("start")
|
|
4771
|
+
.description("Spawn the LIVING LAB daemon as a detached background process.")
|
|
4772
|
+
.option("--interval <s>", "tick interval in seconds (default 300 = 5min)", (v) => Number(v), 300)
|
|
4773
|
+
.action(async (opts) => {
|
|
4774
|
+
try {
|
|
4775
|
+
const core = await import("@mneme-ai/core");
|
|
4776
|
+
const r = core.livingLab.spawnBackgroundDaemon({ cwd: process.cwd(), intervalMs: (opts.interval ?? 300) * 1000 });
|
|
4777
|
+
process.stdout.write(JSON.stringify({ ok: r.pid > 0, pid: r.pid, pidFile: r.pidFile, hint: `daemon PID ${r.pid} spawned; logs only in heartbeat.json / findings.jsonl` }, null, 2) + "\n");
|
|
4778
|
+
}
|
|
4779
|
+
catch (e) {
|
|
4780
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4781
|
+
process.exitCode = 1;
|
|
4782
|
+
}
|
|
4783
|
+
});
|
|
4784
|
+
livingLabParent.command("loop")
|
|
4785
|
+
.description("Run the LIVING LAB tick loop in this process (used by `start` under the hood; usually you want `start`).")
|
|
4786
|
+
.option("--interval <s>", "tick interval in seconds", (v) => Number(v), 300)
|
|
4787
|
+
.option("--max-ticks <n>", "stop after N ticks (default: forever)", (v) => Number(v))
|
|
4788
|
+
.action(async (opts) => {
|
|
4789
|
+
try {
|
|
4790
|
+
const core = await import("@mneme-ai/core");
|
|
4791
|
+
await core.livingLab.runDaemon({ cwd: process.cwd(), intervalMs: (opts.interval ?? 300) * 1000, maxTicks: opts.maxTicks });
|
|
4792
|
+
}
|
|
4793
|
+
catch (e) {
|
|
4794
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4795
|
+
process.exitCode = 1;
|
|
4796
|
+
}
|
|
4797
|
+
});
|
|
4798
|
+
livingLabParent.command("findings")
|
|
4799
|
+
.description("List the LIVING LAB findings ledger (HMAC-chain verified).")
|
|
4800
|
+
.action(async () => {
|
|
4801
|
+
try {
|
|
4802
|
+
const core = await import("@mneme-ai/core");
|
|
4803
|
+
const findings = core.livingLab.readFindings(process.cwd());
|
|
4804
|
+
const chainOk = core.livingLab.verifyFindingChain(process.cwd());
|
|
4805
|
+
const open = core.livingLab.openFindings(process.cwd());
|
|
4806
|
+
process.stdout.write(JSON.stringify({ ok: chainOk, total: findings.length, openCount: open.length, open, chainOk }, null, 2) + "\n");
|
|
4807
|
+
}
|
|
4808
|
+
catch (e) {
|
|
4809
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4810
|
+
process.exitCode = 1;
|
|
4811
|
+
}
|
|
4812
|
+
});
|
|
4813
|
+
livingLabParent.command("propose")
|
|
4814
|
+
.description("Generate proposal artifacts for every open finding (writes .mneme/living_lab/proposals/<id>.proposal.md).")
|
|
4815
|
+
.action(async () => {
|
|
4816
|
+
try {
|
|
4817
|
+
const core = await import("@mneme-ai/core");
|
|
4818
|
+
const open = core.livingLab.openFindings(process.cwd());
|
|
4819
|
+
const wrote = open.map((f) => core.livingLab.writeProposalForFinding(process.cwd(), f).path);
|
|
4820
|
+
process.stdout.write(JSON.stringify({ ok: true, wrote }, null, 2) + "\n");
|
|
4821
|
+
}
|
|
4822
|
+
catch (e) {
|
|
4823
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4824
|
+
process.exitCode = 1;
|
|
4825
|
+
}
|
|
4826
|
+
});
|
|
4827
|
+
livingLabParent.command("commit")
|
|
4828
|
+
.description("Commit all open proposals to a fresh `living-lab-<ts>` branch + push to origin. Refuses to touch main directly.")
|
|
4829
|
+
.action(async () => {
|
|
4830
|
+
try {
|
|
4831
|
+
const core = await import("@mneme-ai/core");
|
|
4832
|
+
const r = core.livingLab.commitProposalToBranch(process.cwd());
|
|
4833
|
+
process.stdout.write(JSON.stringify(r, null, 2) + "\n");
|
|
4834
|
+
if (!r.ok)
|
|
4835
|
+
process.exitCode = 1;
|
|
4836
|
+
}
|
|
4837
|
+
catch (e) {
|
|
4838
|
+
process.stdout.write(JSON.stringify({ ok: false, error: e.message }) + "\n");
|
|
4839
|
+
process.exitCode = 1;
|
|
4840
|
+
}
|
|
4841
|
+
});
|
|
4633
4842
|
// v2.54.0 — STRATEGY primitive (RFC drafts + pricing tiers).
|
|
4634
4843
|
const strategyParent = program
|
|
4635
4844
|
.command("strategy")
|