kontexta 5.0.0 → 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 (474) hide show
  1. package/bundle/standalone/CHANGELOG.md +9 -0
  2. package/bundle/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/bundle/standalone/apps/web/.next/app-build-manifest.json +102 -81
  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 +16 -16
  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 +6 -2
  271. package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +2 -0
  272. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks/emit.mjs +397 -0
  273. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts +13 -0
  274. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.d.ts.map +1 -0
  275. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js +27 -0
  276. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js.map +1 -0
  277. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts +3 -0
  278. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.d.ts.map +1 -0
  279. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js +141 -0
  280. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js.map +1 -0
  281. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +32 -5
  282. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -1
  283. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts.map +1 -1
  284. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +54 -8
  285. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -1
  286. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/010-agents.sql +14 -0
  287. package/bundle/standalone/node_modules/kontexta-mcp/package.json +2 -2
  288. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +2 -0
  289. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts +1 -0
  290. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts.map +1 -1
  291. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js +3 -0
  292. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js.map +1 -1
  293. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/010-agents.sql +14 -0
  294. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts +86 -0
  295. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts.map +1 -0
  296. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js +24 -0
  297. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js.map +1 -0
  298. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts +25 -0
  299. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts.map +1 -0
  300. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js +44 -0
  301. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js.map +1 -0
  302. package/bundle/standalone/node_modules/kxta-core/dist/hooks/emit.mjs +397 -0
  303. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts +14 -0
  304. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts.map +1 -0
  305. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js +8 -0
  306. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js.map +1 -0
  307. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts +3 -0
  308. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.d.ts.map +1 -0
  309. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js +15 -0
  310. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install-mode.js.map +1 -0
  311. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts +30 -0
  312. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.d.ts.map +1 -0
  313. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js +92 -0
  314. package/bundle/standalone/node_modules/kxta-core/dist/hooks/install.js.map +1 -0
  315. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts +2 -0
  316. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.d.ts.map +1 -0
  317. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js +13 -0
  318. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/claude-code.js.map +1 -0
  319. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts +3 -0
  320. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.d.ts.map +1 -0
  321. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js +51 -0
  322. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/cline.js.map +1 -0
  323. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts +2 -0
  324. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.d.ts.map +1 -0
  325. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js +16 -0
  326. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js.map +1 -0
  327. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts +3 -0
  328. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts.map +1 -0
  329. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js +41 -0
  330. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js.map +1 -0
  331. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts +13 -0
  332. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.d.ts.map +1 -0
  333. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js +76 -0
  334. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/flat.js.map +1 -0
  335. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts +2 -0
  336. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts.map +1 -0
  337. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js +12 -0
  338. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js.map +1 -0
  339. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts +16 -0
  340. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.d.ts.map +1 -0
  341. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js +75 -0
  342. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/grouped.js.map +1 -0
  343. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts +5 -0
  344. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts.map +1 -0
  345. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js +19 -0
  346. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js.map +1 -0
  347. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts +13 -0
  348. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts.map +1 -0
  349. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js +80 -0
  350. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js.map +1 -0
  351. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts +3 -0
  352. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.d.ts.map +1 -0
  353. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js +76 -0
  354. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/opencode.js.map +1 -0
  355. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts +29 -0
  356. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.d.ts.map +1 -0
  357. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js +2 -0
  358. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/types.js.map +1 -0
  359. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts +20 -0
  360. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts.map +1 -0
  361. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js +58 -0
  362. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js.map +1 -0
  363. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts +18 -0
  364. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.d.ts.map +1 -0
  365. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js +115 -0
  366. package/bundle/standalone/node_modules/kxta-core/dist/hooks/stage.js.map +1 -0
  367. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +2 -1
  368. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -1
  369. package/bundle/standalone/node_modules/kxta-core/dist/index.js +2 -1
  370. package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -1
  371. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts +5 -0
  372. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts.map +1 -1
  373. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +136 -52
  374. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -1
  375. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js +2 -2
  376. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js.map +1 -1
  377. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts +4 -0
  378. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts.map +1 -1
  379. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js.map +1 -1
  380. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts +1 -0
  381. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts.map +1 -1
  382. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js +69 -2
  383. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js.map +1 -1
  384. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts +4 -0
  385. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts.map +1 -1
  386. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js +14 -0
  387. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js.map +1 -1
  388. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +14 -1
  389. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -1
  390. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +107 -20
  391. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -1
  392. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +15 -2
  393. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -1
  394. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -1
  395. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +9 -0
  396. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -1
  397. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts.map +1 -1
  398. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js +14 -3
  399. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js.map +1 -1
  400. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts +1 -0
  401. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.d.ts.map +1 -1
  402. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js +23 -3
  403. package/bundle/standalone/node_modules/kxta-core/dist/reports/sanitize.js.map +1 -1
  404. package/bundle/standalone/node_modules/kxta-core/package.json +2 -2
  405. package/bundle/standalone/node_modules/kxta-publish/package.json +3 -3
  406. package/bundle/standalone/package.json +2 -2
  407. package/dist/{mcp-DGMGR3MZ.js → chunk-C4XU73GP.js} +2 -0
  408. package/dist/{doctor-NTVE43EI.js → doctor-HQBEQUUQ.js} +10 -1
  409. package/dist/hooks-6RQ5CCTW.js +22 -0
  410. package/dist/index.js +10 -4
  411. package/dist/mcp-VGISMLKH.js +9 -0
  412. package/dist/{start-66WKQRN5.js → start-RJVUJT4B.js} +9 -0
  413. package/package.json +2 -2
  414. package/bundle/standalone/apps/web/.next/static/chunks/1480-3e4f4a95f11429a9.js +0 -1
  415. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-f5e054069fb68dd7.js +0 -1
  416. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-f5e054069fb68dd7.js +0 -1
  417. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-f5e054069fb68dd7.js +0 -1
  418. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-f5e054069fb68dd7.js +0 -1
  419. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-f5e054069fb68dd7.js +0 -1
  420. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-f5e054069fb68dd7.js +0 -1
  421. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-f5e054069fb68dd7.js +0 -1
  422. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-f5e054069fb68dd7.js +0 -1
  423. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-f5e054069fb68dd7.js +0 -1
  424. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-f5e054069fb68dd7.js +0 -1
  425. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-f5e054069fb68dd7.js +0 -1
  426. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-f5e054069fb68dd7.js +0 -1
  427. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-f5e054069fb68dd7.js +0 -1
  428. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-f5e054069fb68dd7.js +0 -1
  429. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-f5e054069fb68dd7.js +0 -1
  430. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-f5e054069fb68dd7.js +0 -1
  431. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-f5e054069fb68dd7.js +0 -1
  432. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-f5e054069fb68dd7.js +0 -1
  433. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-f5e054069fb68dd7.js +0 -1
  434. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-f5e054069fb68dd7.js +0 -1
  435. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-f5e054069fb68dd7.js +0 -1
  436. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-f5e054069fb68dd7.js +0 -1
  437. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-f5e054069fb68dd7.js +0 -1
  438. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-f5e054069fb68dd7.js +0 -1
  439. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-f5e054069fb68dd7.js +0 -1
  440. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-f5e054069fb68dd7.js +0 -1
  441. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-f5e054069fb68dd7.js +0 -1
  442. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-f5e054069fb68dd7.js +0 -1
  443. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-f5e054069fb68dd7.js +0 -1
  444. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-f5e054069fb68dd7.js +0 -1
  445. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-f5e054069fb68dd7.js +0 -1
  446. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-f5e054069fb68dd7.js +0 -1
  447. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-f5e054069fb68dd7.js +0 -1
  448. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-f5e054069fb68dd7.js +0 -1
  449. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-f5e054069fb68dd7.js +0 -1
  450. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-f5e054069fb68dd7.js +0 -1
  451. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-f5e054069fb68dd7.js +0 -1
  452. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-f5e054069fb68dd7.js +0 -1
  453. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-f5e054069fb68dd7.js +0 -1
  454. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-f5e054069fb68dd7.js +0 -1
  455. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-f5e054069fb68dd7.js +0 -1
  456. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-f5e054069fb68dd7.js +0 -1
  457. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-f5e054069fb68dd7.js +0 -1
  458. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-f5e054069fb68dd7.js +0 -1
  459. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-f5e054069fb68dd7.js +0 -1
  460. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-f5e054069fb68dd7.js +0 -1
  461. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-f5e054069fb68dd7.js +0 -1
  462. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-f5e054069fb68dd7.js +0 -1
  463. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-f5e054069fb68dd7.js +0 -1
  464. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-f5e054069fb68dd7.js +0 -1
  465. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-f5e054069fb68dd7.js +0 -1
  466. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-f5e054069fb68dd7.js +0 -1
  467. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-f5e054069fb68dd7.js +0 -1
  468. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-f5e054069fb68dd7.js +0 -1
  469. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-f5e054069fb68dd7.js +0 -1
  470. package/bundle/standalone/apps/web/.next/static/chunks/app/page-98057182511ba7e4.js +0 -1
  471. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-f5e054069fb68dd7.js +0 -1
  472. package/bundle/standalone/apps/web/.next/static/css/35a6a6dfd2c31933.css +0 -3
  473. package/bundle/standalone/apps/web/.next/static/hUyNKiBOk3HaC0S0gE_N8/_buildManifest.js +0 -1
  474. /package/bundle/standalone/apps/web/.next/static/{hUyNKiBOk3HaC0S0gE_N8 → IxgiSiK05GtQGxU41f-Mx}/_ssgManifest.js +0 -0
