@remnic/core 9.45.5 → 9.46.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 (402) hide show
  1. package/dist/access-admin-ops-surface.d.ts +10 -10
  2. package/dist/access-admin-ops-surface.js +24 -24
  3. package/dist/access-authorization-probe.d.ts +10 -10
  4. package/dist/access-authorization-probe.js +25 -25
  5. package/dist/access-boundary.d.ts +10 -10
  6. package/dist/access-boundary.js +24 -24
  7. package/dist/access-cli.js +73 -71
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +1 -1
  10. package/dist/access-extraction-force-flush.d.ts +10 -10
  11. package/dist/access-extraction-force-flush.js +24 -24
  12. package/dist/access-health-types.d.ts +1 -1
  13. package/dist/access-http-lcm-compaction.d.ts +10 -10
  14. package/dist/access-http-lifecycle-flush.d.ts +10 -10
  15. package/dist/access-http-offline-stream.d.ts +10 -10
  16. package/dist/access-http-query.js +24 -24
  17. package/dist/access-http.d.ts +10 -10
  18. package/dist/access-http.js +31 -31
  19. package/dist/access-identity-continuity-surface.d.ts +8 -8
  20. package/dist/access-identity-continuity-surface.js +24 -24
  21. package/dist/access-lcm-surface.d.ts +10 -10
  22. package/dist/access-lcm-surface.js +24 -24
  23. package/dist/access-mcp.d.ts +10 -10
  24. package/dist/access-mcp.js +28 -28
  25. package/dist/access-memory-search-fanout.d.ts +2 -2
  26. package/dist/{access-namespace-preflight-CWUDwB4M.d.ts → access-namespace-preflight--H6HwN85.d.ts} +1 -1
  27. package/dist/access-namespace-preflight.d.ts +3 -3
  28. package/dist/access-namespace-preflight.js +24 -24
  29. package/dist/access-observe-write-surface.d.ts +10 -10
  30. package/dist/access-observe-write-surface.js +24 -24
  31. package/dist/access-offline-manifest.d.ts +8 -8
  32. package/dist/access-operations-batch.js +25 -25
  33. package/dist/access-operations.d.ts +13 -13
  34. package/dist/access-operations.js +27 -27
  35. package/dist/access-recall-concurrency.d.ts +10 -10
  36. package/dist/access-recall-concurrency.js +24 -24
  37. package/dist/access-recall-response.d.ts +10 -10
  38. package/dist/access-recall-response.js +24 -24
  39. package/dist/access-recall-surface.d.ts +10 -10
  40. package/dist/access-recall-surface.js +24 -24
  41. package/dist/access-schema.d.ts +84 -84
  42. package/dist/access-service-helpers.d.ts +10 -10
  43. package/dist/{access-service-CNN89xyn.d.ts → access-service-loJadYd7.d.ts} +7 -7
  44. package/dist/access-service.d.ts +10 -10
  45. package/dist/access-service.js +24 -24
  46. package/dist/access-surface-catalog.d.ts +10 -10
  47. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  48. package/dist/action-confidence.d.ts +1 -1
  49. package/dist/active-memory-bridge.d.ts +1 -1
  50. package/dist/active-recall.d.ts +1 -1
  51. package/dist/ambient-provenance.d.ts +109 -0
  52. package/dist/ambient-provenance.js +22 -0
  53. package/dist/ambient-provenance.js.map +1 -0
  54. package/dist/{auto-sync-UPTUVE4X.js → auto-sync-7O6RP2RT.js} +3 -2
  55. package/dist/{auto-sync-UPTUVE4X.js.map → auto-sync-7O6RP2RT.js.map} +1 -1
  56. package/dist/behavior-learner.d.ts +1 -1
  57. package/dist/behavior-signals.d.ts +1 -1
  58. package/dist/bootstrap.d.ts +8 -8
  59. package/dist/briefing.d.ts +2 -2
  60. package/dist/briefing.js +5 -5
  61. package/dist/buffer-surprise-report.d.ts +1 -1
  62. package/dist/buffer-turn-helpers.d.ts +1 -1
  63. package/dist/buffer-turn-helpers.js +1 -1
  64. package/dist/buffer.d.ts +2 -2
  65. package/dist/buffer.js +2 -2
  66. package/dist/bulk-import/index.d.ts +3 -3
  67. package/dist/calibration.d.ts +1 -1
  68. package/dist/capabilities.d.ts +1 -1
  69. package/dist/{catalog-bctMURhN.d.ts → catalog-Iwbk9h5E.d.ts} +1 -1
  70. package/dist/causal-behavior.d.ts +1 -1
  71. package/dist/causal-consolidation.d.ts +1 -1
  72. package/dist/causal-consolidation.js +6 -6
  73. package/dist/causal-trajectory-graph.d.ts +1 -1
  74. package/dist/{chunk-LEPOP46W.js → chunk-227UFSEQ.js} +4 -4
  75. package/dist/{chunk-ER7W6H4T.js → chunk-2AD5SXO4.js} +5 -2
  76. package/dist/chunk-2AD5SXO4.js.map +1 -0
  77. package/dist/{chunk-CX4ZUMC6.js → chunk-2DSUT7DZ.js} +9 -9
  78. package/dist/{chunk-DZPFMQZ7.js → chunk-3S63QIFQ.js} +1 -1
  79. package/dist/chunk-3S63QIFQ.js.map +1 -0
  80. package/dist/{chunk-DAJPRXBR.js → chunk-47J4EDGR.js} +5 -5
  81. package/dist/{chunk-QVJPH7SH.js → chunk-5LRDM4R7.js} +40 -40
  82. package/dist/{chunk-XAGYS7X6.js → chunk-5R6S4DJZ.js} +7 -7
  83. package/dist/{chunk-QR6G5KF4.js → chunk-5VQPZ4GV.js} +3 -3
  84. package/dist/{chunk-E5XQIWAL.js → chunk-64BHFFKZ.js} +2 -2
  85. package/dist/{chunk-GRUYA45P.js → chunk-6H744ZBH.js} +3 -3
  86. package/dist/{chunk-6ISC4AVB.js → chunk-BDNL34CT.js} +2 -2
  87. package/dist/{chunk-GQL52GQ5.js → chunk-CDKHKZL5.js} +15 -12
  88. package/dist/chunk-CDKHKZL5.js.map +1 -0
  89. package/dist/{chunk-AC5OWJLV.js → chunk-E4FOAENZ.js} +4 -4
  90. package/dist/{chunk-UW66OZTD.js → chunk-FULKGK7P.js} +2 -2
  91. package/dist/{chunk-V2TNYF6Q.js → chunk-HJ3SVHUW.js} +3 -3
  92. package/dist/{chunk-A4IJCD2Z.js → chunk-HXXTXLKA.js} +2 -2
  93. package/dist/{chunk-FUCYDRE5.js → chunk-IDE5AR5W.js} +11 -11
  94. package/dist/{chunk-2FSTB6BJ.js → chunk-ILBLZ5Y5.js} +2 -2
  95. package/dist/chunk-J7T4MX7P.js +131 -0
  96. package/dist/chunk-J7T4MX7P.js.map +1 -0
  97. package/dist/{chunk-WZ3TOIDW.js → chunk-JFO5QZ7N.js} +2 -2
  98. package/dist/{chunk-FR27HBBA.js → chunk-KA47C7BF.js} +2 -2
  99. package/dist/{chunk-JZH4LWHB.js → chunk-KMWYZTIE.js} +2 -2
  100. package/dist/{chunk-LPYDOLSM.js → chunk-L7G72WY4.js} +2 -2
  101. package/dist/{chunk-AMAUBUKY.js → chunk-LI7OE7G6.js} +2 -2
  102. package/dist/{chunk-MO4HSXHZ.js → chunk-M2INOSTA.js} +2 -2
  103. package/dist/{chunk-GODSPTOT.js → chunk-M32URQXV.js} +652 -601
  104. package/dist/chunk-M32URQXV.js.map +1 -0
  105. package/dist/{chunk-HFPASSFV.js → chunk-P2OTGMTR.js} +2 -2
  106. package/dist/{chunk-W2V7UESE.js → chunk-PFJXPOD4.js} +2 -2
  107. package/dist/{chunk-R3KHKU7M.js → chunk-PKCLQ7KM.js} +43 -143
  108. package/dist/chunk-PKCLQ7KM.js.map +1 -0
  109. package/dist/chunk-QW27DOHG.js +84 -0
  110. package/dist/chunk-QW27DOHG.js.map +1 -0
  111. package/dist/{chunk-QUENPGWZ.js → chunk-RCU25Z66.js} +24 -24
  112. package/dist/{chunk-QUENPGWZ.js.map → chunk-RCU25Z66.js.map} +1 -1
  113. package/dist/{chunk-NEF7LR5J.js → chunk-RVPTS4U5.js} +2 -2
  114. package/dist/{chunk-W3IC7QOY.js → chunk-RVYVMQK4.js} +3 -3
  115. package/dist/{chunk-GUAL4PQH.js → chunk-ST5IEK3H.js} +2 -2
  116. package/dist/{chunk-O4KMGRXE.js → chunk-SXWHN7GC.js} +2 -2
  117. package/dist/{chunk-RNHVVMFN.js → chunk-T6JRMVOV.js} +2 -2
  118. package/dist/{chunk-5QJQHBLE.js → chunk-U6JGQ37L.js} +2 -2
  119. package/dist/{chunk-UV72DEZD.js → chunk-UYUYZ4WY.js} +36 -10
  120. package/dist/chunk-UYUYZ4WY.js.map +1 -0
  121. package/dist/{chunk-HC3PBX23.js → chunk-V5FE3UAI.js} +2 -2
  122. package/dist/{chunk-ERZ2R42X.js → chunk-W2ZSNIBP.js} +2 -2
  123. package/dist/{chunk-3COYXTGM.js → chunk-WHWDBTCJ.js} +2 -2
  124. package/dist/{chunk-FIK3CQNA.js → chunk-WOC6DXP5.js} +3 -3
  125. package/dist/{chunk-4FBVAGV3.js → chunk-XBMJ35IP.js} +2 -2
  126. package/dist/{chunk-GFCVUY6G.js → chunk-YWCOJOUI.js} +2 -2
  127. package/dist/{chunk-2X2T2UVE.js → chunk-ZDAYWJV6.js} +1 -1
  128. package/dist/chunk-ZDAYWJV6.js.map +1 -0
  129. package/dist/{cli-BHBswmUa.d.ts → cli-D_RcqXfZ.d.ts} +5 -5
  130. package/dist/cli.d.ts +12 -12
  131. package/dist/cli.js +50 -50
  132. package/dist/compat/checks.js +1 -1
  133. package/dist/compounding/engine.d.ts +2 -2
  134. package/dist/compounding/engine.js +5 -5
  135. package/dist/compounding/preference-consolidator.d.ts +1 -1
  136. package/dist/compression-optimizer.d.ts +1 -1
  137. package/dist/config.d.ts +1 -1
  138. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  139. package/dist/connectors/codex-materialize-runner.js +5 -5
  140. package/dist/connectors/codex-materialize.d.ts +1 -1
  141. package/dist/connectors/index.d.ts +1 -1
  142. package/dist/connectors/index.js +5 -5
  143. package/dist/consolidation-provenance-check.d.ts +2 -2
  144. package/dist/consolidation-undo.d.ts +2 -2
  145. package/dist/contradiction/index.d.ts +2 -2
  146. package/dist/converge-config.d.ts +1 -1
  147. package/dist/convergence-refresh.d.ts +2 -2
  148. package/dist/convergence-refresh.js +7 -7
  149. package/dist/conversation-index/backend.d.ts +1 -1
  150. package/dist/conversation-index/backend.js +2 -2
  151. package/dist/conversation-index/chunker.d.ts +1 -1
  152. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  153. package/dist/conversation-index/indexer.d.ts +1 -1
  154. package/dist/conversation-index/search.d.ts +1 -1
  155. package/dist/corpus-watermark.d.ts +1 -1
  156. package/dist/corpus-watermark.js +13 -13
  157. package/dist/day-summary.d.ts +1 -1
  158. package/dist/delinearize.d.ts +1 -1
  159. package/dist/direct-answer-wiring.d.ts +1 -1
  160. package/dist/direct-answer.d.ts +1 -1
  161. package/dist/embedding-fallback.d.ts +1 -1
  162. package/dist/enrichment/index.d.ts +1 -1
  163. package/dist/entity-retrieval.d.ts +2 -2
  164. package/dist/entity-retrieval.js +5 -5
  165. package/dist/entity-schema.d.ts +1 -1
  166. package/dist/explicit-capture.d.ts +8 -8
  167. package/dist/external-wiki-access.d.ts +10 -10
  168. package/dist/external-wiki-access.js +25 -25
  169. package/dist/external-wiki-collection-registration.d.ts +1 -1
  170. package/dist/external-wiki-collection.d.ts +1 -1
  171. package/dist/external-wiki-mcp-tools.d.ts +10 -10
  172. package/dist/extraction-error-classification.d.ts +1 -1
  173. package/dist/extraction-faithfulness.d.ts +1 -1
  174. package/dist/extraction-judge-telemetry.d.ts +1 -1
  175. package/dist/extraction-judge-training.d.ts +1 -1
  176. package/dist/extraction-judge.d.ts +1 -1
  177. package/dist/extraction-liveness.d.ts +1 -1
  178. package/dist/extraction-prompt.d.ts +36 -0
  179. package/dist/extraction-prompt.js +16 -0
  180. package/dist/extraction-prompt.js.map +1 -0
  181. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  182. package/dist/extraction-source-grounding.d.ts +1 -1
  183. package/dist/extraction.d.ts +6 -14
  184. package/dist/extraction.js +9 -7
  185. package/dist/fallback-llm.d.ts +1 -1
  186. package/dist/graph-dashboard-diff.d.ts +1 -1
  187. package/dist/graph-dashboard-key.d.ts +1 -1
  188. package/dist/graph-dashboard-parser.d.ts +1 -1
  189. package/dist/graph-edge-reinforcement.d.ts +1 -1
  190. package/dist/graph-snapshot.d.ts +1 -1
  191. package/dist/graph.d.ts +1 -1
  192. package/dist/importance.d.ts +1 -1
  193. package/dist/importers/index.d.ts +1 -1
  194. package/dist/in-flight-reads.d.ts +1 -1
  195. package/dist/index.d.ts +699 -696
  196. package/dist/index.js +124 -122
  197. package/dist/intent.d.ts +1 -1
  198. package/dist/lcm/engine.d.ts +1 -1
  199. package/dist/lcm/index.d.ts +1 -1
  200. package/dist/lcm/tools.d.ts +1 -1
  201. package/dist/lifecycle.d.ts +1 -1
  202. package/dist/live-connectors-runner.d.ts +1 -1
  203. package/dist/local-llm.d.ts +1 -1
  204. package/dist/local-model-endpoint.d.ts +1 -1
  205. package/dist/maintenance/memory-governance.d.ts +1 -1
  206. package/dist/maintenance/memory-governance.js +5 -5
  207. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  208. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
  209. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  210. package/dist/maintenance/rebuild-memory-projection.js +6 -6
  211. package/dist/{maintenance-CoRikzIt.d.ts → maintenance-DQrL93Uu.d.ts} +3 -3
  212. package/dist/mcp-memory-inspector-app.d.ts +10 -10
  213. package/dist/memory-action-policy.d.ts +1 -1
  214. package/dist/memory-cache.d.ts +1 -1
  215. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  216. package/dist/memory-projection-store.d.ts +1 -1
  217. package/dist/memory-provenance.d.ts +1 -1
  218. package/dist/memory-snapshot.d.ts +1 -1
  219. package/dist/memory-worth-outcomes.d.ts +2 -2
  220. package/dist/models-json.d.ts +1 -1
  221. package/dist/namespaces/migrate.d.ts +3 -3
  222. package/dist/namespaces/migrate.js +12 -12
  223. package/dist/namespaces/principal.d.ts +1 -1
  224. package/dist/namespaces/search.d.ts +1 -1
  225. package/dist/namespaces/search.js +6 -6
  226. package/dist/namespaces/storage.d.ts +3 -3
  227. package/dist/namespaces/storage.js +5 -5
  228. package/dist/native-knowledge.d.ts +1 -1
  229. package/dist/offline-sync-impression-drain.d.ts +1 -1
  230. package/dist/operator-doctor-corpus.d.ts +1 -1
  231. package/dist/operator-doctor-corpus.js +14 -14
  232. package/dist/operator-doctor-replica.d.ts +1 -1
  233. package/dist/operator-toolkit.d.ts +3 -3
  234. package/dist/operator-toolkit.js +18 -18
  235. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  236. package/dist/orchestration/maintenance.d.ts +4 -4
  237. package/dist/orchestration/maintenance.js +10 -10
  238. package/dist/{orchestrator-BJeq7Pw1.d.ts → orchestrator-LPGegii3.d.ts} +8 -8
  239. package/dist/orchestrator.d.ts +8 -8
  240. package/dist/orchestrator.js +73 -71
  241. package/dist/patterns-cli.d.ts +1 -1
  242. package/dist/{pipeline-CNjY4wk3.d.ts → pipeline-1h2GpiHP.d.ts} +1 -1
  243. package/dist/policy-runtime.d.ts +1 -1
  244. package/dist/proactive-contention.d.ts +1 -1
  245. package/dist/provenance.d.ts +1 -1
  246. package/dist/{qmd-C0UDZidt.d.ts → qmd-UdwoF71D.d.ts} +1 -1
  247. package/dist/qmd-preflight.d.ts +2 -2
  248. package/dist/qmd-recall-cache.d.ts +1 -1
  249. package/dist/qmd.d.ts +2 -2
  250. package/dist/recall-concurrency-config.d.ts +1 -1
  251. package/dist/recall-disclosure-escalation.d.ts +1 -1
  252. package/dist/recall-explain-renderer.d.ts +1 -1
  253. package/dist/recall-explain-renderer.js +3 -3
  254. package/dist/recall-memory-map.d.ts +1 -1
  255. package/dist/recall-planner-llm.d.ts +1 -1
  256. package/dist/recall-state.d.ts +1 -1
  257. package/dist/recall-tag-filter.d.ts +1 -1
  258. package/dist/recall-timings.d.ts +1 -1
  259. package/dist/recall-xray-cli.d.ts +1 -1
  260. package/dist/recall-xray-cli.js +4 -4
  261. package/dist/recall-xray-renderer.d.ts +1 -1
  262. package/dist/recall-xray-renderer.js +3 -3
  263. package/dist/recall-xray.d.ts +1 -1
  264. package/dist/recall-xray.js +2 -2
  265. package/dist/reconcile/cursor.d.ts +1 -1
  266. package/dist/reconcile/manifest.d.ts +1 -1
  267. package/dist/reconcile/plan.d.ts +1 -1
  268. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  269. package/dist/replay/normalizers/claude.d.ts +1 -1
  270. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  271. package/dist/replay/normalizers/shared.d.ts +1 -1
  272. package/dist/replay/runner.d.ts +1 -1
  273. package/dist/replay/types.d.ts +1 -1
  274. package/dist/replica-divergence.d.ts +1 -1
  275. package/dist/replica-peers-config.d.ts +1 -1
  276. package/dist/resolve-auth-token.d.ts +1 -1
  277. package/dist/retrieval-agents.d.ts +2 -2
  278. package/dist/retrieval-tiers.d.ts +1 -1
  279. package/dist/routing/engine.d.ts +1 -1
  280. package/dist/routing/store.d.ts +1 -1
  281. package/dist/salvage-envelope.d.ts +1 -1
  282. package/dist/schemas.d.ts +76 -76
  283. package/dist/{scope-profiles-BJzp2F5A.d.ts → scope-profiles-APjhSe-w.d.ts} +1 -1
  284. package/dist/sdk-compat.js.map +1 -1
  285. package/dist/search/embed-helper.d.ts +1 -1
  286. package/dist/search/factory.d.ts +1 -1
  287. package/dist/search/factory.js +5 -5
  288. package/dist/search/index.d.ts +1 -1
  289. package/dist/search/index.js +9 -9
  290. package/dist/search/lancedb-backend.d.ts +1 -1
  291. package/dist/search/meilisearch-backend.d.ts +1 -1
  292. package/dist/search/noop-backend.d.ts +1 -1
  293. package/dist/search/orama-backend.d.ts +1 -1
  294. package/dist/search/port.d.ts +1 -1
  295. package/dist/search/remote-backend.d.ts +1 -1
  296. package/dist/{semantic-consolidation-D4KAZO2G.d.ts → semantic-consolidation-CrySDbk3.d.ts} +1 -1
  297. package/dist/semantic-consolidation.d.ts +2 -2
  298. package/dist/semantic-consolidation.js +6 -6
  299. package/dist/semantic-rule-promotion.js +5 -5
  300. package/dist/semantic-rule-verifier.d.ts +1 -1
  301. package/dist/semantic-rule-verifier.js +5 -5
  302. package/dist/{service-DWC4tq7p.d.ts → service-DJ0LDyuN.d.ts} +2 -2
  303. package/dist/session-observer-bands.d.ts +1 -1
  304. package/dist/session-observer-state.d.ts +1 -1
  305. package/dist/shared-context/manager.d.ts +9 -9
  306. package/dist/signal.d.ts +1 -1
  307. package/dist/source-agent-qualifier.d.ts +4 -1
  308. package/dist/source-agent-qualifier.js +6 -6
  309. package/dist/{storage-DPGjB-8e.d.ts → storage-y340tYKb.d.ts} +1 -1
  310. package/dist/storage.d.ts +2 -2
  311. package/dist/storage.js +4 -4
  312. package/dist/summarizer.d.ts +1 -1
  313. package/dist/summary-snapshot.d.ts +1 -1
  314. package/dist/temporal-supersession.d.ts +2 -2
  315. package/dist/temporal-timeline-recall.d.ts +1 -1
  316. package/dist/temporal-validity.d.ts +1 -1
  317. package/dist/threading.d.ts +1 -1
  318. package/dist/tier-migration.d.ts +2 -2
  319. package/dist/tier-routing.d.ts +1 -1
  320. package/dist/topics.d.ts +1 -1
  321. package/dist/transcript.d.ts +1 -1
  322. package/dist/transfer/types.d.ts +66 -66
  323. package/dist/trust-score-stage.d.ts +1 -1
  324. package/dist/trust-score.d.ts +1 -1
  325. package/dist/{types-yX_FwERf.d.ts → types-D_Au9qJO.d.ts} +13 -2
  326. package/dist/types.d.ts +1 -1
  327. package/dist/types.js +1 -1
  328. package/dist/utility-runtime.d.ts +1 -1
  329. package/dist/verified-recall.js +5 -5
  330. package/dist/write-envelope.d.ts +1 -1
  331. package/package.json +2 -12
  332. package/src/ambient-provenance.test.ts +510 -0
  333. package/src/ambient-provenance.ts +229 -0
  334. package/src/buffer-turn-helpers.ts +17 -1
  335. package/src/compat/checks.test.ts +45 -1
  336. package/src/compat/checks.ts +16 -16
  337. package/src/extraction-prompt.ts +142 -0
  338. package/src/extraction.ts +37 -148
  339. package/src/meetings/memory-gen.test.ts +51 -0
  340. package/src/meetings/memory-gen.ts +36 -8
  341. package/src/meetings/summary-extractor.ts +4 -2
  342. package/src/orchestration/recall-internal.ts +5 -148
  343. package/src/orchestration/recall-profile-storage.ts +194 -0
  344. package/src/orchestration/recall-search-pipeline.ts +13 -182
  345. package/src/orchestration/recall-search-prefilter.ts +254 -0
  346. package/src/orchestration/session-context.ts +1 -1
  347. package/src/orchestrator.ts +1 -1
  348. package/src/sdk-compat.ts +2 -4
  349. package/src/source-agent-qualifier.ts +3 -0
  350. package/src/testing/subjects/recall-profile-storage.test.ts +362 -0
  351. package/src/testing/subjects/recall-search-prefilter.test.ts +365 -0
  352. package/src/types.ts +2 -2
  353. package/src/wearables/memory-gen.test.ts +82 -0
  354. package/src/wearables/memory-gen.ts +54 -5
  355. package/src/wearables/trust.ts +19 -2
  356. package/dist/chunk-2X2T2UVE.js.map +0 -1
  357. package/dist/chunk-DZPFMQZ7.js.map +0 -1
  358. package/dist/chunk-ER7W6H4T.js.map +0 -1
  359. package/dist/chunk-GODSPTOT.js.map +0 -1
  360. package/dist/chunk-GQL52GQ5.js.map +0 -1
  361. package/dist/chunk-R3KHKU7M.js.map +0 -1
  362. package/dist/chunk-UV72DEZD.js.map +0 -1
  363. package/dist/legacy-hook-compat.d.ts +0 -3
  364. package/dist/legacy-hook-compat.js +0 -36
  365. package/dist/legacy-hook-compat.js.map +0 -1
  366. package/src/legacy-hook-compat.test.ts +0 -20
  367. package/src/legacy-hook-compat.ts +0 -45
  368. /package/dist/{chunk-LEPOP46W.js.map → chunk-227UFSEQ.js.map} +0 -0
  369. /package/dist/{chunk-CX4ZUMC6.js.map → chunk-2DSUT7DZ.js.map} +0 -0
  370. /package/dist/{chunk-DAJPRXBR.js.map → chunk-47J4EDGR.js.map} +0 -0
  371. /package/dist/{chunk-QVJPH7SH.js.map → chunk-5LRDM4R7.js.map} +0 -0
  372. /package/dist/{chunk-XAGYS7X6.js.map → chunk-5R6S4DJZ.js.map} +0 -0
  373. /package/dist/{chunk-QR6G5KF4.js.map → chunk-5VQPZ4GV.js.map} +0 -0
  374. /package/dist/{chunk-E5XQIWAL.js.map → chunk-64BHFFKZ.js.map} +0 -0
  375. /package/dist/{chunk-GRUYA45P.js.map → chunk-6H744ZBH.js.map} +0 -0
  376. /package/dist/{chunk-6ISC4AVB.js.map → chunk-BDNL34CT.js.map} +0 -0
  377. /package/dist/{chunk-AC5OWJLV.js.map → chunk-E4FOAENZ.js.map} +0 -0
  378. /package/dist/{chunk-UW66OZTD.js.map → chunk-FULKGK7P.js.map} +0 -0
  379. /package/dist/{chunk-V2TNYF6Q.js.map → chunk-HJ3SVHUW.js.map} +0 -0
  380. /package/dist/{chunk-A4IJCD2Z.js.map → chunk-HXXTXLKA.js.map} +0 -0
  381. /package/dist/{chunk-FUCYDRE5.js.map → chunk-IDE5AR5W.js.map} +0 -0
  382. /package/dist/{chunk-2FSTB6BJ.js.map → chunk-ILBLZ5Y5.js.map} +0 -0
  383. /package/dist/{chunk-WZ3TOIDW.js.map → chunk-JFO5QZ7N.js.map} +0 -0
  384. /package/dist/{chunk-FR27HBBA.js.map → chunk-KA47C7BF.js.map} +0 -0
  385. /package/dist/{chunk-JZH4LWHB.js.map → chunk-KMWYZTIE.js.map} +0 -0
  386. /package/dist/{chunk-LPYDOLSM.js.map → chunk-L7G72WY4.js.map} +0 -0
  387. /package/dist/{chunk-AMAUBUKY.js.map → chunk-LI7OE7G6.js.map} +0 -0
  388. /package/dist/{chunk-MO4HSXHZ.js.map → chunk-M2INOSTA.js.map} +0 -0
  389. /package/dist/{chunk-HFPASSFV.js.map → chunk-P2OTGMTR.js.map} +0 -0
  390. /package/dist/{chunk-W2V7UESE.js.map → chunk-PFJXPOD4.js.map} +0 -0
  391. /package/dist/{chunk-NEF7LR5J.js.map → chunk-RVPTS4U5.js.map} +0 -0
  392. /package/dist/{chunk-W3IC7QOY.js.map → chunk-RVYVMQK4.js.map} +0 -0
  393. /package/dist/{chunk-GUAL4PQH.js.map → chunk-ST5IEK3H.js.map} +0 -0
  394. /package/dist/{chunk-O4KMGRXE.js.map → chunk-SXWHN7GC.js.map} +0 -0
  395. /package/dist/{chunk-RNHVVMFN.js.map → chunk-T6JRMVOV.js.map} +0 -0
  396. /package/dist/{chunk-5QJQHBLE.js.map → chunk-U6JGQ37L.js.map} +0 -0
  397. /package/dist/{chunk-HC3PBX23.js.map → chunk-V5FE3UAI.js.map} +0 -0
  398. /package/dist/{chunk-ERZ2R42X.js.map → chunk-W2ZSNIBP.js.map} +0 -0
  399. /package/dist/{chunk-3COYXTGM.js.map → chunk-WHWDBTCJ.js.map} +0 -0
  400. /package/dist/{chunk-FIK3CQNA.js.map → chunk-WOC6DXP5.js.map} +0 -0
  401. /package/dist/{chunk-4FBVAGV3.js.map → chunk-XBMJ35IP.js.map} +0 -0
  402. /package/dist/{chunk-GFCVUY6G.js.map → chunk-YWCOJOUI.js.map} +0 -0
