@edihasaj/recall 1.4.21 → 1.4.22

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 (74) hide show
  1. package/README.md +6 -1
  2. package/dist/{chunk-SPA5ED52.js → chunk-6OU4ABZY.js} +3 -3
  3. package/dist/{chunk-MW3PYU57.js → chunk-BM3DGSJK.js} +2 -2
  4. package/dist/{chunk-FZTOMGN4.js → chunk-CFEJ4RKR.js} +7 -7
  5. package/dist/{chunk-JAV2SSSL.js → chunk-CQMEHENR.js} +4 -4
  6. package/dist/{chunk-KHLG4LBX.js → chunk-IKNDUOFO.js} +2 -2
  7. package/dist/{chunk-KHLG4LBX.js.map → chunk-IKNDUOFO.js.map} +1 -1
  8. package/dist/{chunk-QBAK3LLT.js → chunk-JJQS4DFI.js} +3 -3
  9. package/dist/{chunk-2BEW4B7D.js → chunk-MTV2LDYL.js} +2 -2
  10. package/dist/{chunk-7C3MVO4N.js → chunk-MVTT3CM7.js} +130 -241
  11. package/dist/chunk-MVTT3CM7.js.map +1 -0
  12. package/dist/{chunk-RYOHHVJF.js → chunk-NGYQ2AHM.js} +5 -5
  13. package/dist/{chunk-LKSC4JTU.js → chunk-RXXZNFDW.js} +9 -9
  14. package/dist/{chunk-FIHRWLLC.js → chunk-SQDYE2XF.js} +2 -2
  15. package/dist/{chunk-M7EDOBC4.js → chunk-TWRA4NBS.js} +7 -7
  16. package/dist/{chunk-3FHPDDSC.js → chunk-VMH7WZX3.js} +212 -104
  17. package/dist/chunk-VMH7WZX3.js.map +1 -0
  18. package/dist/{chunk-4D5MTK66.js → chunk-WQ5OB4H7.js} +3 -3
  19. package/dist/{chunk-M4HFQVRF.js → chunk-XRIZREO2.js} +2 -2
  20. package/dist/{chunk-WB7ZIESD.js → chunk-Y34CARBA.js} +2 -2
  21. package/dist/{chunk-HKH2A5MQ.js → chunk-YJ7NZ5IH.js} +9 -9
  22. package/dist/{chunk-N2Z2RXIA.js → chunk-ZQSOISUW.js} +5 -5
  23. package/dist/{cleanup-45S5Q6WX.js → cleanup-RNEO32SK.js} +11 -11
  24. package/dist/cli.js +43 -43
  25. package/dist/{codex-trust-JCPCL3QI.js → codex-trust-HRTNEFS5.js} +4 -4
  26. package/dist/daemon.js +21 -21
  27. package/dist/dispatcher-24X5DZXS.js +22 -0
  28. package/dist/{embeddings-3QFO2LC7.js → embeddings-CFCBZWBY.js} +5 -5
  29. package/dist/ingest-C6YEXHX4.js +20 -0
  30. package/dist/{keychain-M2SNOTJG.js → keychain-WFBK2BII.js} +3 -3
  31. package/dist/mcp.js +15 -15
  32. package/dist/{memory-value-4BAP2O4R.js → memory-value-NYBR5UUH.js} +11 -11
  33. package/dist/{provenance-RTA6LBL2.js → provenance-IH5BOM24.js} +9 -9
  34. package/dist/quality-LDNULMO2.js +25 -0
  35. package/dist/retrieval-62Y72KZG.js +15 -0
  36. package/dist/{store-BDSVSIRD.js → store-EENGY24O.js} +4 -4
  37. package/dist/sync-server.js +2 -2
  38. package/dist/{tasks-6FVDXYEP.js → tasks-4CUEZTQM.js} +11 -11
  39. package/dist/{usage-NKVHLHWY.js → usage-TBLMK643.js} +4 -4
  40. package/package.json +1 -1
  41. package/dist/chunk-3FHPDDSC.js.map +0 -1
  42. package/dist/chunk-7C3MVO4N.js.map +0 -1
  43. package/dist/dispatcher-6QIVLH3D.js +0 -22
  44. package/dist/ingest-QOFPUBDB.js +0 -20
  45. package/dist/quality-XRXGLQAK.js +0 -25
  46. package/dist/retrieval-OQBN7365.js +0 -15
  47. /package/dist/{chunk-SPA5ED52.js.map → chunk-6OU4ABZY.js.map} +0 -0
  48. /package/dist/{chunk-MW3PYU57.js.map → chunk-BM3DGSJK.js.map} +0 -0
  49. /package/dist/{chunk-FZTOMGN4.js.map → chunk-CFEJ4RKR.js.map} +0 -0
  50. /package/dist/{chunk-JAV2SSSL.js.map → chunk-CQMEHENR.js.map} +0 -0
  51. /package/dist/{chunk-QBAK3LLT.js.map → chunk-JJQS4DFI.js.map} +0 -0
  52. /package/dist/{chunk-2BEW4B7D.js.map → chunk-MTV2LDYL.js.map} +0 -0
  53. /package/dist/{chunk-RYOHHVJF.js.map → chunk-NGYQ2AHM.js.map} +0 -0
  54. /package/dist/{chunk-LKSC4JTU.js.map → chunk-RXXZNFDW.js.map} +0 -0
  55. /package/dist/{chunk-FIHRWLLC.js.map → chunk-SQDYE2XF.js.map} +0 -0
  56. /package/dist/{chunk-M7EDOBC4.js.map → chunk-TWRA4NBS.js.map} +0 -0
  57. /package/dist/{chunk-4D5MTK66.js.map → chunk-WQ5OB4H7.js.map} +0 -0
  58. /package/dist/{chunk-M4HFQVRF.js.map → chunk-XRIZREO2.js.map} +0 -0
  59. /package/dist/{chunk-WB7ZIESD.js.map → chunk-Y34CARBA.js.map} +0 -0
  60. /package/dist/{chunk-HKH2A5MQ.js.map → chunk-YJ7NZ5IH.js.map} +0 -0
  61. /package/dist/{chunk-N2Z2RXIA.js.map → chunk-ZQSOISUW.js.map} +0 -0
  62. /package/dist/{cleanup-45S5Q6WX.js.map → cleanup-RNEO32SK.js.map} +0 -0
  63. /package/dist/{codex-trust-JCPCL3QI.js.map → codex-trust-HRTNEFS5.js.map} +0 -0
  64. /package/dist/{dispatcher-6QIVLH3D.js.map → dispatcher-24X5DZXS.js.map} +0 -0
  65. /package/dist/{embeddings-3QFO2LC7.js.map → embeddings-CFCBZWBY.js.map} +0 -0
  66. /package/dist/{ingest-QOFPUBDB.js.map → ingest-C6YEXHX4.js.map} +0 -0
  67. /package/dist/{keychain-M2SNOTJG.js.map → keychain-WFBK2BII.js.map} +0 -0
  68. /package/dist/{memory-value-4BAP2O4R.js.map → memory-value-NYBR5UUH.js.map} +0 -0
  69. /package/dist/{provenance-RTA6LBL2.js.map → provenance-IH5BOM24.js.map} +0 -0
  70. /package/dist/{quality-XRXGLQAK.js.map → quality-LDNULMO2.js.map} +0 -0
  71. /package/dist/{retrieval-OQBN7365.js.map → retrieval-62Y72KZG.js.map} +0 -0
  72. /package/dist/{store-BDSVSIRD.js.map → store-EENGY24O.js.map} +0 -0
  73. /package/dist/{tasks-6FVDXYEP.js.map → tasks-4CUEZTQM.js.map} +0 -0
  74. /package/dist/{usage-NKVHLHWY.js.map → usage-TBLMK643.js.map} +0 -0
