shieldcortex 4.12.13 → 4.13.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 (452) hide show
  1. package/dashboard/.next/standalone/dashboard/.next/BUILD_ID +1 -1
  2. package/dashboard/.next/standalone/dashboard/.next/build-manifest.json +2 -2
  3. package/dashboard/.next/standalone/dashboard/.next/prerender-manifest.json +3 -3
  4. package/dashboard/.next/standalone/dashboard/.next/required-server-files.json +10 -4
  5. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page.js +1 -1
  6. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page.js.nft.json +1 -1
  7. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/admin/page_client-reference-manifest.js +1 -1
  8. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page.js +1 -1
  9. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page.js.nft.json +1 -1
  10. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/cloud/page_client-reference-manifest.js +1 -1
  11. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page.js +1 -1
  12. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page.js.nft.json +1 -1
  13. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/capture/page_client-reference-manifest.js +1 -1
  14. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page.js +1 -1
  15. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page.js.nft.json +1 -1
  16. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/graph/page_client-reference-manifest.js +1 -1
  17. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page.js +1 -1
  18. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
  19. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
  20. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page.js +1 -1
  21. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page.js.nft.json +1 -1
  22. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/recall/page_client-reference-manifest.js +1 -1
  23. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page.js +1 -1
  24. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page.js.nft.json +1 -1
  25. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/review/page_client-reference-manifest.js +1 -1
  26. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page.js +1 -1
  27. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page.js.nft.json +1 -1
  28. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/memory/timeline/page_client-reference-manifest.js +1 -1
  29. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page.js +1 -1
  30. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page.js.nft.json +1 -1
  31. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/overview/page_client-reference-manifest.js +1 -1
  32. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page.js +1 -1
  33. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page.js.nft.json +1 -1
  34. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/audit/page_client-reference-manifest.js +1 -1
  35. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page.js +1 -1
  36. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page.js.nft.json +1 -1
  37. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/intercepts/page_client-reference-manifest.js +1 -1
  38. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page.js +1 -1
  39. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page.js.nft.json +1 -1
  40. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/iron-dome/page_client-reference-manifest.js +1 -1
  41. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page.js +1 -1
  42. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page.js.nft.json +1 -1
  43. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/page_client-reference-manifest.js +1 -1
  44. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page.js +1 -1
  45. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page.js.nft.json +1 -1
  46. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/policies/page_client-reference-manifest.js +1 -1
  47. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page.js +1 -1
  48. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page.js.nft.json +1 -1
  49. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/protection/quarantine/page_client-reference-manifest.js +1 -1
  50. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page.js +1 -1
  51. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  52. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  53. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page.js +1 -1
  54. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page.js.nft.json +1 -1
  55. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/page_client-reference-manifest.js +1 -1
  56. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page.js +1 -1
  57. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page.js.nft.json +1 -1
  58. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/supply-chain/xray/page_client-reference-manifest.js +1 -1
  59. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page.js +1 -1
  60. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page.js.nft.json +1 -1
  61. package/dashboard/.next/standalone/dashboard/.next/server/app/(dashboard)/xray/page_client-reference-manifest.js +1 -1
  62. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
  63. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  64. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.html +2 -2
  65. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +1 -1
  66. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  67. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  69. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  70. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  71. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  72. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  73. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +1 -1
  74. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +2 -2
  75. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  76. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  77. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  78. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  79. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  80. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  81. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.html +1 -1
  82. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.rsc +17 -15
  83. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin/__PAGE__.segment.rsc +1 -1
  84. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin.segment.rsc +1 -1
  85. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  86. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_full.segment.rsc +17 -15
  87. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  88. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_index.segment.rsc +2 -2
  89. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_tree.segment.rsc +2 -2
  90. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.html +1 -1
  91. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.rsc +17 -15
  92. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud/__PAGE__.segment.rsc +1 -1
  93. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud.segment.rsc +1 -1
  94. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  95. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_full.segment.rsc +17 -15
  96. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_head.segment.rsc +1 -1
  97. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_index.segment.rsc +2 -2
  98. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_tree.segment.rsc +2 -2
  99. package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
  100. package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +2 -2
  101. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  102. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_full.segment.rsc +2 -2
  103. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
  104. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_index.segment.rsc +2 -2
  105. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  106. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.html +1 -1
  107. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.rsc +17 -15
  108. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture/__PAGE__.segment.rsc +1 -1
  109. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture.segment.rsc +1 -1
  110. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  111. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  112. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_full.segment.rsc +17 -15
  113. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_head.segment.rsc +1 -1
  114. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_index.segment.rsc +2 -2
  115. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_tree.segment.rsc +2 -2
  116. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.html +1 -1
  117. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.rsc +17 -15
  118. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph/__PAGE__.segment.rsc +1 -1
  119. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph.segment.rsc +1 -1
  120. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  121. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  122. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_full.segment.rsc +17 -15
  123. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_head.segment.rsc +1 -1
  124. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_index.segment.rsc +2 -2
  125. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_tree.segment.rsc +2 -2
  126. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.html +1 -1
  127. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.rsc +17 -15
  128. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall/__PAGE__.segment.rsc +1 -1
  129. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall.segment.rsc +1 -1
  130. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  131. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  132. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_full.segment.rsc +17 -15
  133. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_head.segment.rsc +1 -1
  134. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_index.segment.rsc +2 -2
  135. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_tree.segment.rsc +2 -2
  136. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.html +1 -1
  137. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.rsc +17 -15
  138. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review/__PAGE__.segment.rsc +1 -1
  139. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review.segment.rsc +1 -1
  140. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  141. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  142. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_full.segment.rsc +17 -15
  143. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_head.segment.rsc +1 -1
  144. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_index.segment.rsc +2 -2
  145. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_tree.segment.rsc +2 -2
  146. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.html +1 -1
  147. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.rsc +17 -15
  148. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline/__PAGE__.segment.rsc +1 -1
  149. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline.segment.rsc +1 -1
  150. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  151. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  152. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_full.segment.rsc +17 -15
  153. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_head.segment.rsc +1 -1
  154. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_index.segment.rsc +2 -2
  155. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_tree.segment.rsc +2 -2
  156. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.html +1 -1
  157. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.rsc +21 -18
  158. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +2 -2
  159. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  160. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  161. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_full.segment.rsc +21 -18
  162. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_head.segment.rsc +1 -1
  163. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_index.segment.rsc +2 -2
  164. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +2 -2
  165. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.html +1 -1
  166. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.rsc +20 -18
  167. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview/__PAGE__.segment.rsc +2 -2
  168. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview.segment.rsc +1 -1
  169. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  170. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_full.segment.rsc +20 -18
  171. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_head.segment.rsc +1 -1
  172. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_index.segment.rsc +2 -2
  173. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_tree.segment.rsc +2 -2
  174. package/dashboard/.next/standalone/dashboard/.next/server/app/page.js.nft.json +1 -1
  175. package/dashboard/.next/standalone/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  176. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.html +1 -1
  177. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.rsc +17 -15
  178. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit/__PAGE__.segment.rsc +1 -1
  179. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit.segment.rsc +1 -1
  180. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  181. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  182. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_full.segment.rsc +17 -15
  183. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_head.segment.rsc +1 -1
  184. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_index.segment.rsc +2 -2
  185. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_tree.segment.rsc +2 -2
  186. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.html +1 -1
  187. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.rsc +17 -15
  188. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts/__PAGE__.segment.rsc +1 -1
  189. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts.segment.rsc +1 -1
  190. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  191. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  192. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_full.segment.rsc +17 -15
  193. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_head.segment.rsc +1 -1
  194. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_index.segment.rsc +2 -2
  195. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_tree.segment.rsc +2 -2
  196. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.html +1 -1
  197. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.rsc +17 -15
  198. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome/__PAGE__.segment.rsc +1 -1
  199. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome.segment.rsc +1 -1
  200. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  201. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  202. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_full.segment.rsc +17 -15
  203. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_head.segment.rsc +1 -1
  204. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_index.segment.rsc +2 -2
  205. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_tree.segment.rsc +2 -2
  206. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.html +1 -1
  207. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.rsc +17 -15
  208. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies/__PAGE__.segment.rsc +1 -1
  209. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies.segment.rsc +1 -1
  210. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  211. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  212. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_full.segment.rsc +17 -15
  213. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_head.segment.rsc +1 -1
  214. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_index.segment.rsc +2 -2
  215. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_tree.segment.rsc +2 -2
  216. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.html +1 -1
  217. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.rsc +17 -15
  218. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine/__PAGE__.segment.rsc +1 -1
  219. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine.segment.rsc +1 -1
  220. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  221. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  222. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_full.segment.rsc +17 -15
  223. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_head.segment.rsc +1 -1
  224. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_index.segment.rsc +2 -2
  225. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_tree.segment.rsc +2 -2
  226. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.html +1 -1
  227. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.rsc +17 -15
  228. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection/__PAGE__.segment.rsc +2 -2
  229. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  230. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  231. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_full.segment.rsc +17 -15
  232. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_head.segment.rsc +1 -1
  233. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_index.segment.rsc +2 -2
  234. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_tree.segment.rsc +2 -2
  235. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.html +1 -1
  236. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.rsc +17 -15
  237. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +2 -2
  238. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings.segment.rsc +1 -1
  239. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  240. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_full.segment.rsc +17 -15
  241. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  242. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  243. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  244. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.html +1 -1
  245. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.rsc +17 -15
  246. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray/__PAGE__.segment.rsc +1 -1
  247. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray.segment.rsc +1 -1
  248. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  249. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  250. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_full.segment.rsc +17 -15
  251. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_head.segment.rsc +1 -1
  252. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_index.segment.rsc +2 -2
  253. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_tree.segment.rsc +2 -2
  254. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.html +1 -1
  255. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.rsc +17 -15
  256. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain/__PAGE__.segment.rsc +1 -1
  257. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  258. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  259. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_full.segment.rsc +17 -15
  260. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_head.segment.rsc +1 -1
  261. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_index.segment.rsc +2 -2
  262. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_tree.segment.rsc +2 -2
  263. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.html +1 -1
  264. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.rsc +17 -15
  265. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray/__PAGE__.segment.rsc +2 -2
  266. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray.segment.rsc +1 -1
  267. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +9 -7
  268. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_full.segment.rsc +17 -15
  269. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_head.segment.rsc +1 -1
  270. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_index.segment.rsc +2 -2
  271. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_tree.segment.rsc +2 -2
  272. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/9f1d4_@tanstack_68dcbde9._.js +3 -0
  273. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__fb5796ae._.js → [root-of-the-server]__2de25d56._.js} +2 -2
  274. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__52bd7a9f._.js +3 -0
  275. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__b789489c._.js → [root-of-the-server]__6f881a23._.js} +2 -2
  276. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_01f6ceb0._.js +1 -1
  277. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_20c6acea._.js +3 -0
  278. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/{9f1d4_next_c9fe89e1._.js → dashboard_25b568c3._.js} +2 -2
  279. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_2a8eef6b._.js +3 -0
  280. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_35a9932a._.js +1 -1
  281. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_37f17371._.js +1 -1
  282. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_77cb2b63._.js +3 -0
  283. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_91003e6d._.js +3 -0
  284. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9b8695d8._.js +3 -0
  285. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_a16ef10a._.js +3 -0
  286. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_c219bf07._.js +4 -4
  287. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_f9cd1dc2._.js +3 -0
  288. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_fefd3b85._.js +1 -1
  289. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_44a9f72c._.js +3 -0
  290. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_de7ac4f9._.js +3 -0
  291. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_protection_ProtectionOverview_tsx_54554a97._.js +3 -3
  292. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_settings_SettingsView_tsx_16dc83a7._.js +1 -1
  293. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_components_xray_XRayOverview_tsx_ceba698e._.js +1 -1
  294. package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +1 -1
  295. package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +2 -2
  296. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.js +1 -1
  297. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.json +1 -1
  298. package/dashboard/.next/standalone/dashboard/.next/static/chunks/015dc64369f26b7d.css +3 -0
  299. package/dashboard/.next/standalone/dashboard/.next/static/chunks/2fe84829530e61a3.js +1 -0
  300. package/dashboard/.next/standalone/dashboard/.next/static/chunks/34d0309a4e34b084.js +1 -0
  301. package/dashboard/.next/standalone/dashboard/.next/static/chunks/3729c748a4361c1f.js +1 -0
  302. package/dashboard/.next/standalone/dashboard/.next/static/chunks/3b7fdf1ee828254c.js +1 -0
  303. package/dashboard/.next/standalone/dashboard/.next/static/chunks/{3d53807a9a943ce7.js → 4c90ebd2c08cd656.js} +4 -4
  304. package/dashboard/.next/standalone/dashboard/.next/static/chunks/4d4af0cecaef56f2.js +1 -0
  305. package/dashboard/.next/standalone/dashboard/.next/static/chunks/4eb86dc2f379d3ca.js +1 -0
  306. package/dashboard/.next/standalone/dashboard/.next/static/chunks/6aba18b7aac42ccd.js +1 -0
  307. package/dashboard/.next/standalone/dashboard/.next/static/chunks/{b4b3fb5729bead7e.js → 6ea97c8dc9e30ea5.js} +1 -1
  308. package/dashboard/.next/standalone/dashboard/.next/static/chunks/74ea1a87751e93a3.js +1 -0
  309. package/dashboard/.next/standalone/dashboard/.next/static/chunks/910628c23329a773.js +1 -0
  310. package/dashboard/.next/standalone/dashboard/.next/static/chunks/{c288964c4c00982a.js → b308a787e8cbc2a9.js} +3 -3
  311. package/dashboard/.next/standalone/dashboard/.next/static/chunks/bdb50889a1c1ab37.js +1 -0
  312. package/dashboard/.next/standalone/dashboard/.next/static/chunks/d0bf5ccba09917dd.js +1 -0
  313. package/dashboard/.next/standalone/dashboard/.next/static/chunks/e804a1fda2839550.js +1 -0
  314. package/dashboard/.next/standalone/dashboard/server.js +1 -1
  315. package/dist/api/routes/digest.d.ts +59 -0
  316. package/dist/api/routes/digest.js +305 -0
  317. package/dist/api/routes/memories.js +84 -15
  318. package/dist/api/routes/system.js +10 -2
  319. package/dist/api/visualization-server.js +2 -0
  320. package/dist/cli/doctor.d.ts +27 -0
  321. package/dist/cli/doctor.js +88 -0
  322. package/dist/cli/migrate-legacy.d.ts +28 -0
  323. package/dist/cli/migrate-legacy.js +291 -0
  324. package/dist/cloud/cli.js +2 -2
  325. package/dist/database/init.js +26 -1
  326. package/dist/index.js +8 -1
  327. package/dist/memory/backup.d.ts +19 -0
  328. package/dist/memory/backup.js +47 -0
  329. package/dist/memory/dedupe-runner.d.ts +33 -0
  330. package/dist/memory/dedupe-runner.js +103 -0
  331. package/dist/memory/fts.d.ts +26 -0
  332. package/dist/memory/fts.js +59 -0
  333. package/dist/memory/lifecycle.d.ts +83 -0
  334. package/dist/memory/lifecycle.js +274 -0
  335. package/dist/memory/links.d.ts +63 -0
  336. package/dist/memory/links.js +232 -0
  337. package/dist/memory/prune.d.ts +34 -0
  338. package/dist/memory/prune.js +76 -0
  339. package/dist/memory/search-recall.d.ts +48 -0
  340. package/dist/memory/search-recall.js +367 -0
  341. package/dist/memory/store.d.ts +6 -121
  342. package/dist/memory/store.js +45 -854
  343. package/dist/setup/claude-md.d.ts +1 -0
  344. package/dist/setup/deep-clean.d.ts +33 -0
  345. package/dist/setup/deep-clean.js +26 -0
  346. package/dist/setup/doctor.js +7 -2
  347. package/dist/setup/openclaw.js +13 -39
  348. package/dist/setup/settings-hooks.d.ts +1 -0
  349. package/dist/setup/settings-hooks.js +30 -5
  350. package/dist/setup/status.js +39 -0
  351. package/hooks/openclaw/cortex-memory/runtime.mjs +18 -4
  352. package/package.json +1 -1
  353. package/plugins/openclaw/dist/index.js +12 -6
  354. package/plugins/openclaw/dist/openclaw.plugin.json +1 -1
  355. package/scripts/lib/auto-memory-config.mjs +45 -0
  356. package/scripts/lib/telemetry.mjs +58 -0
  357. package/scripts/lib/transcript-reader.mjs +123 -0
  358. package/scripts/postinstall.mjs +47 -1
  359. package/scripts/pre-compact-hook.mjs +76 -124
  360. package/scripts/session-end-hook.mjs +102 -97
  361. package/scripts/stop-hook.mjs +346 -116
  362. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/9f1d4_@tanstack_785e068c._.js +0 -3
  363. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__c2b92077._.js +0 -3
  364. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_11878109._.js +0 -3
  365. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_35c9f22e._.js +0 -3
  366. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_836b4a04._.js +0 -3
  367. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9770c429._.js +0 -3
  368. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9dd626ed._.js +0 -3
  369. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_e94d2da2._.js +0 -3
  370. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_564ea5ae._.js +0 -3
  371. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_lib_3f1490a1._.js +0 -3
  372. package/dashboard/.next/standalone/dashboard/.next/static/chunks/079a5be036130e37.js +0 -1
  373. package/dashboard/.next/standalone/dashboard/.next/static/chunks/1770a8ce7abb2437.js +0 -1
  374. package/dashboard/.next/standalone/dashboard/.next/static/chunks/1a074f8ddc7cd385.js +0 -1
  375. package/dashboard/.next/standalone/dashboard/.next/static/chunks/24da99d1341bd573.css +0 -3
  376. package/dashboard/.next/standalone/dashboard/.next/static/chunks/2aa8afb655c1c2e5.js +0 -1
  377. package/dashboard/.next/standalone/dashboard/.next/static/chunks/302ad459a0e5c4ba.js +0 -1
  378. package/dashboard/.next/standalone/dashboard/.next/static/chunks/385ec610bad1acc5.js +0 -1
  379. package/dashboard/.next/standalone/dashboard/.next/static/chunks/4f57582c2d186438.js +0 -1
  380. package/dashboard/.next/standalone/dashboard/.next/static/chunks/52843253e4b833a5.js +0 -1
  381. package/dashboard/.next/standalone/dashboard/.next/static/chunks/7fca141efba9d353.js +0 -1
  382. package/dashboard/.next/standalone/dashboard/.next/static/chunks/8593e1796c9d043d.js +0 -1
  383. package/dashboard/.next/standalone/dashboard/.next/static/chunks/cbc2e6ffcad6e91c.js +0 -1
  384. package/dashboard/.next/standalone/dashboard/.next/static/chunks/fced7dd3c9874ed1.js +0 -1
  385. package/dashboard/.next/standalone/dashboard/node_modules/@img/colour/color.cjs +0 -1594
  386. package/dashboard/.next/standalone/dashboard/node_modules/@img/colour/index.cjs +0 -1
  387. package/dashboard/.next/standalone/dashboard/node_modules/@img/colour/package.json +0 -45
  388. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
  389. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
  390. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
  391. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
  392. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -42
  393. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
  394. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
  395. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
  396. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
  397. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
  398. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
  399. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
  400. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
  401. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linux-x64/package.json +0 -46
  402. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
  403. package/dashboard/.next/standalone/dashboard/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
  404. package/dashboard/.next/standalone/dashboard/node_modules/detect-libc/lib/detect-libc.js +0 -313
  405. package/dashboard/.next/standalone/dashboard/node_modules/detect-libc/lib/elf.js +0 -39
  406. package/dashboard/.next/standalone/dashboard/node_modules/detect-libc/lib/filesystem.js +0 -51
  407. package/dashboard/.next/standalone/dashboard/node_modules/detect-libc/lib/process.js +0 -24
  408. package/dashboard/.next/standalone/dashboard/node_modules/detect-libc/package.json +0 -44
  409. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/channel.js +0 -177
  410. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/colour.js +0 -195
  411. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/composite.js +0 -212
  412. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/constructor.js +0 -499
  413. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/index.js +0 -16
  414. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/input.js +0 -809
  415. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/is.js +0 -143
  416. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/libvips.js +0 -207
  417. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/operation.js +0 -1016
  418. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/output.js +0 -1666
  419. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/resize.js +0 -595
  420. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/sharp.js +0 -121
  421. package/dashboard/.next/standalone/dashboard/node_modules/sharp/lib/utility.js +0 -291
  422. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
  423. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/classes/range.js +0 -557
  424. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/classes/semver.js +0 -333
  425. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
  426. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
  427. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
  428. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
  429. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
  430. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
  431. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
  432. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
  433. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
  434. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
  435. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
  436. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
  437. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
  438. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
  439. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
  440. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
  441. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
  442. package/dashboard/.next/standalone/dashboard/node_modules/sharp/node_modules/semver/package.json +0 -78
  443. package/dashboard/.next/standalone/dashboard/node_modules/sharp/package.json +0 -202
  444. package/dashboard/.next/standalone/node_modules/@img/colour/package.json +0 -45
  445. package/dashboard/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -42
  446. package/dashboard/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
  447. package/dashboard/.next/standalone/node_modules/@img/sharp-linux-x64/package.json +0 -46
  448. package/dashboard/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
  449. package/dashboard/.next/standalone/node_modules/detect-libc/package.json +0 -44
  450. /package/dashboard/.next/standalone/dashboard/.next/static/{ZozFsMrOVzVLH6CQW3jPr → kiA_iEHG_1wWOEYFsD0Tj}/_buildManifest.js +0 -0
  451. /package/dashboard/.next/standalone/dashboard/.next/static/{ZozFsMrOVzVLH6CQW3jPr → kiA_iEHG_1wWOEYFsD0Tj}/_clientMiddlewareManifest.json +0 -0
  452. /package/dashboard/.next/standalone/dashboard/.next/static/{ZozFsMrOVzVLH6CQW3jPr → kiA_iEHG_1wWOEYFsD0Tj}/_ssgManifest.js +0 -0
