@edihasaj/recall 2.0.17 → 2.0.19

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 (81) hide show
  1. package/README.md +12 -0
  2. package/dist/{chunk-VUVFQJWZ.js → chunk-3SI2FCYS.js} +2 -2
  3. package/dist/{chunk-Q22B7YDQ.js → chunk-5VIPRV3V.js} +5 -5
  4. package/dist/{chunk-22AJZ7UQ.js → chunk-673NQIZX.js} +2 -2
  5. package/dist/{chunk-UDLRBKC3.js → chunk-6B7YHOGI.js} +3 -3
  6. package/dist/{chunk-YIVOTIDF.js → chunk-FH2XQDYL.js} +5 -5
  7. package/dist/{chunk-KLERXJ47.js → chunk-GENJNVHG.js} +3 -3
  8. package/dist/{chunk-2COJXGP4.js → chunk-GTHCX5LX.js} +4 -3
  9. package/dist/{chunk-2COJXGP4.js.map → chunk-GTHCX5LX.js.map} +1 -1
  10. package/dist/{chunk-EY6HIDG2.js → chunk-J4IWU2BE.js} +9 -9
  11. package/dist/{chunk-Q7254IPO.js → chunk-J6YBL72P.js} +193 -15
  12. package/dist/chunk-J6YBL72P.js.map +1 -0
  13. package/dist/{chunk-YIUBD27J.js → chunk-M4JG3HMA.js} +30 -37
  14. package/dist/chunk-M4JG3HMA.js.map +1 -0
  15. package/dist/{chunk-CSBXI3ET.js → chunk-NSXTH2B4.js} +8 -4
  16. package/dist/chunk-NSXTH2B4.js.map +1 -0
  17. package/dist/{chunk-ZT67CYDS.js → chunk-QDCIXULL.js} +2 -2
  18. package/dist/{chunk-ZT67CYDS.js.map → chunk-QDCIXULL.js.map} +1 -1
  19. package/dist/{chunk-FNIIUNW6.js → chunk-QDONEJJG.js} +2 -2
  20. package/dist/{chunk-QQ6YHR7I.js → chunk-R5CG3RC4.js} +231 -26
  21. package/dist/chunk-R5CG3RC4.js.map +1 -0
  22. package/dist/{chunk-KVZN35JF.js → chunk-WDUYM3NZ.js} +7 -7
  23. package/dist/{chunk-RAQT2OBR.js → chunk-WPHCCQOC.js} +7 -7
  24. package/dist/{chunk-GK7OWVRQ.js → chunk-X3EF5QHV.js} +3 -3
  25. package/dist/{chunk-XRKUJ5B4.js → chunk-ZHJRYVOD.js} +2 -2
  26. package/dist/{cleanup-4TXIHTJT.js → cleanup-FOGHMRL5.js} +11 -11
  27. package/dist/cli.js +39 -191
  28. package/dist/cli.js.map +1 -1
  29. package/dist/{codex-trust-2JIY66CP.js → codex-trust-C2GOV764.js} +4 -4
  30. package/dist/daemon.js +143 -39
  31. package/dist/daemon.js.map +1 -1
  32. package/dist/dispatcher-OIINFHQU.js +22 -0
  33. package/dist/{embeddings-AAS7NKGB.js → embeddings-6Y7KXV5L.js} +5 -5
  34. package/dist/ingest-QFX3ZEM6.js +20 -0
  35. package/dist/{keychain-SHRO7W6J.js → keychain-DHS6XKIQ.js} +3 -3
  36. package/dist/mcp.js +15 -15
  37. package/dist/{memory-value-R2C7ZSDF.js → memory-value-U6TGLBZB.js} +11 -11
  38. package/dist/{provenance-I5GIAP7N.js → provenance-PLISLH2V.js} +9 -9
  39. package/dist/quality-AYWNSDIU.js +25 -0
  40. package/dist/retrieval-B2DYBYAJ.js +15 -0
  41. package/dist/{store-X2B6MRBH.js → store-OLSM63EZ.js} +4 -4
  42. package/dist/sync-server.js +2 -2
  43. package/dist/{tasks-H4NIS6QO.js → tasks-S5ZMXA5K.js} +11 -11
  44. package/dist/{usage-35HSDMNT.js → usage-RWS6VQBY.js} +4 -4
  45. package/package.json +1 -1
  46. package/vendor/recall-cloud-sync/PROVENANCE.md +18 -5
  47. package/vendor/recall-cloud-sync/recall-sync-local.mjs +19 -10
  48. package/vendor/recall-cloud-sync/recall-sync.mjs +40 -6
  49. package/dist/chunk-CSBXI3ET.js.map +0 -1
  50. package/dist/chunk-Q7254IPO.js.map +0 -1
  51. package/dist/chunk-QQ6YHR7I.js.map +0 -1
  52. package/dist/chunk-YIUBD27J.js.map +0 -1
  53. package/dist/dispatcher-O6NGADCQ.js +0 -22
  54. package/dist/ingest-DW3AG4M5.js +0 -20
  55. package/dist/quality-32MAXPNJ.js +0 -25
  56. package/dist/retrieval-RKYWWNWC.js +0 -15
  57. /package/dist/{chunk-VUVFQJWZ.js.map → chunk-3SI2FCYS.js.map} +0 -0
  58. /package/dist/{chunk-Q22B7YDQ.js.map → chunk-5VIPRV3V.js.map} +0 -0
  59. /package/dist/{chunk-22AJZ7UQ.js.map → chunk-673NQIZX.js.map} +0 -0
  60. /package/dist/{chunk-UDLRBKC3.js.map → chunk-6B7YHOGI.js.map} +0 -0
  61. /package/dist/{chunk-YIVOTIDF.js.map → chunk-FH2XQDYL.js.map} +0 -0
  62. /package/dist/{chunk-KLERXJ47.js.map → chunk-GENJNVHG.js.map} +0 -0
  63. /package/dist/{chunk-EY6HIDG2.js.map → chunk-J4IWU2BE.js.map} +0 -0
  64. /package/dist/{chunk-FNIIUNW6.js.map → chunk-QDONEJJG.js.map} +0 -0
  65. /package/dist/{chunk-KVZN35JF.js.map → chunk-WDUYM3NZ.js.map} +0 -0
  66. /package/dist/{chunk-RAQT2OBR.js.map → chunk-WPHCCQOC.js.map} +0 -0
  67. /package/dist/{chunk-GK7OWVRQ.js.map → chunk-X3EF5QHV.js.map} +0 -0
  68. /package/dist/{chunk-XRKUJ5B4.js.map → chunk-ZHJRYVOD.js.map} +0 -0
  69. /package/dist/{cleanup-4TXIHTJT.js.map → cleanup-FOGHMRL5.js.map} +0 -0
  70. /package/dist/{codex-trust-2JIY66CP.js.map → codex-trust-C2GOV764.js.map} +0 -0
  71. /package/dist/{dispatcher-O6NGADCQ.js.map → dispatcher-OIINFHQU.js.map} +0 -0
  72. /package/dist/{embeddings-AAS7NKGB.js.map → embeddings-6Y7KXV5L.js.map} +0 -0
  73. /package/dist/{ingest-DW3AG4M5.js.map → ingest-QFX3ZEM6.js.map} +0 -0
  74. /package/dist/{keychain-SHRO7W6J.js.map → keychain-DHS6XKIQ.js.map} +0 -0
  75. /package/dist/{memory-value-R2C7ZSDF.js.map → memory-value-U6TGLBZB.js.map} +0 -0
  76. /package/dist/{provenance-I5GIAP7N.js.map → provenance-PLISLH2V.js.map} +0 -0
  77. /package/dist/{quality-32MAXPNJ.js.map → quality-AYWNSDIU.js.map} +0 -0
  78. /package/dist/{retrieval-RKYWWNWC.js.map → retrieval-B2DYBYAJ.js.map} +0 -0
  79. /package/dist/{store-X2B6MRBH.js.map → store-OLSM63EZ.js.map} +0 -0
  80. /package/dist/{tasks-H4NIS6QO.js.map → tasks-S5ZMXA5K.js.map} +0 -0
  81. /package/dist/{usage-35HSDMNT.js.map → usage-RWS6VQBY.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  hasCommand,
4
4
  resolveCodexHomes,
5
5
  resolveUserHomeDir
6
- } from "./chunk-GK7OWVRQ.js";
6
+ } from "./chunk-X3EF5QHV.js";
7
7
  import {
8
8
  RECALL_DB_USER_VERSION,
9
9
  captureCorrectionFallback,
@@ -21,15 +21,16 @@ import {
21
21
  resolveLocalRepoPath,
22
22
  signalOutcomeFallback,
23
23
  startSessionLifecycle
24
- } from "./chunk-Q7254IPO.js";
24
+ } from "./chunk-J6YBL72P.js";
25
25
  import {
26
26
  detectCorrections,
27
+ isAutomatedCodexThread,
27
28
  isHighRiskRule,
28
29
  isTriggerTemplateRule,
29
30
  isWorkspaceRootAlias,
30
31
  peekTasks,
31
32
  redactSensitiveText
32
- } from "./chunk-QQ6YHR7I.js";
33
+ } from "./chunk-R5CG3RC4.js";
33
34
  import {
34
35
  detectAndRecordRetrievalMissesSemantic,
35
36
  listInjectedMemoryIdsForSession,
@@ -37,10 +38,10 @@ import {
37
38
  pathMatchesMemory,
38
39
  recordCompletionUseValueEventsSemantic,
39
40
  toolCallTouchesMemory
40
- } from "./chunk-RAQT2OBR.js";
41
+ } from "./chunk-WPHCCQOC.js";
41
42
  import {
42
43
  textMatches
43
- } from "./chunk-XRKUJ5B4.js";
44
+ } from "./chunk-ZHJRYVOD.js";
44
45
  import {
45
46
  appendEvidence,
46
47
  createMemory,
@@ -49,24 +50,24 @@ import {
49
50
  queryMemories,
50
51
  recordAudit,
51
52
  rejectMemory
52
- } from "./chunk-KVZN35JF.js";
53
+ } from "./chunk-WDUYM3NZ.js";
53
54
  import {
54
55
  desc
55
- } from "./chunk-UDLRBKC3.js";
56
+ } from "./chunk-6B7YHOGI.js";
56
57
  import {
57
58
  defineOwn,
58
59
  deleteOwn
59
- } from "./chunk-VUVFQJWZ.js";
60
+ } from "./chunk-3SI2FCYS.js";
60
61
  import {
61
62
  atomicWriteUtf8File,
62
63
  getEmbeddingModelInfo,
63
64
  readUtf8FileIfExists,
64
65
  tagActivitySource
65
- } from "./chunk-CSBXI3ET.js";
66
+ } from "./chunk-NSXTH2B4.js";
66
67
  import {
67
68
  init_keychain,
68
69
  keychain_exports
69
- } from "./chunk-FNIIUNW6.js";
70
+ } from "./chunk-QDONEJJG.js";
70
71
  import {
71
72
  activityEvents,
72
73
  and,
@@ -80,11 +81,11 @@ import {
80
81
  memoryValueEvents,
81
82
  ne,
82
83
  sql
83
- } from "./chunk-2COJXGP4.js";
84
+ } from "./chunk-GTHCX5LX.js";
84
85
  import {
85
86
  __toCommonJS,
86
87
  init_define_RECALL_BUILD_INFO
87
- } from "./chunk-ZT67CYDS.js";
88
+ } from "./chunk-QDCIXULL.js";
88
89
 
