shieldcortex 4.15.0 → 4.17.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 (248) hide show
  1. package/README.md +4 -0
  2. package/dashboard/.next/standalone/dashboard/.next/BUILD_ID +1 -1
  3. package/dashboard/.next/standalone/dashboard/.next/build-manifest.json +2 -2
  4. package/dashboard/.next/standalone/dashboard/.next/prerender-manifest.json +3 -3
  5. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.html +2 -2
  6. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +1 -1
  7. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  10. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  11. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +2 -2
  13. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +1 -1
  14. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  15. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  17. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  20. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.html +1 -1
  21. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.rsc +1 -1
  22. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin/__PAGE__.segment.rsc +1 -1
  23. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin.segment.rsc +1 -1
  24. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  25. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_full.segment.rsc +1 -1
  26. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  27. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_index.segment.rsc +1 -1
  28. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  29. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.html +1 -1
  30. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.rsc +1 -1
  31. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud/__PAGE__.segment.rsc +1 -1
  32. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud.segment.rsc +1 -1
  33. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  34. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_full.segment.rsc +1 -1
  35. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_head.segment.rsc +1 -1
  36. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_index.segment.rsc +1 -1
  37. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_tree.segment.rsc +1 -1
  38. package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
  39. package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +1 -1
  40. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  41. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_full.segment.rsc +1 -1
  42. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
  43. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_index.segment.rsc +1 -1
  44. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.html +1 -1
  46. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.rsc +1 -1
  47. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture/__PAGE__.segment.rsc +1 -1
  48. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture.segment.rsc +1 -1
  49. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  50. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  51. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_full.segment.rsc +1 -1
  52. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_head.segment.rsc +1 -1
  53. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_index.segment.rsc +1 -1
  54. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_tree.segment.rsc +1 -1
  55. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.html +1 -1
  56. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.rsc +1 -1
  57. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph/__PAGE__.segment.rsc +1 -1
  58. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph.segment.rsc +1 -1
  59. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  60. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  61. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_full.segment.rsc +1 -1
  62. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_head.segment.rsc +1 -1
  63. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_index.segment.rsc +1 -1
  64. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_tree.segment.rsc +1 -1
  65. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.html +1 -1
  66. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.rsc +1 -1
  67. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall/__PAGE__.segment.rsc +1 -1
  68. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall.segment.rsc +1 -1
  69. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  70. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  71. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_full.segment.rsc +1 -1
  72. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_head.segment.rsc +1 -1
  73. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_index.segment.rsc +1 -1
  74. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_tree.segment.rsc +1 -1
  75. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.html +1 -1
  76. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.rsc +1 -1
  77. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review/__PAGE__.segment.rsc +1 -1
  78. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review.segment.rsc +1 -1
  79. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  80. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  81. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_full.segment.rsc +1 -1
  82. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_head.segment.rsc +1 -1
  83. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_index.segment.rsc +1 -1
  84. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_tree.segment.rsc +1 -1
  85. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.html +1 -1
  86. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.rsc +1 -1
  87. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline/__PAGE__.segment.rsc +1 -1
  88. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline.segment.rsc +1 -1
  89. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  90. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  91. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_full.segment.rsc +1 -1
  92. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_head.segment.rsc +1 -1
  93. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_index.segment.rsc +1 -1
  94. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_tree.segment.rsc +1 -1
  95. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.html +2 -2
  96. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.rsc +1 -1
  97. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +1 -1
  98. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  99. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  100. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_full.segment.rsc +1 -1
  101. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_head.segment.rsc +1 -1
  102. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_index.segment.rsc +1 -1
  103. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +1 -1
  104. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.html +2 -2
  105. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.rsc +1 -1
  106. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview/__PAGE__.segment.rsc +1 -1
  107. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview.segment.rsc +1 -1
  108. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  109. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_full.segment.rsc +1 -1
  110. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_head.segment.rsc +1 -1
  111. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_index.segment.rsc +1 -1
  112. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_tree.segment.rsc +1 -1
  113. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.html +1 -1
  114. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.rsc +1 -1
  115. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit/__PAGE__.segment.rsc +1 -1
  116. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit.segment.rsc +1 -1
  117. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  118. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  119. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_full.segment.rsc +1 -1
  120. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_head.segment.rsc +1 -1
  121. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_index.segment.rsc +1 -1
  122. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_tree.segment.rsc +1 -1
  123. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.html +1 -1
  124. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.rsc +1 -1
  125. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts/__PAGE__.segment.rsc +1 -1
  126. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts.segment.rsc +1 -1
  127. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  128. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  129. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_full.segment.rsc +1 -1
  130. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_head.segment.rsc +1 -1
  131. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_index.segment.rsc +1 -1
  132. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_tree.segment.rsc +1 -1
  133. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.html +1 -1
  134. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.rsc +1 -1
  135. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome/__PAGE__.segment.rsc +1 -1
  136. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome.segment.rsc +1 -1
  137. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  138. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  139. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_full.segment.rsc +1 -1
  140. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_head.segment.rsc +1 -1
  141. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_index.segment.rsc +1 -1
  142. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_tree.segment.rsc +1 -1
  143. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.html +1 -1
  144. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.rsc +1 -1
  145. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies/__PAGE__.segment.rsc +1 -1
  146. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies.segment.rsc +1 -1
  147. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  148. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  149. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_full.segment.rsc +1 -1
  150. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_head.segment.rsc +1 -1
  151. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_index.segment.rsc +1 -1
  152. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_tree.segment.rsc +1 -1
  153. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.html +1 -1
  154. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.rsc +1 -1
  155. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine/__PAGE__.segment.rsc +1 -1
  156. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine.segment.rsc +1 -1
  157. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  158. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  159. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_full.segment.rsc +1 -1
  160. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_head.segment.rsc +1 -1
  161. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_index.segment.rsc +1 -1
  162. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_tree.segment.rsc +1 -1
  163. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.html +2 -2
  164. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.rsc +1 -1
  165. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection/__PAGE__.segment.rsc +1 -1
  166. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  167. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  168. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_full.segment.rsc +1 -1
  169. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_head.segment.rsc +1 -1
  170. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_index.segment.rsc +1 -1
  171. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_tree.segment.rsc +1 -1
  172. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.html +2 -2
  173. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.rsc +1 -1
  174. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +1 -1
  175. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings.segment.rsc +1 -1
  176. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  177. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  178. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  179. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  180. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  181. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.html +1 -1
  182. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.rsc +1 -1
  183. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray/__PAGE__.segment.rsc +1 -1
  184. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray.segment.rsc +1 -1
  185. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  186. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  187. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_full.segment.rsc +1 -1
  188. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_head.segment.rsc +1 -1
  189. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_index.segment.rsc +1 -1
  190. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_tree.segment.rsc +1 -1
  191. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.html +1 -1
  192. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.rsc +1 -1
  193. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain/__PAGE__.segment.rsc +1 -1
  194. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  195. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  196. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_full.segment.rsc +1 -1
  197. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_head.segment.rsc +1 -1
  198. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_index.segment.rsc +1 -1
  199. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_tree.segment.rsc +1 -1
  200. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.html +2 -2
  201. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.rsc +1 -1
  202. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray/__PAGE__.segment.rsc +1 -1
  203. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray.segment.rsc +1 -1
  204. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  205. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_full.segment.rsc +1 -1
  206. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_head.segment.rsc +1 -1
  207. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_index.segment.rsc +1 -1
  208. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_tree.segment.rsc +1 -1
  209. package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +2 -2
  210. package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +2 -2
  211. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.js +1 -1
  212. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.json +1 -1
  213. package/dist/api/routes/sessions.d.ts +19 -0
  214. package/dist/api/routes/sessions.js +153 -0
  215. package/dist/api/visualization-server.js +2 -0
  216. package/dist/cli/import-jsonl.d.ts +12 -0
  217. package/dist/cli/import-jsonl.js +88 -0
  218. package/dist/cli/migrate-legacy.d.ts +18 -0
  219. package/dist/cli/migrate-legacy.js +96 -0
  220. package/dist/database/init.js +65 -0
  221. package/dist/database/schema.sql +32 -0
  222. package/dist/database/seed-firewall-rules.d.ts +21 -0
  223. package/dist/database/seed-firewall-rules.js +105 -0
  224. package/dist/defence/custom-rules/store.d.ts +4 -1
  225. package/dist/defence/custom-rules/store.js +7 -3
  226. package/dist/defence/firewall/instruction-detector.js +15 -0
  227. package/dist/defence/pipeline.js +19 -13
  228. package/dist/defence/types.d.ts +1 -1
  229. package/dist/index.js +8 -0
  230. package/dist/sessions/capture.d.ts +45 -0
  231. package/dist/sessions/capture.js +59 -0
  232. package/dist/sessions/import-jsonl.d.ts +85 -0
  233. package/dist/sessions/import-jsonl.js +193 -0
  234. package/dist/sessions/timeline.d.ts +28 -0
  235. package/dist/sessions/timeline.js +52 -0
  236. package/hooks/openclaw/cortex-memory/HOOK.md +37 -0
  237. package/package.json +1 -1
  238. package/plugins/openclaw/dist/openclaw.plugin.json +1 -1
  239. package/scripts/lib/extract-memorable-segments.mjs +555 -0
  240. package/scripts/lib/save-memory.mjs +198 -13
  241. package/scripts/lib/session-capture.mjs +102 -0
  242. package/scripts/pre-compact-hook.mjs +38 -375
  243. package/scripts/prompt-recall-hook.mjs +30 -4
  244. package/scripts/session-end-hook.mjs +35 -307
  245. package/scripts/stop-hook.mjs +28 -159
  246. /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_buildManifest.js +0 -0
  247. /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_clientMiddlewareManifest.json +0 -0
  248. /package/dashboard/.next/standalone/dashboard/.next/static/{10a_MRwbHFUuDdfr86RUu → 9C0MR5ahRDqnfBA64wKCY}/_ssgManifest.js +0 -0
