kontexta 5.1.3 → 6.0.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 (543) hide show
  1. package/bundle/standalone/CHANGELOG.md +51 -0
  2. package/bundle/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/bundle/standalone/apps/web/.next/app-build-manifest.json +99 -92
  4. package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +13 -12
  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/required-server-files.json +1 -0
  8. package/bundle/standalone/apps/web/.next/routes-manifest.json +8 -0
  9. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -1
  12. package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +4 -4
  13. package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -1
  14. package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -1
  15. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js +1 -1
  16. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route.js.nft.json +1 -1
  17. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/hooks/route_client-reference-manifest.js +1 -1
  18. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route.js +1 -0
  19. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route.js.nft.json +1 -0
  20. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/mcp/route_client-reference-manifest.js +1 -0
  21. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js +1 -1
  22. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
  23. package/bundle/standalone/apps/web/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -1
  24. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js +1 -1
  25. package/bundle/standalone/apps/web/.next/server/app/api/agents/route.js.nft.json +1 -1
  26. package/bundle/standalone/apps/web/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
  27. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  28. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  29. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  30. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.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.nft.json +1 -1
  34. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  35. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -1
  36. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -1
  37. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -1
  38. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -1
  39. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -1
  40. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -1
  41. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -1
  42. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -1
  43. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -1
  44. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -1
  45. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -1
  46. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -1
  47. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -1
  48. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -1
  49. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -1
  50. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -1
  51. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -1
  52. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -1
  53. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -1
  54. package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -1
  55. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -1
  56. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -1
  57. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -1
  58. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -1
  59. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route.js.nft.json +1 -1
  60. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/backlinks/route_client-reference-manifest.js +1 -1
  61. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -1
  62. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -1
  63. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route.js.nft.json +1 -1
  64. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-html/route_client-reference-manifest.js +1 -1
  65. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -1
  66. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -1
  67. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -1
  68. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -1
  69. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -1
  70. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -1
  71. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -1
  72. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -1
  73. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -1
  74. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -1
  75. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
  76. package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
  77. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -1
  78. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -1
  79. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -1
  80. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -1
  81. package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -1
  82. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -1
  83. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -1
  84. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -1
  85. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -1
  86. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -1
  87. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -1
  88. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -1
  89. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -1
  90. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -1
  91. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -1
  92. package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  93. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +9 -9
  94. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -1
  95. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -1
  96. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -1
  97. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -1
  98. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -1
  99. package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -1
  100. package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -1
  101. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -1
  102. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -1
  103. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -1
  104. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -1
  105. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -1
  106. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -1
  107. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -1
  108. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -1
  109. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -1
  110. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -1
  111. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  112. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  113. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -1
  114. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -1
  115. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -1
  116. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -1
  117. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -1
  118. package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  119. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -1
  120. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -1
  121. package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -1
  122. package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -1
  123. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -1
  124. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -1
  125. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -1
  126. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -1
  127. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route.js.nft.json +1 -1
  128. package/bundle/standalone/apps/web/.next/server/app/api/reports/resources/[name]/route_client-reference-manifest.js +1 -1
  129. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -1
  130. package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
  131. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -1
  132. package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  133. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route.js.nft.json +1 -1
  134. package/bundle/standalone/apps/web/.next/server/app/api/version-check/route_client-reference-manifest.js +1 -1
  135. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route.js.nft.json +1 -1
  136. package/bundle/standalone/apps/web/.next/server/app/api/welcome/route_client-reference-manifest.js +1 -1
  137. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -1
  138. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -1
  139. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -1
  140. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +1 -1
  141. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -1
  142. package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -1
  143. package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  144. package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -1
  145. package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -1
  146. package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  147. package/bundle/standalone/apps/web/.next/server/app/page.js +4 -4
  148. package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
  149. package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  150. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -1
  151. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -1
  152. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +2 -2
  153. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +4 -4
  154. package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +13 -12
  155. package/bundle/standalone/apps/web/.next/server/chunks/3668.js +2 -2
  156. package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -1
  157. package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -1
  158. package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -1
  159. package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -1
  160. package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -1
  161. package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  162. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-e920054b7eb00274.js +1 -0
  163. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-e920054b7eb00274.js +1 -0
  164. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/mcp/route-e920054b7eb00274.js +1 -0
  165. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-e920054b7eb00274.js +1 -0
  166. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-e920054b7eb00274.js +1 -0
  167. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-e920054b7eb00274.js +1 -0
  168. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-e920054b7eb00274.js +1 -0
  169. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-e920054b7eb00274.js +1 -0
  170. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-e920054b7eb00274.js +1 -0
  171. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-e920054b7eb00274.js +1 -0
  172. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-e920054b7eb00274.js +1 -0
  173. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-e920054b7eb00274.js +1 -0
  174. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-e920054b7eb00274.js +1 -0
  175. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-e920054b7eb00274.js +1 -0
  176. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-e920054b7eb00274.js +1 -0
  177. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-e920054b7eb00274.js +1 -0
  178. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-e920054b7eb00274.js +1 -0
  179. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-e920054b7eb00274.js +1 -0
  180. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-e920054b7eb00274.js +1 -0
  181. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-e920054b7eb00274.js +1 -0
  182. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-e920054b7eb00274.js +1 -0
  183. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-e920054b7eb00274.js +1 -0
  184. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-e920054b7eb00274.js +1 -0
  185. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-e920054b7eb00274.js +1 -0
  186. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-e920054b7eb00274.js +1 -0
  187. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-e920054b7eb00274.js +1 -0
  188. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-e920054b7eb00274.js +1 -0
  189. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-e920054b7eb00274.js +1 -0
  190. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-e920054b7eb00274.js +1 -0
  191. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-e920054b7eb00274.js +1 -0
  192. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-e920054b7eb00274.js +1 -0
  193. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-e920054b7eb00274.js +1 -0
  194. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-e920054b7eb00274.js +1 -0
  195. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-e920054b7eb00274.js +1 -0
  196. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-e920054b7eb00274.js +1 -0
  197. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-e920054b7eb00274.js +1 -0
  198. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-e920054b7eb00274.js +1 -0
  199. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-e920054b7eb00274.js +1 -0
  200. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-e920054b7eb00274.js +1 -0
  201. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-e920054b7eb00274.js +1 -0
  202. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-e920054b7eb00274.js +1 -0
  203. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-e920054b7eb00274.js +1 -0
  204. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-e920054b7eb00274.js +1 -0
  205. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-e920054b7eb00274.js +1 -0
  206. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-e920054b7eb00274.js +1 -0
  207. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-e920054b7eb00274.js +1 -0
  208. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-e920054b7eb00274.js +1 -0
  209. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-e920054b7eb00274.js +1 -0
  210. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-e920054b7eb00274.js +1 -0
  211. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-e920054b7eb00274.js +1 -0
  212. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-e920054b7eb00274.js +1 -0
  213. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-e920054b7eb00274.js +1 -0
  214. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-e920054b7eb00274.js +1 -0
  215. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-e920054b7eb00274.js +1 -0
  216. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-e920054b7eb00274.js +1 -0
  217. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-e920054b7eb00274.js +1 -0
  218. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-e920054b7eb00274.js +1 -0
  219. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-e920054b7eb00274.js +1 -0
  220. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-e920054b7eb00274.js +1 -0
  221. package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-7d520da68bac245d.js +1 -0
  222. package/bundle/standalone/apps/web/.next/static/chunks/app/{layout-da10917c290d5da7.js → layout-b3fc3a7cf96952bd.js} +1 -1
  223. package/bundle/standalone/apps/web/.next/static/chunks/app/page-f2e6293531d0db55.js +1 -0
  224. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-e920054b7eb00274.js +1 -0
  225. package/bundle/standalone/apps/web/.next/static/css/{c2dc6e054d3457fa.css → c9d10f1f97d629ff.css} +2 -2
  226. package/bundle/standalone/apps/web/package.json +6 -5
  227. package/bundle/standalone/apps/web/server.js +1 -1
  228. package/bundle/standalone/apps/web/src/lib/mcp-tools.json +126 -118
  229. package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +28 -185
  230. package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-reference.md +207 -0
  231. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +20 -20
  232. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js.map +1 -1
  233. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.d.ts +3 -0
  234. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.d.ts.map +1 -0
  235. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.js +166 -0
  236. package/bundle/standalone/node_modules/kontexta-mcp/dist/connect-cli.js.map +1 -0
  237. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js +1 -1
  238. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js.map +1 -1
  239. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js +1 -1
  240. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js +1 -1
  241. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js.map +1 -1
  242. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js +2 -2
  243. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js.map +1 -1
  244. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +26 -26
  245. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks/emit.mjs +39 -2
  246. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js +1 -1
  247. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-block.js.map +1 -1
  248. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js +2 -2
  249. package/bundle/standalone/node_modules/kontexta-mcp/dist/hooks-cli.js.map +1 -1
  250. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +240 -94
  251. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -1
  252. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +8 -8
  253. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -1
  254. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.js +1 -1
  255. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.js +1 -1
  256. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js +2 -2
  257. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/011-journal-files-in-kb.sql +2 -0
  258. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/012-agents-mcp.sql +6 -0
  259. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js +1 -1
  260. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js.map +1 -1
  261. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.d.ts +7 -0
  262. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.d.ts.map +1 -0
  263. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.js +13 -0
  264. package/bundle/standalone/node_modules/kontexta-mcp/dist/repo-write-guard.js.map +1 -0
  265. package/bundle/standalone/node_modules/kontexta-mcp/package.json +5 -2
  266. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts +5 -0
  267. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts.map +1 -1
  268. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js +84 -25
  269. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js.map +1 -1
  270. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +28 -185
  271. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-reference.md +207 -0
  272. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts +25 -1
  273. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts.map +1 -1
  274. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js +159 -32
  275. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js.map +1 -1
  276. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/011-journal-files-in-kb.sql +2 -0
  277. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/012-agents-mcp.sql +6 -0
  278. package/bundle/standalone/node_modules/kxta-core/dist/decision/engine.d.ts +71 -0
  279. package/bundle/standalone/node_modules/kxta-core/dist/decision/engine.d.ts.map +1 -0
  280. package/bundle/standalone/node_modules/kxta-core/dist/decision/engine.js +192 -0
  281. package/bundle/standalone/node_modules/kxta-core/dist/decision/engine.js.map +1 -0
  282. package/bundle/standalone/node_modules/kxta-core/dist/decision/index.d.ts +9 -0
  283. package/bundle/standalone/node_modules/kxta-core/dist/decision/index.d.ts.map +1 -0
  284. package/bundle/standalone/node_modules/kxta-core/dist/decision/index.js +10 -0
  285. package/bundle/standalone/node_modules/kxta-core/dist/decision/index.js.map +1 -0
  286. package/bundle/standalone/node_modules/kxta-core/dist/decision/intent-router.d.ts +20 -0
  287. package/bundle/standalone/node_modules/kxta-core/dist/decision/intent-router.d.ts.map +1 -0
  288. package/bundle/standalone/node_modules/kxta-core/dist/decision/intent-router.js +124 -0
  289. package/bundle/standalone/node_modules/kxta-core/dist/decision/intent-router.js.map +1 -0
  290. package/bundle/standalone/node_modules/kxta-core/dist/decision/pruning.d.ts +20 -0
  291. package/bundle/standalone/node_modules/kxta-core/dist/decision/pruning.d.ts.map +1 -0
  292. package/bundle/standalone/node_modules/kxta-core/dist/decision/pruning.js +28 -0
  293. package/bundle/standalone/node_modules/kxta-core/dist/decision/pruning.js.map +1 -0
  294. package/bundle/standalone/node_modules/kxta-core/dist/decision/sufficiency.d.ts +30 -0
  295. package/bundle/standalone/node_modules/kxta-core/dist/decision/sufficiency.d.ts.map +1 -0
  296. package/bundle/standalone/node_modules/kxta-core/dist/decision/sufficiency.js +57 -0
  297. package/bundle/standalone/node_modules/kxta-core/dist/decision/sufficiency.js.map +1 -0
  298. package/bundle/standalone/node_modules/kxta-core/dist/decision/types.d.ts +42 -0
  299. package/bundle/standalone/node_modules/kxta-core/dist/decision/types.d.ts.map +1 -0
  300. package/bundle/standalone/node_modules/kxta-core/dist/decision/types.js +7 -0
  301. package/bundle/standalone/node_modules/kxta-core/dist/decision/types.js.map +1 -0
  302. package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts +3 -1
  303. package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts.map +1 -1
  304. package/bundle/standalone/node_modules/kxta-core/dist/files/index.js +10 -1
  305. package/bundle/standalone/node_modules/kxta-core/dist/files/index.js.map +1 -1
  306. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts +19 -2
  307. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.d.ts.map +1 -1
  308. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js +15 -15
  309. package/bundle/standalone/node_modules/kxta-core/dist/hooks/agents.js.map +1 -1
  310. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts +2 -0
  311. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.d.ts.map +1 -1
  312. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js +5 -5
  313. package/bundle/standalone/node_modules/kxta-core/dist/hooks/alerts.js.map +1 -1
  314. package/bundle/standalone/node_modules/kxta-core/dist/hooks/emit.mjs +39 -2
  315. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts +2 -2
  316. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.d.ts.map +1 -1
  317. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js +1 -1
  318. package/bundle/standalone/node_modules/kxta-core/dist/hooks/index.js.map +1 -1
  319. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.d.ts +3 -0
  320. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.d.ts.map +1 -0
  321. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.js +75 -0
  322. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/antigravity.js.map +1 -0
  323. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js +1 -1
  324. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/codex.js.map +1 -1
  325. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.d.ts.map +1 -1
  326. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js +4 -3
  327. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/copilot.js.map +1 -1
  328. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.d.ts.map +1 -1
  329. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js +0 -1
  330. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/gemini.js.map +1 -1
  331. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.d.ts +3 -0
  332. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.d.ts.map +1 -0
  333. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.js +107 -0
  334. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/hermes.js.map +1 -0
  335. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.d.ts.map +1 -1
  336. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js +4 -0
  337. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/index.js.map +1 -1
  338. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts +2 -0
  339. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.d.ts.map +1 -1
  340. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js +27 -13
  341. package/bundle/standalone/node_modules/kxta-core/dist/hooks/installers/json-config.js.map +1 -1
  342. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts +11 -0
  343. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.d.ts.map +1 -1
  344. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js +29 -3
  345. package/bundle/standalone/node_modules/kxta-core/dist/hooks/registry.js.map +1 -1
  346. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +5 -1
  347. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -1
  348. package/bundle/standalone/node_modules/kxta-core/dist/index.js +5 -1
  349. package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -1
  350. package/bundle/standalone/node_modules/kxta-core/dist/inference/bundled.d.ts +3 -0
  351. package/bundle/standalone/node_modules/kxta-core/dist/inference/bundled.d.ts.map +1 -0
  352. package/bundle/standalone/node_modules/kxta-core/dist/inference/bundled.js +27 -0
  353. package/bundle/standalone/node_modules/kxta-core/dist/inference/bundled.js.map +1 -0
  354. package/bundle/standalone/node_modules/kxta-core/dist/inference/cache-manager.d.ts +41 -0
  355. package/bundle/standalone/node_modules/kxta-core/dist/inference/cache-manager.d.ts.map +1 -0
  356. package/bundle/standalone/node_modules/kxta-core/dist/inference/cache-manager.js +140 -0
  357. package/bundle/standalone/node_modules/kxta-core/dist/inference/cache-manager.js.map +1 -0
  358. package/bundle/standalone/node_modules/kxta-core/dist/inference/index.d.ts +14 -0
  359. package/bundle/standalone/node_modules/kxta-core/dist/inference/index.d.ts.map +1 -0
  360. package/bundle/standalone/node_modules/kxta-core/dist/inference/index.js +15 -0
  361. package/bundle/standalone/node_modules/kxta-core/dist/inference/index.js.map +1 -0
  362. package/bundle/standalone/node_modules/kxta-core/dist/inference/runtime.d.ts +132 -0
  363. package/bundle/standalone/node_modules/kxta-core/dist/inference/runtime.d.ts.map +1 -0
  364. package/bundle/standalone/node_modules/kxta-core/dist/inference/runtime.js +311 -0
  365. package/bundle/standalone/node_modules/kxta-core/dist/inference/runtime.js.map +1 -0
  366. package/bundle/standalone/node_modules/kxta-core/dist/inference/types.d.ts +53 -0
  367. package/bundle/standalone/node_modules/kxta-core/dist/inference/types.d.ts.map +1 -0
  368. package/bundle/standalone/node_modules/kxta-core/dist/inference/types.js +6 -0
  369. package/bundle/standalone/node_modules/kxta-core/dist/inference/types.js.map +1 -0
  370. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +26 -10
  371. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -1
  372. package/bundle/standalone/node_modules/kxta-core/dist/journal/event-triage.d.ts +31 -0
  373. package/bundle/standalone/node_modules/kxta-core/dist/journal/event-triage.d.ts.map +1 -0
  374. package/bundle/standalone/node_modules/kxta-core/dist/journal/event-triage.js +94 -0
  375. package/bundle/standalone/node_modules/kxta-core/dist/journal/event-triage.js.map +1 -0
  376. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js +2 -2
  377. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js.map +1 -1
  378. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.d.ts.map +1 -1
  379. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js +5 -0
  380. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js.map +1 -1
  381. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.d.ts.map +1 -1
  382. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js +30 -5
  383. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tool-classes.js.map +1 -1
  384. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js +2 -2
  385. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +34 -0
  386. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -1
  387. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +251 -6
  388. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -1
  389. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +1 -0
  390. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -1
  391. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.d.ts +8 -0
  392. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.d.ts.map +1 -0
  393. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.js +8 -0
  394. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/alerts.js.map +1 -0
  395. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.d.ts +31 -0
  396. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.d.ts.map +1 -0
  397. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.js +55 -0
  398. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/entry.js.map +1 -0
  399. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.d.ts +10 -0
  400. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.d.ts.map +1 -0
  401. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.js +7 -0
  402. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/index.js.map +1 -0
  403. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.d.ts +46 -0
  404. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.d.ts.map +1 -0
  405. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.js +113 -0
  406. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/install.js.map +1 -0
  407. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.d.ts +3 -0
  408. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.d.ts.map +1 -0
  409. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.js +115 -0
  410. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/claude-code.js.map +1 -0
  411. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.d.ts +3 -0
  412. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.d.ts.map +1 -0
  413. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.js +76 -0
  414. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/codex.js.map +1 -0
  415. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.d.ts +3 -0
  416. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.d.ts.map +1 -0
  417. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.js +64 -0
  418. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/continue.js.map +1 -0
  419. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.d.ts +3 -0
  420. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.d.ts.map +1 -0
  421. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.js +90 -0
  422. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/hermes.js.map +1 -0
  423. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.d.ts +3 -0
  424. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.d.ts.map +1 -0
  425. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.js +17 -0
  426. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/index.js.map +1 -0
  427. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.d.ts +31 -0
  428. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.d.ts.map +1 -0
  429. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.js +136 -0
  430. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/installers/json-servers.js.map +1 -0
  431. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.d.ts +5 -0
  432. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.d.ts.map +1 -0
  433. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.js +19 -0
  434. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/rules.js.map +1 -0
  435. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.d.ts +5 -0
  436. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.d.ts.map +1 -0
  437. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.js +62 -0
  438. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/tools.generated.js.map +1 -0
  439. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.d.ts +55 -0
  440. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.d.ts.map +1 -0
  441. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.js +2 -0
  442. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/types.js.map +1 -0
  443. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.d.ts +3 -0
  444. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.d.ts.map +1 -0
  445. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.js +25 -0
  446. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/write.js.map +1 -0
  447. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.d.ts +5 -0
  448. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.d.ts.map +1 -0
  449. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.js +17 -0
  450. package/bundle/standalone/node_modules/kxta-core/dist/mcp-install/yaml-config.js.map +1 -0
  451. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -1
  452. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +12 -1
  453. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -1
  454. package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.js +1 -1
  455. package/bundle/standalone/node_modules/kxta-core/dist/rerank/arbitrator.d.ts +29 -0
  456. package/bundle/standalone/node_modules/kxta-core/dist/rerank/arbitrator.d.ts.map +1 -0
  457. package/bundle/standalone/node_modules/kxta-core/dist/rerank/arbitrator.js +68 -0
  458. package/bundle/standalone/node_modules/kxta-core/dist/rerank/arbitrator.js.map +1 -0
  459. package/bundle/standalone/node_modules/kxta-core/dist/rerank/engine.d.ts +57 -0
  460. package/bundle/standalone/node_modules/kxta-core/dist/rerank/engine.d.ts.map +1 -0
  461. package/bundle/standalone/node_modules/kxta-core/dist/rerank/engine.js +199 -0
  462. package/bundle/standalone/node_modules/kxta-core/dist/rerank/engine.js.map +1 -0
  463. package/bundle/standalone/node_modules/kxta-core/dist/rerank/index.d.ts +7 -0
  464. package/bundle/standalone/node_modules/kxta-core/dist/rerank/index.d.ts.map +1 -0
  465. package/bundle/standalone/node_modules/kxta-core/dist/rerank/index.js +8 -0
  466. package/bundle/standalone/node_modules/kxta-core/dist/rerank/index.js.map +1 -0
  467. package/bundle/standalone/node_modules/kxta-core/dist/rerank/types.d.ts +50 -0
  468. package/bundle/standalone/node_modules/kxta-core/dist/rerank/types.d.ts.map +1 -0
  469. package/bundle/standalone/node_modules/kxta-core/dist/rerank/types.js +2 -0
  470. package/bundle/standalone/node_modules/kxta-core/dist/rerank/types.js.map +1 -0
  471. package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts +5 -0
  472. package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts.map +1 -1
  473. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js +1 -1
  474. package/bundle/standalone/node_modules/kxta-core/package.json +7 -3
  475. package/bundle/standalone/node_modules/kxta-publish/package.json +3 -3
  476. package/bundle/standalone/package.json +3 -2
  477. package/dist/connect-AL5DTU3K.js +22 -0
  478. package/dist/index.js +7 -1
  479. package/dist/{start-RJVUJT4B.js → start-GP4ERBBP.js} +7 -0
  480. package/package.json +6 -2
  481. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-0cc6597bb67aea3b.js +0 -1
  482. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/hooks/route-0cc6597bb67aea3b.js +0 -1
  483. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/[id]/route-0cc6597bb67aea3b.js +0 -1
  484. package/bundle/standalone/apps/web/.next/static/chunks/app/api/agents/route-0cc6597bb67aea3b.js +0 -1
  485. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-0cc6597bb67aea3b.js +0 -1
  486. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-0cc6597bb67aea3b.js +0 -1
  487. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-0cc6597bb67aea3b.js +0 -1
  488. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-0cc6597bb67aea3b.js +0 -1
  489. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-0cc6597bb67aea3b.js +0 -1
  490. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-0cc6597bb67aea3b.js +0 -1
  491. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-0cc6597bb67aea3b.js +0 -1
  492. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-0cc6597bb67aea3b.js +0 -1
  493. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-0cc6597bb67aea3b.js +0 -1
  494. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-0cc6597bb67aea3b.js +0 -1
  495. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-0cc6597bb67aea3b.js +0 -1
  496. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-0cc6597bb67aea3b.js +0 -1
  497. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-0cc6597bb67aea3b.js +0 -1
  498. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-0cc6597bb67aea3b.js +0 -1
  499. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-0cc6597bb67aea3b.js +0 -1
  500. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-0cc6597bb67aea3b.js +0 -1
  501. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/backlinks/route-0cc6597bb67aea3b.js +0 -1
  502. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-0cc6597bb67aea3b.js +0 -1
  503. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-html/route-0cc6597bb67aea3b.js +0 -1
  504. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-0cc6597bb67aea3b.js +0 -1
  505. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-0cc6597bb67aea3b.js +0 -1
  506. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-0cc6597bb67aea3b.js +0 -1
  507. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-0cc6597bb67aea3b.js +0 -1
  508. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-0cc6597bb67aea3b.js +0 -1
  509. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-0cc6597bb67aea3b.js +0 -1
  510. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-0cc6597bb67aea3b.js +0 -1
  511. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-0cc6597bb67aea3b.js +0 -1
  512. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-0cc6597bb67aea3b.js +0 -1
  513. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-0cc6597bb67aea3b.js +0 -1
  514. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-0cc6597bb67aea3b.js +0 -1
  515. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-0cc6597bb67aea3b.js +0 -1
  516. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-0cc6597bb67aea3b.js +0 -1
  517. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-0cc6597bb67aea3b.js +0 -1
  518. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-0cc6597bb67aea3b.js +0 -1
  519. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-0cc6597bb67aea3b.js +0 -1
  520. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-0cc6597bb67aea3b.js +0 -1
  521. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-0cc6597bb67aea3b.js +0 -1
  522. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-0cc6597bb67aea3b.js +0 -1
  523. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-0cc6597bb67aea3b.js +0 -1
  524. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-0cc6597bb67aea3b.js +0 -1
  525. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-0cc6597bb67aea3b.js +0 -1
  526. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-0cc6597bb67aea3b.js +0 -1
  527. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-0cc6597bb67aea3b.js +0 -1
  528. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-0cc6597bb67aea3b.js +0 -1
  529. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-0cc6597bb67aea3b.js +0 -1
  530. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-0cc6597bb67aea3b.js +0 -1
  531. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-0cc6597bb67aea3b.js +0 -1
  532. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-0cc6597bb67aea3b.js +0 -1
  533. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reports/resources/[name]/route-0cc6597bb67aea3b.js +0 -1
  534. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-0cc6597bb67aea3b.js +0 -1
  535. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-0cc6597bb67aea3b.js +0 -1
  536. package/bundle/standalone/apps/web/.next/static/chunks/app/api/version-check/route-0cc6597bb67aea3b.js +0 -1
  537. package/bundle/standalone/apps/web/.next/static/chunks/app/api/welcome/route-0cc6597bb67aea3b.js +0 -1
  538. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-0cc6597bb67aea3b.js +0 -1
  539. package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-f9542f9f518f9257.js +0 -1
  540. package/bundle/standalone/apps/web/.next/static/chunks/app/page-19695d4fd9fa5c0a.js +0 -1
  541. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-0cc6597bb67aea3b.js +0 -1
  542. /package/bundle/standalone/apps/web/.next/static/{KgyobLEcr42ig4jXUMcNO → olhhWqI4356zOu5Kz_S1K}/_buildManifest.js +0 -0
  543. /package/bundle/standalone/apps/web/.next/static/{KgyobLEcr42ig4jXUMcNO → olhhWqI4356zOu5Kz_S1K}/_ssgManifest.js +0 -0
