kontexta 4.3.1

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 (788) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +58 -0
  3. package/bundle/standalone/CHANGELOG.md +382 -0
  4. package/bundle/standalone/apps/web/.next/BUILD_ID +1 -0
  5. package/bundle/standalone/apps/web/.next/app-build-manifest.json +403 -0
  6. package/bundle/standalone/apps/web/.next/app-path-routes-manifest.json +60 -0
  7. package/bundle/standalone/apps/web/.next/build-manifest.json +33 -0
  8. package/bundle/standalone/apps/web/.next/package.json +1 -0
  9. package/bundle/standalone/apps/web/.next/prerender-manifest.json +148 -0
  10. package/bundle/standalone/apps/web/.next/react-loadable-manifest.json +300 -0
  11. package/bundle/standalone/apps/web/.next/required-server-files.json +344 -0
  12. package/bundle/standalone/apps/web/.next/routes-manifest.json +210 -0
  13. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js +2 -0
  14. package/bundle/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -0
  15. package/bundle/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  16. package/bundle/standalone/apps/web/.next/server/app/_not-found.html +1 -0
  17. package/bundle/standalone/apps/web/.next/server/app/_not-found.meta +8 -0
  18. package/bundle/standalone/apps/web/.next/server/app/_not-found.rsc +22 -0
  19. package/bundle/standalone/apps/web/.next/server/app/api/about/route.js +1 -0
  20. package/bundle/standalone/apps/web/.next/server/app/api/about/route.js.nft.json +1 -0
  21. package/bundle/standalone/apps/web/.next/server/app/api/about/route_client-reference-manifest.js +1 -0
  22. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js +1 -0
  23. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route.js.nft.json +1 -0
  24. package/bundle/standalone/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
  25. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js +1 -0
  26. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +1 -0
  27. package/bundle/standalone/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -0
  28. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js +1 -0
  29. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route.js.nft.json +1 -0
  30. package/bundle/standalone/apps/web/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -0
  31. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js +1 -0
  32. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route.js.nft.json +1 -0
  33. package/bundle/standalone/apps/web/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -0
  34. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js +1 -0
  35. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route.js.nft.json +1 -0
  36. package/bundle/standalone/apps/web/.next/server/app/api/auth/token/route_client-reference-manifest.js +1 -0
  37. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js +1 -0
  38. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route.js.nft.json +1 -0
  39. package/bundle/standalone/apps/web/.next/server/app/api/calendar/conflicts/route_client-reference-manifest.js +1 -0
  40. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js +1 -0
  41. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route.js.nft.json +1 -0
  42. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/[id]/route_client-reference-manifest.js +1 -0
  43. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js +1 -0
  44. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route.js.nft.json +1 -0
  45. package/bundle/standalone/apps/web/.next/server/app/api/calendar/entities/route_client-reference-manifest.js +1 -0
  46. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js +1 -0
  47. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route.js.nft.json +1 -0
  48. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/[id]/route_client-reference-manifest.js +1 -0
  49. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js +1 -0
  50. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route.js.nft.json +1 -0
  51. package/bundle/standalone/apps/web/.next/server/app/api/calendar/events/route_client-reference-manifest.js +1 -0
  52. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js +1 -0
  53. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route.js.nft.json +1 -0
  54. package/bundle/standalone/apps/web/.next/server/app/api/calendar/ics/route_client-reference-manifest.js +1 -0
  55. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js +1 -0
  56. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route.js.nft.json +1 -0
  57. package/bundle/standalone/apps/web/.next/server/app/api/calendar/links/route_client-reference-manifest.js +1 -0
  58. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js +1 -0
  59. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route.js.nft.json +1 -0
  60. package/bundle/standalone/apps/web/.next/server/app/api/calendar/settings/route_client-reference-manifest.js +1 -0
  61. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js +1 -0
  62. package/bundle/standalone/apps/web/.next/server/app/api/clip/route.js.nft.json +1 -0
  63. package/bundle/standalone/apps/web/.next/server/app/api/clip/route_client-reference-manifest.js +1 -0
  64. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js +1 -0
  65. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route.js.nft.json +1 -0
  66. package/bundle/standalone/apps/web/.next/server/app/api/docker-config/route_client-reference-manifest.js +1 -0
  67. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js +1 -0
  68. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route.js.nft.json +1 -0
  69. package/bundle/standalone/apps/web/.next/server/app/api/export/zip/route_client-reference-manifest.js +1 -0
  70. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js +1 -0
  71. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route.js.nft.json +1 -0
  72. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/download/route_client-reference-manifest.js +1 -0
  73. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js +1 -0
  74. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route.js.nft.json +1 -0
  75. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/export-pdf/route_client-reference-manifest.js +1 -0
  76. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js +1 -0
  77. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route.js.nft.json +1 -0
  78. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/restore/route_client-reference-manifest.js +1 -0
  79. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js +1 -0
  80. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route.js.nft.json +1 -0
  81. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/history/route_client-reference-manifest.js +1 -0
  82. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js +1 -0
  83. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route.js.nft.json +1 -0
  84. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/move/route_client-reference-manifest.js +1 -0
  85. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js +1 -0
  86. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route.js.nft.json +1 -0
  87. package/bundle/standalone/apps/web/.next/server/app/api/files/[id]/route_client-reference-manifest.js +1 -0
  88. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js +1 -0
  89. package/bundle/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -0
  90. package/bundle/standalone/apps/web/.next/server/app/api/files/route_client-reference-manifest.js +1 -0
  91. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js +1 -0
  92. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route.js.nft.json +1 -0
  93. package/bundle/standalone/apps/web/.next/server/app/api/files/upload/route_client-reference-manifest.js +1 -0
  94. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js +1 -0
  95. package/bundle/standalone/apps/web/.next/server/app/api/folders/route.js.nft.json +1 -0
  96. package/bundle/standalone/apps/web/.next/server/app/api/folders/route_client-reference-manifest.js +1 -0
  97. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js +1 -0
  98. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route.js.nft.json +1 -0
  99. package/bundle/standalone/apps/web/.next/server/app/api/git/remote/route_client-reference-manifest.js +1 -0
  100. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js +1 -0
  101. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route.js.nft.json +1 -0
  102. package/bundle/standalone/apps/web/.next/server/app/api/git/sync-all/route_client-reference-manifest.js +1 -0
  103. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js +1 -0
  104. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route.js.nft.json +1 -0
  105. package/bundle/standalone/apps/web/.next/server/app/api/hands/test-pattern/route_client-reference-manifest.js +1 -0
  106. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js +1 -0
  107. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route.js.nft.json +1 -0
  108. package/bundle/standalone/apps/web/.next/server/app/api/hands/validate/route_client-reference-manifest.js +1 -0
  109. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js +1 -0
  110. package/bundle/standalone/apps/web/.next/server/app/api/health/route.js.nft.json +1 -0
  111. package/bundle/standalone/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -0
  112. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js +17 -0
  113. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route.js.nft.json +1 -0
  114. package/bundle/standalone/apps/web/.next/server/app/api/install-snippets/route_client-reference-manifest.js +1 -0
  115. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js +1 -0
  116. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route.js.nft.json +1 -0
  117. package/bundle/standalone/apps/web/.next/server/app/api/mcp-tools/route_client-reference-manifest.js +1 -0
  118. package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js +1 -0
  119. package/bundle/standalone/apps/web/.next/server/app/api/profile/route.js.nft.json +1 -0
  120. package/bundle/standalone/apps/web/.next/server/app/api/profile/route_client-reference-manifest.js +1 -0
  121. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js +1 -0
  122. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route.js.nft.json +1 -0
  123. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/hands-config/route_client-reference-manifest.js +1 -0
  124. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js +1 -0
  125. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route.js.nft.json +1 -0
  126. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-config/route_client-reference-manifest.js +1 -0
  127. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js +1 -0
  128. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route.js.nft.json +1 -0
  129. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/journal-status/route_client-reference-manifest.js +1 -0
  130. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js +1 -0
  131. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route.js.nft.json +1 -0
  132. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/onboard/route_client-reference-manifest.js +1 -0
  133. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js +1 -0
  134. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route.js.nft.json +1 -0
  135. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/refresh/route_client-reference-manifest.js +1 -0
  136. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js +1 -0
  137. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route.js.nft.json +1 -0
  138. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -0
  139. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js +1 -0
  140. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route.js.nft.json +1 -0
  141. package/bundle/standalone/apps/web/.next/server/app/api/projects/[id]/sync/route_client-reference-manifest.js +1 -0
  142. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js +1 -0
  143. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route.js.nft.json +1 -0
  144. package/bundle/standalone/apps/web/.next/server/app/api/projects/onboard/route_client-reference-manifest.js +1 -0
  145. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js +1 -0
  146. package/bundle/standalone/apps/web/.next/server/app/api/projects/route.js.nft.json +1 -0
  147. package/bundle/standalone/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
  148. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js +1 -0
  149. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route.js.nft.json +1 -0
  150. package/bundle/standalone/apps/web/.next/server/app/api/publish/html/route_client-reference-manifest.js +1 -0
  151. package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js +1 -0
  152. package/bundle/standalone/apps/web/.next/server/app/api/publish/route.js.nft.json +1 -0
  153. package/bundle/standalone/apps/web/.next/server/app/api/publish/route_client-reference-manifest.js +1 -0
  154. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js +1 -0
  155. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route.js.nft.json +1 -0
  156. package/bundle/standalone/apps/web/.next/server/app/api/refresh/route_client-reference-manifest.js +1 -0
  157. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js +1 -0
  158. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route.js.nft.json +1 -0
  159. package/bundle/standalone/apps/web/.next/server/app/api/reindex/route_client-reference-manifest.js +1 -0
  160. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js +1 -0
  161. package/bundle/standalone/apps/web/.next/server/app/api/search/route.js.nft.json +1 -0
  162. package/bundle/standalone/apps/web/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
  163. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js +1 -0
  164. package/bundle/standalone/apps/web/.next/server/app/api/tags/route.js.nft.json +1 -0
  165. package/bundle/standalone/apps/web/.next/server/app/api/tags/route_client-reference-manifest.js +1 -0
  166. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js +1 -0
  167. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route.js.nft.json +1 -0
  168. package/bundle/standalone/apps/web/.next/server/app/api/ws-config/route_client-reference-manifest.js +1 -0
  169. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js +1 -0
  170. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
  171. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png.body +0 -0
  172. package/bundle/standalone/apps/web/.next/server/app/apple-icon.png.meta +1 -0
  173. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js +2 -0
  174. package/bundle/standalone/apps/web/.next/server/app/calendar/page.js.nft.json +1 -0
  175. package/bundle/standalone/apps/web/.next/server/app/calendar/page_client-reference-manifest.js +1 -0
  176. package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js +1 -0
  177. package/bundle/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  178. package/bundle/standalone/apps/web/.next/server/app/favicon.ico.body +0 -0
  179. package/bundle/standalone/apps/web/.next/server/app/favicon.ico.meta +1 -0
  180. package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js +1 -0
  181. package/bundle/standalone/apps/web/.next/server/app/icon.png/route.js.nft.json +1 -0
  182. package/bundle/standalone/apps/web/.next/server/app/icon.png.body +0 -0
  183. package/bundle/standalone/apps/web/.next/server/app/icon.png.meta +1 -0
  184. package/bundle/standalone/apps/web/.next/server/app/login/page.js +2 -0
  185. package/bundle/standalone/apps/web/.next/server/app/login/page.js.nft.json +1 -0
  186. package/bundle/standalone/apps/web/.next/server/app/login/page_client-reference-manifest.js +1 -0
  187. package/bundle/standalone/apps/web/.next/server/app/page.js +9 -0
  188. package/bundle/standalone/apps/web/.next/server/app/page.js.nft.json +1 -0
  189. package/bundle/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -0
  190. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js +6 -0
  191. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page.js.nft.json +1 -0
  192. package/bundle/standalone/apps/web/.next/server/app/preview/motifs/page_client-reference-manifest.js +1 -0
  193. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.html +5 -0
  194. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.meta +7 -0
  195. package/bundle/standalone/apps/web/.next/server/app/preview/motifs.rsc +29 -0
  196. package/bundle/standalone/apps/web/.next/server/app-paths-manifest.json +60 -0
  197. package/bundle/standalone/apps/web/.next/server/chunks/1018.js +115 -0
  198. package/bundle/standalone/apps/web/.next/server/chunks/1096.js +23 -0
  199. package/bundle/standalone/apps/web/.next/server/chunks/1139.js +1 -0
  200. package/bundle/standalone/apps/web/.next/server/chunks/128.js +1 -0
  201. package/bundle/standalone/apps/web/.next/server/chunks/1921.js +1 -0
  202. package/bundle/standalone/apps/web/.next/server/chunks/2034.js +36 -0
  203. package/bundle/standalone/apps/web/.next/server/chunks/2048.js +64 -0
  204. package/bundle/standalone/apps/web/.next/server/chunks/2065.js +1 -0
  205. package/bundle/standalone/apps/web/.next/server/chunks/2144.js +1 -0
  206. package/bundle/standalone/apps/web/.next/server/chunks/2151.js +1 -0
  207. package/bundle/standalone/apps/web/.next/server/chunks/2161.js +153 -0
  208. package/bundle/standalone/apps/web/.next/server/chunks/2450.js +1 -0
  209. package/bundle/standalone/apps/web/.next/server/chunks/246.js +1 -0
  210. package/bundle/standalone/apps/web/.next/server/chunks/260.js +24 -0
  211. package/bundle/standalone/apps/web/.next/server/chunks/269.js +1 -0
  212. package/bundle/standalone/apps/web/.next/server/chunks/2792.js +287 -0
  213. package/bundle/standalone/apps/web/.next/server/chunks/2923.js +22 -0
  214. package/bundle/standalone/apps/web/.next/server/chunks/2944.js +77 -0
  215. package/bundle/standalone/apps/web/.next/server/chunks/3334.js +141 -0
  216. package/bundle/standalone/apps/web/.next/server/chunks/3668.js +9 -0
  217. package/bundle/standalone/apps/web/.next/server/chunks/3758.js +1 -0
  218. package/bundle/standalone/apps/web/.next/server/chunks/3833.js +1 -0
  219. package/bundle/standalone/apps/web/.next/server/chunks/3990.js +2 -0
  220. package/bundle/standalone/apps/web/.next/server/chunks/4274.js +1 -0
  221. package/bundle/standalone/apps/web/.next/server/chunks/4290.js +252 -0
  222. package/bundle/standalone/apps/web/.next/server/chunks/4347.js +1 -0
  223. package/bundle/standalone/apps/web/.next/server/chunks/4550.js +226 -0
  224. package/bundle/standalone/apps/web/.next/server/chunks/4824.js +166 -0
  225. package/bundle/standalone/apps/web/.next/server/chunks/509.js +43 -0
  226. package/bundle/standalone/apps/web/.next/server/chunks/5104.js +215 -0
  227. package/bundle/standalone/apps/web/.next/server/chunks/5186.js +1 -0
  228. package/bundle/standalone/apps/web/.next/server/chunks/5400.js +1 -0
  229. package/bundle/standalone/apps/web/.next/server/chunks/5558.js +80 -0
  230. package/bundle/standalone/apps/web/.next/server/chunks/6496.js +93 -0
  231. package/bundle/standalone/apps/web/.next/server/chunks/6693.js +148 -0
  232. package/bundle/standalone/apps/web/.next/server/chunks/6775.js +1 -0
  233. package/bundle/standalone/apps/web/.next/server/chunks/7020.js +29 -0
  234. package/bundle/standalone/apps/web/.next/server/chunks/7098.js +1 -0
  235. package/bundle/standalone/apps/web/.next/server/chunks/7117.js +1 -0
  236. package/bundle/standalone/apps/web/.next/server/chunks/7204.js +104 -0
  237. package/bundle/standalone/apps/web/.next/server/chunks/7342.js +1 -0
  238. package/bundle/standalone/apps/web/.next/server/chunks/7629.js +80 -0
  239. package/bundle/standalone/apps/web/.next/server/chunks/7784.js +1 -0
  240. package/bundle/standalone/apps/web/.next/server/chunks/8286.js +1 -0
  241. package/bundle/standalone/apps/web/.next/server/chunks/8349.js +1 -0
  242. package/bundle/standalone/apps/web/.next/server/chunks/8620.js +1 -0
  243. package/bundle/standalone/apps/web/.next/server/chunks/8675.js +1 -0
  244. package/bundle/standalone/apps/web/.next/server/chunks/8860.js +24 -0
  245. package/bundle/standalone/apps/web/.next/server/chunks/8896.js +1 -0
  246. package/bundle/standalone/apps/web/.next/server/chunks/8950.js +5 -0
  247. package/bundle/standalone/apps/web/.next/server/chunks/8960.js +79 -0
  248. package/bundle/standalone/apps/web/.next/server/chunks/899.js +2 -0
  249. package/bundle/standalone/apps/web/.next/server/chunks/9069.js +1 -0
  250. package/bundle/standalone/apps/web/.next/server/chunks/9315.js +34 -0
  251. package/bundle/standalone/apps/web/.next/server/chunks/9372.js +1 -0
  252. package/bundle/standalone/apps/web/.next/server/chunks/9555.js +6 -0
  253. package/bundle/standalone/apps/web/.next/server/chunks/9571.js +9 -0
  254. package/bundle/standalone/apps/web/.next/server/chunks/9681.js +1 -0
  255. package/bundle/standalone/apps/web/.next/server/chunks/97.js +90 -0
  256. package/bundle/standalone/apps/web/.next/server/chunks/9797.js +1 -0
  257. package/bundle/standalone/apps/web/.next/server/chunks/989.js +1 -0
  258. package/bundle/standalone/apps/web/.next/server/functions-config-manifest.json +4 -0
  259. package/bundle/standalone/apps/web/.next/server/instrumentation.js +1 -0
  260. package/bundle/standalone/apps/web/.next/server/middleware-build-manifest.js +1 -0
  261. package/bundle/standalone/apps/web/.next/server/middleware-manifest.json +6 -0
  262. package/bundle/standalone/apps/web/.next/server/middleware-react-loadable-manifest.js +1 -0
  263. package/bundle/standalone/apps/web/.next/server/next-font-manifest.js +1 -0
  264. package/bundle/standalone/apps/web/.next/server/next-font-manifest.json +1 -0
  265. package/bundle/standalone/apps/web/.next/server/pages/404.html +1 -0
  266. package/bundle/standalone/apps/web/.next/server/pages/500.html +1 -0
  267. package/bundle/standalone/apps/web/.next/server/pages/_app.js +1 -0
  268. package/bundle/standalone/apps/web/.next/server/pages/_app.js.nft.json +1 -0
  269. package/bundle/standalone/apps/web/.next/server/pages/_document.js +1 -0
  270. package/bundle/standalone/apps/web/.next/server/pages/_document.js.nft.json +1 -0
  271. package/bundle/standalone/apps/web/.next/server/pages/_error.js +19 -0
  272. package/bundle/standalone/apps/web/.next/server/pages/_error.js.nft.json +1 -0
  273. package/bundle/standalone/apps/web/.next/server/pages-manifest.json +6 -0
  274. package/bundle/standalone/apps/web/.next/server/server-reference-manifest.js +1 -0
  275. package/bundle/standalone/apps/web/.next/server/server-reference-manifest.json +1 -0
  276. package/bundle/standalone/apps/web/.next/server/webpack-runtime.js +1 -0
  277. package/bundle/standalone/apps/web/.next/static/TwaiLte1NHCp3gRYUc-go/_buildManifest.js +1 -0
  278. package/bundle/standalone/apps/web/.next/static/TwaiLte1NHCp3gRYUc-go/_ssgManifest.js +1 -0
  279. package/bundle/standalone/apps/web/.next/static/chunks/02852184.a3b62691cdc349cf.js +80 -0
  280. package/bundle/standalone/apps/web/.next/static/chunks/1226.49d217dc03a1770f.js +1 -0
  281. package/bundle/standalone/apps/web/.next/static/chunks/1286.8da72129ab3aa8fd.js +77 -0
  282. package/bundle/standalone/apps/web/.next/static/chunks/1403cfaa-33c2b74c127517c2.js +1 -0
  283. package/bundle/standalone/apps/web/.next/static/chunks/171.a4732e77e941b2cd.js +1 -0
  284. package/bundle/standalone/apps/web/.next/static/chunks/1733.3a6dae5cc3785d0b.js +1 -0
  285. package/bundle/standalone/apps/web/.next/static/chunks/2081.313746c212bfc5c9.js +1 -0
  286. package/bundle/standalone/apps/web/.next/static/chunks/2086.0b05a08670aae1db.js +226 -0
  287. package/bundle/standalone/apps/web/.next/static/chunks/2377-956eb9b333193ac6.js +1 -0
  288. package/bundle/standalone/apps/web/.next/static/chunks/3034.e1171cbeeed85923.js +5 -0
  289. package/bundle/standalone/apps/web/.next/static/chunks/3068-293b252158eb9d15.js +1 -0
  290. package/bundle/standalone/apps/web/.next/static/chunks/3297.7664b51ee69c7513.js +23 -0
  291. package/bundle/standalone/apps/web/.next/static/chunks/338.77f45c7810885961.js +115 -0
  292. package/bundle/standalone/apps/web/.next/static/chunks/3471.7790a4192ef84a1a.js +1 -0
  293. package/bundle/standalone/apps/web/.next/static/chunks/3514.14aa56fe189fd052.js +1 -0
  294. package/bundle/standalone/apps/web/.next/static/chunks/3696.5d462babda0c0b9e.js +34 -0
  295. package/bundle/standalone/apps/web/.next/static/chunks/408.82356d1e11e880d9.js +93 -0
  296. package/bundle/standalone/apps/web/.next/static/chunks/46.9922e50f2158e1a9.js +1 -0
  297. package/bundle/standalone/apps/web/.next/static/chunks/4798.d851e8027b2db933.js +287 -0
  298. package/bundle/standalone/apps/web/.next/static/chunks/4908.2fed0b6fbc391b55.js +1 -0
  299. package/bundle/standalone/apps/web/.next/static/chunks/4915.97b9c59991c26fa7.js +1 -0
  300. package/bundle/standalone/apps/web/.next/static/chunks/492.234794e12315e4bb.js +1 -0
  301. package/bundle/standalone/apps/web/.next/static/chunks/4936.c65cdd63440ade70.js +1 -0
  302. package/bundle/standalone/apps/web/.next/static/chunks/5127.e5e917b5cb9c4e52.js +1 -0
  303. package/bundle/standalone/apps/web/.next/static/chunks/5141.93a42ebd1580da60.js +1 -0
  304. package/bundle/standalone/apps/web/.next/static/chunks/5159-7bcf68ab11c1091e.js +1 -0
  305. package/bundle/standalone/apps/web/.next/static/chunks/5514.f969d5c86c590512.js +73 -0
  306. package/bundle/standalone/apps/web/.next/static/chunks/559.c4615787d977bf47.js +1 -0
  307. package/bundle/standalone/apps/web/.next/static/chunks/5667.e0097b2112faa29b.js +1 -0
  308. package/bundle/standalone/apps/web/.next/static/chunks/6367.fd87728718a97771.js +1 -0
  309. package/bundle/standalone/apps/web/.next/static/chunks/6394.c2172a59c01bd0bd.js +1 -0
  310. package/bundle/standalone/apps/web/.next/static/chunks/6396.d288334e13a70139.js +24 -0
  311. package/bundle/standalone/apps/web/.next/static/chunks/6483.88695b22b21b10f1.js +9 -0
  312. package/bundle/standalone/apps/web/.next/static/chunks/6561.176d35e576df3f9d.js +1 -0
  313. package/bundle/standalone/apps/web/.next/static/chunks/6584.87fc375a0510108d.js +104 -0
  314. package/bundle/standalone/apps/web/.next/static/chunks/693.71c8b97896628a66.js +1 -0
  315. package/bundle/standalone/apps/web/.next/static/chunks/6934.45e50410379dc377.js +79 -0
  316. package/bundle/standalone/apps/web/.next/static/chunks/6a2ca82e.c26cb70da3106c1c.js +1 -0
  317. package/bundle/standalone/apps/web/.next/static/chunks/6b5bb80a.c511153adad62faf.js +1 -0
  318. package/bundle/standalone/apps/web/.next/static/chunks/7216.d1b096d2a35967fd.js +1 -0
  319. package/bundle/standalone/apps/web/.next/static/chunks/7342.fcb52cf5f7ce0e17.js +29 -0
  320. package/bundle/standalone/apps/web/.next/static/chunks/7541.43ff810bb14fd5c0.js +43 -0
  321. package/bundle/standalone/apps/web/.next/static/chunks/7563.376c2692778a62b3.js +148 -0
  322. package/bundle/standalone/apps/web/.next/static/chunks/7756.b0dd00e996549a39.js +24 -0
  323. package/bundle/standalone/apps/web/.next/static/chunks/8052.69c066e56bbd5d6c.js +64 -0
  324. package/bundle/standalone/apps/web/.next/static/chunks/8080c6f4.ed360e7424d6fe99.js +62 -0
  325. package/bundle/standalone/apps/web/.next/static/chunks/8280.81c2b0d61e27a576.js +1 -0
  326. package/bundle/standalone/apps/web/.next/static/chunks/8547.5bef8f1afd162429.js +90 -0
  327. package/bundle/standalone/apps/web/.next/static/chunks/8602.0b457ca55bd2c08e.js +141 -0
  328. package/bundle/standalone/apps/web/.next/static/chunks/8794.401ab179d53aa5d5.js +80 -0
  329. package/bundle/standalone/apps/web/.next/static/chunks/9053.c953d758ff5dc6ee.js +1 -0
  330. package/bundle/standalone/apps/web/.next/static/chunks/9122.cf7fd16fc8d7fad0.js +36 -0
  331. package/bundle/standalone/apps/web/.next/static/chunks/9255.78469e88fa06e186.js +1 -0
  332. package/bundle/standalone/apps/web/.next/static/chunks/944.ba7dcdca1c72114a.js +166 -0
  333. package/bundle/standalone/apps/web/.next/static/chunks/9794-16144bed6de4bf26.js +1 -0
  334. package/bundle/standalone/apps/web/.next/static/chunks/9852.e1937ca867a99475.js +215 -0
  335. package/bundle/standalone/apps/web/.next/static/chunks/9981.8fa0bb90a26c66eb.js +1 -0
  336. package/bundle/standalone/apps/web/.next/static/chunks/a118fb18.9c3b4291884abee0.js +119 -0
  337. package/bundle/standalone/apps/web/.next/static/chunks/app/_not-found/page-972b01bf23ed0942.js +1 -0
  338. package/bundle/standalone/apps/web/.next/static/chunks/app/api/about/route-c1d02d72a16497fa.js +1 -0
  339. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/login/route-c1d02d72a16497fa.js +1 -0
  340. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/logout/route-c1d02d72a16497fa.js +1 -0
  341. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/setup/route-c1d02d72a16497fa.js +1 -0
  342. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/status/route-c1d02d72a16497fa.js +1 -0
  343. package/bundle/standalone/apps/web/.next/static/chunks/app/api/auth/token/route-c1d02d72a16497fa.js +1 -0
  344. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/conflicts/route-c1d02d72a16497fa.js +1 -0
  345. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/[id]/route-c1d02d72a16497fa.js +1 -0
  346. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/entities/route-c1d02d72a16497fa.js +1 -0
  347. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/[id]/route-c1d02d72a16497fa.js +1 -0
  348. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/events/route-c1d02d72a16497fa.js +1 -0
  349. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/ics/route-c1d02d72a16497fa.js +1 -0
  350. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/links/route-c1d02d72a16497fa.js +1 -0
  351. package/bundle/standalone/apps/web/.next/static/chunks/app/api/calendar/settings/route-c1d02d72a16497fa.js +1 -0
  352. package/bundle/standalone/apps/web/.next/static/chunks/app/api/clip/route-c1d02d72a16497fa.js +1 -0
  353. package/bundle/standalone/apps/web/.next/static/chunks/app/api/docker-config/route-c1d02d72a16497fa.js +1 -0
  354. package/bundle/standalone/apps/web/.next/static/chunks/app/api/export/zip/route-c1d02d72a16497fa.js +1 -0
  355. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/download/route-c1d02d72a16497fa.js +1 -0
  356. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/export-pdf/route-c1d02d72a16497fa.js +1 -0
  357. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/restore/route-c1d02d72a16497fa.js +1 -0
  358. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/history/route-c1d02d72a16497fa.js +1 -0
  359. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/move/route-c1d02d72a16497fa.js +1 -0
  360. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/[id]/route-c1d02d72a16497fa.js +1 -0
  361. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/route-c1d02d72a16497fa.js +1 -0
  362. package/bundle/standalone/apps/web/.next/static/chunks/app/api/files/upload/route-c1d02d72a16497fa.js +1 -0
  363. package/bundle/standalone/apps/web/.next/static/chunks/app/api/folders/route-c1d02d72a16497fa.js +1 -0
  364. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/remote/route-c1d02d72a16497fa.js +1 -0
  365. package/bundle/standalone/apps/web/.next/static/chunks/app/api/git/sync-all/route-c1d02d72a16497fa.js +1 -0
  366. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/test-pattern/route-c1d02d72a16497fa.js +1 -0
  367. package/bundle/standalone/apps/web/.next/static/chunks/app/api/hands/validate/route-c1d02d72a16497fa.js +1 -0
  368. package/bundle/standalone/apps/web/.next/static/chunks/app/api/health/route-c1d02d72a16497fa.js +1 -0
  369. package/bundle/standalone/apps/web/.next/static/chunks/app/api/install-snippets/route-c1d02d72a16497fa.js +1 -0
  370. package/bundle/standalone/apps/web/.next/static/chunks/app/api/mcp-tools/route-c1d02d72a16497fa.js +1 -0
  371. package/bundle/standalone/apps/web/.next/static/chunks/app/api/profile/route-c1d02d72a16497fa.js +1 -0
  372. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/hands-config/route-c1d02d72a16497fa.js +1 -0
  373. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-config/route-c1d02d72a16497fa.js +1 -0
  374. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/journal-status/route-c1d02d72a16497fa.js +1 -0
  375. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/onboard/route-c1d02d72a16497fa.js +1 -0
  376. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/refresh/route-c1d02d72a16497fa.js +1 -0
  377. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/route-c1d02d72a16497fa.js +1 -0
  378. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/[id]/sync/route-c1d02d72a16497fa.js +1 -0
  379. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/onboard/route-c1d02d72a16497fa.js +1 -0
  380. package/bundle/standalone/apps/web/.next/static/chunks/app/api/projects/route-c1d02d72a16497fa.js +1 -0
  381. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/html/route-c1d02d72a16497fa.js +1 -0
  382. package/bundle/standalone/apps/web/.next/static/chunks/app/api/publish/route-c1d02d72a16497fa.js +1 -0
  383. package/bundle/standalone/apps/web/.next/static/chunks/app/api/refresh/route-c1d02d72a16497fa.js +1 -0
  384. package/bundle/standalone/apps/web/.next/static/chunks/app/api/reindex/route-c1d02d72a16497fa.js +1 -0
  385. package/bundle/standalone/apps/web/.next/static/chunks/app/api/search/route-c1d02d72a16497fa.js +1 -0
  386. package/bundle/standalone/apps/web/.next/static/chunks/app/api/tags/route-c1d02d72a16497fa.js +1 -0
  387. package/bundle/standalone/apps/web/.next/static/chunks/app/api/ws-config/route-c1d02d72a16497fa.js +1 -0
  388. package/bundle/standalone/apps/web/.next/static/chunks/app/calendar/page-180fba7a5e149d79.js +1 -0
  389. package/bundle/standalone/apps/web/.next/static/chunks/app/layout-9a9569fc88cd95d2.js +1 -0
  390. package/bundle/standalone/apps/web/.next/static/chunks/app/login/page-d299785546ea6ab6.js +1 -0
  391. package/bundle/standalone/apps/web/.next/static/chunks/app/page-2b151d30cb29d2e5.js +1 -0
  392. package/bundle/standalone/apps/web/.next/static/chunks/app/preview/motifs/page-c1d02d72a16497fa.js +1 -0
  393. package/bundle/standalone/apps/web/.next/static/chunks/d185f5cd.71b8f43667fbf60d.js +153 -0
  394. package/bundle/standalone/apps/web/.next/static/chunks/framework-d5846a86e24c79c9.js +1 -0
  395. package/bundle/standalone/apps/web/.next/static/chunks/main-0205543fb3b69ad5.js +1 -0
  396. package/bundle/standalone/apps/web/.next/static/chunks/main-app-20d292116f434ff3.js +1 -0
  397. package/bundle/standalone/apps/web/.next/static/chunks/pages/_app-fe81927504f65cde.js +1 -0
  398. package/bundle/standalone/apps/web/.next/static/chunks/pages/_error-2973b69c43483f0b.js +1 -0
  399. package/bundle/standalone/apps/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  400. package/bundle/standalone/apps/web/.next/static/chunks/webpack-8818fea786a923fe.js +1 -0
  401. package/bundle/standalone/apps/web/.next/static/css/c00514317f297826.css +3 -0
  402. package/bundle/standalone/apps/web/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
  403. package/bundle/standalone/apps/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  404. package/bundle/standalone/apps/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  405. package/bundle/standalone/apps/web/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
  406. package/bundle/standalone/apps/web/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
  407. package/bundle/standalone/apps/web/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
  408. package/bundle/standalone/apps/web/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
  409. package/bundle/standalone/apps/web/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
  410. package/bundle/standalone/apps/web/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
  411. package/bundle/standalone/apps/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  412. package/bundle/standalone/apps/web/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
  413. package/bundle/standalone/apps/web/.next/static/media/9b01607e2f794050-s.p.woff2 +0 -0
  414. package/bundle/standalone/apps/web/.next/static/media/a5ded5fed781d3c1-s.woff2 +0 -0
  415. package/bundle/standalone/apps/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  416. package/bundle/standalone/apps/web/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
  417. package/bundle/standalone/apps/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  418. package/bundle/standalone/apps/web/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
  419. package/bundle/standalone/apps/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  420. package/bundle/standalone/apps/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  421. package/bundle/standalone/apps/web/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
  422. package/bundle/standalone/apps/web/.next/static/media/f28ff2d15b1e9bd8-s.woff2 +0 -0
  423. package/bundle/standalone/apps/web/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
  424. package/bundle/standalone/apps/web/package.json +66 -0
  425. package/bundle/standalone/apps/web/public/logo-dark.png +0 -0
  426. package/bundle/standalone/apps/web/public/logo.png +0 -0
  427. package/bundle/standalone/apps/web/server.js +38 -0
  428. package/bundle/standalone/apps/web/src/lib/mcp-tools.json +1941 -0
  429. package/bundle/standalone/node_modules/kontexta-mcp/dist/agent-rules/rules-block.md +185 -0
  430. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.d.ts +2 -0
  431. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.d.ts.map +1 -0
  432. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js +205 -0
  433. package/bundle/standalone/node_modules/kontexta-mcp/dist/calendar-tools.js.map +1 -0
  434. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.d.ts +25 -0
  435. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.d.ts.map +1 -0
  436. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.js +40 -0
  437. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/confirm.js.map +1 -0
  438. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.d.ts +13 -0
  439. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.d.ts.map +1 -0
  440. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js +250 -0
  441. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/executor.js.map +1 -0
  442. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.d.ts +11 -0
  443. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.d.ts.map +1 -0
  444. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js +39 -0
  445. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/formatter.js.map +1 -0
  446. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.d.ts +4 -0
  447. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.d.ts.map +1 -0
  448. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js +164 -0
  449. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/loader.js.map +1 -0
  450. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.d.ts +42 -0
  451. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.d.ts.map +1 -0
  452. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.js +143 -0
  453. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/registry.js.map +1 -0
  454. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.d.ts +16 -0
  455. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.d.ts.map +1 -0
  456. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js +86 -0
  457. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/sanitizer.js.map +1 -0
  458. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.d.ts +2 -0
  459. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.d.ts.map +1 -0
  460. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js +202 -0
  461. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/schema-doc.js.map +1 -0
  462. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.d.ts +50 -0
  463. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.d.ts.map +1 -0
  464. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.js +2 -0
  465. package/bundle/standalone/node_modules/kontexta-mcp/dist/hands/types.js.map +1 -0
  466. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.d.ts +3 -0
  467. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.d.ts.map +1 -0
  468. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js +2117 -0
  469. package/bundle/standalone/node_modules/kontexta-mcp/dist/index.js.map +1 -0
  470. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts +31 -0
  471. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.d.ts.map +1 -0
  472. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js +293 -0
  473. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-capture.js.map +1 -0
  474. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.d.ts +2 -0
  475. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.d.ts.map +1 -0
  476. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.js +24 -0
  477. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-commit-upgrades-tool.js.map +1 -0
  478. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.d.ts +2 -0
  479. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.d.ts.map +1 -0
  480. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.js +24 -0
  481. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-housekeep-tool.js.map +1 -0
  482. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts +2 -0
  483. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.d.ts.map +1 -0
  484. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js +57 -0
  485. package/bundle/standalone/node_modules/kontexta-mcp/dist/journal-tools.js.map +1 -0
  486. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/001-initial.sql +72 -0
  487. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/002-remote-git.sql +2 -0
  488. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/003-source-path-index.sql +2 -0
  489. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/004-journaling.sql +44 -0
  490. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/005-auth.sql +7 -0
  491. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/006-journal-locks.sql +11 -0
  492. package/bundle/standalone/node_modules/kontexta-mcp/dist/migrations/007-calendar.sql +49 -0
  493. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.d.ts +9 -0
  494. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.d.ts.map +1 -0
  495. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js +25 -0
  496. package/bundle/standalone/node_modules/kontexta-mcp/dist/profile-tool.js.map +1 -0
  497. package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.d.ts +4 -0
  498. package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.d.ts.map +1 -0
  499. package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.js +14 -0
  500. package/bundle/standalone/node_modules/kontexta-mcp/dist/re2-compat.js.map +1 -0
  501. package/bundle/standalone/node_modules/kontexta-mcp/package.json +66 -0
  502. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts +73 -0
  503. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.d.ts.map +1 -0
  504. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js +436 -0
  505. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/index.js.map +1 -0
  506. package/bundle/standalone/node_modules/kxta-core/dist/agent-rules/rules-block.md +185 -0
  507. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts +26 -0
  508. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.d.ts.map +1 -0
  509. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js +115 -0
  510. package/bundle/standalone/node_modules/kxta-core/dist/bundle/index.js.map +1 -0
  511. package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.d.ts +32 -0
  512. package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.d.ts.map +1 -0
  513. package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.js +129 -0
  514. package/bundle/standalone/node_modules/kxta-core/dist/calendar/conflicts.js.map +1 -0
  515. package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.d.ts +16 -0
  516. package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.d.ts.map +1 -0
  517. package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.js +73 -0
  518. package/bundle/standalone/node_modules/kxta-core/dist/calendar/ics.js.map +1 -0
  519. package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.d.ts +9 -0
  520. package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.d.ts.map +1 -0
  521. package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.js +7 -0
  522. package/bundle/standalone/node_modules/kxta-core/dist/calendar/index.js.map +1 -0
  523. package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.d.ts +65 -0
  524. package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.d.ts.map +1 -0
  525. package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.js +219 -0
  526. package/bundle/standalone/node_modules/kxta-core/dist/calendar/repository.js.map +1 -0
  527. package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.d.ts +52 -0
  528. package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.d.ts.map +1 -0
  529. package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.js +2 -0
  530. package/bundle/standalone/node_modules/kxta-core/dist/calendar/types.js.map +1 -0
  531. package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.d.ts +11 -0
  532. package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.d.ts.map +1 -0
  533. package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.js +39 -0
  534. package/bundle/standalone/node_modules/kxta-core/dist/calendar/validate.js.map +1 -0
  535. package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.d.ts +26 -0
  536. package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.d.ts.map +1 -0
  537. package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.js +315 -0
  538. package/bundle/standalone/node_modules/kxta-core/dist/clip/extract.js.map +1 -0
  539. package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.d.ts +10 -0
  540. package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.d.ts.map +1 -0
  541. package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.js +53 -0
  542. package/bundle/standalone/node_modules/kxta-core/dist/clip/frontmatter.js.map +1 -0
  543. package/bundle/standalone/node_modules/kxta-core/dist/clip/index.d.ts +12 -0
  544. package/bundle/standalone/node_modules/kxta-core/dist/clip/index.d.ts.map +1 -0
  545. package/bundle/standalone/node_modules/kxta-core/dist/clip/index.js +38 -0
  546. package/bundle/standalone/node_modules/kxta-core/dist/clip/index.js.map +1 -0
  547. package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.d.ts +2 -0
  548. package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.d.ts.map +1 -0
  549. package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.js +26 -0
  550. package/bundle/standalone/node_modules/kxta-core/dist/compat/env-shim.js.map +1 -0
  551. package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.d.ts +3 -0
  552. package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.d.ts.map +1 -0
  553. package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.js +30 -0
  554. package/bundle/standalone/node_modules/kxta-core/dist/compat/file-migration.js.map +1 -0
  555. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts +37 -0
  556. package/bundle/standalone/node_modules/kxta-core/dist/db/index.d.ts.map +1 -0
  557. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js +182 -0
  558. package/bundle/standalone/node_modules/kxta-core/dist/db/index.js.map +1 -0
  559. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/001-initial.sql +72 -0
  560. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/002-remote-git.sql +2 -0
  561. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/003-source-path-index.sql +2 -0
  562. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/004-journaling.sql +44 -0
  563. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/005-auth.sql +7 -0
  564. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/006-journal-locks.sql +11 -0
  565. package/bundle/standalone/node_modules/kxta-core/dist/db/migrations/007-calendar.sql +49 -0
  566. package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts +84 -0
  567. package/bundle/standalone/node_modules/kxta-core/dist/files/index.d.ts.map +1 -0
  568. package/bundle/standalone/node_modules/kxta-core/dist/files/index.js +631 -0
  569. package/bundle/standalone/node_modules/kxta-core/dist/files/index.js.map +1 -0
  570. package/bundle/standalone/node_modules/kxta-core/dist/files/sections.d.ts +48 -0
  571. package/bundle/standalone/node_modules/kxta-core/dist/files/sections.d.ts.map +1 -0
  572. package/bundle/standalone/node_modules/kxta-core/dist/files/sections.js +112 -0
  573. package/bundle/standalone/node_modules/kxta-core/dist/files/sections.js.map +1 -0
  574. package/bundle/standalone/node_modules/kxta-core/dist/git/index.d.ts +92 -0
  575. package/bundle/standalone/node_modules/kxta-core/dist/git/index.d.ts.map +1 -0
  576. package/bundle/standalone/node_modules/kxta-core/dist/git/index.js +801 -0
  577. package/bundle/standalone/node_modules/kxta-core/dist/git/index.js.map +1 -0
  578. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts +24 -0
  579. package/bundle/standalone/node_modules/kxta-core/dist/index.d.ts.map +1 -0
  580. package/bundle/standalone/node_modules/kxta-core/dist/index.js +22 -0
  581. package/bundle/standalone/node_modules/kxta-core/dist/index.js.map +1 -0
  582. package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.d.ts +28 -0
  583. package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.d.ts.map +1 -0
  584. package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.js +61 -0
  585. package/bundle/standalone/node_modules/kxta-core/dist/journal/cooldown.js.map +1 -0
  586. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts +16 -0
  587. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.d.ts.map +1 -0
  588. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js +311 -0
  589. package/bundle/standalone/node_modules/kxta-core/dist/journal/distill.js.map +1 -0
  590. package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.d.ts +45 -0
  591. package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.d.ts.map +1 -0
  592. package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.js +198 -0
  593. package/bundle/standalone/node_modules/kxta-core/dist/journal/engine.js.map +1 -0
  594. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.d.ts +11 -0
  595. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.d.ts.map +1 -0
  596. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js +41 -0
  597. package/bundle/standalone/node_modules/kxta-core/dist/journal/git-watcher.js.map +1 -0
  598. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts +16 -0
  599. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.d.ts.map +1 -0
  600. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js +30 -0
  601. package/bundle/standalone/node_modules/kxta-core/dist/journal/high-water.js.map +1 -0
  602. package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.d.ts +22 -0
  603. package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.d.ts.map +1 -0
  604. package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.js +104 -0
  605. package/bundle/standalone/node_modules/kxta-core/dist/journal/housekeep.js.map +1 -0
  606. package/bundle/standalone/node_modules/kxta-core/dist/journal/index.d.ts +27 -0
  607. package/bundle/standalone/node_modules/kxta-core/dist/journal/index.d.ts.map +1 -0
  608. package/bundle/standalone/node_modules/kxta-core/dist/journal/index.js +18 -0
  609. package/bundle/standalone/node_modules/kxta-core/dist/journal/index.js.map +1 -0
  610. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.d.ts +3 -0
  611. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.d.ts.map +1 -0
  612. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.js +31 -0
  613. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/build-failure-recovery.js.map +1 -0
  614. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.d.ts +3 -0
  615. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.d.ts.map +1 -0
  616. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.js +31 -0
  617. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/error-recovery.js.map +1 -0
  618. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts +3 -0
  619. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.d.ts.map +1 -0
  620. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js +28 -0
  621. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/exploration.js.map +1 -0
  622. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.d.ts +13 -0
  623. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.d.ts.map +1 -0
  624. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.js +45 -0
  625. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/extra-loader.js.map +1 -0
  626. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.d.ts +3 -0
  627. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.d.ts.map +1 -0
  628. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.js +21 -0
  629. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/feature-development.js.map +1 -0
  630. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.d.ts +3 -0
  631. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.d.ts.map +1 -0
  632. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.js +21 -0
  633. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/incident-response.js.map +1 -0
  634. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.d.ts +16 -0
  635. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.d.ts.map +1 -0
  636. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.js +40 -0
  637. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/index.js.map +1 -0
  638. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.d.ts +3 -0
  639. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.d.ts.map +1 -0
  640. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.js +15 -0
  641. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/pivot.js.map +1 -0
  642. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts +3 -0
  643. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.d.ts.map +1 -0
  644. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js +24 -0
  645. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/read-only-investigation.js.map +1 -0
  646. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.d.ts +3 -0
  647. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.d.ts.map +1 -0
  648. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js +42 -0
  649. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/refactor.js.map +1 -0
  650. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.d.ts +3 -0
  651. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.d.ts.map +1 -0
  652. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js +22 -0
  653. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/tagging-pass.js.map +1 -0
  654. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.d.ts +3 -0
  655. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.d.ts.map +1 -0
  656. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.js +23 -0
  657. package/bundle/standalone/node_modules/kxta-core/dist/journal/patterns/test-cycle.js.map +1 -0
  658. package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.d.ts +2 -0
  659. package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.d.ts.map +1 -0
  660. package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.js +17 -0
  661. package/bundle/standalone/node_modules/kxta-core/dist/journal/presence.js.map +1 -0
  662. package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.d.ts +8 -0
  663. package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.d.ts.map +1 -0
  664. package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.js +40 -0
  665. package/bundle/standalone/node_modules/kxta-core/dist/journal/redact.js.map +1 -0
  666. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts +10 -0
  667. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.d.ts.map +1 -0
  668. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js +40 -0
  669. package/bundle/standalone/node_modules/kxta-core/dist/journal/renderer.js.map +1 -0
  670. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts +30 -0
  671. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.d.ts.map +1 -0
  672. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js +66 -0
  673. package/bundle/standalone/node_modules/kxta-core/dist/journal/repository.js.map +1 -0
  674. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts +9 -0
  675. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.d.ts.map +1 -0
  676. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js +32 -0
  677. package/bundle/standalone/node_modules/kxta-core/dist/journal/strict-mode.js.map +1 -0
  678. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts +4 -0
  679. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.d.ts.map +1 -0
  680. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js +71 -0
  681. package/bundle/standalone/node_modules/kxta-core/dist/journal/topic-detector.js.map +1 -0
  682. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts +59 -0
  683. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.d.ts.map +1 -0
  684. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.js +3 -0
  685. package/bundle/standalone/node_modules/kxta-core/dist/journal/types.js.map +1 -0
  686. package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.d.ts +16 -0
  687. package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.d.ts.map +1 -0
  688. package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.js +44 -0
  689. package/bundle/standalone/node_modules/kxta-core/dist/journal/writer.js.map +1 -0
  690. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts +97 -0
  691. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.d.ts.map +1 -0
  692. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js +517 -0
  693. package/bundle/standalone/node_modules/kxta-core/dist/metadata/index.js.map +1 -0
  694. package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.d.ts +13 -0
  695. package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.d.ts.map +1 -0
  696. package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.js +33 -0
  697. package/bundle/standalone/node_modules/kxta-core/dist/metadata/settings.js.map +1 -0
  698. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts +23 -0
  699. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.d.ts.map +1 -0
  700. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js +161 -0
  701. package/bundle/standalone/node_modules/kxta-core/dist/profile/index.js.map +1 -0
  702. package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.d.ts +34 -0
  703. package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.d.ts.map +1 -0
  704. package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.js +157 -0
  705. package/bundle/standalone/node_modules/kxta-core/dist/project-map/index.js.map +1 -0
  706. package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts +69 -0
  707. package/bundle/standalone/node_modules/kxta-core/dist/types.d.ts.map +1 -0
  708. package/bundle/standalone/node_modules/kxta-core/dist/types.js +5 -0
  709. package/bundle/standalone/node_modules/kxta-core/dist/types.js.map +1 -0
  710. package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.d.ts +15 -0
  711. package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.d.ts.map +1 -0
  712. package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.js +26 -0
  713. package/bundle/standalone/node_modules/kxta-core/dist/util/extensions.js.map +1 -0
  714. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts +31 -0
  715. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.d.ts.map +1 -0
  716. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js +179 -0
  717. package/bundle/standalone/node_modules/kxta-core/dist/util/paths.js.map +1 -0
  718. package/bundle/standalone/node_modules/kxta-core/dist/util/safety.d.ts +37 -0
  719. package/bundle/standalone/node_modules/kxta-core/dist/util/safety.d.ts.map +1 -0
  720. package/bundle/standalone/node_modules/kxta-core/dist/util/safety.js +156 -0
  721. package/bundle/standalone/node_modules/kxta-core/dist/util/safety.js.map +1 -0
  722. package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.d.ts +3 -0
  723. package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.d.ts.map +1 -0
  724. package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.js +13 -0
  725. package/bundle/standalone/node_modules/kxta-core/dist/util/tokens.js.map +1 -0
  726. package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.d.ts +9 -0
  727. package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.d.ts.map +1 -0
  728. package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.js +214 -0
  729. package/bundle/standalone/node_modules/kxta-core/dist/watcher/index.js.map +1 -0
  730. package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.d.ts +36 -0
  731. package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.d.ts.map +1 -0
  732. package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.js +94 -0
  733. package/bundle/standalone/node_modules/kxta-core/dist/whats-new/index.js.map +1 -0
  734. package/bundle/standalone/node_modules/kxta-core/package.json +20 -0
  735. package/bundle/standalone/node_modules/kxta-publish/dist/cli.d.ts +9 -0
  736. package/bundle/standalone/node_modules/kxta-publish/dist/cli.js +139 -0
  737. package/bundle/standalone/node_modules/kxta-publish/dist/config.d.ts +25 -0
  738. package/bundle/standalone/node_modules/kxta-publish/dist/config.js +62 -0
  739. package/bundle/standalone/node_modules/kxta-publish/dist/index.d.ts +2 -0
  740. package/bundle/standalone/node_modules/kxta-publish/dist/index.js +45 -0
  741. package/bundle/standalone/node_modules/kxta-publish/dist/pipeline.d.ts +14 -0
  742. package/bundle/standalone/node_modules/kxta-publish/dist/pipeline.js +42 -0
  743. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/endpoints.d.ts +6 -0
  744. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/endpoints.js +112 -0
  745. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/glossary.d.ts +2 -0
  746. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/glossary.js +42 -0
  747. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/mermaid.d.ts +2 -0
  748. package/bundle/standalone/node_modules/kxta-publish/dist/render/blocks/mermaid.js +17 -0
  749. package/bundle/standalone/node_modules/kxta-publish/dist/render/llms.d.ts +3 -0
  750. package/bundle/standalone/node_modules/kxta-publish/dist/render/llms.js +52 -0
  751. package/bundle/standalone/node_modules/kxta-publish/dist/render/markdown.d.ts +24 -0
  752. package/bundle/standalone/node_modules/kxta-publish/dist/render/markdown.js +87 -0
  753. package/bundle/standalone/node_modules/kxta-publish/dist/render/nav.d.ts +21 -0
  754. package/bundle/standalone/node_modules/kxta-publish/dist/render/nav.js +107 -0
  755. package/bundle/standalone/node_modules/kxta-publish/dist/render/pdf.d.ts +10 -0
  756. package/bundle/standalone/node_modules/kxta-publish/dist/render/pdf.js +70 -0
  757. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/01-overview.md +74 -0
  758. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/02-api.md +169 -0
  759. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/03-improvements.md +90 -0
  760. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/04-glossary.md +55 -0
  761. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/seeds.d.ts +3 -0
  762. package/bundle/standalone/node_modules/kxta-publish/dist/seeds/seeds.js +53 -0
  763. package/bundle/standalone/node_modules/kxta-publish/dist/source/enumerate.d.ts +3 -0
  764. package/bundle/standalone/node_modules/kxta-publish/dist/source/enumerate.js +50 -0
  765. package/bundle/standalone/node_modules/kxta-publish/dist/source/reader.d.ts +20 -0
  766. package/bundle/standalone/node_modules/kxta-publish/dist/source/reader.js +20 -0
  767. package/bundle/standalone/node_modules/kxta-publish/dist/template/api-ref.css +593 -0
  768. package/bundle/standalone/node_modules/kxta-publish/dist/template/app.js +297 -0
  769. package/bundle/standalone/node_modules/kxta-publish/dist/template/brutalist.css +57 -0
  770. package/bundle/standalone/node_modules/kxta-publish/dist/template/flat.css +182 -0
  771. package/bundle/standalone/node_modules/kxta-publish/dist/template/minimal.css +578 -0
  772. package/bundle/standalone/node_modules/kxta-publish/dist/template/ocean.css +179 -0
  773. package/bundle/standalone/node_modules/kxta-publish/dist/template/paper.css +33 -0
  774. package/bundle/standalone/node_modules/kxta-publish/dist/template/shell.d.ts +8 -0
  775. package/bundle/standalone/node_modules/kxta-publish/dist/template/shell.js +181 -0
  776. package/bundle/standalone/node_modules/kxta-publish/dist/template/solarized.css +162 -0
  777. package/bundle/standalone/node_modules/kxta-publish/dist/template/terminal.css +37 -0
  778. package/bundle/standalone/node_modules/kxta-publish/dist/template/theme.css +701 -0
  779. package/bundle/standalone/node_modules/kxta-publish/dist/types.d.ts +97 -0
  780. package/bundle/standalone/node_modules/kxta-publish/dist/types.js +1 -0
  781. package/bundle/standalone/node_modules/kxta-publish/package.json +25 -0
  782. package/bundle/standalone/package.json +26 -0
  783. package/dist/chunk-KQTCKRN2.js +31 -0
  784. package/dist/doctor-W733U3FD.js +46 -0
  785. package/dist/index.js +45 -0
  786. package/dist/mcp-DGMGR3MZ.js +34 -0
  787. package/dist/start-RCW7AKUK.js +121 -0
  788. package/package.json +89 -0
