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
@@ -0,0 +1,68 @@
1
+ // packages/core/src/rerank/arbitrator.ts
2
+ /**
3
+ * Soft content-class arbitrator for reranked candidates.
4
+ *
5
+ * After cross-encoder scoring, applies a Bayesian prior based on the
6
+ * content class of each candidate to resolve the "Dictionary Trap"
7
+ * where BM25 always favors dictionary entries regardless of relevance.
8
+ *
9
+ * The arbitration is additive (not multiplicative) to preserve the
10
+ * relative ranking within each class while allowing cross-class
11
+ * reordering when scores are close.
12
+ */
13
+ /**
14
+ * Beta coefficients for content-class priors.
15
+ *
16
+ * - dictionary: +0.08 — authoritative KB content gets a small boost
17
+ * - note: 0.0 — neutral, no prior adjustment
18
+ * - journal: -0.02 — journal entries are ephemeral, slight penalty
19
+ * - project: 0.0 — neutral, no prior adjustment
20
+ * - null/unknown: 0.0 — default
21
+ */
22
+ const CLASS_PRIORS = {
23
+ dictionary: 0.08,
24
+ note: 0.0,
25
+ journal: -0.02,
26
+ project: 0.0,
27
+ default: 0.0,
28
+ };
29
+ /**
30
+ * Arbitrate reranked candidates by adding class-specific Bayesian priors.
31
+ *
32
+ * For each candidate:
33
+ * final_score = sigmoid_score + β(content_class) + dictionary_boost
34
+ *
35
+ * Candidates are then sorted descending by final_score.
36
+ *
37
+ * @param scored - Array of candidates already scored by the cross-encoder
38
+ * @param opts - Optional overrides
39
+ * @param opts.dictionary_boost - Additional boost for dictionary class (default: 0.08 from CLASS_PRIORS)
40
+ * @returns New array sorted by final_score descending (does not mutate input)
41
+ */
42
+ export function arbitrateCandidates(scored, opts) {
43
+ // If empty, return as-is (no sorting needed)
44
+ if (scored.length === 0)
45
+ return [];
46
+ const dictionaryBoost = opts?.dictionary_boost ?? CLASS_PRIORS.dictionary;
47
+ // Deep copy to avoid mutating the input
48
+ const enriched = scored.map((c) => {
49
+ // Get the class prior
50
+ const contentClass = c.content_class ?? "default";
51
+ const basePrior = Object.hasOwn(CLASS_PRIORS, contentClass)
52
+ ? CLASS_PRIORS[contentClass]
53
+ : CLASS_PRIORS.default;
54
+ // For dictionary class, use the configured dictionary boost
55
+ const beta = contentClass === "dictionary"
56
+ ? dictionaryBoost
57
+ : basePrior;
58
+ const finalScore = c.sigmoid_score + beta;
59
+ return {
60
+ ...c,
61
+ final_score: finalScore,
62
+ };
63
+ });
64
+ // Sort descending by final_score
65
+ enriched.sort((a, b) => b.final_score - a.final_score);
66
+ return enriched;
67
+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C,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;IAEvD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Cross-encoder reranking engine.
3
+ *
4
+ * Loads `Xenova/ms-marco-MiniLM-L-6-v2` via @huggingface/transformers
5
+ * and scores candidate passages using pairwise cross-attention.
6
+ *
7
+ * Always returns `null` on failure — never throws — so callers can
8
+ * fall back to pure BM25 ordering.
9
+ */
10
+ import type { RerankCandidate, ScoredCandidate, RerankOptions, RerankEngineStatus } from "./types.js";
11
+ /** Default model identifier for reranking. */
12
+ export declare const DEFAULT_MODEL = "Xenova/ms-marco-MiniLM-L-6-v2";
13
+ declare class RerankEngine {
14
+ private modelId;
15
+ private maxLength;
16
+ constructor(opts?: Partial<RerankOptions>);
17
+ /**
18
+ * Rerank a list of BM25 candidates using a cross-encoder model.
19
+ *
20
+ * Each candidate's passage is truncated to title + first 1000 characters.
21
+ * The model produces a raw logit per (query, passage) pair, which is
22
+ * sigmoid-normalized.
23
+ *
24
+ * Returns `null` on any error or timeout (never throws).
25
+ */
26
+ rerank(query: string, candidates: RerankCandidate[], opts?: Partial<RerankOptions>): Promise<ScoredCandidate[] | null>;
27
+ /**
28
+ * Build a truncated passage from a candidate: title + first N chars of content.
29
+ */
30
+ private buildPassage;
31
+ /**
32
+ * Score a batch of (query, passage) pairs using the feature-extraction pipeline.
33
+ * The cross-encoder produces logits per pair.
34
+ */
35
+ private scoreBatch;
36
+ /**
37
+ * Sigmoid activation function.
38
+ * Maps unbounded logit to [0, 1].
39
+ */
40
+ private sigmoid;
41
+ /**
42
+ * Wrap a promise with a hard timeout.
43
+ * Returns undefined if the promise does not resolve in time.
44
+ */
45
+ private withTimeout;
46
+ /**
47
+ * Get the current status of the rerank engine.
48
+ */
49
+ getStatus(): RerankEngineStatus;
50
+ }
51
+ export declare const rerankEngine: RerankEngine;
52
+ /**
53
+ * Convenience function to rerank candidates with default settings.
54
+ */
55
+ export declare function rerankCandidates(query: string, candidates: RerankCandidate[], opts?: Partial<RerankOptions>): Promise<ScoredCandidate[] | null>;
56
+ export {};
57
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/rerank/engine.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,8CAA8C;AAC9C,eAAO,MAAM,aAAa,kCAAkC,CAAC;AAW7D,cAAM,YAAY;IAChB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC;IAKzC;;;;;;;;OAQG;IACG,MAAM,CACV,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,eAAe,EAAE,EAC7B,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAC5B,OAAO,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC;IAkFpC;;OAEG;IACH,OAAO,CAAC,YAAY;IAUpB;;;OAGG;YACW,UAAU;IAiCxB;;;OAGG;IACH,OAAO,CAAC,OAAO;IAMf;;;OAGG;YACW,WAAW;IAiBzB;;OAEG;IACH,SAAS,IAAI,kBAAkB;CAShC;AAGD,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,eAAe,EAAE,EAC7B,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAC5B,OAAO,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAEnC"}
@@ -0,0 +1,199 @@
1
+ // packages/core/src/rerank/engine.ts
2
+ /**
3
+ * Cross-encoder reranking engine.
4
+ *
5
+ * Loads `Xenova/ms-marco-MiniLM-L-6-v2` via @huggingface/transformers
6
+ * and scores candidate passages using pairwise cross-attention.
7
+ *
8
+ * Always returns `null` on failure — never throws — so callers can
9
+ * fall back to pure BM25 ordering.
10
+ */
11
+ import { inferenceRuntime } from "../inference/runtime.js";
12
+ import { getModelCacheDir } from "../inference/cache-manager.js";
13
+ /** Default model identifier for reranking. */
14
+ export const DEFAULT_MODEL = "Xenova/ms-marco-MiniLM-L-6-v2";
15
+ /** Default hard timeout per reranking invocation (ms). */
16
+ const DEFAULT_TIMEOUT_MS = 300;
17
+ /** Maximum number of characters to use from a candidate's content. */
18
+ const MAX_CONTENT_CHARS = 1000;
19
+ /** Maximum token length for cross-attention. */
20
+ const DEFAULT_MAX_LENGTH = 512;
21
+ class RerankEngine {
22
+ modelId;
23
+ maxLength;
24
+ constructor(opts) {
25
+ this.modelId = opts?.model ?? DEFAULT_MODEL;
26
+ this.maxLength = opts?.max_length ?? DEFAULT_MAX_LENGTH;
27
+ }
28
+ /**
29
+ * Rerank a list of BM25 candidates using a cross-encoder model.
30
+ *
31
+ * Each candidate's passage is truncated to title + first 1000 characters.
32
+ * The model produces a raw logit per (query, passage) pair, which is
33
+ * sigmoid-normalized.
34
+ *
35
+ * Returns `null` on any error or timeout (never throws).
36
+ */
37
+ async rerank(query, candidates, opts) {
38
+ const modelId = opts?.model ?? this.modelId;
39
+ const maxLength = opts?.max_length ?? this.maxLength;
40
+ const timeoutMs = opts?.timeout_ms ?? DEFAULT_TIMEOUT_MS;
41
+ // Limit candidate pool to avoid blowing the timeout
42
+ const limit = opts?.candidate_limit ?? 30;
43
+ const batch = candidates.slice(0, limit);
44
+ if (batch.length === 0)
45
+ return null;
46
+ try {
47
+ // Lazy-load the model session (cached after first call)
48
+ const session = await inferenceRuntime.getModelSession({
49
+ modelId,
50
+ timeoutMs,
51
+ });
52
+ // If model failed to load, return null for graceful fallback
53
+ if (!session.instance)
54
+ return null;
55
+ // Build truncated passages
56
+ const passages = batch.map((c) => this.buildPassage(c));
57
+ let results = null;
58
+ if (session.instance &&
59
+ typeof session.instance === "object" &&
60
+ "tokenizer" in session.instance &&
61
+ "model" in session.instance) {
62
+ const { tokenizer, model } = session.instance;
63
+ const scoreBatch = async () => {
64
+ const inputs = tokenizer(passages.map(() => query), {
65
+ text_pair: passages,
66
+ padding: true,
67
+ truncation: true,
68
+ max_length: maxLength,
69
+ });
70
+ const { logits } = await model(inputs);
71
+ const rawLogits = logits?.data ?? logits?.values ?? [];
72
+ const out = [];
73
+ for (let i = 0; i < batch.length; i++) {
74
+ const raw = typeof rawLogits[i] === "number" ? rawLogits[i] : rawLogits[i]?.[0] ?? 0;
75
+ if (typeof raw !== "number" || Number.isNaN(raw))
76
+ return null;
77
+ out.push(raw);
78
+ }
79
+ return out;
80
+ };
81
+ results = (await this.withTimeout(scoreBatch(), timeoutMs)) ?? null;
82
+ }
83
+ else if (typeof session.instance === "function") {
84
+ const pipe = session.instance;
85
+ const pairs = passages.map((p) => `${query} [SEP] ${p}`);
86
+ results = (await this.withTimeout(this.scoreBatch(pipe, pairs, maxLength), timeoutMs)) ?? null;
87
+ }
88
+ if (!results || results.length === 0)
89
+ return null;
90
+ // Attach scores to candidates
91
+ const scored = batch.map((c, i) => {
92
+ const raw = results[i] ?? 0;
93
+ const sigmoid = this.sigmoid(raw);
94
+ return {
95
+ ...c,
96
+ raw_score: raw,
97
+ sigmoid_score: sigmoid,
98
+ final_score: sigmoid, // arbitrator will adjust this
99
+ };
100
+ });
101
+ return scored;
102
+ }
103
+ catch {
104
+ // Never throw — return null for fallback
105
+ return null;
106
+ }
107
+ }
108
+ /**
109
+ * Build a truncated passage from a candidate: title + first N chars of content.
110
+ */
111
+ buildPassage(candidate) {
112
+ const title = candidate.title.trim();
113
+ const content = candidate.content.trim();
114
+ const truncated = content.slice(0, MAX_CONTENT_CHARS);
115
+ if (title && truncated) {
116
+ return `${title}\n\n${truncated}`;
117
+ }
118
+ return title || truncated || " ";
119
+ }
120
+ /**
121
+ * Score a batch of (query, passage) pairs using the feature-extraction pipeline.
122
+ * The cross-encoder produces logits per pair.
123
+ */
124
+ async scoreBatch(pipe, pairs, maxLength) {
125
+ const results = await pipe(pairs, {
126
+ max_length: maxLength,
127
+ truncation: true,
128
+ });
129
+ // Results is a Tensor — extract scalar logits
130
+ if (results && typeof results === "object") {
131
+ const data = results.data ?? results.values;
132
+ const flat = (Array.isArray(data) ? (Array.isArray(data[0]) ? data.flat() : data) : []);
133
+ const values = [];
134
+ for (const v of flat.slice(0, pairs.length)) {
135
+ const n = typeof v === "number" ? v : (Array.isArray(v) ? v[0] : undefined);
136
+ if (typeof n !== "number" || Number.isNaN(n))
137
+ return null;
138
+ values.push(n);
139
+ }
140
+ // Not enough numeric logits for the batch — treat as a parse failure.
141
+ if (values.length !== pairs.length)
142
+ return null;
143
+ return values;
144
+ }
145
+ // Unparseable output — signal failure so callers fall back to BM25.
146
+ return null;
147
+ }
148
+ /**
149
+ * Sigmoid activation function.
150
+ * Maps unbounded logit to [0, 1].
151
+ */
152
+ sigmoid(x) {
153
+ if (x > 500)
154
+ return 1;
155
+ if (x < -500)
156
+ return 0;
157
+ return 1 / (1 + Math.exp(-x));
158
+ }
159
+ /**
160
+ * Wrap a promise with a hard timeout.
161
+ * Returns undefined if the promise does not resolve in time.
162
+ */
163
+ async withTimeout(promise, timeoutMs) {
164
+ let timer;
165
+ try {
166
+ return await Promise.race([
167
+ promise,
168
+ new Promise((_resolve, reject) => {
169
+ timer = setTimeout(() => reject(new Error("Rerank timeout")), timeoutMs);
170
+ }),
171
+ ]);
172
+ }
173
+ finally {
174
+ if (timer)
175
+ clearTimeout(timer);
176
+ }
177
+ }
178
+ /**
179
+ * Get the current status of the rerank engine.
180
+ */
181
+ getStatus() {
182
+ const modelStatus = inferenceRuntime.getModelStatus(this.modelId);
183
+ return {
184
+ loaded: modelStatus?.loaded ?? false,
185
+ model: this.modelId,
186
+ cache_dir: modelStatus?.cacheDir ?? getModelCacheDir(),
187
+ device: modelStatus?.device ?? inferenceRuntime.detectDevice(),
188
+ };
189
+ }
190
+ }
191
+ // Export singleton instance
192
+ export const rerankEngine = new RerankEngine();
193
+ /**
194
+ * Convenience function to rerank candidates with default settings.
195
+ */
196
+ export async function rerankCandidates(query, candidates, opts) {
197
+ return rerankEngine.rerank(query, candidates, opts);
198
+ }
199
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/rerank/engine.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAQjE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAG,+BAA+B,CAAC;AAE7D,0DAA0D;AAC1D,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,sEAAsE;AACtE,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,gDAAgD;AAChD,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,MAAM,YAAY;IACR,OAAO,CAAS;IAChB,SAAS,CAAS;IAE1B,YAAY,IAA6B;QACvC,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,KAAK,IAAI,aAAa,CAAC;QAC5C,IAAI,CAAC,SAAS,GAAG,IAAI,EAAE,UAAU,IAAI,kBAAkB,CAAC;IAC1D,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,KAAa,EACb,UAA6B,EAC7B,IAA6B;QAE7B,MAAM,OAAO,GAAG,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAI,EAAE,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC;QACrD,MAAM,SAAS,GAAG,IAAI,EAAE,UAAU,IAAI,kBAAkB,CAAC;QAEzD,oDAAoD;QACpD,MAAM,KAAK,GAAG,IAAI,E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B,IAAI,KAAgD,CAAC;QACrD,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,IAAI,CAAC;gBACxB,OAAO;gBACP,IAAI,OAAO,CAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;oBAC1C,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;gBAC3E,CAAC,CAAC;aACH,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK;gBAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,SAAS;QACP,MAAM,WAAW,GAAG,gBAAgB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClE,OAAO;YACL,MAAM,EAAE,WAAW,EAAE,MAAM,IAAI,KAAK;YACpC,KAAK,EAAE,IAAI,CAAC,OAAO;YACnB,SAAS,EAAE,WAAW,EAAE,QAAQ,IAAI,gBAAgB,EAAE;YACtD,MAAM,EAAE,WAAW,EAAE,MAAM,IAAI,gBAAgB,CAAC,YAAY,EAAE;SAC/D,CAAC;IACJ,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAAa,EACb,UAA6B,EAC7B,IAA6B;IAE7B,OAAO,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Re-export all rerank modules for convenient imports.
3
+ */
4
+ export * from "./types.js";
5
+ export * from "./engine.js";
6
+ export { arbitrateCandidates } from "./arbitrator.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rerank/index.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ // packages/core/src/rerank/index.ts
2
+ /**
3
+ * Re-export all rerank modules for convenient imports.
4
+ */
5
+ export * from "./types.js";
6
+ export * from "./engine.js";
7
+ export { arbitrateCandidates } from "./arbitrator.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rerank/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { ContentClass } from "../types.js";
2
+ export interface RerankCandidate {
3
+ id: number;
4
+ title: string;
5
+ path: string;
6
+ content: string;
7
+ content_class: ContentClass | null;
8
+ /** Owning project (null for Knowledge Base files). */
9
+ project_id?: number | null;
10
+ bm25_rank?: number;
11
+ }
12
+ export interface ScoredCandidate extends RerankCandidate {
13
+ raw_score: number;
14
+ sigmoid_score: number;
15
+ final_score: number;
16
+ }
17
+ export interface RerankOptions {
18
+ /**
19
+ * Hugging Face model identifier for quantized ONNX cross-encoder.
20
+ * Default: "Xenova/ms-marco-MiniLM-L-6-v2"
21
+ */
22
+ model?: string;
23
+ /**
24
+ * Maximum candidate pool size retrieved from BM25 to score.
25
+ * Default: 30
26
+ */
27
+ candidate_limit?: number;
28
+ /**
29
+ * Additive authority boost for dictionary items on the [0, 1] scale.
30
+ * Default: 0.08
31
+ */
32
+ dictionary_boost?: number;
33
+ /**
34
+ * Reranking operation hard timeout in milliseconds.
35
+ * Default: 300
36
+ */
37
+ timeout_ms?: number;
38
+ /**
39
+ * Maximum token length per document passage for cross-attention.
40
+ * Default: 512
41
+ */
42
+ max_length?: number;
43
+ }
44
+ export interface RerankEngineStatus {
45
+ loaded: boolean;
46
+ model: string;
47
+ cache_dir: string;
48
+ device: string;
49
+ }
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rerank/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;IACnC,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/rerank/types.ts"],"names":[],"mappings":""}
@@ -71,5 +71,10 @@ export interface SearchFilters {
71
71
  * more than 50 files.
72
72
  */
73
73
  limit?: number;
74
+ /**
75
+ * When true, skip dictionary-first reordering and return raw BM25 order.
76
+ * Useful for feeding an unbiased candidate pool to the cross-encoder reranker.
77
+ */
78
+ raw_bm25_order?: boolean;
74
79
  }
75
80
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAG/D,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,YAAY,GAAG,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IA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;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
@@ -182,7 +182,7 @@ export function ensureDataDir() {
182
182
  // Scaffold an empty profile.md at the KB root on fresh installs. Without
183
183
  // this, the only way to get one was via the web UI's PUT /api/profile
184
184
  // (which writes here directly) — CLI/MCP-only users had no discoverable
185
- // path to a working profile, and files.create can't reach KB root itself
185
+ // path to a working profile, and files_create can't reach KB root itself
186
186
  // (kind-based routing always nests under knowledge/dictionary or notes).
187
187
  const profilePath = path.join(dataDir, profileRelPath());
188
188
  if (!fs.existsSync(profilePath)) {
@@ -1,21 +1,25 @@
1
1
  {
2
2
  "name": "kxta-core",
3
- "version": "5.1.3",
3
+ "version": "6.0.0",
4
4
  "description": "Core context and command engines for Kontexta",
5
5
  "private": true,
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
9
  "dependencies": {
10
+ "@huggingface/transformers": "^4.3.0",
10
11
  "@mozilla/readability": "^0.6.0",
11
12
  "better-sqlite3": "^12.10.0",
12
13
  "chokidar": "^4.0.0",
13
14
  "dompurify": "^3.4.14",
14
15
  "glob": "^11.0.0",
15
16
  "jsdom": "^29.1.1",
17
+ "kontexta-reranker-model": "^1.0.0",
16
18
  "simple-git": "^3.27.0",
19
+ "smol-toml": "^1.9.0",
17
20
  "turndown": "^7.2.4",
18
- "undici": "^7.0.0"
21
+ "undici": "^7.0.0",
22
+ "yaml": "^2.9.1"
19
23
  },
20
- "rulesVersion": "3.1.0"
24
+ "rulesVersion": "3.2.0"
21
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kxta-publish",
3
- "version": "5.1.3",
3
+ "version": "6.0.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,10 +20,10 @@
20
20
  "html-to-pdfmake": "^2.5.33",
21
21
  "js-yaml": "^4.1.0",
22
22
  "jsdom": "^29.1.1",
23
- "kxta-core": "5.1.3",
23
+ "kxta-core": "6.0.0",
24
24
  "markdown-it": "^14.1.0",
25
25
  "pdfmake": "^0.3.11",
26
26
  "puppeteer-core": "^25.10.0"
27
27
  },
28
- "rulesVersion": "3.1.0"
28
+ "rulesVersion": "3.2.0"
29
29
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kontexta",
3
- "version": "5.1.3",
4
- "rulesVersion": "3.1.0",
3
+ "version": "6.0.0",
4
+ "rulesVersion": "3.2.0",
5
5
  "type": "module",
6
6
  "author": "Safiyu",
7
7
  "private": true,
@@ -19,6 +19,7 @@
19
19
  "lint": "turbo lint"
20
20
  },
21
21
  "devDependencies": {
22
+ "@huggingface/transformers": "^4.3.0",
22
23
  "re2": "1.24.1",
23
24
  "turbo": "^2.5.0",
24
25
  "typescript": "^5.7.0"
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ resolveMcpEntry
4
+ } from "./chunk-C4XU73GP.js";
5
+
6
+ // src/connect.ts
7
+ import { spawnSync } from "child_process";
8
+ import { existsSync } from "fs";
9
+ import { dirname, join } from "path";
10
+ function resolveConnectEntry() {
11
+ const entry = join(dirname(resolveMcpEntry()), "connect-cli.js");
12
+ if (!existsSync(entry)) throw new Error(`connect-cli.js not found next to the MCP entry (${entry}). Rebuild apps/mcp.`);
13
+ return entry;
14
+ }
15
+ async function runConnect(argv, env = process.env) {
16
+ const r = spawnSync(process.execPath, [resolveConnectEntry(), ...argv], { stdio: "inherit", env: { KONTEXTA_INSTALL_HINT: "npm", ...env, KONTEXTA_VIA_CLI: "1" } });
17
+ return r.status ?? 1;
18
+ }
19
+ export {
20
+ resolveConnectEntry,
21
+ runConnect
22
+ };
package/dist/index.js CHANGED
@@ -11,6 +11,8 @@ Usage:
11
11
  kontexta doctor install-chromium Download the Chromium build used for PDF export
12
12
  kontexta hooks <status|install|uninstall|enable|disable|reconcile|stage>
13
13
  Manage coding-agent hooks that feed the journal
14
+ kontexta connect <status|install|uninstall|approval|reconcile>
15
+ Register the kxta MCP server in your coding agents
14
16
  kontexta --version Print version
15
17
  kontexta --help Print this help
16
18
  `;
@@ -44,8 +46,12 @@ Usage:
44
46
  const { runHooks } = await import("./hooks-6RQ5CCTW.js");
45
47
  process.exit(await runHooks(process.argv.slice(3)));
46
48
  }
49
+ if (arg === "connect") {
50
+ const { runConnect } = await import("./connect-AL5DTU3K.js");
51
+ process.exit(await runConnect(process.argv.slice(3)));
52
+ }
47
53
  if (arg === "start") {
48
- const { runStart } = await import("./start-RJVUJT4B.js");
54
+ const { runStart } = await import("./start-GP4ERBBP.js");
49
55
  await runStart();
50
56
  process.exit(0);
51
57
  }
@@ -68,6 +68,13 @@ async function runStart() {
68
68
  await runHooks(["reconcile"], { ...process.env, KONTEXTA_DATA_DIR: data.path });
69
69
  } catch (e) {
70
70
  process.stderr.write(`hooks reconcile skipped: ${e?.message ?? e}
71
+ `);
72
+ }
73
+ try {
74
+ const { runConnect } = await import("./connect-AL5DTU3K.js");
75
+ await runConnect(["reconcile"], { ...process.env, KONTEXTA_DATA_DIR: data.path });
76
+ } catch (e) {
77
+ process.stderr.write(`MCP reconcile skipped: ${e?.message ?? e}
71
78
  `);
72
79
  }
73
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kontexta",
3
- "version": "5.1.3",
3
+ "version": "6.0.0",
4
4
  "description": "One-click local dashboard + MCP server for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -36,6 +36,7 @@
36
36
  "prepublishOnly": "pnpm run build && pnpm run pack:bundle"
37
37
  },
38
38
  "dependencies": {
39
+ "@huggingface/transformers": "^4.3.0",
39
40
  "@modelcontextprotocol/sdk": "^1.12.0",
40
41
  "@mozilla/readability": "^0.6.0",
41
42
  "@puppeteer/browsers": "^3.2.2",
@@ -59,6 +60,7 @@
59
60
  "html-to-pdfmake": "^2.5.33",
60
61
  "js-yaml": "^4.1.0",
61
62
  "jsdom": "^29.1.1",
63
+ "kontexta-reranker-model": "^1.0.0",
62
64
  "lucide-react": "^1.21.0",
63
65
  "markdown-it": "^14.1.0",
64
66
  "mermaid": "^11",
@@ -75,12 +77,14 @@
75
77
  "remark-parse": "^11.0.0",
76
78
  "remark-stringify": "^11.0.0",
77
79
  "simple-git": "^3.27.0",
80
+ "smol-toml": "^1.9.0",
78
81
  "sonner": "^2.0.7",
79
82
  "strip-markdown": "^6.0.0",
80
83
  "turndown": "^7.2.4",
81
84
  "undici": "^7.0.0",
82
85
  "unified": "^11.0.5",
83
86
  "ws": "^8.18.0",
87
+ "yaml": "^2.9.1",
84
88
  "zod": "^3.24.0"
85
89
  },
86
90
  "devDependencies": {
@@ -89,5 +93,5 @@
89
93
  "typescript": "^5.7.0",
90
94
  "vitest": "^2.1.0"
91
95
  },
92
- "rulesVersion": "3.1.0"
96
+ "rulesVersion": "3.2.0"
93
97
  }
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,533,635,1113,1151,1273,1636,1699,1806,2041,2224,2598,2654,2772,3004,3063,3145,3365,3425,3426,3430,3549,3576,3878,4076,4260,4490,4882,4930,5031,5148,5469,5581,5789,6202,7073,7473,7490,7574,7676,7758,7874,8100,8198,8208,8267,8314,8489,8518,8636,8967,8998,9207,9234,9329,9347,9514,9881,9930],{98473:()=>{}},_=>{_.O(0,[9922,5159,7358],()=>_(_.s=98473)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[64,533,635,1113,1151,1273,1636,1699,1806,2041,2224,2598,2654,2772,3004,3063,3145,3365,3425,3426,3430,3549,3576,3878,4076,4260,4490,4882,4930,5031,5148,5469,5581,5789,6202,7073,7473,7490,7574,7676,7758,7874,8100,8198,8208,8267,8314,8489,8518,8636,8967,8998,9207,9234,9329,9347,9514,9881,9930],{98473:()=>{}},_=>{_.O(0,[9922,5159,7358],()=>_(_.s=98473)),_N_E=_.O()}]);