@@ -21,13 +21,22 @@ export function emitCommand(ctx, agent, event) {
21
21
  parts.push("--event", event);
22
22
  return parts.join(" ");
23
23
  }
24
+ // PowerShell twin of emitCommand: single quotes keep `$` and spaces literal, and an embedded quote is doubled.
25
+ const psq = (s) => `'${s.replace(/'/g, "''")}'`;
26
+ export function psEmitCommand(ctx, agent, event) {
27
+ const nc = nodeCmdOf(ctx);
28
+ const parts = [nc === "node" ? "node" : `& ${psq(nc)}`, psq(stagedEmitterPath(hostDirOf(ctx))), "--agent", agent, "--data-dir", psq(hostDirOf(ctx))];
29
+ if (event)
30
+ parts.push("--event", event);
31
+ return parts.join(" ");
32
+ }
24
33
  export function isOwned(command) {
25
34
  return typeof command === "string" && (/hooks[\\/]emit\.mjs/).test(command);
26
35
  }
27
36
  export function readJsonConfig(path) {
28
37
  if (!existsSync(path))
29
38
  return {};
30
- const text = readFileSync(path, "utf8");
39
+ const text = readFileSync(path, "utf8").replace(/^\uFEFF/, "");
31
40
  if (text.trim() === "")
32
41
  return {};
33
42
  try {
@@ -52,22 +61,13 @@ function danglingLinkTarget(path) {
52
61
  return null;
53
62
  }
54
63
  }
55
- export function writeJsonConfig(path, value, dryRun = false) {
56
- const next = JSON.stringify(value, null, 2) + "\n";
64
+ // Atomic write that goes through symlinks (dotfile managers) and keeps the target's mode: replacing the path itself would break the link and can widen a 0600 file.
65
+ export function writeTextConfig(path, next, dryRun = false) {
57
66
  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
+ if (exists && readFileSync(path, "utf8") === next)
67
68
  return false;
68
69
  if (dryRun)
69
70
  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
71
  const real = exists ? realpathSync(path) : danglingLinkTarget(path) ?? path;
72
72
  const mode = exists ? statSync(real).mode & 0o777 : 0o644;
73
73
  mkdirSync(dirname(real), { recursive: true });
@@ -77,4 +77,18 @@ export function writeJsonConfig(path, value, dryRun = false) {
77
77
  renameSync(tmp, real);
78
78
  return true;
79
79
  }
80
+ export function writeJsonConfig(path, value, dryRun = false) {
81
+ const next = JSON.stringify(value, null, 2) + "\n";
82
+ const current = existsSync(path) ? readFileSync(path, "utf8") : null;
83
+ let same = false;
84
+ if (current !== null) {
85
+ try {
86
+ same = JSON.stringify(JSON.parse(current)) === JSON.stringify(value);
87
+ }
88
+ catch { /* empty or unparsable → rewrite */ }
89
+ }
90
+ if (same)
91
+ return false;
92
+ return writeTextConfig(path, next, dryRun);
93
+ }
80
94
  //# sourceMappingURL=json-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-config.js","sourceRoot":"","sources":["../../../src/hooks/installers/json-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrJ,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAE3C,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC1B;IAAnB,YAAmB,IAAY,EAAE,KAAc;QAC7C,KAAK,CAAC,GAAG,IAAI,uBAAuB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QADxG,SAAI,GAAJ,IAAI,CAAQ;IAE/B,CAAC;CACF;AAED,MAAM,CAAC,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC;AAE9D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAe,EAAU,EAAE,CAAC,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,OAAO,CAAC;AAErF,uLAAuL;AACvL,MAAM,CAAC,MAAM,SAAS,G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,CAAC"}
@@ -1,3 +1,5 @@
1
+ export type McpApproval = "prompt" | "safe" | "all";
2
+ export declare const MCP_APPROVALS: readonly McpApproval[];
1
3
  export interface AgentRow {
2
4
  id: string;
3
5
  name: string;
@@ -9,6 +11,11 @@ export interface AgentRow {
9
11
  hooks_installed_at: string | null;
10
12
  hooks_verified_at: string | null;
11
13
  last_hook_event_at: string | null;
14
+ mcp_supported: boolean;
15
+ mcp_installed: boolean;
16
+ mcp_version: string | null;
17
+ mcp_installed_at: string | null;
18
+ mcp_approval: McpApproval;
12
19
  }
13
20
  export declare function syncAgentRows(): void;
14
21
  export declare function listAgents(): AgentRow[];
@@ -17,4 +24,8 @@ export declare function markInstalled(id: string, version: string): void;
17
24
  export declare function markUninstalled(id: string): void;
18
25
  export declare function markVerified(id: string, ts: string): void;
19
26
  export declare function alerts(now?: Date): AgentRow[];
27
+ export declare function markMcpInstalled(id: string, signature: string, approval: McpApproval): void;
28
+ export declare function markMcpUninstalled(id: string): void;
29
+ export declare function setMcpApproval(id: string, approval: McpApproval): void;
30
+ export declare function mcpAlerts(): AgentRow[];
20
31
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/hooks/registry.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAUD,wBAAgB,aAAa,IAAI,IAAI,CAOpC;AAED,wB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AOpC;AAED,wBAAgB,UAAU,IAAI,QAAQ,EAAE,CAcvC;AAMD,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAG7D;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAKhD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAIzD;AAED,wBAAgB,MAAM,CAAC,GAAG,GAAE,IAAiB,GAAG,QAAQ,EAAE,CAMzD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAI3F;AAGD,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAInD;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAItE;AAED,wBAAgB,SAAS,IAAI,QAAQ,EAAE,CAEtC"}
@@ -1,14 +1,15 @@
1
1
  import { getDatabase } from "../db/index.js";
2
2
  import { AGENTS, isAgentId } from "./agents.js";
3
+ export const MCP_APPROVALS = ["prompt", "safe", "all"];
3
4
  const UNVERIFIED_ALERT_DAYS = 7;
4
5
  export function syncAgentRows() {
5
6
  const db = getDatabase();
6
7
  const up = db.prepare(`
7
- INSERT INTO agents (id, hooks_supported) VALUES (?, ?)
8
- ON CONFLICT(id) DO UPDATE SET hooks_supported = excluded.hooks_supported
8
+ INSERT INTO agents (id, hooks_supported, mcp_supported) VALUES (?, ?, ?)
9
+ ON CONFLICT(id) DO UPDATE SET hooks_supported = excluded.hooks_supported, mcp_supported = excluded.mcp_supported
9
10
  `);
10
11
  db.transaction(() => { for (const a of AGENTS)
11
- up.run(a.id, a.hooksSupported ? 1 : 0); })();
12
+ up.run(a.id, a.hooksSupported ? 1 : 0, a.mcpInstallable ? 1 : 0); })();
12
13
  }
13
14
  export function listAgents() {
14
15
  const rows = getDatabase().prepare(`SELECT * FROM agents`).all();
@@ -20,6 +21,8 @@ export function listAgents() {
20
21
  enabled: r.enabled === 1, hooks_supported: r.hooks_supported === 1, onboardable: a.onboardable, hooks_installed: r.hooks_installed === 1,
21
22
  hooks_version: r.hooks_version, hooks_installed_at: r.hooks_installed_at,
22
23
  hooks_verified_at: r.hooks_verified_at, last_hook_event_at: r.last_hook_event_at,
24
+ mcp_supported: r.mcp_supported === 1, mcp_installed: r.mcp_installed === 1, mcp_version: r.mcp_version,
25
+ mcp_installed_at: r.mcp_installed_at, mcp_approval: MCP_APPROVALS.includes(r.mcp_approval) ? r.mcp_approval : "prompt",
23
26
  };
24
27
  });
25
28
  }
