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,25 @@
1
+ import type { InstallMode } from "./install-mode.js";
2
+ export interface HooksAlert {
3
+ agent: string;
4
+ name: string;
5
+ installed: boolean;
6
+ verified_at: string | null;
7
+ docker_command?: string;
8
+ }
9
+ export interface HooksBlock {
10
+ install_mode: InstallMode;
11
+ alerts: HooksAlert[];
12
+ prompt: string | null;
13
+ }
14
+ export declare function dockerInstallCommand(o: {
15
+ agent: string;
16
+ version: string;
17
+ hostDataDir?: string | null;
18
+ }): string;
19
+ export declare function buildHooksBlock(o: {
20
+ installMode: InstallMode;
21
+ version: string;
22
+ hostDataDir?: string | null;
23
+ now?: Date;
24
+ }): HooksBlock;
25
+ //# sourceMappingURL=alerts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts.d.ts","sourceRoot":"","sources":["../../src/hooks/alerts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,UAAU;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE;AACpI,MAAM,WAAW,UAAU;IAAG,YAAY,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAOtG,wBAAgB,oBAAoB,CAAC,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAG/G;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,CAAC,EAAE,IAAI,CAAA;CAAE,GAAG,UAAU,CA+BrI"}
@@ -0,0 +1,44 @@
1
+ import { alerts as registryAlerts } from "./registry.js";
2
+ import { agentMeta } from "./agents.js";
3
+ // A relative host path (compose's ./kontexta-data default) can't be resolved from inside the container, so it is treated as unknown.
4
+ const isAbsoluteHostPath = (p) => /^(\/|[A-Za-z]:[\\/]|\\\\)/.test(p);
5
+ // Escape for use inside double quotes in a POSIX shell.
6
+ const dq = (s) => s.replace(/(["\\$`])/g, "\\$1");
7
+ export function dockerInstallCommand(o) {
8
+ const dir = o.hostDataDir && isAbsoluteHostPath(o.hostDataDir) ? dq(o.hostDataDir) : "<DATA_DIR>";
9
+ return `docker run --rm -v "$HOME":/host -v "${dir}":/app/data safiyu/kontexta:${o.version} hooks install --home /host --host-data-dir "${dir}" --no-db --agent ${o.agent}`;
10
+ }
11
+ export function buildHooksBlock(o) {
12
+ const alerts = registryAlerts(o.now).map((r) => ({
13
+ agent: r.id, name: r.name, installed: r.hooks_installed, verified_at: r.hooks_verified_at,
14
+ ...(o.installMode === "docker" ? { docker_command: dockerInstallCommand({ agent: r.id, version: o.version, hostDataDir: o.hostDataDir }) } : {}),
15
+ }));
16
+ if (alerts.length === 0)
17
+ return { install_mode: o.installMode, alerts, prompt: null };
18
+ const missing = alerts.filter((a) => !a.installed);
19
+ const silent = alerts.filter((a) => a.installed);
20
+ const lines = [];
21
+ if (missing.length > 0) {
22
+ const names = missing.map((a) => a.name).join(", ");
23
+ if (o.installMode === "docker") {
24
+ lines.push(`Kontexta can capture your conversation and shell commands for ${names}. The container cannot edit files on your machine, so run the docker command from the dashboard's Configure → AGENTS tab (or hooks.alerts[].docker_command) on the host.`);
25
+ }
26
+ else {
27
+ // admin.onboard_agent only accepts agents that have a rules-file scaffold; the rest must use the CLI.
28
+ const viaTool = missing.filter((a) => agentMeta(a.agent)?.onboardable);
29
+ const cliOnly = missing.filter((a) => !agentMeta(a.agent)?.onboardable);
30
+ const install = viaTool.length > 0
31
+ ? `After the user agrees, call admin.onboard_agent with hooks:true, confirm:true and target_agent set to one of (${viaTool.map((a) => a.agent).join(" | ")}), or run \`kontexta hooks install --agent <id>\`.`
32
+ : "After the user agrees, run `kontexta hooks install --agent <id>`.";
33
+ const cli = cliOnly.length > 0
34
+ ? ` For ${cliOnly.map((a) => a.name).join(", ")}, run ${cliOnly.map((a) => `\`kontexta hooks install --agent ${a.agent}\``).join(" / ")} (onboarding does not cover ${cliOnly.length > 1 ? "them" : "it"}).`
35
+ : "";
36
+ lines.push(`Kontexta can capture your conversation and shell commands for ${names}. Install their hooks now? ${install}${cli}`);
37
+ }
38
+ }
39
+ if (silent.length > 0) {
40
+ lines.push(`Hooks for ${silent.map((a) => a.name).join(", ")} are installed but no events have arrived in over a week — run \`kontexta hooks status\` to check.`);
41
+ }
42
+ return { install_mode: o.installMode, alerts, prompt: lines.join(" ") };
43
+ }
44
+ //# sourceMappingURL=alerts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alerts.js","sourceRoot":"","sources":["../../src/hooks/alerts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,qIAAqI;AACrI,MAAM,kBAAkB,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACvF,wDAAwD;AACxD,MAAM,EAAE,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAElE,MAAM,UAAU,oBAAoB,CAAC,CAAkE;IACrG,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IAClG,OAAO,wCAAwC,GAAG,+BAA+B,CAAC,CAAC,OAAO,gDAAgD,GAAG,qBAAqB,CAAC,CAAC,KAAK,EAAE,CAAC;AAC9K,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAyF;IACvH,MAAM,MAAM,GAAiB,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7D,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,iBAAiB;QACzF,GAAG,CAAC,CAAC,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,oBAAoB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjJ,CAAC,CAAC,CAAC;IACJ,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAEtF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,iEAAiE,KAAK,0KAA0K,CAAC,CAAC;QAC/P,CAAC;aAAM,CAAC;YACN,sGAAsG;YACtG,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC;YACvE,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC;YACxE,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC;gBAChC,CAAC,CAAC,iHAAiH,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oDAAoD;gBAC9M,CAAC,CAAC,mEAAmE,CAAC;YACxE,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC;gBAC5B,CAAC,CAAC,QAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,oCAAoC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,+BAA+B,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI;gBAC5M,CAAC,CAAC,EAAE,CAAC;YACP,KAAK,CAAC,IAAI,CAAC,iEAAiE,KAAK,8BAA8B,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC;QAClI,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oGAAoG,CAAC,CAAC;IACpK,CAAC;IACD,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,397 @@
1
+ // kontexta-hooks v0.0.0-dev
2
+ // Dependency-free journal emitter invoked by coding-agent hooks. Prints nothing, always exits 0.
3
+ import { readFileSync, appendFileSync, mkdirSync, writeFileSync, statSync } from "node:fs";
4
+ import { join, dirname, resolve, isAbsolute } from "node:path";
5
+ import { homedir, platform } from "node:os";
6
+ import { pathToFileURL } from "node:url";
7
+
8
+ const MAX_STDIN_BYTES = 1_000_000;
9
+ const DEFAULT_CAPS = { prompt_max_bytes: 8192, reply_max_bytes: 4096, command_max_bytes: 2048 };
10
+ const BLOCKED_KEY_RE = /(password|token|secret|auth|cookie|bearer|api[_-]?key)/i;
11
+ const REDACTED = "<redacted>";
12
+ // Bounded quantifiers around the key words keep the key=value pattern linear on long unbroken tokens.
13
+ const VALUE_PATTERNS = [
14
+ [/ghp_[A-Za-z0-9]{20,}/g, REDACTED],
15
+ [/github_pat_[A-Za-z0-9_]{20,}/g, REDACTED],
16
+ [/glpat-[A-Za-z0-9_-]{20,}/g, REDACTED],
17
+ [/AIza[0-9A-Za-z_-]{30,}/g, REDACTED],
18
+ [/sk-[A-Za-z0-9_-]{20,}/g, REDACTED],
19
+ [/sk_(?:live|test)_[A-Za-z0-9]{16,}/g, REDACTED],
20
+ [/xox[baprs]-[A-Za-z0-9-]{10,}/g, REDACTED],
21
+ [/xapp-[A-Za-z0-9-]{10,}/g, REDACTED],
22
+ [/AKIA[0-9A-Z]{16}/g, REDACTED],
23
+ [/(?:npm|hf)_[A-Za-z0-9]{30,}/g, REDACTED],
24
+ [/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g, REDACTED],
25
+ [/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g, REDACTED],
26
+ [/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{16,}/gi, `$1 ${REDACTED}`],
27
+ [/(:\/\/)[^\s:@/]+:[^\s@/]+@/g, `$1${REDACTED}@`],
28
+ [/(^|\s)(-u|--user)\s+[^\s:]+:\S+/g, `$1$2 ${REDACTED}`],
29
+ [/([A-Za-z0-9_.-]{0,40}(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key|private[_-]?key)[A-Za-z0-9_.-]{0,40})\s*[=:]\s*("[^"]*"|'[^']*'|[^\s"']+)/gi, `$1=${REDACTED}`],
30
+ [/\b(password|passwd|pwd)\s+is\s+\S+/gi, `$1 is ${REDACTED}`],
31
+ ];
32
+
33
+ // ---------- small helpers ----------
34
+ const str = (v) => typeof v === "string" && v.length > 0;
35
+
36
+ export function redactText(s) {
37
+ let out = s;
38
+ for (const [re, replacement] of VALUE_PATTERNS) out = out.replace(re, replacement);
39
+ return out;
40
+ }
41
+
42
+ function redactDeep(v) {
43
+ if (typeof v === "string") return redactText(v);
44
+ if (Array.isArray(v)) return v.map(redactDeep);
45
+ if (v && typeof v === "object") {
46
+ const o = {};
47
+ for (const [k, val] of Object.entries(v)) o[k] = BLOCKED_KEY_RE.test(k) ? REDACTED : redactDeep(val);
48
+ return o;
49
+ }
50
+ return v;
51
+ }
52
+
53
+ export function capUtf8(s, max) {
54
+ const buf = Buffer.from(s, "utf8");
55
+ if (buf.length <= max) return { text: s, truncated: false, bytes: buf.length };
56
+ let cut = max;
57
+ while (cut > 0 && (buf[cut] & 0xc0) === 0x80) cut--;
58
+ return { text: buf.subarray(0, cut).toString("utf8"), truncated: true, bytes: buf.length };
59
+ }
60
+
61
+ export function defaultDataDir() {
62
+ const home = homedir();
63
+ switch (platform()) {
64
+ case "darwin": return join(home, "Library", "Application Support", "kontexta");
65
+ case "win32": return join(process.env.APPDATA ?? join(home, "AppData", "Roaming"), "kontexta");
66
+ default: return join(process.env.XDG_DATA_HOME ?? join(home, ".local", "share"), "kontexta");
67
+ }
68
+ }
69
+
70
+ export function resolveDataDir(argv, env) {
71
+ if (str(env.KONTEXTA_DATA_DIR)) return resolve(env.KONTEXTA_DATA_DIR);
72
+ const i = argv.indexOf("--data-dir");
73
+ if (i >= 0 && str(argv[i + 1])) return resolve(argv[i + 1]);
74
+ try {
75
+ const cached = readFileSync(join(homedir(), ".kontexta_datadir"), "utf8").trim();
76
+ if (cached && isAbsolute(cached)) return cached;
77
+ } catch {}
78
+ return defaultDataDir();
79
+ }
80
+
81
+ function argValue(argv, flag) {
82
+ const i = argv.indexOf(flag);
83
+ return i >= 0 && str(argv[i + 1]) ? argv[i + 1] : undefined;
84
+ }
85
+
86
+ function readCaps(dataDir) {
87
+ try {
88
+ const cfg = JSON.parse(readFileSync(join(dataDir, "kontexta.json"), "utf8"));
89
+ const h = cfg?.journal?.hooks ?? {};
90
+ const pick = (k) => (Number.isInteger(h[k]) && h[k] > 0 ? h[k] : DEFAULT_CAPS[k]);
91
+ return { prompt_max_bytes: pick("prompt_max_bytes"), reply_max_bytes: pick("reply_max_bytes"), command_max_bytes: pick("command_max_bytes") };
92
+ } catch { return { ...DEFAULT_CAPS }; }
93
+ }
94
+
95
+ // Windows paths differ in separator and drive-letter case between the registered path and the agent-reported cwd, so compare a normalised form.
96
+ function normPath(p) {
97
+ const win = /^[A-Za-z]:[\\/]/.test(p);
98
+ let q = p.replace(/\\/g, "/");
99
+ if (win) q = q.toLowerCase();
100
+ return q.endsWith("/") ? q : q + "/";
101
+ }
102
+
103
+ export function slugFor(cwd, dataDir) {
104
+ try {
105
+ const { projects } = JSON.parse(readFileSync(join(dataDir, "hooks", "projects.json"), "utf8"));
106
+ const c = normPath(cwd);
107
+ let best = null;
108
+ for (const p of projects ?? []) {
109
+ if (!str(p?.path) || !str(p?.slug)) continue;
110
+ const base = normPath(p.path);
111
+ if (c.startsWith(base) && (!best || base.length > best.len)) best = { slug: p.slug, len: base.length };
112
+ }
113
+ return best ? best.slug : "default";
114
+ } catch { return "default"; }
115
+ }
116
+
117
+ function findGitDir(start) {
118
+ let dir = start;
119
+ for (let i = 0; i < 64; i++) {
120
+ const candidate = join(dir, ".git");
121
+ try {
122
+ const st = statSync(candidate);
123
+ if (st.isDirectory()) return candidate;
124
+ const m = readFileSync(candidate, "utf8").match(/^gitdir:\s*(.+)$/m);
125
+ if (m) return isAbsolute(m[1].trim()) ? m[1].trim() : resolve(dir, m[1].trim());
126
+ } catch {}
127
+ const parent = dirname(dir);
128
+ if (parent === dir) return null;
129
+ dir = parent;
130
+ }
131
+ return null;
132
+ }
133
+
134
+ export function gitBranch(cwd) {
135
+ const gitDir = findGitDir(cwd);
136
+ if (!gitDir) return null;
137
+ try {
138
+ const head = readFileSync(join(gitDir, "HEAD"), "utf8").trim();
139
+ const ref = head.match(/^ref:\s*refs\/heads\/(.+)$/);
140
+ if (ref) return { branch: ref[1], head: null };
141
+ return { branch: head.slice(0, 7), head };
142
+ } catch { return null; }
143
+ }
144
+
145
+ function stdinTimeoutMs(env) {
146
+ const n = Number(env.KONTEXTA_HOOK_STDIN_TIMEOUT_MS);
147
+ return Number.isInteger(n) && n > 0 ? n : 5000;
148
+ }
149
+
150
+ // Stream (not readFileSync) so a non-blocking or never-closing stdin can't hang or crash the agent's turn; gives up after the timeout.
151
+ function readStdin(timeoutMs) {
152
+ return new Promise((resolve) => {
153
+ const chunks = [];
154
+ let total = 0;
155
+ let done = false;
156
+ const finish = (v) => { if (done) return; done = true; clearTimeout(timer); resolve(v); };
157
+ const timer = setTimeout(() => finish(null), timeoutMs);
158
+ process.stdin.on("data", (c) => {
159
+ total += c.length;
160
+ if (total > MAX_STDIN_BYTES) { finish(null); return; }
161
+ chunks.push(c);
162
+ });
163
+ process.stdin.on("end", () => finish(Buffer.concat(chunks).toString("utf8")));
164
+ process.stdin.on("error", () => finish(null));
165
+ });
166
+ }
167
+
168
+ function commandString(v) {
169
+ if (str(v)) return v;
170
+ if (Array.isArray(v) && v.length > 0 && v.every(str)) return v.join(" ");
171
+ return null;
172
+ }
173
+
174
+ // ---------- adapters: agent payload → partial events ----------
175
+ function askUserQuestion(p, sid) {
176
+ const qs = Array.isArray(p.tool_input?.questions) ? p.tool_input.questions : [];
177
+ const resp = p.tool_response;
178
+ const answers = resp && typeof resp === "object" && resp.answers && typeof resp.answers === "object" ? resp.answers : null;
179
+ const questions = [];
180
+ qs.forEach((q, i) => {
181
+ const question = str(q?.question) ? q.question : str(q?.header) ? q.header : null;
182
+ if (!question) return;
183
+ let a = answers ? (answers[question] ?? answers[q?.header] ?? (Array.isArray(answers) ? answers[i] : undefined)) : undefined;
184
+ if (a !== undefined && typeof a !== "string") a = JSON.stringify(a);
185
+ questions.push(a === undefined ? { question } : { question, answer: a });
186
+ });
187
+ return questions.length ? [{ event: "agent_question", questions, sid }] : [];
188
+ }
189
+
190
+ function adaptClaudeCode(p) {
191
+ const sid = p.session_id;
192
+ switch (p.hook_event_name) {
193
+ case "UserPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
194
+ case "Stop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid }] : [];
195
+ case "SubagentStop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid, subagent: true }] : [];
196
+ case "PostToolUse":
197
+ if (p.tool_name === "Bash" && str(p.tool_input?.command)) return [{ event: "shell", command: p.tool_input.command, sid }];
198
+ if (p.tool_name === "AskUserQuestion") return askUserQuestion(p, sid);
199
+ return [];
200
+ default: return [];
201
+ }
202
+ }
203
+
204
+ function adaptGemini(p) {
205
+ const sid = p.session_id;
206
+ switch (p.hook_event_name) {
207
+ case "BeforeAgent": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
208
+ case "AfterAgent": return str(p.prompt_response) ? [{ event: "agent_reply", text: p.prompt_response, sid }] : [];
209
+ case "AfterTool": {
210
+ const c = p.tool_name === "run_shell_command" ? commandString(p.tool_input?.command) : null;
211
+ return c ? [{ event: "shell", command: c, sid }] : [];
212
+ }
213
+ default: return [];
214
+ }
215
+ }
216
+
217
+ const CODEX_SHELL_TOOLS = new Set(["shell", "local_shell", "exec_command", "bash", "container.exec"]);
218
+ function adaptCodex(p) {
219
+ const sid = p.session_id ?? p.turn_id;
220
+ switch (p.hook_event_name) {
221
+ case "UserPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
222
+ case "Stop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid }] : [];
223
+ case "SubagentStop": return str(p.last_assistant_message) ? [{ event: "agent_reply", text: p.last_assistant_message, sid, subagent: true }] : [];
224
+ case "PostToolUse": {
225
+ const c = CODEX_SHELL_TOOLS.has(p.tool_name) ? commandString(p.tool_input?.command ?? p.tool_input?.cmd) : null;
226
+ return c ? [{ event: "shell", command: c, sid }] : [];
227
+ }
228
+ default: return [];
229
+ }
230
+ }
231
+
232
+ // Copilot payloads carry no event name; the installer passes --event, and we infer from fields as a fallback.
233
+ function adaptCopilot(p, hint) {
234
+ const sid = p.sessionId;
235
+ const ev = hint ?? (str(p.prompt) ? "userPromptSubmitted" : str(p.response) ? "subagentStop" : str(p.toolName) ? "postToolUse" : "");
236
+ switch (ev) {
237
+ case "userPromptSubmitted": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
238
+ case "subagentStop": return str(p.response) ? [{ event: "agent_reply", text: p.response, sid, subagent: true }] : [];
239
+ case "postToolUse": {
240
+ if (p.toolName !== "bash" && p.toolName !== "powershell") return [];
241
+ let args = p.toolArgs;
242
+ if (str(args)) { try { args = JSON.parse(args); } catch { return []; } }
243
+ const c = commandString(args?.command);
244
+ return c ? [{ event: "shell", command: c, sid }] : [];
245
+ }
246
+ default: return [];
247
+ }
248
+ }
249
+
250
+ function adaptCursor(p) {
251
+ const sid = p.conversation_id;
252
+ switch (p.hook_event_name) {
253
+ case "beforeSubmitPrompt": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
254
+ case "afterAgentResponse": return str(p.text) ? [{ event: "agent_reply", text: p.text, sid }] : [];
255
+ case "afterShellExecution": return str(p.command) ? [{ event: "shell", command: p.command, sid }] : [];
256
+ default: return [];
257
+ }
258
+ }
259
+
260
+ function adaptWindsurf(p, hint) {
261
+ const sid = p.trajectory_id;
262
+ const info = p.tool_info ?? {};
263
+ switch (p.agent_action_name ?? hint) {
264
+ case "pre_user_prompt": return str(info.user_prompt) ? [{ event: "user_prompt", text: info.user_prompt, sid }] : [];
265
+ case "post_cascade_response": return str(info.response) ? [{ event: "agent_reply", text: info.response, sid }] : [];
266
+ case "post_run_command": return str(info.command_line) ? [{ event: "shell", command: info.command_line, sid }] : [];
267
+ default: return [];
268
+ }
269
+ }
270
+
271
+ // Kiro's payload has no session id, so sessions are keyed by working directory; the shell tool is `execute_bash` in older docs and `shell` in current agent configs.
272
+ function adaptKiro(p) {
273
+ const sid = p.session_id ?? p.cwd;
274
+ switch (p.hook_event_name) {
275
+ case "userPromptSubmit": return str(p.prompt) ? [{ event: "user_prompt", text: p.prompt, sid }] : [];
276
+ case "postToolUse": {
277
+ const c = p.tool_name === "execute_bash" || p.tool_name === "shell" ? commandString(p.tool_input?.command) : null;
278
+ return c ? [{ event: "shell", command: c, sid }] : [];
279
+ }
280
+ default: return [];
281
+ }
282
+ }
283
+
284
+ function adaptCline(p) {
285
+ const sid = p.taskId;
286
+ switch (p.hookName) {
287
+ case "UserPromptSubmit": return str(p.userPromptSubmit?.prompt) ? [{ event: "user_prompt", text: p.userPromptSubmit.prompt, sid }] : [];
288
+ case "PostToolUse": {
289
+ const t = p.postToolUse;
290
+ const c = t?.toolName === "execute_command" ? commandString(t.parameters?.command) : null;
291
+ return c ? [{ event: "shell", command: c, sid }] : [];
292
+ }
293
+ default: return [];
294
+ }
295
+ }
296
+
297
+ // The OpenCode plugin (installed by kontexta) already normalises; it sends { kontexta_event, session_id, text | command }.
298
+ function adaptOpenCode(p) {
299
+ const sid = p.session_id;
300
+ if (p.kontexta_event === "user_prompt" && str(p.text)) return [{ event: "user_prompt", text: p.text, sid }];
301
+ if (p.kontexta_event === "shell" && str(p.command)) return [{ event: "shell", command: p.command, sid }];
302
+ return [];
303
+ }
304
+
305
+ export const ADAPTERS = {
306
+ "claude-code": adaptClaudeCode,
307
+ gemini: adaptGemini,
308
+ codex: adaptCodex,
309
+ copilot: adaptCopilot,
310
+ cursor: adaptCursor,
311
+ windsurf: adaptWindsurf,
312
+ kiro: adaptKiro,
313
+ cline: adaptCline,
314
+ opencode: adaptOpenCode,
315
+ };
316
+
317
+ // ---------- normalise + write ----------
318
+ export function normalise(partials, ctx) {
319
+ const out = [];
320
+ for (const pe of partials) {
321
+ const ev = { ts: ctx.ts, agent: ctx.agent, sid: `${ctx.agent}:${str(pe.sid) ? pe.sid : "unknown"}`, event: pe.event, source: "hook", cwd: ctx.cwd };
322
+ if (ctx.branch) ev.branch = ctx.branch;
323
+ if (pe.subagent) ev.subagent = true;
324
+ if (pe.event === "user_prompt" || pe.event === "agent_reply") {
325
+ const max = pe.event === "user_prompt" ? ctx.caps.prompt_max_bytes : ctx.caps.reply_max_bytes;
326
+ const c = capUtf8(redactText(pe.text), max);
327
+ ev.text = c.text; if (c.truncated) { ev.truncated = true; ev.bytes = c.bytes; }
328
+ } else if (pe.event === "shell") {
329
+ const c = capUtf8(redactText(pe.command), ctx.caps.command_max_bytes);
330
+ ev.command = c.text; if (c.truncated) { ev.truncated = true; ev.bytes = c.bytes; }
331
+ } else if (pe.event === "agent_question") {
332
+ ev.questions = redactDeep(pe.questions);
333
+ } else {
334
+ continue;
335
+ }
336
+ out.push(ev);
337
+ }
338
+ return out;
339
+ }
340
+
341
+ function stateFile(dataDir, sid) {
342
+ return join(dataDir, "hooks", "state", `${sid.replace(/[^A-Za-z0-9._-]/g, "_")}.json`);
343
+ }
344
+
345
+ function gitContextIfChanged(dataDir, sid, git, ctx) {
346
+ if (!git?.branch) return [];
347
+ const f = stateFile(dataDir, sid);
348
+ let prev = null;
349
+ try { prev = JSON.parse(readFileSync(f, "utf8")).branch ?? null; } catch {}
350
+ if (prev === git.branch) return [];
351
+ try { mkdirSync(dirname(f), { recursive: true }); writeFileSync(f, JSON.stringify({ branch: git.branch, ts: ctx.ts })); } catch {}
352
+ const ev = { ts: ctx.ts, agent: ctx.agent, sid, event: "git_context", source: "hook", cwd: ctx.cwd, branch: git.branch };
353
+ if (git.head) ev.head = git.head;
354
+ return [ev];
355
+ }
356
+
357
+ function appendEvents(dataDir, slug, events) {
358
+ if (events.length === 0) return;
359
+ const day = events[0].ts.slice(0, 10);
360
+ const dir = join(dataDir, "knowledge", "journal", slug, "raw");
361
+ mkdirSync(dir, { recursive: true });
362
+ const file = join(dir, `${day}.jsonl`);
363
+ for (const ev of events) appendFileSync(file, JSON.stringify(ev) + "\n");
364
+ }
365
+
366
+ export async function run(argv = process.argv.slice(2), env = process.env) {
367
+ const agent = argValue(argv, "--agent");
368
+ const adapter = agent ? ADAPTERS[agent] : undefined;
369
+ if (!adapter) return;
370
+ const raw = await readStdin(stdinTimeoutMs(env));
371
+ if (raw === null || raw.trim() === "") return;
372
+ let payload;
373
+ try { payload = JSON.parse(raw); } catch { return; }
374
+ if (!payload || typeof payload !== "object") return;
375
+
376
+ const dataDir = resolveDataDir(argv, env);
377
+ const partials = adapter(payload, argValue(argv, "--event"));
378
+ if (partials.length === 0) return;
379
+
380
+ const cwd = str(payload.cwd) ? payload.cwd
381
+ : str(payload.tool_info?.cwd) ? payload.tool_info.cwd
382
+ : Array.isArray(payload.workspace_roots) && str(payload.workspace_roots[0]) ? payload.workspace_roots[0]
383
+ : Array.isArray(payload.workspaceRoots) && str(payload.workspaceRoots[0]) ? payload.workspaceRoots[0]
384
+ : process.cwd();
385
+ const git = gitBranch(cwd);
386
+ const ctx = { ts: new Date().toISOString(), agent, cwd, branch: git?.branch, caps: readCaps(dataDir) };
387
+ const events = normalise(partials, ctx);
388
+ if (events.length === 0) return;
389
+ const sid = events[0].sid;
390
+ appendEvents(dataDir, slugFor(cwd, dataDir), [...gitContextIfChanged(dataDir, sid, git, ctx), ...events]);
391
+ }
392
+
393
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
394
+ run()
395
+ .catch((e) => { try { process.stderr.write(`[kontexta-hooks] ${e?.message ?? e}\n`); } catch {} })
396
+ .finally(() => process.exit(0));
397
+ }
@@ -0,0 +1,14 @@
1
+ export { AGENTS, agentMeta, isAgentId } from "./agents.js";
2
+ export type { AgentId, AgentMeta } from "./agents.js";
3
+ export { syncAgentRows, listAgents, setEnabled, markInstalled, markUninstalled, markVerified, alerts } from "./registry.js";
4
+ export type { AgentRow } from "./registry.js";
5
+ export { EMITTER_VERSION, emitterVersionOf, emitterSourcePath, stagedEmitterPath, stageEmitter, emitterVersionOnDisk, syncProjectsSidecar, pruneHookState, } from "./stage.js";
6
+ export { installHooks, uninstallHooks, hooksStatus, reconcile } from "./install.js";
7
+ export type { HooksOpts, AgentHookOutcome, HookStatusRow } from "./install.js";
8
+ export { INSTALLERS, MalformedConfigError, emitCommand } from "./installers/index.js";
9
+ export type { Installer, InstallCtx, InstallResult, StatusResult } from "./installers/index.js";
10
+ export { detectInstallMode } from "./install-mode.js";
11
+ export type { InstallMode } from "./install-mode.js";
12
+ export { dockerInstallCommand, buildHooksBlock } from "./alerts.js";
13
+ export type { HooksAlert, HooksBlock } from "./alerts.js";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5H,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,cAAc,GACjJ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpF,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACtF,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { AGENTS, agentMeta, isAgentId } from "./agents.js";
2
+ export { syncAgentRows, listAgents, setEnabled, markInstalled, markUninstalled, markVerified, alerts } from "./registry.js";
3
+ export { EMITTER_VERSION, emitterVersionOf, emitterSourcePath, stagedEmitterPath, stageEmitter, emitterVersionOnDisk, syncProjectsSidecar, pruneHookState, } from "./stage.js";
4
+ export { installHooks, uninstallHooks, hooksStatus, reconcile } from "./install.js";
5
+ export { INSTALLERS, MalformedConfigError, emitCommand } from "./installers/index.js";
6
+ export { detectInstallMode } from "./install-mode.js";
7
+ export { dockerInstallCommand, buildHooksBlock } from "./alerts.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5H,OAAO,EACL,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,cAAc,GACjJ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type InstallMode = "docker" | "npm" | "source";
2
+ export declare function detectInstallMode(env?: NodeJS.ProcessEnv, fileExists?: (p: string) => boolean): InstallMode;
3
+ //# sourceMappingURL=install-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-mode.d.ts","sourceRoot":"","sources":["../../src/hooks/install-mode.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEtD,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,UAAU,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAoB,GAAG,WAAW,CAMpI"}
@@ -0,0 +1,15 @@
1
+ import { existsSync } from "node:fs";
2
+ export function detectInstallMode(env = process.env, fileExists = existsSync) {
3
+ const hint = env.KONTEXTA_INSTALL_HINT;
4
+ if (hint === "docker" || hint === "npm" || hint === "source")
5
+ return hint;
6
+ try {
7
+ if (fileExists("/.dockerenv"))
8
+ return "docker";
9
+ }
10
+ catch { /* unreadable root fs → keep probing */ }
11
+ if (env.npm_execpath?.includes("npx"))
12
+ return "npm";
13
+ return "source";
14
+ }
15
+ //# sourceMappingURL=install-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-mode.js","sourceRoot":"","sources":["../../src/hooks/install-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,MAAM,UAAU,iBAAiB,CAAC,MAAyB,OAAO,CAAC,GAAG,EAAE,aAAqC,UAAU;IACrH,MAAM,IAAI,GAAG,GAAG,CAAC,qBAAqB,CAAC;IACvC,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1E,IAAI,CAAC;QAAC,IAAI,UAAU,CAAC,aAAa,CAAC;YAAE,OAAO,QAAQ,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,uCAAuC,CAAC,CAAC;IACzG,IAAI,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACpD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type AgentRow } from "./registry.js";
2
+ export interface HooksOpts {
3
+ home?: string;
4
+ dataDir: string;
5
+ hostDataDir?: string;
6
+ nodeCmd?: string;
7
+ projectDir?: string;
8
+ dryRun?: boolean;
9
+ registry?: boolean;
10
+ }
11
+ export interface AgentHookOutcome {
12
+ agent: string;
13
+ ok: boolean;
14
+ changed: boolean;
15
+ path: string;
16
+ notes: string[];
17
+ error?: string;
18
+ }
19
+ export interface HookStatusRow extends AgentRow {
20
+ config_path: string | null;
21
+ config_present: boolean;
22
+ emitter_version_on_disk: string | null;
23
+ emitter_stale: boolean;
24
+ notes: string[];
25
+ }
26
+ export declare function installHooks(ids: string[], opts: HooksOpts): AgentHookOutcome[];
27
+ export declare function uninstallHooks(ids: string[], opts: HooksOpts): AgentHookOutcome[];
28
+ export declare function hooksStatus(opts: HooksOpts): HookStatusRow[];
29
+ export declare function reconcile(opts: HooksOpts): AgentHookOutcome[];
30
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/hooks/install.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8C,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAK1F,MAAM,WAAW,SAAS;IAAG,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;AAChK,MAAM,WAAW,gBAAgB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE;AACjI,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAYD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAgB/E;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAajF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,EAAE,CAgB5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,gBAAgB,EAAE,CAY7D"}