hippo-memory 2.2.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2600) hide show
  1. package/README.md +11 -15
  2. package/dist/api/agent-memories.d.ts +21 -0
  3. package/dist/api/agent-memories.js +97 -0
  4. package/dist/api/assemble.d.ts +16 -15
  5. package/dist/api/assemble.js +90 -62
  6. package/dist/api/auth/audit.d.ts +31 -24
  7. package/dist/api/auth/audit.js +49 -27
  8. package/dist/api/auth/auth.d.ts +33 -29
  9. package/dist/api/auth/auth.js +88 -42
  10. package/dist/api/auth/quarantine.d.ts +8 -6
  11. package/dist/api/auth/quarantine.js +14 -9
  12. package/dist/api/auth/session-owners.d.ts +5 -9
  13. package/dist/api/auth/session-owners.js +9 -24
  14. package/dist/api/availability.d.ts +11 -10
  15. package/dist/api/availability.js +24 -24
  16. package/dist/api/callers.d.ts +34 -0
  17. package/dist/api/callers.js +20 -0
  18. package/dist/api/context/context-auto.d.ts +5 -0
  19. package/dist/api/context/context-auto.js +35 -0
  20. package/dist/api/context/context-plan.d.ts +59 -0
  21. package/dist/api/context/context-plan.js +165 -0
  22. package/dist/api/context/context-pools.d.ts +29 -0
  23. package/dist/api/context/context-pools.js +138 -0
  24. package/dist/api/context/context-project.d.ts +15 -0
  25. package/dist/api/context/context-project.js +17 -0
  26. package/dist/api/context/context-render.d.ts +66 -0
  27. package/dist/api/context/context-render.js +285 -0
  28. package/dist/api/context/context-search.d.ts +14 -0
  29. package/dist/api/context/context-search.js +144 -0
  30. package/dist/api/context/context-select.d.ts +21 -0
  31. package/dist/api/context/context-select.js +194 -0
  32. package/dist/api/context/context-task-state.d.ts +23 -0
  33. package/dist/api/context/context-task-state.js +107 -0
  34. package/dist/api/context/context-types.d.ts +116 -0
  35. package/dist/api/context/context-types.js +3 -0
  36. package/dist/api/context/context.d.ts +14 -0
  37. package/dist/api/context/context.js +196 -0
  38. package/dist/api/continuity/continuity-json.d.ts +36 -0
  39. package/dist/api/continuity/continuity-json.js +35 -0
  40. package/dist/api/continuity/continuity.d.ts +15 -0
  41. package/dist/api/continuity/continuity.js +15 -0
  42. package/dist/api/correction-latency.d.ts +5 -5
  43. package/dist/api/correction-latency.js +9 -31
  44. package/dist/api/cursor.d.ts +10 -0
  45. package/dist/api/cursor.js +46 -0
  46. package/dist/api/dashboard/detail.d.ts +29 -0
  47. package/dist/api/dashboard/detail.js +97 -0
  48. package/dist/api/dashboard/live.d.ts +22 -0
  49. package/dist/api/dashboard/live.js +33 -0
  50. package/dist/api/dashboard/overview.d.ts +8 -0
  51. package/dist/api/dashboard/overview.js +180 -0
  52. package/dist/api/dashboard/queries.d.ts +34 -0
  53. package/dist/api/dashboard/queries.js +89 -0
  54. package/dist/api/dashboard/snapshot-clock.d.ts +20 -0
  55. package/dist/api/dashboard/snapshot-clock.js +38 -0
  56. package/dist/api/dashboard/types.d.ts +166 -0
  57. package/dist/api/dashboard/types.js +3 -0
  58. package/dist/api/delivery/delivery-event.d.ts +24 -0
  59. package/dist/api/delivery/delivery-event.js +173 -0
  60. package/dist/api/delivery/delivery-observation.d.ts +56 -0
  61. package/dist/api/delivery/delivery-observation.js +153 -0
  62. package/dist/api/delivery/delivery-recorder.d.ts +105 -0
  63. package/dist/api/delivery/delivery-recorder.js +58 -0
  64. package/dist/api/embeddings.d.ts +15 -13
  65. package/dist/api/embeddings.js +22 -16
  66. package/dist/api/error-reply.d.ts +2 -2
  67. package/dist/api/error-reply.js +15 -13
  68. package/dist/api/index.d.ts +38 -33
  69. package/dist/api/index.js +22 -17
  70. package/dist/api/infra.d.ts +11 -0
  71. package/dist/api/infra.js +21 -0
  72. package/dist/api/instruction-detect.d.ts +12 -2
  73. package/dist/api/instruction-detect.js +36 -17
  74. package/dist/api/ledger-db.d.ts +53 -20
  75. package/dist/api/ledger-db.js +87 -31
  76. package/dist/api/memories/conflicts.d.ts +34 -16
  77. package/dist/api/memories/conflicts.js +103 -52
  78. package/dist/api/memories/forget.d.ts +29 -17
  79. package/dist/api/memories/forget.js +49 -25
  80. package/dist/api/memories/memories.d.ts +15 -17
  81. package/dist/api/memories/memories.js +26 -23
  82. package/dist/api/memories/outcome.d.ts +11 -13
  83. package/dist/api/memories/outcome.js +13 -21
  84. package/dist/api/memories/pin.d.ts +6 -0
  85. package/dist/api/memories/pin.js +14 -0
  86. package/dist/api/memories/promote.d.ts +18 -20
  87. package/dist/api/memories/promote.js +87 -42
  88. package/dist/api/memories/refine.d.ts +5 -5
  89. package/dist/api/memories/refine.js +8 -4
  90. package/dist/api/memories/remember-local.d.ts +26 -19
  91. package/dist/api/memories/remember-local.js +55 -60
  92. package/dist/api/memories/remember.d.ts +52 -26
  93. package/dist/api/memories/remember.js +124 -44
  94. package/dist/api/memories/session-digest.d.ts +45 -0
  95. package/dist/api/memories/session-digest.js +96 -0
  96. package/dist/api/memories/trace.d.ts +29 -0
  97. package/dist/api/memories/trace.js +53 -0
  98. package/dist/api/objects/drill-down.d.ts +16 -11
  99. package/dist/api/objects/drill-down.js +35 -29
  100. package/dist/api/objects/goals.d.ts +10 -7
  101. package/dist/api/objects/goals.js +4 -3
  102. package/dist/api/objects/graph.d.ts +20 -7
  103. package/dist/api/objects/graph.js +25 -7
  104. package/dist/api/objects/object-kinds.d.ts +44 -0
  105. package/dist/api/objects/object-kinds.js +77 -0
  106. package/dist/api/objects/objects.d.ts +50 -8
  107. package/dist/api/objects/objects.js +65 -8
  108. package/dist/api/objects/predictions.d.ts +11 -9
  109. package/dist/api/objects/predictions.js +20 -15
  110. package/dist/api/objects/projects.d.ts +20 -15
  111. package/dist/api/objects/projects.js +28 -20
  112. package/dist/api/pages.d.ts +9 -0
  113. package/dist/api/pages.js +23 -0
  114. package/dist/api/pilot-arm.d.ts +5 -5
  115. package/dist/api/pilot-arm.js +7 -11
  116. package/dist/api/prompt-hook.d.ts +46 -56
  117. package/dist/api/prompt-hook.js +150 -151
  118. package/dist/api/provenance-coverage.d.ts +5 -5
  119. package/dist/api/provenance-coverage.js +11 -12
  120. package/dist/api/recall/anchoring.d.ts +63 -0
  121. package/dist/api/recall/anchoring.js +112 -0
  122. package/dist/api/recall/bands.d.ts +21 -0
  123. package/dist/api/recall/bands.js +180 -0
  124. package/dist/api/recall/compose.d.ts +62 -0
  125. package/dist/api/recall/compose.js +198 -0
  126. package/dist/api/recall/finish.d.ts +51 -130
  127. package/dist/api/recall/finish.js +76 -248
  128. package/dist/api/recall/last-recalled.d.ts +13 -0
  129. package/dist/api/recall/last-recalled.js +26 -0
  130. package/dist/api/recall/nearest.d.ts +7 -0
  131. package/dist/api/recall/nearest.js +27 -0
  132. package/dist/api/recall/pipeline.d.ts +95 -49
  133. package/dist/api/recall/pipeline.js +50 -382
  134. package/dist/api/recall/profiles.d.ts +31 -0
  135. package/dist/api/recall/profiles.js +32 -0
  136. package/dist/api/recall/rank-search.d.ts +24 -0
  137. package/dist/api/recall/rank-search.js +188 -0
  138. package/dist/api/recall/rank-stages.d.ts +16 -0
  139. package/dist/api/recall/rank-stages.js +228 -0
  140. package/dist/api/recall/recall.d.ts +9 -5
  141. package/dist/api/recall/recall.js +175 -463
  142. package/dist/api/recall/request.d.ts +25 -14
  143. package/dist/api/recall/request.js +94 -66
  144. package/dist/api/recall/rows.d.ts +58 -32
  145. package/dist/api/recall/rows.js +64 -42
  146. package/dist/api/recall/session-rings.d.ts +59 -0
  147. package/dist/api/recall/session-rings.js +87 -0
  148. package/dist/api/recall/types.d.ts +154 -114
  149. package/dist/api/session-end.d.ts +58 -28
  150. package/dist/api/session-end.js +178 -66
  151. package/dist/api/sharing.d.ts +31 -0
  152. package/dist/api/sharing.js +47 -0
  153. package/dist/api/sleep/auto-sleep.d.ts +17 -10
  154. package/dist/api/sleep/auto-sleep.js +55 -21
  155. package/dist/api/sleep/churn.d.ts +20 -0
  156. package/dist/api/sleep/churn.js +44 -0
  157. package/dist/api/sleep/dedup.d.ts +9 -0
  158. package/dist/api/sleep/dedup.js +11 -0
  159. package/dist/api/sleep/dormant.d.ts +17 -19
  160. package/dist/api/sleep/dormant.js +21 -39
  161. package/dist/api/sleep/events.d.ts +15 -0
  162. package/dist/api/sleep/events.js +2 -0
  163. package/dist/api/sleep/learn.d.ts +16 -9
  164. package/dist/api/sleep/learn.js +121 -54
  165. package/dist/api/sleep/sleep-run.d.ts +18 -23
  166. package/dist/api/sleep/sleep-run.js +183 -126
  167. package/dist/api/sleep/sleep.d.ts +25 -23
  168. package/dist/api/sleep/sleep.js +4 -5
  169. package/dist/api/status.d.ts +21 -15
  170. package/dist/api/status.js +57 -22
  171. package/dist/api/store-init.d.ts +4 -6
  172. package/dist/api/store-init.js +4 -7
  173. package/dist/api/summary-parents.d.ts +6 -0
  174. package/dist/api/summary-parents.js +12 -0
  175. package/dist/api/tokens.d.ts +13 -9
  176. package/dist/api/tokens.js +18 -14
  177. package/dist/api/types.d.ts +91 -31
  178. package/dist/api/types.js +42 -14
  179. package/dist/base/config/config-keys.d.ts +6 -0
  180. package/dist/base/config/config-keys.js +140 -0
  181. package/dist/base/config/config-rules.d.ts +29 -0
  182. package/dist/base/config/config-rules.js +81 -0
  183. package/dist/base/config/config.d.ts +202 -0
  184. package/dist/base/config/config.js +104 -0
  185. package/dist/base/config/configured-folder.d.ts +10 -0
  186. package/dist/base/config/configured-folder.js +2 -0
  187. package/dist/base/config/package-root.d.ts +6 -0
  188. package/dist/base/config/package-root.js +8 -0
  189. package/dist/base/embeddings/index-identity.d.ts +23 -0
  190. package/dist/base/embeddings/index-identity.js +33 -0
  191. package/dist/base/embeddings/local.d.ts +14 -0
  192. package/dist/base/embeddings/local.js +55 -0
  193. package/dist/base/errors/api-errors.d.ts +59 -0
  194. package/dist/base/errors/api-errors.js +77 -0
  195. package/dist/base/errors/failed-unit.d.ts +9 -0
  196. package/dist/base/errors/failed-unit.js +13 -0
  197. package/dist/base/errors/http-errors.d.ts +24 -0
  198. package/dist/base/errors/http-errors.js +32 -0
  199. package/dist/base/errors/raw-append-only.d.ts +13 -0
  200. package/dist/base/errors/raw-append-only.js +20 -0
  201. package/dist/base/errors/store-open.d.ts +7 -0
  202. package/dist/base/errors/store-open.js +11 -0
  203. package/dist/base/memory/agent-memory-report.d.ts +57 -0
  204. package/dist/base/memory/agent-memory-report.js +136 -0
  205. package/dist/base/memory/agent-memory-tools.d.ts +44 -0
  206. package/dist/base/memory/agent-memory-tools.js +37 -0
  207. package/dist/base/memory/ambient.d.ts +56 -0
  208. package/dist/base/memory/ambient.js +215 -0
  209. package/dist/base/memory/conflict-wire.d.ts +26 -0
  210. package/dist/base/memory/conflict-wire.js +17 -0
  211. package/dist/base/memory/created-stamp.d.ts +7 -0
  212. package/dist/base/memory/created-stamp.js +19 -0
  213. package/dist/base/memory/dedup-pairs.d.ts +12 -0
  214. package/dist/base/memory/dedup-pairs.js +12 -0
  215. package/dist/base/memory/dormant-revival.d.ts +15 -0
  216. package/dist/base/memory/dormant-revival.js +19 -0
  217. package/dist/base/memory/entry.d.ts +148 -0
  218. package/dist/base/memory/entry.js +243 -0
  219. package/dist/base/memory/eval-switches.d.ts +22 -0
  220. package/dist/base/memory/eval-switches.js +18 -0
  221. package/dist/base/memory/half-life-plan.d.ts +68 -0
  222. package/dist/base/memory/half-life-plan.js +110 -0
  223. package/dist/base/memory/keep-rules.d.ts +19 -0
  224. package/dist/base/memory/keep-rules.js +36 -0
  225. package/dist/base/memory/markdown.d.ts +9 -0
  226. package/dist/base/memory/markdown.js +144 -0
  227. package/dist/base/memory/memory-audit.d.ts +49 -0
  228. package/dist/base/memory/memory-audit.js +142 -0
  229. package/dist/base/memory/memory-facts.d.ts +46 -0
  230. package/dist/base/memory/memory-facts.js +95 -0
  231. package/dist/base/memory/memory-quality.d.ts +50 -0
  232. package/dist/base/memory/memory-quality.js +275 -0
  233. package/dist/base/memory/memory-wire.d.ts +55 -0
  234. package/dist/base/memory/memory-wire.js +93 -0
  235. package/dist/base/memory/merged-row.d.ts +12 -0
  236. package/dist/base/memory/merged-row.js +46 -0
  237. package/dist/base/memory/salience.d.ts +20 -0
  238. package/dist/base/memory/salience.js +109 -0
  239. package/dist/base/memory/strength-bands.d.ts +5 -0
  240. package/dist/base/memory/strength-bands.js +7 -0
  241. package/dist/base/memory/strength.d.ts +82 -0
  242. package/dist/base/memory/strength.js +138 -0
  243. package/dist/base/ports/cross-encoder.d.ts +7 -0
  244. package/dist/base/ports/cross-encoder.js +4 -0
  245. package/dist/base/ports/embedder.d.ts +37 -0
  246. package/dist/base/ports/embedder.js +2 -0
  247. package/dist/base/ports/git.d.ts +30 -0
  248. package/dist/base/ports/git.js +20 -0
  249. package/dist/base/ports/http.d.ts +17 -0
  250. package/dist/base/ports/http.js +3 -0
  251. package/dist/base/ports/infra.d.ts +42 -0
  252. package/dist/base/ports/infra.js +2 -0
  253. package/dist/base/ports/llm.d.ts +44 -0
  254. package/dist/base/ports/llm.js +55 -0
  255. package/dist/base/ports/reranker.d.ts +52 -0
  256. package/dist/base/ports/reranker.js +2 -0
  257. package/dist/base/ports/store/agent-import.d.ts +107 -0
  258. package/dist/base/ports/store/agent-import.js +5 -0
  259. package/dist/base/ports/store/audit.d.ts +89 -0
  260. package/dist/base/ports/store/audit.js +17 -0
  261. package/dist/base/ports/store/capture.d.ts +203 -0
  262. package/dist/base/ports/store/capture.js +23 -0
  263. package/dist/base/ports/store/cards.d.ts +69 -0
  264. package/dist/base/ports/store/cards.js +14 -0
  265. package/dist/base/ports/store/conflicts.d.ts +79 -0
  266. package/dist/base/ports/store/conflicts.js +7 -0
  267. package/dist/base/ports/store/connectors.d.ts +250 -0
  268. package/dist/base/ports/store/connectors.js +22 -0
  269. package/dist/base/ports/store/consolidation.d.ts +246 -0
  270. package/dist/base/ports/store/consolidation.js +19 -0
  271. package/dist/base/ports/store/context-reads.d.ts +172 -0
  272. package/dist/base/ports/store/context-reads.js +15 -0
  273. package/dist/base/ports/store/dashboard-reads.d.ts +152 -0
  274. package/dist/base/ports/store/dashboard-reads.js +6 -0
  275. package/dist/base/ports/store/diagnostics.d.ts +77 -0
  276. package/dist/base/ports/store/diagnostics.js +10 -0
  277. package/dist/base/ports/store/dormant.d.ts +65 -0
  278. package/dist/base/ports/store/dormant.js +18 -0
  279. package/dist/base/ports/store/effects.d.ts +7 -0
  280. package/dist/base/ports/store/effects.js +3 -0
  281. package/dist/base/ports/store/entry-writes.d.ts +97 -0
  282. package/dist/base/ports/store/entry-writes.js +17 -0
  283. package/dist/base/ports/store/folder-files.d.ts +29 -0
  284. package/dist/base/ports/store/folder-files.js +6 -0
  285. package/dist/base/ports/store/goals.d.ts +44 -0
  286. package/dist/base/ports/store/goals.js +11 -0
  287. package/dist/base/ports/store/graph.d.ts +160 -0
  288. package/dist/base/ports/store/graph.js +13 -0
  289. package/dist/base/ports/store/keys.d.ts +120 -0
  290. package/dist/base/ports/store/keys.js +6 -0
  291. package/dist/base/ports/store/learning.d.ts +26 -0
  292. package/dist/base/ports/store/learning.js +8 -0
  293. package/dist/base/ports/store/ledger.d.ts +100 -0
  294. package/dist/base/ports/store/ledger.js +8 -0
  295. package/dist/base/ports/store/objects.d.ts +217 -0
  296. package/dist/base/ports/store/objects.js +10 -0
  297. package/dist/base/ports/store/project-tags.d.ts +118 -0
  298. package/dist/base/ports/store/project-tags.js +11 -0
  299. package/dist/base/ports/store/quarantine.d.ts +75 -0
  300. package/dist/base/ports/store/quarantine.js +8 -0
  301. package/dist/base/ports/store/reach.d.ts +20 -0
  302. package/dist/base/ports/store/reach.js +2 -0
  303. package/dist/base/ports/store/recall-writes.d.ts +93 -0
  304. package/dist/base/ports/store/recall-writes.js +6 -0
  305. package/dist/base/ports/store/rejections.d.ts +134 -0
  306. package/dist/base/ports/store/rejections.js +14 -0
  307. package/dist/base/ports/store/reports.d.ts +139 -0
  308. package/dist/base/ports/store/reports.js +13 -0
  309. package/dist/base/ports/store/sessions.d.ts +203 -0
  310. package/dist/base/ports/store/sessions.js +9 -0
  311. package/dist/base/ports/store/sharing.d.ts +88 -0
  312. package/dist/base/ports/store/sharing.js +15 -0
  313. package/dist/base/ports/store/store-effects.d.ts +272 -0
  314. package/dist/base/ports/store/store-effects.js +87 -0
  315. package/dist/base/ports/store/types.d.ts +142 -0
  316. package/dist/base/ports/store/types.js +10 -0
  317. package/dist/base/ports/store/vectors.d.ts +240 -0
  318. package/dist/base/ports/store/vectors.js +20 -0
  319. package/dist/base/ports/store-groups.d.ts +30 -0
  320. package/dist/base/ports/store-groups.js +2 -0
  321. package/dist/base/ports/store-index.d.ts +11 -0
  322. package/dist/base/ports/store-index.js +2 -0
  323. package/dist/base/ports/store.d.ts +214 -0
  324. package/dist/base/ports/store.js +71 -0
  325. package/dist/base/rank/active-scope.d.ts +4 -0
  326. package/dist/base/rank/active-scope.js +14 -0
  327. package/dist/base/rank/compare.d.ts +47 -0
  328. package/dist/base/rank/compare.js +85 -0
  329. package/dist/base/rank/cosine.d.ts +12 -0
  330. package/dist/base/rank/cosine.js +60 -0
  331. package/dist/base/rank/particle-refresh.d.ts +9 -0
  332. package/dist/base/rank/particle-refresh.js +22 -0
  333. package/dist/base/rank/physics-config.d.ts +37 -0
  334. package/dist/base/rank/physics-config.js +29 -0
  335. package/dist/base/rank/physics.d.ts +110 -0
  336. package/dist/base/rank/physics.js +319 -0
  337. package/dist/base/rank/prompt-recall.d.ts +36 -0
  338. package/dist/base/rank/prompt-recall.js +72 -0
  339. package/dist/base/rank/recall-defaults.d.ts +7 -0
  340. package/dist/base/rank/recall-defaults.js +9 -0
  341. package/dist/base/rank/search-types.d.ts +125 -0
  342. package/dist/base/rank/search-types.js +28 -0
  343. package/dist/base/records/audit-ops.d.ts +3 -0
  344. package/dist/base/records/audit-ops.js +72 -0
  345. package/dist/base/records/audit-report.d.ts +15 -0
  346. package/dist/base/records/audit-report.js +31 -0
  347. package/dist/base/records/card.d.ts +51 -0
  348. package/dist/base/records/card.js +37 -0
  349. package/dist/base/records/entity-name.d.ts +2 -0
  350. package/dist/base/records/entity-name.js +4 -0
  351. package/dist/base/records/failure-log-retention.d.ts +4 -0
  352. package/dist/base/records/failure-log-retention.js +4 -0
  353. package/dist/base/records/failure-repeats.d.ts +17 -0
  354. package/dist/base/records/failure-repeats.js +22 -0
  355. package/dist/base/records/object-types.d.ts +208 -0
  356. package/dist/base/records/object-types.js +7 -0
  357. package/dist/base/records/planning-fallacy.d.ts +33 -0
  358. package/dist/base/records/planning-fallacy.js +3 -0
  359. package/dist/base/records/prediction.d.ts +10 -0
  360. package/dist/base/records/prediction.js +22 -0
  361. package/dist/base/records/rejection-digest.d.ts +7 -0
  362. package/dist/base/records/rejection-digest.js +14 -0
  363. package/dist/base/records/rejection-text.d.ts +16 -0
  364. package/dist/base/records/rejection-text.js +27 -0
  365. package/dist/base/scope/actor.d.ts +2 -0
  366. package/dist/base/scope/actor.js +3 -0
  367. package/dist/base/scope/api-key.d.ts +58 -0
  368. package/dist/base/scope/api-key.js +122 -0
  369. package/dist/base/scope/project-identity.d.ts +44 -0
  370. package/dist/base/scope/project-identity.js +52 -0
  371. package/dist/base/scope/read-admission.d.ts +43 -0
  372. package/dist/base/scope/read-admission.js +52 -0
  373. package/dist/base/scope/recall-scope.d.ts +136 -0
  374. package/dist/base/scope/recall-scope.js +213 -0
  375. package/dist/base/scope/tenant-id.d.ts +6 -0
  376. package/dist/base/scope/tenant-id.js +14 -0
  377. package/dist/base/session/capture-contract.d.ts +82 -0
  378. package/dist/base/session/capture-contract.js +174 -0
  379. package/dist/base/session/compaction-timing.js +10 -0
  380. package/dist/base/session/delivery.d.ts +68 -0
  381. package/dist/base/session/delivery.js +8 -0
  382. package/dist/base/session/handoff.d.ts +56 -0
  383. package/dist/base/session/handoff.js +73 -0
  384. package/dist/base/session/pilot-arm.d.ts +4 -0
  385. package/dist/base/session/pilot-arm.js +12 -0
  386. package/dist/base/session/session-digest-row.d.ts +9 -0
  387. package/dist/base/session/session-digest-row.js +15 -0
  388. package/dist/base/session/session-snapshot.d.ts +16 -0
  389. package/dist/base/session/session-snapshot.js +28 -0
  390. package/dist/base/session/skip-unchanged.d.ts +12 -0
  391. package/dist/base/session/skip-unchanged.js +11 -0
  392. package/dist/base/session/transcript-calls.d.ts +25 -0
  393. package/dist/base/session/transcript-calls.js +10 -0
  394. package/dist/base/session/working-state.d.ts +46 -0
  395. package/dist/base/session/working-state.js +83 -0
  396. package/dist/base/util/agent-files.d.ts +40 -0
  397. package/dist/base/util/agent-files.js +4 -0
  398. package/dist/base/util/agent-homes.d.ts +46 -0
  399. package/dist/base/util/agent-homes.js +44 -0
  400. package/dist/base/util/chunked.d.ts +6 -0
  401. package/dist/base/util/chunked.js +11 -0
  402. package/dist/base/util/code-point-cut.d.ts +4 -0
  403. package/dist/base/util/code-point-cut.js +15 -0
  404. package/dist/base/util/compaction-items.d.ts +30 -0
  405. package/dist/base/util/compaction-items.js +152 -0
  406. package/dist/base/util/crash-handlers.d.ts +19 -0
  407. package/dist/base/util/crash-handlers.js +92 -0
  408. package/dist/base/util/env.d.ts +116 -0
  409. package/dist/base/util/env.js +293 -0
  410. package/dist/base/util/escape.js +11 -0
  411. package/dist/base/util/expected-errors.d.ts +10 -0
  412. package/dist/base/util/expected-errors.js +31 -0
  413. package/dist/base/util/failure-notices.d.ts +15 -0
  414. package/dist/base/util/failure-notices.js +29 -0
  415. package/dist/base/util/format.d.ts +7 -0
  416. package/dist/base/util/format.js +14 -0
  417. package/dist/base/util/home-path.d.ts +6 -0
  418. package/dist/base/util/home-path.js +80 -0
  419. package/dist/base/util/hook-payload.d.ts +12 -0
  420. package/dist/base/util/hook-payload.js +35 -0
  421. package/dist/base/util/json.d.ts +28 -0
  422. package/dist/base/util/json.js +42 -0
  423. package/dist/base/util/keyset.d.ts +14 -0
  424. package/dist/base/util/keyset.js +10 -0
  425. package/dist/base/util/limits.d.ts +20 -0
  426. package/dist/base/util/limits.js +50 -0
  427. package/dist/base/util/log.d.ts +72 -0
  428. package/dist/base/util/log.js +217 -0
  429. package/dist/base/util/lru.d.ts +12 -0
  430. package/dist/base/util/lru.js +33 -0
  431. package/dist/base/util/net.d.ts +16 -0
  432. package/dist/base/util/net.js +49 -0
  433. package/dist/base/util/pages.d.ts +19 -0
  434. package/dist/base/util/pages.js +31 -0
  435. package/dist/base/util/prng.d.ts +9 -0
  436. package/dist/base/util/prng.js +19 -0
  437. package/dist/base/util/request-scope.d.ts +40 -0
  438. package/dist/base/util/request-scope.js +58 -0
  439. package/dist/base/util/same-text.d.ts +28 -0
  440. package/dist/base/util/same-text.js +69 -0
  441. package/dist/base/util/secret-detect.d.ts +40 -0
  442. package/dist/base/util/secret-detect.js +157 -0
  443. package/dist/base/util/serial-queue.d.ts +6 -0
  444. package/dist/base/util/serial-queue.js +23 -0
  445. package/dist/base/util/stats.d.ts +7 -0
  446. package/dist/base/util/stats.js +12 -0
  447. package/dist/base/util/stopwords.d.ts +15 -0
  448. package/dist/base/util/stopwords.js +313 -0
  449. package/dist/base/util/store-blocked.d.ts +24 -0
  450. package/dist/base/util/store-blocked.js +42 -0
  451. package/dist/base/util/stored-json.d.ts +21 -0
  452. package/dist/base/util/stored-json.js +32 -0
  453. package/dist/base/util/tenant.d.ts +8 -0
  454. package/dist/base/util/tenant.js +9 -0
  455. package/dist/base/util/thread-reply.d.ts +18 -0
  456. package/dist/base/util/thread-reply.js +26 -0
  457. package/dist/base/util/time.d.ts +10 -0
  458. package/dist/base/util/time.js +11 -0
  459. package/dist/base/util/token-text.d.ts +22 -0
  460. package/dist/base/util/token-text.js +35 -0
  461. package/dist/base/util/tokenize.d.ts +6 -0
  462. package/dist/base/util/tokenize.js +24 -0
  463. package/dist/base/util/vector-codec.js +15 -0
  464. package/dist/base/util/version.d.ts +17 -0
  465. package/dist/base/util/version.js +32 -0
  466. package/dist/base/util/write-budget.d.ts +23 -0
  467. package/dist/base/util/write-budget.js +21 -0
  468. package/dist/base/util/yaml.d.ts +13 -0
  469. package/dist/base/util/yaml.js +137 -0
  470. package/dist/cli.d.ts +1 -1
  471. package/dist/cli.js +81 -51
  472. package/dist/db/backup.d.ts +2 -1
  473. package/dist/db/backup.js +5 -3
  474. package/dist/db/busy.d.ts +13 -11
  475. package/dist/db/busy.js +44 -21
  476. package/dist/db/connect.d.ts +21 -9
  477. package/dist/db/connect.js +73 -42
  478. package/dist/db/continuity-tables.d.ts +10 -0
  479. package/dist/db/continuity-tables.js +100 -0
  480. package/dist/db/decay-key.d.ts +20 -0
  481. package/dist/db/decay-key.js +24 -0
  482. package/dist/db/fts-index.d.ts +13 -0
  483. package/dist/db/fts-index.js +47 -0
  484. package/dist/db/grant.d.ts +35 -0
  485. package/dist/db/grant.js +78 -0
  486. package/dist/db/held-writes.d.ts +12 -0
  487. package/dist/db/held-writes.js +77 -0
  488. package/dist/db/index.d.ts +8 -6
  489. package/dist/db/index.js +5 -5
  490. package/dist/db/meta.d.ts +23 -2
  491. package/dist/db/meta.js +43 -19
  492. package/dist/db/migrate.d.ts +29 -16
  493. package/dist/db/migrate.js +142 -69
  494. package/dist/db/migrations/index.d.ts +3 -2
  495. package/dist/db/migrations/index.js +13 -2
  496. package/dist/db/migrations/types.d.ts +3 -3
  497. package/dist/db/migrations/v11.js +2 -1
  498. package/dist/db/migrations/v14.js +7 -7
  499. package/dist/db/migrations/v15.js +8 -8
  500. package/dist/db/migrations/v16.js +7 -7
  501. package/dist/db/migrations/v19.js +3 -4
  502. package/dist/db/migrations/v20.js +10 -19
  503. package/dist/db/migrations/v21.js +2 -2
  504. package/dist/db/migrations/v22.js +7 -8
  505. package/dist/db/migrations/v23.js +6 -6
  506. package/dist/db/migrations/v24.js +5 -5
  507. package/dist/db/migrations/v25.js +7 -7
  508. package/dist/db/migrations/v26.js +4 -4
  509. package/dist/db/migrations/v27.js +5 -6
  510. package/dist/db/migrations/v28.js +6 -6
  511. package/dist/db/migrations/v29.js +4 -4
  512. package/dist/db/migrations/v30.js +7 -7
  513. package/dist/db/migrations/v31.js +6 -6
  514. package/dist/db/migrations/v32.js +9 -9
  515. package/dist/db/migrations/v33.js +4 -4
  516. package/dist/db/migrations/v34.js +4 -4
  517. package/dist/db/migrations/v35.js +7 -7
  518. package/dist/db/migrations/v36.js +7 -7
  519. package/dist/db/migrations/v37.js +17 -17
  520. package/dist/db/migrations/v38.js +12 -12
  521. package/dist/db/migrations/v39.js +15 -18
  522. package/dist/db/migrations/v40.js +4 -4
  523. package/dist/db/migrations/v41.js +4 -4
  524. package/dist/db/migrations/v42.js +4 -4
  525. package/dist/db/migrations/v44.js +4 -4
  526. package/dist/db/migrations/v45.js +4 -4
  527. package/dist/db/migrations/v46.js +2 -2
  528. package/dist/db/migrations/v47.js +2 -2
  529. package/dist/db/migrations/v48.js +18 -3
  530. package/dist/db/migrations/v49.js +3 -3
  531. package/dist/db/migrations/v50.js +3 -4
  532. package/dist/db/migrations/v51.js +3 -4
  533. package/dist/db/migrations/v52.js +2 -2
  534. package/dist/db/migrations/v53.js +5 -5
  535. package/dist/db/migrations/v54.js +44 -5
  536. package/dist/db/migrations/v56.js +5 -5
  537. package/dist/db/migrations/v57.d.ts +3 -0
  538. package/dist/db/migrations/v57.js +11 -0
  539. package/dist/db/migrations/v58.d.ts +3 -0
  540. package/dist/db/migrations/v58.js +14 -0
  541. package/dist/db/migrations/v59.d.ts +3 -0
  542. package/dist/db/migrations/v59.js +18 -0
  543. package/dist/db/migrations/v60.d.ts +3 -0
  544. package/dist/db/migrations/v60.js +14 -0
  545. package/dist/db/migrations/v61.d.ts +3 -0
  546. package/dist/db/migrations/v61.js +48 -0
  547. package/dist/db/open.d.ts +26 -47
  548. package/dist/db/open.js +28 -90
  549. package/dist/db/physics-state.d.ts +29 -14
  550. package/dist/db/physics-state.js +57 -38
  551. package/dist/db/raw-archive-mirror-cleanup.d.ts +5 -5
  552. package/dist/db/raw-archive-mirror-cleanup.js +8 -9
  553. package/dist/db/request-stores.d.ts +27 -41
  554. package/dist/db/request-stores.js +96 -86
  555. package/dist/db/required-objects.d.ts +6 -0
  556. package/dist/db/required-objects.js +17 -0
  557. package/dist/db/sql-predicates.d.ts +8 -0
  558. package/dist/db/sql-predicates.js +12 -0
  559. package/dist/db/sql.d.ts +19 -0
  560. package/dist/db/sql.js +23 -0
  561. package/dist/db/sqlite-blocked.d.ts +13 -0
  562. package/dist/db/sqlite-blocked.js +22 -0
  563. package/dist/db/sqlite.d.ts +12 -1
  564. package/dist/db/sqlite.js +4 -4
  565. package/dist/db/statement-cache.d.ts +6 -0
  566. package/dist/db/statement-cache.js +26 -0
  567. package/dist/db/store-runtime.d.ts +45 -0
  568. package/dist/db/store-runtime.js +133 -0
  569. package/dist/db/tables.d.ts +6 -3
  570. package/dist/db/tables.js +9 -10
  571. package/dist/db/vector-graph-build.d.ts +21 -0
  572. package/dist/db/vector-graph-build.js +141 -0
  573. package/dist/db/vector-graph-file.d.ts +51 -0
  574. package/dist/db/vector-graph-file.js +264 -0
  575. package/dist/db/vector-graph-index.d.ts +24 -0
  576. package/dist/db/vector-graph-index.js +260 -0
  577. package/dist/db/vector-graph-reader.d.ts +13 -0
  578. package/dist/db/vector-graph-reader.js +273 -0
  579. package/dist/db/vector-graph-rows.d.ts +79 -0
  580. package/dist/db/vector-graph-rows.js +166 -0
  581. package/dist/db/vector-graph.d.ts +68 -0
  582. package/dist/db/vector-graph.js +289 -0
  583. package/dist/db/vector-match.d.ts +47 -0
  584. package/dist/db/vector-match.js +174 -0
  585. package/dist/db/vector-store.d.ts +30 -31
  586. package/dist/db/vector-store.js +90 -146
  587. package/dist/db/wal-checkpointer.d.ts +13 -7
  588. package/dist/db/wal-checkpointer.js +67 -51
  589. package/dist/domain/agent-memories/apply.d.ts +12 -0
  590. package/dist/domain/agent-memories/apply.js +154 -0
  591. package/dist/domain/agent-memories/claude-code.d.ts +17 -0
  592. package/dist/domain/agent-memories/claude-code.js +188 -0
  593. package/dist/domain/agent-memories/codex.js +70 -0
  594. package/dist/domain/agent-memories/container-steps.d.ts +16 -0
  595. package/dist/domain/agent-memories/container-steps.js +95 -0
  596. package/dist/domain/agent-memories/container-view.d.ts +51 -0
  597. package/dist/domain/agent-memories/container-view.js +86 -0
  598. package/dist/domain/agent-memories/copilot.js +116 -0
  599. package/dist/domain/agent-memories/files.d.ts +14 -0
  600. package/dist/domain/agent-memories/files.js +31 -0
  601. package/dist/domain/agent-memories/folder-store.d.ts +22 -0
  602. package/dist/domain/agent-memories/folder-store.js +54 -0
  603. package/dist/domain/agent-memories/gemini.js +126 -0
  604. package/dist/domain/agent-memories/git.d.ts +10 -0
  605. package/dist/domain/agent-memories/git.js +22 -0
  606. package/dist/domain/agent-memories/handover.d.ts +8 -0
  607. package/dist/domain/agent-memories/handover.js +73 -0
  608. package/dist/domain/agent-memories/keys.d.ts +11 -0
  609. package/dist/domain/agent-memories/keys.js +24 -0
  610. package/dist/domain/agent-memories/legacy.d.ts +19 -0
  611. package/dist/domain/agent-memories/legacy.js +71 -0
  612. package/dist/domain/agent-memories/markdown.d.ts +14 -0
  613. package/dist/domain/agent-memories/markdown.js +135 -0
  614. package/dist/domain/agent-memories/openclaw.js +67 -0
  615. package/dist/domain/agent-memories/plan.d.ts +80 -0
  616. package/dist/domain/agent-memories/plan.js +145 -0
  617. package/dist/domain/agent-memories/project-folds.d.ts +13 -0
  618. package/dist/domain/agent-memories/project-folds.js +42 -0
  619. package/dist/domain/agent-memories/qwen-code.js +59 -0
  620. package/dist/domain/agent-memories/source.d.ts +28 -0
  621. package/dist/domain/agent-memories/source.js +42 -0
  622. package/dist/domain/agent-memories/sync.d.ts +49 -0
  623. package/dist/domain/agent-memories/sync.js +286 -0
  624. package/dist/domain/agent-memories/types.d.ts +62 -0
  625. package/dist/domain/consolidate/conflicts.d.ts +33 -0
  626. package/dist/domain/consolidate/conflicts.js +244 -0
  627. package/dist/domain/consolidate/dag-summary.d.ts +8 -0
  628. package/dist/domain/consolidate/dag-summary.js +38 -0
  629. package/dist/domain/consolidate/dag.d.ts +54 -0
  630. package/dist/domain/consolidate/dag.js +318 -0
  631. package/dist/domain/consolidate/decay.d.ts +18 -0
  632. package/dist/domain/consolidate/decay.js +167 -0
  633. package/dist/domain/consolidate/dedupe.d.ts +42 -0
  634. package/dist/domain/consolidate/dedupe.js +143 -0
  635. package/dist/domain/consolidate/events.d.ts +114 -0
  636. package/dist/domain/consolidate/events.js +3 -0
  637. package/dist/domain/consolidate/flush-units.d.ts +18 -0
  638. package/dist/domain/consolidate/flush-units.js +76 -0
  639. package/dist/domain/consolidate/half-life-migration.d.ts +26 -0
  640. package/dist/domain/consolidate/half-life-migration.js +20 -0
  641. package/dist/domain/consolidate/llm-passes.d.ts +4 -0
  642. package/dist/domain/consolidate/llm-passes.js +275 -0
  643. package/dist/domain/consolidate/memory-value-artifact.d.ts +3 -0
  644. package/dist/domain/consolidate/memory-value-artifact.js +8 -0
  645. package/dist/domain/consolidate/memory-value-weights.d.ts +13 -0
  646. package/dist/domain/consolidate/memory-value-weights.js +24 -0
  647. package/dist/domain/consolidate/memory-value.d.ts +85 -0
  648. package/dist/domain/consolidate/memory-value.js +257 -0
  649. package/dist/domain/consolidate/merge.d.ts +8 -0
  650. package/dist/domain/consolidate/merge.js +308 -0
  651. package/dist/domain/consolidate/overlap-index.d.ts +14 -0
  652. package/dist/domain/consolidate/overlap-index.js +46 -0
  653. package/dist/domain/consolidate/physics-pass.d.ts +7 -0
  654. package/dist/domain/consolidate/physics-pass.js +118 -0
  655. package/dist/domain/consolidate/replay.d.ts +25 -0
  656. package/dist/domain/consolidate/replay.js +98 -0
  657. package/dist/domain/consolidate/run.d.ts +94 -0
  658. package/dist/domain/consolidate/run.js +53 -0
  659. package/dist/domain/consolidate/sleep.d.ts +37 -0
  660. package/dist/domain/consolidate/sleep.js +231 -0
  661. package/dist/domain/consolidate/summary-settle.d.ts +25 -0
  662. package/dist/domain/consolidate/summary-settle.js +65 -0
  663. package/dist/domain/consolidate/survivors.d.ts +57 -0
  664. package/dist/domain/consolidate/survivors.js +150 -0
  665. package/dist/domain/consolidate/tombstones.d.ts +18 -0
  666. package/dist/domain/consolidate/tombstones.js +26 -0
  667. package/dist/domain/consolidate/trace.d.ts +23 -0
  668. package/dist/domain/consolidate/trace.js +57 -0
  669. package/dist/domain/consolidate/traces.d.ts +8 -0
  670. package/dist/domain/consolidate/traces.js +141 -0
  671. package/dist/domain/context/select-policy.d.ts +34 -0
  672. package/dist/domain/context/select-policy.js +89 -0
  673. package/dist/domain/eval/eval-stats.d.ts +172 -0
  674. package/dist/domain/eval/eval-stats.js +286 -0
  675. package/dist/domain/eval/eval-suite-corpus.d.ts +16 -0
  676. package/dist/domain/eval/eval-suite-corpus.js +304 -0
  677. package/dist/domain/eval/eval-suite-fixtures.d.ts +19 -0
  678. package/dist/domain/eval/eval-suite-fixtures.js +140 -0
  679. package/dist/domain/eval/eval-suite.d.ts +62 -0
  680. package/dist/domain/eval/eval-suite.js +186 -0
  681. package/dist/domain/eval/eval.d.ts +108 -0
  682. package/dist/domain/eval/eval.js +177 -0
  683. package/dist/domain/eval/repository-t.d.ts +62 -0
  684. package/dist/domain/eval/repository-t.js +314 -0
  685. package/dist/domain/graph/extract.d.ts +64 -0
  686. package/dist/domain/graph/extract.js +288 -0
  687. package/dist/domain/graph/recall.d.ts +55 -0
  688. package/dist/domain/graph/recall.js +267 -0
  689. package/dist/domain/graph/stream.d.ts +48 -0
  690. package/dist/domain/graph/stream.js +226 -0
  691. package/dist/domain/graph/view.d.ts +55 -0
  692. package/dist/domain/graph/view.js +176 -0
  693. package/dist/domain/learn/autolearn.d.ts +26 -0
  694. package/dist/domain/learn/autolearn.js +102 -0
  695. package/dist/domain/learn/churn-evidence.d.ts +49 -0
  696. package/dist/domain/learn/churn-evidence.js +208 -0
  697. package/dist/domain/learn/churn-git.d.ts +34 -0
  698. package/dist/domain/learn/churn-git.js +126 -0
  699. package/dist/domain/learn/churn-stale.d.ts +36 -0
  700. package/dist/domain/learn/churn-stale.js +158 -0
  701. package/dist/domain/learn/extract.d.ts +29 -0
  702. package/dist/domain/learn/extract.js +132 -0
  703. package/dist/domain/learn/forward-claim-detector.d.ts +18 -0
  704. package/dist/domain/learn/forward-claim-detector.js +61 -0
  705. package/dist/domain/learn/invalidation.d.ts +40 -0
  706. package/dist/domain/learn/invalidation.js +187 -0
  707. package/dist/domain/learn/session-digest.d.ts +29 -0
  708. package/dist/domain/learn/session-digest.js +170 -0
  709. package/dist/domain/objects/customer-notes.d.ts +34 -0
  710. package/dist/domain/objects/customer-notes.js +50 -0
  711. package/dist/domain/objects/decisions.d.ts +39 -0
  712. package/dist/domain/objects/decisions.js +60 -0
  713. package/dist/domain/objects/descriptor.d.ts +43 -0
  714. package/dist/domain/objects/descriptor.js +5 -0
  715. package/dist/domain/objects/fields.d.ts +10 -0
  716. package/dist/domain/objects/fields.js +29 -0
  717. package/dist/domain/objects/incidents.d.ts +42 -0
  718. package/dist/domain/objects/incidents.js +85 -0
  719. package/dist/domain/objects/lifecycle.d.ts +44 -0
  720. package/dist/domain/objects/lifecycle.js +101 -0
  721. package/dist/domain/objects/policies.d.ts +48 -0
  722. package/dist/domain/objects/policies.js +84 -0
  723. package/dist/domain/objects/processes.d.ts +29 -0
  724. package/dist/domain/objects/processes.js +66 -0
  725. package/dist/domain/objects/project-briefs.d.ts +50 -0
  726. package/dist/domain/objects/project-briefs.js +166 -0
  727. package/dist/domain/objects/skills.d.ts +33 -0
  728. package/dist/domain/objects/skills.js +73 -0
  729. package/dist/domain/predictions/planning-fallacy.d.ts +24 -0
  730. package/dist/domain/predictions/planning-fallacy.js +83 -0
  731. package/dist/domain/rerankers/cross-encoder.d.ts +6 -0
  732. package/dist/domain/rerankers/cross-encoder.js +73 -0
  733. package/dist/domain/rerankers/hosted.d.ts +6 -0
  734. package/dist/domain/rerankers/hosted.js +10 -0
  735. package/dist/domain/rerankers/outage-warning.d.ts +17 -0
  736. package/dist/domain/rerankers/outage-warning.js +36 -0
  737. package/dist/domain/search/as-of.d.ts +10 -0
  738. package/dist/domain/search/as-of.js +22 -0
  739. package/dist/domain/search/bm25-search.d.ts +28 -0
  740. package/dist/domain/search/bm25-search.js +65 -0
  741. package/dist/domain/search/bm25.d.ts +16 -0
  742. package/dist/domain/search/bm25.js +54 -0
  743. package/dist/domain/search/boosts.d.ts +84 -0
  744. package/dist/domain/search/boosts.js +148 -0
  745. package/dist/domain/search/breakdown.d.ts +8 -0
  746. package/dist/domain/search/breakdown.js +22 -0
  747. package/dist/domain/search/embed-failures.d.ts +7 -0
  748. package/dist/domain/search/embed-failures.js +36 -0
  749. package/dist/domain/search/embed-index-target.d.ts +13 -0
  750. package/dist/domain/search/embed-index-target.js +224 -0
  751. package/dist/domain/search/embed-memories.d.ts +50 -0
  752. package/dist/domain/search/embed-memories.js +74 -0
  753. package/dist/domain/search/embed-store-target.d.ts +17 -0
  754. package/dist/domain/search/embed-store-target.js +109 -0
  755. package/dist/domain/search/embed-turns.d.ts +3 -0
  756. package/dist/domain/search/embed-turns.js +6 -0
  757. package/dist/domain/search/engine.d.ts +19 -0
  758. package/dist/domain/search/engine.js +14 -0
  759. package/dist/domain/search/explain.d.ts +26 -0
  760. package/dist/domain/search/explain.js +33 -0
  761. package/dist/domain/search/finalize.d.ts +10 -0
  762. package/dist/domain/search/finalize.js +84 -0
  763. package/dist/domain/search/fusion.d.ts +31 -0
  764. package/dist/domain/search/fusion.js +46 -0
  765. package/dist/domain/search/goal-boost.d.ts +32 -0
  766. package/dist/domain/search/goal-boost.js +107 -0
  767. package/dist/domain/search/hybrid-score.d.ts +23 -0
  768. package/dist/domain/search/hybrid-score.js +76 -0
  769. package/dist/domain/search/hybrid.d.ts +130 -0
  770. package/dist/domain/search/hybrid.js +115 -0
  771. package/dist/domain/search/multihop.d.ts +5 -0
  772. package/dist/domain/search/multihop.js +46 -0
  773. package/dist/domain/search/path-context.d.ts +17 -0
  774. package/dist/domain/search/path-context.js +66 -0
  775. package/dist/domain/search/physics-search.d.ts +50 -0
  776. package/dist/domain/search/physics-search.js +216 -0
  777. package/dist/domain/search/rerank.d.ts +21 -0
  778. package/dist/domain/search/rerank.js +77 -0
  779. package/dist/domain/search/rrf.d.ts +22 -0
  780. package/dist/domain/search/rrf.js +42 -0
  781. package/dist/domain/search/temporal.d.ts +15 -0
  782. package/dist/domain/search/temporal.js +51 -0
  783. package/dist/domain/search/vector.d.ts +65 -0
  784. package/dist/domain/search/vector.js +144 -0
  785. package/dist/domain/sharing/global-sync.d.ts +14 -0
  786. package/dist/domain/sharing/global-sync.js +114 -0
  787. package/dist/domain/sharing/project-merge.d.ts +87 -0
  788. package/dist/domain/sharing/project-merge.js +292 -0
  789. package/dist/domain/sharing/search-both.d.ts +85 -0
  790. package/dist/domain/sharing/search-both.js +159 -0
  791. package/dist/domain/sharing/share.d.ts +59 -0
  792. package/dist/domain/sharing/share.js +320 -0
  793. package/dist/domain/sharing/text-keys.d.ts +8 -0
  794. package/dist/domain/sharing/text-keys.js +14 -0
  795. package/dist/domain/trust/quarantine.d.ts +4 -0
  796. package/dist/domain/trust/quarantine.js +4 -0
  797. package/dist/domain/trust/reject-flow.d.ts +37 -0
  798. package/dist/domain/trust/reject-flow.js +52 -0
  799. package/dist/entry/eval-scripts.d.ts +39 -0
  800. package/dist/entry/eval-scripts.js +68 -0
  801. package/dist/entry/eval.d.ts +10 -0
  802. package/dist/entry/eval.js +16 -0
  803. package/dist/entry/folder-search.d.ts +49 -0
  804. package/dist/entry/folder-search.js +88 -0
  805. package/dist/entry/importers.d.ts +16 -0
  806. package/dist/entry/importers.js +47 -0
  807. package/dist/entry/json-hooks.d.ts +3 -2
  808. package/dist/entry/json-hooks.js +2 -3
  809. package/dist/entry/learning.d.ts +7 -0
  810. package/dist/entry/learning.js +10 -0
  811. package/dist/entry/memory.d.ts +32 -0
  812. package/dist/entry/memory.js +51 -0
  813. package/dist/entry/object-saves.d.ts +11 -0
  814. package/dist/entry/object-saves.js +23 -0
  815. package/dist/entry/project-identity.d.ts +2 -1
  816. package/dist/entry/project-identity.js +4 -3
  817. package/dist/entry/search.d.ts +15 -0
  818. package/dist/entry/search.js +18 -0
  819. package/dist/entry/session-text.d.ts +7 -6
  820. package/dist/entry/session-text.js +10 -8
  821. package/dist/entry/sleep.d.ts +22 -0
  822. package/dist/entry/sleep.js +45 -0
  823. package/dist/entry/store-conformance.d.ts +15 -0
  824. package/dist/entry/store-conformance.js +69 -0
  825. package/dist/entry/store-kit.d.ts +46 -48
  826. package/dist/entry/store-kit.js +50 -26
  827. package/dist/entry/testing.d.ts +15 -5
  828. package/dist/entry/testing.js +27 -6
  829. package/dist/entry/wire-kit.d.ts +20 -0
  830. package/dist/entry/wire-kit.js +31 -0
  831. package/dist/extensions/openclaw-plugin/index.js +4 -4
  832. package/dist/host/agent-homes.d.ts +8 -0
  833. package/dist/host/agent-homes.js +25 -0
  834. package/dist/host/atomic-write.d.ts +19 -0
  835. package/dist/host/atomic-write.js +182 -0
  836. package/dist/host/clock.d.ts +5 -0
  837. package/dist/host/clock.js +6 -0
  838. package/dist/host/config-file.d.ts +21 -0
  839. package/dist/host/config-file.js +119 -0
  840. package/dist/host/file-lock.d.ts +28 -0
  841. package/dist/host/file-lock.js +168 -0
  842. package/dist/host/global-store.d.ts +3 -0
  843. package/dist/host/global-store.js +8 -0
  844. package/dist/host/host.d.ts +16 -0
  845. package/dist/host/host.js +39 -0
  846. package/dist/host/json-file.d.ts +6 -0
  847. package/dist/host/json-file.js +15 -0
  848. package/dist/host/key-gitignore.d.ts +4 -0
  849. package/dist/host/key-gitignore.js +58 -0
  850. package/dist/host/kill-tree.d.ts +11 -0
  851. package/dist/host/kill-tree.js +135 -0
  852. package/dist/host/package-version.d.ts +4 -0
  853. package/dist/host/package-version.js +16 -0
  854. package/dist/host/pid-alive.d.ts +4 -0
  855. package/dist/host/pid-alive.js +14 -0
  856. package/dist/host/private-dir.d.ts +8 -0
  857. package/dist/host/private-dir.js +5 -0
  858. package/dist/host/project-identity.d.ts +37 -0
  859. package/dist/host/project-identity.js +187 -0
  860. package/dist/host/project-remote.d.ts +23 -0
  861. package/dist/host/project-remote.js +192 -0
  862. package/dist/host/real-path.d.ts +9 -0
  863. package/dist/host/real-path.js +31 -0
  864. package/dist/host/spawn-argv.d.ts +17 -0
  865. package/dist/host/spawn-argv.js +105 -0
  866. package/dist/host/stream-tee.d.ts +4 -0
  867. package/dist/host/stream-tee.js +38 -0
  868. package/dist/host/windows-acl.d.ts +5 -0
  869. package/dist/host/windows-acl.js +29 -0
  870. package/dist/index.d.ts +6 -77
  871. package/dist/index.js +6 -80
  872. package/dist/infra/agent-files.d.ts +3 -0
  873. package/dist/infra/agent-files.js +101 -0
  874. package/dist/infra/anthropic-llm.d.ts +9 -0
  875. package/dist/infra/anthropic-llm.js +95 -0
  876. package/dist/infra/compaction-spool.d.ts +27 -0
  877. package/dist/infra/compaction-spool.js +71 -0
  878. package/dist/infra/cross-encoder.d.ts +34 -0
  879. package/dist/infra/cross-encoder.js +44 -0
  880. package/dist/infra/embedding-provider.d.ts +23 -0
  881. package/dist/infra/embedding-provider.js +281 -0
  882. package/dist/infra/eval-switches.d.ts +27 -0
  883. package/dist/infra/eval-switches.js +59 -0
  884. package/dist/infra/git-runner.d.ts +5 -0
  885. package/dist/infra/git-runner.js +47 -0
  886. package/dist/infra/http-retry.d.ts +46 -0
  887. package/dist/infra/http-retry.js +195 -0
  888. package/dist/infra/http.d.ts +6 -0
  889. package/dist/infra/http.js +10 -0
  890. package/dist/infra/judgment.d.ts +26 -0
  891. package/dist/infra/judgment.js +128 -0
  892. package/dist/infra/local-embedder.d.ts +64 -0
  893. package/dist/infra/local-embedder.js +146 -0
  894. package/dist/infra/machine.d.ts +6 -0
  895. package/dist/infra/machine.js +23 -0
  896. package/dist/infra/ports.d.ts +11 -0
  897. package/dist/infra/ports.js +37 -0
  898. package/dist/infra/rerankers/clef.d.ts +31 -0
  899. package/dist/infra/rerankers/clef.js +180 -0
  900. package/dist/infra/rerankers/endpoint.d.ts +21 -0
  901. package/dist/infra/rerankers/endpoint.js +31 -0
  902. package/dist/infra/rerankers/index.d.ts +7 -0
  903. package/dist/infra/rerankers/index.js +31 -0
  904. package/dist/infra/rerankers/jev.d.ts +20 -0
  905. package/dist/infra/rerankers/jev.js +113 -0
  906. package/dist/infra/rerankers/llm.d.ts +10 -0
  907. package/dist/infra/rerankers/llm.js +96 -0
  908. package/dist/infra/spool-claims.d.ts +42 -0
  909. package/dist/infra/spool-claims.js +65 -0
  910. package/dist/infra/spool-counts.d.ts +12 -0
  911. package/dist/infra/spool-counts.js +48 -0
  912. package/dist/infra/spool-files.d.ts +85 -0
  913. package/dist/infra/spool-files.js +100 -0
  914. package/dist/infra/spool-import.d.ts +15 -0
  915. package/dist/infra/spool-import.js +92 -0
  916. package/dist/infra/spool-record.d.ts +19 -0
  917. package/dist/infra/spool-record.js +46 -0
  918. package/dist/infra/spool-recovery.d.ts +19 -0
  919. package/dist/infra/spool-recovery.js +88 -0
  920. package/dist/infra/transcript-calls.d.ts +5 -0
  921. package/dist/infra/transcript-calls.js +54 -0
  922. package/dist/infra/transcript-tail.d.ts +14 -0
  923. package/dist/infra/transcript-tail.js +43 -0
  924. package/dist/infra/transformers.d.ts +29 -0
  925. package/dist/infra/transformers.js +83 -0
  926. package/dist/server.d.ts +27 -25
  927. package/dist/server.js +32 -38
  928. package/dist/store/rules/audit-rows.d.ts +30 -0
  929. package/dist/store/rules/audit-rows.js +11 -0
  930. package/dist/store/rules/copies.d.ts +12 -0
  931. package/dist/store/rules/copies.js +26 -0
  932. package/dist/store/rules/graph-delta.d.ts +52 -0
  933. package/dist/store/rules/graph-delta.js +92 -0
  934. package/dist/store/rules/half-life.d.ts +8 -0
  935. package/dist/store/rules/half-life.js +27 -0
  936. package/dist/store/rules/order.d.ts +51 -0
  937. package/dist/store/rules/order.js +54 -0
  938. package/dist/store/rules/request-ids.d.ts +3 -0
  939. package/dist/store/rules/request-ids.js +5 -0
  940. package/dist/store/rules/windows.d.ts +10 -0
  941. package/dist/store/rules/windows.js +12 -0
  942. package/dist/store/sqlite/audit/audit-event.d.ts +18 -0
  943. package/dist/store/sqlite/audit/audit-event.js +31 -0
  944. package/dist/store/sqlite/audit/audit-maintenance.d.ts +4 -0
  945. package/dist/store/sqlite/audit/audit-maintenance.js +288 -0
  946. package/dist/store/sqlite/audit/audit.d.ts +23 -0
  947. package/dist/store/sqlite/audit/audit.js +131 -0
  948. package/dist/store/sqlite/capture/captures.d.ts +4 -0
  949. package/dist/store/sqlite/capture/captures.js +56 -0
  950. package/dist/store/sqlite/capture/compaction-hooks.d.ts +4 -0
  951. package/dist/store/sqlite/capture/compaction-hooks.js +221 -0
  952. package/dist/store/sqlite/capture/compaction-rows.d.ts +93 -0
  953. package/dist/store/sqlite/capture/compaction-rows.js +84 -0
  954. package/dist/store/sqlite/capture/compactions-record.d.ts +89 -0
  955. package/dist/store/sqlite/capture/compactions-record.js +268 -0
  956. package/dist/store/sqlite/capture/compactions.d.ts +4 -0
  957. package/dist/store/sqlite/capture/compactions.js +59 -0
  958. package/dist/store/sqlite/capture/failure-log.d.ts +12 -0
  959. package/dist/store/sqlite/capture/failure-log.js +113 -0
  960. package/dist/store/sqlite/capture/gated-write.d.ts +13 -0
  961. package/dist/store/sqlite/capture/gated-write.js +33 -0
  962. package/dist/store/sqlite/connectors/connector-events.d.ts +4 -0
  963. package/dist/store/sqlite/connectors/connector-events.js +53 -0
  964. package/dist/store/sqlite/connectors/connector-writes.d.ts +6 -0
  965. package/dist/store/sqlite/connectors/connector-writes.js +65 -0
  966. package/dist/store/sqlite/connectors/dlq.d.ts +21 -0
  967. package/dist/store/sqlite/connectors/dlq.js +85 -0
  968. package/dist/store/sqlite/connectors/event-log.d.ts +20 -0
  969. package/dist/store/sqlite/connectors/event-log.js +26 -0
  970. package/dist/store/sqlite/connectors/events.d.ts +11 -0
  971. package/dist/store/sqlite/connectors/events.js +57 -0
  972. package/dist/store/sqlite/connectors/github.d.ts +32 -0
  973. package/dist/store/sqlite/connectors/github.js +102 -0
  974. package/dist/store/sqlite/connectors/quarantine.d.ts +17 -0
  975. package/dist/store/sqlite/connectors/quarantine.js +157 -0
  976. package/dist/store/sqlite/connectors/replay.d.ts +6 -0
  977. package/dist/store/sqlite/connectors/replay.js +21 -0
  978. package/dist/store/sqlite/connectors/slack.d.ts +23 -0
  979. package/dist/store/sqlite/connectors/slack.js +82 -0
  980. package/dist/store/sqlite/consolidation/consolidation-summaries.d.ts +19 -0
  981. package/dist/store/sqlite/consolidation/consolidation-summaries.js +155 -0
  982. package/dist/store/sqlite/consolidation/consolidation.d.ts +5 -0
  983. package/dist/store/sqlite/consolidation/consolidation.js +140 -0
  984. package/dist/store/sqlite/consolidation/sleep-scans.d.ts +9 -0
  985. package/dist/store/sqlite/consolidation/sleep-scans.js +77 -0
  986. package/dist/store/sqlite/dormant/dormant-rows.d.ts +52 -0
  987. package/dist/store/sqlite/dormant/dormant-rows.js +169 -0
  988. package/dist/store/sqlite/dormant/dormant.d.ts +12 -0
  989. package/dist/store/sqlite/dormant/dormant.js +142 -0
  990. package/dist/store/sqlite/entries/delete-and-batch.d.ts +56 -0
  991. package/dist/store/sqlite/entries/delete-and-batch.js +479 -0
  992. package/dist/store/sqlite/entries/entry-filter.d.ts +20 -0
  993. package/dist/store/sqlite/entries/entry-filter.js +97 -0
  994. package/dist/store/sqlite/entries/entry-mentions.d.ts +10 -0
  995. package/dist/store/sqlite/entries/entry-mentions.js +90 -0
  996. package/dist/store/sqlite/entries/entry-reads.d.ts +106 -0
  997. package/dist/store/sqlite/entries/entry-reads.js +264 -0
  998. package/dist/store/sqlite/entries/entry-row.d.ts +34 -0
  999. package/dist/store/sqlite/entries/entry-row.js +209 -0
  1000. package/dist/store/sqlite/entries/entry-writes.d.ts +128 -0
  1001. package/dist/store/sqlite/entries/entry-writes.js +510 -0
  1002. package/dist/store/sqlite/entries/index-and-stats.d.ts +35 -0
  1003. package/dist/store/sqlite/entries/index-and-stats.js +98 -0
  1004. package/dist/store/sqlite/entries/raw-archive.d.ts +20 -0
  1005. package/dist/store/sqlite/entries/raw-archive.js +115 -0
  1006. package/dist/store/sqlite/entries/set-aside.d.ts +14 -0
  1007. package/dist/store/sqlite/entries/set-aside.js +39 -0
  1008. package/dist/store/sqlite/entries/summary-dirty.d.ts +10 -0
  1009. package/dist/store/sqlite/entries/summary-dirty.js +47 -0
  1010. package/dist/store/sqlite/fixtures.d.ts +37 -0
  1011. package/dist/store/sqlite/fixtures.js +65 -0
  1012. package/dist/store/sqlite/folder-files/due-mirrors.d.ts +12 -0
  1013. package/dist/store/sqlite/folder-files/due-mirrors.js +80 -0
  1014. package/dist/store/sqlite/folder-files/folder-files.d.ts +4 -0
  1015. package/dist/store/sqlite/folder-files/folder-files.js +30 -0
  1016. package/dist/store/sqlite/folder-files/mirrors.d.ts +49 -0
  1017. package/dist/store/sqlite/folder-files/mirrors.js +323 -0
  1018. package/dist/store/sqlite/graph/dag-reads.d.ts +4 -0
  1019. package/dist/store/sqlite/graph/dag-reads.js +162 -0
  1020. package/dist/store/sqlite/graph/graph-delta.d.ts +5 -0
  1021. package/dist/store/sqlite/graph/graph-delta.js +72 -0
  1022. package/dist/store/sqlite/graph/graph-queue.d.ts +18 -0
  1023. package/dist/store/sqlite/graph/graph-queue.js +71 -0
  1024. package/dist/store/sqlite/graph/graph-reads.d.ts +4 -0
  1025. package/dist/store/sqlite/graph/graph-reads.js +236 -0
  1026. package/dist/store/sqlite/graph/graph-rebuild.d.ts +4 -0
  1027. package/dist/store/sqlite/graph/graph-rebuild.js +80 -0
  1028. package/dist/store/sqlite/graph/graph-rows.d.ts +78 -0
  1029. package/dist/store/sqlite/graph/graph-rows.js +66 -0
  1030. package/dist/store/sqlite/graph/graph-writes.d.ts +56 -0
  1031. package/dist/store/sqlite/graph/graph-writes.js +254 -0
  1032. package/dist/store/sqlite/index.d.ts +16 -0
  1033. package/dist/store/sqlite/index.js +18 -0
  1034. package/dist/store/sqlite/keys/auth.d.ts +43 -0
  1035. package/dist/store/sqlite/keys/auth.js +141 -0
  1036. package/dist/store/sqlite/keys/keys.d.ts +4 -0
  1037. package/dist/store/sqlite/keys/keys.js +102 -0
  1038. package/dist/store/sqlite/learning/learning.d.ts +5 -0
  1039. package/dist/store/sqlite/learning/learning.js +21 -0
  1040. package/dist/store/sqlite/learning/lesson-writes.d.ts +4 -0
  1041. package/dist/store/sqlite/learning/lesson-writes.js +43 -0
  1042. package/dist/store/sqlite/learning/planning-fallacy-evidence.d.ts +7 -0
  1043. package/dist/store/sqlite/learning/planning-fallacy-evidence.js +52 -0
  1044. package/dist/store/sqlite/learning/prediction-baserate.d.ts +10 -0
  1045. package/dist/store/sqlite/learning/prediction-baserate.js +84 -0
  1046. package/dist/store/sqlite/learning/predictions.d.ts +15 -0
  1047. package/dist/store/sqlite/learning/predictions.js +256 -0
  1048. package/dist/store/sqlite/ledger/delivery-ledger.d.ts +19 -0
  1049. package/dist/store/sqlite/ledger/delivery-ledger.js +277 -0
  1050. package/dist/store/sqlite/ledger/ledger.d.ts +8 -0
  1051. package/dist/store/sqlite/ledger/ledger.js +171 -0
  1052. package/dist/store/sqlite/ledger/token-ledger-rows.d.ts +70 -0
  1053. package/dist/store/sqlite/ledger/token-ledger-rows.js +66 -0
  1054. package/dist/store/sqlite/ledger/token-ledger.d.ts +38 -0
  1055. package/dist/store/sqlite/ledger/token-ledger.js +155 -0
  1056. package/dist/store/sqlite/maintenance/agent-import-steps.d.ts +15 -0
  1057. package/dist/store/sqlite/maintenance/agent-import-steps.js +225 -0
  1058. package/dist/store/sqlite/maintenance/agent-import-stores.d.ts +17 -0
  1059. package/dist/store/sqlite/maintenance/agent-import-stores.js +41 -0
  1060. package/dist/store/sqlite/maintenance/agent-import.d.ts +6 -0
  1061. package/dist/store/sqlite/maintenance/agent-import.js +48 -0
  1062. package/dist/store/sqlite/maintenance/diagnostics.d.ts +4 -0
  1063. package/dist/store/sqlite/maintenance/diagnostics.js +79 -0
  1064. package/dist/store/sqlite/maintenance/import-files.d.ts +18 -0
  1065. package/dist/store/sqlite/maintenance/import-files.js +17 -0
  1066. package/dist/store/sqlite/maintenance/project-tags.d.ts +6 -0
  1067. package/dist/store/sqlite/maintenance/project-tags.js +182 -0
  1068. package/dist/store/sqlite/recall/ambient.d.ts +8 -0
  1069. package/dist/store/sqlite/recall/ambient.js +89 -0
  1070. package/dist/store/sqlite/recall/candidates.d.ts +56 -0
  1071. package/dist/store/sqlite/recall/candidates.js +417 -0
  1072. package/dist/store/sqlite/recall/fts-phrase.d.ts +5 -0
  1073. package/dist/store/sqlite/recall/fts-phrase.js +10 -0
  1074. package/dist/store/sqlite/recall/last-recall.d.ts +14 -0
  1075. package/dist/store/sqlite/recall/last-recall.js +59 -0
  1076. package/dist/store/sqlite/recall/recall-trace.d.ts +29 -0
  1077. package/dist/store/sqlite/recall/recall-trace.js +110 -0
  1078. package/dist/store/sqlite/recall/search-rows.d.ts +22 -0
  1079. package/dist/store/sqlite/recall/search-rows.js +259 -0
  1080. package/dist/store/sqlite/records/card-rows.d.ts +51 -0
  1081. package/dist/store/sqlite/records/card-rows.js +66 -0
  1082. package/dist/store/sqlite/records/card-runs.d.ts +34 -0
  1083. package/dist/store/sqlite/records/card-runs.js +253 -0
  1084. package/dist/store/sqlite/records/cards.d.ts +4 -0
  1085. package/dist/store/sqlite/records/cards.js +148 -0
  1086. package/dist/store/sqlite/records/object-rows.d.ts +142 -0
  1087. package/dist/store/sqlite/records/object-rows.js +237 -0
  1088. package/dist/store/sqlite/records/object-writes.d.ts +18 -0
  1089. package/dist/store/sqlite/records/object-writes.js +258 -0
  1090. package/dist/store/sqlite/records/objects.d.ts +4 -0
  1091. package/dist/store/sqlite/records/objects.js +116 -0
  1092. package/dist/store/sqlite/reports/dashboard-functions.d.ts +47 -0
  1093. package/dist/store/sqlite/reports/dashboard-functions.js +256 -0
  1094. package/dist/store/sqlite/reports/dashboard-lists.d.ts +16 -0
  1095. package/dist/store/sqlite/reports/dashboard-lists.js +241 -0
  1096. package/dist/store/sqlite/reports/dashboard-reads.d.ts +7 -0
  1097. package/dist/store/sqlite/reports/dashboard-reads.js +201 -0
  1098. package/dist/store/sqlite/reports/dashboard-sql.d.ts +7 -0
  1099. package/dist/store/sqlite/reports/dashboard-sql.js +19 -0
  1100. package/dist/store/sqlite/reports/reports.d.ts +4 -0
  1101. package/dist/store/sqlite/reports/reports.js +98 -0
  1102. package/dist/store/sqlite/review/conflicts.d.ts +26 -0
  1103. package/dist/store/sqlite/review/conflicts.js +441 -0
  1104. package/dist/store/sqlite/review/rejection.d.ts +42 -0
  1105. package/dist/store/sqlite/review/rejection.js +99 -0
  1106. package/dist/store/sqlite/review/rejections.d.ts +6 -0
  1107. package/dist/store/sqlite/review/rejections.js +253 -0
  1108. package/dist/store/sqlite/runtime/bound.d.ts +21 -0
  1109. package/dist/store/sqlite/runtime/bound.js +44 -0
  1110. package/dist/store/sqlite/runtime/commit-watch.d.ts +4 -0
  1111. package/dist/store/sqlite/runtime/commit-watch.js +57 -0
  1112. package/dist/store/sqlite/runtime/error-codec.d.ts +20 -0
  1113. package/dist/store/sqlite/runtime/error-codec.js +104 -0
  1114. package/dist/store/sqlite/runtime/executor-counts.js +12 -0
  1115. package/dist/store/sqlite/runtime/executor.d.ts +52 -0
  1116. package/dist/store/sqlite/runtime/executor.js +384 -0
  1117. package/dist/store/sqlite/runtime/grant.d.ts +22 -0
  1118. package/dist/store/sqlite/runtime/grant.js +9 -0
  1119. package/dist/store/sqlite/runtime/handle-clock.d.ts +9 -0
  1120. package/dist/store/sqlite/runtime/handle-clock.js +18 -0
  1121. package/dist/store/sqlite/runtime/handles.d.ts +20 -0
  1122. package/dist/store/sqlite/runtime/handles.js +104 -0
  1123. package/dist/store/sqlite/runtime/held-connection.d.ts +11 -0
  1124. package/dist/store/sqlite/runtime/held-connection.js +58 -0
  1125. package/dist/store/sqlite/runtime/hippo-db-stores.d.ts +7 -0
  1126. package/dist/store/sqlite/runtime/hippo-db-stores.js +12 -0
  1127. package/dist/store/sqlite/runtime/keyset.d.ts +48 -0
  1128. package/dist/store/sqlite/runtime/keyset.js +74 -0
  1129. package/dist/store/sqlite/runtime/open.d.ts +55 -0
  1130. package/dist/store/sqlite/runtime/open.js +180 -0
  1131. package/dist/store/sqlite/runtime/port-errors.d.ts +10 -0
  1132. package/dist/store/sqlite/runtime/port-errors.js +25 -0
  1133. package/dist/store/sqlite/runtime/request-scope.d.ts +16 -0
  1134. package/dist/store/sqlite/runtime/request-scope.js +40 -0
  1135. package/dist/store/sqlite/runtime/rows.d.ts +125 -0
  1136. package/dist/store/sqlite/runtime/rows.js +249 -0
  1137. package/dist/store/sqlite/runtime/rule-sql.d.ts +32 -0
  1138. package/dist/store/sqlite/runtime/rule-sql.js +102 -0
  1139. package/dist/store/sqlite/runtime/server-runtime.d.ts +41 -0
  1140. package/dist/store/sqlite/runtime/server-runtime.js +58 -0
  1141. package/dist/store/sqlite/runtime/tenant-lookup.d.ts +12 -0
  1142. package/dist/store/sqlite/runtime/tenant-lookup.js +20 -0
  1143. package/dist/store/sqlite/runtime/tenant-wire.d.ts +15 -0
  1144. package/dist/store/sqlite/runtime/tenant-wire.js +37 -0
  1145. package/dist/store/sqlite/runtime/tenant.d.ts +16 -0
  1146. package/dist/store/sqlite/runtime/tenant.js +22 -0
  1147. package/dist/store/sqlite/runtime/vector-pack.d.ts +17 -0
  1148. package/dist/store/sqlite/runtime/vector-pack.js +41 -0
  1149. package/dist/store/sqlite/runtime/worker-entry.js +10 -0
  1150. package/dist/store/sqlite/runtime/worker-jobs.d.ts +6 -0
  1151. package/dist/store/sqlite/runtime/worker-jobs.js +181 -0
  1152. package/dist/store/sqlite/runtime/worker-ops.d.ts +78 -0
  1153. package/dist/store/sqlite/runtime/worker-ops.js +37 -0
  1154. package/dist/store/sqlite/runtime/worker-store.d.ts +30 -0
  1155. package/dist/store/sqlite/runtime/worker-store.js +172 -0
  1156. package/dist/store/sqlite/sessions/goals.d.ts +30 -0
  1157. package/dist/store/sqlite/sessions/goals.js +282 -0
  1158. package/dist/store/sqlite/sessions/handoffs.d.ts +36 -0
  1159. package/dist/store/sqlite/sessions/handoffs.js +245 -0
  1160. package/dist/store/sqlite/sessions/session-mirrors.d.ts +5 -0
  1161. package/dist/store/sqlite/sessions/session-mirrors.js +87 -0
  1162. package/dist/store/sqlite/sessions/sessions.d.ts +14 -0
  1163. package/dist/store/sqlite/sessions/sessions.js +316 -0
  1164. package/dist/store/sqlite/sessions/task-snapshots.d.ts +16 -0
  1165. package/dist/store/sqlite/sessions/task-snapshots.js +93 -0
  1166. package/dist/store/sqlite/sharing/copy-rows.d.ts +25 -0
  1167. package/dist/store/sqlite/sharing/copy-rows.js +69 -0
  1168. package/dist/store/sqlite/sharing/promotion.d.ts +4 -0
  1169. package/dist/store/sqlite/sharing/promotion.js +8 -0
  1170. package/dist/store/sqlite/sharing/sharing.d.ts +4 -0
  1171. package/dist/store/sqlite/sharing/sharing.js +20 -0
  1172. package/dist/store/sqlite/store.d.ts +32 -25
  1173. package/dist/store/sqlite/store.js +217 -307
  1174. package/dist/store/sqlite/vectors/embed-lock.d.ts +8 -0
  1175. package/dist/store/sqlite/vectors/embed-lock.js +22 -0
  1176. package/dist/store/sqlite/vectors/embedding-index.d.ts +4 -0
  1177. package/dist/store/sqlite/vectors/embedding-index.js +111 -0
  1178. package/dist/store/sqlite/vectors/vector-graph-file.d.ts +5 -0
  1179. package/dist/store/sqlite/vectors/vector-graph-file.js +10 -0
  1180. package/dist/store/sqlite/vectors/vector-index.d.ts +62 -0
  1181. package/dist/store/sqlite/vectors/vector-index.js +223 -0
  1182. package/dist/store/sqlite/vectors/vector-reads.d.ts +23 -0
  1183. package/dist/store/sqlite/vectors/vector-reads.js +48 -0
  1184. package/dist/surface/capture/caller-session.d.ts +20 -0
  1185. package/dist/surface/capture/caller-session.js +65 -0
  1186. package/dist/surface/capture/capture-error.d.ts +22 -0
  1187. package/dist/surface/capture/capture-error.js +63 -0
  1188. package/dist/surface/capture/codex-patch.d.ts +13 -0
  1189. package/dist/surface/capture/codex-patch.js +81 -0
  1190. package/dist/surface/capture/codex-session.js +83 -0
  1191. package/dist/surface/capture/command.d.ts +74 -0
  1192. package/dist/surface/capture/command.js +259 -0
  1193. package/dist/surface/capture/compact-resume-caller.d.ts +11 -0
  1194. package/dist/surface/capture/compact-resume-caller.js +48 -0
  1195. package/dist/surface/capture/compact.d.ts +35 -0
  1196. package/dist/surface/capture/compact.js +316 -0
  1197. package/dist/surface/capture/compaction-items-caller.d.ts +19 -0
  1198. package/dist/surface/capture/compaction-items-caller.js +39 -0
  1199. package/dist/surface/capture/compaction-record.d.ts +42 -0
  1200. package/dist/surface/capture/compaction-record.js +215 -0
  1201. package/dist/surface/capture/copilot-transcript.d.ts +26 -0
  1202. package/dist/surface/capture/copilot-transcript.js +60 -0
  1203. package/dist/surface/capture/extract.d.ts +11 -0
  1204. package/dist/surface/capture/extract.js +193 -0
  1205. package/dist/surface/capture/failure-caller.d.ts +22 -0
  1206. package/dist/surface/capture/failure-caller.js +106 -0
  1207. package/dist/surface/capture/failure-reading.d.ts +54 -0
  1208. package/dist/surface/capture/failure-reading.js +111 -0
  1209. package/dist/surface/capture/handoff-evidence.d.ts +5 -0
  1210. package/dist/surface/capture/handoff-evidence.js +38 -0
  1211. package/dist/surface/capture/pre-compact-caller.d.ts +16 -0
  1212. package/dist/surface/capture/pre-compact-caller.js +52 -0
  1213. package/dist/surface/capture/session-digest.d.ts +42 -0
  1214. package/dist/surface/capture/session-digest.js +372 -0
  1215. package/dist/surface/capture/session-end-caller.d.ts +25 -0
  1216. package/dist/surface/capture/session-end-caller.js +45 -0
  1217. package/dist/surface/capture/session-texts.d.ts +21 -0
  1218. package/dist/surface/capture/session-texts.js +67 -0
  1219. package/dist/surface/capture/session-worker.d.ts +21 -0
  1220. package/dist/surface/capture/session-worker.js +262 -0
  1221. package/dist/surface/capture/share-scrub.d.ts +4 -0
  1222. package/dist/surface/capture/share-scrub.js +9 -0
  1223. package/dist/surface/capture/transcript.d.ts +46 -0
  1224. package/dist/surface/capture/transcript.js +245 -0
  1225. package/dist/surface/capture/working-state.d.ts +7 -0
  1226. package/dist/surface/capture/working-state.js +95 -0
  1227. package/dist/surface/cli/api-context.d.ts +67 -0
  1228. package/dist/surface/cli/api-context.js +207 -0
  1229. package/dist/surface/cli/audit-prune.d.ts +4 -0
  1230. package/dist/surface/cli/audit-prune.js +15 -0
  1231. package/dist/surface/cli/audit.d.ts +3 -0
  1232. package/dist/surface/cli/audit.js +184 -0
  1233. package/dist/surface/cli/auth.d.ts +3 -0
  1234. package/dist/surface/cli/auth.js +191 -0
  1235. package/dist/surface/cli/briefs.d.ts +2 -0
  1236. package/dist/surface/cli/briefs.js +72 -0
  1237. package/dist/surface/cli/card.d.ts +5 -0
  1238. package/dist/surface/cli/card.js +342 -0
  1239. package/dist/surface/cli/cli-runtime.d.ts +8 -0
  1240. package/dist/surface/cli/cli-runtime.js +27 -0
  1241. package/dist/surface/cli/client.d.ts +60 -0
  1242. package/dist/surface/cli/client.js +183 -0
  1243. package/dist/surface/cli/compact-resume-payload.d.ts +11 -0
  1244. package/dist/surface/cli/compact-resume-payload.js +42 -0
  1245. package/dist/surface/cli/conflicts.d.ts +4 -0
  1246. package/dist/surface/cli/conflicts.js +110 -0
  1247. package/dist/surface/cli/context.d.ts +3 -0
  1248. package/dist/surface/cli/context.js +247 -0
  1249. package/dist/surface/cli/continuity.d.ts +5 -0
  1250. package/dist/surface/cli/continuity.js +200 -0
  1251. package/dist/surface/cli/copilot-report.d.ts +4 -0
  1252. package/dist/surface/cli/copilot-report.js +115 -0
  1253. package/dist/surface/cli/curate-held.d.ts +9 -0
  1254. package/dist/surface/cli/curate-held.js +136 -0
  1255. package/dist/surface/cli/curate.d.ts +5 -0
  1256. package/dist/surface/cli/curate.js +162 -0
  1257. package/dist/surface/cli/dag.d.ts +5 -0
  1258. package/dist/surface/cli/dag.js +204 -0
  1259. package/dist/surface/cli/daily-runner.d.ts +3 -0
  1260. package/dist/surface/cli/daily-runner.js +111 -0
  1261. package/dist/surface/cli/dashboard-banner.d.ts +15 -0
  1262. package/dist/surface/cli/dashboard-banner.js +42 -0
  1263. package/dist/surface/cli/decisions.d.ts +3 -0
  1264. package/dist/surface/cli/decisions.js +110 -0
  1265. package/dist/surface/cli/dlq-replay.d.ts +4 -0
  1266. package/dist/surface/cli/dlq-replay.js +17 -0
  1267. package/dist/surface/cli/doctor-store-checks.d.ts +9 -0
  1268. package/dist/surface/cli/doctor-store-checks.js +285 -0
  1269. package/dist/surface/cli/doctor.d.ts +53 -0
  1270. package/dist/surface/cli/doctor.js +232 -0
  1271. package/dist/surface/cli/eval.d.ts +7 -0
  1272. package/dist/surface/cli/eval.js +322 -0
  1273. package/dist/surface/cli/exit.d.ts +12 -0
  1274. package/dist/surface/cli/exit.js +22 -0
  1275. package/dist/surface/cli/explain.d.ts +3 -0
  1276. package/dist/surface/cli/explain.js +198 -0
  1277. package/dist/surface/cli/flag-defaults.d.ts +11 -0
  1278. package/dist/surface/cli/flag-defaults.js +13 -0
  1279. package/dist/surface/cli/flag-values.d.ts +57 -0
  1280. package/dist/surface/cli/flag-values.js +173 -0
  1281. package/dist/surface/cli/flags.d.ts +16 -0
  1282. package/dist/surface/cli/flags.js +42 -0
  1283. package/dist/surface/cli/github.d.ts +15 -0
  1284. package/dist/surface/cli/github.js +174 -0
  1285. package/dist/surface/cli/goals.d.ts +3 -0
  1286. package/dist/surface/cli/goals.js +180 -0
  1287. package/dist/surface/cli/graph-page-client.d.ts +2 -0
  1288. package/dist/surface/cli/graph-page-client.js +98 -0
  1289. package/dist/surface/cli/graph-page.d.ts +15 -0
  1290. package/dist/surface/cli/graph-page.js +152 -0
  1291. package/dist/surface/cli/graph.d.ts +3 -0
  1292. package/dist/surface/cli/graph.js +92 -0
  1293. package/dist/surface/cli/handoff.d.ts +3 -0
  1294. package/dist/surface/cli/handoff.js +127 -0
  1295. package/dist/surface/cli/hook-runtime.d.ts +59 -0
  1296. package/dist/surface/cli/hook-runtime.js +162 -0
  1297. package/dist/surface/cli/hook.d.ts +3 -0
  1298. package/dist/surface/cli/hook.js +221 -0
  1299. package/dist/surface/cli/hooks/capture-error.d.ts +5 -0
  1300. package/dist/surface/cli/hooks/capture-error.js +42 -0
  1301. package/dist/surface/cli/hooks/capture.d.ts +3 -0
  1302. package/dist/surface/cli/hooks/capture.js +53 -0
  1303. package/dist/surface/cli/hooks/codex-run.d.ts +3 -0
  1304. package/dist/surface/cli/hooks/codex-run.js +143 -0
  1305. package/dist/surface/cli/hooks/codex-session-end-worker.d.ts +3 -0
  1306. package/dist/surface/cli/hooks/codex-session-end-worker.js +98 -0
  1307. package/dist/surface/cli/hooks/compact-resume.d.ts +3 -0
  1308. package/dist/surface/cli/hooks/compact-resume.js +81 -0
  1309. package/dist/surface/cli/hooks/post-compact.d.ts +4 -0
  1310. package/dist/surface/cli/hooks/post-compact.js +37 -0
  1311. package/dist/surface/cli/hooks/pre-compact.d.ts +3 -0
  1312. package/dist/surface/cli/hooks/pre-compact.js +46 -0
  1313. package/dist/surface/cli/hooks/session-end-worker.d.ts +3 -0
  1314. package/dist/surface/cli/hooks/session-end-worker.js +85 -0
  1315. package/dist/surface/cli/hooks/session-end.d.ts +6 -0
  1316. package/dist/surface/cli/hooks/session-end.js +162 -0
  1317. package/dist/surface/cli/incidents.d.ts +3 -0
  1318. package/dist/surface/cli/incidents.js +97 -0
  1319. package/dist/surface/cli/init.js +394 -0
  1320. package/dist/surface/cli/install-steps.d.ts +17 -0
  1321. package/dist/surface/cli/install-steps.js +156 -0
  1322. package/dist/surface/cli/json-list.d.ts +4 -0
  1323. package/dist/surface/cli/json-list.js +17 -0
  1324. package/dist/surface/cli/last-sleep.d.ts +10 -0
  1325. package/dist/surface/cli/last-sleep.js +75 -0
  1326. package/dist/surface/cli/learn.d.ts +4 -0
  1327. package/dist/surface/cli/learn.js +94 -0
  1328. package/dist/surface/cli/maintenance.d.ts +6 -0
  1329. package/dist/surface/cli/maintenance.js +192 -0
  1330. package/dist/surface/cli/memory-import.d.ts +3 -0
  1331. package/dist/surface/cli/memory-import.js +247 -0
  1332. package/dist/surface/cli/memory-writes.d.ts +65 -0
  1333. package/dist/surface/cli/memory-writes.js +173 -0
  1334. package/dist/surface/cli/notes.d.ts +2 -0
  1335. package/dist/surface/cli/notes.js +40 -0
  1336. package/dist/surface/cli/object-verbs.d.ts +42 -0
  1337. package/dist/surface/cli/object-verbs.js +64 -0
  1338. package/dist/surface/cli/open-browser.js +37 -0
  1339. package/dist/surface/cli/output.js +8 -0
  1340. package/dist/surface/cli/owner-validation.d.ts +19 -0
  1341. package/dist/surface/cli/owner-validation.js +34 -0
  1342. package/dist/surface/cli/playbooks.d.ts +4 -0
  1343. package/dist/surface/cli/playbooks.js +189 -0
  1344. package/dist/surface/cli/predictions.d.ts +3 -0
  1345. package/dist/surface/cli/predictions.js +177 -0
  1346. package/dist/surface/cli/print.d.ts +24 -0
  1347. package/dist/surface/cli/print.js +91 -0
  1348. package/dist/surface/cli/projects.d.ts +3 -0
  1349. package/dist/surface/cli/projects.js +127 -0
  1350. package/dist/surface/cli/quality-repair-once.d.ts +4 -0
  1351. package/dist/surface/cli/quality-repair-once.js +42 -0
  1352. package/dist/surface/cli/recall-block.d.ts +46 -0
  1353. package/dist/surface/cli/recall-block.js +173 -0
  1354. package/dist/surface/cli/recall-flags.d.ts +32 -0
  1355. package/dist/surface/cli/recall-flags.js +141 -0
  1356. package/dist/surface/cli/recall.d.ts +9 -0
  1357. package/dist/surface/cli/recall.js +143 -0
  1358. package/dist/surface/cli/refine-llm.d.ts +35 -0
  1359. package/dist/surface/cli/refine-llm.js +134 -0
  1360. package/dist/surface/cli/rejections.d.ts +5 -0
  1361. package/dist/surface/cli/rejections.js +105 -0
  1362. package/dist/surface/cli/remember.d.ts +4 -0
  1363. package/dist/surface/cli/remember.js +223 -0
  1364. package/dist/surface/cli/run-watched.d.ts +15 -0
  1365. package/dist/surface/cli/run-watched.js +57 -0
  1366. package/dist/surface/cli/scheduler.d.ts +26 -0
  1367. package/dist/surface/cli/scheduler.js +145 -0
  1368. package/dist/surface/cli/serve.d.ts +5 -0
  1369. package/dist/surface/cli/serve.js +103 -0
  1370. package/dist/surface/cli/server-nearest.d.ts +5 -0
  1371. package/dist/surface/cli/server-nearest.js +45 -0
  1372. package/dist/surface/cli/session.d.ts +3 -0
  1373. package/dist/surface/cli/session.js +157 -0
  1374. package/dist/surface/cli/setup.d.ts +3 -0
  1375. package/dist/surface/cli/setup.js +180 -0
  1376. package/dist/surface/cli/shared.d.ts +34 -0
  1377. package/dist/surface/cli/shared.js +72 -0
  1378. package/dist/surface/cli/slack.d.ts +3 -0
  1379. package/dist/surface/cli/slack.js +128 -0
  1380. package/dist/surface/cli/sleep-render.d.ts +7 -0
  1381. package/dist/surface/cli/sleep-render.js +80 -0
  1382. package/dist/surface/cli/sleep.d.ts +6 -0
  1383. package/dist/surface/cli/sleep.js +147 -0
  1384. package/dist/surface/cli/status.d.ts +18 -0
  1385. package/dist/surface/cli/status.js +386 -0
  1386. package/dist/surface/cli/stdin.d.ts +23 -0
  1387. package/dist/surface/cli/stdin.js +112 -0
  1388. package/dist/surface/cli/support-bundle.d.ts +12 -0
  1389. package/dist/surface/cli/support-bundle.js +357 -0
  1390. package/dist/surface/cli/trace.d.ts +3 -0
  1391. package/dist/surface/cli/trace.js +196 -0
  1392. package/dist/surface/cli/transfer.d.ts +7 -0
  1393. package/dist/surface/cli/transfer.js +150 -0
  1394. package/dist/surface/cli/usage.js +82 -0
  1395. package/dist/surface/cli/verb-row.d.ts +46 -0
  1396. package/dist/surface/cli/verb-row.js +13 -0
  1397. package/dist/surface/cli/verbs/health.js +306 -0
  1398. package/dist/surface/cli/verbs/memory.js +315 -0
  1399. package/dist/surface/cli/verbs/objects.js +319 -0
  1400. package/dist/surface/cli/verbs/sessions.js +413 -0
  1401. package/dist/surface/cli/verbs.d.ts +93 -0
  1402. package/dist/surface/cli/verbs.js +19 -0
  1403. package/dist/surface/cli/versioned-verbs.d.ts +48 -0
  1404. package/dist/surface/cli/versioned-verbs.js +93 -0
  1405. package/dist/surface/connectors/dlq.d.ts +79 -0
  1406. package/dist/surface/connectors/dlq.js +88 -0
  1407. package/dist/surface/connectors/github/backfill.d.ts +28 -0
  1408. package/dist/surface/connectors/github/backfill.js +247 -0
  1409. package/dist/surface/connectors/github/deletion.d.ts +22 -0
  1410. package/dist/surface/connectors/github/deletion.js +19 -0
  1411. package/dist/surface/connectors/github/dlq.d.ts +33 -0
  1412. package/dist/surface/connectors/github/dlq.js +61 -0
  1413. package/dist/surface/connectors/github/ingest.d.ts +27 -0
  1414. package/dist/surface/connectors/github/ingest.js +65 -0
  1415. package/dist/surface/connectors/github/octokit-client.d.ts +25 -0
  1416. package/dist/surface/connectors/github/octokit-client.js +87 -0
  1417. package/dist/surface/connectors/github/ratelimit.d.ts +13 -0
  1418. package/dist/surface/connectors/github/ratelimit.js +24 -0
  1419. package/dist/surface/connectors/github/scope.d.ts +5 -0
  1420. package/dist/surface/connectors/github/scope.js +10 -0
  1421. package/dist/surface/connectors/github/signature.d.ts +27 -0
  1422. package/dist/surface/connectors/github/signature.js +41 -0
  1423. package/dist/surface/connectors/github/transform.d.ts +7 -0
  1424. package/dist/surface/connectors/github/transform.js +67 -0
  1425. package/dist/surface/connectors/github/types.d.ts +82 -0
  1426. package/dist/surface/connectors/github/types.js +91 -0
  1427. package/dist/surface/connectors/github/webhook.d.ts +11 -0
  1428. package/dist/surface/connectors/github/webhook.js +287 -0
  1429. package/dist/surface/connectors/hmac.d.ts +8 -0
  1430. package/dist/surface/connectors/hmac.js +17 -0
  1431. package/dist/surface/connectors/ingest.d.ts +25 -0
  1432. package/dist/surface/connectors/ingest.js +35 -0
  1433. package/dist/surface/connectors/previous-secret.d.ts +18 -0
  1434. package/dist/surface/connectors/previous-secret.js +51 -0
  1435. package/dist/surface/connectors/slack/backfill.d.ts +30 -0
  1436. package/dist/surface/connectors/slack/backfill.js +47 -0
  1437. package/dist/surface/connectors/slack/deletion.d.ts +16 -0
  1438. package/dist/surface/connectors/slack/deletion.js +25 -0
  1439. package/dist/surface/connectors/slack/dlq.d.ts +23 -0
  1440. package/dist/surface/connectors/slack/dlq.js +101 -0
  1441. package/dist/surface/connectors/slack/ingest.d.ts +15 -0
  1442. package/dist/surface/connectors/slack/ingest.js +20 -0
  1443. package/dist/surface/connectors/slack/scope.d.ts +10 -0
  1444. package/dist/surface/connectors/slack/scope.js +7 -0
  1445. package/dist/surface/connectors/slack/signature.d.ts +24 -0
  1446. package/dist/surface/connectors/slack/signature.js +32 -0
  1447. package/dist/surface/connectors/slack/transform.d.ts +16 -0
  1448. package/dist/surface/connectors/slack/transform.js +34 -0
  1449. package/dist/surface/connectors/slack/types.d.ts +33 -0
  1450. package/dist/surface/connectors/slack/types.js +22 -0
  1451. package/dist/surface/connectors/slack/web-client.js +67 -0
  1452. package/dist/surface/connectors/slack/webhook.d.ts +8 -0
  1453. package/dist/surface/connectors/slack/webhook.js +232 -0
  1454. package/dist/surface/connectors/slack/workspaces.d.ts +11 -0
  1455. package/dist/surface/connectors/slack/workspaces.js +13 -0
  1456. package/dist/surface/connectors/tenant-route.d.ts +12 -0
  1457. package/dist/surface/connectors/tenant-route.js +9 -0
  1458. package/dist/surface/dashboard/dashboard-actions.d.ts +25 -0
  1459. package/dist/surface/dashboard/dashboard-actions.js +88 -0
  1460. package/dist/surface/dashboard/dashboard-page.d.ts +11 -0
  1461. package/dist/surface/dashboard/dashboard-page.js +64 -0
  1462. package/dist/surface/dashboard/dashboard-params.d.ts +26 -0
  1463. package/dist/surface/dashboard/dashboard-params.js +128 -0
  1464. package/dist/surface/dashboard/dashboard.d.ts +15 -0
  1465. package/dist/surface/dashboard/dashboard.js +74 -0
  1466. package/dist/surface/dashboard/static-file.d.ts +31 -0
  1467. package/dist/surface/dashboard/static-file.js +134 -0
  1468. package/dist/surface/entry-infra.d.ts +14 -0
  1469. package/dist/surface/entry-infra.js +19 -0
  1470. package/dist/surface/hooks-install/codex-wrapper.d.ts +18 -0
  1471. package/dist/surface/hooks-install/codex-wrapper.js +282 -0
  1472. package/dist/surface/hooks-install/copilot.d.ts +9 -0
  1473. package/dist/surface/hooks-install/copilot.js +166 -0
  1474. package/dist/surface/hooks-install/detect.d.ts +14 -0
  1475. package/dist/surface/hooks-install/detect.js +97 -0
  1476. package/dist/surface/hooks-install/instructions.d.ts +7 -0
  1477. package/dist/surface/hooks-install/instructions.js +15 -0
  1478. package/dist/surface/hooks-install/json-hooks.d.ts +21 -0
  1479. package/dist/surface/hooks-install/json-hooks.js +90 -0
  1480. package/dist/surface/hooks-install/opencode.d.ts +6 -0
  1481. package/dist/surface/hooks-install/opencode.js +50 -0
  1482. package/dist/surface/hooks-install/rules/claude-hooks.d.ts +15 -0
  1483. package/dist/surface/hooks-install/rules/claude-hooks.js +172 -0
  1484. package/dist/surface/hooks-install/rules/codex-hooks.d.ts +9 -0
  1485. package/dist/surface/hooks-install/rules/codex-hooks.js +59 -0
  1486. package/dist/surface/hooks-install/rules/codex-wrapper.d.ts +67 -0
  1487. package/dist/surface/hooks-install/rules/codex-wrapper.js +127 -0
  1488. package/dist/surface/hooks-install/rules/copilot.d.ts +115 -0
  1489. package/dist/surface/hooks-install/rules/copilot.js +206 -0
  1490. package/dist/surface/hooks-install/rules/hook-blocks.d.ts +27 -0
  1491. package/dist/surface/hooks-install/rules/hook-blocks.js +151 -0
  1492. package/dist/surface/hooks-install/rules/hook-handlers.d.ts +18 -0
  1493. package/dist/surface/hooks-install/rules/hook-handlers.js +63 -0
  1494. package/dist/surface/hooks-install/rules/install-plan.d.ts +17 -0
  1495. package/dist/surface/hooks-install/rules/install-plan.js +37 -0
  1496. package/dist/surface/hooks-install/rules/json-hooks.d.ts +59 -0
  1497. package/dist/surface/hooks-install/rules/json-hooks.js +100 -0
  1498. package/dist/surface/hooks-install/rules/opencode.d.ts +27 -0
  1499. package/dist/surface/hooks-install/rules/opencode.js +115 -0
  1500. package/dist/surface/hooks-install/rules/shared.d.ts +43 -0
  1501. package/dist/surface/hooks-install/rules/shared.js +47 -0
  1502. package/dist/surface/http/http-util.d.ts +46 -0
  1503. package/dist/surface/http/http-util.js +126 -0
  1504. package/dist/surface/importers/core.d.ts +75 -0
  1505. package/dist/surface/importers/core.js +129 -0
  1506. package/dist/surface/importers/markdown-parse.d.ts +27 -0
  1507. package/dist/surface/importers/markdown-parse.js +109 -0
  1508. package/dist/surface/importers/markdown.d.ts +3 -0
  1509. package/dist/surface/importers/markdown.js +87 -0
  1510. package/dist/surface/importers/sources.d.ts +7 -0
  1511. package/dist/surface/importers/sources.js +208 -0
  1512. package/dist/surface/importers/vault.d.ts +15 -0
  1513. package/dist/surface/importers/vault.js +303 -0
  1514. package/dist/surface/mcp/admin-tools.d.ts +8 -0
  1515. package/dist/surface/mcp/admin-tools.js +117 -0
  1516. package/dist/surface/mcp/framing.d.ts +22 -0
  1517. package/dist/surface/mcp/framing.js +69 -0
  1518. package/dist/surface/mcp/json-rpc.d.ts +30 -0
  1519. package/dist/surface/mcp/json-rpc.js +17 -0
  1520. package/dist/surface/mcp/memory-tools.d.ts +5 -0
  1521. package/dist/surface/mcp/memory-tools.js +59 -0
  1522. package/dist/surface/mcp/protocol.d.ts +113 -0
  1523. package/dist/surface/mcp/protocol.js +99 -0
  1524. package/dist/surface/mcp/recall-tools.d.ts +6 -0
  1525. package/dist/surface/mcp/recall-tools.js +111 -0
  1526. package/dist/surface/mcp/request.d.ts +16 -0
  1527. package/dist/surface/mcp/request.js +187 -0
  1528. package/dist/surface/mcp/server.d.ts +8 -0
  1529. package/dist/surface/mcp/server.js +35 -0
  1530. package/dist/surface/mcp/shared-gate.d.ts +5 -0
  1531. package/dist/surface/mcp/shared-gate.js +24 -0
  1532. package/dist/surface/mcp/stdio.d.ts +8 -0
  1533. package/dist/surface/mcp/stdio.js +256 -0
  1534. package/dist/surface/mcp/tool-args.d.ts +35 -0
  1535. package/dist/surface/mcp/tool-args.js +118 -0
  1536. package/dist/surface/mcp/tool-recall.d.ts +15 -0
  1537. package/dist/surface/mcp/tool-recall.js +145 -0
  1538. package/dist/surface/mcp/tool-text.d.ts +28 -0
  1539. package/dist/surface/mcp/tool-text.js +145 -0
  1540. package/dist/surface/mcp/tools.js +306 -0
  1541. package/dist/surface/open-store.d.ts +15 -0
  1542. package/dist/surface/open-store.js +36 -0
  1543. package/dist/surface/render/recall-text.d.ts +33 -0
  1544. package/dist/surface/render/recall-text.js +47 -0
  1545. package/dist/surface/render/sleep-events.d.ts +6 -0
  1546. package/dist/surface/render/sleep-events.js +141 -0
  1547. package/dist/surface/server/api-key.d.ts +33 -0
  1548. package/dist/surface/server/api-key.js +112 -0
  1549. package/dist/surface/server/auth.d.ts +49 -0
  1550. package/dist/surface/server/auth.js +359 -0
  1551. package/dist/surface/server/boot.d.ts +15 -0
  1552. package/dist/surface/server/boot.js +345 -0
  1553. package/dist/surface/server/client-ip.d.ts +34 -0
  1554. package/dist/surface/server/client-ip.js +148 -0
  1555. package/dist/surface/server/cursor.d.ts +25 -0
  1556. package/dist/surface/server/cursor.js +26 -0
  1557. package/dist/surface/server/dashboard-listener.d.ts +31 -0
  1558. package/dist/surface/server/dashboard-listener.js +110 -0
  1559. package/dist/surface/server/dashboard-reader-thread.d.ts +2 -0
  1560. package/dist/surface/server/dashboard-reader-thread.js +104 -0
  1561. package/dist/surface/server/dashboard-reader.d.ts +74 -0
  1562. package/dist/surface/server/dashboard-reader.js +79 -0
  1563. package/dist/surface/server/dashboard-routes.d.ts +27 -0
  1564. package/dist/surface/server/dashboard-routes.js +74 -0
  1565. package/dist/surface/server/dashboard-session.d.ts +33 -0
  1566. package/dist/surface/server/dashboard-session.js +96 -0
  1567. package/dist/surface/server/dashboard-types.d.ts +32 -0
  1568. package/dist/surface/server/dashboard-types.js +4 -0
  1569. package/dist/surface/server/deadline.d.ts +12 -0
  1570. package/dist/surface/server/deadline.js +45 -0
  1571. package/dist/surface/server/defaults.js +6 -0
  1572. package/dist/surface/server/failure-replies.d.ts +12 -0
  1573. package/dist/surface/server/failure-replies.js +114 -0
  1574. package/dist/surface/server/failure-reply.d.ts +13 -0
  1575. package/dist/surface/server/failure-reply.js +24 -0
  1576. package/dist/surface/server/key-check-bounds.d.ts +18 -0
  1577. package/dist/surface/server/key-check-bounds.js +128 -0
  1578. package/dist/surface/server/lifecycle.d.ts +11 -0
  1579. package/dist/surface/server/lifecycle.js +52 -0
  1580. package/dist/surface/server/local-key.d.ts +20 -0
  1581. package/dist/surface/server/local-key.js +61 -0
  1582. package/dist/surface/server/loopback.d.ts +8 -0
  1583. package/dist/surface/server/loopback.js +27 -0
  1584. package/dist/surface/server/mcp-http.d.ts +9 -0
  1585. package/dist/surface/server/mcp-http.js +238 -0
  1586. package/dist/surface/server/prompt-hook-context.d.ts +4 -0
  1587. package/dist/surface/server/prompt-hook-context.js +32 -0
  1588. package/dist/surface/server/rate-limit.d.ts +30 -0
  1589. package/dist/surface/server/rate-limit.js +93 -0
  1590. package/dist/surface/server/rate-limits.d.ts +11 -0
  1591. package/dist/surface/server/rate-limits.js +74 -0
  1592. package/dist/surface/server/ready.d.ts +9 -0
  1593. package/dist/surface/server/ready.js +34 -0
  1594. package/dist/surface/server/request.d.ts +56 -0
  1595. package/dist/surface/server/request.js +218 -0
  1596. package/dist/surface/server/route-checks.d.ts +11 -0
  1597. package/dist/surface/server/route-checks.js +55 -0
  1598. package/dist/surface/server/route-lookup.d.ts +28 -0
  1599. package/dist/surface/server/route-lookup.js +44 -0
  1600. package/dist/surface/server/route-table.d.ts +62 -0
  1601. package/dist/surface/server/route-table.js +375 -0
  1602. package/dist/surface/server/routes/admin.d.ts +9 -0
  1603. package/dist/surface/server/routes/admin.js +186 -0
  1604. package/dist/surface/server/routes/customer-notes.d.ts +3 -0
  1605. package/dist/surface/server/routes/customer-notes.js +29 -0
  1606. package/dist/surface/server/routes/decisions.d.ts +3 -0
  1607. package/dist/surface/server/routes/decisions.js +46 -0
  1608. package/dist/surface/server/routes/incidents.d.ts +3 -0
  1609. package/dist/surface/server/routes/incidents.js +46 -0
  1610. package/dist/surface/server/routes/kind-routes.d.ts +26 -0
  1611. package/dist/surface/server/routes/kind-routes.js +32 -0
  1612. package/dist/surface/server/routes/memories.d.ts +13 -0
  1613. package/dist/surface/server/routes/memories.js +159 -0
  1614. package/dist/surface/server/routes/object-routes.d.ts +37 -0
  1615. package/dist/surface/server/routes/object-routes.js +83 -0
  1616. package/dist/surface/server/routes/policies.d.ts +3 -0
  1617. package/dist/surface/server/routes/policies.js +47 -0
  1618. package/dist/surface/server/routes/predictions.d.ts +3 -0
  1619. package/dist/surface/server/routes/predictions.js +119 -0
  1620. package/dist/surface/server/routes/processes.d.ts +3 -0
  1621. package/dist/surface/server/routes/processes.js +53 -0
  1622. package/dist/surface/server/routes/project-briefs.d.ts +3 -0
  1623. package/dist/surface/server/routes/project-briefs.js +42 -0
  1624. package/dist/surface/server/routes/recall.d.ts +6 -0
  1625. package/dist/surface/server/routes/recall.js +107 -0
  1626. package/dist/surface/server/routes/skills.d.ts +3 -0
  1627. package/dist/surface/server/routes/skills.js +37 -0
  1628. package/dist/surface/server/routes/vectors.d.ts +3 -0
  1629. package/dist/surface/server/routes/vectors.js +76 -0
  1630. package/dist/surface/server/server-detect.d.ts +55 -0
  1631. package/dist/surface/server/server-detect.js +317 -0
  1632. package/dist/surface/server/sleep-child.js +82 -0
  1633. package/dist/surface/server/sleep-offload.d.ts +42 -0
  1634. package/dist/surface/server/sleep-offload.js +141 -0
  1635. package/dist/surface/server/tls.d.ts +15 -0
  1636. package/dist/surface/server/tls.js +53 -0
  1637. package/dist/surface/server/types.d.ts +237 -0
  1638. package/dist/surface/server/validation.d.ts +56 -0
  1639. package/dist/surface/server/validation.js +154 -0
  1640. package/dist/surface/testing-kit.d.ts +2 -0
  1641. package/dist/surface/testing-kit.js +5 -0
  1642. package/dist-ui/assets/index-DWo8WuPW.js +33 -0
  1643. package/dist-ui/assets/react-BZPdts19.js +17 -0
  1644. package/dist-ui/index.html +2 -2
  1645. package/extensions/openclaw-plugin/index.ts +5 -5
  1646. package/extensions/openclaw-plugin/openclaw.plugin.json +1 -1
  1647. package/extensions/openclaw-plugin/package.json +1 -1
  1648. package/openclaw.plugin.json +1 -1
  1649. package/package.json +15 -8
  1650. package/dist/agent-memories/apply.d.ts +0 -40
  1651. package/dist/agent-memories/apply.js +0 -275
  1652. package/dist/agent-memories/claude-code.d.ts +0 -20
  1653. package/dist/agent-memories/claude-code.js +0 -189
  1654. package/dist/agent-memories/codex.js +0 -47
  1655. package/dist/agent-memories/copilot.js +0 -111
  1656. package/dist/agent-memories/files.d.ts +0 -37
  1657. package/dist/agent-memories/files.js +0 -90
  1658. package/dist/agent-memories/folder-store.d.ts +0 -17
  1659. package/dist/agent-memories/folder-store.js +0 -44
  1660. package/dist/agent-memories/gemini.js +0 -104
  1661. package/dist/agent-memories/git.d.ts +0 -8
  1662. package/dist/agent-memories/git.js +0 -11
  1663. package/dist/agent-memories/keys.d.ts +0 -9
  1664. package/dist/agent-memories/keys.js +0 -21
  1665. package/dist/agent-memories/legacy.d.ts +0 -20
  1666. package/dist/agent-memories/legacy.js +0 -69
  1667. package/dist/agent-memories/markdown.d.ts +0 -13
  1668. package/dist/agent-memories/markdown.js +0 -123
  1669. package/dist/agent-memories/openclaw.js +0 -45
  1670. package/dist/agent-memories/plan.d.ts +0 -78
  1671. package/dist/agent-memories/plan.js +0 -133
  1672. package/dist/agent-memories/project-folds.d.ts +0 -10
  1673. package/dist/agent-memories/project-folds.js +0 -35
  1674. package/dist/agent-memories/qwen-code.js +0 -50
  1675. package/dist/agent-memories/report.d.ts +0 -56
  1676. package/dist/agent-memories/report.js +0 -123
  1677. package/dist/agent-memories/source.d.ts +0 -22
  1678. package/dist/agent-memories/source.js +0 -41
  1679. package/dist/agent-memories/sync.d.ts +0 -40
  1680. package/dist/agent-memories/sync.js +0 -402
  1681. package/dist/agent-memories/types.d.ts +0 -40
  1682. package/dist/api/busy.d.ts +0 -2
  1683. package/dist/api/busy.js +0 -2
  1684. package/dist/api/cli-surface.d.ts +0 -6
  1685. package/dist/api/cli-surface.js +0 -6
  1686. package/dist/api/config-of.d.ts +0 -5
  1687. package/dist/api/config-of.js +0 -6
  1688. package/dist/api/context-auto.d.ts +0 -6
  1689. package/dist/api/context-auto.js +0 -41
  1690. package/dist/api/context-render.d.ts +0 -52
  1691. package/dist/api/context-render.js +0 -213
  1692. package/dist/api/context-select.d.ts +0 -65
  1693. package/dist/api/context-select.js +0 -321
  1694. package/dist/api/context-types.d.ts +0 -109
  1695. package/dist/api/context-types.js +0 -3
  1696. package/dist/api/context.d.ts +0 -16
  1697. package/dist/api/context.js +0 -506
  1698. package/dist/api/continuity.d.ts +0 -50
  1699. package/dist/api/continuity.js +0 -64
  1700. package/dist/api/objects/cards.d.ts +0 -39
  1701. package/dist/api/objects/cards.js +0 -50
  1702. package/dist/api/recall/render.d.ts +0 -39
  1703. package/dist/api/recall/render.js +0 -60
  1704. package/dist/capture/caller-session.d.ts +0 -19
  1705. package/dist/capture/caller-session.js +0 -57
  1706. package/dist/capture/capture-error.d.ts +0 -14
  1707. package/dist/capture/capture-error.js +0 -67
  1708. package/dist/capture/codex-patch.d.ts +0 -12
  1709. package/dist/capture/codex-patch.js +0 -78
  1710. package/dist/capture/command.d.ts +0 -46
  1711. package/dist/capture/command.js +0 -214
  1712. package/dist/capture/compact-resume-caller.d.ts +0 -11
  1713. package/dist/capture/compact-resume-caller.js +0 -42
  1714. package/dist/capture/compact.d.ts +0 -27
  1715. package/dist/capture/compact.js +0 -247
  1716. package/dist/capture/compaction-items-caller.d.ts +0 -16
  1717. package/dist/capture/compaction-items-caller.js +0 -31
  1718. package/dist/capture/compaction-record.d.ts +0 -31
  1719. package/dist/capture/compaction-record.js +0 -124
  1720. package/dist/capture/compaction-spool.d.ts +0 -56
  1721. package/dist/capture/compaction-spool.js +0 -514
  1722. package/dist/capture/copilot-transcript.d.ts +0 -26
  1723. package/dist/capture/copilot-transcript.js +0 -57
  1724. package/dist/capture/extract.d.ts +0 -12
  1725. package/dist/capture/extract.js +0 -188
  1726. package/dist/capture/failure-caller.d.ts +0 -21
  1727. package/dist/capture/failure-caller.js +0 -90
  1728. package/dist/capture/failure-reading.d.ts +0 -49
  1729. package/dist/capture/failure-reading.js +0 -95
  1730. package/dist/capture/handoff-evidence.d.ts +0 -5
  1731. package/dist/capture/handoff-evidence.js +0 -31
  1732. package/dist/capture/pre-compact-caller.d.ts +0 -16
  1733. package/dist/capture/pre-compact-caller.js +0 -47
  1734. package/dist/capture/session-digest.d.ts +0 -85
  1735. package/dist/capture/session-digest.js +0 -550
  1736. package/dist/capture/session-end-caller.d.ts +0 -24
  1737. package/dist/capture/session-end-caller.js +0 -43
  1738. package/dist/capture/session-texts.d.ts +0 -18
  1739. package/dist/capture/session-texts.js +0 -57
  1740. package/dist/capture/session-worker.d.ts +0 -15
  1741. package/dist/capture/session-worker.js +0 -236
  1742. package/dist/capture/share-scrub.d.ts +0 -3
  1743. package/dist/capture/share-scrub.js +0 -8
  1744. package/dist/capture/transcript.d.ts +0 -47
  1745. package/dist/capture/transcript.js +0 -208
  1746. package/dist/capture/working-state.d.ts +0 -29
  1747. package/dist/capture/working-state.js +0 -161
  1748. package/dist/cli/api-context.d.ts +0 -15
  1749. package/dist/cli/api-context.js +0 -49
  1750. package/dist/cli/audit-prune.d.ts +0 -3
  1751. package/dist/cli/audit-prune.js +0 -14
  1752. package/dist/cli/audit.d.ts +0 -3
  1753. package/dist/cli/audit.js +0 -187
  1754. package/dist/cli/auth.d.ts +0 -3
  1755. package/dist/cli/auth.js +0 -176
  1756. package/dist/cli/briefs.d.ts +0 -2
  1757. package/dist/cli/briefs.js +0 -77
  1758. package/dist/cli/card.d.ts +0 -4
  1759. package/dist/cli/card.js +0 -325
  1760. package/dist/cli/client.d.ts +0 -40
  1761. package/dist/cli/client.js +0 -171
  1762. package/dist/cli/compact-resume-payload.d.ts +0 -11
  1763. package/dist/cli/compact-resume-payload.js +0 -47
  1764. package/dist/cli/context.d.ts +0 -3
  1765. package/dist/cli/context.js +0 -235
  1766. package/dist/cli/continuity.d.ts +0 -7
  1767. package/dist/cli/continuity.js +0 -446
  1768. package/dist/cli/curate.d.ts +0 -16
  1769. package/dist/cli/curate.js +0 -518
  1770. package/dist/cli/dag.d.ts +0 -5
  1771. package/dist/cli/dag.js +0 -203
  1772. package/dist/cli/decisions.d.ts +0 -3
  1773. package/dist/cli/decisions.js +0 -116
  1774. package/dist/cli/eval.d.ts +0 -3
  1775. package/dist/cli/eval.js +0 -221
  1776. package/dist/cli/exit.d.ts +0 -9
  1777. package/dist/cli/exit.js +0 -19
  1778. package/dist/cli/explain.d.ts +0 -3
  1779. package/dist/cli/explain.js +0 -172
  1780. package/dist/cli/flag-values.d.ts +0 -30
  1781. package/dist/cli/flag-values.js +0 -121
  1782. package/dist/cli/flags.d.ts +0 -15
  1783. package/dist/cli/flags.js +0 -34
  1784. package/dist/cli/github.d.ts +0 -20
  1785. package/dist/cli/github.js +0 -196
  1786. package/dist/cli/goals.d.ts +0 -3
  1787. package/dist/cli/goals.js +0 -180
  1788. package/dist/cli/graph.d.ts +0 -3
  1789. package/dist/cli/graph.js +0 -87
  1790. package/dist/cli/hook-runtime.d.ts +0 -53
  1791. package/dist/cli/hook-runtime.js +0 -137
  1792. package/dist/cli/incidents.d.ts +0 -3
  1793. package/dist/cli/incidents.js +0 -112
  1794. package/dist/cli/init.js +0 -358
  1795. package/dist/cli/install-steps.d.ts +0 -17
  1796. package/dist/cli/install-steps.js +0 -133
  1797. package/dist/cli/last-sleep.d.ts +0 -11
  1798. package/dist/cli/last-sleep.js +0 -78
  1799. package/dist/cli/maintenance.d.ts +0 -6
  1800. package/dist/cli/maintenance.js +0 -193
  1801. package/dist/cli/notes.d.ts +0 -2
  1802. package/dist/cli/notes.js +0 -44
  1803. package/dist/cli/object-verbs.d.ts +0 -40
  1804. package/dist/cli/object-verbs.js +0 -63
  1805. package/dist/cli/open-browser.js +0 -35
  1806. package/dist/cli/output.js +0 -7
  1807. package/dist/cli/owner-validation.d.ts +0 -18
  1808. package/dist/cli/owner-validation.js +0 -33
  1809. package/dist/cli/playbooks.d.ts +0 -4
  1810. package/dist/cli/playbooks.js +0 -204
  1811. package/dist/cli/predictions.d.ts +0 -3
  1812. package/dist/cli/predictions.js +0 -170
  1813. package/dist/cli/print.d.ts +0 -15
  1814. package/dist/cli/print.js +0 -85
  1815. package/dist/cli/projects.d.ts +0 -3
  1816. package/dist/cli/projects.js +0 -118
  1817. package/dist/cli/quality-repair-once.d.ts +0 -3
  1818. package/dist/cli/quality-repair-once.js +0 -38
  1819. package/dist/cli/recall.d.ts +0 -3
  1820. package/dist/cli/recall.js +0 -470
  1821. package/dist/cli/refine-llm.d.ts +0 -46
  1822. package/dist/cli/refine-llm.js +0 -138
  1823. package/dist/cli/remember.d.ts +0 -5
  1824. package/dist/cli/remember.js +0 -435
  1825. package/dist/cli/scheduler.d.ts +0 -25
  1826. package/dist/cli/scheduler.js +0 -113
  1827. package/dist/cli/serve.d.ts +0 -5
  1828. package/dist/cli/serve.js +0 -89
  1829. package/dist/cli/session-hooks.d.ts +0 -14
  1830. package/dist/cli/session-hooks.js +0 -635
  1831. package/dist/cli/setup.d.ts +0 -5
  1832. package/dist/cli/setup.js +0 -553
  1833. package/dist/cli/shared.d.ts +0 -25
  1834. package/dist/cli/shared.js +0 -130
  1835. package/dist/cli/slack.d.ts +0 -3
  1836. package/dist/cli/slack.js +0 -134
  1837. package/dist/cli/sleep-render.d.ts +0 -6
  1838. package/dist/cli/sleep-render.js +0 -67
  1839. package/dist/cli/sleep.d.ts +0 -5
  1840. package/dist/cli/sleep.js +0 -122
  1841. package/dist/cli/status.d.ts +0 -15
  1842. package/dist/cli/status.js +0 -361
  1843. package/dist/cli/stdin.d.ts +0 -22
  1844. package/dist/cli/stdin.js +0 -110
  1845. package/dist/cli/transfer.d.ts +0 -10
  1846. package/dist/cli/transfer.js +0 -439
  1847. package/dist/cli/usage.js +0 -81
  1848. package/dist/cli/verb-row.d.ts +0 -34
  1849. package/dist/cli/verb-row.js +0 -6
  1850. package/dist/cli/verbs/health.js +0 -234
  1851. package/dist/cli/verbs/memory.js +0 -238
  1852. package/dist/cli/verbs/objects.js +0 -263
  1853. package/dist/cli/verbs/sessions.js +0 -314
  1854. package/dist/cli/verbs.d.ts +0 -81
  1855. package/dist/cli/verbs.js +0 -7
  1856. package/dist/cli/versioned-verbs.d.ts +0 -52
  1857. package/dist/cli/versioned-verbs.js +0 -89
  1858. package/dist/connectors/dlq.d.ts +0 -80
  1859. package/dist/connectors/dlq.js +0 -69
  1860. package/dist/connectors/github/backfill.d.ts +0 -28
  1861. package/dist/connectors/github/backfill.js +0 -220
  1862. package/dist/connectors/github/deletion.d.ts +0 -23
  1863. package/dist/connectors/github/deletion.js +0 -20
  1864. package/dist/connectors/github/dlq.d.ts +0 -32
  1865. package/dist/connectors/github/dlq.js +0 -52
  1866. package/dist/connectors/github/ingest.d.ts +0 -28
  1867. package/dist/connectors/github/ingest.js +0 -63
  1868. package/dist/connectors/github/octokit-client.d.ts +0 -25
  1869. package/dist/connectors/github/octokit-client.js +0 -80
  1870. package/dist/connectors/github/ratelimit.d.ts +0 -13
  1871. package/dist/connectors/github/ratelimit.js +0 -24
  1872. package/dist/connectors/github/scope.d.ts +0 -6
  1873. package/dist/connectors/github/scope.js +0 -11
  1874. package/dist/connectors/github/signature.d.ts +0 -27
  1875. package/dist/connectors/github/signature.js +0 -43
  1876. package/dist/connectors/github/tenant-routing.d.ts +0 -13
  1877. package/dist/connectors/github/tenant-routing.js +0 -23
  1878. package/dist/connectors/github/transform.d.ts +0 -7
  1879. package/dist/connectors/github/transform.js +0 -72
  1880. package/dist/connectors/github/types.d.ts +0 -83
  1881. package/dist/connectors/github/types.js +0 -92
  1882. package/dist/connectors/github/webhook.d.ts +0 -7
  1883. package/dist/connectors/github/webhook.js +0 -257
  1884. package/dist/connectors/ingest.d.ts +0 -12
  1885. package/dist/connectors/ingest.js +0 -28
  1886. package/dist/connectors/slack/backfill.d.ts +0 -29
  1887. package/dist/connectors/slack/backfill.js +0 -45
  1888. package/dist/connectors/slack/deletion.d.ts +0 -16
  1889. package/dist/connectors/slack/deletion.js +0 -27
  1890. package/dist/connectors/slack/dlq.d.ts +0 -20
  1891. package/dist/connectors/slack/dlq.js +0 -84
  1892. package/dist/connectors/slack/ingest.d.ts +0 -17
  1893. package/dist/connectors/slack/ingest.js +0 -20
  1894. package/dist/connectors/slack/scope.d.ts +0 -10
  1895. package/dist/connectors/slack/scope.js +0 -7
  1896. package/dist/connectors/slack/signature.d.ts +0 -17
  1897. package/dist/connectors/slack/signature.js +0 -28
  1898. package/dist/connectors/slack/tenant-routing.d.ts +0 -7
  1899. package/dist/connectors/slack/tenant-routing.js +0 -21
  1900. package/dist/connectors/slack/transform.d.ts +0 -16
  1901. package/dist/connectors/slack/transform.js +0 -34
  1902. package/dist/connectors/slack/types.d.ts +0 -37
  1903. package/dist/connectors/slack/types.js +0 -22
  1904. package/dist/connectors/slack/web-client.js +0 -63
  1905. package/dist/connectors/slack/webhook.d.ts +0 -7
  1906. package/dist/connectors/slack/webhook.js +0 -182
  1907. package/dist/connectors/slack/workspaces.d.ts +0 -17
  1908. package/dist/connectors/slack/workspaces.js +0 -14
  1909. package/dist/connectors/store.d.ts +0 -8
  1910. package/dist/connectors/store.js +0 -2
  1911. package/dist/consolidate/conflicts.d.ts +0 -10
  1912. package/dist/consolidate/conflicts.js +0 -177
  1913. package/dist/consolidate/dag-summary.d.ts +0 -8
  1914. package/dist/consolidate/dag-summary.js +0 -42
  1915. package/dist/consolidate/dag.d.ts +0 -48
  1916. package/dist/consolidate/dag.js +0 -298
  1917. package/dist/consolidate/decay.d.ts +0 -12
  1918. package/dist/consolidate/decay.js +0 -132
  1919. package/dist/consolidate/dedupe.d.ts +0 -45
  1920. package/dist/consolidate/dedupe.js +0 -116
  1921. package/dist/consolidate/flush-units.d.ts +0 -11
  1922. package/dist/consolidate/flush-units.js +0 -66
  1923. package/dist/consolidate/half-life-migration.d.ts +0 -44
  1924. package/dist/consolidate/half-life-migration.js +0 -119
  1925. package/dist/consolidate/llm-passes.d.ts +0 -3
  1926. package/dist/consolidate/llm-passes.js +0 -166
  1927. package/dist/consolidate/memory-value-weights.d.ts +0 -12
  1928. package/dist/consolidate/memory-value-weights.js +0 -21
  1929. package/dist/consolidate/memory-value.d.ts +0 -65
  1930. package/dist/consolidate/memory-value.js +0 -188
  1931. package/dist/consolidate/merge.d.ts +0 -10
  1932. package/dist/consolidate/merge.js +0 -232
  1933. package/dist/consolidate/overlap-index.d.ts +0 -13
  1934. package/dist/consolidate/overlap-index.js +0 -45
  1935. package/dist/consolidate/physics-pass.d.ts +0 -10
  1936. package/dist/consolidate/physics-pass.js +0 -81
  1937. package/dist/consolidate/replay.d.ts +0 -16
  1938. package/dist/consolidate/replay.js +0 -103
  1939. package/dist/consolidate/run.d.ts +0 -67
  1940. package/dist/consolidate/run.js +0 -40
  1941. package/dist/consolidate/sleep.d.ts +0 -21
  1942. package/dist/consolidate/sleep.js +0 -189
  1943. package/dist/consolidate/trace.d.ts +0 -24
  1944. package/dist/consolidate/trace.js +0 -58
  1945. package/dist/consolidate/traces.d.ts +0 -4
  1946. package/dist/consolidate/traces.js +0 -152
  1947. package/dist/core/ablation.d.ts +0 -31
  1948. package/dist/core/ablation.js +0 -71
  1949. package/dist/core/active-scope.d.ts +0 -9
  1950. package/dist/core/active-scope.js +0 -31
  1951. package/dist/core/agent-memory-tools.d.ts +0 -35
  1952. package/dist/core/agent-memory-tools.js +0 -21
  1953. package/dist/core/ambient.d.ts +0 -47
  1954. package/dist/core/ambient.js +0 -188
  1955. package/dist/core/api-errors.d.ts +0 -49
  1956. package/dist/core/api-errors.js +0 -63
  1957. package/dist/core/capture-contract.d.ts +0 -67
  1958. package/dist/core/capture-contract.js +0 -170
  1959. package/dist/core/card.d.ts +0 -50
  1960. package/dist/core/card.js +0 -29
  1961. package/dist/core/compaction-timing.js +0 -9
  1962. package/dist/core/compare.d.ts +0 -48
  1963. package/dist/core/compare.js +0 -86
  1964. package/dist/core/config.d.ts +0 -161
  1965. package/dist/core/config.js +0 -372
  1966. package/dist/core/cosine.d.ts +0 -6
  1967. package/dist/core/cosine.js +0 -22
  1968. package/dist/core/handoff.d.ts +0 -54
  1969. package/dist/core/handoff.js +0 -84
  1970. package/dist/core/markdown.d.ts +0 -6
  1971. package/dist/core/markdown.js +0 -115
  1972. package/dist/core/memory-audit.d.ts +0 -17
  1973. package/dist/core/memory-audit.js +0 -65
  1974. package/dist/core/memory-quality.d.ts +0 -44
  1975. package/dist/core/memory-quality.js +0 -227
  1976. package/dist/core/memory.d.ts +0 -246
  1977. package/dist/core/memory.js +0 -436
  1978. package/dist/core/merged-row.d.ts +0 -12
  1979. package/dist/core/merged-row.js +0 -43
  1980. package/dist/core/object-types.d.ts +0 -189
  1981. package/dist/core/object-types.js +0 -4
  1982. package/dist/core/package-root.d.ts +0 -5
  1983. package/dist/core/package-root.js +0 -7
  1984. package/dist/core/particle-refresh.d.ts +0 -8
  1985. package/dist/core/particle-refresh.js +0 -22
  1986. package/dist/core/physics-config.d.ts +0 -37
  1987. package/dist/core/physics-config.js +0 -29
  1988. package/dist/core/physics.d.ts +0 -102
  1989. package/dist/core/physics.js +0 -354
  1990. package/dist/core/prediction.d.ts +0 -3
  1991. package/dist/core/prediction.js +0 -6
  1992. package/dist/core/project-identity.d.ts +0 -83
  1993. package/dist/core/project-identity.js +0 -276
  1994. package/dist/core/project-remote.d.ts +0 -16
  1995. package/dist/core/project-remote.js +0 -166
  1996. package/dist/core/prompt-recall.d.ts +0 -38
  1997. package/dist/core/prompt-recall.js +0 -80
  1998. package/dist/core/raw-append-only.d.ts +0 -5
  1999. package/dist/core/raw-append-only.js +0 -7
  2000. package/dist/core/recall-scope.d.ts +0 -91
  2001. package/dist/core/recall-scope.js +0 -165
  2002. package/dist/core/rejection-digest.d.ts +0 -7
  2003. package/dist/core/rejection-digest.js +0 -13
  2004. package/dist/core/salience.d.ts +0 -18
  2005. package/dist/core/salience.js +0 -96
  2006. package/dist/core/search-types.d.ts +0 -106
  2007. package/dist/core/search-types.js +0 -15
  2008. package/dist/core/session-digest-row.d.ts +0 -5
  2009. package/dist/core/session-digest-row.js +0 -6
  2010. package/dist/dashboard/dashboard-actions.d.ts +0 -20
  2011. package/dist/dashboard/dashboard-actions.js +0 -100
  2012. package/dist/dashboard/dashboard-params.d.ts +0 -45
  2013. package/dist/dashboard/dashboard-params.js +0 -127
  2014. package/dist/dashboard/dashboard-queries.d.ts +0 -20
  2015. package/dist/dashboard/dashboard-queries.js +0 -346
  2016. package/dist/dashboard/dashboard-snapshot.d.ts +0 -139
  2017. package/dist/dashboard/dashboard-snapshot.js +0 -312
  2018. package/dist/dashboard/dashboard-types.d.ts +0 -164
  2019. package/dist/dashboard/dashboard-types.js +0 -3
  2020. package/dist/dashboard/dashboard.d.ts +0 -9
  2021. package/dist/dashboard/dashboard.js +0 -427
  2022. package/dist/db/continuity.d.ts +0 -11
  2023. package/dist/db/continuity.js +0 -206
  2024. package/dist/doctor.d.ts +0 -40
  2025. package/dist/doctor.js +0 -452
  2026. package/dist/embeddings/local.d.ts +0 -66
  2027. package/dist/embeddings/local.js +0 -150
  2028. package/dist/embeddings/provider.d.ts +0 -52
  2029. package/dist/embeddings/provider.js +0 -310
  2030. package/dist/embeddings/transformers.d.ts +0 -38
  2031. package/dist/embeddings/transformers.js +0 -106
  2032. package/dist/entry/sqlite-handles.d.ts +0 -10
  2033. package/dist/entry/sqlite-handles.js +0 -9
  2034. package/dist/eval/eval-stats.d.ts +0 -161
  2035. package/dist/eval/eval-stats.js +0 -282
  2036. package/dist/eval/eval-suite.d.ts +0 -73
  2037. package/dist/eval/eval-suite.js +0 -570
  2038. package/dist/eval/eval.d.ts +0 -91
  2039. package/dist/eval/eval.js +0 -173
  2040. package/dist/eval/judgment.d.ts +0 -25
  2041. package/dist/eval/judgment.js +0 -138
  2042. package/dist/graph/delta.d.ts +0 -12
  2043. package/dist/graph/delta.js +0 -101
  2044. package/dist/graph/extract.d.ts +0 -69
  2045. package/dist/graph/extract.js +0 -279
  2046. package/dist/graph/recall.d.ts +0 -50
  2047. package/dist/graph/recall.js +0 -260
  2048. package/dist/graph/stream.d.ts +0 -50
  2049. package/dist/graph/stream.js +0 -186
  2050. package/dist/graph/view.d.ts +0 -63
  2051. package/dist/graph/view.js +0 -298
  2052. package/dist/hooks/codex-session.js +0 -77
  2053. package/dist/hooks/codex-wrapper.d.ts +0 -57
  2054. package/dist/hooks/codex-wrapper.js +0 -294
  2055. package/dist/hooks/copilot.d.ts +0 -94
  2056. package/dist/hooks/copilot.js +0 -312
  2057. package/dist/hooks/hook-blocks.d.ts +0 -27
  2058. package/dist/hooks/hook-blocks.js +0 -159
  2059. package/dist/hooks/json-hooks.d.ts +0 -48
  2060. package/dist/hooks/json-hooks.js +0 -445
  2061. package/dist/hooks/opencode.d.ts +0 -12
  2062. package/dist/hooks/opencode.js +0 -157
  2063. package/dist/hooks/shared.d.ts +0 -62
  2064. package/dist/hooks/shared.js +0 -134
  2065. package/dist/importers/core.d.ts +0 -44
  2066. package/dist/importers/core.js +0 -111
  2067. package/dist/importers/markdown-parse.d.ts +0 -28
  2068. package/dist/importers/markdown-parse.js +0 -107
  2069. package/dist/importers/markdown.d.ts +0 -3
  2070. package/dist/importers/markdown.js +0 -81
  2071. package/dist/importers/sources.d.ts +0 -7
  2072. package/dist/importers/sources.js +0 -194
  2073. package/dist/importers/vault.d.ts +0 -5
  2074. package/dist/importers/vault.js +0 -277
  2075. package/dist/learn/autolearn.d.ts +0 -52
  2076. package/dist/learn/autolearn.js +0 -205
  2077. package/dist/learn/churn-git.d.ts +0 -25
  2078. package/dist/learn/churn-git.js +0 -139
  2079. package/dist/learn/extract.d.ts +0 -20
  2080. package/dist/learn/extract.js +0 -132
  2081. package/dist/learn/forward-claim-detector.d.ts +0 -24
  2082. package/dist/learn/forward-claim-detector.js +0 -81
  2083. package/dist/learn/invalidation.d.ts +0 -72
  2084. package/dist/learn/invalidation.js +0 -446
  2085. package/dist/learn/roots.d.ts +0 -3
  2086. package/dist/learn/roots.js +0 -5
  2087. package/dist/mcp/admin-tools.d.ts +0 -8
  2088. package/dist/mcp/admin-tools.js +0 -107
  2089. package/dist/mcp/format.d.ts +0 -27
  2090. package/dist/mcp/format.js +0 -140
  2091. package/dist/mcp/framing.d.ts +0 -21
  2092. package/dist/mcp/framing.js +0 -62
  2093. package/dist/mcp/memory-tools.d.ts +0 -5
  2094. package/dist/mcp/memory-tools.js +0 -70
  2095. package/dist/mcp/protocol.d.ts +0 -84
  2096. package/dist/mcp/protocol.js +0 -62
  2097. package/dist/mcp/recall-tools.d.ts +0 -6
  2098. package/dist/mcp/recall-tools.js +0 -234
  2099. package/dist/mcp/request.d.ts +0 -9
  2100. package/dist/mcp/request.js +0 -166
  2101. package/dist/mcp/server.d.ts +0 -10
  2102. package/dist/mcp/server.js +0 -35
  2103. package/dist/mcp/session-state.d.ts +0 -12
  2104. package/dist/mcp/session-state.js +0 -29
  2105. package/dist/mcp/shared-gate.d.ts +0 -5
  2106. package/dist/mcp/shared-gate.js +0 -23
  2107. package/dist/mcp/stdio.d.ts +0 -7
  2108. package/dist/mcp/stdio.js +0 -206
  2109. package/dist/mcp/tool-args.d.ts +0 -24
  2110. package/dist/mcp/tool-args.js +0 -87
  2111. package/dist/mcp/tools.js +0 -320
  2112. package/dist/objects/customer-notes.d.ts +0 -46
  2113. package/dist/objects/customer-notes.js +0 -77
  2114. package/dist/objects/decisions.d.ts +0 -49
  2115. package/dist/objects/decisions.js +0 -69
  2116. package/dist/objects/descriptor.d.ts +0 -52
  2117. package/dist/objects/descriptor.js +0 -5
  2118. package/dist/objects/fields.d.ts +0 -18
  2119. package/dist/objects/fields.js +0 -25
  2120. package/dist/objects/incidents.d.ts +0 -43
  2121. package/dist/objects/incidents.js +0 -95
  2122. package/dist/objects/lifecycle.d.ts +0 -23
  2123. package/dist/objects/lifecycle.js +0 -94
  2124. package/dist/objects/policies.d.ts +0 -56
  2125. package/dist/objects/policies.js +0 -99
  2126. package/dist/objects/processes.d.ts +0 -49
  2127. package/dist/objects/processes.js +0 -97
  2128. package/dist/objects/project-briefs.d.ts +0 -62
  2129. package/dist/objects/project-briefs.js +0 -187
  2130. package/dist/objects/skills.d.ts +0 -49
  2131. package/dist/objects/skills.js +0 -105
  2132. package/dist/postinstall.d.ts +0 -2
  2133. package/dist/postinstall.js +0 -96
  2134. package/dist/predictions/planning-fallacy.d.ts +0 -65
  2135. package/dist/predictions/planning-fallacy.js +0 -76
  2136. package/dist/rerankers/clef.d.ts +0 -31
  2137. package/dist/rerankers/clef.js +0 -178
  2138. package/dist/rerankers/cross-encoder.d.ts +0 -34
  2139. package/dist/rerankers/cross-encoder.js +0 -105
  2140. package/dist/rerankers/index.d.ts +0 -4
  2141. package/dist/rerankers/index.js +0 -26
  2142. package/dist/rerankers/jev.d.ts +0 -18
  2143. package/dist/rerankers/jev.js +0 -112
  2144. package/dist/rerankers/llm.d.ts +0 -9
  2145. package/dist/rerankers/llm.js +0 -88
  2146. package/dist/rerankers/outage-warning.d.ts +0 -10
  2147. package/dist/rerankers/outage-warning.js +0 -34
  2148. package/dist/rerankers/remote.d.ts +0 -6
  2149. package/dist/rerankers/remote.js +0 -28
  2150. package/dist/rerankers/types.d.ts +0 -45
  2151. package/dist/search/as-of.d.ts +0 -10
  2152. package/dist/search/as-of.js +0 -22
  2153. package/dist/search/bm25-search.d.ts +0 -16
  2154. package/dist/search/bm25-search.js +0 -57
  2155. package/dist/search/bm25.d.ts +0 -15
  2156. package/dist/search/bm25.js +0 -54
  2157. package/dist/search/boosts.d.ts +0 -56
  2158. package/dist/search/boosts.js +0 -117
  2159. package/dist/search/breakdown.d.ts +0 -7
  2160. package/dist/search/breakdown.js +0 -21
  2161. package/dist/search/embed-memories.d.ts +0 -17
  2162. package/dist/search/embed-memories.js +0 -415
  2163. package/dist/search/engine.d.ts +0 -11
  2164. package/dist/search/engine.js +0 -14
  2165. package/dist/search/explain.d.ts +0 -25
  2166. package/dist/search/explain.js +0 -32
  2167. package/dist/search/finalize.d.ts +0 -8
  2168. package/dist/search/finalize.js +0 -53
  2169. package/dist/search/fusion.d.ts +0 -27
  2170. package/dist/search/fusion.js +0 -42
  2171. package/dist/search/goal-boost.d.ts +0 -30
  2172. package/dist/search/goal-boost.js +0 -100
  2173. package/dist/search/hybrid-score.d.ts +0 -23
  2174. package/dist/search/hybrid-score.js +0 -76
  2175. package/dist/search/hybrid.d.ts +0 -73
  2176. package/dist/search/hybrid.js +0 -78
  2177. package/dist/search/multihop.d.ts +0 -12
  2178. package/dist/search/multihop.js +0 -42
  2179. package/dist/search/path-context.d.ts +0 -18
  2180. package/dist/search/path-context.js +0 -44
  2181. package/dist/search/physics-search.d.ts +0 -40
  2182. package/dist/search/physics-search.js +0 -199
  2183. package/dist/search/rerank.d.ts +0 -11
  2184. package/dist/search/rerank.js +0 -74
  2185. package/dist/search/rrf.d.ts +0 -24
  2186. package/dist/search/rrf.js +0 -43
  2187. package/dist/search/temporal.d.ts +0 -15
  2188. package/dist/search/temporal.js +0 -48
  2189. package/dist/search/vector.d.ts +0 -50
  2190. package/dist/search/vector.js +0 -126
  2191. package/dist/server/auth.d.ts +0 -41
  2192. package/dist/server/auth.js +0 -323
  2193. package/dist/server/boot.d.ts +0 -8
  2194. package/dist/server/boot.js +0 -421
  2195. package/dist/server/client-ip.d.ts +0 -25
  2196. package/dist/server/client-ip.js +0 -132
  2197. package/dist/server/cursor.d.ts +0 -30
  2198. package/dist/server/cursor.js +0 -65
  2199. package/dist/server/deadline.d.ts +0 -14
  2200. package/dist/server/deadline.js +0 -46
  2201. package/dist/server/defaults.js +0 -5
  2202. package/dist/server/key-check-bounds.d.ts +0 -9
  2203. package/dist/server/key-check-bounds.js +0 -54
  2204. package/dist/server/lifecycle.d.ts +0 -11
  2205. package/dist/server/lifecycle.js +0 -50
  2206. package/dist/server/mcp-http.d.ts +0 -9
  2207. package/dist/server/mcp-http.js +0 -238
  2208. package/dist/server/rate-limit.d.ts +0 -33
  2209. package/dist/server/rate-limit.js +0 -82
  2210. package/dist/server/ready.d.ts +0 -7
  2211. package/dist/server/ready.js +0 -41
  2212. package/dist/server/request.d.ts +0 -43
  2213. package/dist/server/request.js +0 -177
  2214. package/dist/server/route-checks.d.ts +0 -10
  2215. package/dist/server/route-checks.js +0 -47
  2216. package/dist/server/route-table.d.ts +0 -18
  2217. package/dist/server/route-table.js +0 -650
  2218. package/dist/server/routes/admin.d.ts +0 -9
  2219. package/dist/server/routes/admin.js +0 -177
  2220. package/dist/server/routes/customer-notes.d.ts +0 -7
  2221. package/dist/server/routes/customer-notes.js +0 -43
  2222. package/dist/server/routes/decisions.d.ts +0 -7
  2223. package/dist/server/routes/decisions.js +0 -68
  2224. package/dist/server/routes/incidents.d.ts +0 -7
  2225. package/dist/server/routes/incidents.js +0 -70
  2226. package/dist/server/routes/memories.d.ts +0 -10
  2227. package/dist/server/routes/memories.js +0 -140
  2228. package/dist/server/routes/object-routes.d.ts +0 -38
  2229. package/dist/server/routes/object-routes.js +0 -71
  2230. package/dist/server/routes/policies.d.ts +0 -8
  2231. package/dist/server/routes/policies.js +0 -65
  2232. package/dist/server/routes/predictions.d.ts +0 -7
  2233. package/dist/server/routes/predictions.js +0 -134
  2234. package/dist/server/routes/processes.d.ts +0 -7
  2235. package/dist/server/routes/processes.js +0 -80
  2236. package/dist/server/routes/project-briefs.d.ts +0 -8
  2237. package/dist/server/routes/project-briefs.js +0 -57
  2238. package/dist/server/routes/recall.d.ts +0 -8
  2239. package/dist/server/routes/recall.js +0 -147
  2240. package/dist/server/routes/skills.d.ts +0 -8
  2241. package/dist/server/routes/skills.js +0 -59
  2242. package/dist/server/server-detect.d.ts +0 -50
  2243. package/dist/server/server-detect.js +0 -216
  2244. package/dist/server/sleep-child.js +0 -44
  2245. package/dist/server/sleep-offload.d.ts +0 -29
  2246. package/dist/server/sleep-offload.js +0 -101
  2247. package/dist/server/tls.d.ts +0 -14
  2248. package/dist/server/tls.js +0 -44
  2249. package/dist/server/types.d.ts +0 -144
  2250. package/dist/server/types.js +0 -2
  2251. package/dist/server/validation.d.ts +0 -19
  2252. package/dist/server/validation.js +0 -91
  2253. package/dist/sharing/global-store.d.ts +0 -13
  2254. package/dist/sharing/global-store.js +0 -35
  2255. package/dist/sharing/global-sync.d.ts +0 -8
  2256. package/dist/sharing/global-sync.js +0 -83
  2257. package/dist/sharing/project-merge.d.ts +0 -83
  2258. package/dist/sharing/project-merge.js +0 -284
  2259. package/dist/sharing/search-both.d.ts +0 -64
  2260. package/dist/sharing/search-both.js +0 -152
  2261. package/dist/sharing/share.d.ts +0 -44
  2262. package/dist/sharing/share.js +0 -251
  2263. package/dist/store/ambient.d.ts +0 -16
  2264. package/dist/store/ambient.js +0 -91
  2265. package/dist/store/audit-event.d.ts +0 -17
  2266. package/dist/store/audit-event.js +0 -31
  2267. package/dist/store/audit.d.ts +0 -79
  2268. package/dist/store/audit.js +0 -258
  2269. package/dist/store/auth.d.ts +0 -143
  2270. package/dist/store/auth.js +0 -334
  2271. package/dist/store/busy.d.ts +0 -9
  2272. package/dist/store/busy.js +0 -16
  2273. package/dist/store/candidates.d.ts +0 -89
  2274. package/dist/store/candidates.js +0 -324
  2275. package/dist/store/capture-write.d.ts +0 -18
  2276. package/dist/store/capture-write.js +0 -36
  2277. package/dist/store/card-detail.d.ts +0 -15
  2278. package/dist/store/card-detail.js +0 -23
  2279. package/dist/store/cards.d.ts +0 -77
  2280. package/dist/store/cards.js +0 -432
  2281. package/dist/store/compaction-caller.d.ts +0 -19
  2282. package/dist/store/compaction-caller.js +0 -30
  2283. package/dist/store/compactions-record.d.ts +0 -121
  2284. package/dist/store/compactions-record.js +0 -481
  2285. package/dist/store/compactions.d.ts +0 -78
  2286. package/dist/store/compactions.js +0 -115
  2287. package/dist/store/conflicts.d.ts +0 -70
  2288. package/dist/store/conflicts.js +0 -507
  2289. package/dist/store/connectors/dlq.d.ts +0 -22
  2290. package/dist/store/connectors/dlq.js +0 -84
  2291. package/dist/store/connectors/event-log.d.ts +0 -122
  2292. package/dist/store/connectors/event-log.js +0 -25
  2293. package/dist/store/connectors/github.d.ts +0 -85
  2294. package/dist/store/connectors/github.js +0 -139
  2295. package/dist/store/connectors/slack.d.ts +0 -61
  2296. package/dist/store/connectors/slack.js +0 -132
  2297. package/dist/store/dashboard-reads.d.ts +0 -31
  2298. package/dist/store/dashboard-reads.js +0 -111
  2299. package/dist/store/delete-and-batch.d.ts +0 -72
  2300. package/dist/store/delete-and-batch.js +0 -394
  2301. package/dist/store/delivery-recorder.d.ts +0 -150
  2302. package/dist/store/delivery-recorder.js +0 -303
  2303. package/dist/store/descendant-page.d.ts +0 -13
  2304. package/dist/store/descendant-page.js +0 -118
  2305. package/dist/store/diagnostics.d.ts +0 -48
  2306. package/dist/store/diagnostics.js +0 -45
  2307. package/dist/store/doctor-reads.d.ts +0 -17
  2308. package/dist/store/doctor-reads.js +0 -27
  2309. package/dist/store/dormant.d.ts +0 -113
  2310. package/dist/store/dormant.js +0 -269
  2311. package/dist/store/embeddings/index.d.ts +0 -30
  2312. package/dist/store/embeddings/index.js +0 -62
  2313. package/dist/store/entry-reads.d.ts +0 -146
  2314. package/dist/store/entry-reads.js +0 -506
  2315. package/dist/store/entry-row.d.ts +0 -27
  2316. package/dist/store/entry-row.js +0 -216
  2317. package/dist/store/entry-writes.d.ts +0 -85
  2318. package/dist/store/entry-writes.js +0 -267
  2319. package/dist/store/failure-log-at.d.ts +0 -8
  2320. package/dist/store/failure-log-at.js +0 -16
  2321. package/dist/store/failure-log.d.ts +0 -64
  2322. package/dist/store/failure-log.js +0 -91
  2323. package/dist/store/gated-write.d.ts +0 -11
  2324. package/dist/store/gated-write.js +0 -28
  2325. package/dist/store/goals.d.ts +0 -97
  2326. package/dist/store/goals.js +0 -261
  2327. package/dist/store/graph-apply.d.ts +0 -21
  2328. package/dist/store/graph-apply.js +0 -75
  2329. package/dist/store/graph-queue.d.ts +0 -16
  2330. package/dist/store/graph-queue.js +0 -75
  2331. package/dist/store/graph-reads.d.ts +0 -46
  2332. package/dist/store/graph-reads.js +0 -246
  2333. package/dist/store/graph-rows.d.ts +0 -183
  2334. package/dist/store/graph-rows.js +0 -62
  2335. package/dist/store/graph-view-rows.d.ts +0 -13
  2336. package/dist/store/graph-view-rows.js +0 -76
  2337. package/dist/store/graph-writes.d.ts +0 -39
  2338. package/dist/store/graph-writes.js +0 -232
  2339. package/dist/store/half-life.d.ts +0 -35
  2340. package/dist/store/half-life.js +0 -75
  2341. package/dist/store/handoffs.d.ts +0 -32
  2342. package/dist/store/handoffs.js +0 -237
  2343. package/dist/store/index-and-stats.d.ts +0 -42
  2344. package/dist/store/index-and-stats.js +0 -164
  2345. package/dist/store/index.d.ts +0 -6
  2346. package/dist/store/index.js +0 -4
  2347. package/dist/store/key-audit.d.ts +0 -7
  2348. package/dist/store/key-audit.js +0 -26
  2349. package/dist/store/key-writes.d.ts +0 -17
  2350. package/dist/store/key-writes.js +0 -63
  2351. package/dist/store/ledger-turn.d.ts +0 -29
  2352. package/dist/store/ledger-turn.js +0 -70
  2353. package/dist/store/mirrors.d.ts +0 -37
  2354. package/dist/store/mirrors.js +0 -373
  2355. package/dist/store/narrow.d.ts +0 -6
  2356. package/dist/store/narrow.js +0 -11
  2357. package/dist/store/open.d.ts +0 -20
  2358. package/dist/store/open.js +0 -200
  2359. package/dist/store/pilot-arm.d.ts +0 -13
  2360. package/dist/store/pilot-arm.js +0 -54
  2361. package/dist/store/planning-fallacy-evidence.d.ts +0 -14
  2362. package/dist/store/planning-fallacy-evidence.js +0 -55
  2363. package/dist/store/port/agent-import.d.ts +0 -62
  2364. package/dist/store/port/agent-import.js +0 -2
  2365. package/dist/store/port/consolidation.d.ts +0 -129
  2366. package/dist/store/port/consolidation.js +0 -2
  2367. package/dist/store/port/learning.d.ts +0 -19
  2368. package/dist/store/port/learning.js +0 -2
  2369. package/dist/store/port/local-files.d.ts +0 -18
  2370. package/dist/store/port/local-files.js +0 -2
  2371. package/dist/store/port/promotion.d.ts +0 -20
  2372. package/dist/store/port/promotion.js +0 -3
  2373. package/dist/store/port-groups.d.ts +0 -160
  2374. package/dist/store/port-groups.js +0 -2
  2375. package/dist/store/port.d.ts +0 -697
  2376. package/dist/store/port.js +0 -19
  2377. package/dist/store/predictions.d.ts +0 -104
  2378. package/dist/store/predictions.js +0 -358
  2379. package/dist/store/project-tags.d.ts +0 -65
  2380. package/dist/store/project-tags.js +0 -78
  2381. package/dist/store/quality-repair.d.ts +0 -31
  2382. package/dist/store/quality-repair.js +0 -226
  2383. package/dist/store/quarantine.d.ts +0 -33
  2384. package/dist/store/quarantine.js +0 -123
  2385. package/dist/store/raw-archive.d.ts +0 -15
  2386. package/dist/store/raw-archive.js +0 -81
  2387. package/dist/store/recall-trace.d.ts +0 -121
  2388. package/dist/store/recall-trace.js +0 -314
  2389. package/dist/store/rejected-values.d.ts +0 -60
  2390. package/dist/store/rejected-values.js +0 -177
  2391. package/dist/store/rejection-probe.d.ts +0 -4
  2392. package/dist/store/rejection-probe.js +0 -19
  2393. package/dist/store/rejection.d.ts +0 -38
  2394. package/dist/store/rejection.js +0 -81
  2395. package/dist/store/report-reads.d.ts +0 -7
  2396. package/dist/store/report-reads.js +0 -30
  2397. package/dist/store/rows.d.ts +0 -163
  2398. package/dist/store/rows.js +0 -169
  2399. package/dist/store/rule-sql.d.ts +0 -18
  2400. package/dist/store/rule-sql.js +0 -69
  2401. package/dist/store/search-rows.d.ts +0 -57
  2402. package/dist/store/search-rows.js +0 -227
  2403. package/dist/store/sessions.d.ts +0 -82
  2404. package/dist/store/sessions.js +0 -315
  2405. package/dist/store/set-aside.d.ts +0 -14
  2406. package/dist/store/set-aside.js +0 -36
  2407. package/dist/store/sqlite/agent-import.d.ts +0 -3
  2408. package/dist/store/sqlite/agent-import.js +0 -77
  2409. package/dist/store/sqlite/cards-group.d.ts +0 -6
  2410. package/dist/store/sqlite/cards-group.js +0 -37
  2411. package/dist/store/sqlite/commit-watch.d.ts +0 -4
  2412. package/dist/store/sqlite/commit-watch.js +0 -29
  2413. package/dist/store/sqlite/conflicts-group.d.ts +0 -6
  2414. package/dist/store/sqlite/conflicts-group.js +0 -18
  2415. package/dist/store/sqlite/connector-events-group.d.ts +0 -6
  2416. package/dist/store/sqlite/connector-events-group.js +0 -58
  2417. package/dist/store/sqlite/connector-writes-group.d.ts +0 -7
  2418. package/dist/store/sqlite/connector-writes-group.js +0 -72
  2419. package/dist/store/sqlite/consolidation-group.d.ts +0 -4
  2420. package/dist/store/sqlite/consolidation-group.js +0 -64
  2421. package/dist/store/sqlite/dag-reads-group.d.ts +0 -3
  2422. package/dist/store/sqlite/dag-reads-group.js +0 -45
  2423. package/dist/store/sqlite/dormant-group.d.ts +0 -6
  2424. package/dist/store/sqlite/dormant-group.js +0 -29
  2425. package/dist/store/sqlite/entry-writes-group.d.ts +0 -21
  2426. package/dist/store/sqlite/entry-writes-group.js +0 -193
  2427. package/dist/store/sqlite/error-codec.d.ts +0 -19
  2428. package/dist/store/sqlite/error-codec.js +0 -84
  2429. package/dist/store/sqlite/executor-counts.js +0 -12
  2430. package/dist/store/sqlite/executor.d.ts +0 -34
  2431. package/dist/store/sqlite/executor.js +0 -331
  2432. package/dist/store/sqlite/global-promote.d.ts +0 -5
  2433. package/dist/store/sqlite/global-promote.js +0 -48
  2434. package/dist/store/sqlite/goals-group.d.ts +0 -6
  2435. package/dist/store/sqlite/goals-group.js +0 -23
  2436. package/dist/store/sqlite/graph-reads-group.d.ts +0 -6
  2437. package/dist/store/sqlite/graph-reads-group.js +0 -19
  2438. package/dist/store/sqlite/held-connection.d.ts +0 -17
  2439. package/dist/store/sqlite/held-connection.js +0 -68
  2440. package/dist/store/sqlite/last-recall-group.d.ts +0 -15
  2441. package/dist/store/sqlite/last-recall-group.js +0 -62
  2442. package/dist/store/sqlite/learning-group.d.ts +0 -4
  2443. package/dist/store/sqlite/learning-group.js +0 -17
  2444. package/dist/store/sqlite/maintenance-groups.d.ts +0 -6
  2445. package/dist/store/sqlite/maintenance-groups.js +0 -61
  2446. package/dist/store/sqlite/object-rows.d.ts +0 -105
  2447. package/dist/store/sqlite/object-rows.js +0 -250
  2448. package/dist/store/sqlite/objects-group.d.ts +0 -21
  2449. package/dist/store/sqlite/objects-group.js +0 -375
  2450. package/dist/store/sqlite/predictions-group.d.ts +0 -6
  2451. package/dist/store/sqlite/predictions-group.js +0 -30
  2452. package/dist/store/sqlite/promotion-group.d.ts +0 -3
  2453. package/dist/store/sqlite/promotion-group.js +0 -10
  2454. package/dist/store/sqlite/quarantine-group.d.ts +0 -6
  2455. package/dist/store/sqlite/quarantine-group.js +0 -40
  2456. package/dist/store/sqlite/reports-group.d.ts +0 -6
  2457. package/dist/store/sqlite/reports-group.js +0 -33
  2458. package/dist/store/sqlite/request-scope.d.ts +0 -6
  2459. package/dist/store/sqlite/request-scope.js +0 -18
  2460. package/dist/store/sqlite/sessions-group.d.ts +0 -6
  2461. package/dist/store/sqlite/sessions-group.js +0 -46
  2462. package/dist/store/sqlite/vector-pack.d.ts +0 -18
  2463. package/dist/store/sqlite/vector-pack.js +0 -47
  2464. package/dist/store/sqlite/vector-reads-group.d.ts +0 -3
  2465. package/dist/store/sqlite/vector-reads-group.js +0 -24
  2466. package/dist/store/sqlite/worker-entry.js +0 -8
  2467. package/dist/store/sqlite/worker-jobs.d.ts +0 -6
  2468. package/dist/store/sqlite/worker-jobs.js +0 -128
  2469. package/dist/store/sqlite/worker-ops.d.ts +0 -140
  2470. package/dist/store/sqlite/worker-ops.js +0 -96
  2471. package/dist/store/sqlite/worker-store.d.ts +0 -9
  2472. package/dist/store/sqlite/worker-store.js +0 -89
  2473. package/dist/store/summaries.d.ts +0 -43
  2474. package/dist/store/summaries.js +0 -237
  2475. package/dist/store/summary-dirty.d.ts +0 -5
  2476. package/dist/store/summary-dirty.js +0 -33
  2477. package/dist/store/tenant-lookup.d.ts +0 -21
  2478. package/dist/store/tenant-lookup.js +0 -23
  2479. package/dist/store/tenant.d.ts +0 -12
  2480. package/dist/store/tenant.js +0 -29
  2481. package/dist/store/token-ledger-rows.d.ts +0 -61
  2482. package/dist/store/token-ledger-rows.js +0 -72
  2483. package/dist/store/token-ledger.d.ts +0 -124
  2484. package/dist/store/token-ledger.js +0 -204
  2485. package/dist/store/tombstone-checks.d.ts +0 -15
  2486. package/dist/store/tombstone-checks.js +0 -40
  2487. package/dist/store/usage-reports.d.ts +0 -7
  2488. package/dist/store/usage-reports.js +0 -19
  2489. package/dist/store/vector-index.d.ts +0 -49
  2490. package/dist/store/vector-index.js +0 -188
  2491. package/dist/store/working-memory.d.ts +0 -50
  2492. package/dist/store/working-memory.js +0 -123
  2493. package/dist/support-bundle.d.ts +0 -12
  2494. package/dist/support-bundle.js +0 -315
  2495. package/dist/trust/quarantine.d.ts +0 -3
  2496. package/dist/trust/quarantine.js +0 -4
  2497. package/dist/trust/reject-flow.d.ts +0 -32
  2498. package/dist/trust/reject-flow.js +0 -73
  2499. package/dist/util/agent-homes.d.ts +0 -15
  2500. package/dist/util/agent-homes.js +0 -34
  2501. package/dist/util/anthropic-messages.d.ts +0 -39
  2502. package/dist/util/anthropic-messages.js +0 -86
  2503. package/dist/util/atomic-write.d.ts +0 -9
  2504. package/dist/util/atomic-write.js +0 -153
  2505. package/dist/util/chunked.d.ts +0 -3
  2506. package/dist/util/chunked.js +0 -10
  2507. package/dist/util/compaction-items.d.ts +0 -21
  2508. package/dist/util/compaction-items.js +0 -90
  2509. package/dist/util/crash-handlers.d.ts +0 -17
  2510. package/dist/util/crash-handlers.js +0 -81
  2511. package/dist/util/env.d.ts +0 -119
  2512. package/dist/util/env.js +0 -209
  2513. package/dist/util/escape.js +0 -10
  2514. package/dist/util/format.d.ts +0 -5
  2515. package/dist/util/format.js +0 -10
  2516. package/dist/util/home-path.d.ts +0 -6
  2517. package/dist/util/home-path.js +0 -75
  2518. package/dist/util/hook-payload.d.ts +0 -10
  2519. package/dist/util/hook-payload.js +0 -39
  2520. package/dist/util/http-retry.d.ts +0 -41
  2521. package/dist/util/http-retry.js +0 -151
  2522. package/dist/util/http-util.d.ts +0 -70
  2523. package/dist/util/http-util.js +0 -147
  2524. package/dist/util/json.d.ts +0 -20
  2525. package/dist/util/json.js +0 -28
  2526. package/dist/util/keyset.d.ts +0 -13
  2527. package/dist/util/keyset.js +0 -9
  2528. package/dist/util/limits.d.ts +0 -7
  2529. package/dist/util/limits.js +0 -16
  2530. package/dist/util/log.d.ts +0 -48
  2531. package/dist/util/log.js +0 -123
  2532. package/dist/util/net.d.ts +0 -5
  2533. package/dist/util/net.js +0 -19
  2534. package/dist/util/real-path.d.ts +0 -4
  2535. package/dist/util/real-path.js +0 -16
  2536. package/dist/util/request-scope.d.ts +0 -42
  2537. package/dist/util/request-scope.js +0 -66
  2538. package/dist/util/same-text.d.ts +0 -26
  2539. package/dist/util/same-text.js +0 -49
  2540. package/dist/util/secret-detect.d.ts +0 -50
  2541. package/dist/util/secret-detect.js +0 -165
  2542. package/dist/util/spawn-argv.d.ts +0 -11
  2543. package/dist/util/spawn-argv.js +0 -66
  2544. package/dist/util/sql.d.ts +0 -3
  2545. package/dist/util/sql.js +0 -6
  2546. package/dist/util/sqlite-blocked.d.ts +0 -29
  2547. package/dist/util/sqlite-blocked.js +0 -47
  2548. package/dist/util/stored-json.d.ts +0 -12
  2549. package/dist/util/stored-json.js +0 -12
  2550. package/dist/util/stream-tee.d.ts +0 -4
  2551. package/dist/util/stream-tee.js +0 -38
  2552. package/dist/util/time.d.ts +0 -6
  2553. package/dist/util/time.js +0 -7
  2554. package/dist/util/token-text.d.ts +0 -15
  2555. package/dist/util/token-text.js +0 -20
  2556. package/dist/util/tokenize.d.ts +0 -4
  2557. package/dist/util/tokenize.js +0 -24
  2558. package/dist/util/transcript-tail.d.ts +0 -12
  2559. package/dist/util/transcript-tail.js +0 -52
  2560. package/dist/util/vector-codec.js +0 -15
  2561. package/dist/util/version.d.ts +0 -16
  2562. package/dist/util/version.js +0 -31
  2563. package/dist/util/write-budget.d.ts +0 -20
  2564. package/dist/util/write-budget.js +0 -18
  2565. package/dist/util/yaml.d.ts +0 -13
  2566. package/dist/util/yaml.js +0 -131
  2567. package/dist-ui/assets/index-DPN7cP19.js +0 -33
  2568. package/dist-ui/assets/react-CEUiQZj-.js +0 -17
  2569. package/scripts/postinstall.cjs +0 -18
  2570. /package/dist/{core → base/session}/compaction-timing.d.ts +0 -0
  2571. /package/dist/{util → base/util}/capped-json.d.ts +0 -0
  2572. /package/dist/{util → base/util}/capped-json.js +0 -0
  2573. /package/dist/{util → base/util}/ellipsize.d.ts +0 -0
  2574. /package/dist/{util → base/util}/ellipsize.js +0 -0
  2575. /package/dist/{util → base/util}/escape.d.ts +0 -0
  2576. /package/dist/{util → base/util}/session-id.d.ts +0 -0
  2577. /package/dist/{util → base/util}/session-id.js +0 -0
  2578. /package/dist/{util → base/util}/vector-codec.d.ts +0 -0
  2579. /package/dist/{agent-memories → domain/agent-memories}/codex.d.ts +0 -0
  2580. /package/dist/{agent-memories → domain/agent-memories}/copilot.d.ts +0 -0
  2581. /package/dist/{agent-memories → domain/agent-memories}/gemini.d.ts +0 -0
  2582. /package/dist/{agent-memories → domain/agent-memories}/openclaw.d.ts +0 -0
  2583. /package/dist/{agent-memories → domain/agent-memories}/qwen-code.d.ts +0 -0
  2584. /package/dist/{agent-memories → domain/agent-memories}/types.js +0 -0
  2585. /package/dist/store/sqlite/{executor-counts.d.ts → runtime/executor-counts.d.ts} +0 -0
  2586. /package/dist/store/sqlite/{worker-entry.d.ts → runtime/worker-entry.d.ts} +0 -0
  2587. /package/dist/{hooks → surface/capture}/codex-session.d.ts +0 -0
  2588. /package/dist/{cli → surface/cli}/init.d.ts +0 -0
  2589. /package/dist/{cli → surface/cli}/open-browser.d.ts +0 -0
  2590. /package/dist/{cli → surface/cli}/output.d.ts +0 -0
  2591. /package/dist/{cli → surface/cli}/usage.d.ts +0 -0
  2592. /package/dist/{cli → surface/cli}/verbs/health.d.ts +0 -0
  2593. /package/dist/{cli → surface/cli}/verbs/memory.d.ts +0 -0
  2594. /package/dist/{cli → surface/cli}/verbs/objects.d.ts +0 -0
  2595. /package/dist/{cli → surface/cli}/verbs/sessions.d.ts +0 -0
  2596. /package/dist/{connectors → surface/connectors}/slack/web-client.d.ts +0 -0
  2597. /package/dist/{mcp → surface/mcp}/tools.d.ts +0 -0
  2598. /package/dist/{server → surface/server}/defaults.d.ts +0 -0
  2599. /package/dist/{server → surface/server}/sleep-child.d.ts +0 -0
  2600. /package/dist/{rerankers → surface/server}/types.js +0 -0