@@ -55,4 +58,27 @@ export function alerts(now = new Date()) {
55
58
  return listAgents().filter((r) => r.enabled && r.hooks_supported &&
56
59
  ((!r.hooks_installed && r.hooks_verified_at === null) || (r.hooks_installed && r.hooks_verified_at === null && (r.hooks_installed_at ?? "") < cutoff)));
57
60
  }
61
+ export function markMcpInstalled(id, signature, approval) {
62
+ if (!isAgentId(id))
63
+ throw new Error(`unknown agent: ${id}`);
64
+ touch(`UPDATE agents SET mcp_installed = 1, mcp_version = ?, mcp_approval = ?, mcp_installed_at = strftime('%Y-%m-%dT%H:%M:%fZ','now'),
65
+ updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, signature, approval, id);
66
+ }
67
+ // Unlike hook uninstall this leaves `enabled` alone: the agent may still want its hooks.
68
+ export function markMcpUninstalled(id) {
69
+ if (!isAgentId(id))
70
+ throw new Error(`unknown agent: ${id}`);
71
+ touch(`UPDATE agents SET mcp_installed = 0, mcp_version = NULL, mcp_installed_at = NULL, mcp_approval = 'prompt',
72
+ updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, id);
73
+ }
74
+ export function setMcpApproval(id, approval) {
75
+ if (!isAgentId(id))
76
+ throw new Error(`unknown agent: ${id}`);
77
+ if (!MCP_APPROVALS.includes(approval))
78
+ throw new Error(`invalid approval level: ${String(approval)}`);
79
+ touch(`UPDATE agents SET mcp_approval = ?, updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') WHERE id = ?`, approval, id);
80
+ }
81
+ export function mcpAlerts() {
82
+ return listAgents().filter((r) => r.enabled && r.mcp_supported && !r.mcp_installed);
83
+ }
58
84
  //# sourceMappingURL=registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/hooks/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAqBhD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,UAAU,aAAa;IAC3B,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC;;;GAGrB,CAAC,CAAC;IACH,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,GAAG,EAAc,CAAC;IAC7E,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CA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CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC5D,KAAK,CAAC;wEACgE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AACnG,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC5D,KAAK,CAAC;wEACgE,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAAU,EAAE,QAAqB;IAC9D,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACtG,KAAK,CAAC,oGAAoG,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC5H,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;AACtF,CAAC"}
