shieldcortex 4.12.14 → 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 (386) 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 +4 -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/settings-hooks.d.ts +1 -0
  348. package/dist/setup/settings-hooks.js +30 -5
  349. package/dist/setup/status.js +39 -0
  350. package/hooks/openclaw/cortex-memory/runtime.mjs +18 -4
  351. package/package.json +1 -1
  352. package/plugins/openclaw/dist/index.js +12 -6
  353. package/plugins/openclaw/dist/openclaw.plugin.json +1 -1
  354. package/scripts/lib/auto-memory-config.mjs +45 -0
  355. package/scripts/lib/telemetry.mjs +58 -0
  356. package/scripts/lib/transcript-reader.mjs +123 -0
  357. package/scripts/postinstall.mjs +47 -1
  358. package/scripts/pre-compact-hook.mjs +76 -124
  359. package/scripts/session-end-hook.mjs +102 -97
  360. package/scripts/stop-hook.mjs +346 -116
  361. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/9f1d4_@tanstack_785e068c._.js +0 -3
  362. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__c2b92077._.js +0 -3
  363. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_11878109._.js +0 -3
  364. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_35c9f22e._.js +0 -3
  365. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_836b4a04._.js +0 -3
  366. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9770c429._.js +0 -3
  367. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_9dd626ed._.js +0 -3
  368. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_e94d2da2._.js +0 -3
  369. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_564ea5ae._.js +0 -3
  370. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_src_lib_3f1490a1._.js +0 -3
  371. package/dashboard/.next/standalone/dashboard/.next/static/chunks/079a5be036130e37.js +0 -1
  372. package/dashboard/.next/standalone/dashboard/.next/static/chunks/1770a8ce7abb2437.js +0 -1
  373. package/dashboard/.next/standalone/dashboard/.next/static/chunks/1a074f8ddc7cd385.js +0 -1
  374. package/dashboard/.next/standalone/dashboard/.next/static/chunks/24da99d1341bd573.css +0 -3
  375. package/dashboard/.next/standalone/dashboard/.next/static/chunks/2aa8afb655c1c2e5.js +0 -1
  376. package/dashboard/.next/standalone/dashboard/.next/static/chunks/302ad459a0e5c4ba.js +0 -1
  377. package/dashboard/.next/standalone/dashboard/.next/static/chunks/385ec610bad1acc5.js +0 -1
  378. package/dashboard/.next/standalone/dashboard/.next/static/chunks/4f57582c2d186438.js +0 -1
  379. package/dashboard/.next/standalone/dashboard/.next/static/chunks/52843253e4b833a5.js +0 -1
  380. package/dashboard/.next/standalone/dashboard/.next/static/chunks/7fca141efba9d353.js +0 -1
  381. package/dashboard/.next/standalone/dashboard/.next/static/chunks/8593e1796c9d043d.js +0 -1
  382. package/dashboard/.next/standalone/dashboard/.next/static/chunks/cbc2e6ffcad6e91c.js +0 -1
  383. package/dashboard/.next/standalone/dashboard/.next/static/chunks/fced7dd3c9874ed1.js +0 -1
  384. /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → kiA_iEHG_1wWOEYFsD0Tj}/_buildManifest.js +0 -0
  385. /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → kiA_iEHG_1wWOEYFsD0Tj}/_clientMiddlewareManifest.json +0 -0
  386. /package/dashboard/.next/standalone/dashboard/.next/static/{P2sW3M-qHaW9VS9YwCEg3 → kiA_iEHG_1wWOEYFsD0Tj}/_ssgManifest.js +0 -0
@@ -10,4 +10,5 @@
10
10
  */
11
11
  export declare function setupClaudeMd(options?: {
12
12
  stopHook?: boolean;
13
+ sessionEnd?: boolean;
13
14
  }): Promise<void>;
