@seqyuan/annodex 0.1.12 → 0.1.14

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 (478) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +39 -0
  3. package/.next/build-manifest.json +20 -0
  4. package/.next/diagnostics/build-diagnostics.json +6 -0
  5. package/.next/diagnostics/framework.json +1 -0
  6. package/.next/export-marker.json +6 -0
  7. package/.next/images-manifest.json +68 -0
  8. package/.next/next-minimal-server.js.nft.json +1 -0
  9. package/.next/next-server.js.nft.json +1 -0
  10. package/.next/package.json +1 -0
  11. package/.next/prerender-manifest.json +109 -0
  12. package/.next/react-loadable-manifest.json +2320 -0
  13. package/.next/required-server-files.js +343 -0
  14. package/.next/required-server-files.json +343 -0
  15. package/.next/routes-manifest.json +286 -0
  16. package/.next/server/app/_global-error/page.js +32 -0
  17. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  18. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
  19. package/.next/server/app/_global-error.html +1 -0
  20. package/.next/server/app/_global-error.meta +16 -0
  21. package/.next/server/app/_global-error.rsc +14 -0
  22. package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
  23. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  24. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  25. package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
  26. package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
  27. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  28. package/.next/server/app/_not-found/page.js +2 -0
  29. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  30. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  31. package/.next/server/app/_not-found.html +1 -0
  32. package/.next/server/app/_not-found.meta +16 -0
  33. package/.next/server/app/_not-found.rsc +18 -0
  34. package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
  35. package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
  36. package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
  37. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  38. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  39. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  40. package/.next/server/app/api/agent/[id]/events/route.js +3 -0
  41. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
  42. package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
  43. package/.next/server/app/api/agent/[id]/route.js +1 -0
  44. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
  45. package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
  46. package/.next/server/app/api/agent/new/route.js +1 -0
  47. package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
  48. package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
  49. package/.next/server/app/api/auth/all-providers/route.js +1 -0
  50. package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
  51. package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
  52. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
  53. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
  54. package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/auth/login/[provider]/route.js +1 -0
  56. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
  57. package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
  58. package/.next/server/app/api/auth/login/route.js +1 -0
  59. package/.next/server/app/api/auth/login/route.js.nft.json +1 -0
  60. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
  62. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
  63. package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/auth/providers/route.js +1 -0
  65. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
  66. package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/auth/status/route.js +1 -0
  68. package/.next/server/app/api/auth/status/route.js.nft.json +1 -0
  69. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/default-cwd/route.js +1 -0
  71. package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
  72. package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/files/[...path]/route.js +4 -0
  74. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
  75. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/harness/route.js +1 -0
  77. package/.next/server/app/api/harness/route.js.nft.json +1 -0
  78. package/.next/server/app/api/harness/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/home/route.js +1 -0
  80. package/.next/server/app/api/home/route.js.nft.json +1 -0
  81. package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/internal/runtime/route.js +1 -0
  83. package/.next/server/app/api/internal/runtime/route.js.nft.json +1 -0
  84. package/.next/server/app/api/internal/runtime/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/models/route.js +1 -0
  86. package/.next/server/app/api/models/route.js.nft.json +1 -0
  87. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/models-config/discover/route.js +1 -0
  89. package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
  90. package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/models-config/route.js +1 -0
  92. package/.next/server/app/api/models-config/route.js.nft.json +1 -0
  93. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/models-config/test/route.js +1 -0
  95. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
  96. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/projects/browse/route.js +1 -0
  98. package/.next/server/app/api/projects/browse/route.js.nft.json +1 -0
  99. package/.next/server/app/api/projects/browse/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/projects/route.js +1 -0
  101. package/.next/server/app/api/projects/route.js.nft.json +1 -0
  102. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/reports/[id]/route.js +10 -0
  104. package/.next/server/app/api/reports/[id]/route.js.nft.json +1 -0
  105. package/.next/server/app/api/reports/[id]/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/search/route.js +1 -0
  107. package/.next/server/app/api/search/route.js.nft.json +1 -0
  108. package/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/sessions/[id]/context/route.js +1 -0
  110. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
  111. package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
  112. package/.next/server/app/api/sessions/[id]/route.js +1 -0
  113. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
  114. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
  115. package/.next/server/app/api/sessions/new/route.js +1 -0
  116. package/.next/server/app/api/sessions/new/route.js.nft.json +1 -0
  117. package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/sessions/route.js +1 -0
  119. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  120. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/settings/route.js +1 -0
  122. package/.next/server/app/api/settings/route.js.nft.json +1 -0
  123. package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/skills/install/route.js +5 -0
  125. package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
  126. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/skills/route.js +6 -0
  128. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  129. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/skills/search/route.js +1 -0
  131. package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
  132. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/soul/route.js +1 -0
  134. package/.next/server/app/api/soul/route.js.nft.json +1 -0
  135. package/.next/server/app/api/soul/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/version/route.js +1 -0
  137. package/.next/server/app/api/version/route.js.nft.json +1 -0
  138. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/index.html +1 -0
  140. package/.next/server/app/index.meta +14 -0
  141. package/.next/server/app/index.rsc +17 -0
  142. package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  143. package/.next/server/app/index.segments/_full.segment.rsc +17 -0
  144. package/.next/server/app/index.segments/_head.segment.rsc +6 -0
  145. package/.next/server/app/index.segments/_index.segment.rsc +5 -0
  146. package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
  147. package/.next/server/app/login/page.js +2 -0
  148. package/.next/server/app/login/page.js.nft.json +1 -0
  149. package/.next/server/app/login/page_client-reference-manifest.js +1 -0
  150. package/.next/server/app/login.html +1 -0
  151. package/.next/server/app/login.meta +15 -0
  152. package/.next/server/app/login.rsc +22 -0
  153. package/.next/server/app/login.segments/_full.segment.rsc +22 -0
  154. package/.next/server/app/login.segments/_head.segment.rsc +6 -0
  155. package/.next/server/app/login.segments/_index.segment.rsc +5 -0
  156. package/.next/server/app/login.segments/_tree.segment.rsc +4 -0
  157. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +9 -0
  158. package/.next/server/app/login.segments/login.segment.rsc +5 -0
  159. package/.next/server/app/page.js +261 -0
  160. package/.next/server/app/page.js.nft.json +1 -0
  161. package/.next/server/app/page_client-reference-manifest.js +1 -0
  162. package/.next/server/app-paths-manifest.json +39 -0
  163. package/.next/server/chunks/1048.js +1 -0
  164. package/.next/server/chunks/1367.js +77 -0
  165. package/.next/server/chunks/1381.js +1 -0
  166. package/.next/server/chunks/165.js +1 -0
  167. package/.next/server/chunks/1681.js +215 -0
  168. package/.next/server/chunks/1688.js +45 -0
  169. package/.next/server/chunks/1703.js +79 -0
  170. package/.next/server/chunks/1712.js +43 -0
  171. package/.next/server/chunks/1813.js +1 -0
  172. package/.next/server/chunks/2325.js +80 -0
  173. package/.next/server/chunks/258.js +1 -0
  174. package/.next/server/chunks/2671.js +287 -0
  175. package/.next/server/chunks/2778.js +1 -0
  176. package/.next/server/chunks/2943.js +1 -0
  177. package/.next/server/chunks/3031.js +226 -0
  178. package/.next/server/chunks/3181.js +1 -0
  179. package/.next/server/chunks/3493.js +1 -0
  180. package/.next/server/chunks/3672.js +1 -0
  181. package/.next/server/chunks/3701.js +104 -0
  182. package/.next/server/chunks/4013.js +1 -0
  183. package/.next/server/chunks/402.js +2 -0
  184. package/.next/server/chunks/4035.js +80 -0
  185. package/.next/server/chunks/4248.js +153 -0
  186. package/.next/server/chunks/4367.js +1 -0
  187. package/.next/server/chunks/4406.js +141 -0
  188. package/.next/server/chunks/4741.js +18 -0
  189. package/.next/server/chunks/4768.js +1 -0
  190. package/.next/server/chunks/4858.js +148 -0
  191. package/.next/server/chunks/4980.js +1 -0
  192. package/.next/server/chunks/5155.js +5 -0
  193. package/.next/server/chunks/5293.js +166 -0
  194. package/.next/server/chunks/5399.js +8 -0
  195. package/.next/server/chunks/5409.js +1 -0
  196. package/.next/server/chunks/5797.js +93 -0
  197. package/.next/server/chunks/5851.js +36 -0
  198. package/.next/server/chunks/6206.js +1 -0
  199. package/.next/server/chunks/6296.js +1 -0
  200. package/.next/server/chunks/63.js +45 -0
  201. package/.next/server/chunks/6346.js +1 -0
  202. package/.next/server/chunks/6406.js +23 -0
  203. package/.next/server/chunks/642.js +1 -0
  204. package/.next/server/chunks/6429.js +50 -0
  205. package/.next/server/chunks/6729.js +64 -0
  206. package/.next/server/chunks/6907.js +115 -0
  207. package/.next/server/chunks/6980.js +1 -0
  208. package/.next/server/chunks/7073.js +24 -0
  209. package/.next/server/chunks/7233.js +24 -0
  210. package/.next/server/chunks/7307.js +1 -0
  211. package/.next/server/chunks/7362.js +9 -0
  212. package/.next/server/chunks/7567.js +29 -0
  213. package/.next/server/chunks/7765.js +1 -0
  214. package/.next/server/chunks/7890.js +1 -0
  215. package/.next/server/chunks/8065.js +1 -0
  216. package/.next/server/chunks/8238.js +34 -0
  217. package/.next/server/chunks/8276.js +1 -0
  218. package/.next/server/chunks/8336.js +1 -0
  219. package/.next/server/chunks/8477.js +3 -0
  220. package/.next/server/chunks/8490.js +1 -0
  221. package/.next/server/chunks/8916.js +1 -0
  222. package/.next/server/chunks/9280.js +252 -0
  223. package/.next/server/chunks/9315.js +1 -0
  224. package/.next/server/chunks/9537.js +90 -0
  225. package/.next/server/chunks/966.js +1 -0
  226. package/.next/server/chunks/9818.js +21 -0
  227. package/.next/server/chunks/static/media/pdf.worker.min.c476e1a0.mjs +6 -0
  228. package/.next/server/functions-config-manifest.json +16 -0
  229. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  230. package/.next/server/middleware-build-manifest.js +1 -0
  231. package/.next/server/middleware-manifest.json +6 -0
  232. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  233. package/.next/server/middleware.js +18 -0
  234. package/.next/server/middleware.js.nft.json +1 -0
  235. package/.next/server/next-font-manifest.js +1 -0
  236. package/.next/server/next-font-manifest.json +1 -0
  237. package/.next/server/pages/404.html +1 -0
  238. package/.next/server/pages/500.html +1 -0
  239. package/.next/server/pages-manifest.json +4 -0
  240. package/.next/server/prefetch-hints.json +1 -0
  241. package/.next/server/server-reference-manifest.js +1 -0
  242. package/.next/server/server-reference-manifest.json +1 -0
  243. package/.next/server/webpack-runtime.js +1 -0
  244. package/.next/static/9tDQsVwah2dRfj3LNFKBR/_buildManifest.js +1 -0
  245. package/.next/static/9tDQsVwah2dRfj3LNFKBR/_ssgManifest.js +1 -0
  246. package/.next/static/chunks/0b9a0da7.9075af772487e743.js +62 -0
  247. package/.next/static/chunks/1413.922d232de90c0c41.js +115 -0
  248. package/.next/static/chunks/1643.467a526a1f24f54d.js +24 -0
  249. package/.next/static/chunks/1852.5543122f11aa7fed.js +1 -0
  250. package/.next/static/chunks/1960.b1e26436d7a5f586.js +1 -0
  251. package/.next/static/chunks/2170a4aa.4213bb2183c9cdf9.js +1 -0
  252. package/.next/static/chunks/2274.6cd173f80a1405a2.js +21 -0
  253. package/.next/static/chunks/2419.347fdfe3c170854d.js +166 -0
  254. package/.next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
  255. package/.next/static/chunks/2623.d20fabd8e18197c6.js +287 -0
  256. package/.next/static/chunks/2729.f5365061a849d659.js +34 -0
  257. package/.next/static/chunks/2821.934bcf60fbdc28c6.js +1 -0
  258. package/.next/static/chunks/2918becc.abff2ece1de37bc1.js +153 -0
  259. package/.next/static/chunks/2947.114e51cb06d1c01a.js +23 -0
  260. package/.next/static/chunks/3079.4c511fa1144e3adf.js +79 -0
  261. package/.next/static/chunks/3274.208ca44844cd7d95.js +148 -0
  262. package/.next/static/chunks/3308.465a94263d04bfea.js +73 -0
  263. package/.next/static/chunks/3325.e4bfe1ca657f3b5b.js +80 -0
  264. package/.next/static/chunks/3506.2a7eaa08b9f55337.js +90 -0
  265. package/.next/static/chunks/363642f4-043c1475ab9af70e.js +1 -0
  266. package/.next/static/chunks/3794-123fdf632563f469.js +32 -0
  267. package/.next/static/chunks/3837.a755ccfe6f9c1c1c.js +5 -0
  268. package/.next/static/chunks/394.91597771688df6d0.js +1 -0
  269. package/.next/static/chunks/3997.1009c06025691712.js +1 -0
  270. package/.next/static/chunks/4453.91a357dc43c21745.js +1 -0
  271. package/.next/static/chunks/4491.44fdf20580ac72bd.js +24 -0
  272. package/.next/static/chunks/4829.cf1d50e43e6d9db5.js +1 -0
  273. package/.next/static/chunks/498.fe1d9da9ecad6c36.js +1 -0
  274. package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  275. package/.next/static/chunks/5019.b5a1a2b8daf17525.js +1 -0
  276. package/.next/static/chunks/5034.8f16c3fa3ce75411.js +1 -0
  277. package/.next/static/chunks/5074.d16651da01ec4e02.js +1 -0
  278. package/.next/static/chunks/51fb665c.0950e1b79671348d.js +45 -0
  279. package/.next/static/chunks/532.5956ed631aff722b.js +9 -0
  280. package/.next/static/chunks/5326.69460442bdcd6cd3.js +1 -0
  281. package/.next/static/chunks/5403.ff110bf5bf600758.js +64 -0
  282. package/.next/static/chunks/547.902a733488cfe3f7.js +77 -0
  283. package/.next/static/chunks/5567.540d7fc108ad6ee5.js +215 -0
  284. package/.next/static/chunks/5590.ef62922166d308b4.js +1 -0
  285. package/.next/static/chunks/5690.9d6eb1edb1399995.js +1 -0
  286. package/.next/static/chunks/5749.25faee4a1e55b854.js +226 -0
  287. package/.next/static/chunks/58bb9007.1ccb6bba34b4c635.js +80 -0
  288. package/.next/static/chunks/6121.f3f43f1896ea0cd9.js +1 -0
  289. package/.next/static/chunks/6600.583c88eef37aa524.js +1 -0
  290. package/.next/static/chunks/6696.a41aec266e657d54.js +141 -0
  291. package/.next/static/chunks/6922.42148793782d2fe7.js +1 -0
  292. package/.next/static/chunks/7006.e191611ffc2b9528.js +43 -0
  293. package/.next/static/chunks/7343.9fbb58204d8ac681.js +1 -0
  294. package/.next/static/chunks/73972abe.25a4cffa03b2bcef.js +119 -0
  295. package/.next/static/chunks/7547.58bda8a2aabba0d4.js +93 -0
  296. package/.next/static/chunks/7648.4ae2f183b4db0353.js +1 -0
  297. package/.next/static/chunks/7874.8db6929b94cdf697.js +1 -0
  298. package/.next/static/chunks/7959.1f20a35df316216a.js +104 -0
  299. package/.next/static/chunks/83.85d62d7fc9850b75.js +29 -0
  300. package/.next/static/chunks/8436.cab94b59cca0a8ff.js +1 -0
  301. package/.next/static/chunks/8451.ff6ff72b57dc52e1.js +1 -0
  302. package/.next/static/chunks/8489.45f22859734f514f.js +36 -0
  303. package/.next/static/chunks/8568.f85d8b36fc9a9037.js +1 -0
  304. package/.next/static/chunks/8771-3e14b6810486df1f.js +1 -0
  305. package/.next/static/chunks/8863.be51033a67436277.js +1 -0
  306. package/.next/static/chunks/90542734.dc1a2723e4f6affb.js +1 -0
  307. package/.next/static/chunks/9500.1488aec06ee78127.js +1 -0
  308. package/.next/static/chunks/9633.155548b5fca6e580.js +1 -0
  309. package/.next/static/chunks/9779.673004a62d70e36a.js +1 -0
  310. package/.next/static/chunks/app/_global-error/page-cc518af6b1ffb191.js +1 -0
  311. package/.next/static/chunks/app/_not-found/page-c72daab99269beff.js +1 -0
  312. package/.next/static/chunks/app/api/agent/[id]/events/route-cc518af6b1ffb191.js +1 -0
  313. package/.next/static/chunks/app/api/agent/[id]/route-cc518af6b1ffb191.js +1 -0
  314. package/.next/static/chunks/app/api/agent/new/route-cc518af6b1ffb191.js +1 -0
  315. package/.next/static/chunks/app/api/auth/all-providers/route-cc518af6b1ffb191.js +1 -0
  316. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-cc518af6b1ffb191.js +1 -0
  317. package/.next/static/chunks/app/api/auth/login/[provider]/route-cc518af6b1ffb191.js +1 -0
  318. package/.next/static/chunks/app/api/auth/login/route-cc518af6b1ffb191.js +1 -0
  319. package/.next/static/chunks/app/api/auth/logout/[provider]/route-cc518af6b1ffb191.js +1 -0
  320. package/.next/static/chunks/app/api/auth/providers/route-cc518af6b1ffb191.js +1 -0
  321. package/.next/static/chunks/app/api/auth/status/route-cc518af6b1ffb191.js +1 -0
  322. package/.next/static/chunks/app/api/default-cwd/route-cc518af6b1ffb191.js +1 -0
  323. package/.next/static/chunks/app/api/files/[...path]/route-cc518af6b1ffb191.js +1 -0
  324. package/.next/static/chunks/app/api/harness/route-cc518af6b1ffb191.js +1 -0
  325. package/.next/static/chunks/app/api/home/route-cc518af6b1ffb191.js +1 -0
  326. package/.next/static/chunks/app/api/internal/runtime/route-cc518af6b1ffb191.js +1 -0
  327. package/.next/static/chunks/app/api/models/route-cc518af6b1ffb191.js +1 -0
  328. package/.next/static/chunks/app/api/models-config/discover/route-cc518af6b1ffb191.js +1 -0
  329. package/.next/static/chunks/app/api/models-config/route-cc518af6b1ffb191.js +1 -0
  330. package/.next/static/chunks/app/api/models-config/test/route-cc518af6b1ffb191.js +1 -0
  331. package/.next/static/chunks/app/api/projects/browse/route-cc518af6b1ffb191.js +1 -0
  332. package/.next/static/chunks/app/api/projects/route-cc518af6b1ffb191.js +1 -0
  333. package/.next/static/chunks/app/api/reports/[id]/route-cc518af6b1ffb191.js +1 -0
  334. package/.next/static/chunks/app/api/search/route-cc518af6b1ffb191.js +1 -0
  335. package/.next/static/chunks/app/api/sessions/[id]/context/route-cc518af6b1ffb191.js +1 -0
  336. package/.next/static/chunks/app/api/sessions/[id]/route-cc518af6b1ffb191.js +1 -0
  337. package/.next/static/chunks/app/api/sessions/new/route-cc518af6b1ffb191.js +1 -0
  338. package/.next/static/chunks/app/api/sessions/route-cc518af6b1ffb191.js +1 -0
  339. package/.next/static/chunks/app/api/settings/route-cc518af6b1ffb191.js +1 -0
  340. package/.next/static/chunks/app/api/skills/install/route-cc518af6b1ffb191.js +1 -0
  341. package/.next/static/chunks/app/api/skills/route-cc518af6b1ffb191.js +1 -0
  342. package/.next/static/chunks/app/api/skills/search/route-cc518af6b1ffb191.js +1 -0
  343. package/.next/static/chunks/app/api/soul/route-cc518af6b1ffb191.js +1 -0
  344. package/.next/static/chunks/app/api/version/route-cc518af6b1ffb191.js +1 -0
  345. package/.next/static/chunks/app/layout-be148b7ae915b22a.js +1 -0
  346. package/.next/static/chunks/app/login/page-ebf0e6de99062783.js +1 -0
  347. package/.next/static/chunks/app/page-a26fde41f0bbe84c.js +260 -0
  348. package/.next/static/chunks/d3ac728e.7964f816a1ca64e5.js +1 -0
  349. package/.next/static/chunks/framework-711ef29bc66f648c.js +1 -0
  350. package/.next/static/chunks/main-app-45a0f19af99d61b6.js +1 -0
  351. package/.next/static/chunks/main-f74964b7ae52493e.js +5 -0
  352. package/.next/static/chunks/next/dist/client/components/builtin/app-error-cc518af6b1ffb191.js +1 -0
  353. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cc518af6b1ffb191.js +1 -0
  354. package/.next/static/chunks/next/dist/client/components/builtin/global-error-9bfa08b9491621f2.js +1 -0
  355. package/.next/static/chunks/next/dist/client/components/builtin/not-found-cc518af6b1ffb191.js +1 -0
  356. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cc518af6b1ffb191.js +1 -0
  357. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  358. package/.next/static/chunks/webpack-fcf4a889ecbd753c.js +1 -0
  359. package/.next/static/css/45029451a1d7255d.css +3 -0
  360. package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
  361. package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
  362. package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
  363. package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
  364. package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
  365. package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
  366. package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
  367. package/.next/static/media/pdf.worker.min.29aaf158.mjs +6 -0
  368. package/package.json +21 -21
  369. package/app/api/agent/[id]/events/route.ts +0 -94
  370. package/app/api/agent/[id]/route.ts +0 -83
  371. package/app/api/agent/new/route.ts +0 -53
  372. package/app/api/auth/all-providers/route.ts +0 -21
  373. package/app/api/auth/api-key/[provider]/route.ts +0 -7
  374. package/app/api/auth/login/[provider]/route.ts +0 -7
  375. package/app/api/auth/login/route.ts +0 -22
  376. package/app/api/auth/logout/[provider]/route.ts +0 -7
  377. package/app/api/auth/providers/route.ts +0 -15
  378. package/app/api/auth/status/route.ts +0 -6
  379. package/app/api/default-cwd/route.ts +0 -22
  380. package/app/api/files/[...path]/route.ts +0 -621
  381. package/app/api/harness/route.ts +0 -47
  382. package/app/api/home/route.ts +0 -6
  383. package/app/api/internal/runtime/route.ts +0 -26
  384. package/app/api/models/route.ts +0 -67
  385. package/app/api/models-config/discover/route.ts +0 -42
  386. package/app/api/models-config/route.ts +0 -152
  387. package/app/api/models-config/test/route.ts +0 -154
  388. package/app/api/projects/browse/route.ts +0 -51
  389. package/app/api/projects/route.ts +0 -83
  390. package/app/api/reports/[id]/route.ts +0 -108
  391. package/app/api/search/route.ts +0 -122
  392. package/app/api/sessions/[id]/context/route.ts +0 -23
  393. package/app/api/sessions/[id]/route.ts +0 -124
  394. package/app/api/sessions/new/route.ts +0 -5
  395. package/app/api/sessions/route.ts +0 -16
  396. package/app/api/settings/route.ts +0 -51
  397. package/app/api/skills/install/route.ts +0 -249
  398. package/app/api/skills/route.ts +0 -161
  399. package/app/api/skills/search/route.ts +0 -121
  400. package/app/api/soul/route.ts +0 -47
  401. package/app/api/version/route.ts +0 -55
  402. package/app/globals.css +0 -736
  403. package/app/layout.tsx +0 -40
  404. package/app/login/page.tsx +0 -133
  405. package/app/page.tsx +0 -10
  406. package/components/AppShell.tsx +0 -1058
  407. package/components/ChatInput.tsx +0 -1103
  408. package/components/ChatMinimap.tsx +0 -381
  409. package/components/ChatWindow.tsx +0 -576
  410. package/components/CodeMirrorEditor.tsx +0 -137
  411. package/components/ConversationSearch.tsx +0 -369
  412. package/components/DataTableViewer.tsx +0 -248
  413. package/components/FileExplorer.tsx +0 -758
  414. package/components/FileIcons.tsx +0 -241
  415. package/components/FileViewer.tsx +0 -1273
  416. package/components/GlobalFileEditor.tsx +0 -98
  417. package/components/MarkdownRenderer.tsx +0 -331
  418. package/components/MermaidDiagram.tsx +0 -80
  419. package/components/MessageView.tsx +0 -1141
  420. package/components/ModelsConfig.tsx +0 -1991
  421. package/components/ProjectContext.tsx +0 -252
  422. package/components/ProjectFolderPicker.tsx +0 -202
  423. package/components/ProjectsConfig.tsx +0 -288
  424. package/components/ProviderIcons.tsx +0 -91
  425. package/components/ReportPanel.tsx +0 -237
  426. package/components/ResizeHandle.tsx +0 -105
  427. package/components/SessionSidebar.tsx +0 -1464
  428. package/components/SettingsDialog.tsx +0 -287
  429. package/components/SkillsConfig.tsx +0 -1093
  430. package/components/SubagentPanel.tsx +0 -191
  431. package/components/TabBar.tsx +0 -115
  432. package/components/ToolPanel.tsx +0 -131
  433. package/components/WidgetRenderer.tsx +0 -505
  434. package/components/viewers/DocumentToolbar.tsx +0 -78
  435. package/components/viewers/DocxViewer.tsx +0 -97
  436. package/components/viewers/PdfViewer.tsx +0 -206
  437. package/components/viewers/PptxViewer.tsx +0 -240
  438. package/components/viewers/XlsxViewer.tsx +0 -143
  439. package/hooks/useAgentSession.ts +0 -710
  440. package/hooks/useAudio.ts +0 -50
  441. package/hooks/useDragDrop.ts +0 -52
  442. package/hooks/useResizable.ts +0 -60
  443. package/hooks/useTheme.ts +0 -85
  444. package/lib/agent-client.ts +0 -39
  445. package/lib/annodex-config.ts +0 -556
  446. package/lib/auth-token.ts +0 -74
  447. package/lib/auth.ts +0 -90
  448. package/lib/brand.ts +0 -5
  449. package/lib/code-theme.ts +0 -32
  450. package/lib/codex-compat-proxy.ts +0 -1603
  451. package/lib/codex-home.ts +0 -6
  452. package/lib/codex-server.ts +0 -796
  453. package/lib/codex-session.ts +0 -590
  454. package/lib/codex-usage.ts +0 -213
  455. package/lib/file-paths.ts +0 -34
  456. package/lib/model-discovery.ts +0 -379
  457. package/lib/normalize.ts +0 -30
  458. package/lib/npx.ts +0 -87
  459. package/lib/pi-types.ts +0 -49
  460. package/lib/projects.ts +0 -269
  461. package/lib/provider-api.ts +0 -88
  462. package/lib/report-prompt.ts +0 -61
  463. package/lib/report-store.ts +0 -597
  464. package/lib/report-update-parser.ts +0 -66
  465. package/lib/rpc-manager.ts +0 -668
  466. package/lib/runtime-state.ts +0 -117
  467. package/lib/session-reader.ts +0 -903
  468. package/lib/session-runtime.ts +0 -105
  469. package/lib/subagent-progress.ts +0 -279
  470. package/lib/types.ts +0 -241
  471. package/lib/widget-export.ts +0 -318
  472. package/lib/widget-guidelines.ts +0 -288
  473. package/lib/widget-prompt.ts +0 -76
  474. package/lib/widget-utils.ts +0 -523
  475. package/postcss.config.mjs +0 -8
  476. package/proxy.ts +0 -64
  477. package/scripts/postinstall.cjs +0 -25
  478. package/tsconfig.json +0 -41
