kontexta 5.1.3 → 5.2.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 (436) hide show
  1. package/bundle/standalone/CHANGELOG.md +18 -0
  2. package/bundle/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/bundle/standalone/apps/web/.next/app-build-manifest.json +91 -84
  4. package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +11 -10
  5. package/bundle/standalone/apps/web/.next/build-manifest.json +2 -2
  6. package/bundle/standalone/apps/web/.next/prerender-manifest.json +3 -3
  7. package/bundle/standalone/apps/web/.next/routes-manifest.json +8 -0
  8. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  9. package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  11. package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +2 -2
  12. package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -1
  13. package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -1
  14. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js +1 -1
  15. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js.nft.json +1 -1
  16. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route_client-reference-manifest.js +1 -1
  17. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route.js +1 -0
  18. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route.js.nft.json +1 -0
  19. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route_client-reference-manifest.js +1 -0
  20. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js +1 -1
  21. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
  22. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -1
  23. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js +1 -1
  24. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js.nft.json +1 -1
  25. package/bundle/standalone/apps/web/.next/server/app/api/agents/route_client-reference-manifest.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.nft.json +1 -1
  31. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
  32. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  33. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  34. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -1
  35. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -1
  36. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -1
  37. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -1
  38. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -1
  39. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -1
  40. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -1
  41. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -1
  42. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -1
  43. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -1
  44. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -1
  45. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -1
  46. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -1
  47. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -1
  48. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -1
  49. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -1
  50. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -1
  51. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -1
  52. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -1
  53. package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -1
  54. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -1
  55. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -1
  56. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -1
  57. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -1
  58. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js.nft.json +1 -1
  59. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route_client-reference-manifest.js +1 -1
  60. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -1
  61. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -1
  62. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js.nft.json +1 -1
  63. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route_client-reference-manifest.js +1 -1
  64. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -1
  65. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -1
  66. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -1
  67. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -1
  68. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -1
  69. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -1
  70. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -1
  71. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -1
  72. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -1
  73. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -1
  74. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
  75. package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  76. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -1
  77. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -1
  78. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -1
  79. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -1
  80. package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -1
  81. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -1
  82. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -1
  83. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -1
  84. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -1
  85. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -1
  86. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -1
  87. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -1
  88. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -1
  89. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -1
  90. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -1
  91. package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  92. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +9 -9
  93. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -1
  94. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -1
  95. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -1
  96. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -1
  97. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -1
  98. package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -1
  99. package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -1
  100. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -1
  101. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -1
  102. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -1
  103. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -1
  104. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -1
  105. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -1
  106. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -1
  107. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -1
  108. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -1
  109. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -1
  110. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  111. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  112. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -1
  113. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -1
  114. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -1
  115. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -1
  116. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -1
  117. package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  118. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -1
  119. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -1
  120. package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -1
  121. package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -1
  122. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -1
  123. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -1
  124. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -1
  125. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -1
  126. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js.nft.json +1 -1
  127. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route_client-reference-manifest.js +1 -1
  128. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -1
  129. package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  130. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -1
  131. package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  132. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
  133. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route_client-reference-manifest.js +1 -1
  134. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route.js.nft.json +1 -1
  135. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route_client-reference-manifest.js +1 -1
  136. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -1
  137. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -1
  138. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
  139. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +1 -1
  140. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -1
  141. package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -1
  142. package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  143. package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -1
  144. package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -1
  145. package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  146. package/bundle/standalone/apps/web/.next/server/app/page.js +4 -4
  147. package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  148. package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  149. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -1
  150. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -1
  151. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +2 -2
  152. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +2 -2
  153. package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +11 -10
  154. package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -1
  155. package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -1
  156. package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -1
  157. package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -1
  158. package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -1
  159. package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  160. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-e920054b7eb00274.js +1 -0
  161. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-e920054b7eb00274.js +1 -0
  162. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/mcp/route-e920054b7eb00274.js +1 -0
  163. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-e920054b7eb00274.js +1 -0
  164. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-e920054b7eb00274.js +1 -0
  165. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-e920054b7eb00274.js +1 -0
  166. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-e920054b7eb00274.js +1 -0
  167. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-e920054b7eb00274.js +1 -0
  168. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-e920054b7eb00274.js +1 -0
  169. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-e920054b7eb00274.js +1 -0
  170. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-e920054b7eb00274.js +1 -0
  171. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-e920054b7eb00274.js +1 -0
  172. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-e920054b7eb00274.js +1 -0
  173. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-e920054b7eb00274.js +1 -0
  174. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-e920054b7eb00274.js +1 -0
  175. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-e920054b7eb00274.js +1 -0
  176. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-e920054b7eb00274.js +1 -0
  177. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-e920054b7eb00274.js +1 -0
  178. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-e920054b7eb00274.js +1 -0
  179. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-e920054b7eb00274.js +1 -0
  180. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-e920054b7eb00274.js +1 -0
  181. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-e920054b7eb00274.js +1 -0
  182. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-e920054b7eb00274.js +1 -0
  183. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-e920054b7eb00274.js +1 -0
  184. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-e920054b7eb00274.js +1 -0
  185. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-e920054b7eb00274.js +1 -0
  186. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-e920054b7eb00274.js +1 -0
  187. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-e920054b7eb00274.js +1 -0
  188. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-e920054b7eb00274.js +1 -0
  189. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-e920054b7eb00274.js +1 -0
  190. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-e920054b7eb00274.js +1 -0
  191. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-e920054b7eb00274.js +1 -0
  192. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-e920054b7eb00274.js +1 -0
  193. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-e920054b7eb00274.js +1 -0
  194. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-e920054b7eb00274.js +1 -0
  195. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-e920054b7eb00274.js +1 -0
  196. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-e920054b7eb00274.js +1 -0
  197. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-e920054b7eb00274.js +1 -0
  198. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-e920054b7eb00274.js +1 -0
  199. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-e920054b7eb00274.js +1 -0
  200. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-e920054b7eb00274.js +1 -0
  201. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-e920054b7eb00274.js +1 -0
  202. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-e920054b7eb00274.js +1 -0
  203. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-e920054b7eb00274.js +1 -0
  204. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-e920054b7eb00274.js +1 -0
  205. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-e920054b7eb00274.js +1 -0
  206. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-e920054b7eb00274.js +1 -0
  207. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-e920054b7eb00274.js +1 -0
  208. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-e920054b7eb00274.js +1 -0
  209. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-e920054b7eb00274.js +1 -0
  210. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-e920054b7eb00274.js +1 -0
  211. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-e920054b7eb00274.js +1 -0
  212. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-e920054b7eb00274.js +1 -0
  213. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-e920054b7eb00274.js +1 -0
  214. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-e920054b7eb00274.js +1 -0
  215. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-e920054b7eb00274.js +1 -0
  216. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-e920054b7eb00274.js +1 -0
  217. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-e920054b7eb00274.js +1 -0
  218. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-e920054b7eb00274.js +1 -0
  219. package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-7d520da68bac245d.js +1 -0
  220. package/bundle/standalone/apps/web/.next/static/chunks/app/page-df34c386b7c150bb.js +1 -0
  221. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-e920054b7eb00274.js +1 -0
  222. package/bundle/standalone/apps/web/.next/static/css/{c2dc6e054d3457fa.css → d6e83b3f51ebdda3.css} +1 -1
  223. package/bundle/standalone/apps/web/package.json +4 -4
  224. package/bundle/standalone/apps/web/src/lib/mcp-tools.json +50 -50
  225. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +16 -16
  226. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js.map +1 -1
  227. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.d.ts +3 -0
  228. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.d.ts.map +1 -0
  229. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.js +166 -0
  230. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.js.map +1 -0
  231. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js +1 -1
  232. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js.map +1 -1
  233. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js +1 -1
  234. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js.map +1 -1
  235. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js +2 -2
  236. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js.map +1 -1
  237. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +26 -26
  238. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks/emit.mjs +39 -2
  239. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js +1 -1
  240. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js.map +1 -1
  241. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js +2 -2
  242. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js.map +1 -1
  243. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +78 -60
  244. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -1
  245. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +6 -6
  246. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -1
  247. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/011-journal-files-in-kb.sql +2 -0
  248. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/012-agents-mcp.sql +6 -0
  249. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js +1 -1
  250. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js.map +1 -1
  251. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.d.ts +7 -0
  252. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.d.ts.map +1 -0
  253. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.js +13 -0
  254. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.js.map +1 -0
  255. package/bundle/standalone/node_modules/kontexta-mcp/package.json +2 -1
  256. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/011-journal-files-in-kb.sql +2 -0
  257. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/012-agents-mcp.sql +6 -0
  258. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts +19 -2
  259. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts.map +1 -1
  260. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js +15 -15
  261. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js.map +1 -1
  262. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts +2 -0
  263. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts.map +1 -1
  264. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js +3 -3
  265. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js.map +1 -1
  266. package/bundle/standalone/node_modules/kxta-core/dist/hooks/emit.mjs +39 -2
  267. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts +2 -2
  268. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts.map +1 -1
  269. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js +1 -1
  270. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js.map +1 -1
  271. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.d.ts +3 -0
  272. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.d.ts.map +1 -0
  273. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.js +75 -0
  274. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.js.map +1 -0
  275. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js +1 -1
  276. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js.map +1 -1
  277. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts.map +1 -1
  278. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js +4 -3
  279. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js.map +1 -1
  280. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts.map +1 -1
  281. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js +0 -1
  282. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js.map +1 -1
  283. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.d.ts +3 -0
  284. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.d.ts.map +1 -0
  285. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.js +107 -0
  286. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.js.map +1 -0
  287. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts.map +1 -1
  288. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js +4 -0
  289. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js.map +1 -1
  290. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts +2 -0
  291. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts.map +1 -1
  292. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js +27 -13
  293. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js.map +1 -1
  294. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts +11 -0
  295. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts.map +1 -1
  296. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js +29 -3
  297. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js.map +1 -1
  298. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +1 -0
  299. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -1
  300. package/bundle/standalone/node_modules/kxta-core/dist/index.js +1 -0
  301. package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -1
  302. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +8 -5
  303. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -1
  304. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.d.ts +8 -0
  305. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.d.ts.map +1 -0
  306. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.js +8 -0
  307. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.js.map +1 -0
  308. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.d.ts +31 -0
  309. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.d.ts.map +1 -0
  310. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.js +55 -0
  311. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.js.map +1 -0
  312. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.d.ts +10 -0
  313. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.d.ts.map +1 -0
  314. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.js +7 -0
  315. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.js.map +1 -0
  316. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.d.ts +46 -0
  317. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.d.ts.map +1 -0
  318. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.js +113 -0
  319. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.js.map +1 -0
  320. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.d.ts +3 -0
  321. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.d.ts.map +1 -0
  322. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.js +115 -0
  323. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.js.map +1 -0
  324. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.d.ts +3 -0
  325. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.d.ts.map +1 -0
  326. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.js +76 -0
  327. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.js.map +1 -0
  328. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.d.ts +3 -0
  329. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.d.ts.map +1 -0
  330. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.js +64 -0
  331. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.js.map +1 -0
  332. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.d.ts +3 -0
  333. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.d.ts.map +1 -0
  334. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.js +90 -0
  335. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.js.map +1 -0
  336. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.d.ts +3 -0
  337. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.d.ts.map +1 -0
  338. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.js +17 -0
  339. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.js.map +1 -0
  340. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.d.ts +31 -0
  341. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.d.ts.map +1 -0
  342. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.js +136 -0
  343. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.js.map +1 -0
  344. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.d.ts +5 -0
  345. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.d.ts.map +1 -0
  346. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.js +19 -0
  347. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.js.map +1 -0
  348. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.d.ts +5 -0
  349. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.d.ts.map +1 -0
  350. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.js +62 -0
  351. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.js.map +1 -0
  352. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.d.ts +55 -0
  353. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.d.ts.map +1 -0
  354. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.js +2 -0
  355. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.js.map +1 -0
  356. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.d.ts +3 -0
  357. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.d.ts.map +1 -0
  358. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.js +25 -0
  359. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.js.map +1 -0
  360. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.d.ts +5 -0
  361. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.d.ts.map +1 -0
  362. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.js +17 -0
  363. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.js.map +1 -0
  364. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -1
  365. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +2 -0
  366. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -1
  367. package/bundle/standalone/node_modules/kxta-core/package.json +4 -2
  368. package/bundle/standalone/node_modules/kxta-publish/package.json +2 -2
  369. package/bundle/standalone/package.json +1 -1
  370. package/dist/connect-AL5DTU3K.js +22 -0
  371. package/dist/index.js +7 -1
  372. package/dist/{start-RJVUJT4B.js → start-GP4ERBBP.js} +7 -0
  373. package/package.json +3 -1
  374. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-0cc6597bb67aea3b.js +0 -1
  375. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-0cc6597bb67aea3b.js +0 -1
  376. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-0cc6597bb67aea3b.js +0 -1
  377. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-0cc6597bb67aea3b.js +0 -1
  378. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-0cc6597bb67aea3b.js +0 -1
  379. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-0cc6597bb67aea3b.js +0 -1
  380. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-0cc6597bb67aea3b.js +0 -1
  381. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-0cc6597bb67aea3b.js +0 -1
  382. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-0cc6597bb67aea3b.js +0 -1
  383. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-0cc6597bb67aea3b.js +0 -1
  384. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-0cc6597bb67aea3b.js +0 -1
  385. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-0cc6597bb67aea3b.js +0 -1
  386. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-0cc6597bb67aea3b.js +0 -1
  387. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-0cc6597bb67aea3b.js +0 -1
  388. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-0cc6597bb67aea3b.js +0 -1
  389. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-0cc6597bb67aea3b.js +0 -1
  390. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-0cc6597bb67aea3b.js +0 -1
  391. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-0cc6597bb67aea3b.js +0 -1
  392. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-0cc6597bb67aea3b.js +0 -1
  393. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-0cc6597bb67aea3b.js +0 -1
  394. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-0cc6597bb67aea3b.js +0 -1
  395. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-0cc6597bb67aea3b.js +0 -1
  396. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-0cc6597bb67aea3b.js +0 -1
  397. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-0cc6597bb67aea3b.js +0 -1
  398. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-0cc6597bb67aea3b.js +0 -1
  399. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-0cc6597bb67aea3b.js +0 -1
  400. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-0cc6597bb67aea3b.js +0 -1
  401. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-0cc6597bb67aea3b.js +0 -1
  402. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-0cc6597bb67aea3b.js +0 -1
  403. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-0cc6597bb67aea3b.js +0 -1
  404. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-0cc6597bb67aea3b.js +0 -1
  405. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-0cc6597bb67aea3b.js +0 -1
  406. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-0cc6597bb67aea3b.js +0 -1
  407. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-0cc6597bb67aea3b.js +0 -1
  408. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-0cc6597bb67aea3b.js +0 -1
  409. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-0cc6597bb67aea3b.js +0 -1
  410. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-0cc6597bb67aea3b.js +0 -1
  411. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-0cc6597bb67aea3b.js +0 -1
  412. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-0cc6597bb67aea3b.js +0 -1
  413. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-0cc6597bb67aea3b.js +0 -1
  414. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-0cc6597bb67aea3b.js +0 -1
  415. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-0cc6597bb67aea3b.js +0 -1
  416. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-0cc6597bb67aea3b.js +0 -1
  417. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-0cc6597bb67aea3b.js +0 -1
  418. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-0cc6597bb67aea3b.js +0 -1
  419. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-0cc6597bb67aea3b.js +0 -1
  420. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-0cc6597bb67aea3b.js +0 -1
  421. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-0cc6597bb67aea3b.js +0 -1
  422. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-0cc6597bb67aea3b.js +0 -1
  423. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-0cc6597bb67aea3b.js +0 -1
  424. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-0cc6597bb67aea3b.js +0 -1
  425. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-0cc6597bb67aea3b.js +0 -1
  426. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-0cc6597bb67aea3b.js +0 -1
  427. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-0cc6597bb67aea3b.js +0 -1
  428. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-0cc6597bb67aea3b.js +0 -1
  429. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-0cc6597bb67aea3b.js +0 -1
  430. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-0cc6597bb67aea3b.js +0 -1
  431. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-0cc6597bb67aea3b.js +0 -1
  432. package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-f9542f9f518f9257.js +0 -1
  433. package/bundle/standalone/apps/web/.next/static/chunks/app/page-19695d4fd9fa5c0a.js +0 -1
  434. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-0cc6597bb67aea3b.js +0 -1
  435. /package/bundle/standalone/apps/web/.next/static/{KgyobLEcr42ig4jXUMcNO → yyj-uK2RH8Rffeq9wVzjU}/_buildManifest.js +0 -0
  436. /package/bundle/standalone/apps/web/.next/static/{KgyobLEcr42ig4jXUMcNO → yyj-uK2RH8Rffeq9wVzjU}/_ssgManifest.js +0 -0
