kontexta 4.7.1 → 5.1.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 (499) hide show
  1. package/bundle/standalone/CHANGELOG.md +38 -0
  2. package/bundle/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/bundle/standalone/apps/web/.next/app-build-manifest.json +109 -88
  4. package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +15 -12
  5. package/bundle/standalone/apps/web/.next/build-manifest.json +2 -2
  6. package/bundle/standalone/apps/web/.next/prerender-manifest.json +13 -13
  7. package/bundle/standalone/apps/web/.next/required-server-files.json +1 -0
  8. package/bundle/standalone/apps/web/.next/routes-manifest.json +16 -0
  9. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js +1 -1
  10. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  13. package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +4 -4
  14. package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -1
  15. package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -1
  16. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js +1 -0
  17. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js.nft.json +1 -0
  18. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route_client-reference-manifest.js +1 -0
  19. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js +1 -0
  20. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js.nft.json +1 -0
  21. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -0
  22. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js +1 -0
  23. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js.nft.json +1 -0
  24. package/bundle/standalone/apps/web/.next/server/app/api/agents/route_client-reference-manifest.js +1 -0
  25. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js +1 -1
  26. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  27. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  28. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  29. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  30. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js +1 -1
  31. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js.nft.json +1 -1
  32. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
  33. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js +1 -1
  34. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  35. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  36. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js +1 -1
  37. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -1
  38. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -1
  39. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js +1 -1
  40. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -1
  41. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -1
  42. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js +1 -1
  43. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -1
  44. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -1
  45. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js +1 -1
  46. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -1
  47. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -1
  48. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js +1 -1
  49. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -1
  50. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -1
  51. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js +1 -1
  52. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -1
  53. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -1
  54. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js +1 -1
  55. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -1
  56. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -1
  57. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js +1 -1
  58. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -1
  59. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -1
  60. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js +1 -1
  61. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -1
  62. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -1
  63. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js +1 -1
  64. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -1
  65. package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -1
  66. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js +1 -1
  67. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -1
  68. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -1
  69. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js +1 -1
  70. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -1
  71. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -1
  72. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js +1 -1
  73. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js.nft.json +1 -1
  74. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route_client-reference-manifest.js +1 -1
  75. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js +1 -1
  76. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -1
  77. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -1
  78. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js +1 -1
  79. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js.nft.json +1 -1
  80. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route_client-reference-manifest.js +1 -1
  81. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js +1 -1
  82. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -1
  83. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -1
  84. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js +1 -1
  85. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -1
  86. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -1
  87. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js +1 -1
  88. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -1
  89. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -1
  90. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js +1 -1
  91. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -1
  92. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -1
  93. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js +1 -1
  94. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -1
  95. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -1
  96. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js +1 -1
  97. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
  98. package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  99. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js +1 -1
  100. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -1
  101. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -1
  102. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -1
  103. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -1
  104. package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -1
  105. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js +1 -1
  106. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -1
  107. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -1
  108. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -1
  109. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -1
  110. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -1
  111. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -1
  112. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -1
  113. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -1
  114. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -1
  115. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js +1 -1
  116. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -1
  117. package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  118. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +2 -2
  119. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -1
  120. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -1
  121. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -1
  122. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -1
  123. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -1
  124. package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -1
  125. package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -1
  126. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js +1 -1
  127. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -1
  128. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -1
  129. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js +1 -1
  130. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -1
  131. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -1
  132. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js +1 -1
  133. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -1
  134. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -1
  135. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js +1 -1
  136. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -1
  137. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -1
  138. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js +1 -1
  139. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -1
  140. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -1
  141. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js +1 -1
  142. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  143. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  144. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js +1 -1
  145. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -1
  146. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -1
  147. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js +1 -1
  148. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -1
  149. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -1
  150. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js +1 -1
  151. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -1
  152. package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  153. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -1
  154. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -1
  155. package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -1
  156. package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -1
  157. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js +1 -1
  158. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -1
  159. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -1
  160. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js +1 -1
  161. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -1
  162. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -1
  163. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js +1 -1
  164. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js.nft.json +1 -1
  165. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route_client-reference-manifest.js +1 -1
  166. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js +1 -1
  167. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -1
  168. package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  169. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js +1 -1
  170. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -1
  171. package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  172. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js +1 -1
  173. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
  174. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route_client-reference-manifest.js +1 -1
  175. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route.js.nft.json +1 -1
  176. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route_client-reference-manifest.js +1 -1
  177. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -1
  178. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -1
  179. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
  180. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +1 -1
  181. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -1
  182. package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -1
  183. package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  184. package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -1
  185. package/bundle/standalone/apps/web/.next/server/app/login/page.js +2 -2
  186. package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -1
  187. package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  188. package/bundle/standalone/apps/web/.next/server/app/page.js +4 -4
  189. package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  190. package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  191. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js +1 -1
  192. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -1
  193. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -1
  194. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +2 -2
  195. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +23 -22
  196. package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +15 -12
  197. package/bundle/standalone/apps/web/.next/server/chunks/6680.js +1 -1
  198. package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -1
  199. package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -1
  200. package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -1
  201. package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -1
  202. package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -1
  203. package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  204. package/bundle/standalone/apps/web/.next/static/IxgiSiK05GtQGxU41f-Mx/_buildManifest.js +1 -0
  205. package/bundle/standalone/apps/web/.next/static/chunks/771-863c84c2b052163a.js +1 -0
  206. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-0cc6597bb67aea3b.js +1 -0
  207. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-0cc6597bb67aea3b.js +1 -0
  208. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-0cc6597bb67aea3b.js +1 -0
  209. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-0cc6597bb67aea3b.js +1 -0
  210. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-0cc6597bb67aea3b.js +1 -0
  211. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-0cc6597bb67aea3b.js +1 -0
  212. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-0cc6597bb67aea3b.js +1 -0
  213. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-0cc6597bb67aea3b.js +1 -0
  214. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-0cc6597bb67aea3b.js +1 -0
  215. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-0cc6597bb67aea3b.js +1 -0
  216. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-0cc6597bb67aea3b.js +1 -0
  217. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-0cc6597bb67aea3b.js +1 -0
  218. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-0cc6597bb67aea3b.js +1 -0
  219. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-0cc6597bb67aea3b.js +1 -0
  220. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-0cc6597bb67aea3b.js +1 -0
  221. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-0cc6597bb67aea3b.js +1 -0
  222. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-0cc6597bb67aea3b.js +1 -0
  223. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-0cc6597bb67aea3b.js +1 -0
  224. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-0cc6597bb67aea3b.js +1 -0
  225. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-0cc6597bb67aea3b.js +1 -0
  226. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-0cc6597bb67aea3b.js +1 -0
  227. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-0cc6597bb67aea3b.js +1 -0
  228. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-0cc6597bb67aea3b.js +1 -0
  229. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-0cc6597bb67aea3b.js +1 -0
  230. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-0cc6597bb67aea3b.js +1 -0
  231. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-0cc6597bb67aea3b.js +1 -0
  232. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-0cc6597bb67aea3b.js +1 -0
  233. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-0cc6597bb67aea3b.js +1 -0
  234. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-0cc6597bb67aea3b.js +1 -0
  235. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-0cc6597bb67aea3b.js +1 -0
  236. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-0cc6597bb67aea3b.js +1 -0
  237. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-0cc6597bb67aea3b.js +1 -0
  238. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-0cc6597bb67aea3b.js +1 -0
  239. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-0cc6597bb67aea3b.js +1 -0
  240. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-0cc6597bb67aea3b.js +1 -0
  241. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-0cc6597bb67aea3b.js +1 -0
  242. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-0cc6597bb67aea3b.js +1 -0
  243. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-0cc6597bb67aea3b.js +1 -0
  244. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-0cc6597bb67aea3b.js +1 -0
  245. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-0cc6597bb67aea3b.js +1 -0
  246. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-0cc6597bb67aea3b.js +1 -0
  247. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-0cc6597bb67aea3b.js +1 -0
  248. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-0cc6597bb67aea3b.js +1 -0
  249. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-0cc6597bb67aea3b.js +1 -0
  250. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-0cc6597bb67aea3b.js +1 -0
  251. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-0cc6597bb67aea3b.js +1 -0
  252. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-0cc6597bb67aea3b.js +1 -0
  253. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-0cc6597bb67aea3b.js +1 -0
  254. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-0cc6597bb67aea3b.js +1 -0
  255. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-0cc6597bb67aea3b.js +1 -0
  256. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-0cc6597bb67aea3b.js +1 -0
  257. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-0cc6597bb67aea3b.js +1 -0
  258. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-0cc6597bb67aea3b.js +1 -0
  259. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-0cc6597bb67aea3b.js +1 -0
  260. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-0cc6597bb67aea3b.js +1 -0
  261. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-0cc6597bb67aea3b.js +1 -0
  262. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-0cc6597bb67aea3b.js +1 -0
  263. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-0cc6597bb67aea3b.js +1 -0
  264. package/bundle/standalone/apps/web/.next/static/chunks/app/{layout-3050c58d9809581a.js → layout-da10917c290d5da7.js} +1 -1
  265. package/bundle/standalone/apps/web/.next/static/chunks/app/page-4c19cddc721d832e.js +1 -0
  266. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-0cc6597bb67aea3b.js +1 -0
  267. package/bundle/standalone/apps/web/.next/static/css/198c34172598da00.css +3 -0
  268. package/bundle/standalone/apps/web/package.json +5 -5
  269. package/bundle/standalone/apps/web/server.js +1 -1
  270. package/bundle/standalone/apps/web/src/lib/mcp-tools.json +238 -543
  271. package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +24 -35
  272. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +1 -1
  273. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js +1 -1
  274. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js.map +1 -1
  275. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +1 -1
  276. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks/emit.mjs +397 -0
  277. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts +13 -0
  278. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts.map +1 -0
  279. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js +27 -0
  280. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js.map +1 -0
  281. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts +3 -0
  282. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts.map +1 -0
  283. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js +141 -0
  284. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js.map +1 -0
  285. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +479 -475
  286. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -1
  287. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts.map +1 -1
  288. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +55 -9
  289. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -1
  290. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts.map +1 -1
  291. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js +1 -27
  292. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js.map +1 -1
  293. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/010-agents.sql +14 -0
  294. package/bundle/standalone/node_modules/kontexta-mcp/package.json +2 -2
  295. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js +1 -1
  296. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js.map +1 -1
  297. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +24 -35
  298. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts +1 -0
  299. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts.map +1 -1
  300. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js +19 -4
  301. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js.map +1 -1
  302. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/010-agents.sql +14 -0
  303. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts +86 -0
  304. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts.map +1 -0
  305. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js +24 -0
  306. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js.map +1 -0
  307. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts +25 -0
  308. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts.map +1 -0
  309. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js +44 -0
  310. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js.map +1 -0
  311. package/bundle/standalone/node_modules/kxta-core/dist/hooks/emit.mjs +397 -0
  312. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts +14 -0
  313. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts.map +1 -0
  314. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js +8 -0
  315. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js.map +1 -0
  316. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts +3 -0
  317. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts.map +1 -0
  318. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js +15 -0
  319. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js.map +1 -0
  320. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts +30 -0
  321. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts.map +1 -0
  322. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js +92 -0
  323. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js.map +1 -0
  324. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts +2 -0
  325. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts.map +1 -0
  326. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js +13 -0
  327. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js.map +1 -0
  328. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts +3 -0
  329. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts.map +1 -0
  330. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js +51 -0
  331. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js.map +1 -0
  332. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts +2 -0
  333. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts.map +1 -0
  334. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js +16 -0
  335. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js.map +1 -0
  336. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts +3 -0
  337. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts.map +1 -0
  338. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js +41 -0
  339. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js.map +1 -0
  340. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts +13 -0
  341. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts.map +1 -0
  342. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js +76 -0
  343. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js.map +1 -0
  344. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts +2 -0
  345. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts.map +1 -0
  346. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js +12 -0
  347. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js.map +1 -0
  348. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts +16 -0
  349. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts.map +1 -0
  350. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js +75 -0
  351. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js.map +1 -0
  352. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts +5 -0
  353. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts.map +1 -0
  354. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js +19 -0
  355. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js.map +1 -0
  356. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts +13 -0
  357. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts.map +1 -0
  358. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js +80 -0
  359. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js.map +1 -0
  360. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts +3 -0
  361. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts.map +1 -0
  362. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js +76 -0
  363. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js.map +1 -0
  364. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts +29 -0
  365. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts.map +1 -0
  366. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js +2 -0
  367. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js.map +1 -0
  368. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts +20 -0
  369. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts.map +1 -0
  370. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js +58 -0
  371. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js.map +1 -0
  372. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts +18 -0
  373. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts.map +1 -0
  374. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js +115 -0
  375. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js.map +1 -0
  376. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +2 -1
  377. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -1
  378. package/bundle/standalone/node_modules/kxta-core/dist/index.js +2 -1
  379. package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -1
  380. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts +5 -0
  381. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts.map +1 -1
  382. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +136 -52
  383. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -1
  384. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js +2 -2
  385. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js.map +1 -1
  386. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts +4 -0
  387. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts.map +1 -1
  388. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js.map +1 -1
  389. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts.map +1 -1
  390. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js +3 -14
  391. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js.map +1 -1
  392. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts.map +1 -1
  393. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js +2 -13
  394. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js.map +1 -1
  395. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.d.ts +3 -0
  396. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.d.ts.map +1 -0
  397. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js +64 -0
  398. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js.map +1 -0
  399. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts +1 -0
  400. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts.map +1 -1
  401. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js +69 -2
  402. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js.map +1 -1
  403. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts +4 -0
  404. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts.map +1 -1
  405. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js +14 -0
  406. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js.map +1 -1
  407. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts.map +1 -1
  408. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js +2 -17
  409. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js.map +1 -1
  410. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +14 -1
  411. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -1
  412. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +107 -20
  413. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -1
  414. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +15 -2
  415. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -1
  416. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -1
  417. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +9 -0
  418. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -1
  419. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts.map +1 -1
  420. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js +14 -3
  421. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js.map +1 -1
  422. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts +1 -0
  423. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts.map +1 -1
  424. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js +23 -3
  425. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js.map +1 -1
  426. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts.map +1 -1
  427. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js +16 -0
  428. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js.map +1 -1
  429. package/bundle/standalone/node_modules/kxta-core/package.json +2 -2
  430. package/bundle/standalone/node_modules/kxta-publish/package.json +3 -3
  431. package/bundle/standalone/package.json +2 -2
  432. package/dist/{mcp-DGMGR3MZ.js → chunk-C4XU73GP.js} +2 -0
  433. package/dist/{doctor-NTVE43EI.js → doctor-HQBEQUUQ.js} +10 -1
  434. package/dist/hooks-6RQ5CCTW.js +22 -0
  435. package/dist/index.js +10 -4
  436. package/dist/mcp-VGISMLKH.js +9 -0
  437. package/dist/{start-66WKQRN5.js → start-RJVUJT4B.js} +9 -0
  438. package/package.json +2 -2
  439. package/bundle/standalone/apps/web/.next/static/DWDlM7S8dTnMlrhKW9K_X/_buildManifest.js +0 -1
  440. package/bundle/standalone/apps/web/.next/static/chunks/1480-3e4f4a95f11429a9.js +0 -1
  441. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-f5e054069fb68dd7.js +0 -1
  442. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-f5e054069fb68dd7.js +0 -1
  443. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-f5e054069fb68dd7.js +0 -1
  444. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-f5e054069fb68dd7.js +0 -1
  445. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-f5e054069fb68dd7.js +0 -1
  446. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-f5e054069fb68dd7.js +0 -1
  447. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-f5e054069fb68dd7.js +0 -1
  448. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-f5e054069fb68dd7.js +0 -1
  449. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-f5e054069fb68dd7.js +0 -1
  450. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-f5e054069fb68dd7.js +0 -1
  451. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-f5e054069fb68dd7.js +0 -1
  452. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-f5e054069fb68dd7.js +0 -1
  453. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-f5e054069fb68dd7.js +0 -1
  454. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-f5e054069fb68dd7.js +0 -1
  455. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-f5e054069fb68dd7.js +0 -1
  456. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-f5e054069fb68dd7.js +0 -1
  457. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-f5e054069fb68dd7.js +0 -1
  458. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-f5e054069fb68dd7.js +0 -1
  459. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-f5e054069fb68dd7.js +0 -1
  460. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-f5e054069fb68dd7.js +0 -1
  461. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-f5e054069fb68dd7.js +0 -1
  462. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-f5e054069fb68dd7.js +0 -1
  463. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-f5e054069fb68dd7.js +0 -1
  464. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-f5e054069fb68dd7.js +0 -1
  465. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-f5e054069fb68dd7.js +0 -1
  466. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-f5e054069fb68dd7.js +0 -1
  467. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-f5e054069fb68dd7.js +0 -1
  468. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-f5e054069fb68dd7.js +0 -1
  469. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-f5e054069fb68dd7.js +0 -1
  470. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-f5e054069fb68dd7.js +0 -1
  471. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-f5e054069fb68dd7.js +0 -1
  472. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-f5e054069fb68dd7.js +0 -1
  473. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-f5e054069fb68dd7.js +0 -1
  474. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-f5e054069fb68dd7.js +0 -1
  475. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-f5e054069fb68dd7.js +0 -1
  476. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-f5e054069fb68dd7.js +0 -1
  477. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-f5e054069fb68dd7.js +0 -1
  478. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-f5e054069fb68dd7.js +0 -1
  479. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-f5e054069fb68dd7.js +0 -1
  480. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-f5e054069fb68dd7.js +0 -1
  481. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-f5e054069fb68dd7.js +0 -1
  482. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-f5e054069fb68dd7.js +0 -1
  483. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-f5e054069fb68dd7.js +0 -1
  484. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-f5e054069fb68dd7.js +0 -1
  485. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-f5e054069fb68dd7.js +0 -1
  486. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-f5e054069fb68dd7.js +0 -1
  487. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-f5e054069fb68dd7.js +0 -1
  488. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-f5e054069fb68dd7.js +0 -1
  489. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-f5e054069fb68dd7.js +0 -1
  490. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-f5e054069fb68dd7.js +0 -1
  491. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-f5e054069fb68dd7.js +0 -1
  492. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-f5e054069fb68dd7.js +0 -1
  493. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-f5e054069fb68dd7.js +0 -1
  494. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-f5e054069fb68dd7.js +0 -1
  495. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-f5e054069fb68dd7.js +0 -1
  496. package/bundle/standalone/apps/web/.next/static/chunks/app/page-eccc7438c998fcce.js +0 -1
  497. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-f5e054069fb68dd7.js +0 -1
  498. package/bundle/standalone/apps/web/.next/static/css/35a6a6dfd2c31933.css +0 -3
  499. /package/bundle/standalone/apps/web/.next/static/{DWDlM7S8dTnMlrhKW9K_X → IxgiSiK05GtQGxU41f-Mx}/_ssgManifest.js +0 -0
