@agentmemory/agentmemory 0.9.23 → 0.9.24

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAwMsB,kBAAA,CAAA,GAAsB,OAAA"}
1
+ {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAgNsB,kBAAA,CAAA,GAAsB,OAAA"}
package/dist/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { n as resolveAdapter, r as runAdapter } from "./connect-Cf9bmBqO.mjs";
3
3
  import { i as generateId } from "./schema-BkALl7Z_.mjs";
4
4
  import { r as setBootVerbose } from "./logger-xlVlvCWX.mjs";
5
- import { t as VERSION } from "./version-BPfyI4Kc.mjs";
5
+ import { t as VERSION } from "./version-BWEBnKAp.mjs";
6
6
  import { execFileSync, spawn, spawnSync } from "node:child_process";
7
7
  import { closeSync, constants, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
8
8
  import { delimiter, dirname, join } from "node:path";
@@ -806,6 +806,10 @@ const IS_WINDOWS = platform() === "win32";
806
806
  const IS_VERBOSE = args.includes("--verbose") || args.includes("-v") || process.env["AGENTMEMORY_VERBOSE"] === "1" || process.env["AGENTMEMORY_VERBOSE"] === "true";
807
807
  setBootVerbose(IS_VERBOSE);
808
808
  const IS_RESET = args.includes("--reset");
809
+ if (args.includes("--version") || args.includes("-V")) {
810
+ process.stdout.write(`${VERSION}\n`);
811
+ process.exit(0);
812
+ }
809
813
  const IIPINNED_VERSION = process.env["AGENTMEMORY_III_VERSION"] || "0.11.2";
810
814
  function iiiReleaseAsset() {
811
815
  const p = platform();
@@ -1024,15 +1028,14 @@ function iiiBinVersion(binPath) {
1024
1028
  return null;
1025
1029
  }
1026
1030
  }
1027
- let warnedVersionMismatch = false;
1028
- function warnIfEngineVersionMismatch(iiiBinPath) {
1029
- if (!iiiBinPath || warnedVersionMismatch) return;
1031
+ function enforceEngineVersionPin(iiiBinPath) {
1032
+ if (!iiiBinPath) return;
1030
1033
  const detected = iiiBinVersion(iiiBinPath);
1031
1034
  if (!detected || detected === IIPINNED_VERSION) return;
1032
- warnedVersionMismatch = true;
1033
1035
  const asset = iiiReleaseAsset();
1034
1036
  const downloadHint = asset ? `curl -fsSL https://github.com/iii-hq/iii/releases/download/iii/v${IIPINNED_VERSION}/${asset} | tar -xz -C ~/.local/bin` : `download v${IIPINNED_VERSION} from https://github.com/iii-hq/iii/releases/tag/iii%2Fv${IIPINNED_VERSION}`;
1035
- p.log.warn(`iii-engine on PATH is v${detected} but agentmemory v${VERSION} pins v${IIPINNED_VERSION}. Set AGENTMEMORY_III_VERSION=${detected} to silence, or downgrade with: \`${downloadHint}\``);
1037
+ p.log.error(`iii-engine on PATH is v${detected} but agentmemory v${VERSION} hard-pins v${IIPINNED_VERSION}. Engine API drift causes runtime failures (e.g. state::list-not-found on v0.13.0). Downgrade with: \`${downloadHint}\`. Or set AGENTMEMORY_III_VERSION=${detected} to override at your own risk.`);
1038
+ process.exit(1);
1036
1039
  }
1037
1040
  function enginePidfilePath() {
1038
1041
  return join(homedir(), ".agentmemory", "iii.pid");
@@ -1294,7 +1297,7 @@ function spawnEngineBackground(bin, spawnArgs, label) {
1294
1297
  return child;
1295
1298
  }
1296
1299
  function startIiiBin(iiiBin, configPath) {
1297
- warnIfEngineVersionMismatch(iiiBin);
1300
+ enforceEngineVersionPin(iiiBin);
1298
1301
  const s = p.spinner();
1299
1302
  s.start(`Starting iii-engine: ${iiiBin}`);
1300
1303
  writeEngineState({
@@ -1501,7 +1504,7 @@ async function main() {
1501
1504
  if (firstRun || IS_RESET) await runOnboarding();
1502
1505
  if (skipEngine) {
1503
1506
  if (IS_VERBOSE) p.log.info("Skipping engine check (--no-engine)");
1504
- await import("./src-DvS3bhMe.mjs");
1507
+ await import("./src-B8J9Exum.mjs");
1505
1508
  if (await waitForAgentmemoryReady(15e3)) {
1506
1509
  const consoleState = await ensureIiiConsole();
1507
1510
  await maybeOfferGlobalInstall();
@@ -1511,9 +1514,9 @@ async function main() {
1511
1514
  }
1512
1515
  if (await isEngineRunning()) {
1513
1516
  if (IS_VERBOSE) p.log.success("iii-engine is running");
1514
- warnIfEngineVersionMismatch(whichBinary("iii") ?? fallbackIiiPaths().find((p) => existsSync(p)) ?? null);
1517
+ enforceEngineVersionPin(whichBinary("iii") ?? fallbackIiiPaths().find((p) => existsSync(p)) ?? null);
1515
1518
  adoptRunningEngine();
1516
- await import("./src-DvS3bhMe.mjs");
1519
+ await import("./src-B8J9Exum.mjs");
1517
1520
  if (await waitForAgentmemoryReady(15e3)) {
1518
1521
  const consoleState = await ensureIiiConsole();
1519
1522
  await maybeOfferGlobalInstall();
@@ -1562,7 +1565,7 @@ async function main() {
1562
1565
  process.exit(1);
1563
1566
  }
1564
1567
  s.stop("iii-engine is ready");
1565
- await import("./src-DvS3bhMe.mjs");
1568
+ await import("./src-B8J9Exum.mjs");
1566
1569
  if (await waitForAgentmemoryReady(15e3)) {
1567
1570
  const consoleState = await ensureIiiConsole();
1568
1571
  await maybeOfferGlobalInstall();
@@ -2487,7 +2490,7 @@ async function runStop() {
2487
2490
  p.outro("Stopped. Memories persisted to disk; restart anytime with: npx @agentmemory/agentmemory");
2488
2491
  }
2489
2492
  async function runMcp() {
2490
- await import("./standalone-DHQcPX_g.mjs");
2493
+ await import("./standalone-CPfsVTBA.mjs");
2491
2494
  }
2492
2495
  async function runConnectCmd() {
2493
2496
  const { runConnect } = await import("./connect-Cf9bmBqO.mjs").then((n) => n.t);