cuelo 0.8.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +11 -8
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +27 -3
  5. package/.next/react-loadable-manifest.json +3 -2
  6. package/.next/required-server-files.js +2 -2
  7. package/.next/required-server-files.json +2 -2
  8. package/.next/routes-manifest.json +20 -0
  9. package/.next/server/app/_global-error/page.js +3 -3
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/api/agent/[id]/account/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  31. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  32. package/.next/server/app/api/agent/[id]/route.js +1 -1
  33. package/.next/server/app/api/agent/new/route.js +1 -1
  34. package/.next/server/app/api/agent/running/route.js +1 -1
  35. package/.next/server/app/api/attachments/route.js +3 -3
  36. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  37. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  38. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/providers/route.js +1 -1
  41. package/.next/server/app/api/cwd/browse/route.js +1 -1
  42. package/.next/server/app/api/cwd/validate/route.js +1 -1
  43. package/.next/server/app/api/default-cwd/route.js +1 -1
  44. package/.next/server/app/api/display-settings/route.js +1 -1
  45. package/.next/server/app/api/document-text/route.js +2 -2
  46. package/.next/server/app/api/experiments/route.js +1 -1
  47. package/.next/server/app/api/file-index/route.js +1 -1
  48. package/.next/server/app/api/files/[...path]/route.js +1 -1
  49. package/.next/server/app/api/git/diff/route.js +1 -1
  50. package/.next/server/app/api/git/status/route.js +2 -2
  51. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  52. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  53. package/.next/server/app/api/gpt6/token/route.js +1 -1
  54. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  55. package/.next/server/app/api/home/route.js +1 -1
  56. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  57. package/.next/server/app/api/live/character-voice/route.js +1 -1
  58. package/.next/server/app/api/live/events/route.js +2 -2
  59. package/.next/server/app/api/live/offer/route.js +1 -1
  60. package/.next/server/app/api/live/voices/route.js +1 -1
  61. package/.next/server/app/api/lounge/events/route.js +2 -2
  62. package/.next/server/app/api/lounge/route.js +1 -1
  63. package/.next/server/app/api/mcp/route.js +2 -2
  64. package/.next/server/app/api/model-roles/route.js +1 -1
  65. package/.next/server/app/api/models/route.js +1 -1
  66. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  67. package/.next/server/app/api/models-config/discover/route.js +1 -1
  68. package/.next/server/app/api/models-config/route.js +2 -2
  69. package/.next/server/app/api/models-config/test/route.js +1 -1
  70. package/.next/server/app/api/office-avatars/[id]/route.js +1 -0
  71. package/.next/server/app/api/office-avatars/[id]/route.js.nft.json +1 -0
  72. package/.next/server/app/api/office-avatars/[id]/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/office-avatars/route.js +1 -0
  74. package/.next/server/app/api/office-avatars/route.js.nft.json +1 -0
  75. package/.next/server/app/api/office-avatars/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/plugins/route.js +1 -1
  77. package/.next/server/app/api/project-trust/route.js +1 -1
  78. package/.next/server/app/api/projects/route.js +2 -2
  79. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  80. package/.next/server/app/api/runs/route.js +1 -1
  81. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  85. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  86. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  87. package/.next/server/app/api/sessions/route.js +1 -1
  88. package/.next/server/app/api/sessions/search/route.js +1 -1
  89. package/.next/server/app/api/settings/route.js +1 -1
  90. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  91. package/.next/server/app/api/skills/check/route.js +1 -1
  92. package/.next/server/app/api/skills/install/route.js +2 -2
  93. package/.next/server/app/api/skills/route.js +2 -2
  94. package/.next/server/app/api/skills/search/route.js +1 -1
  95. package/.next/server/app/api/skills/update/route.js +1 -1
  96. package/.next/server/app/api/theme/route.js +1 -1
  97. package/.next/server/app/api/tool-image/route.js +1 -1
  98. package/.next/server/app/api/update-maintenance/route.js +2 -2
  99. package/.next/server/app/api/updates/route.js +1 -1
  100. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  101. package/.next/server/app/api/web-access/route.js +1 -1
  102. package/.next/server/app/api/web6/consults/route.js +1 -1
  103. package/.next/server/app/api/worktrees/route.js +1 -1
  104. package/.next/server/app/favicon.ico/route.js +1 -1
  105. package/.next/server/app/index.html +1 -1
  106. package/.next/server/app/index.rsc +7 -7
  107. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  108. package/.next/server/app/index.segments/_full.segment.rsc +7 -7
  109. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  110. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  111. package/.next/server/app/index.segments/_tree.segment.rsc +4 -4
  112. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  113. package/.next/server/app/office/page.js +2 -0
  114. package/.next/server/app/office/page.js.nft.json +1 -0
  115. package/.next/server/app/office/page_client-reference-manifest.js +1 -0
  116. package/.next/server/app/office-preview/page.js +2 -2
  117. package/.next/server/app/office-preview/page.js.nft.json +1 -1
  118. package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
  119. package/.next/server/app/office-preview.html +1 -1
  120. package/.next/server/app/office-preview.rsc +4 -4
  121. package/.next/server/app/office-preview.segments/_full.segment.rsc +4 -4
  122. package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
  123. package/.next/server/app/office-preview.segments/_index.segment.rsc +3 -3
  124. package/.next/server/app/office-preview.segments/_tree.segment.rsc +3 -3
  125. package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +2 -2
  126. package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
  127. package/.next/server/app/office.html +1 -0
  128. package/.next/server/app/office.meta +15 -0
  129. package/.next/server/app/office.rsc +23 -0
  130. package/.next/server/app/office.segments/_full.segment.rsc +23 -0
  131. package/.next/server/app/office.segments/_head.segment.rsc +6 -0
  132. package/.next/server/app/office.segments/_index.segment.rsc +7 -0
  133. package/.next/server/app/office.segments/_tree.segment.rsc +6 -0
  134. package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +10 -0
  135. package/.next/server/app/office.segments/office.segment.rsc +5 -0
  136. package/.next/server/app/page.js +2 -28
  137. package/.next/server/app/page.js.nft.json +1 -1
  138. package/.next/server/app/page_client-reference-manifest.js +1 -1
  139. package/.next/server/app/recover/page.js +2 -2
  140. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  141. package/.next/server/app/recover.html +1 -1
  142. package/.next/server/app/recover.rsc +3 -3
  143. package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
  144. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  145. package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
  146. package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
  147. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  148. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  149. package/.next/server/app-paths-manifest.json +11 -8
  150. package/.next/server/chunks/205.js +2 -2
  151. package/.next/server/chunks/5431.js +7 -0
  152. package/.next/server/chunks/5489.js +21 -0
  153. package/.next/server/chunks/6432.js +353 -0
  154. package/.next/server/chunks/7362.js +1 -0
  155. package/.next/server/functions-config-manifest.json +4 -0
  156. package/.next/server/middleware-build-manifest.js +1 -1
  157. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  158. package/.next/server/middleware.js +4 -4
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.json +1 -1
  162. package/.next/static/chunks/6110-dffa6a7b1ada31e6.js +1 -0
  163. package/.next/static/chunks/726.66a45469e1fb0093.js +1 -0
  164. package/.next/static/chunks/9575-09e3873e0ee5ecfc.js +22 -0
  165. package/.next/static/chunks/app/_global-error/page-b73c548944bb1320.js +1 -0
  166. package/.next/static/chunks/app/api/agent/[id]/account/route-b73c548944bb1320.js +1 -0
  167. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b73c548944bb1320.js +1 -0
  168. package/.next/static/chunks/app/api/agent/[id]/events/route-b73c548944bb1320.js +1 -0
  169. package/.next/static/chunks/app/api/agent/[id]/route-b73c548944bb1320.js +1 -0
  170. package/.next/static/chunks/app/api/agent/new/route-b73c548944bb1320.js +1 -0
  171. package/.next/static/chunks/app/api/agent/running/route-b73c548944bb1320.js +1 -0
  172. package/.next/static/chunks/app/api/attachments/route-b73c548944bb1320.js +1 -0
  173. package/.next/static/chunks/app/api/auth/all-providers/route-b73c548944bb1320.js +1 -0
  174. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b73c548944bb1320.js +1 -0
  175. package/.next/static/chunks/app/api/auth/login/[provider]/route-b73c548944bb1320.js +1 -0
  176. package/.next/static/chunks/app/api/auth/logout/[provider]/route-b73c548944bb1320.js +1 -0
  177. package/.next/static/chunks/app/api/auth/providers/route-b73c548944bb1320.js +1 -0
  178. package/.next/static/chunks/app/api/cwd/browse/route-b73c548944bb1320.js +1 -0
  179. package/.next/static/chunks/app/api/cwd/validate/route-b73c548944bb1320.js +1 -0
  180. package/.next/static/chunks/app/api/default-cwd/route-b73c548944bb1320.js +1 -0
  181. package/.next/static/chunks/app/api/display-settings/route-b73c548944bb1320.js +1 -0
  182. package/.next/static/chunks/app/api/document-text/route-b73c548944bb1320.js +1 -0
  183. package/.next/static/chunks/app/api/experiments/route-b73c548944bb1320.js +1 -0
  184. package/.next/static/chunks/app/api/file-index/route-b73c548944bb1320.js +1 -0
  185. package/.next/static/chunks/app/api/files/[...path]/route-b73c548944bb1320.js +1 -0
  186. package/.next/static/chunks/app/api/git/diff/route-b73c548944bb1320.js +1 -0
  187. package/.next/static/chunks/app/api/git/status/route-b73c548944bb1320.js +1 -0
  188. package/.next/static/chunks/app/api/gpt6/handles/route-b73c548944bb1320.js +1 -0
  189. package/.next/static/chunks/app/api/gpt6/reply/route-b73c548944bb1320.js +1 -0
  190. package/.next/static/chunks/app/api/gpt6/token/route-b73c548944bb1320.js +1 -0
  191. package/.next/static/chunks/app/api/gpt6/web6-session/route-b73c548944bb1320.js +1 -0
  192. package/.next/static/chunks/app/api/home/route-b73c548944bb1320.js +1 -0
  193. package/.next/static/chunks/app/api/live/call/[callId]/route-b73c548944bb1320.js +1 -0
  194. package/.next/static/chunks/app/api/live/character-voice/route-b73c548944bb1320.js +1 -0
  195. package/.next/static/chunks/app/api/live/events/route-b73c548944bb1320.js +1 -0
  196. package/.next/static/chunks/app/api/live/offer/route-b73c548944bb1320.js +1 -0
  197. package/.next/static/chunks/app/api/live/voices/route-b73c548944bb1320.js +1 -0
  198. package/.next/static/chunks/app/api/lounge/events/route-b73c548944bb1320.js +1 -0
  199. package/.next/static/chunks/app/api/lounge/route-b73c548944bb1320.js +1 -0
  200. package/.next/static/chunks/app/api/mcp/route-b73c548944bb1320.js +1 -0
  201. package/.next/static/chunks/app/api/model-roles/route-b73c548944bb1320.js +1 -0
  202. package/.next/static/chunks/app/api/models/route-b73c548944bb1320.js +1 -0
  203. package/.next/static/chunks/app/api/models-config/catalog/route-b73c548944bb1320.js +1 -0
  204. package/.next/static/chunks/app/api/models-config/discover/route-b73c548944bb1320.js +1 -0
  205. package/.next/static/chunks/app/api/models-config/route-b73c548944bb1320.js +1 -0
  206. package/.next/static/chunks/app/api/models-config/test/route-b73c548944bb1320.js +1 -0
  207. package/.next/static/chunks/app/api/office-avatars/[id]/route-b73c548944bb1320.js +1 -0
  208. package/.next/static/chunks/app/api/office-avatars/route-b73c548944bb1320.js +1 -0
  209. package/.next/static/chunks/app/api/plugins/route-b73c548944bb1320.js +1 -0
  210. package/.next/static/chunks/app/api/project-trust/route-b73c548944bb1320.js +1 -0
  211. package/.next/static/chunks/app/api/projects/route-b73c548944bb1320.js +1 -0
  212. package/.next/static/chunks/app/api/runs/[runId]/route-b73c548944bb1320.js +1 -0
  213. package/.next/static/chunks/app/api/runs/route-b73c548944bb1320.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b73c548944bb1320.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/[id]/context/route-b73c548944bb1320.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b73c548944bb1320.js +1 -0
  217. package/.next/static/chunks/app/api/sessions/[id]/export/route-b73c548944bb1320.js +1 -0
  218. package/.next/static/chunks/app/api/sessions/[id]/route-b73c548944bb1320.js +1 -0
  219. package/.next/static/chunks/app/api/sessions/[id]/state/route-b73c548944bb1320.js +1 -0
  220. package/.next/static/chunks/app/api/sessions/route-b73c548944bb1320.js +1 -0
  221. package/.next/static/chunks/app/api/sessions/search/route-b73c548944bb1320.js +1 -0
  222. package/.next/static/chunks/app/api/settings/route-b73c548944bb1320.js +1 -0
  223. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-b73c548944bb1320.js +1 -0
  224. package/.next/static/chunks/app/api/skills/check/route-b73c548944bb1320.js +1 -0
  225. package/.next/static/chunks/app/api/skills/install/route-b73c548944bb1320.js +1 -0
  226. package/.next/static/chunks/app/api/skills/route-b73c548944bb1320.js +1 -0
  227. package/.next/static/chunks/app/api/skills/search/route-b73c548944bb1320.js +1 -0
  228. package/.next/static/chunks/app/api/skills/update/route-b73c548944bb1320.js +1 -0
  229. package/.next/static/chunks/app/api/theme/route-b73c548944bb1320.js +1 -0
  230. package/.next/static/chunks/app/api/tool-image/route-b73c548944bb1320.js +1 -0
  231. package/.next/static/chunks/app/api/update-maintenance/route-b73c548944bb1320.js +1 -0
  232. package/.next/static/chunks/app/api/updates/route-b73c548944bb1320.js +1 -0
  233. package/.next/static/chunks/app/api/web-access/recovery/route-b73c548944bb1320.js +1 -0
  234. package/.next/static/chunks/app/api/web-access/route-b73c548944bb1320.js +1 -0
  235. package/.next/static/chunks/app/api/web6/consults/route-b73c548944bb1320.js +1 -0
  236. package/.next/static/chunks/app/api/worktrees/route-b73c548944bb1320.js +1 -0
  237. package/.next/static/chunks/app/{layout-78440a2c8d3cd1c7.js → layout-3adbfd44301cba82.js} +1 -1
  238. package/.next/static/chunks/app/manifest.webmanifest/route-b73c548944bb1320.js +1 -0
  239. package/.next/static/chunks/app/office/page-424e244f1c7fcdc6.js +1 -0
  240. package/.next/static/chunks/app/office-preview/page-8a0f779f534c409f.js +1 -0
  241. package/.next/static/chunks/app/page-b43b2b8679ed66e2.js +1 -0
  242. package/.next/static/chunks/c9cb82ce.18c8cafa64d76bc3.js +1 -0
  243. package/.next/static/chunks/{main-50999e6ee5708e08.js → main-2603b128da53b28c.js} +1 -1
  244. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b73c548944bb1320.js +1 -0
  245. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b73c548944bb1320.js +1 -0
  246. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b73c548944bb1320.js +1 -0
  247. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b73c548944bb1320.js +1 -0
  248. package/.next/static/chunks/webpack-fe8f1f81562a2b61.js +1 -0
  249. package/.next/static/css/{67b6e19482963224.css → 1a4cea7126dfb757.css} +1 -1
  250. package/.next/static/css/1ffe2d5d654f7eea.css +1 -0
  251. package/.next/static/css/8cdfcac889e08fd3.css +1 -0
  252. package/.next/static/do0UuZKXEeG2rQnEL-f1I/_buildManifest.js +1 -0
  253. package/.next/trace +107 -107
  254. package/.next/trace-build +1 -1
  255. package/.next/types/app/api/office-avatars/[id]/route.ts +351 -0
  256. package/.next/types/app/api/office-avatars/route.ts +351 -0
  257. package/.next/types/app/office/page.ts +87 -0
  258. package/.next/types/routes.d.ts +5 -2
  259. package/.next/types/validator.ts +27 -0
  260. package/README.md +10 -5
  261. package/Tools/CUELO_Setup/files/native-runtime-patch.js +3 -3
  262. package/Tools/CUELO_Setup/files/usage-server.js +56 -3
  263. package/Tools/OMP_Global_Config/agent/AGENTS.md +2 -0
  264. package/Tools/OMP_Global_Config/agent/RULES.md +2 -2
  265. package/Tools/OMP_Global_Config/agent/agents/maker.md +3 -1
  266. package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +5 -2
  267. package/Tools/OMP_Global_Config/agent/extensions/skim.ts +2 -2
  268. package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +3 -1
  269. package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +3 -3
  270. package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +12 -8
  271. package/Tools/OMP_Global_Config/agent/rules/omp-harness.md +5 -0
  272. package/Tools/OMP_Global_Config/agent/rules/subagent.md +28 -4
  273. package/Tools/OMP_Global_Config/agent/sop/_writer.md +2 -0
  274. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +576 -1
  275. package/package.json +8 -7
  276. package/.next/server/chunks/1933.js +0 -353
  277. package/.next/server/chunks/2607.js +0 -1
  278. package/.next/static/3xAqEONTnox8I-4Te8HCx/_buildManifest.js +0 -1
  279. package/.next/static/chunks/8637.5c189b15878e878b.js +0 -1
  280. package/.next/static/chunks/9889-4e472951b0a45120.js +0 -1
  281. package/.next/static/chunks/app/_global-error/page-2bfa6c2cae0dc17e.js +0 -1
  282. package/.next/static/chunks/app/api/agent/[id]/account/route-2bfa6c2cae0dc17e.js +0 -1
  283. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-2bfa6c2cae0dc17e.js +0 -1
  284. package/.next/static/chunks/app/api/agent/[id]/events/route-2bfa6c2cae0dc17e.js +0 -1
  285. package/.next/static/chunks/app/api/agent/[id]/route-2bfa6c2cae0dc17e.js +0 -1
  286. package/.next/static/chunks/app/api/agent/new/route-2bfa6c2cae0dc17e.js +0 -1
  287. package/.next/static/chunks/app/api/agent/running/route-2bfa6c2cae0dc17e.js +0 -1
  288. package/.next/static/chunks/app/api/attachments/route-2bfa6c2cae0dc17e.js +0 -1
  289. package/.next/static/chunks/app/api/auth/all-providers/route-2bfa6c2cae0dc17e.js +0 -1
  290. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  291. package/.next/static/chunks/app/api/auth/login/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  292. package/.next/static/chunks/app/api/auth/logout/[provider]/route-2bfa6c2cae0dc17e.js +0 -1
  293. package/.next/static/chunks/app/api/auth/providers/route-2bfa6c2cae0dc17e.js +0 -1
  294. package/.next/static/chunks/app/api/cwd/browse/route-2bfa6c2cae0dc17e.js +0 -1
  295. package/.next/static/chunks/app/api/cwd/validate/route-2bfa6c2cae0dc17e.js +0 -1
  296. package/.next/static/chunks/app/api/default-cwd/route-2bfa6c2cae0dc17e.js +0 -1
  297. package/.next/static/chunks/app/api/display-settings/route-2bfa6c2cae0dc17e.js +0 -1
  298. package/.next/static/chunks/app/api/document-text/route-2bfa6c2cae0dc17e.js +0 -1
  299. package/.next/static/chunks/app/api/experiments/route-2bfa6c2cae0dc17e.js +0 -1
  300. package/.next/static/chunks/app/api/file-index/route-2bfa6c2cae0dc17e.js +0 -1
  301. package/.next/static/chunks/app/api/files/[...path]/route-2bfa6c2cae0dc17e.js +0 -1
  302. package/.next/static/chunks/app/api/git/diff/route-2bfa6c2cae0dc17e.js +0 -1
  303. package/.next/static/chunks/app/api/git/status/route-2bfa6c2cae0dc17e.js +0 -1
  304. package/.next/static/chunks/app/api/gpt6/handles/route-2bfa6c2cae0dc17e.js +0 -1
  305. package/.next/static/chunks/app/api/gpt6/reply/route-2bfa6c2cae0dc17e.js +0 -1
  306. package/.next/static/chunks/app/api/gpt6/token/route-2bfa6c2cae0dc17e.js +0 -1
  307. package/.next/static/chunks/app/api/gpt6/web6-session/route-2bfa6c2cae0dc17e.js +0 -1
  308. package/.next/static/chunks/app/api/home/route-2bfa6c2cae0dc17e.js +0 -1
  309. package/.next/static/chunks/app/api/live/call/[callId]/route-2bfa6c2cae0dc17e.js +0 -1
  310. package/.next/static/chunks/app/api/live/character-voice/route-2bfa6c2cae0dc17e.js +0 -1
  311. package/.next/static/chunks/app/api/live/events/route-2bfa6c2cae0dc17e.js +0 -1
  312. package/.next/static/chunks/app/api/live/offer/route-2bfa6c2cae0dc17e.js +0 -1
  313. package/.next/static/chunks/app/api/live/voices/route-2bfa6c2cae0dc17e.js +0 -1
  314. package/.next/static/chunks/app/api/lounge/events/route-2bfa6c2cae0dc17e.js +0 -1
  315. package/.next/static/chunks/app/api/lounge/route-2bfa6c2cae0dc17e.js +0 -1
  316. package/.next/static/chunks/app/api/mcp/route-2bfa6c2cae0dc17e.js +0 -1
  317. package/.next/static/chunks/app/api/model-roles/route-2bfa6c2cae0dc17e.js +0 -1
  318. package/.next/static/chunks/app/api/models/route-2bfa6c2cae0dc17e.js +0 -1
  319. package/.next/static/chunks/app/api/models-config/catalog/route-2bfa6c2cae0dc17e.js +0 -1
  320. package/.next/static/chunks/app/api/models-config/discover/route-2bfa6c2cae0dc17e.js +0 -1
  321. package/.next/static/chunks/app/api/models-config/route-2bfa6c2cae0dc17e.js +0 -1
  322. package/.next/static/chunks/app/api/models-config/test/route-2bfa6c2cae0dc17e.js +0 -1
  323. package/.next/static/chunks/app/api/plugins/route-2bfa6c2cae0dc17e.js +0 -1
  324. package/.next/static/chunks/app/api/project-trust/route-2bfa6c2cae0dc17e.js +0 -1
  325. package/.next/static/chunks/app/api/projects/route-2bfa6c2cae0dc17e.js +0 -1
  326. package/.next/static/chunks/app/api/runs/[runId]/route-2bfa6c2cae0dc17e.js +0 -1
  327. package/.next/static/chunks/app/api/runs/route-2bfa6c2cae0dc17e.js +0 -1
  328. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-2bfa6c2cae0dc17e.js +0 -1
  329. package/.next/static/chunks/app/api/sessions/[id]/context/route-2bfa6c2cae0dc17e.js +0 -1
  330. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-2bfa6c2cae0dc17e.js +0 -1
  331. package/.next/static/chunks/app/api/sessions/[id]/export/route-2bfa6c2cae0dc17e.js +0 -1
  332. package/.next/static/chunks/app/api/sessions/[id]/route-2bfa6c2cae0dc17e.js +0 -1
  333. package/.next/static/chunks/app/api/sessions/[id]/state/route-2bfa6c2cae0dc17e.js +0 -1
  334. package/.next/static/chunks/app/api/sessions/route-2bfa6c2cae0dc17e.js +0 -1
  335. package/.next/static/chunks/app/api/sessions/search/route-2bfa6c2cae0dc17e.js +0 -1
  336. package/.next/static/chunks/app/api/settings/route-2bfa6c2cae0dc17e.js +0 -1
  337. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-2bfa6c2cae0dc17e.js +0 -1
  338. package/.next/static/chunks/app/api/skills/check/route-2bfa6c2cae0dc17e.js +0 -1
  339. package/.next/static/chunks/app/api/skills/install/route-2bfa6c2cae0dc17e.js +0 -1
  340. package/.next/static/chunks/app/api/skills/route-2bfa6c2cae0dc17e.js +0 -1
  341. package/.next/static/chunks/app/api/skills/search/route-2bfa6c2cae0dc17e.js +0 -1
  342. package/.next/static/chunks/app/api/skills/update/route-2bfa6c2cae0dc17e.js +0 -1
  343. package/.next/static/chunks/app/api/theme/route-2bfa6c2cae0dc17e.js +0 -1
  344. package/.next/static/chunks/app/api/tool-image/route-2bfa6c2cae0dc17e.js +0 -1
  345. package/.next/static/chunks/app/api/update-maintenance/route-2bfa6c2cae0dc17e.js +0 -1
  346. package/.next/static/chunks/app/api/updates/route-2bfa6c2cae0dc17e.js +0 -1
  347. package/.next/static/chunks/app/api/web-access/recovery/route-2bfa6c2cae0dc17e.js +0 -1
  348. package/.next/static/chunks/app/api/web-access/route-2bfa6c2cae0dc17e.js +0 -1
  349. package/.next/static/chunks/app/api/web6/consults/route-2bfa6c2cae0dc17e.js +0 -1
  350. package/.next/static/chunks/app/api/worktrees/route-2bfa6c2cae0dc17e.js +0 -1
  351. package/.next/static/chunks/app/manifest.webmanifest/route-2bfa6c2cae0dc17e.js +0 -1
  352. package/.next/static/chunks/app/office-preview/page-68828399eb58177b.js +0 -1
  353. package/.next/static/chunks/app/page-a4c4acecc034872f.js +0 -22
  354. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2bfa6c2cae0dc17e.js +0 -1
  355. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2bfa6c2cae0dc17e.js +0 -1
  356. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2bfa6c2cae0dc17e.js +0 -1
  357. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2bfa6c2cae0dc17e.js +0 -1
  358. package/.next/static/chunks/webpack-aba44445f0ef2ed9.js +0 -1
  359. package/.next/static/css/aab5fc8ab1b53780.css +0 -1
  360. package/.next/static/css/d6462eb5a4d2cb8c.css +0 -1
  361. /package/.next/static/{3xAqEONTnox8I-4Te8HCx → do0UuZKXEeG2rQnEL-f1I}/_ssgManifest.js +0 -0