@@ -11,7 +11,7 @@ export { getSetting, setSetting, deleteSetting } from "./metadata/settings.js";
11
11
  export { commitFile, commitDelete, getHistory, getDiff, restoreVersion, syncBackup, syncGlobalVault, getGlobalRemote, setGlobalRemote, isValidGitRemoteUrl, type SyncStage } from "./git/index.js";
12
12
  export { withLock, track, inFlightCount, isShuttingDown, setShuttingDown, awaitDrain } from "./util/safety.js";
13
13
  export { computeContentClass, type ComputeContentClassArgs } from "./content-class/index.js";
14
- export { RULE_BLOCK_VERSION, RULES_BLOCK_BODY, SCAFFOLDS, detectAgentContextFiles, parseMarker, injectOrUpdate, syncAgentRules, checkAgentRulesStatus, InjectError, type AgentId, type ParseResult, type InjectResult, type SyncOpts, type SyncResult, type SyncResultEntry, type SyncSkippedEntry, } from "./agent-rules/index.js";
14
+ export { RULE_BLOCK_VERSION, RULES_BLOCK_BODY, RULES_REFERENCE_BODY, KONTEXTA_MD, SCAFFOLDS, detectAgentContextFiles, parseMarker, injectOrUpdate, syncAgentRules, checkAgentRulesStatus, InjectError, type AgentId, type ParseResult, type InjectResult, type SyncOpts, type SyncResult, type SyncResultEntry, type SyncSkippedEntry, } from "./agent-rules/index.js";
15
15
  export { createFileWatcher, type WatcherEvent } from "./watcher/index.js";