89
90
  // src/adapters/markdown.ts
90
91
  init_define_RECALL_BUILD_INFO();
@@ -247,6 +248,7 @@ function unregisterStrayApps(strayPaths, options = {}) {
247
248
 
248
249
  // src/reliability/report.ts
249
250
  init_define_RECALL_BUILD_INFO();
251
+ var OUTCOME_LOOP_MIN_EMITTED = 20;
250
252
  function ratio(numerator, denominator) {
251
253
  return denominator > 0 ? numerator / denominator : 0;
252
254
  }
@@ -338,7 +340,12 @@ function computeReliabilityReport(db, options = {}) {
338
340
  // of hiding it behind a perfect attribution rate; never fails on its own.
339
341
  { name: "session_scope_coverage", status: sessionIds.size === 0 || scopeCoverage < 0.5 ? "warn" : "pass", value: scopeCoverage, target: ">=50%" },
340
342
  { name: "emission_coverage", status: selectedPairs.size === 0 ? "warn" : emissionCoverage >= 0.99 ? "pass" : emissionCoverage >= 0.95 ? "warn" : "fail", value: emissionCoverage, target: ">=99%" },
341
- { name: "outcome_coverage", status: emittedSelected === 0 ? "warn" : outcomeCoverage >= 0.8 ? "pass" : outcomeCoverage >= 0.5 ? "warn" : "fail", value: outcomeCoverage, target: ">=80%" },
343
+ // The resolver never invents an outcome for a rule that did not apply in a
344
+ // session, so unresolved injections mix "not applicable" with "missed".
345
+ // The loop fails only when nothing resolves at all; the coverage ratio is
346
+ // a precision signal (over-broad rules) and never fails on its own.
347
+ { name: "outcome_loop", status: emittedSelected === 0 ? "warn" : resolvedOutcomes > 0 ? "pass" : emittedSelected >= OUTCOME_LOOP_MIN_EMITTED ? "fail" : "warn", value: resolvedOutcomes, target: `>=1 once ${OUTCOME_LOOP_MIN_EMITTED} emitted` },
348
+ { name: "outcome_coverage", status: emittedSelected > 0 && outcomeCoverage >= 0.8 ? "pass" : "warn", value: outcomeCoverage, target: ">=80%" },
342
349
  { name: "retrieval_observations", status: retrievalObservations >= 20 ? "pass" : retrievalObservations >= 5 ? "warn" : "fail", value: retrievalObservations, target: ">=20" },
343
350
  { name: "candidate_backlog", status: candidateBacklog <= 50 ? "pass" : candidateBacklog <= 100 ? "warn" : "fail", value: candidateBacklog, target: "<=50" }
344
351
  ];
@@ -911,7 +918,8 @@ async function handlePromptHook(input, opts = {}) {
911
918
  request: {
912
919
  client: input.agent ?? "hook",
913
920
  name: "prompt_submitted",
914
- repo_path: input.repo_path ?? null
921
+ repo_path: input.repo_path ?? null,
922
+ ...input.automated === true ? { automated: true } : {}
915
923
  },
916
924
  result: {
917
925
  text,
@@ -923,7 +931,8 @@ async function handlePromptHook(input, opts = {}) {
923
931
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
924
932
  }
925
933
  });
926
- const userAuthored = !isGeneratedCaptureContext(text);
934
+ const generated = isGeneratedCaptureContext(text);
935
+ const userAuthored = !generated && input.automated !== true;
927
936
  if (userAuthored) await resolvePendingInjectionOutcomesOnPrompt(
928
937
  db,
929
938
  sessionId,
@@ -955,7 +964,7 @@ async function handlePromptHook(input, opts = {}) {
955
964
  }, source);
956
965
  }