@@ -1,185 +1,106 @@
1
- import { type AppendAuditOpts, type AuditOp } from '../../store/audit.js';
2
- import type { HippoStore, RecallWrites } from '../../store/index.js';
3
- import type { TokenSurface } from '../../store/token-ledger.js';
1
+ import type { RequiredStore, RecallWrites } from '../../base/ports/store.js';
2
+ import type { TokenSurface } from '../../base/ports/store/ledger.js';
4
3
  import type { AvailabilityHint } from '../availability.js';
5
- import type { Context, StoreContext } from '../types.js';
6
- /**
7
- * Anchoring detector (recall-recurrence), pure module: `query_repeat` (a queryHash re-asked within the window returns
8
- * the same topMemoryId) and
9
- * `memory_dominance` (the same topMemoryId across >= minDominance distinct queryHashes). Each pipeline keeps its OWN
10
- * ring Map keyed by (tenant, session),
11
- * because its top-1 ranking differs. AnchoringHint and PlanningFallacyHint are independent signals. */
12
- export type AnchoringReason = 'query_repeat' | 'memory_dominance';
13
- export interface AnchoringHint {
14
- reason: AnchoringReason;
15
- /** The memory ID that is anchoring the agent's reasoning. */
16
- memoryId: string;
17
- /** For 'memory_dominance': how many distinct queries in the recent window
18
- * had this memory as their top-1 result. Always >= 3 when emitted. */
19
- queryCount?: number;
20
- /** Human-readable summary surfaced to the agent. */
21
- summary: string;
22
- /** Discriminator for hint origin; reserved for future variants. */
23
- source: 'j1-recurrence';
24
- }
25
- export interface RecallHistoryEntry {
26
- /** Hash of the queryText that produced this entry (see hashQueryText). */
27
- queryHash: number;
28
- /** Top-1 memory id this recall surfaced; null if zero results. */
29
- topMemoryId: string | null;
30
- /** ISO-8601 timestamp; advisory, not used by the detection rules. */
31
- ts: string;
32
- /**
33
- * Memory id of the AnchoringHint that fired on this recall, if any; the caller writes it after detectAnchoring
34
- * returns, and the cooldown reads it next
35
- * time. */
36
- anchoredOn?: string;
37
- }
38
- export type RecallHistorySnapshot = readonly RecallHistoryEntry[];
39
- export interface DetectAnchoringOpts {
40
- /** memory_dominance threshold: number of distinct queryHashes that must have returned
41
- * the same topMemoryId. Default 3. */
42
- minDominance?: number;
43
- /** query_repeat window: how many recent history entries to scan for query repeat.
44
- * Default 5. */
45
- recentRepeatWindow?: number;
46
- /**
47
- * Cooldown: suppress when the prior fire (per `anchoredOn`) was for the same topMemoryId within this many history
48
- * entries. Default 3.
49
- */
50
- cooldown?: number;
51
- }
52
- /**
53
- * Normalizes a query (lowercase, strip non-alphanumerics, drop short tokens, sort, dedup, join) and hashes it with
54
- * 32-bit FNV-1a.
55
- * Reordered words collide intentionally; deterministic across processes and V8 versions. */
56
- export declare function hashQueryText(query: string): number;
57
- /**
58
- * Detects anchoring against the current (queryHash, topMemoryId); memory_dominance wins when both rules fire, since it
59
- * spans DIFFERENT queries.
60
- * Cooldown is per memory: a hint on the SAME topMemoryId within `cooldown=3` history entries is suppressed. Returns an
61
- * AnchoringHint or null.
62
- */
63
- export declare function detectAnchoring(history: RecallHistorySnapshot, currentQueryHash: number, currentTopMemoryId: string | null, opts?: DetectAnchoringOpts): AnchoringHint | null;
64
- /**
65
- * Bounded FIFO ring of RecallHistoryEntry (oldest evicted when full); a thin array wrapper so snapshotRing returns a
66
- * readonly view without copying.
67
- */
68
- export declare class RingBuffer {
69
- private entries;
70
- append(entry: RecallHistoryEntry): void;
71
- snapshot(): RecallHistorySnapshot;
72
- size(): number;
73
- }
74
- /** Builds the (tenant, session) key with a NUL delimiter: tenant and session ids are validated elsewhere to reject NUL,
75
- * so concatenation cannot collide even though API-key-derived subjects can contain `:`. */
76
- export declare function buildSessionKey(tenantId: string, sessionId: string): string;
77
- /**
78
- * Get-or-create a RingBuffer per session key, capped at `maxSessions` (default 1000); at the cap the oldest-inserted
79
- * key (first from Map.keys()) is
80
- * evicted. */
81
- export declare function getOrCreateRing(map: Map<string, RingBuffer>, key: string, maxSessions?: number): RingBuffer;
82
- /**
83
- * Appends a recall to a ring; `anchoredOn` is the memoryId of the hint that fired on THIS recall (or undefined), read
84
- * by detectAnchoring for cooldown.
85
- */
86
- export declare function appendRecall(ring: RingBuffer, queryHash: number, topMemoryId: string | null, anchoredOn?: string): void;
87
- /** Snapshot a ring as a readonly RecallHistorySnapshot. */
88
- export declare function snapshotRing(ring: RingBuffer): RecallHistorySnapshot;
89
- /**
90
- * Whether a recall bias hint is enabled; reads env at call time, so `HIPPO_ANCHORING=off` or `HIPPO_AVAILABILITY=off`
91
- * disables only that kind.
92
- */
93
- export declare function biasHintEnabled(kind: 'anchoring' | 'availability'): boolean;
4
+ import { type Context } from '../types.js';
5
+ import type { AppendAuditOptions } from '../../base/ports/store/types.js';
6
+ import type { AuditOp } from '../../base/records/audit-ops.js';
7
+ import { type AnchoringHint, type RecallHistorySnapshot, type HintConfig } from './anchoring.js';
8
+ import { type RecallSurface } from './session-rings.js';
94
9
  /** The ids among `ids` that a tenant's rows in `store` hold. */
