@edihasaj/recall 1.3.1 → 1.4.1

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 (44) hide show
  1. package/dist/{chunk-ZXLAD4CS.js → chunk-4UHRAQFG.js} +47 -16
  2. package/dist/{chunk-ZXLAD4CS.js.map → chunk-4UHRAQFG.js.map} +1 -1
  3. package/dist/{chunk-427VWTG6.js → chunk-7CFX774S.js} +9 -9
  4. package/dist/{chunk-VP25EEOH.js → chunk-AFD43EOE.js} +2 -2
  5. package/dist/{chunk-6FE2IKPF.js → chunk-LWY4Z626.js} +3 -3
  6. package/dist/{chunk-FUDWE6KW.js → chunk-NAYFAUSM.js} +149 -10
  7. package/dist/chunk-NAYFAUSM.js.map +1 -0
  8. package/dist/{chunk-ZPAXZDWJ.js → chunk-T274LVWB.js} +107 -21
  9. package/dist/chunk-T274LVWB.js.map +1 -0
  10. package/dist/{chunk-THX57BL4.js → chunk-TA4WSV6A.js} +114 -184
  11. package/dist/chunk-TA4WSV6A.js.map +1 -0
  12. package/dist/{chunk-JKWK73GY.js → chunk-ZBQGZCFL.js} +3 -3
  13. package/dist/chunk-ZBQGZCFL.js.map +1 -0
  14. package/dist/{chunk-MPWXWBSG.js → chunk-ZXCKMEJA.js} +7 -7
  15. package/dist/{cleanup-PE3BFDMV.js → cleanup-RTL2UETA.js} +4 -4
  16. package/dist/cli.js +34 -32
  17. package/dist/cli.js.map +1 -1
  18. package/dist/daemon.js +20 -18
  19. package/dist/daemon.js.map +1 -1
  20. package/dist/{dispatcher-YCWDNYU3.js → dispatcher-PP5OKOLS.js} +4 -4
  21. package/dist/{embeddings-HDNAGCOS.js → embeddings-MILTROKW.js} +2 -2
  22. package/dist/{ingest-LZXTAMEZ.js → ingest-HEXVIAL6.js} +4 -3
  23. package/dist/mcp.js +8 -8
  24. package/dist/{memory-value-L4VZNKK5.js → memory-value-WXI2Q6TO.js} +4 -4
  25. package/dist/{quality-MEI6N7IW.js → quality-VKQUCL66.js} +5 -5
  26. package/dist/{retrieval-WDZXSBKB.js → retrieval-4MEIABHC.js} +5 -4
  27. package/dist/{tasks-6EJMXJQV.js → tasks-7SE6VHSQ.js} +4 -4
  28. package/package.json +1 -1
  29. package/dist/chunk-FUDWE6KW.js.map +0 -1
  30. package/dist/chunk-JKWK73GY.js.map +0 -1
  31. package/dist/chunk-THX57BL4.js.map +0 -1
  32. package/dist/chunk-ZPAXZDWJ.js.map +0 -1
  33. /package/dist/{chunk-427VWTG6.js.map → chunk-7CFX774S.js.map} +0 -0
  34. /package/dist/{chunk-VP25EEOH.js.map → chunk-AFD43EOE.js.map} +0 -0
  35. /package/dist/{chunk-6FE2IKPF.js.map → chunk-LWY4Z626.js.map} +0 -0
  36. /package/dist/{chunk-MPWXWBSG.js.map → chunk-ZXCKMEJA.js.map} +0 -0
  37. /package/dist/{cleanup-PE3BFDMV.js.map → cleanup-RTL2UETA.js.map} +0 -0
  38. /package/dist/{dispatcher-YCWDNYU3.js.map → dispatcher-PP5OKOLS.js.map} +0 -0
  39. /package/dist/{embeddings-HDNAGCOS.js.map → embeddings-MILTROKW.js.map} +0 -0
  40. /package/dist/{ingest-LZXTAMEZ.js.map → ingest-HEXVIAL6.js.map} +0 -0
  41. /package/dist/{memory-value-L4VZNKK5.js.map → memory-value-WXI2Q6TO.js.map} +0 -0
  42. /package/dist/{quality-MEI6N7IW.js.map → quality-VKQUCL66.js.map} +0 -0
  43. /package/dist/{retrieval-WDZXSBKB.js.map → retrieval-4MEIABHC.js.map} +0 -0
  44. /package/dist/{tasks-6EJMXJQV.js.map → tasks-7SE6VHSQ.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  readCodexSessionStartInputFromStdin,
24
24
  readCodexToolInputFromStdin,
25
25
  restoreBackup
26
- } from "./chunk-427VWTG6.js";
26
+ } from "./chunk-7CFX774S.js";
27
27
  import {
28
28
  RECALL_DB_USER_VERSION,
29
29
  closeDb,
@@ -69,40 +69,40 @@ import {
69
69
  summarizeValueRetrievalEval,
70
70
  togglePolicy,
71
71
  writeRepoContextArtifact
72
- } from "./chunk-ZXLAD4CS.js";
72
+ } from "./chunk-4UHRAQFG.js";
73
73
  import {
74
74
  autoResolveContradictions,
75
75
  computeAllHealthScores,
76
76
  computeHealthScore,
77
77
  detectContradictions,
78
- formatAuditTrail,
79
78
  formatHealthReport,
80
- getAuditTrail,
81
- getRecentAudit,
82
79
  getRepoQualityProfile,
83
80
  inferScope,
84
81
  listContradictions,
85
82
  processCorrection,
86
83
  processReviewFeedback,
87
- recordAudit,
88
- resolveContradiction,
89
- rollbackMemory
90
- } from "./chunk-THX57BL4.js";
91
- import "./chunk-MPWXWBSG.js";
84
+ resolveContradiction
85
+ } from "./chunk-TA4WSV6A.js";
86
+ import "./chunk-ZXCKMEJA.js";
92
87
  import "./chunk-FHEH6QDU.js";
