shieldcortex 4.25.5 → 4.27.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 (232) 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/server/app/_global-error.html +2 -2
  4. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +1 -1
  5. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  8. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  9. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.html +2 -2
  11. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.rsc +1 -1
  12. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  14. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  15. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  17. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.html +1 -1
  19. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.rsc +1 -1
  20. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin/__PAGE__.segment.rsc +1 -1
  21. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk/admin.segment.rsc +1 -1
  22. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  23. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_full.segment.rsc +1 -1
  24. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_head.segment.rsc +1 -1
  25. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_index.segment.rsc +1 -1
  26. package/dashboard/.next/standalone/dashboard/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
  27. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.html +1 -1
  28. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.rsc +1 -1
  29. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud/__PAGE__.segment.rsc +1 -1
  30. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk/cloud.segment.rsc +1 -1
  31. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  32. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_full.segment.rsc +1 -1
  33. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_head.segment.rsc +1 -1
  34. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_index.segment.rsc +1 -1
  35. package/dashboard/.next/standalone/dashboard/.next/server/app/cloud.segments/_tree.segment.rsc +1 -1
  36. package/dashboard/.next/standalone/dashboard/.next/server/app/index.html +1 -1
  37. package/dashboard/.next/standalone/dashboard/.next/server/app/index.rsc +1 -1
  38. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  39. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_full.segment.rsc +1 -1
  40. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_head.segment.rsc +1 -1
  41. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_index.segment.rsc +1 -1
  42. package/dashboard/.next/standalone/dashboard/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  43. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.html +1 -1
  44. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.rsc +1 -1
  45. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture/__PAGE__.segment.rsc +1 -1
  46. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory/capture.segment.rsc +1 -1
  47. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  48. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  49. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_full.segment.rsc +1 -1
  50. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_head.segment.rsc +1 -1
  51. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_index.segment.rsc +1 -1
  52. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/capture.segments/_tree.segment.rsc +1 -1
  53. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.html +1 -1
  54. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.rsc +1 -1
  55. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph/__PAGE__.segment.rsc +1 -1
  56. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory/graph.segment.rsc +1 -1
  57. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  58. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  59. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_full.segment.rsc +1 -1
  60. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_head.segment.rsc +1 -1
  61. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_index.segment.rsc +1 -1
  62. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/graph.segments/_tree.segment.rsc +1 -1
  63. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.html +1 -1
  64. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.rsc +1 -1
  65. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall/__PAGE__.segment.rsc +1 -1
  66. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory/recall.segment.rsc +1 -1
  67. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  68. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  69. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_full.segment.rsc +1 -1
  70. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_head.segment.rsc +1 -1
  71. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_index.segment.rsc +1 -1
  72. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/recall.segments/_tree.segment.rsc +1 -1
  73. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.html +2 -2
  74. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.rsc +1 -1
  75. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/!KGRhc2hib2FyZCk/memory/replay/__PAGE__.segment.rsc +1 -1
  76. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/!KGRhc2hib2FyZCk/memory/replay.segment.rsc +1 -1
  77. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  78. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  79. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/_full.segment.rsc +1 -1
  80. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/_head.segment.rsc +1 -1
  81. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/_index.segment.rsc +1 -1
  82. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/replay.segments/_tree.segment.rsc +1 -1
  83. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.html +1 -1
  84. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.rsc +1 -1
  85. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review/__PAGE__.segment.rsc +1 -1
  86. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory/review.segment.rsc +1 -1
  87. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  88. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  89. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_full.segment.rsc +1 -1
  90. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_head.segment.rsc +1 -1
  91. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_index.segment.rsc +1 -1
  92. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/review.segments/_tree.segment.rsc +1 -1
  93. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.html +1 -1
  94. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.rsc +1 -1
  95. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline/__PAGE__.segment.rsc +1 -1
  96. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory/timeline.segment.rsc +1 -1
  97. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  98. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  99. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_full.segment.rsc +1 -1
  100. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_head.segment.rsc +1 -1
  101. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_index.segment.rsc +1 -1
  102. package/dashboard/.next/standalone/dashboard/.next/server/app/memory/timeline.segments/_tree.segment.rsc +1 -1
  103. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.html +2 -2
  104. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.rsc +1 -1
  105. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory/__PAGE__.segment.rsc +1 -1
  106. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk/memory.segment.rsc +1 -1
  107. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  108. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_full.segment.rsc +1 -1
  109. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_head.segment.rsc +1 -1
  110. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_index.segment.rsc +1 -1
  111. package/dashboard/.next/standalone/dashboard/.next/server/app/memory.segments/_tree.segment.rsc +1 -1
  112. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.html +2 -2
  113. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.rsc +1 -1
  114. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview/__PAGE__.segment.rsc +1 -1
  115. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk/overview.segment.rsc +1 -1
  116. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  117. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_full.segment.rsc +1 -1
  118. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_head.segment.rsc +1 -1
  119. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_index.segment.rsc +1 -1
  120. package/dashboard/.next/standalone/dashboard/.next/server/app/overview.segments/_tree.segment.rsc +1 -1
  121. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.html +1 -1
  122. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.rsc +1 -1
  123. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit/__PAGE__.segment.rsc +1 -1
  124. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection/audit.segment.rsc +1 -1
  125. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  126. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  127. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_full.segment.rsc +1 -1
  128. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_head.segment.rsc +1 -1
  129. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_index.segment.rsc +1 -1
  130. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/audit.segments/_tree.segment.rsc +1 -1
  131. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.html +1 -1
  132. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.rsc +1 -1
  133. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts/__PAGE__.segment.rsc +1 -1
  134. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection/intercepts.segment.rsc +1 -1
  135. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  136. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  137. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_full.segment.rsc +1 -1
  138. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_head.segment.rsc +1 -1
  139. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_index.segment.rsc +1 -1
  140. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/intercepts.segments/_tree.segment.rsc +1 -1
  141. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.html +1 -1
  142. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.rsc +1 -1
  143. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome/__PAGE__.segment.rsc +1 -1
  144. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection/iron-dome.segment.rsc +1 -1
  145. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  146. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  147. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_full.segment.rsc +1 -1
  148. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_head.segment.rsc +1 -1
  149. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_index.segment.rsc +1 -1
  150. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/iron-dome.segments/_tree.segment.rsc +1 -1
  151. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.html +1 -1
  152. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.rsc +1 -1
  153. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies/__PAGE__.segment.rsc +1 -1
  154. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection/policies.segment.rsc +1 -1
  155. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  156. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  157. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_full.segment.rsc +1 -1
  158. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_head.segment.rsc +1 -1
  159. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_index.segment.rsc +1 -1
  160. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/policies.segments/_tree.segment.rsc +1 -1
  161. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.html +1 -1
  162. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.rsc +1 -1
  163. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine/__PAGE__.segment.rsc +1 -1
  164. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection/quarantine.segment.rsc +1 -1
  165. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  166. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  167. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_full.segment.rsc +1 -1
  168. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_head.segment.rsc +1 -1
  169. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_index.segment.rsc +1 -1
  170. package/dashboard/.next/standalone/dashboard/.next/server/app/protection/quarantine.segments/_tree.segment.rsc +1 -1
  171. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.html +2 -2
  172. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.rsc +1 -1
  173. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection/__PAGE__.segment.rsc +1 -1
  174. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk/protection.segment.rsc +1 -1
  175. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  176. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_full.segment.rsc +1 -1
  177. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_head.segment.rsc +1 -1
  178. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_index.segment.rsc +1 -1
  179. package/dashboard/.next/standalone/dashboard/.next/server/app/protection.segments/_tree.segment.rsc +1 -1
  180. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.html +2 -2
  181. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.rsc +1 -1
  182. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings/__PAGE__.segment.rsc +1 -1
  183. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk/settings.segment.rsc +1 -1
  184. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  185. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  186. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  187. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  188. package/dashboard/.next/standalone/dashboard/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  189. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.html +1 -1
  190. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.rsc +1 -1
  191. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray/__PAGE__.segment.rsc +1 -1
  192. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain/xray.segment.rsc +1 -1
  193. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  194. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  195. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_full.segment.rsc +1 -1
  196. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_head.segment.rsc +1 -1
  197. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_index.segment.rsc +1 -1
  198. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain/xray.segments/_tree.segment.rsc +1 -1
  199. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.html +1 -1
  200. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.rsc +1 -1
  201. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain/__PAGE__.segment.rsc +1 -1
  202. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk/supply-chain.segment.rsc +1 -1
  203. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  204. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_full.segment.rsc +1 -1
  205. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_head.segment.rsc +1 -1
  206. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_index.segment.rsc +1 -1
  207. package/dashboard/.next/standalone/dashboard/.next/server/app/supply-chain.segments/_tree.segment.rsc +1 -1
  208. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.html +2 -2
  209. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.rsc +1 -1
  210. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray/__PAGE__.segment.rsc +1 -1
  211. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk/xray.segment.rsc +1 -1
  212. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/!KGRhc2hib2FyZCk.segment.rsc +1 -1
  213. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_full.segment.rsc +1 -1
  214. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_head.segment.rsc +1 -1
  215. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_index.segment.rsc +1 -1
  216. package/dashboard/.next/standalone/dashboard/.next/server/app/xray.segments/_tree.segment.rsc +1 -1
  217. package/dashboard/.next/standalone/dashboard/.next/server/pages/404.html +2 -2
  218. package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +2 -2
  219. package/dist/cli/doctor.js +1 -1
  220. package/dist/cli/update.js +21 -0
  221. package/dist/database/init.js +2 -755
  222. package/dist/database/inline-schema.d.ts +15 -0
  223. package/dist/database/inline-schema.js +319 -0
  224. package/dist/database/migrations.d.ts +48 -0
  225. package/dist/database/migrations.js +506 -0
  226. package/dist/setup/quickstart.js +54 -0
  227. package/package.json +1 -1
  228. package/scripts/lib/dashboard-hint.mjs +71 -0
  229. package/scripts/postinstall.mjs +13 -0
  230. /package/dashboard/.next/standalone/dashboard/.next/static/{eiXzjGydPq7Vc5bq6Ohjr → CGvPUupL70GmSXZuLa4TO}/_buildManifest.js +0 -0
  231. /package/dashboard/.next/standalone/dashboard/.next/static/{eiXzjGydPq7Vc5bq6Ohjr → CGvPUupL70GmSXZuLa4TO}/_clientMiddlewareManifest.json +0 -0
  232. /package/dashboard/.next/standalone/dashboard/.next/static/{eiXzjGydPq7Vc5bq6Ohjr → CGvPUupL70GmSXZuLa4TO}/_ssgManifest.js +0 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Inline schema fallback for bundled deployment (extracted from
3
+ * src/database/init.ts in v4.26.0).
4
+ *
5
+ * When `dist/database/schema.sql` is present alongside the compiled
6
+ * `init.js`, `initDatabase()` reads + execs it. Otherwise (some bundled
7
+ * deployments — Vercel, certain bundlers, edge-runtime targets) it falls
8
+ * back to the inline string returned by `getInlineSchema()`.
9
+ *
10
+ * The two should stay in sync. When you edit `schema.sql`, mirror the
11
+ * change here. The CREATE TABLE / CREATE INDEX / CREATE TRIGGER set is
12
+ * intentionally idempotent (`IF NOT EXISTS`) so either source can be
13
+ * applied to either fresh or existing databases without error.
14
+ */
15
+ export declare function getInlineSchema(): string;
@@ -0,0 +1,319 @@
1
+ /**
2
+ * Inline schema fallback for bundled deployment (extracted from
3
+ * src/database/init.ts in v4.26.0).
4
+ *
5
+ * When `dist/database/schema.sql` is present alongside the compiled
6
+ * `init.js`, `initDatabase()` reads + execs it. Otherwise (some bundled
7
+ * deployments — Vercel, certain bundlers, edge-runtime targets) it falls
8
+ * back to the inline string returned by `getInlineSchema()`.
9
+ *
10
+ * The two should stay in sync. When you edit `schema.sql`, mirror the
11
+ * change here. The CREATE TABLE / CREATE INDEX / CREATE TRIGGER set is
12
+ * intentionally idempotent (`IF NOT EXISTS`) so either source can be
13
+ * applied to either fresh or existing databases without error.
14
+ */
15
+ export function getInlineSchema() {
16
+ return `
17
+ CREATE TABLE IF NOT EXISTS memories (
18
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
19
+ uuid TEXT NOT NULL UNIQUE,
20
+ type TEXT NOT NULL CHECK(type IN ('short_term', 'long_term', 'episodic')),
21
+ category TEXT NOT NULL DEFAULT 'note',
22
+ title TEXT NOT NULL,
23
+ content TEXT NOT NULL,
24
+ project TEXT,
25
+ tags TEXT DEFAULT '[]',
26
+ salience REAL DEFAULT 0.5 CHECK(salience >= 0 AND salience <= 1),
27
+ decayed_score REAL,
28
+ access_count INTEGER DEFAULT 0,
29
+ last_accessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
30
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
31
+ updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
32
+ metadata TEXT DEFAULT '{}',
33
+ embedding BLOB,
34
+ scope TEXT DEFAULT 'project',
35
+ transferable INTEGER DEFAULT 0,
36
+ trust_score REAL DEFAULT 1.0,
37
+ sensitivity_level TEXT DEFAULT 'INTERNAL',
38
+ source TEXT DEFAULT 'user:direct',
39
+ status TEXT DEFAULT 'active' CHECK(status IN ('active', 'archived', 'suppressed', 'canonical')),
40
+ pinned INTEGER DEFAULT 0,
41
+ reviewed_at TIMESTAMP,
42
+ reviewed_by TEXT,
43
+ source_kind TEXT DEFAULT 'user',
44
+ capture_method TEXT DEFAULT 'manual',
45
+ cloud_excluded INTEGER DEFAULT 0,
46
+ graph_extraction_version INTEGER DEFAULT 0,
47
+ memory_purpose TEXT DEFAULT 'project',
48
+ memory_scope TEXT DEFAULT 'private',
49
+ downvote_count INTEGER DEFAULT 0,
50
+ last_downvoted_at TIMESTAMP
51
+ );
52
+
53
+ CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
54
+ title,
55
+ content,
56
+ tags,
57
+ content='memories',
58
+ content_rowid='id',
59
+ tokenize='porter unicode61'
60
+ );
61
+
62
+ CREATE TRIGGER IF NOT EXISTS memories_ai AFTER INSERT ON memories BEGIN
63
+ INSERT INTO memories_fts(rowid, title, content, tags)
64
+ VALUES (new.id, new.title, new.content, new.tags);
65
+ END;
66
+
67
+ CREATE TRIGGER IF NOT EXISTS memories_ad AFTER DELETE ON memories BEGIN
68
+ INSERT INTO memories_fts(memories_fts, rowid, title, content, tags)
69
+ VALUES('delete', old.id, old.title, old.content, old.tags);
70
+ END;
71
+
72
+ CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE ON memories BEGIN
73
+ INSERT INTO memories_fts(memories_fts, rowid, title, content, tags)
74
+ VALUES('delete', old.id, old.title, old.content, old.tags);
75
+ INSERT INTO memories_fts(rowid, title, content, tags)
76
+ VALUES (new.id, new.title, new.content, new.tags);
77
+ END;
78
+
79
+ CREATE INDEX IF NOT EXISTS idx_memories_type ON memories(type);
80
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_memories_uuid ON memories(uuid);
81
+ CREATE INDEX IF NOT EXISTS idx_memories_project ON memories(project);
82
+ CREATE INDEX IF NOT EXISTS idx_memories_category ON memories(category);
83
+ CREATE INDEX IF NOT EXISTS idx_memories_salience ON memories(salience DESC);
84
+ CREATE INDEX IF NOT EXISTS idx_memories_decayed_score ON memories(decayed_score DESC);
85
+ CREATE INDEX IF NOT EXISTS idx_memories_last_accessed ON memories(last_accessed DESC);
86
+ CREATE INDEX IF NOT EXISTS idx_memories_updated ON memories(updated_at DESC);
87
+
88
+ CREATE TABLE IF NOT EXISTS sessions (
89
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
90
+ project TEXT,
91
+ started_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
92
+ ended_at TIMESTAMP,
93
+ summary TEXT,
94
+ memories_created INTEGER DEFAULT 0,
95
+ memories_accessed INTEGER DEFAULT 0
96
+ );
97
+
98
+ CREATE TABLE IF NOT EXISTS memory_links (
99
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
100
+ source_id INTEGER NOT NULL,
101
+ target_id INTEGER NOT NULL,
102
+ relationship TEXT NOT NULL,
103
+ strength REAL DEFAULT 0.5,
104
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
105
+ FOREIGN KEY (source_id) REFERENCES memories(id) ON DELETE CASCADE,
106
+ FOREIGN KEY (target_id) REFERENCES memories(id) ON DELETE CASCADE,
107
+ UNIQUE(source_id, target_id)
108
+ );
109
+
110
+ -- Events table for cross-process IPC (MCP → Dashboard)
111
+ CREATE TABLE IF NOT EXISTS events (
112
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
113
+ type TEXT NOT NULL,
114
+ data TEXT,
115
+ timestamp TEXT NOT NULL,
116
+ processed INTEGER DEFAULT 0
117
+ );
118
+
119
+ CREATE INDEX IF NOT EXISTS idx_events_processed ON events(processed, id);
120
+
121
+ CREATE TABLE IF NOT EXISTS entities (
122
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
123
+ name TEXT NOT NULL,
124
+ type TEXT NOT NULL,
125
+ aliases TEXT DEFAULT '[]',
126
+ first_seen TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
127
+ memory_count INTEGER DEFAULT 0,
128
+ UNIQUE(name, type)
129
+ );
130
+
131
+ CREATE INDEX IF NOT EXISTS idx_entities_name ON entities(name);
132
+ CREATE INDEX IF NOT EXISTS idx_entities_type ON entities(type);
133
+
134
+ CREATE TABLE IF NOT EXISTS triples (
135
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
136
+ subject_id INTEGER NOT NULL,
137
+ predicate TEXT NOT NULL,
138
+ object_id INTEGER NOT NULL,
139
+ source_memory_id INTEGER,
140
+ confidence REAL DEFAULT 0.8,
141
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
142
+ FOREIGN KEY (subject_id) REFERENCES entities(id) ON DELETE CASCADE,
143
+ FOREIGN KEY (object_id) REFERENCES entities(id) ON DELETE CASCADE,
144
+ FOREIGN KEY (source_memory_id) REFERENCES memories(id) ON DELETE SET NULL,
145
+ UNIQUE(subject_id, predicate, object_id)
146
+ );
147
+
148
+ CREATE INDEX IF NOT EXISTS idx_triples_subject ON triples(subject_id);
149
+ CREATE INDEX IF NOT EXISTS idx_triples_object ON triples(object_id);
150
+ CREATE INDEX IF NOT EXISTS idx_triples_predicate ON triples(predicate);
151
+
152
+ CREATE TABLE IF NOT EXISTS memory_entities (
153
+ memory_id INTEGER NOT NULL,
154
+ entity_id INTEGER NOT NULL,
155
+ role TEXT DEFAULT 'mention',
156
+ FOREIGN KEY (memory_id) REFERENCES memories(id) ON DELETE CASCADE,
157
+ FOREIGN KEY (entity_id) REFERENCES entities(id) ON DELETE CASCADE,
158
+ PRIMARY KEY (memory_id, entity_id)
159
+ );
160
+
161
+ CREATE TABLE IF NOT EXISTS defence_audit (
162
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
163
+ memory_id INTEGER,
164
+ project TEXT,
165
+ timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
166
+ source_type TEXT NOT NULL,
167
+ source_identifier TEXT NOT NULL,
168
+ trust_score REAL NOT NULL,
169
+ sensitivity_level TEXT NOT NULL DEFAULT 'INTERNAL',
170
+ firewall_result TEXT NOT NULL CHECK(firewall_result IN ('ALLOW', 'BLOCK', 'QUARANTINE')),
171
+ anomaly_score REAL DEFAULT 0.0,
172
+ threat_indicators TEXT DEFAULT '[]',
173
+ blocked_patterns TEXT DEFAULT '[]',
174
+ reason TEXT,
175
+ fragmentation_score REAL,
176
+ pipeline_duration_ms INTEGER,
177
+ FOREIGN KEY (memory_id) REFERENCES memories(id) ON DELETE SET NULL
178
+ );
179
+
180
+ CREATE INDEX IF NOT EXISTS idx_audit_memory ON defence_audit(memory_id);
181
+ CREATE INDEX IF NOT EXISTS idx_audit_timestamp ON defence_audit(timestamp DESC);
182
+ CREATE INDEX IF NOT EXISTS idx_audit_result ON defence_audit(firewall_result);
183
+ CREATE INDEX IF NOT EXISTS idx_audit_source ON defence_audit(source_type);
184
+ CREATE INDEX IF NOT EXISTS idx_audit_project ON defence_audit(project);
185
+
186
+ CREATE TABLE IF NOT EXISTS quarantine (
187
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
188
+ original_content TEXT NOT NULL,
189
+ original_title TEXT,
190
+ project TEXT,
191
+ source_type TEXT NOT NULL,
192
+ source_identifier TEXT NOT NULL,
193
+ reason TEXT NOT NULL,
194
+ threat_indicators TEXT DEFAULT '[]',
195
+ anomaly_score REAL DEFAULT 0.0,
196
+ firewall_result TEXT NOT NULL CHECK(firewall_result IN ('BLOCK', 'QUARANTINE')),
197
+ status TEXT NOT NULL DEFAULT 'pending' CHECK(status IN ('pending', 'approved', 'rejected', 'expired')),
198
+ reviewed_at TIMESTAMP,
199
+ reviewed_by TEXT,
200
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
201
+ expires_at TIMESTAMP,
202
+ audit_id INTEGER,
203
+ FOREIGN KEY (audit_id) REFERENCES defence_audit(id) ON DELETE SET NULL
204
+ );
205
+
206
+ CREATE INDEX IF NOT EXISTS idx_quarantine_status ON quarantine(status);
207
+ CREATE INDEX IF NOT EXISTS idx_quarantine_created ON quarantine(created_at DESC);
208
+
209
+ CREATE TABLE IF NOT EXISTS quarantine_annotations (
210
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
211
+ item_id INTEGER NOT NULL,
212
+ category TEXT NOT NULL,
213
+ suggested_action TEXT NOT NULL,
214
+ confidence REAL NOT NULL,
215
+ similar_group_key TEXT,
216
+ copilot_version TEXT NOT NULL,
217
+ annotation_json TEXT NOT NULL,
218
+ generated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
219
+ FOREIGN KEY (item_id) REFERENCES quarantine(id) ON DELETE CASCADE,
220
+ UNIQUE(item_id, copilot_version)
221
+ );
222
+
223
+ CREATE INDEX IF NOT EXISTS idx_quarantine_annotations_item ON quarantine_annotations(item_id);
224
+ CREATE INDEX IF NOT EXISTS idx_quarantine_annotations_category ON quarantine_annotations(category);
225
+ CREATE INDEX IF NOT EXISTS idx_quarantine_annotations_action ON quarantine_annotations(suggested_action);
226
+ CREATE INDEX IF NOT EXISTS idx_quarantine_annotations_group ON quarantine_annotations(similar_group_key);
227
+
228
+ CREATE TABLE IF NOT EXISTS fragmentation_entities (
229
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
230
+ memory_id INTEGER NOT NULL,
231
+ entity_value TEXT NOT NULL,
232
+ entity_type TEXT NOT NULL,
233
+ context_snippet TEXT,
234
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
235
+ FOREIGN KEY (memory_id) REFERENCES memories(id) ON DELETE CASCADE
236
+ );
237
+
238
+ CREATE INDEX IF NOT EXISTS idx_frag_entities_memory ON fragmentation_entities(memory_id);
239
+ CREATE INDEX IF NOT EXISTS idx_frag_entities_text ON fragmentation_entities(entity_value);
240
+ CREATE INDEX IF NOT EXISTS idx_frag_entities_type ON fragmentation_entities(entity_type);
241
+
242
+ CREATE TABLE IF NOT EXISTS sync_queue (
243
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
244
+ payload TEXT NOT NULL,
245
+ attempts INTEGER DEFAULT 0,
246
+ max_attempts INTEGER DEFAULT 3,
247
+ next_retry_at TEXT NOT NULL,
248
+ status TEXT NOT NULL DEFAULT 'pending' CHECK(status IN ('pending','failed','synced')),
249
+ last_error TEXT,
250
+ created_at TEXT DEFAULT (datetime('now')),
251
+ synced_at TEXT
252
+ );
253
+
254
+ CREATE INDEX IF NOT EXISTS idx_sync_queue_status_retry ON sync_queue(status, next_retry_at);
255
+
256
+ CREATE TABLE IF NOT EXISTS custom_patterns (
257
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
258
+ name TEXT NOT NULL,
259
+ category TEXT NOT NULL DEFAULT 'custom',
260
+ severity TEXT NOT NULL DEFAULT 'medium' CHECK(severity IN ('critical', 'high', 'medium', 'low')),
261
+ regex TEXT NOT NULL,
262
+ description TEXT DEFAULT '',
263
+ enabled INTEGER NOT NULL DEFAULT 1,
264
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
265
+ );
266
+ CREATE INDEX IF NOT EXISTS idx_custom_patterns_enabled ON custom_patterns(enabled);
267
+
268
+ CREATE TABLE IF NOT EXISTS iron_dome_policies (
269
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
270
+ name TEXT NOT NULL,
271
+ description TEXT DEFAULT '',
272
+ config TEXT NOT NULL DEFAULT '{}',
273
+ is_active INTEGER NOT NULL DEFAULT 0,
274
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
275
+ );
276
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_dome_policies_active ON iron_dome_policies(is_active) WHERE is_active = 1;
277
+
278
+ CREATE TABLE IF NOT EXISTS firewall_rules (
279
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
280
+ name TEXT NOT NULL,
281
+ priority INTEGER NOT NULL DEFAULT 100,
282
+ condition_type TEXT NOT NULL,
283
+ condition_value TEXT NOT NULL,
284
+ action TEXT NOT NULL CHECK(action IN ('block', 'allow', 'quarantine')),
285
+ enabled INTEGER NOT NULL DEFAULT 1,
286
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
287
+ );
288
+ CREATE INDEX IF NOT EXISTS idx_firewall_rules_priority ON firewall_rules(priority);
289
+ CREATE INDEX IF NOT EXISTS idx_firewall_rules_enabled ON firewall_rules(enabled);
290
+
291
+ CREATE TABLE IF NOT EXISTS rate_limits (
292
+ source_key TEXT PRIMARY KEY,
293
+ write_count INTEGER NOT NULL DEFAULT 1,
294
+ window_start_ms INTEGER NOT NULL
295
+ );
296
+
297
+ -- v4.17 Session capture (mirrors schema.sql; bundled fallback only).
298
+ CREATE TABLE IF NOT EXISTS session_events (
299
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
300
+ session_id TEXT NOT NULL,
301
+ project TEXT,
302
+ ts TIMESTAMP NOT NULL,
303
+ kind TEXT NOT NULL CHECK(kind IN (
304
+ 'prompt', 'response', 'tool_call', 'tool_result', 'tool_error', 'hook_fire'
305
+ )),
306
+ actor TEXT,
307
+ payload TEXT NOT NULL,
308
+ duration_ms INTEGER,
309
+ audit_id INTEGER,
310
+ content_hash TEXT,
311
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
312
+ FOREIGN KEY (audit_id) REFERENCES defence_audit(id) ON DELETE SET NULL
313
+ );
314
+ CREATE INDEX IF NOT EXISTS idx_session_events_session ON session_events(session_id, ts);
315
+ CREATE INDEX IF NOT EXISTS idx_session_events_project ON session_events(project, ts DESC);
316
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_session_events_dedupe
317
+ ON session_events(session_id, ts, kind, content_hash);
318
+ `;
319
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Schema migrations for existing ShieldCortex databases (extracted from
3
+ * src/database/init.ts in v4.26.0 to keep init.ts focused on connection
4
+ * lifecycle).
5
+ *
6
+ * `runMigrations()` is called during `initDatabase()` AFTER the connection is
7
+ * open but BEFORE the inline/file schema (`CREATE TABLE IF NOT EXISTS`)
8
+ * is applied. The split lets us:
9
+ * - ALTER TABLE pre-existing rows for new columns the schema introduces
10
+ * - Backfill data into those columns
11
+ * - Create extra tables (Pro-feature surface, knowledge graph, sync queue)
12
+ * that the canonical schema file may not yet declare on older installs
13
+ *
14
+ * Most migrations here are idempotent — guarded by either `IF NOT EXISTS`
15
+ * (CREATE TABLE / CREATE INDEX) or a `PRAGMA table_info(...)` check before
16
+ * `ALTER TABLE ADD COLUMN`. The broad try/catch blocks around the larger
17
+ * DDL clusters use `logIfUnexpectedDdlError` to keep idempotent re-runs
18
+ * silent while still surfacing genuinely-unexpected failures (disk full,
19
+ * permission denied, schema corruption, FK conflict).
20
+ *
21
+ * Adding a new migration: add a guarded block at the end of this function.
22
+ * NEVER reorder existing migrations — that breaks upgrade paths on older
23
+ * databases that have only partially run them.
24
+ */
25
+ import type Database from 'better-sqlite3';
26
+ /**
27
+ * Log unexpected errors from idempotent DDL operations (v4.26.0).
28
+ *
29
+ * Most schema migrations are guarded by either:
30
+ * - `IF NOT EXISTS` (CREATE TABLE / CREATE INDEX), or
31
+ * - A PRAGMA check (ALTER TABLE ADD COLUMN, only fires when column missing)
32
+ *
33
+ * Those guards mean the typical re-run case is silent and safe. But the broad
34
+ * `catch {}` blocks that wrap them also swallow genuinely-unexpected failures
35
+ * (disk full, permission denied, schema corruption, FK conflict). This helper
36
+ * filters known-idempotent SQLite errors but surfaces anything else on stderr
37
+ * so the doctor / operator can spot real problems.
38
+ */
39
+ export declare function logIfUnexpectedDdlError(err: unknown, op: string): void;
40
+ /**
41
+ * Run database migrations for existing databases.
42
+ *
43
+ * Skips entirely on fresh databases (the schema file creates everything in
44
+ * its post-migration form). For existing databases, it walks every
45
+ * column-add / table-create / backfill that has shipped across ShieldCortex
46
+ * v1.x → v4.x.
47
+ */
48
+ export declare function runMigrations(database: Database.Database): void;