95
- export declare function heldIds(store: HippoStore, ids: readonly string[], tenantId: string): Promise<Set<string>>;
96
- export type RecallSurface = 'cli' | 'mcp' | 'http';
97
- /** The session's ring, created on first use; null when anchoring is off or the call has no session. */
98
- export declare function sessionRing(surface: RecallSurface, tenantId: string, sessionId: string | undefined): RingBuffer | null;
99
- /** Records this recall's top row and hint, which the next recall's cooldown reads. */
100
- export declare function noteRecall(ring: RingBuffer, query: string, topId: string | null, anchoredOn: string | undefined): void;
101
- export declare function resetSessionRings(surface: RecallSurface): void;
10
+ export declare function heldIds(store: RequiredStore, ids: readonly string[], tenantId: string): Promise<Set<string>>;
102
11
  /** Whom a recall audit row names. */
103
12
  export interface RecallAuditCaller {
104
13
  readonly tenantId: string;
105
14
  readonly actor: string;
106
15
  }
107
16
  export declare function callerOf(ctx: Context): RecallAuditCaller;
108
- /** The strengthen every ranker of `retrieve` hands to the recall's write: the shown ids, in the caller's tenant. */
17
+ /** The strengthen every ranker of `retrieve` hands to the recall's write: the shown ids, in the
18
+ * caller's tenant. */
109
19
  export declare function strengthenOf(ctx: Context, ids: readonly string[]): NonNullable<RecallWrites['strengthen']>;