@@ -21,6 +21,12 @@ import { readTranscriptText } from './lib/transcript-reader.mjs';
21
21
  import { getAutoMemoryConfig } from './lib/auto-memory-config.mjs';
22
22
  import { recordHookInvocation } from './lib/telemetry.mjs';
23
23
  import { deriveProjectKey } from './lib/project-key.mjs';
24
+ import { recordSessionEvent } from './lib/session-capture.mjs';
25
+ import {
26
+ extractMemorableSegments,
27
+ processSegments,
28
+ PRE_COMPACT_CATEGORY_THRESHOLDS,
29
+ } from './lib/extract-memorable-segments.mjs';
24
30
 
25
31
  // Database paths (with legacy fallback)
26
32
  const NEW_DB_DIR = join(homedir(), '.shieldcortex');
@@ -42,31 +48,13 @@ const { dir: DB_DIR, path: DB_PATH } = getDbPath();
42
48
  const MAX_SHORT_TERM_MEMORIES = 100;
43
49
  const MAX_LONG_TERM_MEMORIES = 1000;
44
50
 
45
- // Base salience threshold (will be adjusted dynamically)
46
- // Lowered from 0.45 to capture more content
47
- const BASE_THRESHOLD = 0.35;
48
-
49
- // Category-specific extraction thresholds (lower = easier to extract).
50
- // Raised +0.1 across the board in v4.11.0 after fleet evidence showed the
51
- // previous permissive thresholds produced ~5% signal and flooded recall with
52
- // noise. Prefer missing a marginal memory to saving a noisy one.
53
- const CATEGORY_EXTRACTION_THRESHOLDS = {
54
- architecture: 0.38,
55
- error: 0.40,
56
- context: 0.42,
57
- learning: 0.42,
58
- pattern: 0.45,
59
- preference: 0.48,
60
- note: 0.52,
61
- todo: 0.50,
62
- relationship: 0.45,
63
- custom: 0.45,
64
- };
65
-
66
51
  // Maximum memories to auto-create per compaction.
