@edihasaj/recall 1.0.11 → 1.2.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.
Files changed (39) hide show
  1. package/dist/{chunk-3IF7HONQ.js → chunk-5FY3HYGU.js} +73 -18
  2. package/dist/chunk-5FY3HYGU.js.map +1 -0
  3. package/dist/{chunk-WD55NWCC.js → chunk-B6KSSZUW.js} +8 -1
  4. package/dist/chunk-B6KSSZUW.js.map +1 -0
  5. package/dist/{chunk-6B5OQLIE.js → chunk-G44JMYVI.js} +36 -9
  6. package/dist/chunk-G44JMYVI.js.map +1 -0
  7. package/dist/{chunk-TYXRTMDK.js → chunk-JP5YAQPQ.js} +2 -2
  8. package/dist/{chunk-WVVH7AVR.js → chunk-NFCBG4OH.js} +6 -6
  9. package/dist/{chunk-LYTIYKXH.js → chunk-T5FOKQH2.js} +2 -2
  10. package/dist/{chunk-PGTHECO2.js → chunk-TUC6GU35.js} +2 -2
  11. package/dist/{chunk-D57YOEJH.js → chunk-UUCSHXES.js} +26 -18
  12. package/dist/{chunk-D57YOEJH.js.map → chunk-UUCSHXES.js.map} +1 -1
  13. package/dist/{cleanup-MDEYU6TC.js → cleanup-PT3VB3CG.js} +3 -3
  14. package/dist/cli.js +125 -42
  15. package/dist/cli.js.map +1 -1
  16. package/dist/daemon.js +28 -13
  17. package/dist/daemon.js.map +1 -1
  18. package/dist/{dispatcher-PNYGUIKO.js → dispatcher-2Q6LY57F.js} +3 -3
  19. package/dist/{ingest-NX53XWCU.js → ingest-ERAUAPMC.js} +2 -2
  20. package/dist/mcp.js +6 -6
  21. package/dist/{memory-value-LISBUR2V.js → memory-value-2NDAQNMS.js} +3 -3
  22. package/dist/{quality-TM5E6JCK.js → quality-WFWVU4FQ.js} +4 -4
  23. package/dist/{retrieval-63A775WR.js → retrieval-JOC63UXZ.js} +3 -3
  24. package/dist/{tasks-RR4E4JAG.js → tasks-ANFQXOYX.js} +3 -3
  25. package/package.json +1 -1
  26. package/dist/chunk-3IF7HONQ.js.map +0 -1
  27. package/dist/chunk-6B5OQLIE.js.map +0 -1
  28. package/dist/chunk-WD55NWCC.js.map +0 -1
  29. /package/dist/{chunk-TYXRTMDK.js.map → chunk-JP5YAQPQ.js.map} +0 -0
  30. /package/dist/{chunk-WVVH7AVR.js.map → chunk-NFCBG4OH.js.map} +0 -0
  31. /package/dist/{chunk-LYTIYKXH.js.map → chunk-T5FOKQH2.js.map} +0 -0
  32. /package/dist/{chunk-PGTHECO2.js.map → chunk-TUC6GU35.js.map} +0 -0
  33. /package/dist/{cleanup-MDEYU6TC.js.map → cleanup-PT3VB3CG.js.map} +0 -0
  34. /package/dist/{dispatcher-PNYGUIKO.js.map → dispatcher-2Q6LY57F.js.map} +0 -0
  35. /package/dist/{ingest-NX53XWCU.js.map → ingest-ERAUAPMC.js.map} +0 -0
  36. /package/dist/{memory-value-LISBUR2V.js.map → memory-value-2NDAQNMS.js.map} +0 -0
  37. /package/dist/{quality-TM5E6JCK.js.map → quality-WFWVU4FQ.js.map} +0 -0
  38. /package/dist/{retrieval-63A775WR.js.map → retrieval-JOC63UXZ.js.map} +0 -0
  39. /package/dist/{tasks-RR4E4JAG.js.map → tasks-ANFQXOYX.js.map} +0 -0