@@ -0,0 +1,80 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, renameSync, realpathSync, statSync, chmodSync, lstatSync, readlinkSync } from "node:fs";
2
+ import { dirname, resolve, isAbsolute } from "node:path";
3
+ import { stagedEmitterPath } from "../stage.js";
4
+ export const OWNED_MARK = "hooks/emit.mjs";
5
+ export class MalformedConfigError extends Error {
6
+ path;
7
+ constructor(path, cause) {
8
+ super(`${path} is not valid JSON (${cause instanceof Error ? cause.message : String(cause)}); refusing to overwrite it`);
9
+ this.path = path;
10
+ }
11
+ }
12
+ const q = (s) => `"${s.replace(/(["$`])/g, "\\$1")}"`;
13
+ export const hostDirOf = (ctx) => ctx.hostDataDir ?? ctx.dataDir;
14
+ // GUI-launched agents (Cursor, Windsurf, VS Code) often lack the user's shell PATH, so bake the absolute node path; host installs from a container can only use the host's own `node`.
15
+ export const nodeCmdOf = (ctx) => ctx.nodeCmd ?? (ctx.hostDataDir ? "node" : process.execPath);
16
+ export function emitCommand(ctx, agent, event) {
17
+ const nc = nodeCmdOf(ctx);
18
+ const node = nc === "node" ? "node" : q(nc);
19
+ const parts = [node, q(stagedEmitterPath(hostDirOf(ctx))), "--agent", agent, "--data-dir", q(hostDirOf(ctx))];
20
+ if (event)
21
+ parts.push("--event", event);
22
+ return parts.join(" ");
23
+ }
24
+ export function isOwned(command) {
25
+ return typeof command === "string" && (/hooks[\\/]emit\.mjs/).test(command);
26
+ }
27
+ export function readJsonConfig(path) {
28
+ if (!existsSync(path))
29
+ return {};
30
+ const text = readFileSync(path, "utf8");
31
+ if (text.trim() === "")
32
+ return {};
33
+ try {
34
+ const v = JSON.parse(text);
35
+ if (!v || typeof v !== "object" || Array.isArray(v))
36
+ throw new Error("top level is not an object");
37
+ return v;
38
+ }
39
+ catch (e) {
40
+ throw new MalformedConfigError(path, e);
41
+ }
42
+ }
43
+ // A symlink whose target does not exist yet (dotfile managers): write the target so the link survives.
44
+ function danglingLinkTarget(path) {
45
+ try {
46
+ if (!lstatSync(path).isSymbolicLink())
47
+ return null;
48
+ const t = readlinkSync(path);
49
+ return isAbsolute(t) ? t : resolve(dirname(path), t);
50
+ }
51
+ catch {
52
+ return null;
53
+ }
54
+ }
55
+ export function writeJsonConfig(path, value, dryRun = false) {
56
+ const next = JSON.stringify(value, null, 2) + "\n";
57
+ const exists = existsSync(path);
58
+ const current = exists ? readFileSync(path, "utf8") : null;
59
+ let same = false;
60
+ if (current !== null) {
61
+ try {
62
+ same = JSON.stringify(JSON.parse(current)) === JSON.stringify(value);
63
+ }
64
+ catch { /* empty or unparsable → rewrite */ }
65
+ }
66
+ if (same)
67
+ return false;
68
+ if (dryRun)
69
+ return true;
70
+ // Write through symlinks (dotfile managers) and keep the target's mode: replacing the path itself would break the link and can widen a 0600 file.
71
+ const real = exists ? realpathSync(path) : danglingLinkTarget(path) ?? path;
72
+ const mode = exists ? statSync(real).mode & 0o777 : 0o644;
73
+ mkdirSync(dirname(real), { recursive: true });
74
+ const tmp = `${real}.${process.pid}.tmp`;
75
+ writeFileSync(tmp, next, { encoding: "utf8", mode });
76
+ chmodSync(tmp, mode);
77
+ renameSync(tmp, real);
78
+ return true;
79
+ }
80
+ //# sourceMappingURL=json-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-config.js","sourceRoot":"","sources":["../../../src/hooks/installers/json-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrJ,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAE3C,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC1B;IAAnB,YAAmB,IAAY,EAAE,KAAc;QAC7C,KAAK,CAAC,GAAG,IAAI,uBAAuB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QADxG,SAAI,GAAJ,IAAI,CAAQ;IAE/B,CAAC;CACF;AAED,MAAM,CAAC,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,G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AAG,KAAK,CAAC;IACjB,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAAC,IAAI,CAAC;YAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,mCAAmC,CAAC,CAAC;IAAC,CAAC;IACrJ,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IACvB,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IACxB,kJAAkJ;IAClJ,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;IACzC,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACrD,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACrB,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACtB,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Installer } from "./types.js";
2
+ export declare const opencodeInstaller: Installer;
3
+ //# sourceMappingURL=opencode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/opencode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AA2CxD,eAAO,MAAM,iBAAiB,EAAE,SA0B/B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { join } from "node:path";
2
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync } from "node:fs";
3
+ import { stagedEmitterPath } from "../stage.js";
4
+ import { hostDirOf, nodeCmdOf } from "./json-config.js";
5
+ const MARK = "// kontexta-hooks";
6
+ const configPath = (ctx) => join(ctx.home, ".config", "opencode", "plugins", "kontexta.ts");
7
+ function pluginSource(ctx) {
8
+ const emit = JSON.stringify(stagedEmitterPath(hostDirOf(ctx)));
9
+ const dataDir = JSON.stringify(hostDirOf(ctx));
10
+ const node = JSON.stringify(nodeCmdOf(ctx));
11
+ return `${MARK}
12
+ // Installed by kontexta. Forwards prompts and shell commands to the kontexta journal emitter.
13
+ import { spawn } from "node:child_process";
14
+
15
+ const EMIT = ${emit};
16
+ const DATA_DIR = ${dataDir};
17
+ const NODE = ${node};
18
+
19
+ function send(payload: Record<string, unknown>): void {
20
+ try {
21
+ const child = spawn(NODE, [EMIT, "--agent", "opencode", "--data-dir", DATA_DIR], { stdio: ["pipe", "ignore", "ignore"] });
22
+ child.on("error", () => {});
23
+ child.stdin.end(JSON.stringify(payload));
24
+ } catch {}
25
+ }
26
+
27
+ export const KontextaHooks = async ({ directory }: { directory?: string } = {}) => ({
28
+ "chat.message": async (input: any, output: any) => {
29
+ const parts = Array.isArray(output?.parts) ? output.parts : [];
30
+ const text = parts.filter((p: any) => p && p.type === "text" && typeof p.text === "string").map((p: any) => p.text).join("\\n");
31
+ if (text) send({ kontexta_event: "user_prompt", session_id: input?.sessionID, cwd: directory ?? process.cwd(), text });
32
+ },
33
+ "tool.execute.after": async (input: any, _output: any) => {
34
+ const command = input?.args?.command;
35
+ if (input?.tool === "bash" && typeof command === "string") send({ kontexta_event: "shell", session_id: input?.sessionID, cwd: directory ?? process.cwd(), command });
36
+ },
37
+ });
38
+
39
+ export default KontextaHooks;
40
+ `;
41
+ }
42
+ export const opencodeInstaller = {
43
+ id: "opencode",
44
+ configPath,
45
+ install(ctx) {
46
+ const path = configPath(ctx);
47
+ const body = pluginSource(ctx);
48
+ const notes = ["OpenCode replies are not available to plugins; prompts and shell commands are captured."];
49
+ if (existsSync(path)) {
50
+ const cur = readFileSync(path, "utf8");
51
+ if (!cur.startsWith(MARK))
52
+ return { agent: "opencode", path, changed: false, notes: [...notes, "kontexta.ts exists and is not ours; left untouched."] };
53
+ if (cur === body)
54
+ return { agent: "opencode", path, changed: false, notes };
55
+ }
56
+ if (!ctx.dryRun) {
57
+ mkdirSync(join(ctx.home, ".config", "opencode", "plugins"), { recursive: true });
58
+ writeFileSync(path, body, "utf8");
59
+ }
60
+ return { agent: "opencode", path, changed: true, notes };
61
+ },
62
+ uninstall(ctx) {
63
+ const path = configPath(ctx);
64
+ if (!existsSync(path) || !readFileSync(path, "utf8").startsWith(MARK))
65
+ return { agent: "opencode", path, changed: false, notes: [] };
66
+ if (!ctx.dryRun)
67
+ unlinkSync(path);
68
+ return { agent: "opencode", path, changed: true, notes: [] };
69
+ },
70
+ status(ctx) {
71
+ const path = configPath(ctx);
72
+ const installed = existsSync(path) && readFileSync(path, "utf8").startsWith(MARK);
73
+ return { agent: "opencode", path, installed, notes: [] };
74
+ },
75
+ };
76
+ //# sourceMappingURL=opencode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/hooks/installers/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAExD,M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,CAAC;IAC3D,CAAC;CACF,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { AgentId } from "../agents.js";
2
+ export interface InstallCtx {
3
+ home: string;
4
+ dataDir: string;
5
+ hostDataDir?: string;
6
+ nodeCmd?: string;
7
+ projectDir?: string;
8
+ dryRun?: boolean;
9
+ }
10
+ export interface InstallResult {
11
+ agent: AgentId;
12
+ path: string;
13
+ changed: boolean;
14
+ notes: string[];
15
+ }
16
+ export interface StatusResult {
17
+ agent: AgentId;
18
+ path: string;
19
+ installed: boolean;
20
+ notes: string[];
21
+ }
22
+ export interface Installer {
23
+ id: AgentId;
24
+ configPath(ctx: InstallCtx): string;
25
+ install(ctx: InstallCtx): InstallResult;
26
+ uninstall(ctx: InstallCtx): InstallResult;
27
+ status(ctx: InstallCtx): StatusResult;
28
+ }
29
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAAG,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE;AAClG,MAAM,WAAW,YAAY;IAAG,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE;AAEnG,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,UAAU,GAAG,aAAa,CAAC;IACxC,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,aAAa,CAAC;IAC1C,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,YAAY,CAAC;CACvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/installers/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface AgentRow {
2
+ id: string;
3
+ name: string;
4
+ enabled: boolean;
5
+ hooks_supported: boolean;
6
+ onboardable: boolean;
7
+ hooks_installed: boolean;
8
+ hooks_version: string | null;
9
+ hooks_installed_at: string | null;
10
+ hooks_verified_at: string | null;
11
+ last_hook_event_at: string | null;
12
+ }
13
+ export declare function syncAgentRows(): void;
14
+ export declare function listAgents(): AgentRow[];
15
+ export declare function setEnabled(id: string, enabled: boolean): void;
16
+ export declare function markInstalled(id: string, version: string): void;
17
+ export declare function markUninstalled(id: string): void;
18
+ export declare function markVerified(id: string, ts: string): void;
19
+ export declare function alerts(now?: Date): AgentRow[];
20
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/hooks/registry.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAUD,wBAAgB,aAAa,IAAI,IAAI,CAOpC;AAED,wBAAgB,UAAU,IAAI,QAAQ,EAAE,CAYvC;AAMD,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAG7D;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAKhD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAIzD;AAED,wBAAgB,MAAM,CAAC,GAAG,GAAE,IAAiB,GAAG,QAAQ,EAAE,CAMzD"}
@@ -0,0 +1,58 @@
1
+ import { getDatabase } from "../db/index.js";
2
+ import { AGENTS, isAgentId } from "./agents.js";
3
+ const UNVERIFIED_ALERT_DAYS = 7;
4
+ export function syncAgentRows() {
5
+ const db = getDatabase();
6
+ const up = db.prepare(`
7
+ INSERT INTO agents (id, hooks_supported) VALUES (?, ?)
8
+ ON CONFLICT(id) DO UPDATE SET hooks_supported = excluded.hooks_supported
9
+ `);
10
+ db.transaction(() => { for (const a of AGENTS)
11
+ up.run(a.id, a.hooksSupported ? 1 : 0); })();
12
+ }
13
+ export function listAgents() {
14
+ const rows = getDatabase().prepare(`SELECT * FROM agents`).all();
15
+ const byId = new Map(rows.map((r) => [r.id, r]));
16
+ return AGENTS.filter((a) => byId.has(a.id)).map((a) => {
17
+ const r = byId.get(a.id);
18
+ return {
19
+ id: r.id, name: a.name,
20
+ enabled: r.enabled === 1, hooks_supported: r.hooks_supported === 1, onboardable: a.onboardable, hooks_installed: r.hooks_installed === 1,
21
+ hooks_version: r.hooks_version, hooks_installed_at: r.hooks_installed_at,
22
+ hooks_verified_at: r.hooks_verified_at, last_hook_event_at: r.last_hook_event_at,
23
+ };
24
+ });
25
+ }
26
+ function touch(sql, ...params) {
27
+ getDatabase().prepare(sql).run(...params);
28
+ }
29
+ export function setEnabled(id, enabled) {
30
+ if (!isAgentId(id))
31
+ throw new Error(`unknown agent: ${id}`);
32
+ touch(`UPDATE agents SET enabled = ?, updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, enabled ? 1 : 0, id);
33
+ }
34
+ export function markInstalled(id, version) {
35
+ if (!isAgentId(id))
36
+ throw new Error(`unknown agent: ${id}`);
37
+ touch(`UPDATE agents SET hooks_installed = 1, hooks_version = ?, hooks_installed_at = strftime('%Y-%m-%dT%H:%M:%fZ','now'),
38
+ updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, version, id);
39
+ }
40
+ export function markUninstalled(id) {
41
+ if (!isAgentId(id))
42
+ throw new Error(`unknown agent: ${id}`);
43
+ // Uninstalling also turns the agent off: "enabled" means hooks are wanted, and reconcile would otherwise reinstall them on the next start.
44
+ touch(`UPDATE agents SET enabled = 0, hooks_installed = 0, hooks_version = NULL, hooks_installed_at = NULL, hooks_verified_at = NULL,
45
+ updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, id);
46
+ }
47
+ export function markVerified(id, ts) {
48
+ if (!isAgentId(id))
49
+ return;
50
+ touch(`UPDATE agents SET hooks_verified_at = COALESCE(hooks_verified_at, ?), last_hook_event_at = ?,
51
+ updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, ts, ts, id);
52
+ }
53
+ export function alerts(now = new Date()) {
54
+ const cutoff = new Date(now.getTime() - UNVERIFIED_ALERT_DAYS * 86_400_000).toISOString();
55
+ return listAgents().filter((r) => r.enabled && r.hooks_supported &&
56
+ ((!r.hooks_installed && r.hooks_verified_at === null) || (r.hooks_installed && r.hooks_verified_at === null && (r.hooks_installed_at ?? "") < cutoff)));
57
+ }
58
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/hooks/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAqBhD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC;;;GAGrB,CAAC,CAAC;IACH,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,GAAG,EAAc,CAAC;IAC7E,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACpD,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC;QAC1B,OAAO;YACL,EAAE,EAAE,C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AC;IAC5D,2IAA2I;IAC3I,KAAK,CAAC;wEACgE,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,EAAU;IACjD,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAAE,OAAO;IAC3B,KAAK,CAAC;wEACgE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,MAAY,IAAI,IAAI,EAAE;IAC3C,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,qBAAqB,GAAG,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1F,OAAO,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAC/B,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,eAAe;QAC9B,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,iBAAiB,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,iBAAiB,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,kBAAkB,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CACvJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare function emitterVersionOf(source: string): string;
2
+ export declare function emitterSourceCandidates(here: string, cwd: string): string[];
3
+ export declare function emitterSourcePath(): string;
4
+ export declare const EMITTER_VERSION: string;
5
+ export declare function stagedEmitterPath(dataDir: string): string;
6
+ export declare function stageEmitter(dataDir: string): {
7
+ path: string;
8
+ changed: boolean;
9
+ version: string;
10
+ };
11
+ export declare function emitterVersionOnDisk(dataDir: string): string | null;
12
+ export declare function syncProjectsSidecar(dataDir: string): {
13
+ path: string;
14
+ count: number;
15
+ };
16
+ export declare function syncProjectsSidecarIfStaged(dataDir: string): void;
17
+ export declare function pruneHookState(dataDir: string, maxAgeDays?: number): number;
18
+ //# sourceMappingURL=stage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/hooks/stage.ts"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAKD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAgB3E;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAGD,eAAO,MAAM,eAAe,EAAE,MAE1B,CAAC;AAEL,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAWjG;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMnE;AAGD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAWpF;AAGD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIjE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAK,GAAG,MAAM,CAWvE"}
@@ -0,0 +1,115 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, readdirSync, statSync, unlinkSync, renameSync } from "node:fs";
2
+ import { join, dirname, posix } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { createHash } from "node:crypto";
5
+ import { getDatabase } from "../db/index.js";
6
+ export function emitterVersionOf(source) {
7
+ return createHash("sha256").update(source.replace(/\r\n/g, "\n")).digest("hex").slice(0, 12);
8
+ }
9
+ const DEV_HEADER = "// kontexta-hooks v0.0.0-dev";
10
+ // Bundlers rewrite import.meta.url, so besides the tsc/tsup/source layouts also look for the copy shipped inside node_modules/kxta-core on the way up.
11
+ export function emitterSourceCandidates(here, cwd) {
12
+ const out = [
13
+ join(here, "emit.mjs"),
14
+ join(here, "hooks", "emit.mjs"),
15
+ join(here, "..", "..", "src", "hooks", "emit.mjs"),
16
+ join(cwd, "packages", "core", "src", "hooks", "emit.mjs"),
17
+ join(cwd, "packages", "core", "dist", "hooks", "emit.mjs"),
18
+ ];
19
+ let dir = here;
20
+ for (let i = 0; i < 16; i++) {
21
+ out.push(join(dir, "node_modules", "kxta-core", "dist", "hooks", "emit.mjs"));
22
+ const parent = dirname(dir);
23
+ if (parent === dir)
24
+ break;
25
+ dir = parent;
26
+ }
27
+ return out;
28
+ }
29
+ export function emitterSourcePath() {
30
+ const candidates = emitterSourceCandidates(dirname(fileURLToPath(import.meta.url)), process.cwd());
31
+ const found = candidates.find((p) => existsSync(p));
32
+ if (!found)
33
+ throw new Error(`emit.mjs not found; looked in: ${candidates.join(", ")}`);
34
+ return found;
35
+ }
36
+ // Content-derived so any emit.mjs change re-stages on the next reconcile; rulesVersion only moves when the rules block changes.
37
+ export const EMITTER_VERSION = (() => {
38
+ try {
39
+ return emitterVersionOf(readFileSync(emitterSourcePath(), "utf8"));
40
+ }
41
+ catch {
42
+ return "unknown";
43
+ }
44
+ })();
45
+ export function stagedEmitterPath(dataDir) {
46
+ if (dataDir.startsWith("/") || (!dataDir.includes("\\") && dataDir.includes("/"))) {
47
+ return posix.join(dataDir, "hooks", "emit.mjs");
48
+ }
49
+ return join(dataDir, "hooks", "emit.mjs");
50
+ }
51
+ export function stageEmitter(dataDir) {
52
+ const src = readFileSync(emitterSourcePath(), "utf8").replace(/\r\n/g, "\n");
53
+ const stamped = src.startsWith(DEV_HEADER) ? `// kontexta-hooks v${EMITTER_VERSION}${src.slice(DEV_HEADER.length)}` : src;
54
+ const dst = stagedEmitterPath(dataDir);
55
+ const current = existsSync(dst) ? readFileSync(dst, "utf8") : null;
56
+ if (current === stamped)
57
+ return { path: dst, changed: false, version: EMITTER_VERSION };
58
+ mkdirSync(dirname(dst), { recursive: true });
59
+ const tmp = `${dst}.${process.pid}.tmp`;
60
+ writeFileSync(tmp, stamped, "utf8");
61
+ renameSync(tmp, dst);
62
+ return { path: dst, changed: true, version: EMITTER_VERSION };
63
+ }
64
+ export function emitterVersionOnDisk(dataDir) {
65
+ try {
66
+ const first = readFileSync(stagedEmitterPath(dataDir), "utf8").split(/\r?\n/)[0].trimEnd();
67
+ const m = first.match(/^\/\/ kontexta-hooks v(\S+)$/);
68
+ return m ? m[1] : null;
69
+ }
70
+ catch {
71
+ return null;
72
+ }
73
+ }
74
+ // Reads the DB directly (not metadata.listProjects) so metadata can call this without an import cycle.
75
+ export function syncProjectsSidecar(dataDir) {
76
+ const rows = getDatabase()
77
+ .prepare(`SELECT slug, path FROM projects WHERE path IS NOT NULL AND path != '' ORDER BY slug`)
78
+ .all();
79
+ const projects = rows.map((p) => ({ slug: p.slug, path: p.path }));
80
+ const path = join(dataDir, "hooks", "projects.json");
81
+ mkdirSync(dirname(path), { recursive: true });
82
+ const tmp = `${path}.${process.pid}.tmp`;
83
+ writeFileSync(tmp, JSON.stringify({ version: 1, projects }, null, 2), "utf8");
84
+ renameSync(tmp, path);
85
+ return { path, count: projects.length };
86
+ }
87
+ // Called from project registration; skipped under test and until hooks are staged so registering a project never creates files in a real data dir.
88
+ export function syncProjectsSidecarIfStaged(dataDir) {
89
+ if (process.env.VITEST || process.env.NODE_ENV === "test")
90
+ return;
91
+ if (!existsSync(join(dataDir, "hooks")))
92
+ return;
93
+ syncProjectsSidecar(dataDir);
94
+ }
95
+ export function pruneHookState(dataDir, maxAgeDays = 30) {
96
+ const dir = join(dataDir, "hooks", "state");
97
+ if (!existsSync(dir))
98
+ return 0;
99
+ const cutoff = Date.now() - maxAgeDays * 86_400_000;
100
+ let removed = 0;
101
+ for (const f of readdirSync(dir)) {
102
+ if (!f.endsWith(".json"))
103
+ continue;
104
+ const p = join(dir, f);
105
+ try {
106
+ if (statSync(p).mtimeMs < cutoff) {
107
+ unlinkSync(p);
108
+ removed++;
109
+ }
110
+ }
111
+ catch { }
112
+ }
113
+ return removed;
114
+ }
115
+ //# sourceMappingURL=stage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stage.js","sourceRoot":"","sources":["../../src/hooks/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5H,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,GAAG,8BAA8B,CAAC;AAElD,uJAAuJ;AACvJ,MAAM,UAAU,uBAAuB,CAAC,IAAY,EAAE,GAAW;IAC/D,MAAM,GAAG,GAAG;QACV,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;QACtB,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC;QAC/B,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC;QAClD,IAAI,C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gBAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAAC,OAAO,EAAE,CAAC;YAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IAClF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { getDataDir, getDbPath, ensureDataDir, resetDataDirCache, defaultDataDir, defaultDataDirDisplay, homeSensitivePrefixes } from "./util/paths.js";
2
- export { createDatabase, getDatabase, closeDatabase, gracefulShutdown } from "./db/index.js";
2
+ export { createDatabase, getDatabase, isDatabaseOpen, closeDatabase, gracefulShutdown } from "./db/index.js";
3
3
  import { createFile, readFile, updateFile, deleteFile, listFiles, moveFile, createFolder, deleteFolder, listProjectFolders, listProjectFoldersWithFiles, slugify } from "./files/index.js";