@@ -1,5 +1,5 @@
1
- (()=>{var a={};a.id=3032,a.ids=[3032],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},8207:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l,dynamic:()=>n,runtime:()=>m});var e=c(76760),f=c(23211),g=c(91524),h=c(69835),i=c(38741),j=c(66544),k=a([i]);i=(k.then?(await k)():k)[0];let m="nodejs",n="force-dynamic";async function l(a){if(!(0,j.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});try{let{agentDir:b}=await (0,i.getOmpRuntime)();return await (0,h.LE)(a,{root:(0,e.join)(b,h.Fg),transcribe:g.Du})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},36208:(a,b,c)=>{"use strict";c.d(b,{Lg:()=>i,Qw:()=>d,Vf:()=>g,e6:()=>f,iH:()=>e,we:()=>j});let d=8388608,e=12e4,f=250,g=0x1900000,h={".mp3":"audio/mpeg",".wav":"audio/wav",".wave":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".oga":"audio/ogg",".opus":"audio/ogg",".flac":"audio/flac",".webm":"audio/webm",".aac":"audio/aac",".aif":"audio/aiff",".aiff":"audio/aiff"};function i(a){let b=a.name.toLocaleLowerCase(),c=b.lastIndexOf("."),d=c>0?h[b.slice(c)]:void 0;if(d)return d;let e=a.type.toLocaleLowerCase().split(";",1)[0]?.trim();return e?.startsWith("audio/")?e:null}function j(a){return function(a){let b;if(!a.startsWith(k))return null;let c=a.indexOf("\n");if(c<0)return null;let f=a.slice(0,c);if(!f.endsWith(l))return null;try{b=JSON.parse(f.slice(k.length,-l.length))}catch{return null}if(!function(a){if(!a||"object"!=typeof a||!Number.isSafeInteger(a.userMessageLength)||(a.userMessageLength??-1)<0||!Array.isArray(a.documents)||0===a.documents.length||a.documents.length>3)return!1;let b=0,c=0;for(let f of a.documents){if(!f||"object"!=typeof f||"string"!=typeof f.name||0===f.name.length||"text/markdown"!==f.mimeType&&"text/plain"!==f.mimeType&&"application/pdf"!==f.mimeType||!Number.isSafeInteger(f.size)||(f.size??-1)<0||(f.size??0)>d||!Number.isSafeInteger(f.textLength)||(f.textLength??-1)<0||(f.textLength??0)>e)return!1;b+=f.size??0,c+=f.textLength??0}return b<=0x1000000&&c<=24e4}(b))return null;let g=c+1;if(!a.startsWith(m,g))return null;let h=(g+=m.length)+b.userMessageLength;if(h>a.length)return null;let i=a.slice(g,h);if(g=h,!a.startsWith(n,g))return null;g+=n.length;let j=[];for(let c=0;c<b.documents.length;c+=1){var o,p,q;let d=b.documents[c],e=(o=c,p=d,`
1
+ (()=>{var a={};a.id=3032,a.ids=[3032],a.modules={13:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},8207:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l,dynamic:()=>n,runtime:()=>m});var e=c(76760),f=c(23211),g=c(91524),h=c(69835),i=c(38741),j=c(66544),k=a([i]);i=(k.then?(await k)():k)[0];let m="nodejs",n="force-dynamic";async function l(a){if(!(0,j.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});try{let{agentDir:b}=await (0,i.getOmpRuntime)();return await (0,h.LE)(a,{root:(0,e.join)(b,h.Fg),transcribe:g.Du})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},36208:(a,b,c)=>{"use strict";c.d(b,{Lg:()=>i,Qw:()=>d,Vf:()=>g,e6:()=>f,iH:()=>e,we:()=>j});let d=8388608,e=12e4,f=250,g=0x1900000,h={".mp3":"audio/mpeg",".wav":"audio/wav",".wave":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".oga":"audio/ogg",".opus":"audio/ogg",".flac":"audio/flac",".webm":"audio/webm",".aac":"audio/aac",".aif":"audio/aiff",".aiff":"audio/aiff"};function i(a){let b=a.name.toLocaleLowerCase(),c=b.lastIndexOf("."),d=c>0?h[b.slice(c)]:void 0;if(d)return d;let e=a.type.toLocaleLowerCase().split(";",1)[0]?.trim();return e?.startsWith("audio/")?e:null}function j(a){return function(a){let b;if(!a.startsWith(k))return null;let c=a.indexOf("\n");if(c<0)return null;let f=a.slice(0,c);if(!f.endsWith(l))return null;try{b=JSON.parse(f.slice(k.length,-l.length))}catch{return null}if(!function(a){if(!a||"object"!=typeof a||!Number.isSafeInteger(a.userMessageLength)||(a.userMessageLength??-1)<0||!Array.isArray(a.documents)||0===a.documents.length||a.documents.length>3)return!1;let b=0,c=0;for(let f of a.documents){if(!f||"object"!=typeof f||"string"!=typeof f.name||0===f.name.length||"text/markdown"!==f.mimeType&&"text/plain"!==f.mimeType&&"application/pdf"!==f.mimeType||!Number.isSafeInteger(f.size)||(f.size??-1)<0||(f.size??0)>d||!Number.isSafeInteger(f.textLength)||(f.textLength??-1)<0||(f.textLength??0)>e)return!1;b+=f.size??0,c+=f.textLength??0}return b<=0x1000000&&c<=24e4}(b))return null;let g=c+1;if(!a.startsWith(m,g))return null;let h=(g+=m.length)+b.userMessageLength;if(h>a.length)return null;let i=a.slice(g,h);if(g=h,!a.startsWith(n,g))return null;g+=n.length;let j=[];for(let c=0;c<b.documents.length;c+=1){var o,p,q;let d=b.documents[c],e=(o=c,p=d,`
2
2
  --- Begin attached document ${o+1}: ${JSON.stringify(p.name)} (${p.mimeType}, ${p.size} bytes) ---
3
3
  `);if(!a.startsWith(e,g))return null;let f=(g+=e.length)+d.textLength;if(f>a.length)return null;let h=a.slice(g,f);g=f;let i=(q=c,`
4
- --- End attached document ${q+1} ---`);if(!a.startsWith(i,g))return null;g+=i.length,j.push({name:d.name,mimeType:d.mimeType,size:d.size,text:h})}return g===a.length?{message:i,documents:j}:null}(a)?.message??a}let k="\x3c!-- omp-web-document-context-v1:",l=" --\x3e",m="User message:\n",n="\n\nAttached documents (locally extracted text supplied by the user):\n"},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},39754:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49180:(a,b,c)=>{"use strict";c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55484:(a,b,c)=>{"use strict";c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},66829:(a,b,c)=>{"use strict";c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},69835:(a,b,c)=>{"use strict";c.d(b,{Fg:()=>l,LE:()=>p});var d=c(51455),e=c(76760),f=c.n(e),g=c(66829),h=c(36208),i=c(91524),j=c(55484),k=c(49180);let l="cuelo-attachments",m=/^(?:con|prn|aux|nul|com[0-9¹²³]|lpt[0-9¹²³])(?:\..*)?$/i;async function n(a,b,c,e){let g=(b??"new").toLowerCase();await (0,d.mkdir)(a,{recursive:!0});let h=await (0,d.realpath)(a),i=f().join(h,g);if(await (0,d.mkdir)(i,{recursive:!0}),f().relative(h,await (0,d.realpath)(i))!==g)throw Error("Attachment folder resolves outside the attachment root");let j=function(a){let b=a.replace(/[<>:"|?*\u0000-\u001f]/g,"_").replace(/[. ]+$/,"");if(!b)return"attachment";let c=Array.from(b);if(c.length>150){let a=Array.from(f().extname(b)).slice(0,20).join("");b=c.slice(0,150-a.length).join("")+a}return m.test(b)?`_${b}`:b}(c),k=f().extname(j),l=j.slice(0,j.length-k.length);for(let a=1;a<=1e3;a+=1){let b=f().join(i,1===a?j:`${l} (${a})${k}`);try{return await (0,d.writeFile)(b,e,{flag:"wx"}),b}catch(a){if("EEXIST"!==a.code)throw a}}throw Error(`Too many attachments named ${j}`)}function o(a,b,c){return Response.json({code:b,error:c},{status:a})}async function p(a,{root:b,transcribe:c}){let d;if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return o(415,"unsupported","multipart/form-data body required");try{d=await (0,g.s)(a,h.Vf+65536)}catch(a){if(a instanceof g.H)return o(413,"file_too_large","Attachments must be 25MB or smaller");return o(400,"invalid_form","Malformed multipart body")}let e=d.get("file");if(!e||"string"==typeof e)return o(400,"missing_file","file is required");if(e.size>h.Vf)return o(413,"file_too_large","Attachments must be 25MB or smaller");let f=(0,j.SI)([e.name]);if(f)return o(400,"invalid_name",f);let l=d.get("sessionId"),m="string"==typeof l&&l?l:null;if(null!==m&&!(0,k.ah)(m))return o(400,"invalid_session","Invalid session id");let q=new Uint8Array(await e.arrayBuffer()),r=await n(b,m,e.name,q),s=(0,h.Lg)(e),t={path:r,size:q.byteLength,mimeType:s??(e.type||"application/octet-stream")};if(s)if(q.byteLength>i.EH)t.transcriptError=`audio is larger than the ${i.EH/1024/1024} MB transcription limit`;else try{t.transcript=await c(q,s,a.signal)}catch(a){t.transcriptError=a instanceof Error?a.message:String(a)}return Response.json(t)}},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91524:(a,b,c)=>{"use strict";c.d(b,{Du:()=>h,EH:()=>f});let d="google-antigravity",e="gemini-3.8-flash",f=0xe00000;class g extends Error{}async function h(a,b,h){let i;if(a.byteLength>f)throw Error(`audio exceeds the ${f/1024/1024} MB transcription limit`);let[{completeSimple:j},{getOmpRuntime:k}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),Promise.resolve().then(c.bind(c,38741))]),{modelRegistry:l}=await k(),m=l.find(d,e);if(!m)throw Error(`${d}/${e} is not available`);if(!m.input.includes("image"))throw Error(`${e} does not accept inline media`);let n=await l.getApiKeyAndHeaders(m);if(!n.ok||!n.apiKey)throw Error(n.ok?`No credentials for ${d}`:n.error);let o=AbortSignal.timeout(18e4),p={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},q={apiKey:n.apiKey,headers:n.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:h?AbortSignal.any([h,o]):o};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; ");throw new g(`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
5
- [transcript truncated at the output limit]`:b}(await j(m,p,q))}catch(a){if(!(a instanceof g)||q.signal.aborted)throw a;i=a}throw i}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=39754));module.exports=c})();
4
+ --- End attached document ${q+1} ---`);if(!a.startsWith(i,g))return null;g+=i.length,j.push({name:d.name,mimeType:d.mimeType,size:d.size,text:h})}return g===a.length?{message:i,documents:j}:null}(a)?.message??a}let k="\x3c!-- omp-web-document-context-v1:",l=" --\x3e",m="User message:\n",n="\n\nAttached documents (locally extracted text supplied by the user):\n"},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49180:(a,b,c)=>{"use strict";c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55484:(a,b,c)=>{"use strict";c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},66829:(a,b,c)=>{"use strict";c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},69835:(a,b,c)=>{"use strict";c.d(b,{Fg:()=>l,LE:()=>p});var d=c(51455),e=c(76760),f=c.n(e),g=c(66829),h=c(36208),i=c(91524),j=c(55484),k=c(49180);let l="cuelo-attachments",m=/^(?:con|prn|aux|nul|com[0-9¹²³]|lpt[0-9¹²³])(?:\..*)?$/i;async function n(a,b,c,e){let g=(b??"new").toLowerCase();await (0,d.mkdir)(a,{recursive:!0});let h=await (0,d.realpath)(a),i=f().join(h,g);if(await (0,d.mkdir)(i,{recursive:!0}),f().relative(h,await (0,d.realpath)(i))!==g)throw Error("Attachment folder resolves outside the attachment root");let j=function(a){let b=a.replace(/[<>:"|?*\u0000-\u001f]/g,"_").replace(/[. ]+$/,"");if(!b)return"attachment";let c=Array.from(b);if(c.length>150){let a=Array.from(f().extname(b)).slice(0,20).join("");b=c.slice(0,150-a.length).join("")+a}return m.test(b)?`_${b}`:b}(c),k=f().extname(j),l=j.slice(0,j.length-k.length);for(let a=1;a<=1e3;a+=1){let b=f().join(i,1===a?j:`${l} (${a})${k}`);try{return await (0,d.writeFile)(b,e,{flag:"wx"}),b}catch(a){if("EEXIST"!==a.code)throw a}}throw Error(`Too many attachments named ${j}`)}function o(a,b,c){return Response.json({code:b,error:c},{status:a})}async function p(a,{root:b,transcribe:c}){let d;if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return o(415,"unsupported","multipart/form-data body required");try{d=await (0,g.s)(a,h.Vf+65536)}catch(a){if(a instanceof g.H)return o(413,"file_too_large","Attachments must be 25MB or smaller");return o(400,"invalid_form","Malformed multipart body")}let e=d.get("file");if(!e||"string"==typeof e)return o(400,"missing_file","file is required");if(e.size>h.Vf)return o(413,"file_too_large","Attachments must be 25MB or smaller");let f=(0,j.SI)([e.name]);if(f)return o(400,"invalid_name",f);let l=d.get("sessionId"),m="string"==typeof l&&l?l:null;if(null!==m&&!(0,k.ah)(m))return o(400,"invalid_session","Invalid session id");let q=new Uint8Array(await e.arrayBuffer()),r=await n(b,m,e.name,q),s=(0,h.Lg)(e),t={path:r,size:q.byteLength,mimeType:s??(e.type||"application/octet-stream")};if(s)if(q.byteLength>i.EH)t.transcriptError=`audio is larger than the ${i.EH/1024/1024} MB transcription limit`;else try{t.transcript=await c(q,s,a.signal)}catch(a){t.transcriptError=a instanceof Error?a.message:String(a)}return Response.json(t)}},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91524:(a,b,c)=>{"use strict";c.d(b,{Du:()=>h,EH:()=>f});let d="google-antigravity",e="gemini-3.8-flash",f=0xe00000;class g extends Error{}async function h(a,b,h){let i;if(a.byteLength>f)throw Error(`audio exceeds the ${f/1024/1024} MB transcription limit`);let[{completeSimple:j},{getOmpRuntime:k}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),Promise.resolve().then(c.bind(c,38741))]),{modelRegistry:l}=await k(),m=l.find(d,e);if(!m)throw Error(`${d}/${e} is not available`);if(!m.input.includes("image"))throw Error(`${e} does not accept inline media`);let n=await l.getApiKeyAndHeaders(m);if(!n.ok||!n.apiKey)throw Error(n.ok?`No credentials for ${d}`:n.error);let o=AbortSignal.timeout(18e4),p={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},q={apiKey:n.apiKey,headers:n.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:h?AbortSignal.any([h,o]):o};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; ");throw new g(`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
5
+ [transcript truncated at the output limit]`:b}(await j(m,p,q))}catch(a){if(!(a instanceof g)||q.signal.aborted)throw a;i=a}throw i}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=13));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13760:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.z)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66346:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(13760),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/all-providers/route",pathname:"/api/auth/all-providers",filename:"route",bundlePath:"app/api/auth/all-providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\all-providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/all-providers/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=66346));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13760:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.z)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},79501:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(13760),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/all-providers/route",pathname:"/api/auth/all-providers",filename:"route",bundlePath:"app/api/auth/all-providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\all-providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/all-providers/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=79501));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8743,a.ids=[8743],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},36854:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/api-key/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=36854));module.exports=c})();
1
+ (()=>{var a={};a.id=8743,a.ids=[8743],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11305:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/api-key/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=11305));module.exports=c})();
@@ -1,3 +1,3 @@
1
1
  (()=>{var a={};a.id=1004,a.ids=[1004],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>j,dynamic:()=>l});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let l="force-dynamic";function i(){return globalThis.__ompLoginCallbacks||(globalThis.__ompLoginCallbacks=new Map),globalThis.__ompLoginCallbacks}async function j(a,{params:b}){let{provider:c}=await b,{token:d,code:e}=await a.json();if(!d||!e)return Response.json({error:"token and code required"},{status:400});let f=i(),g=f.get(d);return g?d.startsWith(`${c}-`)?(g.resolve(e),f.delete(d),Response.json({ok:!0,provider:c})):Response.json({error:"Token does not match provider"},{status:400}):Response.json({error:"No pending login for token"},{status:404})}async function k(a,{params:b}){let{provider:c}=await b,d=new TextEncoder,h=(a,b)=>{a.enqueue(d.encode(`data: ${JSON.stringify(b)}
2
2
 
3
- `))},j=new AbortController;a.signal.addEventListener("abort",()=>j.abort());let l=new ReadableStream({async start(a){let b,d=(0,g.G)(c);if(!d){h(a,{type:"error",message:`Unknown provider: ${c}`}),a.close();return}let{authStorage:k}=await (0,f.getOmpRuntime)(),l=i(),m=new Set,n=()=>{let a=`${c}-${Date.now()}-${Math.random().toString(36).slice(2)}`;m.add(a);let b=new Promise((b,c)=>{l.set(a,{resolve:c=>{m.delete(a),l.delete(a),b(c)},reject:b=>{m.delete(a),l.delete(a),c(b)}})});return{token:a,promise:b}},o=()=>(b||(b=n()).promise.finally(()=>{b=void 0}).catch(()=>{}),b),p=()=>{for(let a of m)l.get(a)?.reject(Error("Login cancelled")),l.delete(a);m.clear()};j.signal.addEventListener("abort",p);try{await k.oauth.login(d,{onPrompt:async b=>{let c=n();return h(a,{type:"prompt_request",message:b.message,placeholder:b.placeholder??null,token:c.token}),c.promise},onManualCodeInput:()=>o().promise,onAuth:b=>{let c=o();h(a,{type:"auth",url:b.launchUrl??b.url,fullUrl:b.url,instructions:b.instructions??null,token:c.token})},onProgress:b=>{h(a,{type:"progress",message:b})},signal:j.signal}),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),h(a,{type:"success"})}catch(c){let b=c instanceof Error?c.message:String(c);"Login cancelled"!==b?h(a,{type:"error",message:b}):h(a,{type:"cancelled"})}finally{p(),a.close()}},cancel(){j.abort()}});return new Response(l,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92446:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(46879),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/[provider]/route",pathname:"/api/auth/login/[provider]",filename:"route",bundlePath:"app/api/auth/login/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\login\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=92446));module.exports=c})();
3
+ `))},j=new AbortController;a.signal.addEventListener("abort",()=>j.abort());let l=new ReadableStream({async start(a){let b,d=(0,g.G)(c);if(!d){h(a,{type:"error",message:`Unknown provider: ${c}`}),a.close();return}let{authStorage:k}=await (0,f.getOmpRuntime)(),l=i(),m=new Set,n=()=>{let a=`${c}-${Date.now()}-${Math.random().toString(36).slice(2)}`;m.add(a);let b=new Promise((b,c)=>{l.set(a,{resolve:c=>{m.delete(a),l.delete(a),b(c)},reject:b=>{m.delete(a),l.delete(a),c(b)}})});return{token:a,promise:b}},o=()=>(b||(b=n()).promise.finally(()=>{b=void 0}).catch(()=>{}),b),p=()=>{for(let a of m)l.get(a)?.reject(Error("Login cancelled")),l.delete(a);m.clear()};j.signal.addEventListener("abort",p);try{await k.oauth.login(d,{onPrompt:async b=>{let c=n();return h(a,{type:"prompt_request",message:b.message,placeholder:b.placeholder??null,token:c.token}),c.promise},onManualCodeInput:()=>o().promise,onAuth:b=>{let c=o();h(a,{type:"auth",url:b.launchUrl??b.url,fullUrl:b.url,instructions:b.instructions??null,token:c.token})},onProgress:b=>{h(a,{type:"progress",message:b})},signal:j.signal}),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),h(a,{type:"success"})}catch(c){let b=c instanceof Error?c.message:String(c);"Login cancelled"!==b?h(a,{type:"error",message:b}):h(a,{type:"cancelled"})}finally{p(),a.close()}},cancel(){j.abort()}});return new Response(l,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},85201:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(46879),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/login/[provider]/route",pathname:"/api/auth/login/[provider]",filename:"route",bundlePath:"app/api/auth/login/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\login\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=85201));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18630:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(86152),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\logout\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b;if(!(0,g.G)(c))return Response.json({error:`Unknown provider: ${c}`},{status:400});let{authStorage:d}=await (0,f.getOmpRuntime)(),h=d.credentials.list(c);return h.length>0&&!h.some(a=>"oauth"===a.credential.type)?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):(await d.credentials.remove(c),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=18630));module.exports=c})();
1
+ (()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{G:()=>j,z:()=>i});var e=c(87998),f=c(29843),g=c(38741),h=a([e,f,g]);async function i(){let{modelRegistry:a,authStorage:b}=await (0,g.getOmpRuntime)(),c=a.getAll(),d=new Map;for(let a of c)d.set(a.provider,(d.get(a.provider)??0)+1);let h=new Map;for(let a of(0,e.getOAuthProviders)())a.available&&h.set(a.storeCredentialsAs??a.id,{id:a.id,name:a.name});let i=new Map(f.PROVIDER_DESCRIPTORS.map(a=>[a.providerId,a])),j=new Set([...d.keys(),...h.keys(),...i.keys()]),k=new Map;for(let a of j){let c=b.credentials.list(a),d=c.some(a=>"oauth"===a.credential.type)?"oauth":c.length>0?"api_key":void 0;d&&k.set(a,d)}return[...j].sort().map(a=>{let c=h.get(a),e=b.keys.source(a);return{id:a,name:c?.name??a,hasApiKeyLogin:i.has(a)||d.has(a),hasOAuth:!!c,...c?.name?{oauthName:c.name}:{},status:{configured:void 0!==e,...e?.kind?{source:e.kind}:{}},...k.has(a)?{credentialType:k.get(a)}:{},modelCount:d.get(a)??0}})}function j(a){for(let b of(0,e.getOAuthProviders)())if(b.available&&(b.storeCredentialsAs??b.id)===a)return b.id}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{"use strict";a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72089:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(86152),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\logout\\[provider]\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/[provider]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},78335:()=>{},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(28967),f=c(38741),g=c(28247),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b;if(!(0,g.G)(c))return Response.json({error:`Unknown provider: ${c}`},{status:400});let{authStorage:d}=await (0,f.getOmpRuntime)(),h=d.credentials.list(c);return h.length>0&&!h.some(a=>"oauth"===a.credential.type)?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):(await d.credentials.remove(c),(0,e.kn)(),(0,f.invalidateOmpRuntime)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai/oauth")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=72089));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},33310:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(69226),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.l)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=33310));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},47377:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(69226),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\providers\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.l)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=47377));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12137:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(79748),x=c(42862);async function y(a){try{let b,c=a.nextUrl.searchParams.get("path")?.trim();if((0,x.km)(c))return v.NextResponse.json({path:"",parentPath:null,drives:await (0,x.Zn)(),directories:[]});let d=(0,x.IS)(c);try{b=await (0,x.yT)(d)}catch{return v.NextResponse.json({error:"Directory does not exist"},{status:404})}if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let e=await (0,x.Sk)(b);return v.NextResponse.json({path:b,parentPath:(0,x.aN)(b),directories:e})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\cwd\\browse\\route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42862:(a,b,c)=>{"use strict";c.d(b,{IS:()=>i,Sk:()=>n,Zn:()=>j,aN:()=>l,km:()=>h,pb:()=>k,yT:()=>m});var d=c(79748),e=c(21820),f=c(33873),g=c.n(f);function h(a,b=process.platform){return"win32"===b&&!a}function i(a){return a||(0,e.homedir)()}async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,d.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){if("~"===a)return(0,e.homedir)();if(/^~[\\/]/.test(a)){let b=a.slice(2).replace(/[\\/]+/g,g().sep);return g().resolve((0,e.homedir)(),b)}let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")?g().win32:g(),c=process.env.CUELO_LAUNCH_CWD,d=c?b.resolve(c):process.cwd();return b.resolve(d,a)}function l(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?g().win32:a.startsWith("/")?g().posix:g(),c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function m(a){var b;return b=await (0,d.realpath)(k(a)),/^[a-zA-Z]:$/.test(b)?`${b}\\`:b}async function n(a){let b=await (0,d.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:g().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=g().join(a,b.name),e=await (0,d.realpath)(c);if(!(await (0,d.stat)(e)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=12137));module.exports=c})();
1
+ (()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38555:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(79748),x=c(42862);async function y(a){try{let b,c=a.nextUrl.searchParams.get("path")?.trim();if((0,x.km)(c))return v.NextResponse.json({path:"",parentPath:null,drives:await (0,x.Zn)(),directories:[]});let d=(0,x.IS)(c);try{b=await (0,x.yT)(d)}catch{return v.NextResponse.json({error:"Directory does not exist"},{status:404})}if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let e=await (0,x.Sk)(b);return v.NextResponse.json({path:b,parentPath:(0,x.aN)(b),directories:e})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\cwd\\browse\\route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},42862:(a,b,c)=>{"use strict";c.d(b,{IS:()=>i,Sk:()=>n,Zn:()=>j,aN:()=>l,km:()=>h,pb:()=>k,yT:()=>m});var d=c(79748),e=c(21820),f=c(33873),g=c.n(f);function h(a,b=process.platform){return"win32"===b&&!a}function i(a){return a||(0,e.homedir)()}async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,d.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){if("~"===a)return(0,e.homedir)();if(/^~[\\/]/.test(a)){let b=a.slice(2).replace(/[\\/]+/g,g().sep);return g().resolve((0,e.homedir)(),b)}let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")?g().win32:g(),c=process.env.CUELO_LAUNCH_CWD,d=c?b.resolve(c):process.cwd();return b.resolve(d,a)}function l(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?g().win32:a.startsWith("/")?g().posix:g(),c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function m(a){var b;return b=await (0,d.realpath)(k(a)),/^[a-zA-Z]:$/.test(b)?`${b}\\`:b}async function n(a){let b=await (0,d.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:g().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=g().join(a,b.name),e=await (0,d.realpath)(c);if(!(await (0,d.stat)(e)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=38555));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},10530:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(20816),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\cwd\\validate\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},20816:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j});var e=c(23211),f=c(29021),g=c(80547),h=c(42862),i=a([g]);async function j(a){try{let b,c=await a.json(),d="string"==typeof c.cwd?c.cwd.trim():"";if(!d)return e.NextResponse.json({error:"Path is required"},{status:400});let i=(0,h.pb)(d);try{if(!(0,f.statSync)(i).isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${d}`},{status:400});b=(0,f.realpathSync)(i)}catch{return e.NextResponse.json({error:`Directory does not exist: ${d}`},{status:400})}return(0,g.wz)(b),e.NextResponse.json({success:!0,cwd:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}g=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},42862:(a,b,c)=>{c.d(b,{IS:()=>i,Sk:()=>n,Zn:()=>j,aN:()=>l,km:()=>h,pb:()=>k,yT:()=>m});var d=c(79748),e=c(21820),f=c(33873),g=c.n(f);function h(a,b=process.platform){return"win32"===b&&!a}function i(a){return a||(0,e.homedir)()}async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,d.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){if("~"===a)return(0,e.homedir)();if(/^~[\\/]/.test(a)){let b=a.slice(2).replace(/[\\/]+/g,g().sep);return g().resolve((0,e.homedir)(),b)}let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")?g().win32:g(),c=process.env.CUELO_LAUNCH_CWD,d=c?b.resolve(c):process.cwd();return b.resolve(d,a)}function l(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?g().win32:a.startsWith("/")?g().posix:g(),c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function m(a){var b;return b=await (0,d.realpath)(k(a)),/^[a-zA-Z]:$/.test(b)?`${b}\\`:b}async function n(a){let b=await (0,d.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:g().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=g().join(a,b.name),e=await (0,d.realpath)(c);if(!(await (0,d.stat)(e)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=10530));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},20816:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j});var e=c(23211),f=c(29021),g=c(80547),h=c(42862),i=a([g]);async function j(a){try{let b,c=await a.json(),d="string"==typeof c.cwd?c.cwd.trim():"";if(!d)return e.NextResponse.json({error:"Path is required"},{status:400});let i=(0,h.pb)(d);try{if(!(0,f.statSync)(i).isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${d}`},{status:400});b=(0,f.realpathSync)(i)}catch{return e.NextResponse.json({error:`Directory does not exist: ${d}`},{status:400})}return(0,g.wz)(b),e.NextResponse.json({success:!0,cwd:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}g=(i.then?(await i)():i)[0],d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},42862:(a,b,c)=>{c.d(b,{IS:()=>i,Sk:()=>n,Zn:()=>j,aN:()=>l,km:()=>h,pb:()=>k,yT:()=>m});var d=c(79748),e=c(21820),f=c(33873),g=c.n(f);function h(a,b=process.platform){return"win32"===b&&!a}function i(a){return a||(0,e.homedir)()}async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,d.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){if("~"===a)return(0,e.homedir)();if(/^~[\\/]/.test(a)){let b=a.slice(2).replace(/[\\/]+/g,g().sep);return g().resolve((0,e.homedir)(),b)}let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")||a.startsWith("//")?g().win32:g(),c=process.env.CUELO_LAUNCH_CWD,d=c?b.resolve(c):process.cwd();return b.resolve(d,a)}function l(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?g().win32:a.startsWith("/")?g().posix:g(),c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function m(a){var b;return b=await (0,d.realpath)(k(a)),/^[a-zA-Z]:$/.test(b)?`${b}\\`:b}async function n(a){let b=await (0,d.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:g().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=g().join(a,b.name),e=await (0,d.realpath)(c);if(!(await (0,d.stat)(e)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},92997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(20816),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\cwd\\validate\\route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=92997));module.exports=c})();