67
52
  // Dropped 5 → 2 in v4.11.0 for the same reason thresholds were raised.
68
53
  const MAX_AUTO_MEMORIES = 2;
69
54
 
55
+ // Pre-compact uses tighter category thresholds (raised +0.10 in v4.11.0)
56
+ // — see PRE_COMPACT_CATEGORY_THRESHOLDS in scripts/lib/extract-memorable-segments.mjs.
57
+
70
58
  // ==================== DYNAMIC THRESHOLD CALCULATION ====================
71
59
 
72
60
  /**
@@ -103,357 +91,10 @@ function getDynamicThreshold(memoryCount, maxMemories) {
103
91
  return 0.25; // Very sparse - accept most valuable items
104
92
  }
105
93
 
106
- /**
107
- * Get extraction threshold for a specific category
108
- * Combines dynamic threshold with category-specific adjustments
109
- */
110
- function getExtractionThreshold(category, dynamicThreshold) {
111
- const categoryThreshold = CATEGORY_EXTRACTION_THRESHOLDS[category] || BASE_THRESHOLD;
112
- // Use whichever is lower (more permissive for valuable categories when memory is sparse)
113
- return Math.min(categoryThreshold, dynamicThreshold);
114
- }
115
-
116
- // ==================== SALIENCE DETECTION (Mirrors src/memory/salience.ts) ====================
117
-
118
- const ARCHITECTURE_KEYWORDS = [
119
- 'architecture', 'design', 'pattern', 'structure', 'system',
120
- 'database', 'api', 'schema', 'model', 'framework', 'stack',
121
- 'microservice', 'monolith', 'serverless', 'infrastructure'
122
- ];
123
-
124
- const ERROR_KEYWORDS = [
125
- 'error', 'bug', 'fix', 'issue', 'problem', 'crash', 'fail',
126
- 'exception', 'debug', 'resolve', 'solution', 'workaround'
127
- ];
128
-
129
- const PREFERENCE_KEYWORDS = [
130
- 'prefer', 'always', 'never', 'style', 'convention', 'standard',
131
- 'like', 'want', 'should', 'must', 'require'
132
- ];
133
-
134
- const PATTERN_KEYWORDS = [
135
- 'pattern', 'practice', 'approach', 'method', 'technique',
136
- 'implementation', 'strategy', 'algorithm', 'workflow'
137
- ];
138
-
139
- const DECISION_KEYWORDS = [
140
- 'decided', 'decision', 'chose', 'chosen', 'selected', 'going with',
141
- 'will use', 'opted for', 'settled on', 'agreed'
142
- ];
143
-
144
- const LEARNING_KEYWORDS = [
145
- 'learned', 'discovered', 'realized', 'found out', 'turns out',
146
- 'TIL', 'now know', 'understand now', 'figured out'
147
- ];
148
-
149
- const EMOTIONAL_MARKERS = [
150
- 'important', 'critical', 'crucial', 'essential', 'key',
151
- 'finally', 'breakthrough', 'eureka', 'aha', 'got it',
152
- 'frustrating', 'annoying', 'tricky', 'remember'
153
- ];
154
-
155
- const CODE_REFERENCE_PATTERNS = [
156
- /\b[A-Z][a-zA-Z]*\.[a-zA-Z]+\b/,
157
- /\b[a-z_][a-zA-Z0-9_]*\.(ts|js|py|go|rs)\b/,
158
- /`[^`]+`/,
159
- /\b(function|class|interface|type|const|let|var)\s+\w+/i,
160
- /\bline\s*\d+\b/i,
161
- /\b(src|lib|app|components?)\/\S+/,
162
- ];
163
-
164
- function detectKeywords(text, keywords) {
165
- const lower = text.toLowerCase();
166
- return keywords.some(keyword => lower.includes(keyword.toLowerCase()));
167
- }
168
-
169
- function detectCodeReferences(content) {
170
- return CODE_REFERENCE_PATTERNS.some(pattern => pattern.test(content));
171
- }
172
-
173
- function detectExplicitRequest(text) {
174
- const patterns = [
175
- /\bremember\s+(this|that)\b/i,
176
- /\bdon'?t\s+forget\b/i,
177
- /\bkeep\s+(in\s+)?mind\b/i,
178
- /\bnote\s+(this|that)\b/i,
179
- /\bsave\s+(this|that)\b/i,
180
- /\bimportant[:\s]/i,
181
- /\bfor\s+future\s+reference\b/i,
182
- ];
183
- return patterns.some(pattern => pattern.test(text));
184
- }
185
-
186
- function calculateSalience(text) {
187
- let score = 0.25; // Base score
188
-
189
- if (detectExplicitRequest(text)) score += 0.5;
190
- if (detectKeywords(text, ARCHITECTURE_KEYWORDS)) score += 0.4;
191
- if (detectKeywords(text, ERROR_KEYWORDS)) score += 0.35;
192
- if (detectKeywords(text, DECISION_KEYWORDS)) score += 0.35;
193
- if (detectKeywords(text, LEARNING_KEYWORDS)) score += 0.3;
194
- if (detectKeywords(text, PATTERN_KEYWORDS)) score += 0.25;
195
- if (detectKeywords(text, PREFERENCE_KEYWORDS)) score += 0.25;
196
- if (detectCodeReferences(text)) score += 0.15;
197
- if (detectKeywords(text, EMOTIONAL_MARKERS)) score += 0.2;
198
-
199
- return Math.min(1.0, score);
200
- }
201
-
202
- function suggestCategory(text) {
203
- const lower = text.toLowerCase();
204
-
205
- if (detectKeywords(lower, ARCHITECTURE_KEYWORDS)) return 'architecture';
206
- if (detectKeywords(lower, ERROR_KEYWORDS)) return 'error';
207
- if (detectKeywords(lower, DECISION_KEYWORDS)) return 'context';
208
- if (detectKeywords(lower, LEARNING_KEYWORDS)) return 'learning';
209
- if (detectKeywords(lower, PREFERENCE_KEYWORDS)) return 'preference';
210
- if (detectKeywords(lower, PATTERN_KEYWORDS)) return 'pattern';
211
- if (/\b(todo|fixme|hack|xxx)\b/i.test(lower)) return 'todo';
212
-
213
- return 'note';
214
- }
215
-
216
- function extractTags(text, extractorName = null) {
217
- const tags = new Set();
218
-
219
- // Extract hashtags
220
- const hashtagMatches = text.match(/#[a-zA-Z][a-zA-Z0-9_-]*/g);
221
- if (hashtagMatches) {
222
- hashtagMatches.forEach(tag => tags.add(tag.slice(1).toLowerCase()));
223
- }
224
-
225
- // Extract common tech terms
226
- const techTerms = [
227
- 'react', 'vue', 'angular', 'node', 'python', 'typescript', 'javascript',
228
- 'api', 'database', 'sql', 'mongodb', 'postgresql', 'mysql',
229
- 'docker', 'kubernetes', 'aws', 'git', 'testing', 'auth', 'security'
230
- ];
231
-
232
- const lowerText = text.toLowerCase();
233
- techTerms.forEach(term => {
234
- if (lowerText.includes(term)) tags.add(term);
235
- });
236
-
237
- // Add auto-extracted tag
238
- tags.add('auto-extracted');
239
-
240
- // Add source extractor tag for tracking
241
- if (extractorName) {
242
- tags.add(`source:${extractorName}`);
243
- }
244
-
245
- return Array.from(tags).slice(0, 12);
246
- }
247
-
248
- /**
249
- * Calculate frequency boost based on how often key terms appear
250
- * across all extracted segments. Repeated topics are more important.
251
- */
252
- function calculateFrequencyBoost(segment, allSegments) {
253
- // Extract key terms (words > 5 chars that aren't common)
254
- const commonWords = new Set([
255
- 'about', 'after', 'before', 'being', 'between', 'could', 'during',
256
- 'every', 'found', 'through', 'would', 'should', 'which', 'where',
257
- 'there', 'these', 'their', 'other', 'using', 'because', 'without'
258
- ]);
259
-
260
- const words = segment.content.toLowerCase().split(/\s+/);
261
- const keyTerms = words.filter(w =>
262
- w.length > 5 &&
263
- !commonWords.has(w) &&
264
- /^[a-z]+$/.test(w)
265
- );
266
-
267
- let boost = 0;
268
- const seenTerms = new Set();
269
-
270
- for (const term of keyTerms) {
271
- if (seenTerms.has(term)) continue;
272
- seenTerms.add(term);
273
-
274
- // Count how many other segments mention this term
275
- const mentions = allSegments.filter(s =>
276
- s !== segment &&
277
- s.content.toLowerCase().includes(term)
278
- ).length;
279
-
280
- // Boost for repeated topics (cap at 5 mentions)
281
- if (mentions > 1) {
282
- boost += 0.03 * Math.min(mentions, 5);
283
- }
284
- }
285
-
286
- // Cap total frequency boost at 0.15
287
- return Math.min(0.15, boost);
288
- }
289
-
290
- // ==================== CONTENT EXTRACTION ====================
291
-
292
- /**
293
- * Extract meaningful segments from conversation text
294
- * Looks for decisions, learnings, fixes, patterns, etc.
295
- */
296
- function extractMemorableSegments(conversationText) {
297
- const segments = [];
298
-
299
- // Pattern matchers for different types of important content
300
- // Expanded patterns with lower minimum lengths for better capture
301
- const extractors = [
302
- {
303
- name: 'decision',
304
- patterns: [
305
- /(?:we\s+)?decided\s+(?:to\s+)?(.{15,200})/gi,
306
- /(?:going|went)\s+with\s+(.{15,150})/gi,
307
- /(?:chose|chosen|selected)\s+(.{15,150})/gi,
308
- /the\s+(?:approach|solution|fix)\s+(?:is|was)\s+(.{15,200})/gi,
309
- // New patterns
310
- /(?:using|will\s+use)\s+(.{15,150})/gi,
311
- /(?:opted\s+for|settled\s+on)\s+(.{15,150})/gi,
312
- ],
313
- titlePrefix: 'Decision: ',
314
- },
315
- {
316
- name: 'error-fix',
317
- patterns: [
318
- /(?:fixed|solved|resolved)\s+(?:by\s+)?(.{15,200})/gi,
319
- /the\s+(?:fix|solution|workaround)\s+(?:is|was)\s+(.{15,200})/gi,
320
- /(?:root\s+cause|issue)\s+(?:is|was)\s+(.{15,200})/gi,
321
- /(?:error|bug)\s+(?:was\s+)?caused\s+by\s+(.{15,200})/gi,
322
- // New patterns
323
- /(?:problem|issue)\s+was\s+(.{15,150})/gi,
324
- /(?:the\s+)?bug\s+(?:is|was)\s+(.{15,150})/gi,
325
- /(?:debugging|debugged)\s+(.{15,150})/gi,
326
- ],
327
- titlePrefix: 'Fix: ',
328
- },
329
- {
330
- name: 'learning',
331
- patterns: [
332
- /(?:learned|discovered|realized|found\s+out)\s+(?:that\s+)?(.{15,200})/gi,
333
- /turns\s+out\s+(?:that\s+)?(.{15,200})/gi,
334
- /(?:TIL|today\s+I\s+learned)[:\s]+(.{15,200})/gi,
335
- // New patterns
336
- /(?:now\s+)?(?:understand|know)\s+(?:that\s+)?(.{15,150})/gi,
337
- /(?:figured\s+out|worked\s+out)\s+(.{15,150})/gi,
338
- ],
339
- titlePrefix: 'Learned: ',
340
- },
341
- {
342
- name: 'architecture',
343
- patterns: [
344
- /the\s+architecture\s+(?:is|uses|consists\s+of)\s+(.{15,200})/gi,
345
- /(?:design|pattern)\s+(?:is|uses)\s+(.{15,200})/gi,
346
- /(?:system|api|database)\s+(?:structure|design)\s+(?:is|uses)\s+(.{15,200})/gi,
347
- // New patterns
348
- /(?:created|added|implemented|built)\s+(?:a\s+)?(.{15,200})/gi,
349
- /(?:refactored|updated|changed)\s+(?:the\s+)?(.{15,150})/gi,
350
- ],
351
- titlePrefix: 'Architecture: ',
352
- },
353
- {
354
- name: 'preference',
355
- patterns: [
356
- /(?:always|never)\s+(.{10,150})/gi,
357
- /(?:prefer|want)\s+to\s+(.{10,150})/gi,
358
- /(?:should|must)\s+(?:always\s+)?(.{10,150})/gi,
359
- ],
360
- titlePrefix: 'Preference: ',
361
- },
362
- {
363
- name: 'important-note',
364
- patterns: [
365
- /important[:\s]+(.{15,200})/gi,
366
- /(?:note|remember)[:\s]+(.{15,200})/gi,
367
- /(?:key|critical)\s+(?:point|thing)[:\s]+(.{15,200})/gi,
368
- // New patterns
369
- /(?:this\s+is\s+)?(?:crucial|essential)[:\s]+(.{15,150})/gi,
370
- /(?:don't\s+forget|keep\s+in\s+mind)[:\s]+(.{15,150})/gi,
371
- ],
372
- titlePrefix: 'Note: ',
373
- },
374
- ];
375
-
376
- for (const extractor of extractors) {
377
- for (const pattern of extractor.patterns) {
378
- let match;
379
- while ((match = pattern.exec(conversationText)) !== null) {
380
- const content = match[1].trim();
381
- if (content.length >= 20) {
382
- // Generate a title from first ~50 chars
383
- const titleContent = content.slice(0, 50).replace(/\s+/g, ' ').trim();
384
- const title = extractor.titlePrefix + (titleContent.length < 50 ? titleContent : titleContent + '...');
385
-
386
- segments.push({
387
- title,
388
- content: content.slice(0, 500), // Cap content length
389
- extractorType: extractor.name,
390
- });
391
- }
392
- }
393
- }
394
- }
395
-
396
- return segments;
397
- }
398
-
399
- /**
400
- * Deduplicate and score segments
401
- * @param {Array} segments - Raw extracted segments
402
- * @param {number} dynamicThreshold - Dynamic threshold based on memory fullness
403
- */
404
- function processSegments(segments, dynamicThreshold = BASE_THRESHOLD) {
405
- // Remove near-duplicates (segments with >80% overlap)
406
- const unique = [];
407
- for (const seg of segments) {
408
- const isDupe = unique.some(existing => {
409
- const overlap = calculateOverlap(existing.content, seg.content);
410
- return overlap > 0.8;
411
- });
412
- if (!isDupe) {
413
- const text = seg.title + ' ' + seg.content;
414
- const baseSalience = calculateSalience(text);
415
- const category = suggestCategory(text);
416
-
417
- unique.push({
418
- ...seg,
419
- baseSalience,
420
- category,
421
- tags: extractTags(text, seg.extractorType),
422
- });
423
- }
424
- }
425
-
426
- // Calculate frequency boost after we have all unique segments
427
- for (const seg of unique) {
428
- const frequencyBoost = calculateFrequencyBoost(seg, unique);
429
- seg.salience = Math.min(1.0, seg.baseSalience + frequencyBoost);
430
- seg.frequencyBoost = frequencyBoost;
431
- }
432
-
433
- // Sort by salience (highest first)
434
- unique.sort((a, b) => b.salience - a.salience);
435
-
436
- // Filter by category-specific threshold (combined with dynamic threshold)
437
- const filtered = unique.filter(seg => {
438
- const threshold = getExtractionThreshold(seg.category, dynamicThreshold);
439
- return seg.salience >= threshold;
440
- });
441
-
442
- return filtered.slice(0, MAX_AUTO_MEMORIES);
443
- }
444
-
445
- /**
446
- * Simple overlap calculation (Jaccard similarity on words)
447
- */
448
- function calculateOverlap(text1, text2) {
449
- const words1 = new Set(text1.toLowerCase().split(/\s+/));
450
- const words2 = new Set(text2.toLowerCase().split(/\s+/));
451
-
452
- const intersection = new Set([...words1].filter(w => words2.has(w)));
453
- const union = new Set([...words1, ...words2]);
94
+ // getExtractionThreshold lives in the shared chunker module.
454
95
 
455
- return intersection.size / union.size;
456
- }
96
+ // Salience detection, content extraction, and segment processing now
97
+ // live in scripts/lib/extract-memorable-segments.mjs (imported above).
457
98
 
458
99
  // ==================== DATABASE OPERATIONS ====================
459
100
 
@@ -461,7 +102,7 @@ function calculateOverlap(text1, text2) {
461
102
  // write lives in scripts/lib/save-memory.mjs so pre-compact and
462
103
  // session-end share one code path (and one regression test).
463
104
  function saveMemory(db, memory, project) {
464
- saveAutoExtractedMemory(db, memory, project);
105
+ return saveAutoExtractedMemory(db, memory, project, { source: 'pre-compact-hook' });
465
106
  }
466
107
 
467
108
 
@@ -477,7 +118,7 @@ process.stdin.on('readable', () => {
477
118
  }
478
119
  });
479
120
 
480
- process.stdin.on('end', () => {
121
+ process.stdin.on('end', async () => {
481
122
  const startedAt = Date.now();
482
123
  let db = null;
483
124
  let autoExtractedCount = 0;
@@ -514,6 +155,24 @@ process.stdin.on('end', () => {
514
155
  // timeout: 5000ms prevents hook from hanging if DB is locked
515
156
  db = new Database(DB_PATH, { timeout: 5000 });
516
157
 
158
+ // ── Session capture (v4.17): mark the compaction boundary in the
159
+ // replay timeline. Reuses the already-open write connection so
160
+ // no extra better-sqlite3 handle is created.
161
+ {
162
+ const sessionId = hookData.session_id || hookData.sessionId || null;
163
+ if (sessionId) {
164
+ try {
165
+ recordSessionEvent(db, {
166
+ session_id: sessionId,
167
+ ts: new Date().toISOString(),
168
+ kind: 'hook_fire',
169
+ payload: { hook: 'pre-compact', trigger, transcript_path: hookData.transcript_path ?? null },
170
+ project: project || null,
171
+ });
172
+ } catch { /* best-effort */ }
173
+ }
174
+ }
175
+
517
176
  // Get current memory stats for dynamic threshold calculation
518
177
  const stats = getMemoryStats(db);
519
178
  const totalMemories = stats.shortTerm + stats.longTerm;
@@ -527,12 +186,16 @@ process.stdin.on('end', () => {
527
186
  if (conversationText && conversationText.length > 100) {
528
187
  // Extract memorable segments
529
188
  const segments = extractMemorableSegments(conversationText);
530
- const processedSegments = processSegments(segments, dynamicThreshold);
189
+ const processedSegments = processSegments(segments, dynamicThreshold, {
190
+ maxMemories: MAX_AUTO_MEMORIES,
191
+ categoryThresholds: PRE_COMPACT_CATEGORY_THRESHOLDS,
192
+ conversationText,
193
+ });
531
194
 
532
195
  // Save auto-extracted memories
533
196
  for (const memory of processedSegments) {
534
197
  try {
535
- saveMemory(db, memory, project);
198
+ await saveMemory(db, memory, project);
536
199
  autoExtractedCount++;
537
200
  const boostInfo = memory.frequencyBoost > 0 ? ` +${memory.frequencyBoost.toFixed(2)} boost` : '';
538
201
  console.error(`[auto-extract] Saved: ${memory.title} (salience: ${memory.salience.toFixed(2)}${boostInfo}, category: ${memory.category})`);
@@ -15,6 +15,7 @@ import { join } from 'path';
15
15
  import { homedir } from 'os';
16
16
  import { deriveProjectKey } from './lib/project-key.mjs';
17
17
  import { sanitisePromptForRecall } from './lib/prompt-sanitiser.mjs';
18
+ import { recordSessionEvent } from './lib/session-capture.mjs';
18
19
 
19
20
  // ==================== CONFIG ====================
20
21
 
@@ -153,15 +154,40 @@ process.stdin.on('readable', () => {
153
154
  process.stdin.on('end', () => {
154
155
  try {
155
156
  const config = loadConfig();
157
+ const hookData = JSON.parse(input || '{}');
158
+ const rawPrompt = hookData.prompt || '';
159
+ const cwd = hookData.cwd || process.cwd();
160
+ const sessionId = hookData.session_id || hookData.sessionId || null;
161
+
162
+ // ── Session capture (v4.17): record the user prompt regardless of
163
+ // proactiveRecall config so the dashboard replay timeline gets a
164
+ // complete event stream. Opt-out via captureEvents=false. Failures
165
+ // are swallowed — capture must never block the user prompt.
166
+ if (config.captureEvents !== false && sessionId && rawPrompt) {
167
+ try {
168
+ const project = deriveProjectKey(cwd);
169
+ const dbPath = getDbPath();
170
+ if (existsSync(dbPath)) {
171
+ const captureDb = new Database(dbPath, { timeout: 1000 });
172
+ recordSessionEvent(captureDb, {
173
+ session_id: sessionId,
174
+ ts: new Date().toISOString(),
175
+ kind: 'prompt',
176
+ payload: { text: rawPrompt },
177
+ project: project || null,
178
+ actor: 'user',
179
+ });
180
+ captureDb.close();
181
+ }
182
+ } catch {
183
+ // Capture is best-effort.
184
+ }
185
+ }
156
186
 
157
187
  if (config.proactiveRecall !== true) {
158
188
  process.exit(0);
159
189
  }
160
190
 
161
- const hookData = JSON.parse(input || '{}');
162
- const rawPrompt = hookData.prompt || '';
163
- const cwd = hookData.cwd || process.cwd();
164
-
165
191
  // Strip OpenClaw / framework metadata wrappers (e.g. Telegram channel
166
192
  // headers) before any prompt-based decisions. Without this, the FTS5
167
193
  // query is built from "Conversation info untrusted metadata json" tokens