@@ -0,0 +1,76 @@
1
+ import { getDatabase } from '../database/init.js';
2
+ import { deleteMemory } from './store.js';
3
+ import { backupMemoriesDb } from './backup.js';
4
+ const DEFAULTS = {
5
+ salienceLte: 0.2,
6
+ ageDaysGte: 30,
7
+ excludePinned: true,
8
+ dryRun: true,
9
+ };
10
+ const SAMPLE_LIMIT = 10;
11
+ function buildWhereClause(options) {
12
+ const where = [
13
+ 'salience <= ?',
14
+ "(julianday('now') - julianday(created_at)) >= ?",
15
+ "COALESCE(status, 'active') NOT IN ('archived', 'suppressed')",
16
+ ];
17
+ const params = [options.salienceLte, options.ageDaysGte];
18
+ if (options.project !== null) {
19
+ where.push('project = ?');
20
+ params.push(options.project);
21
+ }
22
+ if (options.excludePinned) {
23
+ where.push('COALESCE(pinned, 0) = 0');
24
+ }
25
+ return { where: where.join(' AND '), params };
26
+ }
27
+ /**
28
+ * Find + optionally delete memories below a salience threshold older than N
29
+ * days. Always backs up the live DB before any delete; the backup path is
30
+ * returned in the result so the caller can surface it to the user.
31
+ */
32
+ export async function pruneMemories(rawOptions = {}) {
33
+ const options = {
34
+ salienceLte: rawOptions.salienceLte ?? DEFAULTS.salienceLte,
35
+ ageDaysGte: rawOptions.ageDaysGte ?? DEFAULTS.ageDaysGte,
36
+ project: rawOptions.project ?? null,
37
+ excludePinned: rawOptions.excludePinned ?? DEFAULTS.excludePinned,
38
+ dryRun: rawOptions.dryRun ?? DEFAULTS.dryRun,
39
+ };
40
+ if (options.salienceLte < 0 || options.salienceLte > 1) {
41
+ throw new Error('salienceLte must be between 0 and 1');
42
+ }
43
+ if (options.ageDaysGte < 0) {
44
+ throw new Error('ageDaysGte must be >= 0');
45
+ }
46
+ const { where, params } = buildWhereClause(options);
47
+ const db = getDatabase();
48
+ const countRow = db.prepare(`SELECT COUNT(*) AS n FROM memories WHERE ${where}`).get(...params);
49
+ const matched = countRow.n;
50
+ const sampleRows = db
51
+ .prepare(`SELECT id, title, project, salience,
52
+ CAST(julianday('now') - julianday(created_at) AS INTEGER) AS age_days
53
+ FROM memories WHERE ${where}
54
+ ORDER BY salience ASC, created_at ASC
55
+ LIMIT ?`)
56
+ .all(...params, SAMPLE_LIMIT);
57
+ const sample = sampleRows.map((r) => ({
58
+ id: r.id,
59
+ title: r.title,
60
+ project: r.project,
61
+ salience: r.salience,
62
+ ageDays: r.age_days,
63
+ }));
64
+ const result = { options, matched, sample };
65
+ if (options.dryRun || matched === 0)
66
+ return result;
67
+ result.backupPath = await backupMemoriesDb('pre-prune');
68
+ const idRows = db.prepare(`SELECT id FROM memories WHERE ${where}`).all(...params);
69
+ let deleted = 0;
70
+ for (const row of idRows) {
71
+ if (deleteMemory(row.id, { type: 'cli', identifier: 'maintenance:prune' }))
72
+ deleted++;
73
+ }
74
+ result.deleted = deleted;
75
+ return result;
76
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Memory search and recall.
3
+ *
4
+ * Phase 3 of the audit-recommended store.ts split. The "search/recall"
5
+ * group is the hybrid FTS5 + vector pipeline (`searchMemoriesInternal`)
6
+ * and its three public entry points (`searchMemories`,
7
+ * `searchMemoriesExplained`, `recallWithEmbeddings`). Lifted out of
8
+ * store.ts (1,564 lines after phase 2) so the search pipeline can be
9
+ * read on its own without scrolling past every CRUD helper. No
10
+ * behaviour change vs the original implementation — exports re-emerge
11
+ * from store.ts via a barrel re-export so existing import paths keep
12
+ * working.
13
+ *
14
+ * Imports from store.ts (`rowToMemory`, `logAccessDenial`) form a
15
+ * module cycle, but both are only invoked inside function bodies —
16
+ * never at module load. ESM live bindings handle this correctly at
17
+ * runtime. `logAccessDenial` is exported from store.ts purely as a
18
+ * cycle artifact; it is not intended as public API (same precedent
19
+ * as `MAX_CONTENT_SIZE` in phase 2).
20
+ *
21
+ * Imports from lifecycle.ts (`reinforceFromSearch`, `enrichMemory`)
22
+ * are not cyclic — phase 2 added them to store.ts specifically for
23
+ * the search pipeline; in phase 3 they move with the consumer.
24
+ */
25
+ import { Memory, MemoryConfig, SearchOptions, SearchResult } from './types.js';
26
+ import type { DefenceSource } from '../defence/types.js';
27
+ /**
28
+ * Search memories using full-text search, vector similarity, and filters
29
+ * Now uses hybrid search combining FTS5 keywords with semantic vector matching
30
+ */
31
+ export declare function searchMemories(options: SearchOptions, config?: MemoryConfig, source?: DefenceSource): Promise<SearchResult[]>;
32
+ export declare function searchMemoriesExplained(options: SearchOptions, config?: MemoryConfig, source?: DefenceSource): Promise<SearchResult[]>;
33
+ /**
34
+ * Recall with embedding-based vector similarity fallback.
35
+ *
36
+ * 1. First tries FTS5 search (existing searchMemories)
37
+ * 2. If FTS5 returns < 3 results, also runs embedding similarity search
38
+ * 3. Merges results (FTS5 first, then embedding results not already in FTS5 set)
39
+ * 4. Caps at `limit` (default 15)
40
+ * 5. The `threshold` (default 0.3) filters out low-similarity embedding results
41
+ */
42
+ export declare function recallWithEmbeddings(query: string, options?: {
43
+ limit?: number;
44
+ project?: string;
45
+ threshold?: number;
46
+ existingResults?: SearchResult[];
47
+ queryEmbedding?: Float32Array | null;
48
+ }): Promise<Memory[]>;
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Memory search and recall.
3
+ *
4
+ * Phase 3 of the audit-recommended store.ts split. The "search/recall"
5
+ * group is the hybrid FTS5 + vector pipeline (`searchMemoriesInternal`)
6
+ * and its three public entry points (`searchMemories`,
7
+ * `searchMemoriesExplained`, `recallWithEmbeddings`). Lifted out of
8
+ * store.ts (1,564 lines after phase 2) so the search pipeline can be
9
+ * read on its own without scrolling past every CRUD helper. No
10
+ * behaviour change vs the original implementation — exports re-emerge
11
+ * from store.ts via a barrel re-export so existing import paths keep
12
+ * working.
13
+ *
14
+ * Imports from store.ts (`rowToMemory`, `logAccessDenial`) form a
15
+ * module cycle, but both are only invoked inside function bodies —
16
+ * never at module load. ESM live bindings handle this correctly at
17
+ * runtime. `logAccessDenial` is exported from store.ts purely as a
18
+ * cycle artifact; it is not intended as public API (same precedent
19
+ * as `MAX_CONTENT_SIZE` in phase 2).
20
+ *
21
+ * Imports from lifecycle.ts (`reinforceFromSearch`, `enrichMemory`)
22
+ * are not cyclic — phase 2 added them to store.ts specifically for
23
+ * the search pipeline; in phase 3 they move with the consumer.
24
+ */
25
+ import { getDatabase } from '../database/init.js';
26
+ import { DEFAULT_CONFIG, } from './types.js';
27
+ import { calculateDecayedScore, calculatePriority, } from './decay.js';
28
+ import { getActivationBoost, pruneActivationCache, } from './activation.js';
29
+ import { getCachedQueryEmbedding, findSimilarMemories } from './embedding.js';
30
+ import { buildSearchExplanation, calculateLinkBoost, calculateTagScore, detectQueryCategory, extractQueryTags, vectorSearch, } from './search.js';
31
+ import { escapeFts5Query } from './fts.js';
32
+ import { checkAccess } from '../defence/trust/access-control.js';
33
+ import { reinforceFromSearch, enrichMemory } from './lifecycle.js';
34
+ // Cyclic import — see header. rowToMemory and logAccessDenial live in store.ts;
35
+ // both are only invoked inside function bodies below, never at module load.
36
+ import { rowToMemory, logAccessDenial } from './store.js';
37
+ let searchCount = 0;
38
+ async function searchMemoriesInternal(options, config, source, execution) {
39
+ if (++searchCount % 100 === 0) {
40
+ pruneActivationCache();
41
+ }
42
+ const db = getDatabase();
43
+ const limit = options.limit || 20;
44
+ const includeGlobal = options.includeGlobal ?? true;
45
+ const detectedCategory = options.query ? detectQueryCategory(options.query) : null;
46
+ const queryTags = options.query ? extractQueryTags(options.query) : [];
47
+ let queryEmbedding = null;
48
+ const vectorResults = new Map();
49
+ if (options.query && options.query.trim()) {
50
+ try {
51
+ queryEmbedding = await getCachedQueryEmbedding(options.query);
52
+ if (!queryEmbedding) {
53
+ throw new Error('query embedding unavailable');
54
+ }
55
+ const vectorHits = vectorSearch(db, rowToMemory, queryEmbedding, limit * 2, options.project, includeGlobal);
56
+ for (const hit of vectorHits) {
57
+ vectorResults.set(hit.memory.id, hit.similarity);
58
+ }
59
+ }
60
+ catch {
61
+ if (process.env.SHIELDCORTEX_SKIP_EMBEDDINGS !== '1') {
62
+ console.log('[shieldcortex] Vector search unavailable, using FTS only');
63
+ }
64
+ }
65
+ }
66
+ let sql;
67
+ const params = [];
68
+ if (options.query && options.query.trim()) {
69
+ const escapedQuery = escapeFts5Query(options.query.trim());
70
+ sql = `
71
+ SELECT m.*, fts.rank
72
+ FROM memories m
73
+ JOIN memories_fts fts ON m.id = fts.rowid
74
+ WHERE memories_fts MATCH ?
75
+ `;
76
+ params.push(escapedQuery);
77
+ }
78
+ else {
79
+ sql = `SELECT *, 0 as rank FROM memories m WHERE 1=1`;
80
+ }
81
+ if (options.project) {
82
+ if (includeGlobal) {
83
+ sql += ` AND (m.project = ? OR m.scope = 'global')`;
84
+ }
85
+ else {
86
+ sql += ' AND m.project = ?';
87
+ }
88
+ params.push(options.project);
89
+ }
90
+ if (options.category) {
91
+ sql += ' AND m.category = ?';
92
+ params.push(options.category);
93
+ }
94
+ if (options.type) {
95
+ sql += ' AND m.type = ?';
96
+ params.push(options.type);
97
+ }
98
+ if (!options.includeArchived) {
99
+ sql += ` AND m.status != 'archived'`;
100
+ }
101
+ if (!options.includeSuppressed) {
102
+ sql += ` AND m.status != 'suppressed'`;
103
+ }
104
+ if (options.minSalience) {
105
+ sql += ' AND m.salience >= ?';
106
+ params.push(options.minSalience);
107
+ }
108
+ if (options.tags && options.tags.length > 0) {
109
+ const tagPlaceholders = options.tags.map(() => '?').join(',');
110
+ sql += ` AND EXISTS (
111
+ SELECT 1 FROM json_each(m.tags)
112
+ WHERE json_each.value IN (${tagPlaceholders})
113
+ )`;
114
+ params.push(...options.tags);
115
+ }
116
+ sql += ' ORDER BY m.salience DESC, m.last_accessed DESC LIMIT ?';
117
+ params.push(limit);
118
+ const rows = db.prepare(sql).all(...params);
119
+ const scoringContext = {
120
+ db,
121
+ config,
122
+ detectedCategory,
123
+ queryTags,
124
+ vectorResults,
125
+ query: options.query,
126
+ };
127
+ const results = rows.map((row) => {
128
+ const memory = rowToMemory(row);
129
+ const decayedScore = calculateDecayedScore(memory, config);
130
+ memory.decayedScore = decayedScore;
131
+ const rawRank = row.rank;
132
+ const ftsScore = rawRank ? 1 / (1 + Math.abs(rawRank)) : 0.3;
133
+ const hoursSinceAccess = (Date.now() - new Date(memory.lastAccessed).getTime()) / (1000 * 60 * 60);
134
+ const recencyBoost = hoursSinceAccess < 1 ? 0.1 : (hoursSinceAccess < 24 ? 0.05 : 0);
135
+ const categoryBoost = detectedCategory && memory.category === detectedCategory ? 0.1 : 0;
136
+ const linkBoost = calculateLinkBoost(memory.id, db);
137
+ const tagBoost = calculateTagScore(queryTags, memory.tags);
138
+ const activationBoost = getActivationBoost(memory.id);
139
+ const vectorSimilarity = vectorResults.get(memory.id) || 0;
140
+ const vectorBoost = vectorSimilarity * 0.3;
141
+ const priorityBoost = calculatePriority(memory) * 0.05;
142
+ const contradictionCount = db.prepare(`SELECT COUNT(*) as count FROM memory_links WHERE relationship = 'contradicts' AND (source_id = ? OR target_id = ?)`).get(memory.id, memory.id).count;
143
+ const contradictionPenalty = Math.min(0.12, contradictionCount * 0.03);
144
+ const eligibilityReasons = [];
145
+ if (memory.status === 'archived')
146
+ eligibilityReasons.push('Archived memories are excluded from normal recall');
147
+ if (memory.status === 'suppressed')
148
+ eligibilityReasons.push('Suppressed memories are excluded from normal recall');
149
+ if (memory.cloudExcluded)
150
+ eligibilityReasons.push('Excluded from cloud sync');
151
+ if (memory.trustScore < 0.7)
152
+ eligibilityReasons.push(`Low trust source (${memory.trustScore.toFixed(2)})`);
153
+ if (contradictionCount > 0)
154
+ eligibilityReasons.push(`${contradictionCount} contradiction link${contradictionCount === 1 ? '' : 's'} attached`);
155
+ const relevanceScore = (ftsScore * 0.25 +
156
+ vectorBoost +
157
+ decayedScore * 0.2 +
158
+ priorityBoost +
159
+ recencyBoost + categoryBoost + linkBoost + tagBoost + activationBoost -
160
+ contradictionPenalty);
161
+ const result = {
162
+ memory,
163
+ relevanceScore,
164
+ recallEligibility: {
165
+ eligible: eligibilityReasons.length === 0,
166
+ reasons: eligibilityReasons,
167
+ },
168
+ };
169
+ if (execution.includeExplanation) {
170
+ result.explanation = buildSearchExplanation(memory, scoringContext, {
171
+ ftsScore,
172
+ vectorSimilarity,
173
+ vectorBoost,
174
+ decayedScore,
175
+ priorityBoost,
176
+ recencyBoost,
177
+ categoryBoost,
178
+ linkBoost,
179
+ tagBoost,
180
+ activationBoost,
181
+ contradictionPenalty,
182
+ finalScore: relevanceScore,
183
+ });
184
+ if (result.explanation) {
185
+ result.explanation.eligibility = result.recallEligibility;
186
+ }
187
+ }
188
+ return result;
189
+ });
190
+ const sortedResults = results
191
+ .filter((result) => options.includeDecayed || result.memory.decayedScore >= config.salienceThreshold)
192
+ .sort((a, b) => b.relevanceScore - a.relevanceScore);
193
+ if (execution.enableSideEffects) {
194
+ const topResults = sortedResults.slice(0, 5);
195
+ for (const result of topResults) {
196
+ reinforceFromSearch(result.memory.id);
197
+ }
198
+ if (topResults.length >= 2) {
199
+ for (let i = 0; i < topResults.length; i++) {
200
+ for (let j = i + 1; j < topResults.length; j++) {
201
+ const idA = topResults[i].memory.id;
202
+ const idB = topResults[j].memory.id;
203
+ const existing = db.prepare('SELECT strength FROM memory_links WHERE (source_id = ? AND target_id = ?) OR (source_id = ? AND target_id = ?)').get(idA, idB, idB, idA);
204
+ if (existing) {
205
+ const newStrength = Math.min(1.0, existing.strength + 0.03);
206
+ db.prepare('UPDATE memory_links SET strength = ? WHERE (source_id = ? AND target_id = ?) OR (source_id = ? AND target_id = ?)').run(newStrength, idA, idB, idB, idA);
207
+ }
208
+ else {
209
+ try {
210
+ db.prepare('INSERT INTO memory_links (source_id, target_id, relationship, strength) VALUES (?, ?, ?, ?)').run(idA, idB, 'related', 0.2);
211
+ }
212
+ catch (e) {
213
+ if (!(e instanceof Error && e.message.includes('UNIQUE constraint'))) {
214
+ console.warn('[shieldcortex] Unexpected error linking co-returned memories:', e);
215
+ }
216
+ }
217
+ }
218
+ }
219
+ }
220
+ }
221
+ if (sortedResults.length > 0 && options.query && options.query.length > 30) {
222
+ const topResult = sortedResults[0];
223
+ const queryWords = new Set(options.query.toLowerCase().split(/\s+/).filter(w => w.length > 3));
224
+ const contentWords = new Set(topResult.memory.content.toLowerCase().split(/\s+/));
225
+ const newWords = [...queryWords].filter(w => !contentWords.has(w));
226
+ if (newWords.length > queryWords.size * 0.3 && options.query.length > 50) {
227
+ try {
228
+ enrichMemory(topResult.memory.id, options.query, 'search');
229
+ }
230
+ catch {
231
+ // enrichment is best-effort
232
+ }
233
+ }
234
+ }
235
+ }
236
+ const finalResults = sortedResults.slice(0, limit);
237
+ for (const result of finalResults) {
238
+ const contradictions = db.prepare(`
239
+ SELECT ml.strength,
240
+ CASE WHEN ml.source_id = ? THEN ml.target_id ELSE ml.source_id END as other_id
241
+ FROM memory_links ml
242
+ WHERE ml.relationship = 'contradicts'
243
+ AND (ml.source_id = ? OR ml.target_id = ?)
244
+ `).all(result.memory.id, result.memory.id, result.memory.id);
245
+ if (contradictions.length > 0) {
246
+ result.contradictions = contradictions.map((contradiction) => {
247
+ const other = db.prepare('SELECT title FROM memories WHERE id = ?').get(contradiction.other_id);
248
+ return { memoryId: contradiction.other_id, title: other?.title || 'Unknown', score: contradiction.strength };
249
+ });
250
+ if (result.explanation) {
251
+ result.explanation.reasons.push(`${contradictions.length} contradiction link${contradictions.length === 1 ? '' : 's'} attached`);
252
+ }
253
+ }
254
+ }
255
+ if (source) {
256
+ const db2 = getDatabase();
257
+ return finalResults.filter(result => {
258
+ const row = db2.prepare('SELECT source, sensitivity_level FROM memories WHERE id = ?').get(result.memory.id);
259
+ const policy = checkAccess({ id: result.memory.id, source: row?.source, sensitivity_level: row?.sensitivity_level }, source, 'read');
260
+ if (!policy.canRead) {
261
+ logAccessDenial(result.memory.id, source, policy.reason);
262
+ return false;
263
+ }
264
+ return true;
265
+ });
266
+ }
267
+ return finalResults;
268
+ }
269
+ /**
270
+ * Search memories using full-text search, vector similarity, and filters
271
+ * Now uses hybrid search combining FTS5 keywords with semantic vector matching
272
+ */
273
+ export async function searchMemories(options, config = DEFAULT_CONFIG, source) {
274
+ return searchMemoriesInternal(options, config, source, {
275
+ enableSideEffects: true,
276
+ includeExplanation: false,
277
+ });
278
+ }
279
+ export async function searchMemoriesExplained(options, config = DEFAULT_CONFIG, source) {
280
+ return searchMemoriesInternal(options, config, source, {
281
+ enableSideEffects: false,
282
+ includeExplanation: true,
283
+ });
284
+ }
285
+ /**
286
+ * Recall with embedding-based vector similarity fallback.
287
+ *
288
+ * 1. First tries FTS5 search (existing searchMemories)
289
+ * 2. If FTS5 returns < 3 results, also runs embedding similarity search
290
+ * 3. Merges results (FTS5 first, then embedding results not already in FTS5 set)
291
+ * 4. Caps at `limit` (default 15)
292
+ * 5. The `threshold` (default 0.3) filters out low-similarity embedding results
293
+ */
294
+ export async function recallWithEmbeddings(query, options) {
295
+ const limit = options?.limit ?? 15;
296
+ const threshold = options?.threshold ?? 0.3;
297
+ // Step 1: Try FTS5 search first
298
+ let ftsResults = options?.existingResults ?? [];
299
+ if (ftsResults.length === 0) {
300
+ try {
301
+ ftsResults = await searchMemories({
302
+ query,
303
+ project: options?.project,
304
+ limit,
305
+ includeGlobal: true,
306
+ });
307
+ }
308
+ catch (e) {
309
+ // FTS search failed — continue to embedding fallback
310
+ console.warn('[shieldcortex] FTS search failed in recallWithEmbeddings:', e.message);
311
+ }
312
+ }
313
+ const ftsMemories = ftsResults.map(r => r.memory);
314
+ // Step 2: If FTS5 returns >= 3 results, no need for embedding fallback
315
+ if (ftsMemories.length >= 3) {
316
+ return ftsMemories.slice(0, limit);
317
+ }
318
+ // Step 3: Run embedding similarity search as fallback
319
+ try {
320
+ const { initEmbeddings } = await import('./embedding.js');
321
+ const ready = await initEmbeddings();
322
+ if (!ready) {
323
+ return ftsMemories.slice(0, limit);
324
+ }
325
+ // Get candidate memories from the database (not already in FTS results)
326
+ const ftsIds = new Set(ftsMemories.map(m => m.id));
327
+ const db = getDatabase();
328
+ let sql = 'SELECT id, title, content FROM memories WHERE 1=1';
329
+ const params = [];
330
+ if (options?.project) {
331
+ sql += ` AND (project = ? OR scope = 'global')`;
332
+ params.push(options.project);
333
+ }
334
+ sql += ' ORDER BY salience DESC, last_accessed DESC LIMIT 200';
335
+ const candidates = db.prepare(sql).all(...params);
336
+ // Filter out memories already returned by FTS
337
+ const newCandidates = candidates.filter(c => !ftsIds.has(c.id));
338
+ if (newCandidates.length === 0) {
339
+ return ftsMemories.slice(0, limit);
340
+ }
341
+ const queryEmbedding = options?.queryEmbedding ?? await getCachedQueryEmbedding(query);
342
+ if (!queryEmbedding) {
343
+ return ftsMemories.slice(0, limit);
344
+ }
345
+ // Find similar memories using embeddings
346
+ const remainingSlots = limit - ftsMemories.length;
347
+ const similar = await findSimilarMemories(query, newCandidates, remainingSlots, queryEmbedding);
348
+ // Filter by threshold and fetch full Memory objects
349
+ const embeddingMemories = [];
350
+ for (const hit of similar) {
351
+ if (hit.score < threshold)
352
+ continue;
353
+ const row = db.prepare('SELECT * FROM memories WHERE id = ?').get(hit.id);
354
+ if (row) {
355
+ embeddingMemories.push(rowToMemory(row));
356
+ }
357
+ }
358
+ // Step 4: Merge — FTS results first, then embedding results
359
+ const merged = [...ftsMemories, ...embeddingMemories];
360
+ return merged.slice(0, limit);
361
+ }
362
+ catch (e) {
363
+ // Embedding fallback failed — return whatever FTS found
364
+ console.warn('[shieldcortex] Embedding fallback failed:', e.message);
365
+ return ftsMemories.slice(0, limit);
366
+ }
367
+ }
@@ -4,8 +4,9 @@
4
4
  * Core CRUD operations for the memory database.
5
5
  * Handles storage, retrieval, and management of memories.
6
6
  */
7
- import { Memory, MemoryInput, MemoryType, SearchOptions, SearchResult, MemoryConfig } from './types.js';
7
+ import { Memory, MemoryInput, MemoryType, MemoryConfig } from './types.js';
8
8
  import type { DefenceSource } from '../defence/types.js';
9
+ export declare const MAX_CONTENT_SIZE: number;
9
10
  /**
10
11
  * Get truncation info from the last addMemory call
11
12
  */
@@ -18,6 +19,7 @@ export declare function getLastTruncationInfo(): {
18
19
  * Convert database row to Memory object
19
20
  */
20
21
  export declare function rowToMemory(row: Record<string, unknown>): Memory;
22
+ export declare function logAccessDenial(memoryId: number, source: DefenceSource, reason: string): void;
21
23
  /**
22
24
  * Error thrown when memory creation is paused
23
25
  */
@@ -49,76 +51,6 @@ export declare function mergeMemories(keptId: number, removedId: number, options
49
51
  * Delete a memory
50
52
  */
51
53
  export declare function deleteMemory(id: number, source?: DefenceSource): boolean;
52
- /**
53
- * Access a memory (updates access count and timestamp, returns reinforced memory)
54
- */
55
- export declare function accessMemory(id: number, config?: MemoryConfig, source?: DefenceSource): Memory | null;
56
- /**
57
- * Reinforce a memory that appeared in search results
58
- * Gives a small salience boost with diminishing returns based on access count.
59
- * ORGANIC FEATURE: Searched memories get reinforced, closing the feedback loop
60
- * so frequently-found memories grow stronger over time.
61
- */
62
- export declare function reinforceFromSearch(memoryId: number): void;
63
- /**
64
- * Enrichment result indicating what happened
65
- */
66
- export interface EnrichmentResult {
67
- enriched: boolean;
68
- reason: string;
69
- }
70
- /**
71
- * Enrich a memory with additional context
72
- *
73
- * This adds timestamped context to a memory when:
74
- * 1. The new context is sufficiently related but different (new information)
75
- * 2. The memory hasn't been enriched recently (cooldown)
76
- * 3. The content won't exceed the size limit
77
- *
78
- * ORGANIC FEATURE: Memories grow with new context over time,
79
- * mimicking how human memories are reconsolidated with new information
80
- *
81
- * @param memoryId - ID of the memory to enrich
82
- * @param newContext - New context to add
83
- * @param contextType - Type of context ('search' | 'access' | 'related')
84
- * @returns EnrichmentResult indicating success or failure with reason
85
- */
86
- export declare function enrichMemory(memoryId: number, newContext: string, contextType?: 'search' | 'access' | 'related'): EnrichmentResult;
87
- /**
88
- * Clear enrichment cooldown for a memory (for testing)
89
- */
90
- export declare function clearEnrichmentCooldown(memoryId: number): void;
91
- /**
92
- * Get enrichment cooldown status for a memory
93
- */
94
- export declare function getEnrichmentCooldownStatus(memoryId: number): {
95
- onCooldown: boolean;
96
- remainingMs: number;
97
- };
98
- /**
99
- * Update persisted decay scores for all memories
100
- * Called during consolidation and periodically by the API server
101
- * Returns the number of memories updated
102
- */
103
- export declare function updateDecayScores(): number;
104
- export declare function searchMemories(options: SearchOptions, config?: MemoryConfig, source?: DefenceSource): Promise<SearchResult[]>;
105
- export declare function searchMemoriesExplained(options: SearchOptions, config?: MemoryConfig, source?: DefenceSource): Promise<SearchResult[]>;
106
- /**
107
- * Recall with embedding-based vector similarity fallback.
108
- *
109
- * 1. First tries FTS5 search (existing searchMemories)
110
- * 2. If FTS5 returns < 3 results, also runs embedding similarity search
111
- * 3. Merges results (FTS5 first, then embedding results not already in FTS5 set)
112
- * 4. Caps at `limit` (default 15)
113
- * 5. The `threshold` (default 0.3) filters out low-similarity embedding results
114
- */
115
- export declare function recallWithEmbeddings(query: string, options?: {
116
- limit?: number;
117
- project?: string;
118
- threshold?: number;
119
- existingResults?: SearchResult[];
120
- queryEmbedding?: Float32Array | null;
121
- }): Promise<Memory[]>;
122
54
  /**
123
55
  * Get all memories for a project
124
56
  */
@@ -135,14 +67,6 @@ export declare function getMemoriesByType(type: MemoryType, limit?: number): Mem
135
67
  * Get high-priority memories (for context injection)
136
68
  */
137
69
  export declare function getHighPriorityMemories(limit?: number, project?: string, source?: DefenceSource): Memory[];
138
- /**
139
- * Promote a memory from short-term to long-term
140
- */
141
- export declare function promoteMemory(id: number): Memory | null;
142
- /**
143
- * Bulk delete decayed memories
144
- */
145
- export declare function cleanupDecayedMemories(config?: MemoryConfig): number;
146
70
  /**
147
71
  * Get memory statistics
148
72
  */
@@ -154,45 +78,6 @@ export declare function getMemoryStats(project?: string): {
154
78
  byCategory: Record<string, number>;
155
79
  averageSalience: number;
156
80
  };
157
- export type RelationshipType = 'references' | 'extends' | 'contradicts' | 'related';
158
- export interface MemoryLink {
159
- id: number;
160
- sourceId: number;
161
- targetId: number;
162
- relationship: RelationshipType;
163
- strength: number;
164
- createdAt: Date;
165
- }
166
- /**
167
- * Create a link between two memories
168
- */
169
- export declare function createMemoryLink(sourceId: number, targetId: number, relationship: RelationshipType, strength?: number): MemoryLink | null;
170
- /**
171
- * Get all memories related to a given memory
172
- */
173
- export declare function getRelatedMemories(memoryId: number): {
174
- memory: Memory;
175
- relationship: RelationshipType;
176
- strength: number;
177
- direction: 'outgoing' | 'incoming';
178
- }[];
179
- /**
180
- * Delete a memory link
181
- */
182
- export declare function deleteMemoryLink(sourceId: number, targetId: number): boolean;
183
- /**
184
- * Get all memory links
185
- */
186
- export declare function getAllMemoryLinks(): MemoryLink[];
187
- /**
188
- * Detect potential relationships for a new memory
189
- * Uses three strategies in priority order:
190
- * 1. Tag-based linking (shared tags)
191
- * 2. Embedding-based semantic linking (cosine similarity >= 0.6)
192
- * 3. FTS content similarity fallback (Jaccard similarity >= 0.3)
193
- */
194
- export declare function detectRelationships(memory: Memory, maxResults?: number): {
195
- targetId: number;
196
- relationship: RelationshipType;
197
- strength: number;
198
- }[];
81
+ export { createMemoryLink, getRelatedMemories, deleteMemoryLink, getAllMemoryLinks, detectRelationships, type RelationshipType, type MemoryLink, } from './links.js';
82
+ export { accessMemory, reinforceFromSearch, enrichMemory, clearEnrichmentCooldown, getEnrichmentCooldownStatus, updateDecayScores, promoteMemory, cleanupDecayedMemories, type EnrichmentResult, } from './lifecycle.js';
83
+ export { searchMemories, searchMemoriesExplained, recallWithEmbeddings, } from './search-recall.js';