package/README.md CHANGED
@@ -59,11 +59,16 @@ The MiniLM row isolates the system contribution (same embedding model agentmemor
59
59
  ### Homebrew (macOS)
60
60
 
61
61
  ```bash
62
+ brew tap edihasaj/tap
63
+ brew trust --cask edihasaj/tap/recall
62
64
  brew install --cask edihasaj/tap/recall
63
65
  recall setup --yes
64
66
  recall doctor
65
67
  ```
66
68
 
69
+ Homebrew 7+ requires explicit trust for third-party packages. These commands
70
+ trust only the Recall cask. Run `brew update` first if `brew trust` is unavailable.
71
+
67
72
  Recall checks for complete releases in the menu bar and dashboard. A Homebrew
68
73
  installation can update from the dashboard's **Updates** page; Recall installs
69
74
  the cask, restarts its daemon, and reopens the app. Direct `.app` installs get
@@ -99,7 +104,7 @@ Installs the `@edihasaj/recall` CLI via npm, downloads the system-tray companion
99
104
 
100
105
  ### GitHub Releases
101
106
 
102
- Download `Recall.app.zip` from [the latest release](https://github.com/edihasaj/recall/releases/latest), unzip it, move `Recall.app` into `/Applications`, then run setup:
107
+ Download [Recall.app.zip](https://github.com/edihasaj/recall/releases/latest/download/Recall.app.zip), unzip it, move `Recall.app` into `/Applications`, then run setup:
103
108
 
104
109
  ```bash
105
110
  open /Applications/Recall.app # click Install + Start once
@@ -8,10 +8,10 @@ import {
8
8
  memoryEntities,
9
9
  or,
10
10
  sql
11
- } from "./chunk-M4HFQVRF.js";
11
+ } from "./chunk-XRIZREO2.js";
12
12
  import {
13
13
  init_define_RECALL_BUILD_INFO
14
- } from "./chunk-KHLG4LBX.js";
14
+ } from "./chunk-IKNDUOFO.js";
15
15
 
16
16
  // src/graph/store.ts
17
17
  init_define_RECALL_BUILD_INFO();
@@ -290,4 +290,4 @@ export {
290
290
  countRelations,
291
291
  clearGraph
292
292
  };
293
- //# sourceMappingURL=chunk-SPA5ED52.js.map
293
+ //# sourceMappingURL=chunk-6OU4ABZY.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_define_RECALL_BUILD_INFO
3
- } from "./chunk-KHLG4LBX.js";
3
+ } from "./chunk-IKNDUOFO.js";
4
4
 
5
5
  // src/observability/sentry.ts
6
6
  init_define_RECALL_BUILD_INFO();
@@ -32,4 +32,4 @@ initSentry();
32
32
  export {
33
33
  Sentry
34
34
  };
35
- //# sourceMappingURL=chunk-MW3PYU57.js.map
35
+ //# sourceMappingURL=chunk-BM3DGSJK.js.map
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  desc
3
- } from "./chunk-4D5MTK66.js";
3
+ } from "./chunk-WQ5OB4H7.js";
4
4
  import {
5
5
  defineOwn
6
- } from "./chunk-WB7ZIESD.js";
6
+ } from "./chunk-Y34CARBA.js";
7
7
  import {
8
8
  CONFIDENCE,
9
9
  PROMOTION,
10
10
  queueMemoryEmbeddingSync
11
- } from "./chunk-JAV2SSSL.js";
11
+ } from "./chunk-CQMEHENR.js";
12
12
  import {
13
13
  isPlausibleEntityName,
14
14
  linkMemoryToEntity,
15
15
  upsertEntity,
16
16
  upsertRelation
17
- } from "./chunk-SPA5ED52.js";
17
+ } from "./chunk-6OU4ABZY.js";
18
18
  import {
19
19
  and,
20
20
  auditTrail,
@@ -25,10 +25,10 @@ import {
25
25
  like,
26
26
  memories,
27
27
  sql
28
- } from "./chunk-M4HFQVRF.js";
28
+ } from "./chunk-XRIZREO2.js";
29
29
  import {
30
30
  init_define_RECALL_BUILD_INFO
31
- } from "./chunk-KHLG4LBX.js";
31
+ } from "./chunk-IKNDUOFO.js";
32
32
 
33
33
  // src/graph/ingest.ts
34
34
  init_define_RECALL_BUILD_INFO();
@@ -996,4 +996,4 @@ export {
996
996
  getMemoryFeedbackSummaries,
997
997
  feedbackWeightedScore
998
998
  };
999
- //# sourceMappingURL=chunk-FZTOMGN4.js.map
999
+ //# sourceMappingURL=chunk-CFEJ4RKR.js.map
@@ -2,17 +2,17 @@ import {
2
2
  getProviderConfig,
3
3
  hasProviderConfigured,
4
4
  init_keychain
5
- } from "./chunk-FIHRWLLC.js";
5
+ } from "./chunk-SQDYE2XF.js";
6
6
  import {
7
7
  eq,
8
8
  inArray,
9
9
  llmUsage,
10
10
  memories,
11
11
  memoryEmbeddings
12
- } from "./chunk-M4HFQVRF.js";
12
+ } from "./chunk-XRIZREO2.js";
13
13
  import {
14
14
  init_define_RECALL_BUILD_INFO
15
- } from "./chunk-KHLG4LBX.js";
15
+ } from "./chunk-IKNDUOFO.js";
16
16
 
17
17
  // src/embeddings/embeddings.ts
18
18
  init_define_RECALL_BUILD_INFO();
@@ -2631,4 +2631,4 @@ export {
2631
2631
  findSemanticDuplicates,
2632
2632
  findSimilarRejectedExemplar
2633
2633
  };
2634
- //# sourceMappingURL=chunk-JAV2SSSL.js.map
2634
+ //# sourceMappingURL=chunk-CQMEHENR.js.map
@@ -28,7 +28,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
28
28
  var define_RECALL_BUILD_INFO_default;
29
29
  var init_define_RECALL_BUILD_INFO = __esm({
30
30
  "<define:__RECALL_BUILD_INFO__>"() {
31
- define_RECALL_BUILD_INFO_default = { sha: "654014aad2a20c73dbdd4a61cea076f01666f286", built_at: "2026-09-29T20:22:55.278Z", dependencies: { "@huggingface/transformers": "4.2.0", "onnxruntime-node": "1.24.3", "better-sqlite3": "11.10.0", "sqlite-vec": "0.1.9", "@photostructure/sqlite-vec": "2.0.1" } };
31
+ define_RECALL_BUILD_INFO_default = { sha: "2e309b0021efa4f59524f60339a1d166e8bfe164", built_at: "2026-10-07T11:00:01.436Z", dependencies: { "@huggingface/transformers": "4.2.0", "onnxruntime-node": "1.24.3", "better-sqlite3": "11.10.0", "sqlite-vec": "0.1.9", "@photostructure/sqlite-vec": "2.0.1" } };
32
32
  }
33
33
  });
34
34
 
@@ -39,4 +39,4 @@ export {
39
39
  init_define_RECALL_BUILD_INFO,
40
40
  define_RECALL_BUILD_INFO_default
41
41
  };
42
- //# sourceMappingURL=chunk-KHLG4LBX.js.map
42
+ //# sourceMappingURL=chunk-IKNDUOFO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["<define:__RECALL_BUILD_INFO__>"],"sourcesContent":["{\"sha\":\"654014aad2a20c73dbdd4a61cea076f01666f286\",\"built_at\":\"2026-09-29T20:22:55.278Z\",\"dependencies\":{\"@huggingface/transformers\":\"4.2.0\",\"onnxruntime-node\":\"1.24.3\",\"better-sqlite3\":\"11.10.0\",\"sqlite-vec\":\"0.1.9\",\"@photostructure/sqlite-vec\":\"2.0.1\"}}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,yCAAC,KAAM,4CAA2C,UAAW,4BAA2B,cAAe,EAAC,6BAA4B,SAAQ,oBAAmB,UAAS,kBAAiB,WAAU,cAAa,SAAQ,8BAA6B,QAAO,EAAC;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["<define:__RECALL_BUILD_INFO__>"],"sourcesContent":["{\"sha\":\"2e309b0021efa4f59524f60339a1d166e8bfe164\",\"built_at\":\"2026-10-07T11:00:01.436Z\",\"dependencies\":{\"@huggingface/transformers\":\"4.2.0\",\"onnxruntime-node\":\"1.24.3\",\"better-sqlite3\":\"11.10.0\",\"sqlite-vec\":\"0.1.9\",\"@photostructure/sqlite-vec\":\"2.0.1\"}}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,yCAAC,KAAM,4CAA2C,UAAW,4BAA2B,cAAe,EAAC,6BAA4B,SAAQ,oBAAmB,UAAS,kBAAiB,WAAU,cAAa,SAAQ,8BAA6B,QAAO,EAAC;AAAA;AAAA;","names":[]}
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  defineOwn,
3
3
  deleteOwn
4
- } from "./chunk-WB7ZIESD.js";
4
+ } from "./chunk-Y34CARBA.js";
5
5
  import {
6
6
  init_define_RECALL_BUILD_INFO
7
- } from "./chunk-KHLG4LBX.js";
7
+ } from "./chunk-IKNDUOFO.js";
8
8
 
9
9
  // src/agents/codex.ts
10
10
  init_define_RECALL_BUILD_INFO();
@@ -591,4 +591,4 @@ export {
591
591
  installCodexHooks,
592
592
  uninstallCodexHooks
593
593
  };
594
- //# sourceMappingURL=chunk-QBAK3LLT.js.map
594
+ //# sourceMappingURL=chunk-JJQS4DFI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_define_RECALL_BUILD_INFO
3
- } from "./chunk-KHLG4LBX.js";
3
+ } from "./chunk-IKNDUOFO.js";
4
4
 
5
5
  // src/text/match.ts
6
6
  init_define_RECALL_BUILD_INFO();
@@ -116,4 +116,4 @@ export {
116
116
  textMatchScore,
117
117
  matchTokens
118
118
  };
119
- //# sourceMappingURL=chunk-2BEW4B7D.js.map
119
+ //# sourceMappingURL=chunk-MTV2LDYL.js.map
@@ -9,16 +9,16 @@ import {
9
9
  processCorrection,
10
10
  redactSensitiveValue,
11
11
  seedScannedConfidence
12
- } from "./chunk-LKSC4JTU.js";
12
+ } from "./chunk-RXXZNFDW.js";
13
13
  import {
14
14
  recordInjectionValueEvents,
15
15
  recordMemoryInjections,
16
16
  recordOutcomeValueEvent,
17
17
  resolveMemoryInjectionOutcome
18
- } from "./chunk-M7EDOBC4.js";
18
+ } from "./chunk-TWRA4NBS.js";
19
19
  import {
20
20
  textMatchScore
21
- } from "./chunk-2BEW4B7D.js";
21
+ } from "./chunk-MTV2LDYL.js";
22
22
  import {
23
23
  activityEventDedupeKey,
24
24
  confirmMemory,
@@ -37,17 +37,16 @@ import {
37
37
  recordFeedback,
38
38
  rejectMemory,
39
39
  statusFromConfidence
40
- } from "./chunk-FZTOMGN4.js";
40
+ } from "./chunk-CFEJ4RKR.js";
41
41
  import {
42
42
  asc,
43
43
  desc
44
- } from "./chunk-4D5MTK66.js";
44
+ } from "./chunk-WQ5OB4H7.js";
45
45
  import {
46
46
  BACKGROUND_INDEX_BATCH_SIZE,
47
47
  CONFIDENCE,
48
48
  RetrievalEvalCase,
49
49
  RetrievalEvalFile,
50
- atomicWriteUtf8File,
51
50
  bootstrapEmbeddings,
52
51
  generateEmbedding,
53
52
  generateEmbeddings,
@@ -62,7 +61,7 @@ import {
62
61
  readUtf8FileIfExists,
63
62
  resolveProvider,
64
63
  tagActivitySource
65
- } from "./chunk-JAV2SSSL.js";
64
+ } from "./chunk-CQMEHENR.js";
66
65
  import {
67
66
  Column,
68
67
  Columns,
@@ -126,10 +125,10 @@ import {
126
125
  policyRules,
127
126
  schema_exports,
128
127
  sql
129
- } from "./chunk-M4HFQVRF.js";
128
+ } from "./chunk-XRIZREO2.js";
130
129
  import {
131
130
  init_define_RECALL_BUILD_INFO
132
- } from "./chunk-KHLG4LBX.js";
131
+ } from "./chunk-IKNDUOFO.js";
133
132
 
134
133
  // src/db/client.ts
135
134
  init_define_RECALL_BUILD_INFO();
@@ -1700,7 +1699,7 @@ var SQLiteSelectQueryBuilderBase = class extends TypedQueryBuilder {
1700
1699
  const baseTableName = this.tableName;
1701
1700
  const tableName = getTableLikeName(table);
1702
1701
  for (const item of extractUsedTable(table)) this.usedTables.add(item);
1703
- if (typeof tableName === "string" && this.config.joins?.some((join5) => join5.alias === tableName)) {
1702
+ if (typeof tableName === "string" && this.config.joins?.some((join4) => join4.alias === tableName)) {
1704
1703
  throw new Error(`Alias "${tableName}" is already used in this query`);
1705
1704
  }
1706
1705
  if (!this.isPartialSelect) {
@@ -2560,7 +2559,7 @@ var SQLiteUpdateBase = class extends QueryPromise {
2560
2559
  createJoin(joinType) {
2561
2560
  return (table, on) => {
2562
2561
  const tableName = getTableLikeName(table);
2563
- if (typeof tableName === "string" && this.config.joins.some((join5) => join5.alias === tableName)) {
2562
+ if (typeof tableName === "string" && this.config.joins.some((join4) => join4.alias === tableName)) {
2564
2563
  throw new Error(`Alias "${tableName}" is already used in this query`);
2565
2564
  }
2566
2565
  if (typeof on === "function") {
@@ -4532,6 +4531,117 @@ function walkRepos(dir, depthRemaining, seen, repos) {
4532
4531
  }
4533
4532
  }
4534
4533
 
4534
+ // src/session/lifecycle.ts
4535
+ init_define_RECALL_BUILD_INFO();
4536
+ function resolveLifecycleSource(input) {
4537
+ if (input.source) return input.source;
4538
+ return input.client ? tagActivitySource("hook", input.client) : "daemon";
4539
+ }
4540
+ function startSessionLifecycle(db, input) {
4541
+ const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
4542
+ const bootstrap = ensureRepoBootstrapped(db, {
4543
+ repo,
4544
+ repoPathHint: input.repo_path
4545
+ });
4546
+ if (bootstrap.status === "bootstrapped" || bootstrap.status === "scanned_empty") {
4547
+ createActivityEvent(db, {
4548
+ session_id: input.session_id,
4549
+ repo: bootstrap.repo,
4550
+ path: input.path ?? null,
4551
+ source: resolveLifecycleSource(input),
4552
+ event_type: "scan",
4553
+ memory_ids: bootstrap.created_ids,
4554
+ request: {
4555
+ repo_path: bootstrap.repo_path,
4556
+ client: input.client ?? null,
4557
+ trigger: "session_start_bootstrap"
4558
+ },
4559
+ result: {
4560
+ created: bootstrap.created_ids.length,
4561
+ status: bootstrap.status
4562
+ }
4563
+ });
4564
+ }
4565
+ if (bootstrap.status === "already_known" && bootstrap.repo && input.repo_path) {
4566
+ try {
4567
+ refreshKnownRepoScan(db, bootstrap.repo, input.repo_path);
4568
+ } catch {
4569
+ }
4570
+ }
4571
+ createActivityEvent(db, {
4572
+ session_id: input.session_id,
4573
+ repo: bootstrap.repo,
4574
+ path: input.path ?? null,
4575
+ source: resolveLifecycleSource(input),
4576
+ event_type: "session_start",
4577
+ request: {
4578
+ client: input.client ?? null,
4579
+ repo_path: bootstrap.repo_path ?? input.repo_path ?? null,
4580
+ meta: input.meta ?? {}
4581
+ },
4582
+ result: {
4583
+ bootstrap_status: bootstrap.status,
4584
+ created: bootstrap.created_ids.length,
4585
+ artifact_path: null,
4586
+ artifact_written: false
4587
+ }
4588
+ });
4589
+ return {
4590
+ session_id: input.session_id,
4591
+ repo: bootstrap.repo,
4592
+ repo_path: bootstrap.repo_path ?? input.repo_path ?? null,
4593
+ bootstrap_status: bootstrap.status,
4594
+ created_ids: bootstrap.created_ids
4595
+ };
4596
+ }
4597
+ function recordSessionLifecycleEvent(db, input) {
4598
+ const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
4599
+ createActivityEvent(db, {
4600
+ session_id: input.session_id,
4601
+ repo,
4602
+ path: input.path ?? null,
4603
+ source: resolveLifecycleSource(input),
4604
+ event_type: "session_event",
4605
+ request: {
4606
+ client: input.client ?? null,
4607
+ name: input.name,
4608
+ repo_path: input.repo_path ?? null,
4609
+ meta: input.meta ?? {}
4610
+ },
4611
+ result: input.payload ?? {}
4612
+ });
4613
+ return {
4614
+ session_id: input.session_id,
4615
+ repo,
4616
+ repo_path: input.repo_path ?? null,
4617
+ bootstrap_status: "skipped",
4618
+ created_ids: []
4619
+ };
4620
+ }
4621
+ function endSessionLifecycle(db, input) {
4622
+ const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
4623
+ createActivityEvent(db, {
4624
+ session_id: input.session_id,
4625
+ repo,
4626
+ path: input.path ?? null,
4627
+ source: resolveLifecycleSource(input),
4628
+ event_type: "session_end",
4629
+ request: {
4630
+ client: input.client ?? null,
4631
+ repo_path: input.repo_path ?? null,
4632
+ meta: input.meta ?? {}
4633
+ },
4634
+ result: input.payload ?? {}
4635
+ });
4636
+ return {
4637
+ session_id: input.session_id,
4638
+ repo,
4639
+ repo_path: input.repo_path ?? null,
4640
+ bootstrap_status: "skipped",
4641
+ created_ids: []
4642
+ };
4643
+ }
4644
+
4535
4645
  // src/history/snippets.ts
4536
4646
  init_define_RECALL_BUILD_INFO();
4537
4647
  import { randomUUID as randomUUID2 } from "crypto";
@@ -5723,223 +5833,6 @@ function filterSessionScoped(memories4, sessionId) {
5723
5833
  });
5724
5834
  }
5725
5835
 
5726
- // src/adapters/markdown.ts
5727
- init_define_RECALL_BUILD_INFO();
5728
- function exportMarkdown(db, repo) {
5729
- const result = compileContext(db, { repo });
5730
- if (!result.text) {
5731
- return `# ${repo}
5732
-
5733
- No active memories above confidence threshold.
5734
- `;
5735
- }
5736
- return result.text;
5737
- }
5738
- function exportClaude(db, repo) {
5739
- const result = compileContext(db, { repo });
5740
- if (!result.text) return "";
5741
- return `# CLAUDE.md \u2014 Auto-generated by Recall
5742
- # Do not edit manually. Run \`recall export -r ${repo} -f claude\` to regenerate.
5743
-
5744
- ${result.text}`;
5745
- }
5746
- function exportCodex(db, repo) {
5747
- const result = compileContext(db, { repo });
5748
- if (!result.text) return "";
5749
- return `# AGENTS.md \u2014 Auto-generated by Recall
5750
- # Do not edit manually. Run \`recall export -r ${repo} -f codex\` to regenerate.
5751
-
5752
- ${result.text}`;
5753
- }
5754
-
5755
- // src/artifacts/context.ts
5756
- init_define_RECALL_BUILD_INFO();
5757
- import { mkdirSync as mkdirSync2 } from "fs";
5758
- import { isAbsolute, join as join4, resolve as resolve2 } from "path";
5759
- import { execFileSync as execFileSync3 } from "child_process";
5760
- function getRepoContextArtifactPath(repoPath) {
5761
- return join4(repoPath, ".recall", "context.md");
5762
- }
5763
- function renderRepoContextArtifact(db, repo) {
5764
- const compiled = exportMarkdown(db, repo).trimEnd();
5765
- const generatedAt = (/* @__PURE__ */ new Date()).toISOString();
5766
- return [
5767
- "<!-- Auto-generated by Recall. Do not edit manually. -->",
5768
- `<!-- Generated at: ${generatedAt} -->`,
5769
- "",
5770
- "# Recall Context",
5771
- "",
5772
- `Repo: \`${repo}\``,
5773
- "",
5774
- "Read this file before making repo-specific assumptions.",
5775
- "",
5776
- compiled,
5777
- ""
5778
- ].join("\n");
5779
- }
5780
- function writeRepoContextArtifact(db, input) {
5781
- const repo = input.repo ?? inferRepoSlugFromPath(input.repo_path) ?? null;
5782
- const repoPath = input.repo_path ?? (repo ? resolveLocalRepoPath(repo) : null);
5783
- if (!repo || !repoPath) {
5784
- return {
5785
- repo,
5786
- repo_path: repoPath,
5787
- output_path: null,
5788
- written: false
5789
- };
5790
- }
5791
- const outputPath = getRepoContextArtifactPath(repoPath);
5792
- mkdirSync2(join4(repoPath, ".recall"), { recursive: true });
5793
- ensureRepoContextExcluded(repoPath);
5794
- const content = renderRepoContextArtifact(db, repo);
5795
- const existing = readUtf8FileIfExists(outputPath);
5796
- if (existing !== content) {
5797
- atomicWriteUtf8File(outputPath, content);
5798
- }
5799
- return {
5800
- repo,
5801
- repo_path: repoPath,
5802
- output_path: outputPath,
5803
- written: existing !== content
5804
- };
5805
- }
5806
- function ensureRepoContextExcluded(repoPath) {
5807
- try {
5808
- const excludePath = execFileSync3(
5809
- "git",
5810
- ["-C", repoPath, "rev-parse", "--git-path", "info/exclude"],
5811
- { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
5812
- ).trim();
5813
- if (!excludePath) return;
5814
- const absoluteExcludePath = isAbsolute(excludePath) ? excludePath : resolve2(repoPath, excludePath);
5815
- const existing = readUtf8FileIfExists(absoluteExcludePath) ?? "";
5816
- if (existing.split("\n").some((line) => line.trim() === ".recall/")) return;
5817
- const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
5818
- atomicWriteUtf8File(
5819
- absoluteExcludePath,
5820
- `${existing}${prefix}# Recall generated context
5821
- .recall/
5822
- `
5823
- );
5824
- } catch {
5825
- }
5826
- }
5827
-
5828
- // src/session/lifecycle.ts
5829
- init_define_RECALL_BUILD_INFO();
5830
- function resolveLifecycleSource(input) {
5831
- if (input.source) return input.source;
5832
- return input.client ? tagActivitySource("hook", input.client) : "daemon";
5833
- }
5834
- function startSessionLifecycle(db, input) {
5835
- const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
5836
- const bootstrap = ensureRepoBootstrapped(db, {
5837
- repo,
5838
- repoPathHint: input.repo_path
5839
- });
5840
- if (bootstrap.status === "bootstrapped" || bootstrap.status === "scanned_empty") {
5841
- createActivityEvent(db, {
5842
- session_id: input.session_id,
5843
- repo: bootstrap.repo,
5844
- path: input.path ?? null,
5845
- source: resolveLifecycleSource(input),
5846
- event_type: "scan",
5847
- memory_ids: bootstrap.created_ids,
5848
- request: {
5849
- repo_path: bootstrap.repo_path,
5850
- client: input.client ?? null,
5851
- trigger: "session_start_bootstrap"
5852
- },
5853
- result: {
5854
- created: bootstrap.created_ids.length,
5855
- status: bootstrap.status
5856
- }
5857
- });
5858
- }
5859
- if (bootstrap.status === "already_known" && bootstrap.repo && input.repo_path) {
5860
- try {
5861
- refreshKnownRepoScan(db, bootstrap.repo, input.repo_path);
5862
- } catch {
5863
- }
5864
- }
5865
- const artifact = writeRepoContextArtifact(db, {
5866
- repo: bootstrap.repo,
5867
- repo_path: bootstrap.repo_path ?? input.repo_path ?? null
5868
- });
5869
- createActivityEvent(db, {
5870
- session_id: input.session_id,
5871
- repo: bootstrap.repo,
5872
- path: input.path ?? null,
5873
- source: resolveLifecycleSource(input),
5874
- event_type: "session_start",
5875
- request: {
5876
- client: input.client ?? null,
5877
- repo_path: bootstrap.repo_path ?? input.repo_path ?? null,
5878
- meta: input.meta ?? {}
5879
- },
5880
- result: {
5881
- bootstrap_status: bootstrap.status,
5882
- created: bootstrap.created_ids.length,
5883
- artifact_path: artifact.output_path,
5884
- artifact_written: artifact.written
5885
- }
5886
- });
5887
- return {
5888
- session_id: input.session_id,
5889
- repo: bootstrap.repo,
5890
- repo_path: bootstrap.repo_path ?? input.repo_path ?? null,
5891
- bootstrap_status: bootstrap.status,
5892
- created_ids: bootstrap.created_ids
5893
- };
5894
- }
5895
- function recordSessionLifecycleEvent(db, input) {
5896
- const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
5897
- createActivityEvent(db, {
5898
- session_id: input.session_id,
5899
- repo,
5900
- path: input.path ?? null,
5901
- source: resolveLifecycleSource(input),
5902
- event_type: "session_event",
5903
- request: {
5904
- client: input.client ?? null,
5905
- name: input.name,
5906
- repo_path: input.repo_path ?? null,
5907
- meta: input.meta ?? {}
5908
- },
5909
- result: input.payload ?? {}
5910
- });
5911
- return {
5912
- session_id: input.session_id,
5913
- repo,
5914
- repo_path: input.repo_path ?? null,
5915
- bootstrap_status: "skipped",
5916
- created_ids: []
5917
- };
5918
- }
5919
- function endSessionLifecycle(db, input) {
5920
- const repo = input.repo ?? process.env.RECALL_REPO_OVERRIDE?.trim() ?? inferRepoSlugFromPath(input.repo_path) ?? null;
5921
- createActivityEvent(db, {
5922
- session_id: input.session_id,
5923
- repo,
5924
- path: input.path ?? null,
5925
- source: resolveLifecycleSource(input),
5926
- event_type: "session_end",
5927
- request: {
5928
- client: input.client ?? null,
5929
- repo_path: input.repo_path ?? null,
5930
- meta: input.meta ?? {}
5931
- },
5932
- result: input.payload ?? {}
5933
- });
5934
- return {
5935
- session_id: input.session_id,
5936
- repo,
5937
- repo_path: input.repo_path ?? null,
5938
- bootstrap_status: "skipped",
5939
- created_ids: []
5940
- };
5941
- }
5942
-
5943
5836
  // src/eval/harness.ts
5944
5837
  init_define_RECALL_BUILD_INFO();
5945
5838
  import { randomUUID as randomUUID4 } from "crypto";
@@ -6461,7 +6354,7 @@ function embeddingConfigForProvider(provider) {
6461
6354
  // src/feedback/implicit.ts
6462
6355
  init_define_RECALL_BUILD_INFO();
6463
6356
  import { randomUUID as randomUUID5 } from "crypto";
6464
- import { execFileSync as execFileSync4 } from "child_process";
6357
+ import { execFileSync as execFileSync3 } from "child_process";
6465
6358
  var SIGNAL_WEIGHTS = {
6466
6359
  test_pass: 0.03,
6467
6360
  test_fail: -0.15,
@@ -6955,8 +6848,15 @@ export {
6955
6848
  listActivitySessions,
6956
6849
  scanAndStore,
6957
6850
  ensureRepoBootstrapped,
6851
+ resolveLocalRepoPath,
6958
6852
  inferRepoSlugFromPath,
6959
6853
  discoverLocalRepos,
6854
+ startSessionLifecycle,
6855
+ recordSessionLifecycleEvent,
6856
+ endSessionLifecycle,
6857
+ captureCorrectionFallback,
6858
+ signalOutcomeFallback,
6859
+ sessionEndFallback,
6960
6860
  listInjectedHistoryIdsForSession,
6961
6861
  createHistorySnippet,
6962
6862
  listHistorySnippets,
@@ -6971,17 +6871,6 @@ export {
6971
6871
  searchHistorySnippets,
6972
6872
  compileContext,
6973
6873
  compileContextHybrid,
6974
- exportMarkdown,
6975
- exportClaude,
6976
- exportCodex,
6977
- getRepoContextArtifactPath,
6978
- writeRepoContextArtifact,
6979
- startSessionLifecycle,
6980
- recordSessionLifecycleEvent,
6981
- endSessionLifecycle,
6982
- captureCorrectionFallback,
6983
- signalOutcomeFallback,
6984
- sessionEndFallback,
6985
6874
  startEvalSession,
6986
6875
  endEvalSession,
6987
6876
  incrementEvalCounter,
@@ -7006,4 +6895,4 @@ export {
7006
6895
  pruneMemories,
7007
6896
  formatPruneReport
7008
6897
  };
7009
- //# sourceMappingURL=chunk-7C3MVO4N.js.map
6898
+ //# sourceMappingURL=chunk-MVTT3CM7.js.map