@@ -0,0 +1,131 @@
1
+ import {
2
+ AMBIENT_CAPTURE_PROMPT_SECTION,
3
+ AMBIENT_SPECULATIVE_TIER_CLAUSE
4
+ } from "./chunk-QW27DOHG.js";
5
+ import {
6
+ resolveMemoryLifecycleCapabilities,
7
+ resolveRecallAuxiliaryCapabilities
8
+ } from "./chunk-2XRE6FLM.js";
9
+
10
+ // src/extraction-prompt.ts
11
+ var EXTRACTION_RESPONSE_SHAPE = `{
12
+ "facts": [{
13
+ "category": "<category>",
14
+ "content": "<source-grounded statement>",
15
+ "confidence": 0.0,
16
+ "tags": ["<tag>"],
17
+ "entityRef": "<optional normalized-name>",
18
+ "promptedByQuestion": "<optional source-grounded question>",
19
+ "quote": "<optional exact contiguous source span>",
20
+ "scope": "<optional project-or-global>",
21
+ "structuredAttributes": {"<key>": "<value>"},
22
+ "procedureSteps": [{"order": 1, "intent": "<step>"}, {"order": 2, "intent": "<step>"}],
23
+ "reasoningTrace": {
24
+ "steps": [{"order": 1, "description": "<step>"}, {"order": 2, "description": "<step>"}],
25
+ "finalAnswer": "<answer>",
26
+ "observedOutcome": "<optional outcome>"
27
+ },
28
+ "eventTime": "<optional source temporal expression>"
29
+ }],
30
+ "entities": [{
31
+ "name": "<normalized-name>",
32
+ "type": "<entity-type>",
33
+ "facts": ["<source-grounded statement>"],
34
+ "promptedByQuestion": "<optional source-grounded question>",
35
+ "structuredSections": [{"key": "<section-key>", "title": "<section-title>", "facts": ["<source-grounded statement>"]}]
36
+ }],
37
+ "profileUpdates": ["<source-grounded profile update>"],
38
+ "questions": [{"question": "<source-grounded unresolved question>", "context": "<source-grounded context>", "priority": 0.0}],
39
+ "identityReflection": "<conversation-grounded agent reflection>",
40
+ "relationships": [{"source": "<normalized-name>", "target": "<normalized-name>", "label": "<source-grounded relationship>"}]
41
+ }`;
42
+ var EXTRACTION_RESPONSE_PLACEHOLDERS = {};
43
+ for (const placeholder of EXTRACTION_RESPONSE_SHAPE.match(/<[^<>\r\n]+>/g) ?? []) {
44
+ EXTRACTION_RESPONSE_PLACEHOLDERS[placeholder] = true;
45
+ }
46
+ function eventTimePromptInstruction(config) {
47
+ if (!config.temporalBiTemporal) return "";
48
+ return `
49
+ When a fact states when it became or stopped being true, copy that explicit temporal expression verbatim into "eventTime". Omit "eventTime" when no such expression appears; never infer dates.`;
50
+ }
51
+ function buildExtractionInstructions(config, existingEntities, ambientCapture = false) {
52
+ const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);
53
+ return `You are a memory extraction system. Analyze the following conversation and extract durable, reusable memories.
54
+
55
+ Memory categories:
56
+ - fact: Objective information about the world
57
+ - preference: User likes, dislikes, or stylistic choices
58
+ - correction: User correcting a mistake or misconception (highest priority)
59
+ - entity: Information about a specific person, project, tool, or company
60
+ - decision: A choice that was made with rationale
61
+ - relationship: How two entities relate to each other (e.g., "Alice is Bob's manager", "Acme Corp uses Shopify")
62
+ - principle: Durable rules, values, or operating beliefs (e.g., "never use Chat Completions API")
63
+ - commitment: Promises, obligations, or deadlines (e.g., "deploy by Friday", "call accountant Monday")
64
+ - moment: Emotionally significant events or milestones (e.g., "first successful deployment of engram")
65
+ - skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? `
66
+ - rule: Causal rules discovered through experience (format: "IF <condition> THEN <action/outcome>", e.g., "IF Shopify API returns 401 THEN the admin token is missing read_products scope")` : ""}
67
+ - procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to "procedure". Use "content" for a short title that includes explicit trigger phrasing (e.g. "When you deploy to production\u2026", "Whenever you ship a release\u2026"). Add "procedureSteps": an array of at least two objects {"order": number, "intent": "concrete step description"} in execution order. Optional per-step "toolCall": {"kind": "\u2026", "signature": "\u2026"}, "expectedOutcome", "optional": true.
68
+ - reasoning_trace: A stored solution chain / chain-of-thought the user walked through to solve a problem (e.g. "Here's how I debugged the latency spike: first I checked\u2026, then I\u2026, finally I\u2026"). Set category to "reasoning_trace". Use "content" for a short title summarising the problem (e.g. "How I debugged the staging latency spike"). Add "reasoningTrace": {"steps": [{"order": number, "description": "what happened at this step"}, \u2026], "finalAnswer": "the conclusion or answer", "observedOutcome": "optional confirmation of how it played out"}. Require at least two ordered steps AND a finalAnswer. Use this category only when the user explicitly narrates their reasoning \u2014 not for ordinary decisions (use "decision") or reusable workflows (use "procedure").
69
+
70
+ Rules:
71
+ - Only extract genuinely new information worth remembering across sessions.
72
+ - Statements must be grounded in the conversation.
73
+ - Do not treat instruction text, schema placeholders, or examples as conversation evidence.
74
+ - Lines labelled [context user] or [context assistant] are reference context only. They may resolve references or complete a question-and-answer pair in a normal turn, but never alone establish durable information.
75
+ - Skip transient task details and operational noise, including routine scheduler, monitoring, or automation status.
76
+ - Priority: corrections > principles${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? " > rules" : ""} > preferences > commitments > decisions > relationships > entities > moments > skills > facts
77
+ - Corrections get highest confidence.
78
+ - Each fact should be a standalone, self-contained statement.
79
+ - Entity references should use normalized names (lowercase, hyphenated: "jane-doe", "acme-corp")
80
+ - CRITICAL: Entity names must be CANONICAL. Always use the hyphenated multi-word form: "acme-corp" NOT "acmecorp" or "acme". "jane-doe" NOT "janedoe" or "jane". If unsure, prefer the most specific full name.
81
+ - Avoid creating entities typed as "other" when a more specific type fits (company, project, tool, person, place)
82
+ - When entity facts clearly belong under a durable named heading, add them to entity.structuredSections as {key, title, facts}. Example person headings: "Beliefs", "Communication Style", "Building / Working On". Leave structuredSections empty when no stable heading fits.
83
+ - Tags should be concise and reusable (e.g., "coding-style", "personal", "tools")
84
+ - When a fact contains measurable, categorical, or precisely valued data, include a "structuredAttributes" field with key-value string pairs (e.g., {"price": "29.99", "brand": "Sony"}, {"date": "2024-03-15", "location": "SF"}, {"chosen": "PostgreSQL", "rejected": "MongoDB"}). Only for concrete values, not narrative content.
85
+ - Set confidence using these tiers:
86
+ * Explicit (0.95-1.0): Direct user statements \u2014 "I prefer X", "my name is Y"
87
+ * Implied (0.70-0.94): Strong contextual inference \u2014 user consistently does X, clear from conversation flow
88
+ * Inferred (0.40-0.69): Pattern recognition \u2014 reasonable guess from limited evidence
89
+ * Speculative (0.00-0.39): Tentative hypothesis \u2014 weak signal, needs future confirmation. Speculative memories auto-expire after 30 days if not confirmed.${ambientCapture ? AMBIENT_SPECULATIVE_TIER_CLAUSE : ""}${config.provenance?.enabled ? `
90
+ - Source quotes: For each fact, include a "quote" field containing the EXACT verbatim words from the conversation that support the fact. Copy a contiguous span from a single speaker turn (not a paraphrase, not a summary). Cap at ~300 characters. This grounds every memory in the literal utterance that created it.` : ""}
91
+ - For commitments: include any deadline or timeframe mentioned${lifecycleCaps.extractionScopeClassification ? `
92
+
93
+ Scope classification:
94
+ For each fact, set "scope" to one of:
95
+ - "global" \u2014 knowledge that applies across projects: core framework/library bugs, API behavior patterns, user preferences (editor, language, style), general coding patterns, infrastructure knowledge, technology facts not tied to one codebase
96
+ - "project" \u2014 knowledge specific to one codebase: file paths, environment configs, deployment details, project-specific workarounds, team/stakeholder info tied to one project, repo-specific conventions. Tool, command, or CLI-flag instructions TIED TO ONE AGENT are also "project", because the same tool name means different things in different agent integrations (a "search" tool may search repository code in one agent and the web in another); when keeping such an agent-tied instruction, the fact text MUST name the originating agent as a leading "In <agent>," clause (e.g. "In Pi, use the search tool with a repository path."). A tool/command fact that holds in every agent and every repo is NOT agent-tied \u2014 leave it "global" and do not add a qualifier (e.g. "\`git status --short\` emits compact output"). Examples: "In Pi, the search tool takes a repository path" -> "project"; "\`git status --short\` emits compact output" -> "global".
97
+ When in doubt, prefer "project" \u2014 it is safer to keep knowledge scoped narrowly.` : ""}
98
+ ${ambientCapture ? `${AMBIENT_CAPTURE_PROMPT_SECTION}
99
+ ` : ""}
100
+ Entity creation rules (STRICT):
101
+ - Only create entities for DURABLE things: real people, companies, products, tools, ongoing projects
102
+ - NEVER create entities for transient items: individual PRs, branches, Jira tickets, meetings, agent task IDs, log files, database tables, cron job runs, sessions
103
+ - When you learn something about a transient item (e.g., PR #58 fixed a bug), store it as a FACT with an entityRef to the parent project \u2014 do NOT create an entity for the PR itself
104
+ - Prefer attaching facts to broad parent entities rather than creating sub-entities. E.g., "acme-store uses Algolia for search" is a fact on entity "acme-store", NOT a new entity "acme-store-algolia-connector"
105
+ - The entity list should be SHORT \u2014 think "things that would have their own Wikipedia page" not "things mentioned in passing"
106
+
107
+ ${existingEntities && existingEntities.length > 0 ? `
108
+ KNOWN ENTITIES (use these exact names when referencing existing things):
109
+ ${existingEntities.join(", ")}
110
+
111
+ When you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.
112
+ ` : ""}
113
+ ${eventTimePromptInstruction(config)}
114
+ Also extract relationships between entities mentioned in the conversation.
115
+ - Format: {source: "entity-name", target: "entity-name", label: "relationship description"}
116
+ - Max 5 relationships per extraction
117
+ - Only include clear, durable relationships (e.g., "works at", "created", "manages", "uses")
118
+ - Use normalized entity names (e.g., "person-jane-doe", "company-acme-corp")
119
+
120
+ Questions are optional. Include only source-grounded unresolved questions that would be useful in future sessions; otherwise return an empty array.
121
+
122
+ Finally, write a brief identity reflection about the agent who had this conversation, based only on the conversation. Do not write about the extraction process.`;
123
+ }
124
+
125
+ export {
126
+ EXTRACTION_RESPONSE_SHAPE,
127
+ EXTRACTION_RESPONSE_PLACEHOLDERS,
128
+ eventTimePromptInstruction,
129
+ buildExtractionInstructions
130
+ };
131
+ //# sourceMappingURL=chunk-J7T4MX7P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/extraction-prompt.ts"],"sourcesContent":["/**\n * Extraction prompt construction (issue #1995 sibling extraction).\n *\n * The system prompt, its JSON response shape, and the placeholder table\n * derived from that shape are prompt DATA, not engine behavior. They live here\n * so `extraction.ts` holds the pipeline and one module owns the text every\n * extraction path — local LLM, direct client, gateway fallback — sends.\n */\n\nimport { AMBIENT_CAPTURE_PROMPT_SECTION, AMBIENT_SPECULATIVE_TIER_CLAUSE } from \"./ambient-provenance.js\";\nimport { resolveMemoryLifecycleCapabilities, resolveRecallAuxiliaryCapabilities } from \"./capabilities.js\";\nimport type { PluginConfig } from \"./types.js\";\n\nexport const EXTRACTION_RESPONSE_SHAPE = `{\n \"facts\": [{\n \"category\": \"<category>\",\n \"content\": \"<source-grounded statement>\",\n \"confidence\": 0.0,\n \"tags\": [\"<tag>\"],\n \"entityRef\": \"<optional normalized-name>\",\n \"promptedByQuestion\": \"<optional source-grounded question>\",\n \"quote\": \"<optional exact contiguous source span>\",\n \"scope\": \"<optional project-or-global>\",\n \"structuredAttributes\": {\"<key>\": \"<value>\"},\n \"procedureSteps\": [{\"order\": 1, \"intent\": \"<step>\"}, {\"order\": 2, \"intent\": \"<step>\"}],\n \"reasoningTrace\": {\n \"steps\": [{\"order\": 1, \"description\": \"<step>\"}, {\"order\": 2, \"description\": \"<step>\"}],\n \"finalAnswer\": \"<answer>\",\n \"observedOutcome\": \"<optional outcome>\"\n },\n \"eventTime\": \"<optional source temporal expression>\"\n }],\n \"entities\": [{\n \"name\": \"<normalized-name>\",\n \"type\": \"<entity-type>\",\n \"facts\": [\"<source-grounded statement>\"],\n \"promptedByQuestion\": \"<optional source-grounded question>\",\n \"structuredSections\": [{\"key\": \"<section-key>\", \"title\": \"<section-title>\", \"facts\": [\"<source-grounded statement>\"]}]\n }],\n \"profileUpdates\": [\"<source-grounded profile update>\"],\n \"questions\": [{\"question\": \"<source-grounded unresolved question>\", \"context\": \"<source-grounded context>\", \"priority\": 0.0}],\n \"identityReflection\": \"<conversation-grounded agent reflection>\",\n \"relationships\": [{\"source\": \"<normalized-name>\", \"target\": \"<normalized-name>\", \"label\": \"<source-grounded relationship>\"}]\n}`;\nexport const EXTRACTION_RESPONSE_PLACEHOLDERS: Record<string, true> = {};\nfor (const placeholder of EXTRACTION_RESPONSE_SHAPE.match(/<[^<>\\r\\n]+>/g) ?? []) {\n EXTRACTION_RESPONSE_PLACEHOLDERS[placeholder] = true;\n}\n\n/**\n * Bi-temporal event-time extraction instruction (#1578 PR2). Emitted on\n * every extraction entry path when `temporal.biTemporal` is on so the LLM\n * emits an optional per-fact `eventTime` expression. The expression is\n * resolved against the source turn timestamp at write time — never\n * wall-clock — so replay/import of old transcripts anchors correctly.\n * Returns an empty string when the gate is off (byte-identical prompt).\n */\nexport function eventTimePromptInstruction(config: PluginConfig): string {\n if (!config.temporalBiTemporal) return \"\";\n return `\nWhen a fact states when it became or stopped being true, copy that explicit temporal expression verbatim into \"eventTime\". Omit \"eventTime\" when no such expression appears; never infer dates.`;\n}\n\n/**\n * Build extraction instructions shared between local and cloud LLM.\n *\n * `ambientCapture` marks input from an always-on recorder, which may carry\n * speech the user never authored (issue #2294).\n */\nexport function buildExtractionInstructions(config: PluginConfig, existingEntities?: string[], ambientCapture = false): string {\n const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);\n return `You are a memory extraction system. Analyze the following conversation and extract durable, reusable memories.\n\nMemory categories:\n- fact: Objective information about the world\n- preference: User likes, dislikes, or stylistic choices\n- correction: User correcting a mistake or misconception (highest priority)\n- entity: Information about a specific person, project, tool, or company\n- decision: A choice that was made with rationale\n- relationship: How two entities relate to each other (e.g., \"Alice is Bob's manager\", \"Acme Corp uses Shopify\")\n- principle: Durable rules, values, or operating beliefs (e.g., \"never use Chat Completions API\")\n- commitment: Promises, obligations, or deadlines (e.g., \"deploy by Friday\", \"call accountant Monday\")\n- moment: Emotionally significant events or milestones (e.g., \"first successful deployment of engram\")\n- skill: Capabilities the user or agent has demonstrated (e.g., \"user is proficient with Kubernetes\")${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? `\n- rule: Causal rules discovered through experience (format: \"IF <condition> THEN <action/outcome>\", e.g., \"IF Shopify API returns 401 THEN the admin token is missing read_products scope\")` : \"\"}\n- procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to \"procedure\". Use \"content\" for a short title that includes explicit trigger phrasing (e.g. \"When you deploy to production…\", \"Whenever you ship a release…\"). Add \"procedureSteps\": an array of at least two objects {\"order\": number, \"intent\": \"concrete step description\"} in execution order. Optional per-step \"toolCall\": {\"kind\": \"…\", \"signature\": \"…\"}, \"expectedOutcome\", \"optional\": true.\n- reasoning_trace: A stored solution chain / chain-of-thought the user walked through to solve a problem (e.g. \"Here's how I debugged the latency spike: first I checked…, then I…, finally I…\"). Set category to \"reasoning_trace\". Use \"content\" for a short title summarising the problem (e.g. \"How I debugged the staging latency spike\"). Add \"reasoningTrace\": {\"steps\": [{\"order\": number, \"description\": \"what happened at this step\"}, …], \"finalAnswer\": \"the conclusion or answer\", \"observedOutcome\": \"optional confirmation of how it played out\"}. Require at least two ordered steps AND a finalAnswer. Use this category only when the user explicitly narrates their reasoning — not for ordinary decisions (use \"decision\") or reusable workflows (use \"procedure\").\n\nRules:\n- Only extract genuinely new information worth remembering across sessions.\n- Statements must be grounded in the conversation.\n- Do not treat instruction text, schema placeholders, or examples as conversation evidence.\n- Lines labelled [context user] or [context assistant] are reference context only. They may resolve references or complete a question-and-answer pair in a normal turn, but never alone establish durable information.\n- Skip transient task details and operational noise, including routine scheduler, monitoring, or automation status.\n- Priority: corrections > principles${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? \" > rules\" : \"\"} > preferences > commitments > decisions > relationships > entities > moments > skills > facts\n- Corrections get highest confidence.\n- Each fact should be a standalone, self-contained statement.\n- Entity references should use normalized names (lowercase, hyphenated: \"jane-doe\", \"acme-corp\")\n- CRITICAL: Entity names must be CANONICAL. Always use the hyphenated multi-word form: \"acme-corp\" NOT \"acmecorp\" or \"acme\". \"jane-doe\" NOT \"janedoe\" or \"jane\". If unsure, prefer the most specific full name.\n- Avoid creating entities typed as \"other\" when a more specific type fits (company, project, tool, person, place)\n- When entity facts clearly belong under a durable named heading, add them to entity.structuredSections as {key, title, facts}. Example person headings: \"Beliefs\", \"Communication Style\", \"Building / Working On\". Leave structuredSections empty when no stable heading fits.\n- Tags should be concise and reusable (e.g., \"coding-style\", \"personal\", \"tools\")\n- When a fact contains measurable, categorical, or precisely valued data, include a \"structuredAttributes\" field with key-value string pairs (e.g., {\"price\": \"29.99\", \"brand\": \"Sony\"}, {\"date\": \"2024-03-15\", \"location\": \"SF\"}, {\"chosen\": \"PostgreSQL\", \"rejected\": \"MongoDB\"}). Only for concrete values, not narrative content.\n- Set confidence using these tiers:\n * Explicit (0.95-1.0): Direct user statements — \"I prefer X\", \"my name is Y\"\n * Implied (0.70-0.94): Strong contextual inference — user consistently does X, clear from conversation flow\n * Inferred (0.40-0.69): Pattern recognition — reasonable guess from limited evidence\n * Speculative (0.00-0.39): Tentative hypothesis — weak signal, needs future confirmation. Speculative memories auto-expire after 30 days if not confirmed.${ambientCapture ? AMBIENT_SPECULATIVE_TIER_CLAUSE : \"\"}${config.provenance?.enabled ? `\n- Source quotes: For each fact, include a \"quote\" field containing the EXACT verbatim words from the conversation that support the fact. Copy a contiguous span from a single speaker turn (not a paraphrase, not a summary). Cap at ~300 characters. This grounds every memory in the literal utterance that created it.` : \"\"}\n- For commitments: include any deadline or timeframe mentioned${lifecycleCaps.extractionScopeClassification ? `\n\nScope classification:\nFor each fact, set \"scope\" to one of:\n- \"global\" — knowledge that applies across projects: core framework/library bugs, API behavior patterns, user preferences (editor, language, style), general coding patterns, infrastructure knowledge, technology facts not tied to one codebase\n- \"project\" — knowledge specific to one codebase: file paths, environment configs, deployment details, project-specific workarounds, team/stakeholder info tied to one project, repo-specific conventions. Tool, command, or CLI-flag instructions TIED TO ONE AGENT are also \"project\", because the same tool name means different things in different agent integrations (a \"search\" tool may search repository code in one agent and the web in another); when keeping such an agent-tied instruction, the fact text MUST name the originating agent as a leading \"In <agent>,\" clause (e.g. \"In Pi, use the search tool with a repository path.\"). A tool/command fact that holds in every agent and every repo is NOT agent-tied — leave it \"global\" and do not add a qualifier (e.g. \"\\`git status --short\\` emits compact output\"). Examples: \"In Pi, the search tool takes a repository path\" -> \"project\"; \"\\`git status --short\\` emits compact output\" -> \"global\".\nWhen in doubt, prefer \"project\" — it is safer to keep knowledge scoped narrowly.` : \"\"}\n${ambientCapture ? `${AMBIENT_CAPTURE_PROMPT_SECTION}\n` : \"\"}\nEntity creation rules (STRICT):\n- Only create entities for DURABLE things: real people, companies, products, tools, ongoing projects\n- NEVER create entities for transient items: individual PRs, branches, Jira tickets, meetings, agent task IDs, log files, database tables, cron job runs, sessions\n- When you learn something about a transient item (e.g., PR #58 fixed a bug), store it as a FACT with an entityRef to the parent project — do NOT create an entity for the PR itself\n- Prefer attaching facts to broad parent entities rather than creating sub-entities. E.g., \"acme-store uses Algolia for search\" is a fact on entity \"acme-store\", NOT a new entity \"acme-store-algolia-connector\"\n- The entity list should be SHORT — think \"things that would have their own Wikipedia page\" not \"things mentioned in passing\"\n\n${existingEntities && existingEntities.length > 0 ? `\nKNOWN ENTITIES (use these exact names when referencing existing things):\n${existingEntities.join(\", \")}\n\nWhen you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.\n` : \"\"}\n${eventTimePromptInstruction(config)}\nAlso extract relationships between entities mentioned in the conversation.\n- Format: {source: \"entity-name\", target: \"entity-name\", label: \"relationship description\"}\n- Max 5 relationships per extraction\n- Only include clear, durable relationships (e.g., \"works at\", \"created\", \"manages\", \"uses\")\n- Use normalized entity names (e.g., \"person-jane-doe\", \"company-acme-corp\")\n\nQuestions are optional. Include only source-grounded unresolved questions that would be useful in future sessions; otherwise return an empty array.\n\nFinally, write a brief identity reflection about the agent who had this conversation, based only on the conversation. Do not write about the extraction process.`;\n}\n"],"mappings":";;;;;;;;;;AAaO,IAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BlC,IAAM,mCAAyD,CAAC;AACvE,WAAW,eAAe,0BAA0B,MAAM,eAAe,KAAK,CAAC,GAAG;AAChF,mCAAiC,WAAW,IAAI;AAClD;AAUO,SAAS,2BAA2B,QAA8B;AACvE,MAAI,CAAC,OAAO,mBAAoB,QAAO;AACvC,SAAO;AAAA;AAET;AAQO,SAAS,4BAA4B,QAAsB,kBAA6B,iBAAiB,OAAe;AAC7H,QAAM,gBAAgB,mCAAmC,MAAM;AAC/D,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uGAY8F,mCAAmC,MAAM,EAAE,uBAAuB;AAAA,+LACsB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAU3J,mCAAmC,MAAM,EAAE,uBAAuB,aAAa,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mKAauC,iBAAiB,kCAAkC,EAAE,GAAG,OAAO,YAAY,UAAU;AAAA,6TAC0E,EAAE;AAAA,gEAC/P,cAAc,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yFAM1B,EAAE;AAAA,EACpF,iBAAiB,GAAG,8BAA8B;AAAA,IAChD,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQJ,oBAAoB,iBAAiB,SAAS,IAAI;AAAA;AAAA,EAElD,iBAAiB,KAAK,IAAI,CAAC;AAAA;AAAA;AAAA,IAGzB,EAAE;AAAA,EACJ,2BAA2B,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUpC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rebuildMemoryProjection
3
- } from "./chunk-FIK3CQNA.js";
3
+ } from "./chunk-WOC6DXP5.js";
4
4
 