@@ -73,6 +73,39 @@ export interface CleanResult {
73
73
  * currently populated. Pure read — no mutation.
74
74
  */
75
75
  export declare function scanForResidue(): ResidueReport;
76
+ /**
77
+ * Detect whether the SC plugin / hook are currently installed on disk.
78
+ * Used by `scanForOrphans()` to tell legitimate install state from true orphans.
79
+ *
80
+ * Plugin install location depends on which install mode OpenClaw chose:
81
+ *
82
+ * 1. **native-package** (Mac homebrew, npm-global in OpenClaw's search path) —
83
+ * plugin lives at `${npmRoot}/shieldcortex/plugins/openclaw/dist/`. The
84
+ * user-space `~/.openclaw/extensions/` is NOT populated.
85
+ * 2. **trusted-local-copy** (Linux fleet, npm-global outside the search path) —
86
+ * plugin is copied to `~/.openclaw/extensions/shieldcortex-realtime/`.
87
+ *
88
+ * The most reliable signal is the `installPath` recorded under
89
+ * `openclaw.json: .plugins.installs[shieldcortex-realtime]` — that's the path
90
+ * the installer actually used. We honour that first, then fall back to the
91
+ * known install locations so we can still detect installs that pre-date the
92
+ * `installPath` field.
93
+ */
94
+ /**
95
+ * The plugin counts as installed when OpenClaw has registered it in BOTH
96
+ * `plugins.entries[<id>]` AND `plugins.allow[]`.
97
+ *
98
+ * Background: when the plugin was installed via `openclaw plugins install <pkg>`
99
+ * (native-package mode — Mac homebrew, Linux global), OpenClaw stores the plugin
100
+ * in its own internal tree, NOT under `~/.openclaw/extensions/`. From the doctor's
101
+ * perspective there are no plugin bytes on disk in any of the paths it checks.
102
+ * Without this check the doctor false-flags `plugins.entries[<id>]` and
103
+ * `plugins.allow[<id>]` as "OpenClaw residue" on every Mac homebrew install
104
+ * (the user-reported symptom on 4 May 2026 that triggered this fix).
105
+ *
106
+ * Exported for direct unit testing without having to mock fs / os.homedir().
107
+ */
108
+ export declare function isPluginRegisteredInOpenClawConfig(cfg: unknown): boolean;
76
109
  /**
77
110
  * Return only residue entries that are TRUE ORPHANS — meaning the config /
78
111
  * lock-file entry references a ShieldCortex artefact that is NOT currently
@@ -219,6 +219,27 @@ export function scanForResidue() {
219
219
  * known install locations so we can still detect installs that pre-date the
220
220
  * `installPath` field.
221
221
  */
222
+ /**
223
+ * The plugin counts as installed when OpenClaw has registered it in BOTH
224
+ * `plugins.entries[<id>]` AND `plugins.allow[]`.
225
+ *
226
+ * Background: when the plugin was installed via `openclaw plugins install <pkg>`
227
+ * (native-package mode — Mac homebrew, Linux global), OpenClaw stores the plugin
228
+ * in its own internal tree, NOT under `~/.openclaw/extensions/`. From the doctor's
229
+ * perspective there are no plugin bytes on disk in any of the paths it checks.
230
+ * Without this check the doctor false-flags `plugins.entries[<id>]` and
231
+ * `plugins.allow[<id>]` as "OpenClaw residue" on every Mac homebrew install
232
+ * (the user-reported symptom on 4 May 2026 that triggered this fix).
233
+ *
234
+ * Exported for direct unit testing without having to mock fs / os.homedir().
235
+ */
236
+ export function isPluginRegisteredInOpenClawConfig(cfg) {
237
+ const entryEnabled = !!getPath(cfg, ['plugins', 'entries', PLUGIN_ID]);
238
+ const allowList = getPath(cfg, ['plugins', 'allow']);
239
+ const inAllow = Array.isArray(allowList)
240
+ && allowList.some((e) => typeof e === 'string' && e === PLUGIN_ID);
241
+ return entryEnabled && inAllow;
242
+ }
222
243
  function detectInstallState() {
223
244
  const home = resolveHome();
224
245
  // 1. Honour whatever path the installer recorded in openclaw.json.
@@ -252,6 +273,11 @@ function detectInstallState() {
252
273
  pluginInstalled = true;
253
274
  }
254
275
  }
276
+ // 4. Fallback: trust OpenClaw's own plugin registry — see
277
+ // `isPluginRegisteredInOpenClawConfig` below for the rationale.
278
+ if (!pluginInstalled && isPluginRegisteredInOpenClawConfig(cfg)) {
279
+ pluginInstalled = true;
280
+ }
255
281
  const hookCandidates = [
256
282
  path.join(home, '.openclaw', 'hooks', HOOK_NAME),
257
283
  path.join(home, '.claude', 'hooks', HOOK_NAME),
@@ -46,14 +46,19 @@ function checkDatabase() {
46
46
  add('FAIL', 'Database not found at ~/.shieldcortex/memories.db');
47
47
  return;
48
48
  }
49
- const label = db.isLegacy ? '~/.claude-memory/memories.db (legacy)' : '~/.shieldcortex/memories.db';
49
+ const label = db.isLegacy ? `${db.path} (legacy)` : '~/.shieldcortex/memories.db';
50
50
  try {
51
51
  const stat = fs.statSync(db.path);
52
52
  const Database = require('better-sqlite3');
53
53
  const conn = new Database(db.path, { readonly: true });
54
54
  const row = conn.prepare('SELECT COUNT(*) as count FROM memories').get();
55
55
  conn.close();
56
- add('PASS', `Database: ${label} (${row.count} memories, ${formatBytes(stat.size)})`);
56
+ if (db.isLegacy) {
57
+ add('WARN', `Database: ${label} (${row.count} memories, ${formatBytes(stat.size)}) — DEPRECATED, removed in v5.0.0; run: shieldcortex migrate-legacy`);
58
+ }
59
+ else {
60
+ add('PASS', `Database: ${label} (${row.count} memories, ${formatBytes(stat.size)})`);
61
+ }
57
62
  }
58
63
  catch (err) {
59
64
  add('FAIL', `Database: ${label} — ${err.message}`);
@@ -9,4 +9,5 @@
9
9
  export declare const REQUIRED_HOOK_NAMES: readonly string[];
10
10
  export declare function setupHooks(options?: {
11
11
  stopHook?: boolean;
12
+ sessionEnd?: boolean;
12
13
  }): void;
@@ -28,6 +28,13 @@ export const REQUIRED_HOOK_NAMES = Object.freeze(Object.keys(CORTEX_HOOKS));
28
28
  const STOP_HOOK = {
29
29
  hooks: [{ type: 'command', command: 'shieldcortex hook stop', timeout: 10 }],
30
30
  };
31
+ // SessionEnd is opt-in. The hook script gates execution behind
32
+ // `autoMemory.enableSessionEnd` in ~/.shieldcortex/config.json AND a
33
+ // process.env-based OpenClaw context detector, so wiring it via this flag
34
+ // does NOT regress the v4.10 OpenClaw-crash class on its own.
35
+ const SESSION_END_HOOK = {
36
+ hooks: [{ type: 'command', command: 'shieldcortex hook session-end', timeout: 10 }],
37
+ };
31
38
  function hasCortexHook(entries) {
32
39
  return entries.some((e) => e.hooks?.some((h) => typeof h.command === 'string' && h.command.includes('shieldcortex')));
33
40
  }
@@ -79,18 +86,22 @@ export function setupHooks(options) {
79
86
  }
80
87
  // First: migrate any stale npx commands to direct binary
81
88
  const migrated = migrateNpxHooks(settings);
82
- // Remove SessionEnd hook causes fatal failures in OpenClaw agents
83
- if (settings.hooks.SessionEnd) {
89
+ // SessionEnd handling is now bidirectional:
90
+ // - if --with-session-end was passed, install it (the .mjs gates execution
91
+ // by config + OpenClaw env so it's safe to wire here);
92
+ // - otherwise, remove any existing ShieldCortex SessionEnd entry to keep
93
+ // the OpenClaw-safe default for users who don't explicitly opt in.
94
+ if (!options?.sessionEnd && settings.hooks.SessionEnd) {
84
95
  const hadCortex = hasCortexHook(settings.hooks.SessionEnd);
85
96
  if (hadCortex) {
86
97
  settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter((e) => !e.hooks?.some((h) => typeof h.command === 'string' && h.command.includes('shieldcortex')));
87
98
  if (settings.hooks.SessionEnd.length === 0)
88
99
  delete settings.hooks.SessionEnd;
89
- console.log(' - Hook: SessionEnd (removed — causes agent crashes, PreCompact handles this)');
100
+ console.log(' - Hook: SessionEnd (removed — opt in with `--with-session-end`)');
90
101
  }
91
102
  }
92
103
  let added = 0;
93
- // Install command hooks (PreCompact, SessionStart, SessionEnd, UserPromptSubmit)
104
+ // Install command hooks (PreCompact, SessionStart, UserPromptSubmit)
94
105
  for (const [name, entry] of Object.entries(CORTEX_HOOKS)) {
95
106
  if (!Array.isArray(settings.hooks[name])) {
96
107
  settings.hooks[name] = [];
@@ -104,6 +115,20 @@ export function setupHooks(options) {
104
115
  console.log(` = Hook: ${name} (already configured)`);
105
116
  }
106
117
  }
118
+ // Optionally install SessionEnd hook
119
+ if (options?.sessionEnd) {
120
+ if (!Array.isArray(settings.hooks.SessionEnd)) {
121
+ settings.hooks.SessionEnd = [];
122
+ }
123
+ if (!hasCortexHook(settings.hooks.SessionEnd)) {
124
+ settings.hooks.SessionEnd.push(SESSION_END_HOOK);
125
+ added++;
126
+ console.log(` + Hook: SessionEnd (opt-in — gated by autoMemory.enableSessionEnd)`);
127
+ }
128
+ else {
129
+ console.log(` = Hook: SessionEnd (already configured)`);
130
+ }
131
+ }
107
132
  // Optionally install Stop hook
108
133
  if (options?.stopHook) {
109
134
  if (!Array.isArray(settings.hooks.Stop)) {
@@ -112,7 +137,7 @@ export function setupHooks(options) {
112
137
  if (!hasCortexHook(settings.hooks.Stop)) {
113
138
  settings.hooks.Stop.push(STOP_HOOK);
114
139
  added++;
115
- console.log(` + Hook: Stop (opt-in)`);
140
+ console.log(` + Hook: Stop (opt-in — gated by autoMemory.enableStop)`);
116
141
  }
117
142
  else {
118
143
  console.log(` = Hook: Stop (already configured)`);
@@ -66,6 +66,33 @@ function getStatusInfo(dbPath) {
66
66
  catch {
67
67
  // Quarantine table doesn't exist - that's fine
68
68
  }
69
+ // Per-hook invocation telemetry (last 7 days). Disambiguates the
70
+ // "fires but produces nothing" vs "never fires" failure modes that
71
+ // both showed as "Last activity: never" in older releases.
72
+ const hookActivity = [];
73
+ try {
74
+ const rows = db.prepare(`
75
+ SELECT hook_name AS hookName,
76
+ COUNT(*) AS invocationCount,
77
+ MAX(invoked_at) AS lastInvokedAt,
78
+ SUM(memories_extracted) AS memoriesExtracted
79
+ FROM hook_invocations
80
+ WHERE invoked_at >= datetime('now', '-7 days')
81
+ GROUP BY hook_name
82
+ ORDER BY hook_name
83
+ `).all();
84
+ for (const r of rows) {
85
+ hookActivity.push({
86
+ hookName: r.hookName,
87
+ invocationCount: r.invocationCount,
88
+ lastInvokedAt: r.lastInvokedAt,
89
+ memoriesExtracted: r.memoriesExtracted ?? 0,
90
+ });
91
+ }
92
+ }
93
+ catch {
94
+ // hook_invocations table doesn't exist on pre-4.13 installs - leave empty
95
+ }
69
96
  return {
70
97
  dbPath,
71
98
  dbSize,
@@ -77,6 +104,7 @@ function getStatusInfo(dbPath) {
77
104
  lastActivity,
78
105
  quarantined,
79
106
  threatsBlocked,
107
+ hookActivity,
80
108
  };
81
109
  }
82
110
  const SETTINGS_PATH = path.join(os.homedir(), '.claude', 'settings.json');
@@ -145,6 +173,17 @@ export async function handleStatusCommand() {
145
173
  Defence: ${info.quarantined} quarantined, ${info.threatsBlocked} threats blocked
146
174
  Hooks: ${hooksConfigured ? 'configured' : '⚠️ not configured'}
147
175
  `);
176
+ if (info.hookActivity.length > 0) {
177
+ console.log(' Hook activity (last 7 days):');
178
+ for (const h of info.hookActivity) {
179
+ const last = h.lastInvokedAt ? formatRelativeTime(h.lastInvokedAt) : 'never';
180
+ const extracted = h.memoriesExtracted > 0
181
+ ? `, extracted ${h.memoriesExtracted} memor${h.memoriesExtracted === 1 ? 'y' : 'ies'}`
182
+ : '';
183
+ console.log(` ${h.hookName.padEnd(14)} fired ${h.invocationCount}× — last ${last}${extracted}`);
184
+ }
185
+ console.log('');
186
+ }
148
187
  if (!hooksConfigured) {
149
188
  console.log(` ⚠️ Claude Code hooks are not set up. Memory won't auto-save or inject context.`);
150
189
  console.log(` Run: shieldcortex install\n`);
@@ -3,21 +3,35 @@ import fs from "node:fs/promises";
3
3
  import { homedir } from "node:os";
4
4
  import path from "node:path";
5
5
 
6
- export function createOpenClawRuntime({ logPrefix = "[shieldcortex]" } = {}) {
6
+ export function createOpenClawRuntime({
7
+ logPrefix = "[shieldcortex]",
8
+ configPath = path.join(homedir(), ".shieldcortex", "config.json"),
9
+ } = {}) {
7
10
  let shieldConfig = null;
11
+ let shieldConfigMtime = 0;
8
12
  let resolvedServerCmd = null;
9
13
  let lastCallErrorType = null;
10
14
 
15
+ // mtime-gated cache: re-read on every call if the config file's modified
16
+ // time has advanced. Lets dashboard / CLI toggles take effect on the next
17
+ // event without an OpenClaw gateway restart.
11
18
  async function loadShieldConfig() {
12
- if (shieldConfig) return shieldConfig;
19
+ let mtime = 0;
20
+ try {
21
+ const stats = await fs.stat(configPath);
22
+ mtime = stats.mtimeMs;
23
+ } catch {
24
+ mtime = 0;
25
+ }
26
+
27
+ if (shieldConfig && mtime === shieldConfigMtime) return shieldConfig;
13
28
 
14
29
  try {
15
- const configPath = path.join(homedir(), ".shieldcortex", "config.json");
16
30
  shieldConfig = JSON.parse(await fs.readFile(configPath, "utf-8"));
17
31
  } catch {
18
32
  shieldConfig = {};
19
33
  }
20
-
34
+ shieldConfigMtime = mtime;
21
35
  return shieldConfig;
22
36
  }
23
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shieldcortex",
3
- "version": "4.12.14",
3
+ "version": "4.13.0",
4
4
  "description": "Trustworthy memory and security for AI agents. Recall debugging, review queue, OpenClaw session capture, and memory poisoning defence for Claude Code, Codex, OpenClaw, LangChain, and MCP agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -156,6 +156,11 @@ const PLUGIN_CONFIG_JSON_SCHEMA = {
156
156
  },
157
157
  };
158
158
  let _config = null;
159
+ // Identity of the shield config we last merged from. The runtime's
160
+ // loadShieldConfig() returns the same parsed object until the file's mtime
161
+ // advances; using reference equality lets us re-merge precisely when the
162
+ // underlying config has actually changed (dashboard / CLI write).
163
+ let _lastShieldConfigRef = null;
159
164
  let _configOverride = null;
160
165
  let _version = "0.0.0";
161
166
  try {
@@ -229,16 +234,17 @@ function applyPluginConfigOverride(api) {
229
234
  ...(_configOverride ?? {}),
230
235
  ...pluginConfig,
231
236
  };
232
- if (_config) {
233
- _config = { ..._config, ...pluginConfig };
234
- }
237
+ // Override changed — invalidate so loadConfig() re-merges with new override.
238
+ _config = null;
239
+ _lastShieldConfigRef = null;
235
240
  }
236
241
  async function loadConfig() {
237
- if (_config)
242
+ const shieldConfigRaw = await (await getRuntime()).loadShieldConfig();
243
+ if (_config && shieldConfigRaw === _lastShieldConfigRef)
238
244
  return _config;
239
- const shieldConfig = normaliseConfig(await (await getRuntime()).loadShieldConfig());
245
+ _lastShieldConfigRef = shieldConfigRaw;
240
246
  _config = {
241
- ...shieldConfig,
247
+ ...normaliseConfig(shieldConfigRaw),
242
248
  ...(_configOverride ?? {}),
243
249
  };
244
250
  return _config;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "shieldcortex-realtime",
3
- "version": "4.12.14",
3
+ "version": "4.13.0",
4
4
  "name": "ShieldCortex Real-time Scanner",
5
5
  "description": "Real-time defence scanning on LLM input, memory extraction on LLM output, and active tool call interception with approval gating.",
6
6
  "kind": null,
@@ -0,0 +1,45 @@
1
+ import { existsSync, readFileSync } from 'fs';
2
+ import { join } from 'path';
3
+ import { homedir } from 'os';
4
+
5
+ const CONFIG_PATH = join(homedir(), '.shieldcortex', 'config.json');
6
+
7
+ const DEFAULTS = Object.freeze({
8
+ maxTranscriptBytes: 1024 * 1024,
9
+ maxTranscriptLines: 5000,
10
+ keepSlashCommandProse: true,
11
+ stopHookSamplingTurns: 10,
12
+ stopHookWindowBytes: 256 * 1024,
13
+ enableSessionEnd: false,
14
+ enableStop: false,
15
+ });
16
+
17
+ export function getAutoMemoryConfig() {
18
+ let raw = {};
19
+ try {
20
+ if (existsSync(CONFIG_PATH)) {
21
+ raw = JSON.parse(readFileSync(CONFIG_PATH, 'utf-8'));
22
+ }
23
+ } catch {
24
+ // fall through to defaults
25
+ }
26
+ const overrides = (raw && typeof raw.autoMemory === 'object' && raw.autoMemory) || {};
27
+ return {
28
+ maxTranscriptBytes: pickPositiveInt(overrides.maxTranscriptBytes, DEFAULTS.maxTranscriptBytes),
29
+ maxTranscriptLines: pickPositiveInt(overrides.maxTranscriptLines, DEFAULTS.maxTranscriptLines),
30
+ keepSlashCommandProse: typeof overrides.keepSlashCommandProse === 'boolean'
31
+ ? overrides.keepSlashCommandProse
32
+ : DEFAULTS.keepSlashCommandProse,
33
+ stopHookSamplingTurns: pickPositiveInt(overrides.stopHookSamplingTurns, DEFAULTS.stopHookSamplingTurns),
34
+ stopHookWindowBytes: pickPositiveInt(overrides.stopHookWindowBytes, DEFAULTS.stopHookWindowBytes),
35
+ enableSessionEnd: overrides.enableSessionEnd === true,
36
+ enableStop: overrides.enableStop === true,
37
+ };
38
+ }
39
+
40
+ function pickPositiveInt(value, fallback) {
41
+ if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
42
+ return Math.floor(value);
43
+ }
44
+ return fallback;
45
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Hook-invocation telemetry.
3
+ *
4
+ * Records every hook firing so `shieldcortex status` can show "fires but
5
+ * extracts nothing" failure modes (previously indistinguishable from
6
+ * "never fires"). Schema mirrors the migration in src/database/init.ts.
7
+ */
8
+
9
+ let schemaEnsured = false;
10
+
11
+ function ensureSchema(db) {
12
+ if (schemaEnsured) return;
13
+ db.exec(`
14
+ CREATE TABLE IF NOT EXISTS hook_invocations (
15
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
16
+ hook_name TEXT NOT NULL,
17
+ invoked_at TEXT NOT NULL DEFAULT (datetime('now')),
18
+ exit_code INTEGER,
19
+ duration_ms INTEGER,
20
+ memories_extracted INTEGER DEFAULT 0,
21
+ transcript_bytes INTEGER,
22
+ notes TEXT
23
+ );
24
+ CREATE INDEX IF NOT EXISTS idx_hook_invocations_name_time ON hook_invocations(hook_name, invoked_at DESC);
25
+ `);
26
+ schemaEnsured = true;
27
+ }
28
+
29
+ /**
30
+ * Insert a single hook-invocation row. All fields except hook_name are
31
+ * optional. Wrapped in try/catch — telemetry must never block a hook.
32
+ *
33
+ * `invoked_at` is supplied as an explicit ISO-8601 UTC string (with `Z`)
34
+ * rather than relying on the SCHEMA's `datetime('now')` default — that
35
+ * default returns a naive `YYYY-MM-DD HH:MM:SS` string with no timezone,
36
+ * which JS Date() then interprets as local time and renders status
37
+ * timestamps off by the local UTC offset.
38
+ */
39
+ export function recordHookInvocation(db, info) {
40
+ try {
41
+ ensureSchema(db);
42
+ db.prepare(`
43
+ INSERT INTO hook_invocations
44
+ (hook_name, invoked_at, exit_code, duration_ms, memories_extracted, transcript_bytes, notes)
45
+ VALUES (?, ?, ?, ?, ?, ?, ?)
46
+ `).run(
47
+ info.hookName,
48
+ new Date().toISOString(),
49
+ info.exitCode ?? null,
50
+ info.durationMs ?? null,
51
+ info.memoriesExtracted ?? 0,
52
+ info.transcriptBytes ?? null,
53
+ info.notes ?? null,
54
+ );
55
+ } catch (err) {
56
+ console.error(`[telemetry] Failed to record ${info?.hookName} invocation: ${err?.message}`);
57
+ }
58
+ }
@@ -0,0 +1,123 @@
1
+ import { existsSync, openSync, readSync, closeSync, statSync } from 'fs';
2
+ import { homedir } from 'os';
3
+
4
+ const DEFAULT_MAX_BYTES = 1024 * 1024;
5
+ const DEFAULT_MAX_LINES = 5000;
6
+ const SLASH_DROP_LEN = 200;
7
+
8
+ function isSingleLineSlashCommand(text) {
9
+ if (!text || text[0] !== '/') return false;
10
+ if (text.length >= SLASH_DROP_LEN) return false;
11
+ if (text.includes('\n')) return false;
12
+ return true;
13
+ }
14
+
15
+ function extractText(content) {
16
+ if (typeof content === 'string') return content;
17
+ if (Array.isArray(content)) {
18
+ return content
19
+ .filter((c) => c && c.type === 'text' && typeof c.text === 'string')
20
+ .map((c) => c.text)
21
+ .join('\n');
22
+ }
23
+ return '';
24
+ }
25
+
26
+ /**
27
+ * Read the tail of a Claude Code transcript JSONL and return the
28
+ * concatenated user+assistant text plus telemetry metadata.
29
+ *
30
+ * Replaces three duplicated readers in pre-compact-hook and session-end-hook
31
+ * that all hard-coded `slice(-50)` and a blanket `startsWith('/')` filter.
32
+ *
33
+ * @param {string|null|undefined} transcriptPath Path (may start with `~`).
34
+ * @param {object} [opts]
35
+ * @param {number} [opts.maxBytes=1MiB] Tail-byte ceiling — bounds memory on huge transcripts.
36
+ * @param {number} [opts.maxLines=5000] Hard line cap after JSONL parse.
37
+ * @param {boolean} [opts.keepSlashCommandProse=true]
38
+ * true → drop only single-line slash invocations under 200 chars
39
+ * false → drop any message starting with `/` (legacy strict)
40
+ * @returns {{ text: string, messageCount: number, bytesRead: number, rawLineCount: number }}
41
+ */
42
+ export function readTranscriptText(transcriptPath, opts = {}) {
43
+ const empty = { text: '', messageCount: 0, bytesRead: 0, rawLineCount: 0 };
44
+ if (!transcriptPath || typeof transcriptPath !== 'string') return empty;
45
+
46
+ const resolvedPath = transcriptPath.replace(/^~/, homedir());
47
+ if (!existsSync(resolvedPath)) return empty;
48
+
49
+ const maxBytes = opts.maxBytes ?? DEFAULT_MAX_BYTES;
50
+ const maxLines = opts.maxLines ?? DEFAULT_MAX_LINES;
51
+ const keepSlashProse = opts.keepSlashCommandProse !== false;
52
+
53
+ let raw;
54
+ let bytesRead = 0;
55
+ let truncated = false;
56
+ try {
57
+ const stat = statSync(resolvedPath);
58
+ const fileSize = stat.size;
59
+ bytesRead = Math.min(fileSize, Math.max(0, maxBytes));
60
+ truncated = bytesRead < fileSize;
61
+
62
+ if (bytesRead === 0) return empty;
63
+
64
+ const fd = openSync(resolvedPath, 'r');
65
+ try {
66
+ const buf = Buffer.alloc(bytesRead);
67
+ readSync(fd, buf, 0, bytesRead, fileSize - bytesRead);
68
+ raw = buf.toString('utf-8');
69
+ } finally {
70
+ closeSync(fd);
71
+ }
72
+ } catch {
73
+ return empty;
74
+ }
75
+
76
+ let lines = raw.split('\n');
77
+ // If we sliced from the middle of the file, the first line is likely a
78
+ // partial JSON fragment — drop it rather than emit a parse error.
79
+ if (truncated && lines.length > 0) {
80
+ lines = lines.slice(1);
81
+ }
82
+ // Trim a trailing empty line from a clean newline-terminated file.
83
+ if (lines.length > 0 && lines[lines.length - 1] === '') {
84
+ lines = lines.slice(0, -1);
85
+ }
86
+
87
+ // Hard cap: keep the most recent N lines.
88
+ if (lines.length > maxLines) {
89
+ lines = lines.slice(lines.length - maxLines);
90
+ }
91
+ const rawLineCount = lines.length;
92
+
93
+ const messages = [];
94
+ for (const line of lines) {
95
+ if (!line) continue;
96
+ let entry;
97
+ try {
98
+ entry = JSON.parse(line);
99
+ } catch {
100
+ continue;
101
+ }
102
+ const role = entry.type || entry.message?.role;
103
+ if (role !== 'user' && role !== 'assistant') continue;
104
+
105
+ const text = extractText(entry.message?.content);
106
+ if (!text) continue;
107
+
108
+ if (keepSlashProse) {
109
+ if (isSingleLineSlashCommand(text)) continue;
110
+ } else if (text[0] === '/') {
111
+ continue;
112
+ }
113
+
114
+ messages.push(text);
115
+ }
116
+
117
+ return {
118
+ text: messages.join('\n\n'),
119
+ messageCount: messages.length,
120
+ bytesRead,
121
+ rawLineCount,
122
+ };
123
+ }
@@ -9,7 +9,7 @@
9
9
  * - SHIELDCORTEX_SKIP_AUTO_OPENCLAW=1 is set
10
10
  * - Running as a local/dev install (npm_config_global !== 'true')
11
11
  */
12
- import { existsSync, copyFileSync, mkdirSync, readdirSync, readFileSync } from 'fs';
12
+ import { existsSync, copyFileSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'fs';
13
13
  import { join, dirname } from 'path';
14
14
  import { homedir } from 'os';
15
15
  import { spawnSync } from 'child_process';
@@ -19,6 +19,37 @@ const isGlobal = process.env.npm_config_global === 'true';
19
19
  const isCI = process.env.CI === 'true' || process.env.CONTINUOUS_INTEGRATION === 'true';
20
20
  const skipAutoOpenClaw = process.env.SHIELDCORTEX_SKIP_AUTO_OPENCLAW === '1';
21
21
 
22
+ /**
23
+ * Write integration defaults for fresh installs only.
24
+ * Returns true if defaults were written (fresh install), false if config already exists.
25
+ *
26
+ * Why: as of v4.13.x ShieldCortex ships flagship integrations ON by default for new
27
+ * users so they see value within the first session. Existing users keep their current
28
+ * settings — we never overwrite a config file that already exists.
29
+ *
30
+ * The v4.11.0 latency concern (200-500ms + 100-400 tokens/turn for proactive recall)
31
+ * is real but only matters for fast OpenClaw agent loops; for interactive Claude Code
32
+ * sessions the value > latency. Users can opt out via dashboard or CLI.
33
+ */
34
+ function writeFreshInstallDefaults() {
35
+ const configDir = join(homedir(), '.shieldcortex');
36
+ const configFile = join(configDir, 'config.json');
37
+
38
+ if (existsSync(configFile)) return false;
39
+
40
+ try {
41
+ mkdirSync(configDir, { recursive: true });
42
+ const defaults = {
43
+ openclawAutoMemory: true,
44
+ proactiveRecall: true,
45
+ };
46
+ writeFileSync(configFile, JSON.stringify(defaults, null, 2) + '\n');
47
+ return true;
48
+ } catch {
49
+ return false;
50
+ }
51
+ }
52
+
22
53
  /**
23
54
  * Detect Docker/container environment — mirrors the logic in src/setup/openclaw.ts.
24
55
  * Postinstall must not crash the gateway in Umbrel/Docker installs (#16).
@@ -100,6 +131,7 @@ if (isGlobal && !isCI) {
100
131
  const __dirname = dirname(__filename);
101
132
  const cliPath = join(__dirname, '..', 'dist', 'index.js');
102
133
 
134
+ const isFreshInstall = writeFreshInstallDefaults();
103
135
  const state = getOpenClawState();
104
136
  const inDocker = isDockerEnvironment();
105
137
 
@@ -153,4 +185,18 @@ if (isGlobal && !isCI) {
153
185
  console.log('\x1b[36m│\x1b[0m sessions, compactions, and projects. \x1b[36m│\x1b[0m');
154
186
  console.log('\x1b[36m╰───────────────────────────────────────────────────────╯\x1b[0m');
155
187
  console.log('');
188
+ if (isFreshInstall) {
189
+ console.log('\x1b[2mFresh install — flagship integrations enabled by default:\x1b[0m');
190
+ console.log('\x1b[2m • OpenClaw Auto-Memory — captures memories from agent LLM output\x1b[0m');
191
+ console.log('\x1b[2m • Proactive Recall — injects relevant memory into prompts\x1b[0m');
192
+ console.log('\x1b[2mTo opt out (e.g. for fast agent loops): dashboard Settings → Integrations, or:\x1b[0m');
193
+ console.log('\x1b[2m shieldcortex config --openclaw-auto-memory false\x1b[0m');
194
+ console.log('\x1b[2m shieldcortex config --proactive-recall false\x1b[0m');
195
+ } else {
196
+ console.log('\x1b[2mIntegration toggles preserved from your existing config.\x1b[0m');
197
+ console.log('\x1b[2mManage in dashboard Settings → Integrations, or:\x1b[0m');
198
+ console.log('\x1b[2m shieldcortex config --openclaw-auto-memory true|false\x1b[0m');
199
+ console.log('\x1b[2m shieldcortex config --proactive-recall true|false\x1b[0m');
200
+ }
201
+ console.log('');
156
202
  }