@@ -13,10 +13,10 @@ import {
13
13
  qualityReasons,
14
14
  revertCleanupRun,
15
15
  runDeterministicCleanup
16
- } from "./chunk-3IF7HONQ.js";
16
+ } from "./chunk-5FY3HYGU.js";
17
17
  import "./chunk-FHEH6QDU.js";
18
18
  import "./chunk-CW3XJDH7.js";
19
- import "./chunk-WD55NWCC.js";
19
+ import "./chunk-B6KSSZUW.js";
20
20
  import "./chunk-KD4OKHYF.js";
21
21
  import "./chunk-WZWXYBP6.js";
22
22
  import "./chunk-EAFRT7RX.js";
@@ -38,4 +38,4 @@ export {
38
38
  revertCleanupRun,
39
39
  runDeterministicCleanup
40
40
  };
41
- //# sourceMappingURL=cleanup-MDEYU6TC.js.map
41
+ //# sourceMappingURL=cleanup-PT3VB3CG.js.map
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  readCodexSessionStartInputFromStdin,
24
24
  readCodexToolInputFromStdin,
25
25
  restoreBackup
26
- } from "./chunk-6B5OQLIE.js";
26
+ } from "./chunk-G44JMYVI.js";
27
27
  import {
28
28
  RECALL_DB_USER_VERSION,
29
29
  closeDb,
@@ -69,7 +69,7 @@ import {
69
69
  summarizeValueRetrievalEval,
70
70
  togglePolicy,
71
71
  writeRepoContextArtifact
72
- } from "./chunk-D57YOEJH.js";
72
+ } from "./chunk-UUCSHXES.js";
73
73
  import {
74
74
  autoResolveContradictions,
75
75
  computeAllHealthScores,
@@ -87,8 +87,8 @@ import {
87
87
  recordAudit,
88
88
  resolveContradiction,
89
89
  rollbackMemory
90
- } from "./chunk-3IF7HONQ.js";
91
- import "./chunk-TYXRTMDK.js";
90
+ } from "./chunk-5FY3HYGU.js";
91
+ import "./chunk-JP5YAQPQ.js";
92
92
  import "./chunk-FHEH6QDU.js";
93
93
  import "./chunk-CW3XJDH7.js";
94
94
  import "./chunk-PUMEMKGF.js";