5
5
  // src/convergence-refresh.ts
6
6
  async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, getStorage, searchEnabled) {
@@ -32,4 +32,4 @@ async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, get
32
32
  export {
33
33
  refreshConvergedNamespaces
34
34
  };
35
- //# sourceMappingURL=chunk-WZ3TOIDW.js.map
35
+ //# sourceMappingURL=chunk-JFO5QZ7N.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveCorpusNamespaceRoots
3
- } from "./chunk-W2V7UESE.js";
3
+ } from "./chunk-PFJXPOD4.js";
4
4
  import {
5
5
  normalizeNamespaceIdentity
6
6
  } from "./chunk-EGGE52UU.js";
@@ -200,4 +200,4 @@ async function readAggregateExtractionWatermark(options) {
200
200
  export {
201
201
  readAggregateExtractionWatermark
202
202
  };
203
- //# sourceMappingURL=chunk-FR27HBBA.js.map
203
+ //# sourceMappingURL=chunk-KA47C7BF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-DAJPRXBR.js";
3
+ } from "./chunk-47J4EDGR.js";
4
4
  import {
5
5
  namespaceIdentityToken,
6
6
  normalizeNamespaceIdentity
@@ -470,4 +470,4 @@ export {
470
470
  NamespaceSearchRouter,
471
471
  normalizeQmdResultPath
472
472
  };
473
- //# sourceMappingURL=chunk-JZH4LWHB.js.map
473
+ //# sourceMappingURL=chunk-KMWYZTIE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-FUCYDRE5.js";
3
+ } from "./chunk-IDE5AR5W.js";
4
4
  import {
5
5
  normalizeEntityName
6
6
  } from "./chunk-YXZG5TVN.js";