@@ -0,0 +1,436 @@
1
+ import { lstatSync, readdirSync, mkdirSync, writeFileSync, readFileSync, renameSync, unlinkSync, existsSync } from "node:fs";
2
+ import { join, sep, dirname, isAbsolute } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { assertPathInside } from "../util/safety.js";
5
+ function loadCorePackageVersion() {
6
+ try {
7
+ let currentDir = dirname(fileURLToPath(import.meta.url));
8
+ while (currentDir !== dirname(currentDir)) {
9
+ const p = join(currentDir, "package.json");
10
+ if (existsSync(p)) {
11
+ const pkg = JSON.parse(readFileSync(p, "utf8"));
12
+ if (pkg.name === "kxta-core") {
13
+ return pkg.rulesVersion || pkg.version || "0.0.0";
14
+ }
15
+ }
16
+ currentDir = dirname(currentDir);
17
+ }
18
+ }
19
+ catch { }
20
+ return "0.0.0";
21
+ }
22
+ export const RULE_BLOCK_VERSION = loadCorePackageVersion();
23
+ export const SESSION_START_HOOK_SNIPPET = JSON.stringify({
24
+ hooks: {
25
+ SessionStart: [
26
+ {
27
+ matcher: "*",
28
+ hooks: [
29
+ {
30
+ type: "command",
31
+ command: "echo 'kontexta: distill_journal recommended at session start' && true",
32
+ },
33
+ ],
34
+ },
35
+ ],
36
+ },
37
+ }, null, 2);
38
+ export const STOP_HOOK_SNIPPET = JSON.stringify({
39
+ hooks: {
40
+ Stop: [
41
+ {
42
+ matcher: "*",
43
+ hooks: [
44
+ {
45
+ type: "command",
46
+ command: "echo 'kontexta: end-of-session distill_journal recommended' && true",
47
+ },
48
+ ],
49
+ },
50
+ ],
51
+ },
52
+ }, null, 2);
53
+ export const POST_TOOL_USE_HOOK_SNIPPET = JSON.stringify({
54
+ hooks: {
55
+ PostToolUse: [
56
+ {
57
+ matcher: "Bash(git*)|mcp__kontexta__commit_backup|mcp__kontexta__move_file",
58
+ hooks: [
59
+ {
60
+ type: "command",
61
+ command: "echo 'kontexta: git context refresh hint' && true",
62
+ },
63
+ ],
64
+ },
65
+ ],
66
+ },
67
+ }, null, 2);
68
+ const claudeStyleHeader = (p) => p.description ? `# ${p.name}\n\n${p.description}\n\n` : `# ${p.name}\n\n`;
69
+ export const SCAFFOLDS = {
70
+ "claude-code": { path: "CLAUDE.md", header: claudeStyleHeader },
71
+ codex: { path: "AGENTS.md", header: claudeStyleHeader },
72
+ gemini: { path: "GEMINI.md", header: claudeStyleHeader },
73
+ antigravity: { path: "ANTIGRAVITY.md", header: claudeStyleHeader },
74
+ cursor: {
75
+ path: ".cursor/rules/kontexta.mdc",
76
+ header: (p) => `---\ndescription: kontexta workflow rules for ${p.name}\nalwaysApply: true\n---\n\n`,
77
+ },
78
+ continue: {
79
+ path: ".continue/rules/kontexta.md",
80
+ header: (p) => `# kontexta rules — ${p.name}\n\n`,
81
+ },
82
+ aider: {
83
+ path: ".aider/kontexta.md",
84
+ header: (p) => `<!--\n kontexta rules for Aider — ${p.name}\n To enable, add this to your .aider.conf.yml:\n read:\n - .aider/kontexta.md\n-->\n\n`,
85
+ },
86
+ cline: { path: ".clinerules", header: claudeStyleHeader },
87
+ copilot: { path: ".github/copilot-instructions.md", header: claudeStyleHeader },
88
+ generic: { path: "CLAUDE.md", header: claudeStyleHeader },
89
+ };
90
+ function loadRulesBlockBody() {
91
+ const here = dirname(fileURLToPath(import.meta.url));
92
+ // We check multiple candidates to handle different deployment environments:
93
+ // 1. Standard tsc build: dist/agent-rules/rules-block.md (here/rules-block.md)
94
+ // 2. Tsup bundle (MCP): apps/mcp/dist/agent-rules/rules-block.md (here/agent-rules/rules-block.md)
95
+ // 3. Next.js standalone: handles monorepo flattening or relative tracing.
96
+ const candidates = [
97
+ join(here, "rules-block.md"),
98
+ join(here, "agent-rules", "rules-block.md"),
99
+ join(here, "..", "..", "src", "agent-rules", "rules-block.md"), // dist/agent-rules → package root → src/agent-rules
100
+ join(process.cwd(), "packages", "core", "src", "agent-rules", "rules-block.md"),
101
+ join(process.cwd(), "packages", "core", "dist", "agent-rules", "rules-block.md"),
102
+ // Next.js standalone: server.js chdirs into apps/web, so monorepo root is two up
103
+ join(process.cwd(), "..", "..", "packages", "core", "src", "agent-rules", "rules-block.md"),
104
+ join(process.cwd(), "..", "..", "packages", "core", "dist", "agent-rules", "rules-block.md"),
105
+ ];
106
+ const errors = [];
107
+ for (const p of candidates) {
108
+ try {
109
+ if (!existsSync(p)) {
110
+ errors.push(`not found: ${p}`);
111
+ continue;
112
+ }
113
+ const raw = readFileSync(p, "utf8");
114
+ const beginIdx = raw.indexOf("<!-- BEGIN kontexta:rules");
115
+ if (beginIdx === -1) {
116
+ errors.push(`missing BEGIN marker: ${p}`);
117
+ continue;
118
+ }
119
+ return raw.slice(beginIdx).replace(/\{\{VERSION\}\}/g, RULE_BLOCK_VERSION);
120
+ }
121
+ catch (e) {
122
+ errors.push(`error reading ${p}: ${e.message}`);
123
+ }
124
+ }
125
+ throw new Error(`rules-block.md not found or invalid. Checked:\n- ${candidates.join("\n- ")}\nDetails:\n- ${errors.join("\n- ")}`);
126
+ }
127
+ // Try eagerly so existing `import { RULES_BLOCK_BODY }` consumers still see
128
+ // the content, but DON'T throw if the asset is missing — previously a missing
129
+ // rules-block.md broke every `import "kxta-core"` (web, MCP, publish, etc.)
130
+ // even for callers that never touch agent-rules. The deferred error surfaces
131
+ // only when getRulesBlockBody() is actually called.
132
+ let _rulesBlockBody = null;
133
+ let _rulesBlockError = null;
134
+ try {
135
+ _rulesBlockBody = loadRulesBlockBody();
136
+ }
137
+ catch (e) {
138
+ _rulesBlockError = e instanceof Error ? e : new Error(String(e));
139
+ }
140
+ export function getRulesBlockBody() {
141
+ if (_rulesBlockBody != null)
142
+ return _rulesBlockBody;
143
+ // Retry once in case the file appeared after module load (HMR / lazy copy).
144
+ try {
145
+ _rulesBlockBody = loadRulesBlockBody();
146
+ _rulesBlockError = null;
147
+ return _rulesBlockBody;
148
+ }
149
+ catch (e) {
150
+ _rulesBlockError = e instanceof Error ? e : new Error(String(e));
151
+ throw _rulesBlockError;
152
+ }
153
+ }
154
+ export const RULES_BLOCK_BODY = _rulesBlockBody ?? "";
155
+ // Note: .aider.conf.yml is intentionally NOT in this list. It's a YAML file;
156
+ // injectOrUpdate writes HTML-comment markers (<!-- BEGIN... -->) which would
157
+ // syntax-corrupt YAML. Aider's rules go in .aider/kontexta.md (see SCAFFOLDS),
158
+ // referenced from the YAML via a `read:` directive.
159
+ const ROOT_FILES = ["CLAUDE.md", "AGENTS.md", "GEMINI.md", "ANTIGRAVITY.md", ".clinerules", ".github/copilot-instructions.md"];
160
+ const SUBDIR_GLOBS = [
161
+ { dir: ".cursor/rules", ext: ".mdc" },
162
+ { dir: ".continue/rules", ext: ".md" },
163
+ { dir: ".aider", ext: ".md" },
164
+ ];
165
+ function isRegularNonSymlink(absPath) {
166
+ try {
167
+ return lstatSync(absPath).isFile();
168
+ }
169
+ catch {
170
+ return false;
171
+ }
172
+ }
173
+ function toForwardSlashes(p) {
174
+ return sep === "/" ? p : p.split(sep).join("/");
175
+ }
176
+ export function detectAgentContextFiles(projectPath) {
177
+ const out = [];
178
+ for (const name of ROOT_FILES) {
179
+ if (isRegularNonSymlink(join(projectPath, name))) {
180
+ out.push(name);
181
+ }
182
+ }
183
+ for (const { dir, ext } of SUBDIR_GLOBS) {
184
+ const full = join(projectPath, dir);
185
+ let entries;
186
+ try {
187
+ entries = readdirSync(full);
188
+ }
189
+ catch {
190
+ continue;
191
+ }
192
+ entries.sort();
193
+ for (const entry of entries) {
194
+ if (!entry.endsWith(ext))
195
+ continue;
196
+ if (!isRegularNonSymlink(join(full, entry)))
197
+ continue;
198
+ out.push(toForwardSlashes(join(dir, entry)));
199
+ }
200
+ }
201
+ return out;
202
+ }
203
+ const BEGIN_RE = /<!--\s*BEGIN\s+kontexta:rules\s+v(\d+\.\d+\.\d+)\s*-->/g;
204
+ const END_RE = /<!--\s*END\s+kontexta:rules(?:\s+v\d+\.\d+\.\d+)?\s*-->/;
205
+ export function parseMarker(content) {
206
+ BEGIN_RE.lastIndex = 0;
207
+ const matches = [...content.matchAll(BEGIN_RE)];
208
+ if (matches.length === 0)
209
+ return null;
210
+ if (matches.length > 1)
211
+ return { kind: "duplicate" };
212
+ const m = matches[0];
213
+ const version = m[1];
214
+ const beginAt = m.index ?? 0;
215
+ const afterBegin = beginAt + m[0].length;
216
+ const tail = content.slice(afterBegin);
217
+ const endMatch = tail.match(END_RE);
218
+ if (!endMatch || endMatch.index === undefined)
219
+ return { kind: "malformed" };
220
+ const endAt = afterBegin + endMatch.index + endMatch[0].length;
221
+ return { kind: "ok", version, beginAt, endAt };
222
+ }
223
+ export class InjectError extends Error {
224
+ code;
225
+ constructor(code, message) {
226
+ super(message);
227
+ this.code = code;
228
+ this.name = "InjectError";
229
+ }
230
+ }
231
+ export function injectOrUpdate(content, block, version) {
232
+ const parsed = parseMarker(content);
233
+ if (parsed === null) {
234
+ const sep = content.length === 0 ? "" : content.endsWith("\n\n") ? "" : content.endsWith("\n") ? "\n" : "\n\n";
235
+ return { action: "updated", content: content + sep + block };
236
+ }
237
+ if (parsed.kind === "malformed") {
238
+ throw new InjectError("malformed", "kontexta rules marker is malformed (BEGIN with no matching END)");
239
+ }
240
+ if (parsed.kind === "duplicate") {
241
+ throw new InjectError("duplicate", "duplicate kontexta rules marker found");
242
+ }
243
+ if (parsed.version === version) {
244
+ return { action: "skipped", content };
245
+ }
246
+ const before = content.slice(0, parsed.beginAt);
247
+ const after = content.slice(parsed.endAt);
248
+ return { action: "updated", content: before + block.replace(/\n$/, "") + after };
249
+ }
250
+ let _atomicWriteSeq = 0;
251
+ function atomicWrite(absPath, content) {
252
+ // Refuse to write THROUGH a symlink. The intended use is to manage agent
253
+ // context files; replacing a user's intentional symlink with a regular
254
+ // file via the renameSync below would silently undo their setup.
255
+ try {
256
+ const st = lstatSync(absPath);
257
+ if (st.isSymbolicLink()) {
258
+ throw new Error(`Refusing to write through symlink: ${absPath}`);
259
+ }
260
+ }
261
+ catch (e) {
262
+ if (e?.code !== "ENOENT") {
263
+ // Re-throw the explicit symlink error; ignore stat-failures so a
264
+ // missing parent dir still goes through the mkdir path below.
265
+ if (e?.message?.startsWith("Refusing"))
266
+ throw e;
267
+ }
268
+ }
269
+ mkdirSync(dirname(absPath), { recursive: true });
270
+ // Counter + pid + ms gives a unique tmp name even when two concurrent
271
+ // calls land on the same millisecond inside the same process.
272
+ const tmp = `${absPath}.tmp.${process.pid}.${Date.now()}.${++_atomicWriteSeq}`;
273
+ try {
274
+ writeFileSync(tmp, content, "utf8");
275
+ renameSync(tmp, absPath);
276
+ }
277
+ catch (e) {
278
+ try {
279
+ unlinkSync(tmp);
280
+ }
281
+ catch { }
282
+ throw e;
283
+ }
284
+ }
285
+ function classifyAccessError(e) {
286
+ if (e?.code === "ENOENT")
287
+ return "missing";
288
+ if (e?.code === "EROFS")
289
+ return "read-only";
290
+ return "unreadable";
291
+ }
292
+ function resolveInside(base, rel) {
293
+ try {
294
+ return assertPathInside(base, rel);
295
+ }
296
+ catch {
297
+ return null;
298
+ }
299
+ }
300
+ export function syncAgentRules(opts) {
301
+ const { projectPath, project, files, targetAgent } = opts;
302
+ const written = [];
303
+ const skipped = [];
304
+ if (files.length === 0) {
305
+ if (!targetAgent) {
306
+ throw new Error("syncAgentRules: targetAgent required when files is empty");
307
+ }
308
+ const scaffold = SCAFFOLDS[targetAgent];
309
+ const relPath = scaffold.path;
310
+ const absPath = resolveInside(projectPath, relPath);
311
+ if (!absPath) {
312
+ skipped.push({ path: relPath, reason: "escape" });
313
+ return { written, skipped };
314
+ }
315
+ const initial = scaffold.header(project) + getRulesBlockBody();
316
+ atomicWrite(absPath, initial);
317
+ written.push({ path: relPath, action: "created", version: RULE_BLOCK_VERSION });
318
+ return {
319
+ written,
320
+ skipped,
321
+ optional_hook_snippet: SESSION_START_HOOK_SNIPPET,
322
+ optional_hook_install_path: "~/.claude/settings.json (Claude Code only)",
323
+ optional_hook_snippets: {
324
+ SessionStart: SESSION_START_HOOK_SNIPPET,
325
+ Stop: STOP_HOOK_SNIPPET,
326
+ PostToolUse: POST_TOOL_USE_HOOK_SNIPPET,
327
+ },
328
+ };
329
+ }
330
+ for (const rel of files) {
331
+ if (isAbsolute(rel)) {
332
+ skipped.push({ path: rel, reason: "escape" });
333
+ continue;
334
+ }
335
+ const absPath = resolveInside(projectPath, rel);
336
+ if (!absPath) {
337
+ skipped.push({ path: rel, reason: "escape" });
338
+ continue;
339
+ }
340
+ let stat;
341
+ try {
342
+ stat = lstatSync(absPath);
343
+ }
344
+ catch (e) {
345
+ skipped.push({ path: rel, reason: classifyAccessError(e) });
346
+ continue;
347
+ }
348
+ if (stat.isSymbolicLink()) {
349
+ skipped.push({ path: rel, reason: "symlink" });
350
+ continue;
351
+ }
352
+ if (!stat.isFile()) {
353
+ skipped.push({ path: rel, reason: "unreadable" });
354
+ continue;
355
+ }
356
+ let content;
357
+ try {
358
+ content = readFileSync(absPath, "utf8");
359
+ }
360
+ catch (e) {
361
+ skipped.push({ path: rel, reason: classifyAccessError(e) });
362
+ continue;
363
+ }
364
+ let result;
365
+ try {
366
+ result = injectOrUpdate(content, getRulesBlockBody(), RULE_BLOCK_VERSION);
367
+ }
368
+ catch (e) {
369
+ if (e instanceof InjectError) {
370
+ skipped.push({ path: rel, reason: e.code === "malformed" ? "malformed marker" : "duplicate marker" });
371
+ continue;
372
+ }
373
+ throw e;
374
+ }
375
+ if (result.action === "skipped") {
376
+ written.push({ path: rel, action: "skipped", version: RULE_BLOCK_VERSION });
377
+ continue;
378
+ }
379
+ try {
380
+ atomicWrite(absPath, result.content);
381
+ }
382
+ catch (e) {
383
+ skipped.push({ path: rel, reason: classifyAccessError(e) });
384
+ continue;
385
+ }
386
+ written.push({ path: rel, action: "updated", version: RULE_BLOCK_VERSION });
387
+ }
388
+ return {
389
+ written,
390
+ skipped,
391
+ optional_hook_snippet: SESSION_START_HOOK_SNIPPET,
392
+ optional_hook_install_path: "~/.claude/settings.json (Claude Code only)",
393
+ optional_hook_snippets: {
394
+ SessionStart: SESSION_START_HOOK_SNIPPET,
395
+ Stop: STOP_HOOK_SNIPPET,
396
+ PostToolUse: POST_TOOL_USE_HOOK_SNIPPET,
397
+ },
398
+ };
399
+ }
400
+ export function checkAgentRulesStatus(projectPath, files) {
401
+ const out = [];
402
+ for (const rel of files) {
403
+ const absPath = resolveInside(projectPath, rel);
404
+ if (!absPath)
405
+ continue;
406
+ try {
407
+ if (!existsSync(absPath))
408
+ continue;
409
+ const content = readFileSync(absPath, "utf8");
410
+ const parsed = parseMarker(content);
411
+ if (!parsed) {
412
+ out.push({ path: rel, version: null, upToDate: false });
413
+ }
414
+ else if (parsed.kind === "ok") {
415
+ out.push({
416
+ path: rel,
417
+ version: parsed.version,
418
+ upToDate: parsed.version === RULE_BLOCK_VERSION,
419
+ });
420
+ }
421
+ else {
422
+ out.push({
423
+ path: rel,
424
+ version: null,
425
+ upToDate: false,
426
+ error: parsed.kind,
427
+ });
428
+ }
429
+ }
430
+ catch {
431
+ out.push({ path: rel, version: null, upToDate: false, error: "unreadable" });
432
+ }
433
+ }
434
+ return out;
435
+ }
436
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7H,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,SAAS,sBAAsB;IAC7B,IAAI,CAAC;QACH,IAAI,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,OAAO,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAC3C,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;gBAChD,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBAC7B,OAAO,GAAG,CAAC,YAA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CAAC,OAAO;YAAE,SAAS;QAEvB,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBAAE,SAAS;YACnC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC9C,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;YAEpC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;YAC1D,CAAC;iBAAM,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBAChC,GAAG,CAAC,IAAI,CAAC;oBACP,IAAI,EAAE,GAAG;oBACT,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,QAAQ,EAAE,MAAM,CAAC,OAAO,KAAK,kBAAkB;iBAChD,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,IAAI,CAAC;oBACP,IAAI,EAAE,GAAG;oBACT,OAAO,EAAE,IAAI;oBACb,QAAQ,EAAE,KAAK;oBACf,KAAK,EAAE,MAAM,CAAC,IAAI;iBACnB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,185 @@
1
+ <!--
2
+ Source of truth for the kontexta agent rules block.
3
+
4
+ Authoring rules:
5
+ 1. One clause per cell. <= 80 chars. Verbs, no fluff.
6
+ 2. "When NOT" is the documented failure mode, not a hypothetical edge case.
7
+ 3. "Use instead" is the BETTER sibling tool. Empty if no sibling.
8
+ 4. Every row stands alone — no cross-references.
9
+ 5. Every new server.tool() in apps/mcp/src/index.ts MUST add a row in the
10
+ relevant bucket below AND bump rulesVersion in packages/core/package.json.
11
+ Tests enforce this.
12
+
13
+ The placeholder {{VERSION}} is substituted at module init with RULE_BLOCK_VERSION.
14
+ -->
15
+ <!-- BEGIN kontexta:rules v{{VERSION}} -->
16
+ ## Working with kontexta
17
+
18
+ This project is registered with kontexta. Honor these rules to keep the index, history, and journal coherent — and to avoid burning tokens on workflows kontexta already solves. Tools live under the `kxta` MCP server.
19
+
20
+ ### Core rules
21
+
22
+ **Search before reading.** Use `search`, `bundle_search`, or `regex_search` to find context first. Skipping straight to `read_file` on a guessed path wastes tokens and often misses the right file.
23
+
24
+ **All KB writes go through kontexta.** Use `create_file` / `update_file` / `update_file_section` / `journal_note`. **Never** edit a KB file with raw filesystem tools (Edit/Write/cat) — the watcher and FTS index will diverge until `refresh_index` runs, and subsequent searches will return stale results.
25
+
26
+ **Batch reads. Don't loop `read_file`.** Need ≥2 files? Call `read_files` (one round-trip, up to 200 IDs) or `bundle_search` (token-budgeted blob). Looping `read_file` wastes round-trips and inflates response overhead.
27
+
28
+ **Address `journal.suggested_action` before the next tool call.** Many tool responses include a `journal` envelope. If `journal.suggested_action` is set (e.g., `"distill_journal"`), call that tool before issuing your next tool. To dismiss for the rest of the session, pass `journal_acknowledge: true` on your next tool call.
29
+
30
+ **Use `journal_note(text, tags)` for decisions and abandonments.** When you make a non-obvious call, try something that doesn't work, or capture a workaround, log it. Hands runs are auto-captured now.
31
+
32
+ **Use `journal_intent(summary)` when the user pivots.** One short sentence so the distillation step knows the topic shifted.
33
+
34
+ **Strict mode awareness.** If a project sets `journal.mode = "strict"` in its `kontexta.json`, the MCP server returns a `JOURNAL_BACKLOG` error on read tools (search/read_*/list_*) when undistilled events exist. The error includes `next_action: "distill_journal"`. Either run `distill_journal` first, OR pass `journal_bypass: true` on the read call to override (logged for audit).
35
+
36
+ **Confirm Hands tokens within 60 seconds.** When a Hands tool returns an approval token, do NOT chain a long question or another tool call before `confirm_hand`. Tokens expire; the user will have to re-issue the whole flow.
37
+
38
+ **Save specs to a canonical location.** When generating a spec, plan, or design doc, write it to the KB at `specs/<project-name>/<spec-name>.md` (use `create_file` with `destination: "knowledge"`, `folder: "specs/<project-name>"`). One folder per project keeps specs queryable.
39
+
40
+ **Tag new KB files at creation time.** Pass `tags` on `create_file`, or call `add_tags` immediately after. Untagged files are recoverable but invisible to `find_related`.
41
+
42
+ **`whats_new` early. `commit_backup` late.** Run `whats_new` at session start if you've been away — it returns files added/changed since a cutoff. End the session with `commit_backup` if you mutated KB files and the project has a remote.
43
+
44
+ **Use `.mmd` for diagrams, not fenced code in `.md`.** When creating an architecture / flow / sequence diagram, call `create_file` with `format: "mmd"` and put the raw mermaid source as the body (no ```` ```mermaid ```` fence). The web UI renders `.mmd` files as live diagrams with SVG/PNG export; mermaid embedded in markdown is just text. Default folder: `mermaid/` (or `<project>/mermaid/` for project-scoped diagrams).
45
+
46
+
47
+ ### Knowledge Items (KI)
48
+
49
+ KIs are curated, distilled KB files — the highest-signal context in the vault.
50
+ They save tokens and prevent redundant research when used correctly.
51
+
52
+ **Check KIs before independent research.** At the start of any task, run
53
+ `search` or `bundle_search` over the KB for the task topic. If a matching KI
54
+ exists, read it before writing code, designing architecture, or forming a plan.
55
+ Skipping this step is the single most common source of duplicated work.
56
+
57
+ **KIs are starting points, not ground truth.** KIs are snapshots. Always
58
+ cross-reference a KI's API patterns, file paths, and config values against the
59
+ *current* source on disk before acting on them. KIs can lag behind code.
60
+
61
+ **Close the loop: update the KI after significant changes.** When you ship a
62
+ meaningful change (new API, config schema change, architecture shift), update
63
+ the relevant KI via `update_file` or `update_file_section`. If no KI exists
64
+ yet, create one with `create_file` under `knowledge/` with appropriate tags.
65
+ A KI that isn't maintained becomes noise — which is worse than no KI.
66
+
67
+ **Use `whats_new` at session start after a gap.** If you haven't touched the
68
+ project in a while, run `whats_new(since: "7d")` to surface recently changed
69
+ files — including KIs updated by other agents or the user.
70
+
71
+ ### Tool reference
72
+
73
+ The matrix below is grouped by intent. For each tool: when to reach for it, the most common wrong context, and the better sibling tool when wrong.
74
+
75
+ #### Find
76
+
77
+ | Tool | When | Not when | Use instead |
78
+ |---|---|---|---|
79
+ | `search` | Natural-language keyword across KB (FTS) | Substrings, URLs, code idents | `regex_search` |
80
+ | `regex_search` | Substrings, URLs, code identifiers | Natural-language queries | `search` |
81
+ | `grep_in_file` | Substring/regex within ONE known file | Searching across files | `regex_search` |
82
+ | `bundle_search` | Need search hits + bodies in a token budget | Only need IDs | `search` |
83
+ | `find_related` | Discover siblings via tag overlap | Text content matching | `search` |
84
+ | `suggest_tags` | Propose tags for an existing file | Finding files by tag | `find_related` |
85
+
86
+ #### Read
87
+
88
+ | Tool | When | Not when | Use instead |
89
+ |---|---|---|---|
90
+ | `read_file` | One file ID, full body | ≥2 file IDs | `read_files` |
91
+ | `read_files` | 2–200 file IDs in one call | Only need a section of one file | `read_section` |
92
+ | `read_file_by_path` | Known absolute path, no ID handy | You already have the ID | `read_file` |
93
+ | `read_file_lines` | Known line range | Guessing line numbers | `read_section` |
94
+ | `read_section` | Known heading | Need the whole file | `read_file` |
95
+ | `read_file_outline` | Triaging an unfamiliar file's structure | Structure already known | `describe_file` |
96
+ | `describe_file` | Metadata only (size, tags, mtime) | Need content | `read_file` |
97
+ | `get_profile` | Read user profile/context at session start | Reading normal files | `read_file` |
98
+
99
+ #### Write
100
+
101
+ | Tool | When | Not when | Use instead |
102
+ |---|---|---|---|
103
+ | `create_file` | One new file (md or mmd via `format`) | Bulk-creating ≥2 files | `create_files` |
104
+ | `create_files` | 2+ new files in one call | Single file | `create_file` |
105
+ | `update_file` | Replacing the whole body | Editing one section | `update_file_section` |
106
+ | `update_file_section` | Surgical edit at a known heading | Replacing the whole file | `update_file` |
107
+ | `delete_file` | One file | Bulk delete | `delete_files` |
108
+ | `delete_files` | 2+ files in one call | Single file | `delete_file` |
109
+ | `move_file` | Rename or relocate a file | File content needs changing | `update_file` |
110
+
111
+ #### Organize
112
+
113
+ | Tool | When | Not when | Use instead |
114
+ |---|---|---|---|
115
+ | `add_tags` | Tag an existing file | Tagging at creation time | `create_file` (with `tags` param) |
116
+ | `remove_tags` | Untag a file | Want to delete the file | `delete_file` |
117
+ | `list_tags` | Enumerate all tags in the vault | Want files for a given tag | `find_related` |
118
+ | `set_favorite` | Pin / unpin a file | Semantic categorization | `add_tags` |
119
+ | `tag_search_results` | Bulk-tag every hit from a search | Tagging a single file | `add_tags` |
120
+ | `journal_note` | Log a decision, workaround, or abandonment | Editing regular content | `update_file` |
121
+ | `journal_intent` | Record a user-initiated topic pivot | Auto-captured tool calls | `journal_note` |
122
+ | `journal_append` | Append timestamped text to today's daily KB journal file | Structured notes | `journal_note` |
123
+ | `distill_journal` | Summarize accumulated journal events | Individual events | `journal_note` |
124
+ | `journal_status` | Check backlog size and high-water mark before distilling | Need the raw events themselves | `distill_journal` |
125
+ | `distill_journal_commit_upgrades` | Mark journal entries upgraded after a subagent rewrites them | Running the initial distillation | `distill_journal` |
126
+ | `housekeep_journal` | Prune old raw journal files and archive cold tasks | Need to distill new events first | `distill_journal` |
127
+ | `clip_url` | Capture a web URL into the KB | Saving a local file | `create_file` |
128
+ | `list_folders` | Enumerate folders in the project | Finding files | `list_files` |
129
+ | `create_folder` | Create a new (possibly nested) folder | Files don't need explicit folders | |
130
+ | `delete_folder` | Remove an empty folder | Folder still has files | `delete_files` first |
131
+
132
+ #### History & recovery
133
+
134
+ | Tool | When | Not when | Use instead |
135
+ |---|---|---|---|
136
+ | `get_history` | List a file's revisions | Want a diff between two revisions | `get_diff` |
137
+ | `get_diff` | Compare two specific revisions | Want full content of one | `restore_file` |
138
+ | `restore_file` | Roll back a KB file to an earlier revision | Want to use raw `git` | |
139
+ | `diff_against_disk` | Find drift after raw filesystem edits | Normal search staleness | `refresh_index` |
140
+ | `refresh_index` | Rescan after out-of-band changes | Normal in-app edits | |
141
+ | `commit_backup` | Push KB changes to remote git | Local-only work | |
142
+
143
+ #### Discover
144
+
145
+ | Tool | When | Not when | Use instead |
146
+ |---|---|---|---|
147
+ | `list_projects` | Enumerate registered projects | Files within one project | `list_files` |
148
+ | `list_files` | Files in a project (filterable) | Full-text content matters | `search` |
149
+ | `project_map` | Folder/file tree for a project | Flat file list | `list_files` |
150
+ | `stats` | Counts and health for a project | Per-file detail | `describe_file` |
151
+ | `whats_new` | Files added/changed since a cutoff | Full-text search | `search` |
152
+
153
+ #### Calendar
154
+
155
+ | Tool | When | Not when | Use instead |
156
+ |---|---|---|---|
157
+ | `calendar_add_entity` | Register a new thing to track (server, vehicle, location, etc.) | Entity already exists | `calendar_update_entity` |
158
+ | `calendar_update_entity` | Rename, retag, or retire (`active:false`) an entity | Entity doesn't exist yet | `calendar_add_entity` |
159
+ | `calendar_delete_entity` | Permanently remove an entity, cascading its events/links | Just want to stop scheduling against it | `calendar_update_entity` |
160
+ | `calendar_list_entities` | Enumerate entities with their dependency links | Need conflict or event data | `calendar_conflicts` |
161
+ | `calendar_link_entities` | Record or remove a dependency edge for conflict detection | Want to see existing links | `calendar_list_entities` |
162
+ | `calendar_add_event` | Schedule a one-off event (downtime, maintenance, delivery, etc.) | Editing an existing event | `calendar_update_event` |
163
+ | `calendar_update_event` | Move, retitle, or re-home an existing event | Event doesn't exist yet | `calendar_add_event` |
164
+ | `calendar_delete_event` | Remove one event permanently | Want to just move it | `calendar_update_event` |
165
+ | `calendar_list_events` | List/filter events in a time window | Only need the conflict report | `calendar_conflicts` |
166
+ | `calendar_conflicts` | Find overlapping or too-close-together events in a window | Just need the raw event list | `calendar_list_events` |
167
+ | `calendar_export_ics` | Export a window as an ICS file for calendar apps | Need machine-readable event data | `calendar_list_events` |
168
+
169
+ #### Hands (project tools)
170
+
171
+ | Tool | When | Not when | Use instead |
172
+ |---|---|---|---|
173
+ | `list_hands` | Enumerate Hands tools available in this project | Want the YAML schema | `describe_hands_schema` |
174
+ | `describe_hands_schema` | Explain the `hands.yaml` format | Listing tools | `list_hands` |
175
+ | `confirm_hand` | Approve a Hands token within 60s of issue | Normal MCP tool calls | |
176
+ | `reload_hands` | Re-read `hands.yaml` after editing it | First-time use (auto-loads) | |
177
+
178
+ #### Onboarding
179
+
180
+ | Tool | When | Not when | Use instead |
181
+ |---|---|---|---|
182
+ | `register_project` | Register a new project root with kontexta | Already registered | `list_projects` |
183
+ | `onboard_agent` | Write/update the rules block in CLAUDE.md / AGENTS.md / etc. | Editing regular project content | `update_file` |
184
+ | `transfer_agent_context` | Copy CLAUDE.md / AGENTS.md / `.cursor/rules/*.mdc` etc. from the project repo into Kontexta's KB. Originals are NEVER deleted by this tool. | User wants files to stay in the repo (default) | `register_project` (which keeps files in place) |
185
+ <!-- END kontexta:rules v{{VERSION}} -->