4
4
  export { createFile, readFile, updateFile, deleteFile, listFiles, moveFile, createFolder, deleteFolder, listProjectFolders, listProjectFoldersWithFiles, slugify };
5
5
  export { parseOutline, findSection, replaceSection, type OutlineNode } from "./files/sections.js";
@@ -20,6 +20,7 @@ export { clipUrl, ClipError, type ClipErrorCode, type ClipUrlOptions } from "./c
20
20
  export { whatsNew, resolveSince, type WhatsNewOptions, type WhatsNewResult, type WhatsNewEntry, type ChangeKind, } from "./whats-new/index.js";
21
21
  export { projectMap, type ProjectMapOptions, type ProjectMapResult, type ProjectMapStats, } from "./project-map/index.js";
22
22
  export * from "./journal/index.js";
23
+ export * from "./hooks/index.js";
23
24
  export * from "./profile/index.js";
24
25
  export * from "./calendar/index.js";
25
26
  export { writeResource, readResource, listResources, deleteResource, resourceUrlFor, resourceSrcFor, mimeFor } from "./reports/resources.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;A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,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EACL,QAAQ,EAAE,YAAY,EACtB,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,GAC/E,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { getDataDir, getDbPath, ensureDataDir, resetDataDirCache, defaultDataDir, defaultDataDirDisplay, homeSensitivePrefixes } from "./util/paths.js";