@@ -102,7 +102,7 @@ import {
102
102
  listRepos,
103
103
  queryMemories,
104
104
  rejectMemory
105
- } from "./chunk-WD55NWCC.js";
105
+ } from "./chunk-B6KSSZUW.js";
106
106
  import {
107
107
  atomicWriteUtf8File,
108
108
  bootstrapEmbeddings,
@@ -495,9 +495,65 @@ async function joinTeam(config, teamId) {
495
495
  if (!resp.ok) throw new Error(`Failed to join team: ${resp.statusText}`);
496
496
  }
497
497
 
498
+ // src/doctor/app-registrations.ts
499
+ import { execFileSync } from "child_process";
500
+ var INSTALLED_APP_PATH = "/Applications/Recall.app";
501
+ var LSREGISTER = "/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";
502
+ function runLsregister(args) {
503
+ try {
504
+ return execFileSync(LSREGISTER, args, {
505
+ encoding: "utf-8",
506
+ stdio: ["ignore", "pipe", "ignore"],
507
+ maxBuffer: 64 * 1024 * 1024
508
+ });
509
+ } catch {
510
+ return null;
511
+ }
512
+ }
513
+ var PATH_LINE_RE = /^\s*path:\s+(\/\S.*?)(?:\s+\(0x[0-9a-f]+\))?\s*$/i;
514
+ var RECALL_BUNDLE_RE = /\/Recall[^/]*\.app(?:[^/]*)?$/i;
515
+ function parseRegisteredAppPaths(dump) {
516
+ const paths = /* @__PURE__ */ new Set();
517
+ for (const line of dump.split("\n")) {
518
+ const match = line.match(PATH_LINE_RE);
519
+ if (!match) continue;
520
+ const path = match[1];
521
+ if (RECALL_BUNDLE_RE.test(path)) paths.add(path);
522
+ }
523
+ return [...paths].sort();
524
+ }
525
+ function inspectAppRegistrations(options = {}) {
526
+ const platform = options.platform ?? process.platform;
527
+ if (platform !== "darwin") {
528
+ return { supported: false, installed_registered: false, stray_paths: [] };
529
+ }
530
+ const dump = options.dump !== void 0 ? options.dump : runLsregister(["-dump"]);
531
+ if (dump == null) {
532
+ return { supported: false, installed_registered: false, stray_paths: [] };
533
+ }
534
+ const registered = parseRegisteredAppPaths(dump);
535
+ return {
536
+ supported: true,
537
+ installed_registered: registered.includes(INSTALLED_APP_PATH),
538
+ stray_paths: registered.filter((path) => path !== INSTALLED_APP_PATH)
539
+ };
540
+ }
541
+ function unregisterStrayApps(strayPaths, options = {}) {
542
+ const platform = options.platform ?? process.platform;
543
+ const result = { unregistered: [], failed: [] };
544
+ if (platform !== "darwin") return result;
545
+ const run = options.run ?? ((path) => runLsregister(["-u", path]) !== null);
546
+ for (const path of strayPaths) {
547
+ if (path === INSTALLED_APP_PATH) continue;
548
+ if (run(path)) result.unregistered.push(path);
549
+ else result.failed.push(path);
550
+ }
551
+ return result;
552
+ }
553
+
498
554
  // src/setup/local.ts
499
555
  import { existsSync as existsSync6 } from "fs";
500
- import { execFileSync as execFileSync3 } from "child_process";
556
+ import { execFileSync as execFileSync4 } from "child_process";
501
557
  import { basename, dirname as dirname5, join as join7, resolve as resolve4 } from "path";
502
558
  import { fileURLToPath as fileURLToPath3 } from "url";
503
559
 
@@ -514,14 +570,14 @@ import { dirname, join, resolve } from "path";
514
570
  import { fileURLToPath } from "url";
515
571
 
516
572
  // src/agents/utils.ts
517
- import { execFileSync } from "child_process";
573
+ import { execFileSync as execFileSync2 } from "child_process";
518
574
  import { homedir } from "os";
519
575
  function resolveUserHomeDir() {
520
576
  return process.env.HOME ?? process.env.USERPROFILE ?? homedir();
521
577
  }
522
578
  function hasCommand(name) {
523
579
  try {
524
- execFileSync("which", [name], { stdio: "ignore" });
580
+ execFileSync2("which", [name], { stdio: "ignore" });
525
581
  return true;
526
582
  } catch {
527
583
  return false;
@@ -921,7 +977,7 @@ import {
921
977
  statSync,
922
978
  writeFileSync as writeFileSync2
923
979
  } from "fs";
924
- import { execFileSync as execFileSync2 } from "child_process";
980
+ import { execFileSync as execFileSync3 } from "child_process";
925
981
  import { dirname as dirname2, join as join2, resolve as resolve2 } from "path";
926
982
  import { fileURLToPath as fileURLToPath2 } from "url";
927
983
  var CODEX_CONFIG_RELATIVE_PATH = [".codex", "config.toml"];
@@ -1158,7 +1214,7 @@ function installCodexHooks(options = {}) {
1158
1214
  function probeCodexVersion() {
1159
1215
  if (!hasCommand("codex")) return null;
1160
1216
  try {
1161
- const raw = execFileSync2("codex", ["--version"], {
1217
+ const raw = execFileSync3("codex", ["--version"], {
1162
1218
  encoding: "utf-8",
1163
1219
  stdio: ["ignore", "pipe", "ignore"],
1164
1220
  timeout: 5e3
@@ -2358,7 +2414,7 @@ function resolveHookConfigPath(agent, scope, cwd) {
2358
2414
  return agent === "codex" ? join7(resolveUserHomeDir(), ".codex", "config.toml") : join7(resolveUserHomeDir(), ".claude", "settings.json");
2359
2415
  }
2360
2416
  function defaultRunner(command, args, options) {
2361
- execFileSync3(command, args, { ...stdioOpts(), ...options?.env ? { env: options.env } : {} });
2417
+ execFileSync4(command, args, { ...stdioOpts(), ...options?.env ? { env: options.env } : {} });
2362
2418
  }
2363
2419
  function tryRun(runner, command, args, options) {
2364
2420
  try {
@@ -2392,7 +2448,7 @@ import Database from "better-sqlite3";
2392
2448
  import { chmodSync, existsSync as existsSync7, mkdirSync as mkdirSync5, rmSync as rmSync2, writeFileSync as writeFileSync5 } from "fs";
2393
2449
  import { homedir as homedir2 } from "os";
2394
2450
  import { dirname as dirname6, join as join8, resolve as resolve5 } from "path";
2395
- import { execFileSync as execFileSync4 } from "child_process";
2451
+ import { execFileSync as execFileSync5 } from "child_process";
2396
2452
 
2397
2453
  // src/daemon/provider-env.ts
2398
2454
  var DAEMON_PROVIDER_ENV_KEYS = [
@@ -2434,9 +2490,9 @@ function installLaunchAgent(opts = {}) {
2434
2490
  writeFileSync5(cfg.plistPath, renderPlist(cfg), { mode: 384 });
2435
2491
  chmodSync(cfg.plistPath, 384);
2436
2492
  tryRun2("launchctl", ["bootout", domainTarget(), cfg.plistPath]);
2437
- execFileSync4("launchctl", ["bootstrap", domainTarget(), cfg.plistPath], stdioOpts2());
2438
- execFileSync4("launchctl", ["enable", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2439
- execFileSync4("launchctl", ["kickstart", "-k", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2493
+ execFileSync5("launchctl", ["bootstrap", domainTarget(), cfg.plistPath], stdioOpts2());
2494
+ execFileSync5("launchctl", ["enable", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2495
+ execFileSync5("launchctl", ["kickstart", "-k", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2440
2496
  return getLaunchAgentStatus(cfg.label);
2441
2497
  }
2442
2498
  function uninstallLaunchAgent(label = DEFAULT_LABEL) {
@@ -2453,9 +2509,9 @@ function startLaunchAgent(label = DEFAULT_LABEL) {
2453
2509
  if (!exists(cfg.plistPath)) {
2454
2510
  throw new Error(`LaunchAgent not installed: ${cfg.plistPath}`);
2455
2511
  }
2456
- execFileSync4("launchctl", ["enable", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2512
+ execFileSync5("launchctl", ["enable", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2457
2513
  tryRun2("launchctl", ["bootstrap", domainTarget(), cfg.plistPath]);
2458
- execFileSync4("launchctl", ["kickstart", "-k", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2514
+ execFileSync5("launchctl", ["kickstart", "-k", `${domainTarget()}/${cfg.label}`], stdioOpts2());
2459
2515
  return getLaunchAgentStatus(cfg.label);
2460
2516
  }
2461
2517
  function stopLaunchAgent(label = DEFAULT_LABEL) {
@@ -2606,14 +2662,14 @@ function extractState(output) {
2606
2662
  }
2607
2663
  function tryRun2(cmd, args) {
2608
2664
  try {
2609
- execFileSync4(cmd, args, stdioOpts2());
2665
+ execFileSync5(cmd, args, stdioOpts2());
2610
2666
  } catch {
2611
2667
  return;
2612
2668
  }
2613
2669
  }
2614
2670
  function tryOutput(cmd, args) {
2615
2671
  try {
2616
- const output = execFileSync4(cmd, args, {
2672
+ const output = execFileSync5(cmd, args, {
2617
2673
  encoding: "utf8",
2618
2674
  stdio: ["ignore", "pipe", "pipe"]
2619
2675
  });
@@ -2628,7 +2684,7 @@ function tryOutput(cmd, args) {
2628
2684
  function readInstalledConfig(plistPath) {
2629
2685
  if (!exists(plistPath)) return null;
2630
2686
  try {
2631
- const raw = execFileSync4("plutil", ["-convert", "json", "-o", "-", plistPath], {
2687
+ const raw = execFileSync5("plutil", ["-convert", "json", "-o", "-", plistPath], {
2632
2688
  encoding: "utf8",
2633
2689
  stdio: ["ignore", "pipe", "pipe"]
2634
2690
  });
@@ -2675,7 +2731,7 @@ import { chmodSync as chmodSync2, existsSync as existsSync8, mkdirSync as mkdirS
2675
2731
  import { homedir as homedir3 } from "os";
2676
2732
  import { dirname as dirname7, join as join9, resolve as resolve6 } from "path";
2677
2733
  import { fileURLToPath as fileURLToPath4 } from "url";
2678
- import { execFileSync as execFileSync5 } from "child_process";
2734
+ import { execFileSync as execFileSync6 } from "child_process";
2679
2735
  var DEFAULT_LABEL2 = "recall-daemon";
2680
2736
  function installSystemdUnit(opts = {}) {
2681
2737
  assertLinux();
@@ -2877,18 +2933,18 @@ function unescapeSystemdValue(value) {
2877
2933
  return value.replaceAll("%%", "%").replaceAll('\\"', '"').replaceAll("\\\\", "\\");
2878
2934
  }
2879
2935
  function systemctl(args) {
2880
- execFileSync5("systemctl", args, { stdio: "pipe" });
2936
+ execFileSync6("systemctl", args, { stdio: "pipe" });
2881
2937
  }
2882
2938
  function trySystemctl(args) {
2883
2939
  try {
2884
- execFileSync5("systemctl", args, { stdio: "pipe" });
2940
+ execFileSync6("systemctl", args, { stdio: "pipe" });
2885
2941
  } catch {
2886
2942
  return;
2887
2943
  }
2888
2944
  }
2889
2945
  function trySystemctlOutput(args) {
2890
2946
  try {
2891
- const output = execFileSync5("systemctl", args, {
2947
+ const output = execFileSync6("systemctl", args, {
2892
2948
  encoding: "utf8",
2893
2949
  stdio: ["ignore", "pipe", "pipe"]
2894
2950
  });
@@ -2944,7 +3000,8 @@ function getDoctorReport() {
2944
3000
  agents,
2945
3001
  upgrade: computeUpgradeSignal(agents),
2946
3002
  cleanup: readCleanupHealth(dbPath),
2947
- dispatcher: readDispatcherHealth(dbPath)
3003
+ dispatcher: readDispatcherHealth(dbPath),
3004
+ app_registrations: inspectAppRegistrations()
2948
3005
  };
2949
3006
  }
2950
3007
  function readDispatcherHealth(dbPath) {
@@ -3302,6 +3359,16 @@ function formatDoctorReport(report) {
3302
3359
  lines.push("Tasks are queued but no provider is configured. Run `recall maintenance dispatch --preview` to inspect prompts, or `recall maintenance credentials set <provider> <key>` to enable.");
3303
3360
  }
3304
3361
  }
3362
+ if (report.app_registrations?.supported && report.app_registrations.stray_paths.length > 0) {
3363
+ const strays = report.app_registrations.stray_paths;
3364
+ lines.push("", "## Stray app registrations");
3365
+ lines.push(
3366
+ `macOS is offering ${strays.length} Recall.app bundle(s) besides the installed one.`
3367
+ );
3368
+ for (const path of strays.slice(0, 10)) lines.push(`- ${path}`);
3369
+ if (strays.length > 10) lines.push(`- ...and ${strays.length - 10} more`);
3370
+ lines.push("Run `recall doctor --fix` to unregister them (files are left untouched).");
3371
+ }
3305
3372
  if (report.upgrade.available) {
3306
3373
  lines.push("", "## Upgrade available");
3307
3374
  for (const reason of report.upgrade.reasons) {
@@ -3313,7 +3380,7 @@ function formatDoctorReport(report) {
3313
3380
  }
3314
3381
 
3315
3382
  // src/data/purge.ts
3316
- import { execFileSync as execFileSync6 } from "child_process";
3383
+ import { execFileSync as execFileSync7 } from "child_process";
3317
3384
  import {
3318
3385
  existsSync as existsSync10,
3319
3386
  readFileSync as readFileSync7,
@@ -3560,7 +3627,7 @@ function removeIntegrations(repoRoots) {
3560
3627
  function removeCliMcp(command, args, cwd) {
3561
3628
  const target = `${command} Recall MCP${cwd ? ` in ${cwd}` : ""}`;
3562
3629
  try {
3563
- execFileSync6(command, ["mcp", "get", "recall"], {
3630
+ execFileSync7(command, ["mcp", "get", "recall"], {
3564
3631
  cwd,
3565
3632
  stdio: "ignore",
3566
3633
  timeout: 1e4
@@ -3574,7 +3641,7 @@ function removeCliMcp(command, args, cwd) {
3574
3641
  };
3575
3642
  }
3576
3643
  try {
3577
- execFileSync6(command, args, {
3644
+ execFileSync7(command, args, {
3578
3645
  cwd,
3579
3646
  stdio: "ignore",
3580
3647
  timeout: 1e4
@@ -3658,9 +3725,20 @@ program.command("doctor").description("Show local Recall runtime, DB, embedding,
3658
3725
  if (a.agent === "claude-code" && a.claude_md && a.claude_md !== "current") return true;
3659
3726
  return false;
3660
3727
  }).map((a) => a.agent);
3661
- if (detectedAgents.length === 0) {
3728
+ const strays = report.app_registrations.stray_paths;
3729
+ if (strays.length > 0) {
3730
+ const cleared = unregisterStrayApps(strays);
3731
+ report.app_registrations.stray_paths = cleared.failed;
3732
+ if (!opts.json) {
3733
+ console.log(`Unregistered ${cleared.unregistered.length} stray Recall.app bundle(s).`);
3734
+ for (const path of cleared.failed) {
3735
+ console.log(` could not unregister: ${path}`);
3736
+ }
3737
+ }
3738
+ }
3739
+ if (detectedAgents.length === 0 && strays.length === 0) {
3662
3740
  if (!opts.json) console.log("Nothing to fix \u2014 all detected agents are wired.");
3663
- } else {
3741
+ } else if (detectedAgents.length > 0) {
3664
3742
  const fixResult = runRecallSetup({
3665
3743
  agent: detectedAgents
3666
3744
  });
@@ -3718,10 +3796,15 @@ dbCmd.command("backups").description("List available database snapshots").action
3718
3796
  console.log("No backups yet.");
3719
3797
  return;
3720
3798
  }
3799
+ let total = 0;
3721
3800
  for (const b of backups) {
3722
3801
  const mb = (b.size_bytes / 1024 / 1024).toFixed(2);
3723
- console.log(`${b.date} ${mb} MB ${b.path}`);
3802
+ total += b.size_bytes;
3803
+ const tag = b.kind === "one_off" ? " [one-off]" : "";
3804
+ console.log(`${b.date} ${mb} MB ${b.path}${tag}`);
3724
3805
  }
3806
+ console.log(`
3807
+ Total: ${(total / 1024 / 1024 / 1024).toFixed(2)} GB across ${backups.length} snapshot(s)`);
3725
3808
  });
3726
3809
  dbCmd.command("restore <date>").description("Restore the local database from a dated snapshot (YYYY-MM-DD)").option("--yes", "Confirm overwrite").action((date, opts) => {
3727
3810
  if (!opts.yes) {
@@ -4396,7 +4479,7 @@ evalCmd.command("value-retrieval").description("Run retrieval eval cases synthes
4396
4479
  });
4397
4480
  let snapshot = null;
4398
4481
  if (opts.snapshot) {
4399
- const { computeQualityReport, recordQualitySnapshot } = await import("./quality-TM5E6JCK.js");
4482
+ const { computeQualityReport, recordQualitySnapshot } = await import("./quality-WFWVU4FQ.js");
4400
4483
  const qualityReport = computeQualityReport(db, { sinceIso: report.since });
4401
4484
  snapshot = recordQualitySnapshot(
4402
4485
  db,
@@ -4888,7 +4971,7 @@ graphCmd.command("stats").description("Show entity/relation counts").action(asyn
4888
4971
  });
4889
4972
  graphCmd.command("backfill").description("Run the heuristic extractor over every active memory (idempotent)").option("--repo <repo>", "Limit to a single repo").option("--limit <n>", "Cap rows processed", "10000").option("--rebuild", "Clear all existing entities/relations first, then re-extract").action(async (opts) => {
4890
4973
  const db = initDb();
4891
- const { ingestMemoryHeuristic } = await import("./ingest-NX53XWCU.js");
4974
+ const { ingestMemoryHeuristic } = await import("./ingest-ERAUAPMC.js");
4892
4975
  if (opts.rebuild) {
4893
4976
  const { clearGraph } = await import("./store-5C7ZKKZF.js");
4894
4977
  clearGraph(db);
@@ -4931,7 +5014,7 @@ graphCmd.command("entities").description("List entities").option("--repo <repo>"
4931
5014
  });
4932
5015
  graphCmd.command("query <query...>").description("Run graph-aware retrieval for a query").option("--repo <repo>", "Restrict to repo").option("--hops <n>", "Graph hops", "2").option("--limit <n>", "Max hits", "10").action(async (queryTokens, opts) => {
4933
5016
  const db = initDb();
4934
- const { graphQuery } = await import("./retrieval-63A775WR.js");
5017
+ const { graphQuery } = await import("./retrieval-JOC63UXZ.js");
4935
5018
  const { loadEmbeddingConfigFromEnv: loadEmbeddingConfigFromEnv2 } = await import("./embeddings-CLBTYK7N.js");
4936
5019
  const embeddingConfig = loadEmbeddingConfigFromEnv2();
4937
5020
  const result = await graphQuery(db, queryTokens.join(" "), embeddingConfig, {
@@ -4948,7 +5031,7 @@ graphCmd.command("query <query...>").description("Run graph-aware retrieval for
4948
5031
  });
4949
5032
  var maintenanceCmd = program.command("maintenance").description("Inspect and manage the delegated maintenance task queue");
4950
5033
  maintenanceCmd.command("stats").description("Show backlog counts, completion stats, and mean latency").action(async () => {
4951
- const { getTaskStats } = await import("./tasks-RR4E4JAG.js");
5034
+ const { getTaskStats } = await import("./tasks-ANFQXOYX.js");
4952
5035
  const db = initDb();
4953
5036
  const stats = getTaskStats(db);
4954
5037
  console.log(`Total tasks: ${stats.total}`);
@@ -4974,7 +5057,7 @@ maintenanceCmd.command("stats").description("Show backlog counts, completion sta
4974
5057
  }
4975
5058
  });
4976
5059
  maintenanceCmd.command("list").description("List tasks (default: pending)").option("-s, --status <status>", "pending|claimed|completed|abandoned", "pending").option("-k, --kind <kind>", "Filter by kind").option("-r, --repo <repo>", "Filter by repo").option("-n, --limit <n>", "Max entries", "20").action(async (opts) => {
4977
- const { listTasks } = await import("./tasks-RR4E4JAG.js");
5060
+ const { listTasks } = await import("./tasks-ANFQXOYX.js");
4978
5061
  const db = initDb();
4979
5062
  const tasks = listTasks(db, {
4980
5063
  status: opts.status,
@@ -4996,7 +5079,7 @@ maintenanceCmd.command("list").description("List tasks (default: pending)").opti
4996
5079
  }
4997
5080
  });
4998
5081
  maintenanceCmd.command("drop").description("Delete a task by id (or id prefix)").argument("<task-id>", "Task id or prefix").action(async (taskIdArg) => {
4999
- const { deleteTask, listTasks } = await import("./tasks-RR4E4JAG.js");
5082
+ const { deleteTask, listTasks } = await import("./tasks-ANFQXOYX.js");
5000
5083
  const db = initDb();
5001
5084
  const all = listTasks(db, { limit: 1e4 });
5002
5085
  const matches = all.filter((t) => t.id === taskIdArg || t.id.startsWith(taskIdArg));
@@ -5102,8 +5185,8 @@ credentialsCmd.command("clear").description("Remove provider credentials from th
5102
5185
  else console.log(`No ${provider} credentials found in Keychain.`);
5103
5186
  });
5104
5187
  maintenanceCmd.command("dispatch").description("Run the daemon-owned dispatcher once against pending maintenance tasks (requires a configured LLM provider)").option("--provider <provider>", "openai|anthropic|azure-openai (defaults to whichever is configured)").option("--model <model>", "Model override").option("--kind <kind>", "Restrict to a single task kind (repeatable)", (value, acc = []) => [...acc, value], []).option("--repo <repo>", "Restrict to a single repo").option("--max <n>", "Max tasks to run this round", "5").option("--dry-run", "Show which tasks would be dispatched; do not call the LLM").option("--preview", "Show the actual prompts that would be sent (no provider needed; no LLM call)").option("--json", "Emit the raw JSON report").action(async (opts) => {
5105
- const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-PNYGUIKO.js");
5106
- const { listTasks } = await import("./tasks-RR4E4JAG.js");
5188
+ const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-2Q6LY57F.js");
5189
+ const { listTasks } = await import("./tasks-ANFQXOYX.js");
5107
5190
  const db = initDb();
5108
5191
  if (opts.preview) {
5109
5192
  const pending = listTasks(db, {
@@ -5160,7 +5243,7 @@ ${p.prompt.max_output_tokens}
5160
5243
  console.log(formatDispatchReport(report));
5161
5244
  });
5162
5245
  maintenanceCmd.command("cleanup").description("Run deterministic, LLM-free cleanup for duplicate, low-quality, stale, and mis-scoped memories").option("--apply", "Persist changes (default is dry-run)").option("--only <action>", "Restrict to one action: dedupe_exact_merge|reject_fragment_candidate|promote_repeat_correction|suppress_unproductive_command|globalize_cross_repo|reject_test_fixture_repo|reject_invalid_scope|reject_generic_scanned_tooling").option("--revert <run-id>", "Revert a previous cleanup run (id or 8-char prefix)").option("--list", "List recent cleanup runs").option("--json", "Emit the raw JSON report").action(async (opts) => {
5163
- const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-MDEYU6TC.js");
5246
+ const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-PT3VB3CG.js");
5164
5247
  const db = initDb();
5165
5248
  if (opts.list) {
5166
5249
  const runs = listCleanupRuns(db);
@@ -5214,7 +5297,7 @@ maintenanceCmd.command("quality").description("Show injection outcome distributi
5214
5297
  recordQualitySnapshot,
5215
5298
  listQualitySnapshots,
5216
5299
  diffQualitySnapshots
5217
- } = await import("./quality-TM5E6JCK.js");
5300
+ } = await import("./quality-WFWVU4FQ.js");
5218
5301
  const db = initDb();
5219
5302
  if (opts.history) {
5220
5303
  const snaps = listQualitySnapshots(db);
@@ -5275,7 +5358,7 @@ maintenanceCmd.command("value-backfill").description("Backfill memory value even
5275
5358
  const {
5276
5359
  backfillMemoryValueEvents,
5277
5360
  formatMemoryValueBackfillReport
5278
- } = await import("./memory-value-LISBUR2V.js");
5361
+ } = await import("./memory-value-2NDAQNMS.js");
5279
5362
  const db = initDb();
5280
5363
  const report = backfillMemoryValueEvents(db, {
5281
5364
  sinceIso: opts.since,