957
966
  const promptInjectionEnabled = process.env.RECALL_HOOK_INJECT_PROMPT !== "false";
958
- const injection = repo && promptInjectionEnabled && userAuthored ? await collectInjectionSurface(db, {
967
+ const injection = repo && promptInjectionEnabled && !generated ? await collectInjectionSurface(db, {
959
968
  repo,
960
969
  path: input.path,
961
970
  session_id: sessionId,
@@ -1375,7 +1384,8 @@ async function readPromptInputFromStdin(agent) {
1375
1384
  path: extractClaudeToolPath(payload.tool_input),
1376
1385
  repo_path: payload.cwd,
1377
1386
  session_id: payload.session_id,
1378
- text: requireNonEmpty(payload.prompt ?? "", "prompt")
1387
+ text: requireNonEmpty(payload.prompt ?? "", "prompt"),
1388
+ ...agent === "codex" && isAutomatedCodexThread(payload.transcript_path) ? { automated: true } : {}
1379
1389
  };
1380
1390
  }
1381
1391
  async function readToolInputFromStdin(agent) {
@@ -1983,7 +1993,6 @@ function isSqliteDatabase(path) {
1983
1993
 
1984
1994
  // src/reliability/verdict.ts
1985
1995
  init_define_RECALL_BUILD_INFO();
1986
- import { execFile } from "child_process";
1987
1996
  import { dirname as dirname3, join as join4 } from "path";
1988
1997
  var RELIABILITY_VERDICT_FILE = "reliability-verdict.json";
1989
1998
  var RELIABILITY_VERDICT_WINDOW_DAYS = 14;
@@ -2076,22 +2085,6 @@ function isNotificationDue(verdict, now) {
2076
2085
  if (!verdict.last_notified_at) return true;
2077
2086
  return now.getTime() - Date.parse(verdict.last_notified_at) >= RELIABILITY_NOTIFY_INTERVAL_MS;
2078
2087
  }
2079
- function notifyMacOS(message, options = {}) {
2080
- if ((options.platform ?? process.platform) !== "darwin") return Promise.resolve(false);
2081
- return new Promise((resolve6) => {
2082
- try {
2083
- execFile("/usr/bin/osascript", ["-e", buildNotificationScript(message)], { timeout: 1e4 }, (error) => {
2084
- resolve6(!error);
2085
- });
2086
- } catch {
2087
- resolve6(false);
2088
- }
2089
- });
2090
- }
2091
- function buildNotificationScript(message) {
2092
- const escaped = message.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/[\r\n]+/g, " ");
2093
- return `display notification "${escaped}" with title "Recall"`;
2094
- }
2095
2088
  function loadReliabilityVerdictConfigFromEnv(env = process.env) {
2096
2089
  const underTest = Boolean(env.VITEST) || env.NODE_ENV === "test";
2097
2090
  return {
@@ -2106,7 +2099,8 @@ var CHECK_HINTS = {
2106
2099
  session_scope_coverage: "most sessions start outside a repo (home, /tmp, ~/Projects) and cannot receive repo memory",
2107
2100
  retrieval_observations: "too few used/missed retrieval observations in 14 d \u2014 inspect query and hook telemetry",
2108
2101
  emission_coverage: "memories selected but the hook did not emit them",
2109
- outcome_coverage: "emitted memories never resolved \u2014 check session-end hooks",
2102
+ outcome_loop: "emitted memories never resolved \u2014 check tool and session-end hooks",
2103
+ outcome_coverage: "most emitted memories were not observably applied \u2014 check for over-broad or agent-authored rules",
2110
2104
  candidate_backlog: "run `recall maintenance cleanup` (a dry run unless you pass --apply)"
2111
2105
  };
2112
2106
  function formatReliabilityVerdictSection(verdict, now = /* @__PURE__ */ new Date()) {
@@ -4515,10 +4509,9 @@ export {
4515
4509
  reliabilityVerdictDataDir,
4516
4510
  readReliabilityVerdict,
4517
4511
  runReliabilityVerdictCycle,
4518
- notifyMacOS,
4519
4512
  loadReliabilityVerdictConfigFromEnv,
4520
4513
  getDoctorStatusReport,
4521
4514
  getDoctorReport,
4522
4515
  formatDoctorReport
4523
4516
  };
4524
- //# sourceMappingURL=chunk-YIUBD27J.js.map
4517
+ //# sourceMappingURL=chunk-M4JG3HMA.js.map