2
- export { createDatabase, getDatabase, closeDatabase, gracefulShutdown } from "./db/index.js";
2
+ export { createDatabase, getDatabase, isDatabaseOpen, closeDatabase, gracefulShutdown } from "./db/index.js";
3
3
  import { createFile, readFile, updateFile, deleteFile, listFiles, moveFile, createFolder, deleteFolder, listProjectFolders, listProjectFoldersWithFiles, slugify } from "./files/index.js";
4
4
  export { createFile, readFile, updateFile, deleteFile, listFiles, moveFile, createFolder, deleteFolder, listProjectFolders, listProjectFoldersWithFiles, slugify };
5
5
  export { parseOutline, findSection, replaceSection } from "./files/sections.js";
@@ -18,6 +18,7 @@ export { clipUrl, ClipError } from "./clip/index.js";
18
18
  export { whatsNew, resolveSince, } from "./whats-new/index.js";
19
19
  export { projectMap, } from "./project-map/index.js";
20
20
  export * from "./journal/index.js";
21
+ export * from "./hooks/index.js";
21
22
  export * from "./profile/index.js";
22
23
  export * from "./calendar/index.js";
23
24
  export { writeResource, readResource, listResources, deleteResource, resourceUrlFor, resourceSrcFor, mimeFor } from "./reports/resources.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxJ,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3L,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,EAAE,CAAC;AACnK,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EACL,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EACvD,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,YAAY,EAC3G,WAAW,EAAE,eAAe,EAAE,aAAa,GAC5C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,UAAU,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EAAE,MAAM,kBAAkB,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,WAAW,GAQZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAA6G,MAAM,mBAAmB,CAAC;AAC5J,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,SAAS,EAA2C,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EACL,QAAQ,EAAE,YAAY,GAEvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,GAEX,MAAM,wBAAwB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -11,6 +11,11 @@ export interface DistillJournalOpts {
11
11
  now: Date;
12
12
  extraPatterns?: ExtraPatternDef[];
13
13
  cooldownSeconds?: number;
14
+ /** Reprocess this fixed window of raw events instead of continuing from the high-water mark; the mark is neither read nor written. */
15
+ range?: {
16
+ since: string;
17
+ until: string;
18
+ };
14
19
  }
15
20
  export declare function distillJournal(opts: DistillJournalOpts): Promise<DistillResult>;
16
21
  //# sourceMappingURL=distill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"distill.d.ts","sourceRoot":"","sources":["../../src/journal/distill.ts"],"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