@@ -1,67 +0,0 @@
1
- /**
2
- * Models API — merged list from annodex providers.json + codex config.toml
3
- */
4
-
5
- import { readMergedConfig, listAllModels, getDefaultModel } from "@/lib/annodex-config";
6
-
7
- export const dynamic = "force-dynamic";
8
-
9
- const DEFAULT_THINKING_LEVEL_MAP: Record<string, string | null> = {
10
- auto: null,
11
- off: "off",
12
- minimal: "minimal",
13
- low: "low",
14
- medium: "medium",
15
- high: "high",
16
- xhigh: "xhigh",
17
- };
18
-
19
- export async function GET() {
20
- try {
21
- const config = readMergedConfig();
22
- const modelOptions = listAllModels(config);
23
- const defaultModel = getDefaultModel(config);
24
-
25
- const models: Record<string, string> = {};
26
- const modelList: { id: string; name: string; provider: string; contextWindow?: number; maxTokens?: number; input?: string[] }[] = [];
27
- for (const m of modelOptions) {
28
- const key = `${m.provider}:${m.modelId}`;
29
- models[key] = m.name;
30
- modelList.push({
31
- id: m.modelId,
32
- name: m.name,
33
- provider: m.provider,
34
- contextWindow: m.contextWindow,
35
- maxTokens: m.maxTokens,
36
- input: m.input,
37
- });
38
- }
39
-
40
- const thinkingLevels: Record<string, string[]> = {};
41
- const thinkingLevelMaps: Record<string, Record<string, string | null>> = {};
42
- for (const m of modelOptions) {
43
- const key = `${m.provider}:${m.modelId}`;
44
- const levelMap = m.thinkingLevelMap ?? DEFAULT_THINKING_LEVEL_MAP;
45
- thinkingLevels[key] = Object.entries(levelMap)
46
- .filter(([level, mapped]) => level !== "auto" && mapped !== null)
47
- .map(([level]) => level);
48
- thinkingLevelMaps[key] = levelMap;
49
- }
50
-
51
- return Response.json({
52
- models,
53
- modelList,
54
- defaultModel,
55
- thinkingLevels,
56
- thinkingLevelMaps,
57
- });
58
- } catch {
59
- return Response.json({
60
- models: {},
61
- modelList: [],
62
- defaultModel: null,
63
- thinkingLevels: {},
64
- thinkingLevelMaps: {},
65
- });
66
- }
67
- }
@@ -1,42 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server";
2
- import { convertToPiModels, enrichModelsWithRemoteMetadata, fetchModelsFromBaseUrl, normalizeBaseUrl } from "@/lib/model-discovery";
3
-
4
- export const dynamic = "force-dynamic";
5
-
6
- function errorMessage(error: unknown): string {
7
- return error instanceof Error ? error.message : String(error);
8
- }
9
-
10
- export async function POST(req: NextRequest) {
11
- try {
12
- const body = await req.json() as {
13
- baseUrl?: unknown;
14
- apiKey?: unknown;
15
- provider?: unknown;
16
- enrich?: unknown;
17
- };
18
-
19
- const baseUrl = typeof body.baseUrl === "string" ? normalizeBaseUrl(body.baseUrl) : "";
20
- const apiKey = typeof body.apiKey === "string" ? body.apiKey : "";
21
- const provider = typeof body.provider === "string" ? body.provider.trim() : "";
22
- if (!baseUrl) {
23
- return NextResponse.json({ ok: false, error: "Base URL is required" }, { status: 400 });
24
- }
25
-
26
- const fetched = await fetchModelsFromBaseUrl(baseUrl, apiKey);
27
- const enriched = body.enrich === false
28
- ? fetched.models
29
- : await enrichModelsWithRemoteMetadata(baseUrl, apiKey, fetched.models);
30
- const piModels = convertToPiModels(enriched, false, provider || undefined, baseUrl);
31
-
32
- return NextResponse.json({
33
- ok: true,
34
- endpoint: fetched.endpoint,
35
- baseUrl,
36
- models: enriched,
37
- piModels,
38
- });
39
- } catch (error) {
40
- return NextResponse.json({ ok: false, error: errorMessage(error) }, { status: 500 });
41
- }
42
- }
@@ -1,152 +0,0 @@
1
- /**
2
- * Models Config API — reads/writes ~/.config/annodex/providers.json
3
- *
4
- * Annodex maintains its own provider list with API keys.
5
- * Codex config.toml providers are merged read-only at runtime.
6
- */
7
-
8
- import { NextResponse } from "next/server";
9
- import {
10
- readMergedConfig,
11
- readProvidersFile as readProviders,
12
- writeProvidersFile as writeProviders,
13
- } from "@/lib/annodex-config";
14
- import { isProviderApi, normalizeProviderApi } from "@/lib/provider-api";
15
-
16
- export const dynamic = "force-dynamic";
17
-
18
- type ModelConfigBody = {
19
- id: string;
20
- name?: string;
21
- api?: string;
22
- reasoning?: boolean;
23
- thinkingLevelMap?: Record<string, string | null>;
24
- input?: string[];
25
- contextWindow?: number;
26
- maxTokens?: number;
27
- compat?: Record<string, unknown>;
28
- };
29
-
30
- type ProviderConfigBody = {
31
- baseUrl?: string;
32
- api?: string;
33
- apiKey?: string;
34
- requiresOpenAiAuth?: boolean;
35
- source?: string;
36
- models?: ModelConfigBody[];
37
- };
38
-
39
- function normalizeStringArray(value: unknown): string[] | undefined {
40
- if (!Array.isArray(value)) return undefined;
41
- const strings = value.filter((item): item is string => typeof item === "string" && item.trim().length > 0);
42
- return strings.length ? strings : undefined;
43
- }
44
-
45
- function isRecord(value: unknown): value is Record<string, unknown> {
46
- return typeof value === "object" && value !== null && !Array.isArray(value);
47
- }
48
-
49
- function normalizeThinkingLevelMap(value: unknown): Record<string, string | null> | undefined {
50
- if (!isRecord(value)) return undefined;
51
- const normalized: Record<string, string | null> = {};
52
- for (const [key, entry] of Object.entries(value)) {
53
- if (typeof entry === "string" || entry === null) normalized[key] = entry;
54
- }
55
- return Object.keys(normalized).length ? normalized : undefined;
56
- }
57
-
58
- function normalizeCompat(value: unknown): Record<string, unknown> | undefined {
59
- if (!isRecord(value)) return undefined;
60
- return Object.keys(value).length ? value : undefined;
61
- }
62
-
63
- export async function GET() {
64
- try {
65
- const data = readMergedConfig();
66
- // Return in format compatible with ModelsConfig UI
67
- return NextResponse.json({
68
- providers: Object.fromEntries(
69
- data.providers.map((p) => [
70
- p.id,
71
- {
72
- baseUrl: p.baseUrl,
73
- apiKey: p.apiKey,
74
- api: p.api ?? "openai-responses",
75
- requiresOpenAiAuth: p.requiresOpenAiAuth,
76
- source: p.source ?? "annodex",
77
- sourceProviderId: p.sourceProviderId,
78
- models: p.models.map((m) => ({
79
- id: m.id,
80
- name: m.name,
81
- api: m.api,
82
- reasoning: m.reasoning,
83
- thinkingLevelMap: m.thinkingLevelMap,
84
- input: m.input,
85
- contextWindow: m.contextWindow,
86
- maxTokens: m.maxTokens,
87
- compat: m.compat,
88
- })),
89
- },
90
- ])
91
- ),
92
- defaultProvider: data.defaultProvider,
93
- defaultModel: data.defaultModel,
94
- });
95
- } catch (error) {
96
- return NextResponse.json({ providers: {}, error: String(error) }, { status: 500 });
97
- }
98
- }
99
-
100
- export async function PUT(req: Request) {
101
- try {
102
- const body = await req.json() as {
103
- providers?: Record<string, ProviderConfigBody>;
104
- defaultProvider?: string;
105
- defaultModel?: string;
106
- };
107
-
108
- const data = readProviders();
109
-
110
- if (body.providers) {
111
- data.providers = Object.entries(body.providers)
112
- .filter(([, p]) => typeof p.baseUrl === "string" && p.source !== "codex")
113
- .map(([id, p]) => {
114
- const baseUrl = (p.baseUrl ?? "").replace(/\/+$/, "");
115
- return {
116
- id,
117
- name: id,
118
- baseUrl,
119
- api: normalizeProviderApi(p.api, baseUrl, id),
120
- apiKey: typeof p.apiKey === "string" ? p.apiKey : "",
121
- requiresOpenAiAuth: typeof p.requiresOpenAiAuth === "boolean" ? p.requiresOpenAiAuth : undefined,
122
- models: Array.isArray(p.models)
123
- ? p.models
124
- .filter((m): m is ModelConfigBody => typeof m.id === "string")
125
- .map((m) => {
126
- const modelId = m.id.trim();
127
- return {
128
- id: modelId,
129
- name: m.name || modelId,
130
- api: isProviderApi(m.api) ? m.api : undefined,
131
- reasoning: typeof m.reasoning === "boolean" ? m.reasoning : undefined,
132
- thinkingLevelMap: normalizeThinkingLevelMap(m.thinkingLevelMap),
133
- input: normalizeStringArray(m.input),
134
- contextWindow: typeof m.contextWindow === "number" ? m.contextWindow : undefined,
135
- maxTokens: typeof m.maxTokens === "number" ? m.maxTokens : undefined,
136
- compat: normalizeCompat(m.compat),
137
- };
138
- })
139
- .filter((m) => m.id)
140
- : [],
141
- };
142
- });
143
- }
144
- delete data.defaultProvider;
145
- delete data.defaultModel;
146
-
147
- writeProviders(data);
148
- return NextResponse.json({ success: true });
149
- } catch (error) {
150
- return NextResponse.json({ error: String(error) }, { status: 500 });
151
- }
152
- }
@@ -1,154 +0,0 @@
1
- /**
2
- * Model test route — validates the saved protocol against the provider endpoint.
3
- */
4
-
5
- import { execSync } from "child_process";
6
- import { NextResponse } from "next/server";
7
- import { chatCompletionsUrl } from "@/lib/codex-compat-proxy";
8
- import { normalizeProviderApi } from "@/lib/provider-api";
9
-
10
- export const dynamic = "force-dynamic";
11
-
12
- type TestProvider = {
13
- baseUrl?: string;
14
- api?: string;
15
- apiKey?: string;
16
- };
17
-
18
- type TestModel = {
19
- id?: string;
20
- api?: string;
21
- };
22
-
23
- function resolveApiKey(value?: string): string | undefined {
24
- const trimmed = value?.trim();
25
- if (!trimmed) return undefined;
26
- if (trimmed.startsWith("!")) {
27
- try {
28
- return execSync(trimmed.slice(1), {
29
- encoding: "utf8",
30
- stdio: ["ignore", "pipe", "ignore"],
31
- timeout: 10_000,
32
- }).trim() || undefined;
33
- } catch {
34
- return undefined;
35
- }
36
- }
37
- if (/^[A-Za-z_][A-Za-z0-9_]*$/.test(trimmed) && process.env[trimmed]) {
38
- return process.env[trimmed];
39
- }
40
- return trimmed;
41
- }
42
-
43
- function endpointFor(baseUrl: string, api: string): string {
44
- const normalized = baseUrl.replace(/\/+$/, "");
45
- if (api === "openai-completions") {
46
- return chatCompletionsUrl(normalized);
47
- }
48
- return normalized.endsWith("/responses") ? normalized : `${normalized}/responses`;
49
- }
50
-
51
- function buildBody(api: string, modelId: string): Record<string, unknown> {
52
- if (api === "openai-completions") {
53
- return {
54
- model: modelId,
55
- messages: [{ role: "user", content: "Reply with pong only." }],
56
- max_tokens: 8,
57
- stream: false,
58
- };
59
- }
60
- return {
61
- model: modelId,
62
- input: "Reply with pong only.",
63
- max_output_tokens: 8,
64
- stream: false,
65
- };
66
- }
67
-
68
- function summarizeResponse(payload: unknown): string {
69
- if (typeof payload !== "object" || payload === null) return String(payload).slice(0, 200);
70
- const record = payload as Record<string, unknown>;
71
- const outputText = record.output_text;
72
- if (typeof outputText === "string" && outputText) return outputText.slice(0, 200);
73
-
74
- const choices = record.choices;
75
- if (Array.isArray(choices) && choices.length > 0) {
76
- const first = choices[0] as { message?: { content?: unknown }; text?: unknown };
77
- const content = first.message?.content ?? first.text;
78
- if (typeof content === "string" && content) return content.slice(0, 200);
79
- }
80
-
81
- const error = record.error;
82
- if (typeof error === "object" && error !== null && "message" in error) {
83
- const message = (error as { message?: unknown }).message;
84
- if (typeof message === "string") return message.slice(0, 200);
85
- }
86
-
87
- return JSON.stringify(payload).slice(0, 200);
88
- }
89
-
90
- export async function POST(req: Request) {
91
- const started = Date.now();
92
- try {
93
- const body = await req.json() as {
94
- providerName?: string;
95
- provider?: TestProvider;
96
- model?: TestModel;
97
- };
98
-
99
- const provider = body.provider ?? {};
100
- const modelId = body.model?.id?.trim();
101
- const baseUrl = provider.baseUrl?.trim().replace(/\/+$/, "");
102
- if (!baseUrl) {
103
- return NextResponse.json({ ok: false, error: "Base URL is required" }, { status: 400 });
104
- }
105
- if (!modelId) {
106
- return NextResponse.json({ ok: false, error: "Model ID is required" }, { status: 400 });
107
- }
108
-
109
- const api = normalizeProviderApi(body.model?.api ?? provider.api, baseUrl, body.providerName);
110
- const apiKey = resolveApiKey(provider.apiKey);
111
- const headers: Record<string, string> = { "content-type": "application/json" };
112
- if (apiKey) headers.authorization = `Bearer ${apiKey}`;
113
-
114
- const upstream = await fetch(endpointFor(baseUrl, api), {
115
- method: "POST",
116
- headers,
117
- body: JSON.stringify(buildBody(api, modelId)),
118
- signal: AbortSignal.timeout(20_000),
119
- });
120
-
121
- const text = await upstream.text();
122
- let payload: unknown = text;
123
- try {
124
- payload = JSON.parse(text);
125
- } catch {
126
- // Plain-text provider errors are still useful for diagnostics.
127
- }
128
-
129
- const latencyMs = Date.now() - started;
130
- const responseText = summarizeResponse(payload);
131
- if (!upstream.ok) {
132
- return NextResponse.json({
133
- ok: false,
134
- error: responseText || `HTTP ${upstream.status}`,
135
- latencyMs,
136
- status: upstream.status,
137
- responseText,
138
- }, { status: 502 });
139
- }
140
-
141
- return NextResponse.json({
142
- ok: true,
143
- latencyMs,
144
- status: upstream.status,
145
- responseText,
146
- });
147
- } catch (error) {
148
- return NextResponse.json({
149
- ok: false,
150
- error: error instanceof Error ? error.message : String(error),
151
- latencyMs: Date.now() - started,
152
- }, { status: 500 });
153
- }
154
- }
@@ -1,51 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server";
2
- import { readdir, access } from "fs/promises";
3
- import { constants } from "fs";
4
- import { homedir } from "os";
5
- import path from "path";
6
-
7
- async function getWindowsDrives(): Promise<string[]> {
8
- if (process.platform !== "win32") return [];
9
- const drives: string[] = [];
10
- for (let code = 65; code <= 90; code += 1) {
11
- const drive = `${String.fromCharCode(code)}:\\`;
12
- try {
13
- await access(drive, constants.R_OK);
14
- drives.push(drive);
15
- } catch {
16
- // drive not available
17
- }
18
- }
19
- return drives;
20
- }
21
-
22
- export async function GET(request: NextRequest) {
23
- const dir = request.nextUrl.searchParams.get("dir") || homedir();
24
- const resolvedDir = path.resolve(dir);
25
-
26
- try {
27
- await access(resolvedDir, constants.R_OK);
28
- } catch {
29
- return NextResponse.json({ error: "Directory does not exist or cannot be read" }, { status: 404 });
30
- }
31
-
32
- try {
33
- const entries = await readdir(resolvedDir, { withFileTypes: true });
34
- const directories = entries
35
- .filter((entry) => entry.isDirectory() && !entry.name.startsWith("."))
36
- .map((entry) => ({
37
- name: entry.name,
38
- path: path.join(resolvedDir, entry.name),
39
- }))
40
- .sort((a, b) => a.name.localeCompare(b.name));
41
-
42
- return NextResponse.json({
43
- current: resolvedDir,
44
- parent: path.dirname(resolvedDir) !== resolvedDir ? path.dirname(resolvedDir) : null,
45
- directories,
46
- drives: await getWindowsDrives(),
47
- });
48
- } catch {
49
- return NextResponse.json({ error: "Cannot read directory" }, { status: 500 });
50
- }
51
- }
@@ -1,83 +0,0 @@
1
- import { NextResponse } from "next/server";
2
- import { mkdirSync, statSync } from "fs";
3
- import { listProjects, listProjectsFast, removeProject, renameProject, touchProject, upsertProject } from "@/lib/projects";
4
-
5
- function isDirectory(path: string): boolean {
6
- try {
7
- return statSync(path).isDirectory();
8
- } catch {
9
- return false;
10
- }
11
- }
12
-
13
- export async function GET(req: Request) {
14
- try {
15
- const url = new URL(req.url);
16
- const includeHidden = url.searchParams.get("includeHidden") === "1";
17
- const includeSessionStats = url.searchParams.get("sessionStats") === "1";
18
- const projects = includeSessionStats
19
- ? await listProjects({ includeHidden })
20
- : listProjectsFast({ includeHidden });
21
- return NextResponse.json({ projects });
22
- } catch (error) {
23
- return NextResponse.json({ error: String(error) }, { status: 500 });
24
- }
25
- }
26
-
27
- export async function POST(req: Request) {
28
- try {
29
- const body = await req.json() as { cwd?: unknown; name?: unknown; create?: unknown };
30
- if (typeof body.cwd !== "string" || !body.cwd.trim()) {
31
- return NextResponse.json({ error: "cwd is required" }, { status: 400 });
32
- }
33
- const cwd = body.cwd.trim();
34
- if (body.create === true) {
35
- mkdirSync(cwd, { recursive: true });
36
- }
37
- if (!isDirectory(cwd)) {
38
- return NextResponse.json({ error: "Project path must be an existing directory" }, { status: 400 });
39
- }
40
- const project = upsertProject(cwd, {
41
- name: typeof body.name === "string" ? body.name : undefined,
42
- hidden: false,
43
- });
44
- return NextResponse.json({ ok: true, project });
45
- } catch (error) {
46
- return NextResponse.json({ error: String(error) }, { status: 500 });
47
- }
48
- }
49
-
50
- export async function PATCH(req: Request) {
51
- try {
52
- const body = await req.json() as { cwd?: unknown; name?: unknown; touch?: unknown };
53
- if (typeof body.cwd !== "string" || !body.cwd.trim()) {
54
- return NextResponse.json({ error: "cwd is required" }, { status: 400 });
55
- }
56
- if (body.touch === true) {
57
- touchProject(body.cwd);
58
- } else {
59
- if (typeof body.name !== "string") {
60
- return NextResponse.json({ error: "name is required" }, { status: 400 });
61
- }
62
- renameProject(body.cwd, body.name);
63
- }
64
- const projects = await listProjects();
65
- return NextResponse.json({ ok: true, projects });
66
- } catch (error) {
67
- return NextResponse.json({ error: String(error) }, { status: 500 });
68
- }
69
- }
70
-
71
- export async function DELETE(req: Request) {
72
- try {
73
- const body = await req.json() as { cwd?: unknown };
74
- if (typeof body.cwd !== "string" || !body.cwd.trim()) {
75
- return NextResponse.json({ error: "cwd is required" }, { status: 400 });
76
- }
77
- removeProject(body.cwd);
78
- const projects = await listProjects();
79
- return NextResponse.json({ ok: true, projects });
80
- } catch (error) {
81
- return NextResponse.json({ error: String(error) }, { status: 500 });
82
- }
83
- }
@@ -1,108 +0,0 @@
1
- import { NextResponse } from "next/server";
2
- import {
3
- applyReportUpdate,
4
- generateReportFromSession,
5
- readReport,
6
- writeReport,
7
- type AnalysisReport,
8
- type AnalysisReportUpdate,
9
- } from "@/lib/report-store";
10
- import { loadCodexSessionContext, resolveSessionPath } from "@/lib/session-reader";
11
-
12
- export const dynamic = "force-dynamic";
13
-
14
- async function loadSessionForReport(sessionId: string): Promise<{
15
- cwd: string;
16
- title: string;
17
- report: AnalysisReport;
18
- context?: import("@/lib/types").SessionContext;
19
- }> {
20
- const cwd = await resolveSessionPath(sessionId);
21
- if (!cwd) throw new Error("Session not found");
22
-
23
- const title = "Analysis Report";
24
- const report = readReport(sessionId, cwd, title);
25
-
26
- const context = (await loadCodexSessionContext(sessionId, cwd).catch(() => null))?.context;
27
-
28
- return { cwd, title, report, context };
29
- }
30
-
31
- export async function GET(
32
- _req: Request,
33
- { params }: { params: Promise<{ id: string }> }
34
- ) {
35
- const { id } = await params;
36
- try {
37
- const { report } = await loadSessionForReport(id);
38
- return NextResponse.json({ report });
39
- } catch (error) {
40
- const message = error instanceof Error ? error.message : String(error);
41
- return NextResponse.json({ error: message }, { status: message === "Session not found" ? 404 : 500 });
42
- }
43
- }
44
-
45
- export async function PUT(
46
- req: Request,
47
- { params }: { params: Promise<{ id: string }> }
48
- ) {
49
- const { id } = await params;
50
- try {
51
- const body = await req.json() as { report?: AnalysisReport };
52
- if (!body.report || typeof body.report !== "object") {
53
- return NextResponse.json({ error: "report is required" }, { status: 400 });
54
- }
55
- const { cwd, title } = await loadSessionForReport(id);
56
- const report = writeReport({
57
- ...body.report,
58
- schemaVersion: 1,
59
- sessionId: id,
60
- cwd,
61
- title: body.report.title || title,
62
- });
63
- return NextResponse.json({ report });
64
- } catch (error) {
65
- const message = error instanceof Error ? error.message : String(error);
66
- return NextResponse.json({ error: message }, { status: message === "Session not found" ? 404 : 500 });
67
- }
68
- }
69
-
70
- export async function POST(
71
- req: Request,
72
- { params }: { params: Promise<{ id: string }> }
73
- ) {
74
- const { id } = await params;
75
- try {
76
- const body = await req.json().catch(() => ({})) as {
77
- action?: string;
78
- update?: AnalysisReportUpdate;
79
- updateKey?: string;
80
- leafId?: string | null;
81
- topic?: string;
82
- };
83
- const { title, report, context } = await loadSessionForReport(id);
84
- const action = body.action ?? "generate";
85
- if (action === "apply_update") {
86
- if (!body.update || typeof body.update !== "object") {
87
- return NextResponse.json({ error: "update is required" }, { status: 400 });
88
- }
89
- const saved = writeReport(applyReportUpdate(report, body.update, typeof body.updateKey === "string" ? body.updateKey : undefined));
90
- return NextResponse.json({ report: saved });
91
- }
92
-
93
- if (action !== "generate") {
94
- return NextResponse.json({ error: "Unsupported action" }, { status: 400 });
95
- }
96
-
97
- if (!context || context.messages.length === 0) {
98
- return NextResponse.json({ report });
99
- }
100
-
101
- const generated = generateReportFromSession({ report, context, sessionTitle: title, topic: body.topic });
102
- const saved = writeReport(generated);
103
- return NextResponse.json({ report: saved });
104
- } catch (error) {
105
- const message = error instanceof Error ? error.message : String(error);
106
- return NextResponse.json({ error: message }, { status: message === "Session not found" ? 404 : 500 });
107
- }
108
- }