110
20
  type RecallAuditMetadata = Readonly<Record<string, string | number | null>>;
111
- export declare function recallAuditRow(who: RecallAuditCaller, op: AuditOp, targetId?: string, metadata?: RecallAuditMetadata): AppendAuditOpts;
21
+ export declare function recallAuditRow(who: RecallAuditCaller, op: AuditOp, targetId?: string, metadata?: RecallAuditMetadata): AppendAuditOptions;
112
22
  export declare function recallAuditMetadata(query: string, results: number): {
113
23
  results: number;
114
24
  query_hash: string;
115
25
  query_length: number;
116
26
  };
117
27
  /**
118
- * No session means no ring; the row hashes with SHA-256/16, since hashQueryText is FNV-1a and easy to reverse on short
119
- * queries.
28
+ * No session means no ring; the row hashes with SHA-256/16, since hashQueryText is FNV-1a and easy
29
+ * to reverse on short queries.
120
30
  */
121
- export declare function anchorSkippedRows(who: RecallAuditCaller, query: string): AppendAuditOpts[];
122
- export declare function anchoringRows(who: RecallAuditCaller, hint: AnchoringHint | null): AppendAuditOpts[];
123
- export declare function availabilityRows(who: RecallAuditCaller, hint: AvailabilityHint | null): AppendAuditOpts[];
124
- export interface ShownRecall {
125
- readonly query: string;
126
- readonly ring: RingBuffer | null;
127
- readonly topId: string | null;
31
+ export declare function anchorSkippedRows(config: HintConfig, who: RecallAuditCaller, query: string): AppendAuditOptions[];
32
+ export declare function anchoringRows(who: RecallAuditCaller, hint: AnchoringHint | null): AppendAuditOptions[];
33
+ export declare function availabilityRows(who: RecallAuditCaller, hint: AvailabilityHint | null): AppendAuditOptions[];
34
+ /** The bias hints over the list a surface showed. The api turns them into audit rows and keeps
35
+ * the anchor for the session ring's cooldown, so a presenter decides what prints and never what
36
+ * is recorded. */
37
+ export interface ShownHints {
128
38
  readonly anchoring: AnchoringHint | null;
129
39
  readonly availability: AvailabilityHint | null;
130
40
  }
131
- /**
132
- * The hint rows for a list a surface showed, so a surface on the store port can hand them to the recall's one write.
133
- */
134
- export declare function shownRecallRows(who: RecallAuditCaller, shown: ShownRecall): AppendAuditOpts[];
135
- /** How one surface's recall is recorded. The surfaces differ in
136
- * these three values and in the list they hand over, nowhere else. */
41
+ /** The recall a surface showed a list for: its query, and its session, absent or empty when it
42
+ * named none. */
43
+ export interface ShownQuery {
44
+ readonly query: string;
45
+ readonly sessionId: string | undefined;
46
+ }
47
+ /** The hint rows for a list a surface showed, written in the recall's one write. */
48
+ export declare function shownRecallRows(ctx: Context, shown: ShownQuery, hints: ShownHints): AppendAuditOptions[];
49
+ /** How one surface's recall is recorded. The surfaces differ in these three values and in the
50
+ * list they hand over, nowhere else. */
137
51
  export interface RecallRecording {
138
52
  /** Whose session rings the recall reads and feeds. */
139
53
  readonly ring: RecallSurface;
140
54
  /** The label of its token ledger row. */
141
55
  readonly ledger: TokenSurface;
142
- /** 'every': an empty list still reaches the stats write, which
143
- * then only rewrites stats.json; 'shown': an empty list skips it. */
144
- readonly stats: 'every' | 'shown';
56
+ /** 'every': an empty list still reaches the stats write, which then only rewrites stats.json;
57
+ * 'shown': an empty list skips it; 'none': no stats write, and the ledger row books 0 items. */
58
+ readonly counts: 'every' | 'shown' | 'none';
145
59
  }
146
- /** The surfaces `retrieve` records in full. MCP is pending: src/mcp still feeds its own ring and books its own ledger
147
- * row, and counts no stats. */
60
+ /** Each surface's recording; docs/recall-surface-differences.md names why they differ. */
148
61
  export declare const RECALL_RECORDING: {
149
62
  readonly http: {
150
63
  readonly ring: "http";
151
64
  readonly ledger: "http_recall";
152
- readonly stats: "every";
65
+ readonly counts: "every";
153
66
  };
154
67
  readonly cli: {
155
68
  readonly ring: "cli";
156
69
  readonly ledger: "recall";
157
- readonly stats: "shown";
70
+ readonly counts: "shown";
71
+ };
72
+ readonly mcp: {
73
+ readonly ring: "mcp";
74
+ readonly ledger: "mcp_recall";
75
+ readonly counts: "none";
158
76
  };
159
77
  };
160
78
  /** What a recorded recall takes into ranking. */
161
79
  export interface RecallLead {
162
80
  readonly recallHistory: RecallHistorySnapshot | undefined;
163
- readonly leadingAudit: readonly AppendAuditOpts[];
81
+ readonly leadingAudit: readonly AppendAuditOptions[];
164
82
  }
165
- /** For a surface whose hint `retrieve` judges: the session's history, or the row saying the recall named no session. */
83
+ /** For a surface whose hint `retrieve` judges: the session's history, or the row saying the
84
+ * recall named no session. */
166
85
  export declare function recallLead(ctx: Context, how: RecallRecording, query: string, sessionId: string | undefined): RecallLead;
167
86
  /** The list a recall showed, as its ranker counted and priced it. */
168
87
  export interface ShownList {
169
88
  readonly query: string;
170
89
  /** The recall's session, which keys the ring. */
171
90
  readonly sessionId: string | undefined;
172
- readonly topId: string | null;
91
+ /** The ids shown, best first. */
92
+ readonly ids: readonly string[];
173
93
  /** The memory this recall's anchoring hint named; the next recall's cooldown reads it. */
174
94
  readonly anchoredOn: string | undefined;
175
- readonly items: number;
176
95
  readonly tokens: number;
177
- /** The session the ledger row names: the recall's own on HTTP, the host agent's on the CLI. */
96
+ /** The session the ledger row names: the recall's own on HTTP, the host agent's on the CLI,
97
+ * none on MCP. */
178
98
  readonly ledgerSessionId: string | null;
179
99
  /** False when the audit rows could not be written and the caller answers anyway. */
180
100
  readonly written: boolean;
181
101
  }
182
- /** Runs after the recall's own write, in this order: the ring, then the counter, then the ledger. */
183
- export declare function recordShownRecall(ctx: StoreContext, store: HippoStore, how: RecallRecording, shown: ShownList): Promise<void>;
102
+ /** Runs after the recall's own write, in order: the ring, the counter, the ledger, then the
103
+ * client's shown list. */
104
+ export declare function recordShownRecall(ctx: Context, store: RequiredStore, how: RecallRecording, shown: ShownList): Promise<void>;
184
105
  export {};
185
106
  //# sourceMappingURL=finish.d.ts.map
@@ -1,301 +1,129 @@
1
- // What a recall remembers and records: the anchoring detector and query history, the session rings and audit rows, then
2
- // the write around one recall (history, ring, recalled counter and token ledger row).
3
- import { isRecallBoostAblated } from '../../core/ablation.js';
4
- import { auditQueryFields } from '../../store/audit.js';
5
- import { envAnchoringOff, envAvailabilityOff } from '../../util/env.js';
1
+ // What a recall records: its audit rows, then the write around one recall (history, ring, recalled
2
+ // counter, token ledger row and the client's shown list).
3
+ import { auditQueryFields } from '../../base/records/audit-report.js';
6
4
  import { recordTokens } from '../tokens.js';
7
- const DEFAULT_MIN_DOMINANCE = 3;
8
- const DEFAULT_RECENT_REPEAT_WINDOW = 5;
9
- const DEFAULT_COOLDOWN = 3;
10
- /**
11
- * Normalizes a query (lowercase, strip non-alphanumerics, drop short tokens, sort, dedup, join) and hashes it with
12
- * 32-bit FNV-1a.
13
- * Reordered words collide intentionally; deterministic across processes and V8 versions. */
14
- export function hashQueryText(query) {
15
- if (!query)
16
- return 0;
17
- // Tokens are deduped before join so `foo foo bar` and `foo bar` count as one query for memory_dominance.
18
- // Unicode classes (\p{L}, \p{N}, \p{M}; need /u) keep non-Latin queries from collapsing to an empty token set and
19
- // colliding at hash 0.
20
- const normalized = query
21
- .toLowerCase()
22
- .replace(/[^\p{L}\p{N}\p{M}\s]/gu, ' ')
23
- .split(/\s+/)
24
- .filter((t) => t.length > 0);
25
- // Drop tokens under 3 chars (filler words) so `a login bug` and `login bug` hash
26
- // alike; matches the >=3 filter in src/learn/forward-claim-detector.ts.
27
- const filtered = normalized.filter((t) => t.length >= 3);
28
- // Fall back to all tokens when the filter empties the query (CJK 2-char words,
29
- // acronyms like `AI`) so distinct short queries do not all hash to fnv1a32('').
30
- const tokens = filtered.length > 0 ? filtered : normalized;
31
- const deduped = Array.from(new Set(tokens)).sort();
32
- return fnv1a32(deduped.join(' '));
33
- }
34
- function fnv1a32(text) {
35
- // FNV-1a 32-bit. Offset basis 2166136261, prime 16777619.
36
- let hash = 2166136261;
37
- for (let i = 0; i < text.length; i++) {
38
- hash ^= text.charCodeAt(i);
39
- // 32-bit multiply via Math.imul — handles overflow correctly.
40
- hash = Math.imul(hash, 16777619);
41
- }
42
- // Coerce to unsigned 32-bit for stable comparison.
43
- return hash >>> 0;
44
- }
45
- /**
46
- * Detects anchoring against the current (queryHash, topMemoryId); memory_dominance wins when both rules fire, since it
47
- * spans DIFFERENT queries.
48
- * Cooldown is per memory: a hint on the SAME topMemoryId within `cooldown=3` history entries is suppressed. Returns an
49
- * AnchoringHint or null.
50
- */
51
- export function detectAnchoring(history, currentQueryHash, currentTopMemoryId, opts = {}) {
52
- if (currentTopMemoryId === null)
53
- return null;
54
- const minDominance = opts.minDominance ?? DEFAULT_MIN_DOMINANCE;
55
- const recentRepeatWindow = opts.recentRepeatWindow ?? DEFAULT_RECENT_REPEAT_WINDOW;
56
- const cooldown = opts.cooldown ?? DEFAULT_COOLDOWN;
57
- // Cooldown gate: was the most-recent hint (across the last `cooldown`
58
- // entries) for THIS memory? If yes, suppress regardless of rule.
59
- const cooldownSlice = history.slice(-cooldown);
60
- for (const entry of cooldownSlice) {
61
- if (entry.anchoredOn === currentTopMemoryId) {
62
- return null;
63
- }
64
- }
65
- // memory_dominance check FIRST (wins on tie).
66
- const queryCount = countDistinctQueries(history, currentQueryHash, currentTopMemoryId);
67
- if (queryCount >= minDominance) {
68
- return {
69
- reason: 'memory_dominance',
70
- memoryId: currentTopMemoryId,
71
- queryCount,
72
- summary: `Memory ${currentTopMemoryId} has been the top result for ${queryCount} distinct queries in this ` +
73
- `session and may be anchoring your reasoning.`,
74
- source: 'j1-recurrence',
75
- };
76
- }
77
- if (isRecentRepeat(history, recentRepeatWindow, currentQueryHash, currentTopMemoryId)) {
78
- return {
79
- reason: 'query_repeat',
80
- memoryId: currentTopMemoryId,
81
- summary: `Same query phrasing as a recent recall returned the same top result (${currentTopMemoryId}); you may ` +
82
- `be re-asking the same question.`,
83
- source: 'j1-recurrence',
84
- };
85
- }
86
- return null;
87
- }
88
- // Count distinct queryHashes in history where topMemoryId === the current top
89
- // (excluding null tops), plus the current query itself.
90
- function countDistinctQueries(history, currentQueryHash, currentTopMemoryId) {
91
- const matchingQueryHashes = new Set();
92
- for (const entry of history) {
93
- if (entry.topMemoryId === currentTopMemoryId) {
94
- matchingQueryHashes.add(entry.queryHash);
95
- }
96
- }
97
- matchingQueryHashes.add(currentQueryHash);
98
- return matchingQueryHashes.size;
99
- }
100
- // query_repeat check: is currentQueryHash present in the last `recentRepeatWindow`
101
- // entries AND was that entry's topMemoryId === currentTopMemoryId?
102
- function isRecentRepeat(history, recentRepeatWindow, currentQueryHash, currentTopMemoryId) {
103
- return history
104
- .slice(-recentRepeatWindow)
105
- .some((entry) => entry.queryHash === currentQueryHash && entry.topMemoryId === currentTopMemoryId);
106
- }
107
- const MAX_HISTORY = 10;
108
- const DEFAULT_MAX_SESSIONS = 1000;
109
- /**
110
- * Bounded FIFO ring of RecallHistoryEntry (oldest evicted when full); a thin array wrapper so snapshotRing returns a
111
- * readonly view without copying.
112
- */
113
- export class RingBuffer {
114
- entries = [];
115
- append(entry) {
116
- this.entries.push(entry);
117
- if (this.entries.length > MAX_HISTORY) {
118
- this.entries.shift();
119
- }
120
- }
121
- snapshot() {
122
- return this.entries;
123
- }
124
- size() {
125
- return this.entries.length;
126
- }
127
- }
128
- /** Builds the (tenant, session) key with a NUL delimiter: tenant and session ids are validated elsewhere to reject NUL,
129
- * so concatenation cannot collide even though API-key-derived subjects can contain `:`. */
130
- export function buildSessionKey(tenantId, sessionId) {
131
- return `${tenantId}\x00${sessionId}`;
132
- }
133
- /**
134
- * Get-or-create a RingBuffer per session key, capped at `maxSessions` (default 1000); at the cap the oldest-inserted
135
- * key (first from Map.keys()) is
136
- * evicted. */
137
- export function getOrCreateRing(map, key, maxSessions = DEFAULT_MAX_SESSIONS) {
138
- const existing = map.get(key);
139
- if (existing) {
140
- // LRU touch: delete + re-insert to move to back of iteration order.
141
- map.delete(key);
142
- map.set(key, existing);
143
- return existing;
144
- }
145
- if (map.size >= maxSessions) {
146
- const oldest = map.keys().next().value;
147
- if (oldest !== undefined)
148
- map.delete(oldest);
149
- }
150
- const ring = new RingBuffer();
151
- map.set(key, ring);
152
- return ring;
153
- }
154
- /**
155
- * Appends a recall to a ring; `anchoredOn` is the memoryId of the hint that fired on THIS recall (or undefined), read
156
- * by detectAnchoring for cooldown.
157
- */
158
- export function appendRecall(ring, queryHash, topMemoryId, anchoredOn) {
159
- const entry = {
160
- queryHash,
161
- topMemoryId,
162
- ts: new Date().toISOString(),
163
- };
164
- if (anchoredOn !== undefined)
165
- entry.anchoredOn = anchoredOn;
166
- ring.append(entry);
167
- }
168
- /** Snapshot a ring as a readonly RecallHistorySnapshot. */
169
- export function snapshotRing(ring) {
170
- return ring.snapshot();
171
- }
172
- /**
173
- * Whether a recall bias hint is enabled; reads env at call time, so `HIPPO_ANCHORING=off` or `HIPPO_AVAILABILITY=off`
174
- * disables only that kind.
175
- */
176
- export function biasHintEnabled(kind) {
177
- return kind === 'anchoring'
178
- ? !envAnchoringOff()
179
- : !envAvailabilityOff();
180
- }
181
- // entriesByIds reads at most this many ids a call.
182
- const ID_READ_CHUNK = 500;
5
+ import { strengthOf } from '../types.js';
6
+ import { keepShownIds } from './last-recalled.js';
7
+ import { biasHintEnabled, } from './anchoring.js';
8
+ import { sessionRing, peekSessionRing, noteRecall } from './session-rings.js';
183
9
  /** The ids among `ids` that a tenant's rows in `store` hold. */
184
10
  export async function heldIds(store, ids, tenantId) {
185
11
  const held = new Set();
186
- for (let i = 0; i < ids.length; i += ID_READ_CHUNK) {
187
- for (const entry of await store.entriesByIds(ids.slice(i, i + ID_READ_CHUNK), tenantId))
188
- held.add(entry.id);
189
- }
12
+ for (const entry of await store.entriesByIds(ids, tenantId))
13
+ held.add(entry.id);
190
14
  return held;
191
15
  }
192
- // One map per surface, each with its own LRU cap, so a repeat on one surface is a first recall on another.
193
- const rings = {
194
- cli: new Map(),
195
- mcp: new Map(),
196
- http: new Map(),
197
- };
198
- /** The session's ring, created on first use; null when anchoring is off or the call has no session. */
199
- export function sessionRing(surface, tenantId, sessionId) {
200
- if (!biasHintEnabled('anchoring') || !sessionId)
201
- return null;
202
- return getOrCreateRing(rings[surface], buildSessionKey(tenantId, sessionId));
203
- }
204
- /**
205
- * The session's history, read without creating or touching its ring, so a request that then fails evicts no live
206
- * session.
207
- */
208
- function peekSessionRing(surface, tenantId, sessionId) {
209
- const ring = rings[surface].get(buildSessionKey(tenantId, sessionId));
210
- return ring ? snapshotRing(ring) : [];
211
- }
212
- /** Records this recall's top row and hint, which the next recall's cooldown reads. */
213
- export function noteRecall(ring, query, topId, anchoredOn) {
214
- appendRecall(ring, hashQueryText(query), topId, anchoredOn);
215
- }
216
- export function resetSessionRings(surface) {
217
- rings[surface].clear();
218
- }
219
16
  export function callerOf(ctx) {
220
17
  return { tenantId: ctx.tenantId, actor: ctx.actor.subject };
221
18
  }
222
- /** The strengthen every ranker of `retrieve` hands to the recall's write: the shown ids, in the caller's tenant. */
19
+ /** The strengthen every ranker of `retrieve` hands to the recall's write: the shown ids, in the
20
+ * caller's tenant. */
223
21
  export function strengthenOf(ctx, ids) {
224
- return { ids, opts: { tenantId: ctx.tenantId, recallBoostAblated: isRecallBoostAblated() } };
22
+ return {
23
+ ids,
24
+ opts: { tenantId: ctx.tenantId, recallBoostAblated: !strengthOf(ctx).recallStrengthens },
25
+ };
225
26
  }
226
27
  export function recallAuditRow(who, op, targetId, metadata) {
227
28
  return { tenantId: who.tenantId, actor: who.actor, op, targetId, metadata };
228
29
  }
229
- // The row stores a hash of the query, never its text, so an archived memory's words cannot persist there.
30
+ // The row stores a hash of the query, never its text, so an archived memory's words cannot persist
31
+ // there.
230
32
  export function recallAuditMetadata(query, results) {
231
33
  return { ...auditQueryFields(query), results };
232
34
  }
233
35
  /**
234
- * No session means no ring; the row hashes with SHA-256/16, since hashQueryText is FNV-1a and easy to reverse on short
235
- * queries.
36
+ * No session means no ring; the row hashes with SHA-256/16, since hashQueryText is FNV-1a and easy
37
+ * to reverse on short queries.
236
38
  */
237
- export function anchorSkippedRows(who, query) {
238
- if (!biasHintEnabled('anchoring'))
39
+ export function anchorSkippedRows(config, who, query) {
40
+ if (!biasHintEnabled(config, 'anchoring'))
239
41
  return [];
240
- return [recallAuditRow(who, 'recall_anchor_skipped_no_session', undefined, auditQueryFields(query))];
42
+ return [
43
+ recallAuditRow(who, 'recall_anchor_skipped_no_session', undefined, auditQueryFields(query)),
44
+ ];
241
45
  }
242
46
  export function anchoringRows(who, hint) {
243
47
  if (hint?.reason === 'memory_dominance') {
244
- return [recallAuditRow(who, 'recall_anchor_detected_memory_dominance', hint.memoryId, {
48
+ return [
49
+ recallAuditRow(who, 'recall_anchor_detected_memory_dominance', hint.memoryId, {
245
50
  memory_id: hint.memoryId,
246
51
  query_count: hint.queryCount ?? null,
247
- })];
52
+ }),
53
+ ];
248
54
  }
249
55
  if (hint?.reason === 'query_repeat') {
250
- return [recallAuditRow(who, 'recall_anchor_detected_query_repeat', hint.memoryId, { memory_id: hint.memoryId })];
56
+ return [
57
+ recallAuditRow(who, 'recall_anchor_detected_query_repeat', hint.memoryId, {
58
+ memory_id: hint.memoryId,
59
+ }),
60
+ ];
251
61
  }
252
62
  return [];
253
63
  }
254
64
  export function availabilityRows(who, hint) {
255
65
  if (!hint)
256
66
  return [];
257
- return [recallAuditRow(who, 'recall_availability_detected', undefined, {
67
+ return [
68
+ recallAuditRow(who, 'recall_availability_detected', undefined, {
258
69
  recent_fraction: hint.recentFraction,
259
70
  older_passed_over: hint.olderCandidatesPassedOver,
260
71
  returned_count: hint.returnedCount,
261
- })];
72
+ }),
73
+ ];
262
74
  }
263
- /**
264
- * The hint rows for a list a surface showed, so a surface on the store port can hand them to the recall's one write.
265
- */
266
- export function shownRecallRows(who, shown) {
75
+ /** The hint rows for a list a surface showed, written in the recall's one write. */
76
+ export function shownRecallRows(ctx, shown, hints) {
77
+ const who = callerOf(ctx);
267
78
  return [
268
- ...(shown.ring ? [] : anchorSkippedRows(who, shown.query)),
269
- ...anchoringRows(who, shown.anchoring),
270
- ...availabilityRows(who, shown.availability),
79
+ ...(shown.sessionId ? [] : anchorSkippedRows(ctx.config, who, shown.query)),
80
+ ...anchoringRows(who, hints.anchoring),
81
+ ...availabilityRows(who, hints.availability),
271
82
  ];
272
83
  }
273
- /** The surfaces `retrieve` records in full. MCP is pending: src/mcp still feeds its own ring and books its own ledger
274
- * row, and counts no stats. */
84
+ /** Each surface's recording; docs/recall-surface-differences.md names why they differ. */
275
85
  export const RECALL_RECORDING = {
276
- http: { ring: 'http', ledger: 'http_recall', stats: 'every' },
277
- cli: { ring: 'cli', ledger: 'recall', stats: 'shown' },
86
+ http: { ring: 'http', ledger: 'http_recall', counts: 'every' },
87
+ cli: { ring: 'cli', ledger: 'recall', counts: 'shown' },
88
+ mcp: { ring: 'mcp', ledger: 'mcp_recall', counts: 'none' },
278
89
  };
279
- /** For a surface whose hint `retrieve` judges: the session's history, or the row saying the recall named no session. */
90
+ /** For a surface whose hint `retrieve` judges: the session's history, or the row saying the
91
+ * recall named no session. */
280
92
  export function recallLead(ctx, how, query, sessionId) {
281
93
  return {
282
94
  // Peeked, never created: a recall that then fails must not LRU-evict a live session.
283
- recallHistory: sessionId && biasHintEnabled('anchoring') ? peekSessionRing(how.ring, ctx.tenantId, sessionId) : undefined,
95
+ recallHistory: sessionId && biasHintEnabled(ctx.config, 'anchoring')
96
+ ? peekSessionRing(ctx, how.ring, sessionId)
97
+ : undefined,
284
98
  // Written first in the recall's own write, so a recall that fails leaves no row.
285
- leadingAudit: sessionId ? [] : anchorSkippedRows(callerOf(ctx), query),
99
+ leadingAudit: sessionId ? [] : anchorSkippedRows(ctx.config, callerOf(ctx), query),
286
100
  };
287
101
  }
288
- /** Runs after the recall's own write, in this order: the ring, then the counter, then the ledger. */
102
+ /** Runs after the recall's own write, in order: the ring, the counter, the ledger, then the
103
+ * client's shown list. */
289
104
  export async function recordShownRecall(ctx, store, how, shown) {
290
- // A surface that only peeked has its ring created here, after the
291
- // write, so a recall that fails cannot LRU-evict a live session.
292
- const ring = sessionRing(how.ring, ctx.tenantId, shown.sessionId);
293
- if (ring)
294
- noteRecall(ring, shown.query, shown.topId, shown.anchoredOn);
105
+ // A surface that only peeked has its ring created here, after the write, so a recall that fails
106
+ // cannot LRU-evict a live session.
107
+ const ring = sessionRing(ctx, how.ring, shown.sessionId);
108
+ if (ring) {
109
+ noteRecall({
110
+ ring,
111
+ query: shown.query,
112
+ topId: shown.ids[0] ?? null,
113
+ anchoredOn: shown.anchoredOn,
114
+ now: ctx.infra.clock(),
115
+ });
116
+ }
117
+ const items = how.counts === 'none' ? 0 : shown.ids.length;
295
118
  // A recall with no audit row counts nothing, as it strengthens and traces nothing.
296
- if (shown.written && (how.stats === 'every' || shown.items > 0))
297
- await store.bumpRecallStats(shown.items);
119
+ if (shown.written && (how.counts === 'every' || items > 0))
120
+ await store.bumpRecallStats(items);
298
121
  // The ledger books text that was sent, so its row does not wait on the audit write.
299
- await recordTokens(ctx, how.ledger, { items: shown.items, tokens: shown.tokens, sessionId: shown.ledgerSessionId });
122
+ await recordTokens(ctx, how.ledger, {
123
+ items,
124
+ tokens: shown.tokens,
125
+ sessionId: shown.ledgerSessionId,
126
+ });
127
+ keepShownIds(ctx, shown.ids);
300
128
  }
301
129
  //# sourceMappingURL=finish.js.map
@@ -0,0 +1,13 @@
1
+ import type { Context } from '../types.js';
2
+ export declare class RecentRecalls extends Map<string, string[]> {
3
+ set(key: string, ids: string[]): this;
4
+ }
5
+ /** The root's map and the key its surface set for this client. */
6
+ type ShownKeeper = Pick<Context, 'callers' | 'clientKey'>;
7
+ /** Keeps the ids a recall or context call just showed this client; a context with no client key
8
+ * keeps none. */
9
+ export declare function keepShownIds(ctx: ShownKeeper, ids: readonly string[]): void;
10
+ /** The ids this client was last shown, for an outcome that names none. */
11
+ export declare function keptShownIds(ctx: ShownKeeper): readonly string[];
12
+ export {};
13
+ //# sourceMappingURL=last-recalled.d.ts.map
@@ -0,0 +1,26 @@
1
+ // The ids each client was last shown, so its next outcome lands on them. Keyed per client, so two
2
+ // HTTP clients on one tenant cannot poison each other; the root's CallerState holds the map.
3
+ const MAX_RECALL_CLIENTS = 4096;
4
+ // The caller names the project half of each key, so a set past the cap drops the client that
5
+ // recalled longest ago.
6
+ export class RecentRecalls extends Map {
7
+ set(key, ids) {
8
+ this.delete(key);
9
+ super.set(key, ids);
10
+ const oldest = this.keys().next().value;
11
+ if (this.size > MAX_RECALL_CLIENTS && oldest !== undefined)
12
+ this.delete(oldest);
13
+ return this;
14
+ }
15
+ }
16
+ /** Keeps the ids a recall or context call just showed this client; a context with no client key
17
+ * keeps none. */
18
+ export function keepShownIds(ctx, ids) {
19
+ if (ctx.clientKey)
20
+ ctx.callers?.lastShown.set(ctx.clientKey, [...ids]);
21
+ }
22
+ /** The ids this client was last shown, for an outcome that names none. */
23
+ export function keptShownIds(ctx) {
24
+ return (ctx.clientKey && ctx.callers?.lastShown.get(ctx.clientKey)) || [];
25
+ }
26
+ //# sourceMappingURL=last-recalled.js.map