@@ -0,0 +1,90 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { isMap, isScalar } from "yaml";
4
+ import { writeTextWithBackup } from "../write.js";
5
+ import { sameEntry, toServerEntry } from "../entry.js";
6
+ import { dumpYaml, loadYamlDoc } from "../yaml-config.js";
7
+ import { SERVER_KEY } from "./json-servers.js";
8
+ const dir = (ctx) => join(ctx.home, ".hermes");
9
+ const file = (ctx) => join(dir(ctx), "config.yaml");
10
+ function serversMap(doc, path, create) {
11
+ const existing = doc.get("mcp_servers", true);
12
+ if (existing === undefined || (isScalar(existing) && existing.value === null)) {
13
+ if (!create)
14
+ return null;
15
+ const created = doc.createNode({});
16
+ doc.set("mcp_servers", created);
17
+ return created;
18
+ }
19
+ if (!isMap(existing))
20
+ throw new Error(`${path} has an "mcp_servers" key that is not a mapping; refusing to change it`);
21
+ return existing;
22
+ }
23
+ export const hermesMcpInstaller = {
24
+ id: "hermes",
25
+ // Hermes hands MCP servers only PATH/HOME/USER/… plus the entry's own env, so spell out the data dir and commands.
26
+ entryHints: { forceEnv: true, absolute: true },
27
+ supportsApproval: false,
28
+ configPath: file,
29
+ install(ctx) {
30
+ const path = file(ctx);
31
+ if (!existsSync(dir(ctx)))
32
+ throw new Error(`Hermes config folder not found (${dir(ctx)}); run Hermes once, or add the server by hand from the INSTALL tab`);
33
+ const doc = loadYamlDoc(path);
34
+ const servers = serversMap(doc, path, true);
35
+ const node = { command: ctx.entry.command, args: ctx.entry.args };
36
+ if (ctx.entry.env)
37
+ node.env = ctx.entry.env;
38
+ if (!sameEntry(servers.toJSON()[SERVER_KEY], ctx.entry)) {
39
+ const existing = servers.get(SERVER_KEY, true);
40
+ if (!isMap(existing))
41
+ servers.set(SERVER_KEY, doc.createNode(node));
42
+ else {
43
+ // Update in place so keys the user added (timeout, other env) survive; only command, args and KONTEXTA_DATA_DIR are ours.
44
+ existing.set("command", ctx.entry.command);
45
+ existing.set("args", doc.createNode(ctx.entry.args));
46
+ const envNode = existing.get("env", true);
47
+ if (ctx.entry.env) {
48
+ if (isMap(envNode))
49
+ envNode.set("KONTEXTA_DATA_DIR", ctx.entry.env.KONTEXTA_DATA_DIR);
50
+ else
51
+ existing.set("env", doc.createNode(ctx.entry.env));
52
+ }
53
+ else if (isMap(envNode)) {
54
+ envNode.delete("KONTEXTA_DATA_DIR");
55
+ if (envNode.items.length === 0)
56
+ existing.delete("env");
57
+ }
58
+ }
59
+ }
60
+ return { agent: "hermes", path, changed: writeTextWithBackup(path, dumpYaml(doc), ctx.dryRun), notes: ["Restart Hermes: MCP servers are loaded at startup only. Only the default profile is configured."] };
61
+ },
62
+ uninstall(ctx) {
63
+ const path = file(ctx);
64
+ if (!existsSync(path))
65
+ return { agent: "hermes", path, changed: false, notes: [] };
66
+ const doc = loadYamlDoc(path);
67
+ const servers = serversMap(doc, path, false);
68
+ if (!servers || !servers.has(SERVER_KEY))
69
+ return { agent: "hermes", path, changed: false, notes: [] };
70
+ servers.delete(SERVER_KEY);
71
+ if (servers.items.length === 0)
72
+ doc.delete("mcp_servers");
73
+ return { agent: "hermes", path, changed: writeTextWithBackup(path, dumpYaml(doc), ctx.dryRun), notes: [] };
74
+ },
75
+ status(ctx) {
76
+ const path = file(ctx);
77
+ const notes = [];
78
+ try {
79
+ const doc = loadYamlDoc(path);
80
+ const servers = serversMap(doc, path, false);
81
+ const existing = servers ? servers.toJSON()[SERVER_KEY] : undefined;
82
+ return { agent: "hermes", path, installed: existing !== undefined, current: sameEntry(existing, ctx.entry), entry: toServerEntry(existing), notes };
83
+ }
84
+ catch (e) {
85
+ notes.push(e.message);
86
+ return { agent: "hermes", path, installed: false, current: false, notes };
87
+ }
88
+ },
89
+ };
90
+ //# sourceMappingURL=hermes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hermes.js","sourceRoot":"","sources":["../../../src/mcp-install/installers/hermes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACvD,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;AAE5D,SAAS,UAAU,CAAC,GAAY,EAAE,IAAY,EAAE,MAAe;IAC7D,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE,CAAC;QAC9E,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACnC,GAA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AA8B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjG,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,KAAK,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;QACtJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,KAAK,CAAC,IAAI,CAAE,CAAW,CAAC,OAAO,CAAC,CAAC;YACjC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC5E,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpInstaller } from "../types.js";
2
+ export declare const MCP_INSTALLERS: Record<string, McpInstaller>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp-install/installers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAOhD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAUvD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { claudeCodeMcpInstaller } from "./claude-code.js";
2
+ import { codexMcpInstaller } from "./codex.js";
3
+ import { continueMcpInstaller } from "./continue.js";
4
+ import { hermesMcpInstaller } from "./hermes.js";
5
+ import { claudeDesktopMcpInstaller, clineMcpInstaller, copilotMcpInstaller, cursorMcpInstaller, geminiMcpInstaller } from "./json-servers.js";
6
+ export const MCP_INSTALLERS = {
7
+ "claude-code": claudeCodeMcpInstaller,
8
+ "claude-desktop": claudeDesktopMcpInstaller,
9
+ continue: continueMcpInstaller,
10
+ hermes: hermesMcpInstaller,
11
+ codex: codexMcpInstaller,
12
+ copilot: copilotMcpInstaller,
13
+ cursor: cursorMcpInstaller,
14
+ cline: clineMcpInstaller,
15
+ gemini: geminiMcpInstaller,
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp-install/installers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE9I,MAAM,CAAC,MAAM,cAAc,GAAiC;IAC1D,aAAa,EAAE,sBAAsB;IACrC,gBAAgB,EAAE,yBAAyB;IAC3C,QAAQ,EAAE,oBAAoB;IAC9B,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,kBAAkB;CAC3B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { AgentId } from "../../hooks/agents.js";
2
+ import type { McpCtx, McpInstaller } from "../types.js";
3
+ export declare const SERVER_KEY = "kxta";
4
+ type Json = Record<string, unknown>;
5
+ export type ConfigApprovalSpec = NonNullable<JsonServersSpec["configApproval"]>;
6
+ export interface JsonServersSpec {
7
+ id: AgentId;
8
+ label: string;
9
+ /** Config file path; may throw when the agent does not exist on this platform. */
10
+ path: (ctx: McpCtx) => string;
11
+ entryHints?: McpInstaller["entryHints"];
12
+ /** Documented defaults for keys the user has not set (existing values are never overwritten). */
13
+ entryExtras?: Record<string, unknown>;
14
+ /** Applies the approval level to the whole config (Gemini allow rules). */
15
+ configApproval?: {
16
+ isOurs: (rule: string) => boolean;
17
+ rule: (toolName: string) => string;
18
+ wildcard: string;
19
+ };
20
+ /** Applies the approval level inside the server entry (Cline alwaysAllow). */
21
+ entryApproval?: boolean;
22
+ }
23
+ export declare function applyConfigApproval(cfg: Json, spec: NonNullable<JsonServersSpec["configApproval"]>, ctx: McpCtx, path: string): Json;
24
+ export declare function jsonServersInstaller(spec: JsonServersSpec): McpInstaller;
25
+ export declare const cursorMcpInstaller: McpInstaller;
26
+ export declare const copilotMcpInstaller: McpInstaller;
27
+ export declare const clineMcpInstaller: McpInstaller;
28
+ export declare const geminiMcpInstaller: McpInstaller;
29
+ export declare const claudeDesktopMcpInstaller: McpInstaller;
30
+ export {};
31
+ //# sourceMappingURL=json-servers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-servers.d.ts","sourceRoot":"","sources":["../../../src/mcp-install/installers/json-servers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIrD,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAwB,MAAM,aAAa,CAAC;AAG9E,eAAO,MAAM,UAAU,SAAS,CAAC;AAEjC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAGpC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACxC,iGAAiG;IACjG,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,2EAA2E;IAC3E,cAAc,CAAC,EAAE;QAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7G,8EAA8E;IAC9E,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAQD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAepI;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CAsDxE;AAID,eAAO,MAAM,kBAAkB,cAA4K,CAAC;AAE5M,eAAO,MAAM,mBAAmB,cAG9B,CAAC;AACH,eAAO,MAAM,iBAAiB,cAAuI,CAAC;AACtK,eAAO,MAAM,kBAAkB,cAG7B,CAAC;AACH,eAAO,MAAM,yBAAyB,cAQpC,CAAC"}
@@ -0,0 +1,136 @@
1
+ import { existsSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { MalformedConfigError, readJsonConfig } from "../../hooks/installers/json-config.js";
4
+ import { writeJsonWithBackup } from "../write.js";
5
+ import { approvedTools, rewriteRules } from "../rules.js";
6
+ import { sameEntry, toServerEntry } from "../entry.js";
7
+ export const SERVER_KEY = "kxta";
8
+ const isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
9
+ function serversOf(cfg, path) {
10
+ if (cfg.mcpServers === undefined)
11
+ return {};
12
+ if (!isObj(cfg.mcpServers))
13
+ throw new MalformedConfigError(path, '"mcpServers" is not an object');
14
+ return cfg.mcpServers;
15
+ }
16
+ export function applyConfigApproval(cfg, spec, ctx, path) {
17
+ const perms = cfg.permissions;
18
+ if (perms !== undefined && !isObj(perms))
19
+ throw new MalformedConfigError(path, '"permissions" is not an object');
20
+ const allowRaw = perms?.allow;
21
+ if (allowRaw !== undefined && !Array.isArray(allowRaw))
22
+ throw new MalformedConfigError(path, '"permissions.allow" is not a list');
23
+ const existing = (allowRaw ?? []);
24
+ const tools = approvedTools(ctx.approval, ctx.tools);
25
+ const desired = tools === null ? null : tools === "*" ? [spec.wildcard] : tools.map(spec.rule);
26
+ const next = rewriteRules(existing, spec.isOurs, desired, ctx.previousApproval);
27
+ if (next === null)
28
+ return cfg;
29
+ const permissions = { ...(perms ?? {}) };
30
+ if (next.length > 0)
31
+ permissions.allow = next;
32
+ else
33
+ delete permissions.allow;
34
+ const out = { ...cfg };
35
+ if (Object.keys(permissions).length > 0)
36
+ out.permissions = permissions;
37
+ else
38
+ delete out.permissions;
39
+ return out;
40
+ }
41
+ export function jsonServersInstaller(spec) {
42
+ return {
43
+ id: spec.id,
44
+ entryHints: spec.entryHints ?? {},
45
+ supportsApproval: !!spec.configApproval || !!spec.entryApproval,
46
+ configPath: spec.path,
47
+ install(ctx) {
48
+ const path = spec.path(ctx);
49
+ if (!existsSync(dirname(path)))
50
+ throw new Error(`${spec.label} config folder not found (${dirname(path)}); open ${spec.label} once, or add the server by hand from the INSTALL tab`);
51
+ let cfg = readJsonConfig(path);
52
+ const servers = { ...serversOf(cfg, path) };
53
+ const prior = isObj(servers[SERVER_KEY]) ? servers[SERVER_KEY] : {};
54
+ const next = { ...prior, command: ctx.entry.command, args: ctx.entry.args };
55
+ // Only KONTEXTA_DATA_DIR is ours inside env; anything else the user put there stays.
56
+ const env = isObj(prior.env) ? { ...prior.env } : {};
57
+ delete env.KONTEXTA_DATA_DIR;
58
+ Object.assign(env, ctx.entry.env ?? {});
59
+ if (Object.keys(env).length > 0)
60
+ next.env = env;
61
+ else
62
+ delete next.env;
63
+ for (const [k, v] of Object.entries(spec.entryExtras ?? {}))
64
+ if (!(k in next))
65
+ next[k] = v;
66
+ if (spec.entryApproval) {
67
+ const tools = approvedTools(ctx.approval, ctx.tools);
68
+ if (tools === null) {
69
+ if (ctx.previousApproval !== "prompt")
70
+ delete next.alwaysAllow;
71
+ }
72
+ else
73
+ next.alwaysAllow = tools === "*" ? ctx.tools.map((t) => t.name) : tools;
74
+ }
75
+ servers[SERVER_KEY] = next;
76
+ cfg = { ...cfg, mcpServers: servers };
77
+ if (spec.configApproval)
78
+ cfg = applyConfigApproval(cfg, spec.configApproval, ctx, path);
79
+ const changed = writeJsonWithBackup(path, cfg, ctx.dryRun);
80
+ return { agent: spec.id, path, changed, notes: [] };
81
+ },
82
+ uninstall(ctx) {
83
+ const path = spec.path(ctx);
84
+ if (!existsSync(path))
85
+ return { agent: spec.id, path, changed: false, notes: [] };
86
+ let cfg = readJsonConfig(path);
87
+ const servers = { ...serversOf(cfg, path) };
88
+ delete servers[SERVER_KEY];
89
+ cfg = { ...cfg };
90
+ if (Object.keys(servers).length > 0)
91
+ cfg.mcpServers = servers;
92
+ else
93
+ delete cfg.mcpServers;
94
+ if (spec.configApproval)
95
+ cfg = applyConfigApproval(cfg, spec.configApproval, { ...ctx, approval: "prompt" }, path);
96
+ return { agent: spec.id, path, changed: writeJsonWithBackup(path, cfg, ctx.dryRun), notes: [] };
97
+ },
98
+ status(ctx) {
99
+ let path = "";
100
+ const notes = [];
101
+ try {
102
+ path = spec.path(ctx);
103
+ const existing = serversOf(readJsonConfig(path), path)[SERVER_KEY];
104
+ return { agent: spec.id, path, installed: existing !== undefined, current: sameEntry(existing, ctx.entry), entry: toServerEntry(existing), notes };
105
+ }
106
+ catch (e) {
107
+ notes.push(e.message);
108
+ return { agent: spec.id, path, installed: false, current: false, notes };
109
+ }
110
+ },
111
+ };
112
+ }
113
+ const ruleOf = (tool) => `mcp(${SERVER_KEY}/${tool})`;
114
+ export const cursorMcpInstaller = jsonServersInstaller({ id: "cursor", label: "Cursor", path: (c) => join(c.home, ".cursor", "mcp.json"), entryHints: { absolute: true }, entryExtras: { type: "stdio" } });
115
+ // Copilot CLI only inherits PATH into MCP servers, so the data dir is always spelled out.
116
+ export const copilotMcpInstaller = jsonServersInstaller({
117
+ id: "copilot", label: "GitHub Copilot CLI", entryHints: { forceEnv: true }, entryExtras: { type: "local", tools: ["*"] },
118
+ path: (c) => join((c.env ?? process.env).COPILOT_HOME || join(c.home, ".copilot"), "mcp-config.json"),
119
+ });
120
+ export const clineMcpInstaller = jsonServersInstaller({ id: "cline", label: "Cline", path: (c) => join(c.home, ".cline", "mcp_settings.json"), entryApproval: true });
121
+ export const geminiMcpInstaller = jsonServersInstaller({
122
+ id: "gemini", label: "Gemini CLI", path: (c) => join(c.home, ".gemini", "settings.json"),
123
+ configApproval: { isOurs: (r) => r === `mcp(${SERVER_KEY}/*)` || r.startsWith(`mcp(${SERVER_KEY}/`), rule: ruleOf, wildcard: `mcp(${SERVER_KEY}/*)` },
124
+ });
125
+ export const claudeDesktopMcpInstaller = jsonServersInstaller({
126
+ id: "claude-desktop", label: "Claude Desktop", entryHints: { absolute: true },
127
+ path: (c) => {
128
+ const platform = c.platform ?? process.platform;
129
+ if (platform === "darwin")
130
+ return join(c.home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
131
+ if (platform === "win32")
132
+ return join((c.env ?? process.env).APPDATA ?? join(c.home, "AppData", "Roaming"), "Claude", "claude_desktop_config.json");
133
+ throw new Error("Claude Desktop is not available on Linux");
134
+ },
135
+ });
136
+ //# sourceMappingURL=json-servers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-servers.js","sourceRoot":"","sources":["../../../src/mcp-install/installers/json-servers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAA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AAQ,EAAE,4BAA4B,CAAC,CAAC;QACpJ,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { McpApproval } from "../hooks/registry.js";
2
+ import type { McpTool } from "./types.js";
3
+ export declare function approvedTools(approval: McpApproval, tools: readonly McpTool[]): "*" | string[] | null;
4
+ export declare function rewriteRules(existing: string[], isOurs: (rule: string) => boolean, desired: string[] | null, previous: McpApproval): string[] | null;
5
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/mcp-install/rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,GAAG,GAAG,MAAM,EAAE,GAAG,IAAI,CAIrG;AAKD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,IAAI,CAKpJ"}
@@ -0,0 +1,19 @@
1
+ // The tools an approval level covers: null = leave approvals alone, "*" = everything, else an explicit list.
2
+ export function approvedTools(approval, tools) {
3
+ if (approval === "prompt")
4
+ return null;
5
+ if (approval === "all")
6
+ return "*";
7
+ return tools.filter((t) => !t.destructive).map((t) => t.name);
8
+ }
9
+ const sameSet = (a, b) => a.length === b.length && new Set(a).size === new Set(b).size && a.every((x) => b.includes(x));
10
+ // Rewrites a list of allow rules so the kxta ones equal `desired`, never touching anyone else's. Returns null when nothing should change.
11
+ export function rewriteRules(existing, isOurs, desired, previous) {
12
+ const ours = existing.filter(isOurs);
13
+ if (desired === null)
14
+ return previous === "prompt" || ours.length === 0 ? null : existing.filter((r) => !isOurs(r));
15
+ if (sameSet(ours, desired))
16
+ return null;
17
+ return [...existing.filter((r) => !isOurs(r)), ...desired];
18
+ }
19
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/mcp-install/rules.ts"],"names":[],"mappings":"AAGA,6GAA6G;AAC7G,MAAM,UAAU,aAAa,CAAC,QAAqB,EAAE,KAAyB;IAC5E,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACvC,IAAI,QAAQ,KAAK,KAAK;QAAE,OAAO,GAAG,CAAC;IACnC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,OAAO,GAAG,CAAC,CAAW,EAAE,CAAW,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5I,0IAA0I;AAC1I,MAAM,UAAU,YAAY,CAAC,QAAkB,EAAE,MAAiC,EAAE,OAAwB,EAAE,QAAqB;IACjI,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACpH,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const KXTA_TOOLS: ReadonlyArray<{
2
+ readonly name: string;
3
+ readonly destructive: boolean;
4
+ }>;
5
+ //# sourceMappingURL=tools.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.generated.d.ts","sourceRoot":"","sources":["../../src/mcp-install/tools.generated.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CA2D9F,CAAC"}
@@ -0,0 +1,62 @@
1
+ // Generated by apps/mcp/scripts/generate-manifest.js — do not edit.
2
+ export const KXTA_TOOLS = [
3
+ { name: "admin.commit_backup", destructive: true },
4
+ { name: "admin.get_profile", destructive: false },
5
+ { name: "admin.onboard_agent", destructive: false },
6
+ { name: "admin.overview", destructive: false },
7
+ { name: "admin.refresh_session_context", destructive: false },
8
+ { name: "admin.transfer_agent_context", destructive: false },
9
+ { name: "calendar.entities.add", destructive: false },
10
+ { name: "calendar.entities.delete", destructive: true },
11
+ { name: "calendar.entities.link", destructive: false },
12
+ { name: "calendar.entities.list", destructive: false },
13
+ { name: "calendar.entities.update", destructive: false },
14
+ { name: "calendar.events.add", destructive: false },
15
+ { name: "calendar.events.conflicts", destructive: false },
16
+ { name: "calendar.events.delete", destructive: true },
17
+ { name: "calendar.events.list", destructive: false },
18
+ { name: "calendar.events.update", destructive: false },
19
+ { name: "calendar.export_ics", destructive: false },
20
+ { name: "files.create", destructive: false },
21
+ { name: "files.delete", destructive: true },
22
+ { name: "files.describe", destructive: false },
23
+ { name: "files.diff_against_disk", destructive: false },
24
+ { name: "files.find_related", destructive: false },
25
+ { name: "files.get_diff", destructive: false },
26
+ { name: "files.get_history", destructive: false },
27
+ { name: "files.list", destructive: false },
28
+ { name: "files.move", destructive: false },
29
+ { name: "files.read", destructive: false },
30
+ { name: "files.read_outline", destructive: false },
31
+ { name: "files.regex_search", destructive: false },
32
+ { name: "files.restore", destructive: true },
33
+ { name: "files.search", destructive: false },
34
+ { name: "files.update", destructive: false },
35
+ { name: "folders.create", destructive: false },
36
+ { name: "folders.delete", destructive: true },
37
+ { name: "folders.list", destructive: false },
38
+ { name: "hands.confirm", destructive: false },
39
+ { name: "hands.list", destructive: false },
40
+ { name: "hands.reload", destructive: false },
41
+ { name: "journal.commit_upgrades", destructive: false },
42
+ { name: "journal.distill", destructive: false },
43
+ { name: "journal.housekeep", destructive: false },
44
+ { name: "journal.status", destructive: false },
45
+ { name: "journal.write", destructive: false },
46
+ { name: "projects.list", destructive: false },
47
+ { name: "projects.map", destructive: false },
48
+ { name: "projects.refresh_index", destructive: false },
49
+ { name: "projects.register", destructive: false },
50
+ { name: "resources.add_report", destructive: false },
51
+ { name: "resources.clip_url", destructive: false },
52
+ { name: "resources.delete_report", destructive: true },
53
+ { name: "resources.export_report", destructive: false },
54
+ { name: "resources.list_reports", destructive: false },
55
+ { name: "tags.add", destructive: false },
56
+ { name: "tags.list", destructive: false },
57
+ { name: "tags.remove", destructive: false },
58
+ { name: "tags.search", destructive: false },
59
+ { name: "tags.set_favorite", destructive: false },
60
+ { name: "tags.suggest", destructive: false },
61
+ ];
62
+ //# sourceMappingURL=tools.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.gener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,WAAW,EAAE,KAAK,EAAE;CAC7C,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { AgentId } from "../hooks/agents.js";
2
+ import type { McpApproval } from "../hooks/registry.js";
3
+ import type { ServerEntry, ServerEntryOpts } from "./entry.js";
4
+ export interface McpTool {
5
+ readonly name: string;
6
+ readonly destructive: boolean;
7
+ }
8
+ export interface RunResult {
9
+ status: number | null;
10
+ stdout: string;
11
+ stderr: string;
12
+ error?: Error;
13
+ }
14
+ export type Runner = (cmd: string, args: string[]) => RunResult;
15
+ export interface McpCtx {
16
+ home: string;
17
+ entry: ServerEntry;
18
+ approval: McpApproval;
19
+ /** What was applied last time; decides whether `prompt` should remove earlier allow rules. */
20
+ previousApproval: McpApproval;
21
+ tools: readonly McpTool[];
22
+ version: string;
23
+ dryRun?: boolean;
24
+ platform?: NodeJS.Platform;
25
+ env?: NodeJS.ProcessEnv;
26
+ /** Shell-out hook (Claude Code); tests inject a fake. */
27
+ run?: Runner;
28
+ }
29
+ export interface McpResult {
30
+ agent: AgentId;
31
+ path: string;
32
+ changed: boolean;
33
+ notes: string[];
34
+ }
35
+ export interface McpStatus {
36
+ agent: AgentId;
37
+ path: string;
38
+ installed: boolean;
39
+ current: boolean;
40
+ /** The entry on disk, normalised; undefined when absent. */
41
+ entry?: ServerEntry;
42
+ notes: string[];
43
+ }
44
+ export interface McpInstaller {
45
+ id: AgentId;
46
+ /** Per-agent tweaks to how the server entry is built. */
47
+ entryHints: Pick<ServerEntryOpts, "forceEnv" | "absolute">;
48
+ /** True when this agent can carry an allowlist from `safe`/`all`. */
49
+ supportsApproval: boolean;
50
+ configPath(ctx: McpCtx): string;
51
+ install(ctx: McpCtx): McpResult;
52
+ uninstall(ctx: McpCtx): McpResult;
53
+ status(ctx: McpCtx): McpStatus;
54
+ }
55
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mcp-install/types.ts"],"names":[],"mappings":"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,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IACnE,4DAA4D;IAC5D,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,yDAAyD;IACzD,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;IAC3D,qEAAqE;IACrE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/mcp-install/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export declare function writeJsonWithBackup(path: string, value: unknown, dryRun?: boolean): boolean;
2
+ export declare function writeTextWithBackup(path: string, text: string, dryRun?: boolean): boolean;
3
+ //# sourceMappingURL=write.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/mcp-install/write.ts"],"names":[],"mappings":"AASA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,OAAO,CAKzF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,OAAO,CAKvF"}
@@ -0,0 +1,25 @@
1
+ import { copyFileSync, existsSync } from "node:fs";
2
+ import { writeJsonConfig, writeTextConfig } from "../hooks/installers/json-config.js";
3
+ // Before the first change to an existing config keep one copy next to it; later edits never overwrite that copy.
4
+ function backupOnce(path) {
5
+ const bak = `${path}.kontexta-bak`;
6
+ if (existsSync(path) && !existsSync(bak))
7
+ copyFileSync(path, bak);
8
+ }
9
+ export function writeJsonWithBackup(path, value, dryRun = false) {
10
+ if (!writeJsonConfig(path, value, true))
11
+ return false;
12
+ if (dryRun)
13
+ return true;
14
+ backupOnce(path);
15
+ return writeJsonConfig(path, value, false);
16
+ }
17
+ export function writeTextWithBackup(path, text, dryRun = false) {
18
+ if (!writeTextConfig(path, text, true))
19
+ return false;
20
+ if (dryRun)
21
+ return true;
22
+ backupOnce(path);
23
+ return writeTextConfig(path, text, false);
24
+ }
25
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/mcp-install/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAEtF,iHAAiH;AACjH,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,GAAG,GAAG,GAAG,IAAI,eAAe,CAAC;IACnC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,KAAc,EAAE,MAAM,GAAG,KAAK;IAC9E,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IACxB,UAAU,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,IAAY,EAAE,MAAM,GAAG,KAAK;IAC5E,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACrD,IAAI,MAAM;QAAE,OAAO,IAAI,CAAC;IACxB,UAAU,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Document } from "yaml";
2
+ export type YamlDoc = Document.Parsed | Document;
3
+ export declare function loadYamlDoc(path: string): YamlDoc;
4
+ export declare const dumpYaml: (doc: YamlDoc) => string;
5
+ //# sourceMappingURL=yaml-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-config.d.ts","sourceRoot":"","sources":["../../src/mcp-install/yaml-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAwB,MAAM,MAAM,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC;AAGjD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOjD;AAGD,eAAO,MAAM,QAAQ,GAAI,KAAK,OAAO,KAAG,MAAwC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { Document, isMap, parseDocument } from "yaml";
3
+ // Parses a config so it can be edited in place (comments and untouched keys survive); refuses anything it could damage.
4
+ export function loadYamlDoc(path) {
5
+ const text = existsSync(path) ? readFileSync(path, "utf8") : "";
6
+ if (text.trim() === "")
7
+ return new Document({});
8
+ const doc = parseDocument(text);
9
+ if (doc.errors.length > 0)
10
+ throw new Error(`${path} is not valid YAML (${doc.errors[0].message.split("\n")[0]}); refusing to overwrite it`);
11
+ if (!isMap(doc.contents))
12
+ throw new Error(`${path} top level is not a mapping; refusing to overwrite it`);
13
+ return doc;
14
+ }
15
+ // lineWidth 0 keeps long commands on one line so they stay readable and auditable.
16
+ export const dumpYaml = (doc) => doc.toString({ lineWidth: 0 });
17
+ //# sourceMappingURL=yaml-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml-config.js","sourceRoot":"","sources":["../../src/mcp-install/yaml-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAItD,wHAAwH;AACxH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,uBAAuB,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC;IAC5I,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,uDAAuD,CAAC,CAAC;IAC1G,OAAO,GAAG,CAAC;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAY,EAAU,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,SAA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ture slug before deleting the row — needed for backup subtree cleanup below.
235
235
  const project = db.prepare("SELECT slug FROM projects WHERE id = ?").get(projectId);
236
236
  db.transaction(() => {
237
+ // Journal task files are KB files (no project_id), so they no longer cascade this away; journal_meta still points at the project.
238
+ db.prepare("DELETE FROM journal_meta WHERE project_id = ?").run(projectId);
237
239
  const files = db.prepare("SELECT id FROM files WHERE project_id = ?").all(projectId);
238
240
  const fileIds = files.map(f => f.id);
239
241
  if (fileIds.length > 0) {