@@ -0,0 +1,51 @@
1
+ import { join } from "node:path";
2
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync, chmodSync } from "node:fs";
3
+ import { emitCommand } from "./json-config.js";
4
+ const MARK = "# kontexta-hooks";
5
+ const HOOKS = ["UserPromptSubmit", "PostToolUse"];
6
+ const dirOf = (ctx) => join(ctx.home, "Documents", "Cline", "Hooks");
7
+ const shim = (ctx) => `#!/bin/sh\n${MARK}\nexec ${emitCommand(ctx, "cline")}\n`;
8
+ const ours = (p) => existsSync(p) && readFileSync(p, "utf8").includes(MARK);
9
+ export const clineInstaller = {
10
+ id: "cline",
11
+ configPath: (ctx) => dirOf(ctx),
12
+ install(ctx) {
13
+ const notes = ["Cline has no turn-end hook yet; prompts and shell commands are captured, replies are not."];
14
+ let changed = false;
15
+ if (!ctx.dryRun)
16
+ mkdirSync(dirOf(ctx), { recursive: true });
17
+ for (const name of HOOKS) {
18
+ const p = join(dirOf(ctx), name);
19
+ if (existsSync(p) && !ours(p)) {
20
+ notes.push(`${name}: an existing non-kontexta hook is present; left untouched.`);
21
+ continue;
22
+ }
23
+ const body = shim(ctx);
24
+ if (existsSync(p) && readFileSync(p, "utf8") === body)
25
+ continue;
26
+ if (!ctx.dryRun) {
27
+ writeFileSync(p, body, "utf8");
28
+ chmodSync(p, 0o755);
29
+ }
30
+ changed = true;
31
+ }
32
+ return { agent: "cline", path: dirOf(ctx), changed, notes };
33
+ },
34
+ uninstall(ctx) {
35
+ let changed = false;
36
+ for (const name of HOOKS) {
37
+ const p = join(dirOf(ctx), name);
38
+ if (ours(p)) {
39
+ if (!ctx.dryRun)
40
+ unlinkSync(p);
41
+ changed = true;
42
+ }
43
+ }
44
+ return { agent: "cline", path: dirOf(ctx), changed, notes: [] };
45
+ },
46
+ status(ctx) {
47
+ const installed = HOOKS.every((name) => ours(join(dirOf(ctx), name)));
48
+ return { agent: "cline", path: dirOf(ctx), installed, notes: [] };
49
+ },
50
+ };
51
+ //# sourceMappingURL=cline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cline.js","sourceRoot":"","sources":["../../../src/hooks/installers/cline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,IAAI,GAAG,kBAAkB,CAAC;AAChC,MAAM,KAAK,GAAG,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AAClD,MAAM,KAAK,GAAG,CAAC,GAAe,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE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ourceRoot":"","sources":["../../../src/hooks/installers/codex.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gCAazB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { groupedInstaller } from "./grouped.js";
2
+ export const codexInstaller = groupedInstaller({
3
+ id: "codex",
4
+ relPath: [".codex", "hooks.json"],
5
+ events: [
6
+ { name: "UserPromptSubmit" },
7
+ { name: "Stop" },
8
+ { name: "SubagentStop" },
9
+ { name: "PostToolUse", matcher: "shell|local_shell|exec_command" },
10
+ ],
11
+ notes: [
12
+ "Codex only runs hooks you have trusted: open Codex and run /hooks to review and trust the kontexta hooks (trust is tied to the hook's content, so re-trust after reinstalling or moving node).",
13
+ "Older Codex versions may also need `[features]\\ncodex_hooks = true` in ~/.codex/config.toml.",
14
+ ],
15
+ });
16
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/hooks/installers/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;IAC7C,EAAE,EAAE,OAAO;IACX,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;IACjC,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,kBAAkB,EAAE;QAC5B,EAAE,IAAI,EAAE,MAAM,EAAE;QAChB,EAAE,IAAI,EAAE,cAAc,EAAE;QACxB,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,gCAAgC,EAAE;KACnE;IACD,KAAK,EAAE;QACL,gMAAgM;QAChM,+FAA+F;KAChG;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Installer } from "./types.js";
2
+ export declare const copilotInstaller: Installer;
3
+ //# sourceMappingURL=copilot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/copilot.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AAQxD,eAAO,MAAM,gBAAgB,EAAE,SAyB9B,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { join } from "node:path";
2
+ import { existsSync, unlinkSync } from "node:fs";
3
+ import { emitCommand, isOwned, readJsonConfig, writeJsonConfig } from "./json-config.js";
4
+ const EVENTS = ["userPromptSubmitted", "subagentStop", "postToolUse"];
5
+ // Copilot reads $COPILOT_HOME/hooks when set; a container host install can't see the host's environment, so it always uses <home>/.copilot.
6
+ const baseDir = (ctx) => (!ctx.hostDataDir && process.env.COPILOT_HOME ? process.env.COPILOT_HOME : join(ctx.home, ".copilot"));
7
+ const configPath = (ctx) => join(baseDir(ctx), "hooks", "kontexta.json");
8
+ export const copilotInstaller = {
9
+ id: "copilot",
10
+ configPath,
11
+ install(ctx) {
12
+ const path = configPath(ctx);
13
+ const hooks = {};
14
+ for (const ev of EVENTS)
15
+ hooks[ev] = [{ type: "command", command: emitCommand(ctx, "copilot", ev), timeoutSec: 5 }];
16
+ const changed = writeJsonConfig(path, { version: 1, hooks }, ctx.dryRun);
17
+ return { agent: "copilot", path, changed, notes: ["Copilot main-agent replies are not exposed to hooks yet (agentStop carries only a transcript path); subagent replies, prompts and shell commands are captured."] };
18
+ },
19
+ uninstall(ctx) {
20
+ const path = configPath(ctx);
21
+ if (!existsSync(path))
22
+ return { agent: "copilot", path, changed: false, notes: [] };
23
+ if (!ctx.dryRun)
24
+ unlinkSync(path);
25
+ return { agent: "copilot", path, changed: true, notes: [] };
26
+ },
27
+ status(ctx) {
28
+ const path = configPath(ctx);
29
+ let installed = false;
30
+ const notes = [];
31
+ try {
32
+ const hooks = readJsonConfig(path).hooks;
33
+ installed = EVENTS.every((ev) => (hooks?.[ev] ?? []).some((h) => isOwned(h?.command) || isOwned(h?.bash)));
34
+ }
35
+ catch (e) {
36
+ notes.push(e.message);
37
+ }
38
+ return { agent: "copilot", path, installed, notes };
39
+ },
40
+ };
41
+ //# sourceMappingURL=copilot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../../src/hooks/installers/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEzF,MAAM,MAAM,GAAG,CAAC,qBAAqB,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;AACtE,4IAA4I;AAC5I,MAAM,OAAO,GAAG,CAAC,GAAe,EAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;AACpJ,MAAM,UAAU,GAAG,CAAC,GAAe,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,EAAE,EAAE,SAAS;IACb,UAAU;IACV,OAAO,CAAC,GAAG;QACT,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAC7B,MAAM,KAAK,GAA4B,EAAE,CAAC;QAC1C,KAAK,MAAM,EAAE,IAAI,MAAM;YAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;QACpH,MAAM,OAAO,GAAG,e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C,OAAO,CAAC,CAAC;QAAC,CAAC;QACjD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACtD,CAAC;CACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { AgentId } from "../agents.js";
2
+ import type { Installer } from "./types.js";
3
+ export interface FlatSpec {
4
+ id: AgentId;
5
+ relPath: string[];
6
+ events: string[];
7
+ hinted: boolean;
8
+ version?: number;
9
+ }
10
+ export declare function flatInstaller(spec: FlatSpec): Installer;
11
+ export declare const cursorInstaller: Installer;
12
+ export declare const windsurfInstaller: Installer;
13
+ //# sourceMappingURL=flat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/flat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AAGxD,MAAM,WAAW,QAAQ;IAAG,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE;AAIjH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAiDvD;AAED,eAAO,MAAM,eAAe,WAG1B,CAAC;AAEH,eAAO,MAAM,iBAAiB,WAG5B,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { join } from "node:path";
2
+ import { emitCommand, isOwned, readJsonConfig, writeJsonConfig, MalformedConfigError } from "./json-config.js";
3
+ export function flatInstaller(spec) {
4
+ const configPath = (ctx) => join(ctx.home, ...spec.relPath);
5
+ const hooksOf = (cfg, path) => {
6
+ if (cfg.hooks === undefined)
7
+ return {};
8
+ if (typeof cfg.hooks !== "object" || cfg.hooks === null || Array.isArray(cfg.hooks))
9
+ throw new MalformedConfigError(path, '"hooks" is not an object');
10
+ return { ...cfg.hooks };
11
+ };
12
+ const strip = (hooks) => {
13
+ const out = {};
14
+ for (const [ev, list] of Object.entries(hooks)) {
15
+ if (!Array.isArray(list)) {
16
+ out[ev] = list;
17
+ continue;
18
+ }
19
+ const kept = list.filter((e) => !isOwned(e?.command));
20
+ if (kept.length > 0)
21
+ out[ev] = kept;
22
+ }
23
+ return out;
24
+ };
25
+ return {
26
+ id: spec.id,
27
+ configPath,
28
+ install(ctx) {
29
+ const path = configPath(ctx);
30
+ const cfg = readJsonConfig(path);
31
+ const hooks = strip(hooksOf(cfg, path));
32
+ for (const ev of spec.events) {
33
+ hooks[ev] = [...(hooks[ev] ?? []), { command: emitCommand(ctx, spec.id, spec.hinted ? ev : undefined) }];
34
+ }
35
+ const next = { ...cfg, hooks };
36
+ if (spec.version !== undefined && next.version === undefined)
37
+ next.version = spec.version;
38
+ return { agent: spec.id, path, changed: writeJsonConfig(path, next, ctx.dryRun), notes: [] };
39
+ },
40
+ uninstall(ctx) {
41
+ const path = configPath(ctx);
42
+ const cfg = readJsonConfig(path);
43
+ if (!cfg.hooks)
44
+ return { agent: spec.id, path, changed: false, notes: [] };
45
+ const hooks = strip(hooksOf(cfg, path));
46
+ const next = { ...cfg };
47
+ if (Object.keys(hooks).length > 0)
48
+ next.hooks = hooks;
49
+ else
50
+ delete next.hooks;
51
+ return { agent: spec.id, path, changed: writeJsonConfig(path, next, ctx.dryRun), notes: [] };
52
+ },
53
+ status(ctx) {
54
+ const path = configPath(ctx);
55
+ let installed = false;
56
+ const notes = [];
57
+ try {
58
+ const hooks = hooksOf(readJsonConfig(path), path);
59
+ installed = spec.events.every((ev) => (hooks[ev] ?? []).some((e) => isOwned(e?.command)));
60
+ }
61
+ catch (e) {
62
+ notes.push(e.message);
63
+ }
64
+ return { agent: spec.id, path, installed, notes };
65
+ },
66
+ };
67
+ }
68
+ export const cursorInstaller = flatInstaller({
69
+ id: "cursor", relPath: [".cursor", "hooks.json"], version: 1, hinted: false,
70
+ events: ["beforeSubmitPrompt", "afterAgentResponse", "afterShellExecution"],
71
+ });
72
+ export const windsurfInstaller = flatInstaller({
73
+ id: "windsurf", relPath: [".codeium", "windsurf", "hooks.json"], hinted: true,
74
+ events: ["pre_user_prompt", "post_cascade_response", "post_run_command"],
75
+ });
76
+ //# sourceMappingURL=flat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flat.js","sourceRoot":"","sources":["../../../src/hooks/installers/flat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAM/G,MAAM,UAAU,aAAa,CAAC,IAAc;IAC1C,MAAM,UAAU,GAAG,CAAC,GAAe,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IACxE,MAAM,OAAO,GAAG,CAAC,GAA4B,EAAE,IAAY,EAA2B,EAAE;QACtF,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;QACvC,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;QACtJ,OAAO,EAAE,GAAI,GAAG,CAAC,KAAiC,EAAE,CAAC;IACvD,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,KAA8B,EAAE,EAAE;QAC/C,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CA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;gBAClD,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAE,KAAK,CAAC,EAAE,CAAyB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YACrH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBAAC,KAAK,CAAC,IAAI,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;YAAC,CAAC;YACjD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACpD,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;IAC3C,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK;IAC3E,MAAM,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,CAAC;CAC5E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;IAC7C,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI;IAC7E,MAAM,EAAE,CAAC,iBAAiB,EAAE,uBAAuB,EAAE,kBAAkB,CAAC;CACzE,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const geminiInstaller: import("./types.js").Installer;
2
+ //# sourceMappingURL=gemini.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/gemini.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,gCAS1B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { groupedInstaller } from "./grouped.js";
2
+ export const geminiInstaller = groupedInstaller({
3
+ id: "gemini",
4
+ relPath: [".gemini", "settings.json"],
5
+ events: [
6
+ { name: "BeforeAgent" },
7
+ { name: "AfterAgent" },
8
+ { name: "AfterTool", matcher: "run_shell_command" },
9
+ ],
10
+ notes: ["Gemini parses hook stdout as JSON; the emitter prints nothing, so no action needed."],
11
+ });
12
+ //# sourceMappingURL=gemini.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../../src/hooks/installers/gemini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;IAC9C,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;IACrC,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,EAAE;KACpD;IACD,KAAK,EAAE,CAAC,qFAAqF,CAAC;CAC/F,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AgentId } from "../agents.js";
2
+ import type { Installer } from "./types.js";
3
+ export interface GroupedSpec {
4
+ id: AgentId;
5
+ relPath: string[];
6
+ events: Array<{
7
+ name: string;
8
+ matcher?: string;
9
+ event?: string;
10
+ }>;
11
+ timeoutKey?: string;
12
+ timeoutValue?: number;
13
+ notes?: string[];
14
+ }
15
+ export declare function groupedInstaller(spec: GroupedSpec): Installer;
16
+ //# sourceMappingURL=grouped.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grouped.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/grouped.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AAGxD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAiBD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CA4C7D"}
@@ -0,0 +1,75 @@
1
+ import { join } from "node:path";
2
+ import { emitCommand, isOwned, readJsonConfig, writeJsonConfig, MalformedConfigError } from "./json-config.js";
3
+ function stripOwned(hooks) {
4
+ const out = {};
5
+ for (const [ev, groups] of Object.entries(hooks)) {
6
+ if (!Array.isArray(groups)) {
7
+ out[ev] = groups;
8
+ continue;
9
+ }
10
+ const kept = groups.map((g) => {
11
+ if (!g || !Array.isArray(g.hooks))
12
+ return g;
13
+ return { ...g, hooks: g.hooks.filter((h) => !isOwned(h?.command)) };
14
+ }).filter((g) => !g || !Array.isArray(g.hooks) || g.hooks.length > 0);
15
+ if (kept.length > 0)
16
+ out[ev] = kept;
17
+ }
18
+ return out;
19
+ }
20
+ export function groupedInstaller(spec) {
21
+ const configPath = (ctx) => join(ctx.home, ...spec.relPath);
22
+ const hooksOf = (cfg, path) => {
23
+ if (cfg.hooks === undefined)
24
+ return {};
25
+ if (typeof cfg.hooks !== "object" || cfg.hooks === null || Array.isArray(cfg.hooks))
26
+ throw new MalformedConfigError(path, '"hooks" is not an object');
27
+ return cfg.hooks;
28
+ };
29
+ return {
30
+ id: spec.id,
31
+ configPath,
32
+ install(ctx) {
33
+ const path = configPath(ctx);
34
+ const cfg = readJsonConfig(path);
35
+ const hooks = stripOwned(hooksOf(cfg, path));
36
+ for (const e of spec.events) {
37
+ const entry = { type: "command", command: emitCommand(ctx, spec.id, e.event) };
38
+ if (spec.timeoutKey)
39
+ entry[spec.timeoutKey] = spec.timeoutValue ?? 5;
40
+ const group = e.matcher ? { matcher: e.matcher, hooks: [entry] } : { hooks: [entry] };
41
+ hooks[e.name] = [...(hooks[e.name] ?? []), group];
42
+ }
43
+ const changed = writeJsonConfig(path, { ...cfg, hooks }, ctx.dryRun);
44
+ return { agent: spec.id, path, changed, notes: [...(spec.notes ?? [])] };
45
+ },
46
+ uninstall(ctx) {
47
+ const path = configPath(ctx);
48
+ const cfg = readJsonConfig(path);
49
+ if (!cfg.hooks)
50
+ return { agent: spec.id, path, changed: false, notes: [] };
51
+ const hooks = stripOwned(hooksOf(cfg, path));
52
+ const next = { ...cfg };
53
+ if (Object.keys(hooks).length > 0)
54
+ next.hooks = hooks;
55
+ else
56
+ delete next.hooks;
57
+ const changed = writeJsonConfig(path, next, ctx.dryRun);
58
+ return { agent: spec.id, path, changed, notes: [] };
59
+ },
60
+ status(ctx) {
61
+ const path = configPath(ctx);
62
+ let installed = false;
63
+ const notes = [];
64
+ try {
65
+ const hooks = hooksOf(readJsonConfig(path), path);
66
+ installed = spec.events.every((e) => (hooks[e.name] ?? []).some((g) => (g?.hooks ?? []).some((h) => isOwned(h?.command))));
67
+ }
68
+ catch (e) {
69
+ notes.push(e.message);
70
+ }
71
+ return { agent: spec.id, path, installed, notes };
72
+ },
73
+ };
74
+ }
75
+ //# sourceMappingURL=grouped.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grouped.js","sourceRoot":"","sources":["../../../src/hooks/installers/grouped.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CA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,CAAC;YAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;YAAC,MAAM,KAAK,GAAa,EAAE,CAAC;YAClD,IAAI,CAAC;gBACH,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;gBAClD,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAyB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YACtJ,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBAAC,KAAK,CAAC,IAAI,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;YAAC,CAAC;YACjD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QACpD,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Installer } from "./types.js";
2
+ export declare const INSTALLERS: Record<string, Installer>;
3
+ export type { Installer, InstallCtx, InstallResult, StatusResult } from "./types.js";
4
+ export { MalformedConfigError, emitCommand, isOwned } from "./json-config.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAS5C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAShD,CAAC;AACF,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { claudeCodeInstaller } from "./claude-code.js";
2
+ import { geminiInstaller } from "./gemini.js";
3
+ import { codexInstaller } from "./codex.js";
4
+ import { cursorInstaller, windsurfInstaller } from "./flat.js";
5
+ import { copilotInstaller } from "./copilot.js";
6
+ import { clineInstaller } from "./cline.js";
7
+ import { opencodeInstaller } from "./opencode.js";
8
+ export const INSTALLERS = {
9
+ "claude-code": claudeCodeInstaller,
10
+ gemini: geminiInstaller,
11
+ codex: codexInstaller,
12
+ copilot: copilotInstaller,
13
+ cursor: cursorInstaller,
14
+ windsurf: windsurfInstaller,
15
+ cline: clineInstaller,
16
+ opencode: opencodeInstaller,
17
+ };
18
+ export { MalformedConfigError, emitCommand, isOwned } from "./json-config.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/installers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAA8B;IACnD,aAAa,EAAE,mBAAmB;IAClC,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,cAAc;IACrB,OAAO,EAAE,gBAAgB;IACzB,MAAM,EAAE,eAAe;IACvB,QAAQ,EAAE,iBAAiB;IAC3B,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,iBAAiB;CAC5B,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { InstallCtx } from "./types.js";
2
+ export declare const OWNED_MARK = "hooks/emit.mjs";
3
+ export declare class MalformedConfigError extends Error {
4
+ path: string;
5
+ constructor(path: string, cause: unknown);
6
+ }
7
+ export declare const hostDirOf: (ctx: InstallCtx) => string;
8
+ export declare const nodeCmdOf: (ctx: InstallCtx) => string;
9
+ export declare function emitCommand(ctx: InstallCtx, agent: string, event?: string): string;
10
+ export declare function isOwned(command: unknown): boolean;
11
+ export declare function readJsonConfig(path: string): Record<string, unknown>;
12
+ export declare function writeJsonConfig(path: string, value: unknown, dryRun?: boolean): boolean;
13
+ //# sourceMappingURL=json-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-config.d.ts","sourceRoot":"","sources":["../../../src/hooks/installers/json-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAE3C,qBAAa,oBAAqB,SAAQ,KAAK;IAC1B,IAAI,EAAE,MAAM;gBAAZ,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAGhD;AAID,eAAO,MAAM,SAAS,GAAI,KAAK,UAAU,KAAG,MAAwC,CAAC;AAGrF,eAAO,MAAM,SAAS,GAAI,KAAK,UAAU,KAAG,MAAsE,CAAC;AAEnH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlF;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAEjD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWpE;AAWD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,OAAO,CAiBrF"}
@@ -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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I,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,MAAM,IAAI,GAAG,mBAAmB,CAAC;AACjC,MAAM,UAAU,GAAG,CAAC,GAAe,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAExG,SAAS,YAAY,CAAC,GAAe;IACnC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,OAAO,GAAG,IAAI;;;;eAID,IAAI;mBACA,OAAO;eACX,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAuBlB,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,EAAE,EAAE,UAAU;IACd,UAAU;IACV,OAAO,CAAC,GAAG;QACT,MAAM,IAAI,GAAG,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