16
16
  export { bundleSearch, type BundleFormat, type BundleOptions, type BundleResult, type BundleIncludedItem, type BundleSkippedItem } from "./bundle/index.js";
17
17
  export { estimateTokensFromBuffer, estimateTokensFromString } from "./util/tokens.js";
@@ -21,8 +21,12 @@ export { whatsNew, resolveSince, type WhatsNewOptions, type WhatsNewResult, type
21
21
  export { projectMap, type ProjectMapOptions, type ProjectMapResult, type ProjectMapStats, } from "./project-map/index.js";
22
22
  export * from "./journal/index.js";
23
23
  export * from "./hooks/index.js";
24
+ export * from "./mcp-install/index.js";
24
25
  export * from "./profile/index.js";
25
26
  export * from "./calendar/index.js";
27
+ export * from "./inference/index.js";
28
+ export * from "./rerank/index.js";
29
+ export * from "./decision/index.js";
26
30
  export { writeResource, readResource, listResources, deleteResource, resourceUrlFor, resourceSrcFor, mimeFor } from "./reports/resources.js";
27
31
  export { sanitizeHtml } from "./reports/sanitize.js";
28
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,C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AAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EACL,QAAQ,EAAE,YAAY,EACtB,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,GAC/E,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,GACpE,MAAM,wBAAwB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -10,7 +10,7 @@ export { getSetting, setSetting, deleteSetting } from "./metadata/settings.js";
10
10
  export { commitFile, commitDelete, getHistory, getDiff, restoreVersion, syncBackup, syncGlobalVault, getGlobalRemote, setGlobalRemote, isValidGitRemoteUrl } from "./git/index.js";
11
11
  export { withLock, track, inFlightCount, isShuttingDown, setShuttingDown, awaitDrain } from "./util/safety.js";
12
12
  export { computeContentClass } from "./content-class/index.js";
13
- export { RULE_BLOCK_VERSION, RULES_BLOCK_BODY, SCAFFOLDS, detectAgentContextFiles, parseMarker, injectOrUpdate, syncAgentRules, checkAgentRulesStatus, InjectError, } from "./agent-rules/index.js";
13
+ export { RULE_BLOCK_VERSION, RULES_BLOCK_BODY, RULES_REFERENCE_BODY, KONTEXTA_MD, SCAFFOLDS, detectAgentContextFiles, parseMarker, injectOrUpdate, syncAgentRules, checkAgentRulesStatus, InjectError, } from "./agent-rules/index.js";
14
14
  export { createFileWatcher } from "./watcher/index.js";
15
15
  export { bundleSearch } from "./bundle/index.js";
16
16
  export { estimateTokensFromBuffer, estimateTokensFromString } from "./util/tokens.js";
@@ -19,8 +19,12 @@ export { whatsNew, resolveSince, } from "./whats-new/index.js";
19
19
  export { projectMap, } from "./project-map/index.js";
20
20
  export * from "./journal/index.js";
21
21
  export * from "./hooks/index.js";
22
+ export * from "./mcp-install/index.js";
22
23
  export * from "./profile/index.js";
23
24
  export * from "./calendar/index.js";
25
+ export * from "./inference/index.js";
26
+ export * from "./rerank/index.js";
27
+ export * from "./decision/index.js";
24
28
  export { writeResource, readResource, listResources, deleteResource, resourceUrlFor, resourceSrcFor, mimeFor } from "./reports/resources.js";
25
29
  export { sanitizeHtml } from "./reports/sanitize.js";
26
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxJ,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3L,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,EAAE,CAAC;AACnK,OAAO,EAAE,Y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AAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7I,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Models root of the installed kontexta-reranker-model package, or null when it is absent or lacks weights for `modelId`. */
2
+ export declare function resolveBundledModelsDir(modelId: string, packageDir?: string): string | null;
3
+ //# sourceMappingURL=bundled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundled.d.ts","sourceRoot":"","sources":["../../src/inference/bundled.ts"],"names":[],"mappings":"AAcA,8HAA8H;AAC9H,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW3F"}
@@ -0,0 +1,27 @@
1
+ import { existsSync, readdirSync } from "node:fs";
2
+ import { createRequire } from "node:module";
3
+ import { dirname, join } from "node:path";
4
+ const PACKAGE = "kontexta-reranker-model";
5
+ function hasOnnx(dir) {
6
+ try {
7
+ return existsSync(dir) && readdirSync(dir).some((f) => f.endsWith(".onnx"));
8
+ }
9
+ catch {
10
+ return false;
11
+ }
12
+ }
13
+ /** Models root of the installed kontexta-reranker-model package, or null when it is absent or lacks weights for `modelId`. */
14
+ export function resolveBundledModelsDir(modelId, packageDir) {
15
+ let dir = packageDir;
16
+ if (!dir) {
17
+ try {
18
+ dir = dirname(createRequire(import.meta.url).resolve(`${PACKAGE}/package.json`));
19
+ }
20
+ catch {
21
+ return null;
22
+ }
23
+ }
24
+ const modelsDir = join(dir, "models");
25
+ return hasOnnx(join(modelsDir, ...modelId.split("/"), "onnx")) ? modelsDir :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"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Model Cache Manager — resolves local cache directories for ONNX model weights
3
+ * and provides integrity checks before attempting online downloads.
4
+ *
5
+ * Resolution order:
6
+ * 1. $KONTEXTA_MODEL_CACHE environment variable (if set)
7
+ * 2. <dataDir>/models (where dataDir comes from util/paths.ts)
8
+ * 3. ~/.cache/kontexta/models
9
+ */
10
+ /**
11
+ * Set (or clear, when `dir` is null) an explicit model cache directory.
12
+ * Takes precedence over the environment and data-dir resolution order.
13
+ */
14
+ export declare function setModelCacheDirOverride(dir: string | null): void;
15
+ /**
16
+ * Returns the resolved model cache directory path.
17
+ */
18
+ export declare function getModelCacheDir(): string;
19
+ /**
20
+ * Construct the absolute path where a specific model's weights are stored.
21
+ * Checks both namespaced under HF identifier and safe sanitized name.
22
+ */
23
+ export declare function modelCachePath(modelId: string): string;
24
+ /**
25
+ * Check whether a model appears to be fully cached locally.
26
+ * Verifies the cache directory exists and contains at least one model artifact.
27
+ */
28
+ export declare function isModelCachedLocally(modelId: string): boolean;
29
+ /**
30
+ * Check if any of the given model IDs are cached locally.
31
+ */
32
+ export declare function anyModelsCached(modelIds: string[]): boolean;
33
+ /**
34
+ * Invalidate (remove) the cache entry for a specific model.
35
+ */
36
+ export declare function invalidateModelCache(modelId: string): void;
37
+ /**
38
+ * Reset the internal cache dir singleton (useful for testing).
39
+ */
40
+ export declare function _resetCacheDir(): void;
41
+ //# sourceMappingURL=cache-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-manager.d.ts","sourceRoot":"","sources":["../../src/inference/cache-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAeH;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAIjE;AA8CD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAyB7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAE3D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU1D;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAGrC"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Model Cache Manager — resolves local cache directories for ONNX model weights
3
+ * and provides integrity checks before attempting online downloads.
4
+ *
5
+ * Resolution order:
6
+ * 1. $KONTEXTA_MODEL_CACHE environment variable (if set)
7
+ * 2. <dataDir>/models (where dataDir comes from util/paths.ts)
8
+ * 3. ~/.cache/kontexta/models
9
+ */
10
+ import { existsSync, mkdirSync, readdirSync, rmSync } from "node:fs";
11
+ import { homedir } from "node:os";
12
+ import { join } from "node:path";
13
+ import { getDataDir } from "../util/paths.js";
14
+ let _cacheDir = null;
15
+ /**
16
+ * Explicit cache-dir override (highest precedence), set from
17
+ * `system1.cache_dir` in kontexta.json. Relative paths are resolved against
18
+ * the current working directory.
19
+ */
20
+ let _overrideDir = null;
21
+ /**
22
+ * Set (or clear, when `dir` is null) an explicit model cache directory.
23
+ * Takes precedence over the environment and data-dir resolution order.
24
+ */
25
+ export function setModelCacheDirOverride(dir) {
26
+ _overrideDir = dir && dir.trim() ? dir : null;
27
+ // The override changes resolution; force re-resolution on next access.
28
+ _cacheDir = null;
29
+ }
30
+ /**
31
+ * Resolve the canonical model cache directory.
32
+ * Caches the result on first call.
33
+ */
34
+ function resolveCacheDir() {
35
+ if (_cacheDir)
36
+ return _cacheDir;
37
+ // Priority 0: explicit runtime override (system1.cache_dir)
38
+ if (_overrideDir) {
39
+ _cacheDir = _overrideDir;
40
+ mkdirSync(_cacheDir, { recursive: true });
41
+ return _cacheDir;
42
+ }
43
+ // Priority 1: explicit env override
44
+ const envCache = process.env.KONTEXTA_MODEL_CACHE;
45
+ if (envCache) {
46
+ _cacheDir = envCache;
47
+ mkdirSync(_cacheDir, { recursive: true });
48
+ return _cacheDir;
49
+ }
50
+ // Priority 2: local .cache/models in workspace (if present)
51
+ const localCache = join(process.cwd(), ".cache", "models");
52
+ if (existsSync(localCache)) {
53
+ _cacheDir = localCache;
54
+ return _cacheDir;
55
+ }
56
+ // Priority 3: <dataDir>/models
57
+ const dataDir = getDataDir();
58
+ if (dataDir) {
59
+ _cacheDir = join(dataDir, "models");
60
+ mkdirSync(_cacheDir, { recursive: true });
61
+ return _cacheDir;
62
+ }
63
+ // Priority 4: ~/.cache/kontexta/models
64
+ const home = process.env.HOME || process.env.USERPROFILE || homedir();
65
+ _cacheDir = join(home, ".cache", "kontexta", "models");
66
+ mkdirSync(_cacheDir, { recursive: true });
67
+ return _cacheDir;
68
+ }
69
+ /**
70
+ * Returns the resolved model cache directory path.
71
+ */
72
+ export function getModelCacheDir() {
73
+ return resolveCacheDir();
74
+ }
75
+ /**
76
+ * Construct the absolute path where a specific model's weights are stored.
77
+ * Checks both namespaced under HF identifier and safe sanitized name.
78
+ */
79
+ export function modelCachePath(modelId) {
80
+ const directPath = join(resolveCacheDir(), modelId);
81
+ if (existsSync(directPath))
82
+ return directPath;
83
+ const safeName = modelId.replace(/[\/\\:]/g, "_");
84
+ return join(resolveCacheDir(), safeName);
85
+ }
86
+ /**
87
+ * Check whether a model appears to be fully cached locally.
88
+ * Verifies the cache directory exists and contains at least one model artifact.
89
+ */
90
+ export function isModelCachedLocally(modelId) {
91
+ const candidates = [
92
+ join(resolveCacheDir(), modelId),
93
+ join(resolveCacheDir(), modelId.replace(/[\/\\:]/g, "_")),
94
+ ];
95
+ for (const cacheDir of candidates) {
96
+ if (!existsSync(cacheDir))
97
+ continue;
98
+ try {
99
+ const items = readdirSync(cacheDir, { recursive: true });
100
+ const hasArtifact = items.some((f) => f.endsWith(".safetensors") ||
101
+ f.endsWith(".onnx") ||
102
+ f.endsWith("config.json") ||
103
+ f.endsWith("tokenizer.json"));
104
+ if (hasArtifact)
105
+ return true;
106
+ }
107
+ catch {
108
+ continue;
109
+ }
110
+ }
111
+ return false;
112
+ }
113
+ /**
114
+ * Check if any of the given model IDs are cached locally.
115
+ */
116
+ export function anyModelsCached(modelIds) {
117
+ return modelIds.some((id) => isModelCachedLocally(id));
118
+ }
119
+ /**
120
+ * Invalidate (remove) the cache entry for a specific model.
121
+ */
122
+ export function invalidateModelCache(modelId) {
123
+ const candidates = [
124
+ join(resolveCacheDir(), modelId),
125
+ join(resolveCacheDir(), modelId.replace(/[\/\\:]/g, "_")),
126
+ ];
127
+ for (const cacheDir of candidates) {
128
+ if (existsSync(cacheDir)) {
129
+ rmSync(cacheDir, { recursive: true, force: true });
130
+ }
131
+ }
132
+ }
133
+ /**
134
+ * Reset the internal cache dir singleton (useful for testing).
135
+ */
136
+ export function _resetCacheDir() {
137
+ _cacheDir = null;
138
+ _overrideDir = null;
139
+ }
140
+ //# sourceMappingURL=cache-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-manager.js","sourceRoot":"","sources":["../../src/inference/cache-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,IAAI,SAAS,GAAkB,IAAI,CAAC;AACpC;;;;GAIG;AACH,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAkB;IACzD,YAAY,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,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C;gBACzB,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAC/B,CAAC;YACF,IAAI,WAAW;gBAAE,OAAO,IAAI,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAkB;IAChD,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,eAAe,EAAE,EAAE,OAAO,CAAC;QAChC,IAAI,CAAC,eAAe,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;KAC1D,CAAC;IACF,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;QAClC,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,SAAS,GAAG,IAAI,CAAC;IACjB,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Inference module — shared local inference substrate for System 1 decision models.
3
+ *
4
+ * Provides:
5
+ * - Type definitions for model configurations and sessions
6
+ * - Model cache management with priority-based directory resolution
7
+ * - Singleton inference runtime with lazy loading and graceful fallback
8
+ */
9
+ export type { ExecutionDevice, ModelRuntimeConfig, ModelSessionStatus, ModelTier, ModelRegistryEntry, } from "./types.js";
10
+ export { getModelCacheDir, modelCachePath, isModelCachedLocally, anyModelsCached, setModelCacheDirOverride, invalidateModelCache, _resetCacheDir, } from "./cache-manager.js";
11
+ export { resolveBundledModelsDir } from "./bundled.js";
12
+ export { inferenceRuntime, getModel, isLoaded, getStatus, getAllStatuses, setInferenceDevice, getInferenceDevice, } from "./runtime.js";
13
+ export type { ModelSession } from "./runtime.js";
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inference/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Inference module — shared local inference substrate for System 1 decision models.
3
+ *
4
+ * Provides:
5
+ * - Type definitions for model configurations and sessions
6
+ * - Model cache management with priority-based directory resolution
7
+ * - Singleton inference runtime with lazy loading and graceful fallback
8
+ */
9
+ // Cache manager
10
+ export { getModelCacheDir, modelCachePath, isModelCachedLocally, anyModelsCached, setModelCacheDirOverride, invalidateModelCache, _resetCacheDir, } from "./cache-manager.js";
11
+ // Bundled weights (kontexta-reranker-model)
12
+ export { resolveBundledModelsDir } from "./bundled.js";
13
+ // Runtime singleton
14
+ export { inferenceRuntime, getModel, isLoaded, getStatus, getAllStatuses, setInferenceDevice, getInferenceDevice, } from "./runtime.js";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inference/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,gBAAgB;AAChB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,4CAA4C;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,oBAAoB;AACpB,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,cAAc,CAAC"}