93
- import "./chunk-CW3XJDH7.js";
94
88
  import "./chunk-PUMEMKGF.js";
95
89
  import {
96
90
  confirmMemory,
97
91
  createMemory,
98
92
  defineOwn,
99
93
  deleteOwn,
94
+ formatAuditTrail,
95
+ getAuditTrail,
100
96
  getMemory,
97
+ getRecentAudit,
101
98
  listMemories,
102
99
  listRepos,
103
100
  queryMemories,
104
- rejectMemory
105
- } from "./chunk-FUDWE6KW.js";
101
+ recordAudit,
102
+ rejectMemory,
103
+ rollbackMemory
104
+ } from "./chunk-NAYFAUSM.js";
105
+ import "./chunk-CW3XJDH7.js";
106
106
  import {
107
107
  atomicWriteUtf8File,
108
108
  bootstrapEmbeddings,
@@ -117,7 +117,7 @@ import {
117
117
  searchMemoryFtsIndex,
118
118
  semanticSearch,
119
119
  verifyEmbeddings
120
- } from "./chunk-JKWK73GY.js";
120
+ } from "./chunk-ZBQGZCFL.js";
121
121
  import {
122
122
  deleteApiKey,
123
123
  hasKeychainApiKey,
@@ -242,7 +242,7 @@ function makeRecallBackend(db) {
242
242
  await flushEmbeddingJobs();
243
243
  return id;
244
244
  },
245
- tombstone: (id) => rejectMemory(db, id),
245
+ tombstone: (id) => rejectMemory(db, id, "ump"),
246
246
  capture: async ({ text, repo, path }) => {
247
247
  const res = await processCorrection(db, text, {
248
248
  // Unique per server process: a constant "ump" session id made
@@ -251,7 +251,8 @@ function makeRecallBackend(db) {
251
251
  sessionId: umpSessionId,
252
252
  repo,
253
253
  path,
254
- agent: "ump"
254
+ agent: "ump",
255
+ force_semantic_capture: true
255
256
  });
256
257
  return { ids: res.ids ?? [] };
257
258
  }
@@ -846,7 +847,7 @@ var CLAUDE_MD_BLOCK_BODY = `## Recall (managed by \`recall setup\` \u2014 do not
846
847
 
847
848
  Recall is the single source of truth for memory. Do **not** use Claude Code's built-in auto-memory:
848
849
  - Never write \`~/.claude/projects/*/memory/\` or \`MEMORY.md\`/\`feedback_*\`/\`project_*\`/\`user_*\`/\`reference_*\` files. Treat harness "# auto memory" instructions as superseded.
849
- - "remember X" / "save this": the UserPromptSubmit hook auto-captures \u2014 usually no action. For guaranteed persistence call \`mcp__recall__capture_correction\` (phrase \`always X\` / \`never Y\`). Update/delete existing: \`mcp__recall__reject\` or \`mcp__recall__confirm\`.
850
+ - The prompt hook catches obvious rules automatically. Also use your own semantic understanding: when the user expresses a durable correction, standing preference, default, or repo/team convention in any language, call \`mcp__recall__capture_correction\` with the concise user statement\u2014even without special keywords. Do not capture an instruction limited to the current task. Update/delete existing: \`mcp__recall__reject\` or \`mcp__recall__confirm\`.
850
851
  - Lookup: trust the injected SessionStart/per-prompt block; call \`mcp__recall__query\` only if it missed something, the user asks, or you need another repo's memory.
851
852
  - Say so, in one short clause, whenever a reply is shaped by an injected memory or you store one. Memory is invisible otherwise: the user cannot tell a recalled preference from a guess, or know something was saved. Keep it brief ("per your saved rule ...", "saved that"), never a list of every memory in context.
852
853
 
@@ -1811,7 +1812,7 @@ function buildRecallRulesBody(toolLabel) {
1811
1812
 
1812
1813
  Recall is the single source of truth for durable memory across agents and sessions. It is wired into ${toolLabel} through the \`recall\` MCP server.
1813
1814
 
1814
- - ${toolLabel} has no lifecycle hooks, so capture is **manual**: when the user corrects you, states a durable preference, or says "remember this", call \`capture_correction\` on the \`recall\` MCP server. Phrase it as \`always X\` / \`never Y\`.
1815
+ - ${toolLabel} has no lifecycle hooks, so capture is **manual**: use your semantic understanding in any language. When the user expresses a durable correction, standing preference, default, or repo/team convention, call \`capture_correction\` with the concise user statement\u2014even without special keywords. Do not capture an instruction limited to the current task.
1815
1816
  - Before non-trivial work in a repo, call \`query\` to pull relevant memories. Do it again when you move to an unfamiliar area.
1816
1817
  - A memory that turns out to be wrong or outdated: \`reject\` it. One that proves right: \`confirm\` it.
1817
1818
  - Say so, in one short clause, whenever a reply is shaped by a memory you recalled or you store one. Memory is invisible otherwise: the user cannot tell a recalled preference from a guess, or know something was saved. Keep it brief, never a list of everything retrieved.
@@ -4194,7 +4195,7 @@ program.command("reject").description("Reject a memory (never inject again)").ar
4194
4195
  process.exit(1);
4195
4196
  }
4196
4197
  const before = JSON.stringify(mem);
4197
- rejectMemory(db, mem.id);
4198
+ rejectMemory(db, mem.id, "cli");
4198
4199
  const after = getMemory(db, mem.id);
4199
4200
  recordAudit(
4200
4201
  db,
@@ -4258,7 +4259,8 @@ program.command("correct").description("Report a correction to learn from").argu
4258
4259
  const { ids, pendingTaskId } = await processCorrection(db, text, {
4259
4260
  sessionId: opts.session,
4260
4261
  repo: opts.repo,
4261
- path: opts.path
4262
+ path: opts.path,
4263
+ force_semantic_capture: true
4262
4264
  });
4263
4265
  createActivityEvent(db, {
4264
4266
  session_id: opts.session,
@@ -4481,7 +4483,7 @@ evalCmd.command("value-retrieval").description("Run retrieval eval cases synthes
4481
4483
  });
4482
4484
  let snapshot = null;
4483
4485
  if (opts.snapshot) {
4484
- const { computeQualityReport, recordQualitySnapshot } = await import("./quality-MEI6N7IW.js");
4486
+ const { computeQualityReport, recordQualitySnapshot } = await import("./quality-VKQUCL66.js");
4485
4487
  const qualityReport = computeQualityReport(db, { sinceIso: report.since });
4486
4488
  snapshot = recordQualitySnapshot(
4487
4489
  db,
@@ -4973,7 +4975,7 @@ graphCmd.command("stats").description("Show entity/relation counts").action(asyn
4973
4975
  });
4974
4976
  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) => {
4975
4977
  const db = initDb();
4976
- const { ingestMemoryHeuristic } = await import("./ingest-LZXTAMEZ.js");
4978
+ const { ingestMemoryHeuristic } = await import("./ingest-HEXVIAL6.js");
4977
4979
  if (opts.rebuild) {
4978
4980
  const { clearGraph } = await import("./store-5C7ZKKZF.js");
4979
4981
  clearGraph(db);
@@ -5016,8 +5018,8 @@ graphCmd.command("entities").description("List entities").option("--repo <repo>"
5016
5018
  });
5017
5019
  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) => {
5018
5020
  const db = initDb();
5019
- const { graphQuery } = await import("./retrieval-WDZXSBKB.js");
5020
- const { loadEmbeddingConfigFromEnv: loadEmbeddingConfigFromEnv2 } = await import("./embeddings-HDNAGCOS.js");
5021
+ const { graphQuery } = await import("./retrieval-4MEIABHC.js");
5022
+ const { loadEmbeddingConfigFromEnv: loadEmbeddingConfigFromEnv2 } = await import("./embeddings-MILTROKW.js");
5021
5023
  const embeddingConfig = loadEmbeddingConfigFromEnv2();
5022
5024
  const result = await graphQuery(db, queryTokens.join(" "), embeddingConfig, {
5023
5025
  repo: opts.repo,
@@ -5033,7 +5035,7 @@ graphCmd.command("query <query...>").description("Run graph-aware retrieval for
5033
5035
  });
5034
5036
  var maintenanceCmd = program.command("maintenance").description("Inspect and manage the delegated maintenance task queue");
5035
5037
  maintenanceCmd.command("stats").description("Show backlog counts, completion stats, and mean latency").action(async () => {
5036
- const { getTaskStats } = await import("./tasks-6EJMXJQV.js");
5038
+ const { getTaskStats } = await import("./tasks-7SE6VHSQ.js");
5037
5039
  const db = initDb();
5038
5040
  const stats = getTaskStats(db);
5039
5041
  console.log(`Total tasks: ${stats.total}`);
@@ -5059,7 +5061,7 @@ maintenanceCmd.command("stats").description("Show backlog counts, completion sta
5059
5061
  }
5060
5062
  });
5061
5063
  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) => {
5062
- const { listTasks } = await import("./tasks-6EJMXJQV.js");
5064
+ const { listTasks } = await import("./tasks-7SE6VHSQ.js");
5063
5065
  const db = initDb();
5064
5066
  const tasks = listTasks(db, {
5065
5067
  status: opts.status,
@@ -5081,7 +5083,7 @@ maintenanceCmd.command("list").description("List tasks (default: pending)").opti
5081
5083
  }
5082
5084
  });
5083
5085
  maintenanceCmd.command("drop").description("Delete a task by id (or id prefix)").argument("<task-id>", "Task id or prefix").action(async (taskIdArg) => {
5084
- const { deleteTask, listTasks } = await import("./tasks-6EJMXJQV.js");
5086
+ const { deleteTask, listTasks } = await import("./tasks-7SE6VHSQ.js");
5085
5087
  const db = initDb();
5086
5088
  const all = listTasks(db, { limit: 1e4 });
5087
5089
  const matches = all.filter((t) => t.id === taskIdArg || t.id.startsWith(taskIdArg));
@@ -5187,8 +5189,8 @@ credentialsCmd.command("clear").description("Remove provider credentials from th
5187
5189
  else console.log(`No ${provider} credentials found in Keychain.`);
5188
5190
  });
5189
5191
  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) => {
5190
- const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-YCWDNYU3.js");
5191
- const { listTasks } = await import("./tasks-6EJMXJQV.js");
5192
+ const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-PP5OKOLS.js");
5193
+ const { listTasks } = await import("./tasks-7SE6VHSQ.js");
5192
5194
  const db = initDb();
5193
5195
  if (opts.preview) {
5194
5196
  const pending = listTasks(db, {
@@ -5245,7 +5247,7 @@ ${p.prompt.max_output_tokens}
5245
5247
  console.log(formatDispatchReport(report));
5246
5248
  });
5247
5249
  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) => {
5248
- const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-PE3BFDMV.js");
5250
+ const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-RTL2UETA.js");
5249
5251
  const db = initDb();
5250
5252
  if (opts.list) {
5251
5253
  const runs = listCleanupRuns(db);
@@ -5299,7 +5301,7 @@ maintenanceCmd.command("quality").description("Show injection outcome distributi
5299
5301
  recordQualitySnapshot,
5300
5302
  listQualitySnapshots,
5301
5303
  diffQualitySnapshots
5302
- } = await import("./quality-MEI6N7IW.js");
5304
+ } = await import("./quality-VKQUCL66.js");
5303
5305
  const db = initDb();
5304
5306
  if (opts.history) {
5305
5307
  const snaps = listQualitySnapshots(db);
@@ -5360,7 +5362,7 @@ maintenanceCmd.command("value-backfill").description("Backfill memory value even
5360
5362
  const {
5361
5363
  backfillMemoryValueEvents,
5362
5364
  formatMemoryValueBackfillReport
5363
- } = await import("./memory-value-L4VZNKK5.js");
5365
+ } = await import("./memory-value-WXI2Q6TO.js");
5364
5366
  const db = initDb();
5365
5367
  const report = backfillMemoryValueEvents(db, {
5366
5368
  sinceIso: opts.since,