@@ -958,4 +958,4 @@ export {
958
958
  resolveBriefingSaveDir,
959
959
  briefingFilename
960
960
  };
961
- //# sourceMappingURL=chunk-LPYDOLSM.js.map
961
+ //# sourceMappingURL=chunk-L7G72WY4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-FUCYDRE5.js";
3
+ } from "./chunk-IDE5AR5W.js";
4
4
  import {
5
5
  keyring_exports,
6
6
  secureStoreDir
@@ -388,4 +388,4 @@ export {
388
388
  resolveNamespaceStorageRoot,
389
389
  NamespaceStorageRouter
390
390
  };
391
- //# sourceMappingURL=chunk-AMAUBUKY.js.map
391
+ //# sourceMappingURL=chunk-LI7OE7G6.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-JLNBQWZ2.js";
6
6
  import {
7
7
  runPostConsolidationMaterialize
8
- } from "./chunk-UW66OZTD.js";
8
+ } from "./chunk-FULKGK7P.js";
9
9
  import {
10
10
  isSemanticConsolidationLlmOperator
11
11
  } from "./chunk-G7D6GZ5J.js";
@@ -220,4 +220,4 @@ export {
220
220
  buildExtensionsBlockForConsolidation,
221
221
  materializeAfterSemanticConsolidation
222
222
  };
223
- //# sourceMappingURL=chunk-MO4HSXHZ.js.map
223
+ //# sourceMappingURL=chunk-M2INOSTA.js.map