cuelo 0.5.8 → 0.6.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 (335) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +7 -6
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +3 -3
  6. package/.next/required-server-files.json +3 -3
  7. package/.next/routes-manifest.json +12 -6
  8. package/.next/server/app/_global-error/page.js +3 -3
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page.js +2 -2
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +3 -3
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  28. package/.next/server/app/api/agent/[id]/account/route.js +1 -1
  29. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/events/route.js +1 -1
  31. package/.next/server/app/api/agent/[id]/route.js +1 -1
  32. package/.next/server/app/api/agent/new/route.js +1 -1
  33. package/.next/server/app/api/agent/running/route.js +1 -1
  34. package/.next/server/app/api/attachments/route.js +5 -0
  35. package/.next/server/app/api/attachments/route.js.nft.json +1 -0
  36. package/.next/server/app/api/attachments/route_client-reference-manifest.js +1 -0
  37. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  38. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  40. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  41. package/.next/server/app/api/auth/providers/route.js +1 -1
  42. package/.next/server/app/api/cwd/browse/route.js +1 -1
  43. package/.next/server/app/api/cwd/validate/route.js +1 -1
  44. package/.next/server/app/api/default-cwd/route.js +1 -1
  45. package/.next/server/app/api/display-settings/route.js +1 -1
  46. package/.next/server/app/api/document-text/route.js +2 -2
  47. package/.next/server/app/api/experiments/route.js +1 -1
  48. package/.next/server/app/api/file-index/route.js +1 -1
  49. package/.next/server/app/api/files/[...path]/route.js +1 -1
  50. package/.next/server/app/api/git/diff/route.js +2 -2
  51. package/.next/server/app/api/git/status/route.js +1 -1
  52. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  53. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  54. package/.next/server/app/api/gpt6/token/route.js +1 -1
  55. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  56. package/.next/server/app/api/home/route.js +1 -1
  57. package/.next/server/app/api/live/call/[callId]/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/mcp/route.js +2 -2
  62. package/.next/server/app/api/model-roles/route.js +1 -1
  63. package/.next/server/app/api/models/route.js +1 -1
  64. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  65. package/.next/server/app/api/models-config/discover/route.js +1 -1
  66. package/.next/server/app/api/models-config/route.js +4 -4
  67. package/.next/server/app/api/models-config/test/route.js +1 -1
  68. package/.next/server/app/api/plugins/route.js +1 -1
  69. package/.next/server/app/api/project-trust/route.js +1 -1
  70. package/.next/server/app/api/projects/route.js +1 -1
  71. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  72. package/.next/server/app/api/runs/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  74. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  76. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  77. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  79. package/.next/server/app/api/sessions/route.js +1 -1
  80. package/.next/server/app/api/settings/route.js +1 -1
  81. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  82. package/.next/server/app/api/skills/check/route.js +1 -1
  83. package/.next/server/app/api/skills/install/route.js +2 -2
  84. package/.next/server/app/api/skills/route.js +2 -2
  85. package/.next/server/app/api/skills/search/route.js +1 -1
  86. package/.next/server/app/api/skills/update/route.js +1 -1
  87. package/.next/server/app/api/theme/route.js +1 -1
  88. package/.next/server/app/api/tool-image/route.js +1 -0
  89. package/.next/server/app/api/tool-image/route.js.nft.json +1 -0
  90. package/.next/server/app/api/tool-image/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/update-maintenance/route.js +2 -2
  92. package/.next/server/app/api/updates/route.js +1 -1
  93. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  94. package/.next/server/app/api/web-access/route.js +1 -1
  95. package/.next/server/app/api/web6/consults/route.js +1 -1
  96. package/.next/server/app/api/worktrees/route.js +1 -1
  97. package/.next/server/app/favicon.ico/route.js +1 -1
  98. package/.next/server/app/index.html +1 -1
  99. package/.next/server/app/index.rsc +5 -5
  100. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  101. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  102. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  103. package/.next/server/app/index.segments/_index.segment.rsc +3 -3
  104. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  105. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  106. package/.next/server/app/page.js +20 -14
  107. package/.next/server/app/page_client-reference-manifest.js +1 -1
  108. package/.next/server/app/recover/page.js +2 -2
  109. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/recover.html +1 -1
  111. package/.next/server/app/recover.rsc +3 -3
  112. package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
  113. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  114. package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
  115. package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
  116. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  117. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  118. package/.next/server/app-paths-manifest.json +7 -6
  119. package/.next/server/chunks/2651.js +1 -1
  120. package/.next/server/chunks/3379.js +1 -1
  121. package/.next/server/chunks/5582.js +5 -11
  122. package/.next/server/chunks/6429.js +2 -2
  123. package/.next/server/chunks/6775.js +1 -1
  124. package/.next/server/chunks/877.js +1 -1
  125. package/.next/server/functions-config-manifest.json +1 -0
  126. package/.next/server/middleware-build-manifest.js +1 -1
  127. package/.next/server/pages/404.html +1 -1
  128. package/.next/server/pages/500.html +1 -1
  129. package/.next/server/server-reference-manifest.json +1 -1
  130. package/.next/static/chunks/app/_global-error/page-0c0ee2cbde2b8cfd.js +1 -0
  131. package/.next/static/chunks/app/api/agent/[id]/account/route-0c0ee2cbde2b8cfd.js +1 -0
  132. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-0c0ee2cbde2b8cfd.js +1 -0
  133. package/.next/static/chunks/app/api/agent/[id]/events/route-0c0ee2cbde2b8cfd.js +1 -0
  134. package/.next/static/chunks/app/api/agent/[id]/route-0c0ee2cbde2b8cfd.js +1 -0
  135. package/.next/static/chunks/app/api/agent/new/route-0c0ee2cbde2b8cfd.js +1 -0
  136. package/.next/static/chunks/app/api/agent/running/route-0c0ee2cbde2b8cfd.js +1 -0
  137. package/.next/static/chunks/app/api/attachments/route-0c0ee2cbde2b8cfd.js +1 -0
  138. package/.next/static/chunks/app/api/auth/all-providers/route-0c0ee2cbde2b8cfd.js +1 -0
  139. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-0c0ee2cbde2b8cfd.js +1 -0
  140. package/.next/static/chunks/app/api/auth/login/[provider]/route-0c0ee2cbde2b8cfd.js +1 -0
  141. package/.next/static/chunks/app/api/auth/logout/[provider]/route-0c0ee2cbde2b8cfd.js +1 -0
  142. package/.next/static/chunks/app/api/auth/providers/route-0c0ee2cbde2b8cfd.js +1 -0
  143. package/.next/static/chunks/app/api/cwd/browse/route-0c0ee2cbde2b8cfd.js +1 -0
  144. package/.next/static/chunks/app/api/cwd/validate/route-0c0ee2cbde2b8cfd.js +1 -0
  145. package/.next/static/chunks/app/api/default-cwd/route-0c0ee2cbde2b8cfd.js +1 -0
  146. package/.next/static/chunks/app/api/display-settings/route-0c0ee2cbde2b8cfd.js +1 -0
  147. package/.next/static/chunks/app/api/document-text/route-0c0ee2cbde2b8cfd.js +1 -0
  148. package/.next/static/chunks/app/api/experiments/route-0c0ee2cbde2b8cfd.js +1 -0
  149. package/.next/static/chunks/app/api/file-index/route-0c0ee2cbde2b8cfd.js +1 -0
  150. package/.next/static/chunks/app/api/files/[...path]/route-0c0ee2cbde2b8cfd.js +1 -0
  151. package/.next/static/chunks/app/api/git/diff/route-0c0ee2cbde2b8cfd.js +1 -0
  152. package/.next/static/chunks/app/api/git/status/route-0c0ee2cbde2b8cfd.js +1 -0
  153. package/.next/static/chunks/app/api/gpt6/handles/route-0c0ee2cbde2b8cfd.js +1 -0
  154. package/.next/static/chunks/app/api/gpt6/reply/route-0c0ee2cbde2b8cfd.js +1 -0
  155. package/.next/static/chunks/app/api/gpt6/token/route-0c0ee2cbde2b8cfd.js +1 -0
  156. package/.next/static/chunks/app/api/gpt6/web6-session/route-0c0ee2cbde2b8cfd.js +1 -0
  157. package/.next/static/chunks/app/api/home/route-0c0ee2cbde2b8cfd.js +1 -0
  158. package/.next/static/chunks/app/api/live/call/[callId]/route-0c0ee2cbde2b8cfd.js +1 -0
  159. package/.next/static/chunks/app/api/live/events/route-0c0ee2cbde2b8cfd.js +1 -0
  160. package/.next/static/chunks/app/api/live/offer/route-0c0ee2cbde2b8cfd.js +1 -0
  161. package/.next/static/chunks/app/api/live/voices/route-0c0ee2cbde2b8cfd.js +1 -0
  162. package/.next/static/chunks/app/api/mcp/route-0c0ee2cbde2b8cfd.js +1 -0
  163. package/.next/static/chunks/app/api/model-roles/route-0c0ee2cbde2b8cfd.js +1 -0
  164. package/.next/static/chunks/app/api/models/route-0c0ee2cbde2b8cfd.js +1 -0
  165. package/.next/static/chunks/app/api/models-config/catalog/route-0c0ee2cbde2b8cfd.js +1 -0
  166. package/.next/static/chunks/app/api/models-config/discover/route-0c0ee2cbde2b8cfd.js +1 -0
  167. package/.next/static/chunks/app/api/models-config/route-0c0ee2cbde2b8cfd.js +1 -0
  168. package/.next/static/chunks/app/api/models-config/test/route-0c0ee2cbde2b8cfd.js +1 -0
  169. package/.next/static/chunks/app/api/plugins/route-0c0ee2cbde2b8cfd.js +1 -0
  170. package/.next/static/chunks/app/api/project-trust/route-0c0ee2cbde2b8cfd.js +1 -0
  171. package/.next/static/chunks/app/api/projects/route-0c0ee2cbde2b8cfd.js +1 -0
  172. package/.next/static/chunks/app/api/runs/[runId]/route-0c0ee2cbde2b8cfd.js +1 -0
  173. package/.next/static/chunks/app/api/runs/route-0c0ee2cbde2b8cfd.js +1 -0
  174. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-0c0ee2cbde2b8cfd.js +1 -0
  175. package/.next/static/chunks/app/api/sessions/[id]/context/route-0c0ee2cbde2b8cfd.js +1 -0
  176. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-0c0ee2cbde2b8cfd.js +1 -0
  177. package/.next/static/chunks/app/api/sessions/[id]/export/route-0c0ee2cbde2b8cfd.js +1 -0
  178. package/.next/static/chunks/app/api/sessions/[id]/route-0c0ee2cbde2b8cfd.js +1 -0
  179. package/.next/static/chunks/app/api/sessions/[id]/state/route-0c0ee2cbde2b8cfd.js +1 -0
  180. package/.next/static/chunks/app/api/sessions/route-0c0ee2cbde2b8cfd.js +1 -0
  181. package/.next/static/chunks/app/api/settings/route-0c0ee2cbde2b8cfd.js +1 -0
  182. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-0c0ee2cbde2b8cfd.js +1 -0
  183. package/.next/static/chunks/app/api/skills/check/route-0c0ee2cbde2b8cfd.js +1 -0
  184. package/.next/static/chunks/app/api/skills/install/route-0c0ee2cbde2b8cfd.js +1 -0
  185. package/.next/static/chunks/app/api/skills/route-0c0ee2cbde2b8cfd.js +1 -0
  186. package/.next/static/chunks/app/api/skills/search/route-0c0ee2cbde2b8cfd.js +1 -0
  187. package/.next/static/chunks/app/api/skills/update/route-0c0ee2cbde2b8cfd.js +1 -0
  188. package/.next/static/chunks/app/api/theme/route-0c0ee2cbde2b8cfd.js +1 -0
  189. package/.next/static/chunks/app/api/tool-image/route-0c0ee2cbde2b8cfd.js +1 -0
  190. package/.next/static/chunks/app/api/update-maintenance/route-0c0ee2cbde2b8cfd.js +1 -0
  191. package/.next/static/chunks/app/api/updates/route-0c0ee2cbde2b8cfd.js +1 -0
  192. package/.next/static/chunks/app/api/web-access/recovery/route-0c0ee2cbde2b8cfd.js +1 -0
  193. package/.next/static/chunks/app/api/web-access/route-0c0ee2cbde2b8cfd.js +1 -0
  194. package/.next/static/chunks/app/api/web6/consults/route-0c0ee2cbde2b8cfd.js +1 -0
  195. package/.next/static/chunks/app/api/worktrees/route-0c0ee2cbde2b8cfd.js +1 -0
  196. package/.next/static/chunks/app/{layout-5ffecd9ebe39dbd0.js → layout-31a0bfeae1eece12.js} +1 -1
  197. package/.next/static/chunks/app/manifest.webmanifest/route-0c0ee2cbde2b8cfd.js +1 -0
  198. package/.next/static/chunks/app/page-ba96ee458de51af9.js +22 -0
  199. package/.next/static/chunks/next/dist/client/components/builtin/app-error-0c0ee2cbde2b8cfd.js +1 -0
  200. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-0c0ee2cbde2b8cfd.js +1 -0
  201. package/.next/static/chunks/next/dist/client/components/builtin/not-found-0c0ee2cbde2b8cfd.js +1 -0
  202. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-0c0ee2cbde2b8cfd.js +1 -0
  203. package/.next/static/css/{0282259eb1a6b95f.css → bbe00993de567f95.css} +1 -1
  204. package/.next/static/zqQ2BdsFkwRQpfXpTFeIx/_buildManifest.js +1 -0
  205. package/.next/trace +104 -104
  206. package/.next/trace-build +1 -1
  207. package/.next/types/app/api/{gpt6/mcp → attachments}/route.ts +3 -3
  208. package/.next/types/app/api/tool-image/route.ts +351 -0
  209. package/.next/types/routes.d.ts +3 -2
  210. package/.next/types/validator.ts +18 -9
  211. package/README.md +5 -3
  212. package/Tools/CUELO_Setup/files/native-runtime-patch.js +5 -5
  213. package/Tools/OMP_Global_Config/agent/AGENTS.md +1 -0
  214. package/Tools/OMP_Global_Config/agent/RULES.md +4 -0
  215. package/Tools/OMP_Global_Config/agent/agents/maker.md +2 -2
  216. package/Tools/OMP_Global_Config/agent/extensions/character-voice.ts +61 -11
  217. package/Tools/OMP_Global_Config/agent/extensions/skim.ts +227 -0
  218. package/Tools/OMP_Global_Config/agent/prompt-copies/AGENTS.en.md +2 -1
  219. package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +3 -1
  220. package/Tools/OMP_Global_Config/agent/rules/harness-policy.json +1 -1
  221. package/Tools/OMP_Global_Config/agent/rules/subagent.md +2 -0
  222. package/Tools/OMP_Global_Config/agent/rules/web6-consult.md +7 -8
  223. package/Tools/OMP_Global_Config/agent/sop/maker.md +1 -1
  224. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +191 -57
  225. package/next.config.ts +7 -0
  226. package/package.json +7 -7
  227. package/public/audio/completion/hikari/01.wav +0 -0
  228. package/public/audio/completion/hikari/02.wav +0 -0
  229. package/public/audio/completion/hikari/03.wav +0 -0
  230. package/public/audio/completion/hikari/04.wav +0 -0
  231. package/public/audio/completion/hikari/05.wav +0 -0
  232. package/public/audio/completion/hikari/06.wav +0 -0
  233. package/public/audio/completion/hikari/approval/01.wav +0 -0
  234. package/public/audio/completion/hikari/approval/02.wav +0 -0
  235. package/public/audio/completion/hikari/approval/03.wav +0 -0
  236. package/public/audio/completion/hikari/choice/01.wav +0 -0
  237. package/public/audio/completion/hikari/choice/02.wav +0 -0
  238. package/public/audio/completion/hikari/choice/03.wav +0 -0
  239. package/public/audio/completion/hikari/failed/01.wav +0 -0
  240. package/public/audio/completion/hikari/failed/02.wav +0 -0
  241. package/public/audio/completion/hikari/failed/03.wav +0 -0
  242. package/public/audio/completion/hikari/working/01.wav +0 -0
  243. package/public/audio/completion/hikari/working/02.wav +0 -0
  244. package/public/audio/completion/hikari/working/03.wav +0 -0
  245. package/public/audio/completion/voices.json +198 -0
  246. package/public/avatars/hikari.webp +0 -0
  247. package/public/stickers/hikari/approval/01.webp +0 -0
  248. package/public/stickers/hikari/approval/02.webp +0 -0
  249. package/public/stickers/hikari/approval/03.webp +0 -0
  250. package/public/stickers/hikari/choice/01.webp +0 -0
  251. package/public/stickers/hikari/choice/02.webp +0 -0
  252. package/public/stickers/hikari/choice/03.webp +0 -0
  253. package/public/stickers/hikari/done/01.webp +0 -0
  254. package/public/stickers/hikari/done/02.webp +0 -0
  255. package/public/stickers/hikari/done/03.webp +0 -0
  256. package/public/stickers/hikari/failed/01.webp +0 -0
  257. package/public/stickers/hikari/failed/02.webp +0 -0
  258. package/public/stickers/hikari/failed/03.webp +0 -0
  259. package/public/stickers/hikari/working/01.webp +0 -0
  260. package/.next/server/app/api/gpt6/mcp/route.js +0 -2
  261. package/.next/server/app/api/gpt6/mcp/route.js.nft.json +0 -1
  262. package/.next/server/app/api/gpt6/mcp/route_client-reference-manifest.js +0 -1
  263. package/.next/static/2UGVMAB5iVKLWm-zGiUKj/_buildManifest.js +0 -1
  264. package/.next/static/chunks/app/_global-error/page-a9c51a9353807009.js +0 -1
  265. package/.next/static/chunks/app/api/agent/[id]/account/route-a9c51a9353807009.js +0 -1
  266. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-a9c51a9353807009.js +0 -1
  267. package/.next/static/chunks/app/api/agent/[id]/events/route-a9c51a9353807009.js +0 -1
  268. package/.next/static/chunks/app/api/agent/[id]/route-a9c51a9353807009.js +0 -1
  269. package/.next/static/chunks/app/api/agent/new/route-a9c51a9353807009.js +0 -1
  270. package/.next/static/chunks/app/api/agent/running/route-a9c51a9353807009.js +0 -1
  271. package/.next/static/chunks/app/api/auth/all-providers/route-a9c51a9353807009.js +0 -1
  272. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-a9c51a9353807009.js +0 -1
  273. package/.next/static/chunks/app/api/auth/login/[provider]/route-a9c51a9353807009.js +0 -1
  274. package/.next/static/chunks/app/api/auth/logout/[provider]/route-a9c51a9353807009.js +0 -1
  275. package/.next/static/chunks/app/api/auth/providers/route-a9c51a9353807009.js +0 -1
  276. package/.next/static/chunks/app/api/cwd/browse/route-a9c51a9353807009.js +0 -1
  277. package/.next/static/chunks/app/api/cwd/validate/route-a9c51a9353807009.js +0 -1
  278. package/.next/static/chunks/app/api/default-cwd/route-a9c51a9353807009.js +0 -1
  279. package/.next/static/chunks/app/api/display-settings/route-a9c51a9353807009.js +0 -1
  280. package/.next/static/chunks/app/api/document-text/route-a9c51a9353807009.js +0 -1
  281. package/.next/static/chunks/app/api/experiments/route-a9c51a9353807009.js +0 -1
  282. package/.next/static/chunks/app/api/file-index/route-a9c51a9353807009.js +0 -1
  283. package/.next/static/chunks/app/api/files/[...path]/route-a9c51a9353807009.js +0 -1
  284. package/.next/static/chunks/app/api/git/diff/route-a9c51a9353807009.js +0 -1
  285. package/.next/static/chunks/app/api/git/status/route-a9c51a9353807009.js +0 -1
  286. package/.next/static/chunks/app/api/gpt6/handles/route-a9c51a9353807009.js +0 -1
  287. package/.next/static/chunks/app/api/gpt6/mcp/route-a9c51a9353807009.js +0 -1
  288. package/.next/static/chunks/app/api/gpt6/reply/route-a9c51a9353807009.js +0 -1
  289. package/.next/static/chunks/app/api/gpt6/token/route-a9c51a9353807009.js +0 -1
  290. package/.next/static/chunks/app/api/gpt6/web6-session/route-a9c51a9353807009.js +0 -1
  291. package/.next/static/chunks/app/api/home/route-a9c51a9353807009.js +0 -1
  292. package/.next/static/chunks/app/api/live/call/[callId]/route-a9c51a9353807009.js +0 -1
  293. package/.next/static/chunks/app/api/live/events/route-a9c51a9353807009.js +0 -1
  294. package/.next/static/chunks/app/api/live/offer/route-a9c51a9353807009.js +0 -1
  295. package/.next/static/chunks/app/api/live/voices/route-a9c51a9353807009.js +0 -1
  296. package/.next/static/chunks/app/api/mcp/route-a9c51a9353807009.js +0 -1
  297. package/.next/static/chunks/app/api/model-roles/route-a9c51a9353807009.js +0 -1
  298. package/.next/static/chunks/app/api/models/route-a9c51a9353807009.js +0 -1
  299. package/.next/static/chunks/app/api/models-config/catalog/route-a9c51a9353807009.js +0 -1
  300. package/.next/static/chunks/app/api/models-config/discover/route-a9c51a9353807009.js +0 -1
  301. package/.next/static/chunks/app/api/models-config/route-a9c51a9353807009.js +0 -1
  302. package/.next/static/chunks/app/api/models-config/test/route-a9c51a9353807009.js +0 -1
  303. package/.next/static/chunks/app/api/plugins/route-a9c51a9353807009.js +0 -1
  304. package/.next/static/chunks/app/api/project-trust/route-a9c51a9353807009.js +0 -1
  305. package/.next/static/chunks/app/api/projects/route-a9c51a9353807009.js +0 -1
  306. package/.next/static/chunks/app/api/runs/[runId]/route-a9c51a9353807009.js +0 -1
  307. package/.next/static/chunks/app/api/runs/route-a9c51a9353807009.js +0 -1
  308. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-a9c51a9353807009.js +0 -1
  309. package/.next/static/chunks/app/api/sessions/[id]/context/route-a9c51a9353807009.js +0 -1
  310. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-a9c51a9353807009.js +0 -1
  311. package/.next/static/chunks/app/api/sessions/[id]/export/route-a9c51a9353807009.js +0 -1
  312. package/.next/static/chunks/app/api/sessions/[id]/route-a9c51a9353807009.js +0 -1
  313. package/.next/static/chunks/app/api/sessions/[id]/state/route-a9c51a9353807009.js +0 -1
  314. package/.next/static/chunks/app/api/sessions/route-a9c51a9353807009.js +0 -1
  315. package/.next/static/chunks/app/api/settings/route-a9c51a9353807009.js +0 -1
  316. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-a9c51a9353807009.js +0 -1
  317. package/.next/static/chunks/app/api/skills/check/route-a9c51a9353807009.js +0 -1
  318. package/.next/static/chunks/app/api/skills/install/route-a9c51a9353807009.js +0 -1
  319. package/.next/static/chunks/app/api/skills/route-a9c51a9353807009.js +0 -1
  320. package/.next/static/chunks/app/api/skills/search/route-a9c51a9353807009.js +0 -1
  321. package/.next/static/chunks/app/api/skills/update/route-a9c51a9353807009.js +0 -1
  322. package/.next/static/chunks/app/api/theme/route-a9c51a9353807009.js +0 -1
  323. package/.next/static/chunks/app/api/update-maintenance/route-a9c51a9353807009.js +0 -1
  324. package/.next/static/chunks/app/api/updates/route-a9c51a9353807009.js +0 -1
  325. package/.next/static/chunks/app/api/web-access/recovery/route-a9c51a9353807009.js +0 -1
  326. package/.next/static/chunks/app/api/web-access/route-a9c51a9353807009.js +0 -1
  327. package/.next/static/chunks/app/api/web6/consults/route-a9c51a9353807009.js +0 -1
  328. package/.next/static/chunks/app/api/worktrees/route-a9c51a9353807009.js +0 -1
  329. package/.next/static/chunks/app/manifest.webmanifest/route-a9c51a9353807009.js +0 -1
  330. package/.next/static/chunks/app/page-5584cc6078d2573c.js +0 -15
  331. package/.next/static/chunks/next/dist/client/components/builtin/app-error-a9c51a9353807009.js +0 -1
  332. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-a9c51a9353807009.js +0 -1
  333. package/.next/static/chunks/next/dist/client/components/builtin/not-found-a9c51a9353807009.js +0 -1
  334. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-a9c51a9353807009.js +0 -1
  335. /package/.next/static/{2UGVMAB5iVKLWm-zGiUKj → zqQ2BdsFkwRQpfXpTFeIx}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=3432,a.ids=[3432],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")},7255:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(48161),g=c(57075),h=c(80104),i=c(65630),j=a([i]);async function k(a,{params:b}){let{id:c}=await b,d=null,j=!1;try{let b=new URL(a.url);d=b.searchParams.get("path"),j="1"===b.searchParams.get("download")}catch{return e.NextResponse.json({error:"invalid url"},{status:400})}if(!d)return e.NextResponse.json({error:"path required"},{status:400});let l=(0,h.fM)(d,(0,f.tmpdir)());if(!l)return e.NextResponse.json({error:"invalid path"},{status:400});if(!await (0,i.jV)(l,c))return e.NextResponse.json({error:"forbidden"},{status:403});try{if(j){let{handle:a}=await (0,h.Vn)(l),b=g.Readable.toWeb(a.createReadStream());return new Response(b,{headers:{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="bash-output.log"',"Cache-Control":"no-store"}})}let a=await (0,h.GV)(l);if(a.tooLarge)return e.NextResponse.json({error:`Full output is too large to display (limit ${h.gQ} bytes)`,data:{size:a.size,maxBytes:h.gQ}},{status:413});return e.NextResponse.json({success:!0,data:{output:a.content}})}catch{return e.NextResponse.json({error:"full output unavailable"},{status:404})}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},26097:(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(7255),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/bash-output/route",pathname:"/api/agent/[id]/bash-output",filename:"route",bundlePath:"app/api/agent/[id]/bash-output/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\bash-output\\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/agent/[id]/bash-output/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)}})},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")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},49180:(a,b,c)=>{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=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},57075:a=>{a.exports=require("node:stream")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80104:(a,b,c)=>{c.d(b,{GV:()=>j,Vn:()=>i,fM:()=>h,gQ:()=>g});var d=c(73024),e=c(51455),f=c(76760);let g=5242880;function h(a,b){let c=(0,f.resolve)(a);return(0,f.dirname)(c)===(0,f.resolve)(b)&&/^pi-bash-[A-Za-z0-9_-]+\.log$/.test((0,f.basename)(c))?c:null}async function i(a){if(!(await (0,e.lstat)(a)).isFile())throw Error("Bash output path is not a regular file");let b="number"==typeof d.constants.O_NOFOLLOW?d.constants.O_NOFOLLOW:0,c=await (0,e.open)(a,d.constants.O_RDONLY|b);try{let a=await c.stat();if(!a.isFile())throw Error("Bash output path is not a regular file");return{handle:c,fileInfo:a}}catch(a){throw await c.close(),a}}async function j(a,b=g){let{handle:c,fileInfo:d}=await i(a);try{if(d.size>b)return{tooLarge:!0,size:d.size};let a=Buffer.alloc(d.size),e=0;for(;e<a.length;){let b=await c.read(a,e,a.length-e,e);if(0===b.bytesRead)break;e+=b.bytesRead}return{tooLarge:!1,content:a.subarray(0,e).toString("utf8"),size:e}}finally{await c.close()}}},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=26097));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=3432,a.ids=[3432],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")},7255:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(48161),g=c(57075),h=c(80104),i=c(65630),j=a([i]);async function k(a,{params:b}){let{id:c}=await b,d=null,j=!1;try{let b=new URL(a.url);d=b.searchParams.get("path"),j="1"===b.searchParams.get("download")}catch{return e.NextResponse.json({error:"invalid url"},{status:400})}if(!d)return e.NextResponse.json({error:"path required"},{status:400});let l=(0,h.fM)(d,(0,f.tmpdir)());if(!l)return e.NextResponse.json({error:"invalid path"},{status:400});if(!await (0,i.jV)(l,c))return e.NextResponse.json({error:"forbidden"},{status:403});try{if(j){let{handle:a}=await (0,h.Vn)(l),b=g.Readable.toWeb(a.createReadStream());return new Response(b,{headers:{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="bash-output.log"',"Cache-Control":"no-store"}})}let a=await (0,h.GV)(l);if(a.tooLarge)return e.NextResponse.json({error:`Full output is too large to display (limit ${h.gQ} bytes)`,data:{size:a.size,maxBytes:h.gQ}},{status:413});return e.NextResponse.json({success:!0,data:{output:a.content}})}catch{return e.NextResponse.json({error:"full output unavailable"},{status:404})}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},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")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},49180:(a,b,c)=>{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=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},57075:a=>{a.exports=require("node:stream")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80104:(a,b,c)=>{c.d(b,{GV:()=>j,Vn:()=>i,fM:()=>h,gQ:()=>g});var d=c(73024),e=c(51455),f=c(76760);let g=5242880;function h(a,b){let c=(0,f.resolve)(a);return(0,f.dirname)(c)===(0,f.resolve)(b)&&/^pi-bash-[A-Za-z0-9_-]+\.log$/.test((0,f.basename)(c))?c:null}async function i(a){if(!(await (0,e.lstat)(a)).isFile())throw Error("Bash output path is not a regular file");let b="number"==typeof d.constants.O_NOFOLLOW?d.constants.O_NOFOLLOW:0,c=await (0,e.open)(a,d.constants.O_RDONLY|b);try{let a=await c.stat();if(!a.isFile())throw Error("Bash output path is not a regular file");return{handle:c,fileInfo:a}}catch(a){throw await c.close(),a}}async function j(a,b=g){let{handle:c,fileInfo:d}=await i(a);try{if(d.size>b)return{tooLarge:!0,size:d.size};let a=Buffer.alloc(d.size),e=0;for(;e<a.length;){let b=await c.read(a,e,a.length-e,e);if(0===b.bytesRead)break;e+=b.bytesRead}return{tooLarge:!1,content:a.subarray(0,e).toString("utf8"),size:e}}finally{await c.close()}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91443:(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(7255),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/bash-output/route",pathname:"/api/agent/[id]/bash-output",filename:"route",bundlePath:"app/api/agent/[id]/bash-output/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\bash-output\\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/agent/[id]/bash-output/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=>{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=91443));module.exports=c})();
@@ -1,3 +1,3 @@
1
1
  "use strict";(()=>{var a={};a.id=5907,a.ids=[5907],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19225:(a,b,c)=>{a.exports=c(44870)},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{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"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},74186:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j,dynamic:()=>k});var e=c(40402),f=c(56429),g=c(66544),h=c(4157),i=a([e,f]);[e,f]=i.then?(await i)():i;let k="force-dynamic",l=new Set(["turn_start","turn_end","tool_execution_update"]);async function j(a,{params:b}){let{id:c}=await b;if(!(0,g.EN)(a))return new Response("Untrusted API request",{status:403});let d=(0,f.A4)(c);if(!d||!d.isAlive()){let a=await (0,e.os)(c);if(!a)return new Response("Session not found",{status:404});try{({session:d}=await (0,f.OF)(c,a,void 0))}catch{return new Response("Failed to start agent",{status:500})}}let i="1"===new URL(a.url).searchParams.get("timing"),k="1"===new URL(a.url).searchParams.get("entries"),m=new ReadableStream({start(b){let g=new TextEncoder,j=a=>{i&&(a={...a,serverEmittedAt:Date.now()});let c=`data: ${JSON.stringify(a)}
2
2
 
3
- `;b.enqueue(g.encode(c))},m=(0,f.KI)(j),n=d.onEvent(a=>{let b=k?"session_snapshot"===a.type?a:"agent_start"===a.type?{type:"agent_start"}:null:"session_snapshot"===a.type?null:function(a){if(l.has(a.type))return null;if("message_update"===a.type){let b={...a};return delete b.assistantMessageEvent,b}return"agent_end"===a.type?{type:"agent_end"}:a}(a);if(b){if(k)return void j(b);if(i)return void m.push({...b,serverObservedAt:Date.now(),streamEventType:a.assistantMessageEvent?.type});m.push(b)}},{keepAlive:k});if(j({type:"connected",sessionId:c}),k){let a=d.inner.sessionManager,b=a.getLeafId();b&&j({type:"session_snapshot",sessionId:c,entryId:b,context:(0,e.Uv)(a.getEntries(),b,{deferThinking:!0,deferToolResultImages:!0})})}let o=setInterval(()=>{try{b.enqueue(g.encode(":\n\n"))}catch{}},3e4),p="",q=setInterval(()=>{try{let a=(0,h.mN)(),b=a?`${a.requestId}:${a.phase}`:"";if(!a||b===p)return;p=b,j({type:"update_maintenance",requestId:a.requestId,phase:a.phase,stageHash:a.stageHash})}catch{}},2e3);a.signal?.addEventListener("abort",()=>{clearInterval(o),clearInterval(q),m.close(),n(),b.close()})}});return new Response(m,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},91309:(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(74186),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/events/route",pathname:"/api/agent/[id]/events",filename:"route",bundlePath:"app/api/agent/[id]/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\events\\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/agent/[id]/events/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)}})},92280:(a,b,c)=>{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=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5582,3229,6429],()=>b(b.s=91309));module.exports=c})();
3
+ `;b.enqueue(g.encode(c))},m=(0,f.KI)(j),n=d.onEvent(a=>{let b=k?"session_snapshot"===a.type?a:"agent_start"===a.type?{type:"agent_start"}:null:"session_snapshot"===a.type?null:function(a){if(l.has(a.type))return null;if("message_update"===a.type){let b={...a};return delete b.assistantMessageEvent,b}return"agent_end"===a.type?{type:"agent_end"}:a}(a);if(b){if(k)return void j(b);if(i)return void m.push({...b,serverObservedAt:Date.now(),streamEventType:a.assistantMessageEvent?.type});m.push(b)}},{keepAlive:k});if(j({type:"connected",sessionId:c}),k){let a=d.inner.sessionManager,b=a.getLeafId();b&&j({type:"session_snapshot",sessionId:c,entryId:b,context:(0,e.Uv)(a.getEntries(),b,{deferThinking:!0,deferToolResultImages:!0})})}let o=setInterval(()=>{try{b.enqueue(g.encode(":\n\n"))}catch{}},3e4),p="",q=setInterval(()=>{try{let a=(0,h.mN)(),b=a?`${a.requestId}:${a.phase}`:"";if(!a||b===p)return;p=b,j({type:"update_maintenance",requestId:a.requestId,phase:a.phase,stageHash:a.stageHash})}catch{}},2e3);a.signal?.addEventListener("abort",()=>{clearInterval(o),clearInterval(q),m.close(),n(),b.close()})}});return new Response(m,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88559:(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(74186),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/events/route",pathname:"/api/agent/[id]/events",filename:"route",bundlePath:"app/api/agent/[id]/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\events\\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/agent/[id]/events/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)}})},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92280:(a,b,c)=>{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=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5582,3229,6429],()=>b(b.s=88559));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=5221,a.ids=[5221],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34645:(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(79256),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/route",pathname:"/api/agent/[id]",filename:"route",bundlePath:"app/api/agent/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\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/agent/[id]/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)}})},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{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"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79256:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,POST:()=>k});var e=c(23211),f=c(40402),g=c(56429),h=c(66544),i=c(4157),j=a([f,g]);async function k(a,{params:b}){let c;if(!(0,h.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let d=(0,i.mN)();if(d)return e.NextResponse.json({error:`CUELO update ${d.phase}`,code:"update_draining",accepted:!1,requestId:d.requestId},{status:503});let j=performance.now(),{id:l}=await b,m=!1;try{let b=await a.json();c="string"==typeof b.type?b.type:void 0;let d=(0,g.A4)(l);if(d?.isAlive()){let a=performance.now(),c=await d.send(b);m="prompt"===b.type;let f=performance.now();return e.NextResponse.json({success:!0,data:c},{headers:{"Server-Timing":`session_prepare;dur=${(a-j).toFixed(2)}, command_accept;dur=${(f-a).toFixed(2)}, request;dur=${(f-j).toFixed(2)}`}})}let h=await (0,f.os)(l);if(!h)return e.NextResponse.json({error:"Session not found",..."prompt"===b.type?{code:"prompt_rejected",accepted:!1}:{}},{status:404});let{session:i}=await (0,g.OF)(l,h,void 0),k=performance.now(),n=await i.send(b);m="prompt"===b.type;let o=performance.now();return e.NextResponse.json({success:!0,data:n},{headers:{"Server-Timing":`session_prepare;dur=${(k-j).toFixed(2)}, command_accept;dur=${(o-k).toFixed(2)}, request;dur=${(o-j).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===c&&!m?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}async function l(a,{params:b}){let{id:c}=await b;try{let a=(0,g.A4)(c);if(!a||!a.isAlive())return e.NextResponse.json({running:!1});let b=await a.send({type:"get_state"});return e.NextResponse.json({running:!0,state:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[f,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=34645));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=5221,a.ids=[5221],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{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"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79256:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,POST:()=>k});var e=c(23211),f=c(40402),g=c(56429),h=c(66544),i=c(4157),j=a([f,g]);async function k(a,{params:b}){let c;if(!(0,h.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let d=(0,i.mN)();if(d)return e.NextResponse.json({error:`CUELO update ${d.phase}`,code:"update_draining",accepted:!1,requestId:d.requestId},{status:503});let j=performance.now(),{id:l}=await b,m=!1;try{let b=await a.json();c="string"==typeof b.type?b.type:void 0;let d=(0,g.A4)(l);if(d?.isAlive()){let a=performance.now(),c=await d.send(b);m="prompt"===b.type;let f=performance.now();return e.NextResponse.json({success:!0,data:c},{headers:{"Server-Timing":`session_prepare;dur=${(a-j).toFixed(2)}, command_accept;dur=${(f-a).toFixed(2)}, request;dur=${(f-j).toFixed(2)}`}})}let h=await (0,f.os)(l);if(!h)return e.NextResponse.json({error:"Session not found",..."prompt"===b.type?{code:"prompt_rejected",accepted:!1}:{}},{status:404});let{session:i}=await (0,g.OF)(l,h,void 0),k=performance.now(),n=await i.send(b);m="prompt"===b.type;let o=performance.now();return e.NextResponse.json({success:!0,data:n},{headers:{"Server-Timing":`session_prepare;dur=${(k-j).toFixed(2)}, command_accept;dur=${(o-k).toFixed(2)}, request;dur=${(o-j).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===c&&!m?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}async function l(a,{params:b}){let{id:c}=await b;try{let a=(0,g.A4)(c);if(!a||!a.isAlive())return e.NextResponse.json({running:!1});let b=await a.send({type:"get_state"});return e.NextResponse.json({running:!0,state:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[f,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88631:(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(79256),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/route",pathname:"/api/agent/[id]",filename:"route",bundlePath:"app/api/agent/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\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/agent/[id]/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)}})},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=88631));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=6450,a.ids=[6450],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},4937:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>q});var e=c(23211),f=c(16131),g=c(29021),h=c(55511),i=c(80547),j=c(40402),k=c(56429),l=c(5908),m=c(38741),n=c(66544),o=c(4157),p=a([f,i,j,k,m]);async function q(a){let b;if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,n.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=(0,o.mN)();if(c)return e.NextResponse.json({error:`CUELO update ${c.phase}`,code:"update_draining",accepted:!1,requestId:c.requestId},{status:503});let d=performance.now(),p=!1;try{let{cwd:c,...n}=await a.json();if(b="string"==typeof n.type?n.type:void 0,!c||"string"!=typeof c)return e.NextResponse.json({error:"cwd is required",..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});if(!(0,g.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`,..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});let o=await (0,i.mc)();if(!(0,i.B7)(c,o))return e.NextResponse.json({error:"Access denied"},{status:403});let{provider:q,modelId:r,toolNames:s,thinkingLevel:t,oauthPosition:u,...v}=n;if(q&&!r||!q&&r)throw Error("provider and modelId must be provided together");let w=function(a){if(void 0===a)return;let b="string"==typeof a?(0,f.parseConfiguredThinkingLevel)(a):void 0;if(void 0===b)throw Error(`Invalid thinking level: ${String(a)}`);return b}(t),x=function(a){if(void 0!==a){if("number"!=typeof a||!Number.isSafeInteger(a)||a<0)throw Error(`Invalid oauthPosition: ${String(a)}`);return a}}(u);if(void 0!==x&&!(q&&r))throw Error("provider and modelId are required to select an account");let y=`__new__${(0,h.randomUUID)()}`;if(q&&r){let{modelRegistry:a}=await (0,m.RD)(),b=await (0,m.Ix)(a,q,r,{forceDiscovery:!0});if(b.miss)throw Error((0,l.zX)(b.miss))}let{session:z,realSessionId:A}=await (0,k.OF)(y,"",c,{...s?{toolNames:s}:{},...q&&r?{initialModel:{provider:q,modelId:r}}:{},...w?{thinkingLevel:w}:{},...void 0!==x?{accountOauthPosition:x}:{}});(0,i.wz)(c),(0,j.mD)();let B=await z.send({type:"get_state"}),C=performance.now();if("ensure_session"===v.type)return e.NextResponse.json({success:!0,sessionId:A,data:null,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}`}});let D=await z.send(v);p="prompt"===v.type;let E=performance.now();return e.NextResponse.json({success:!0,sessionId:A,data:D,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}, command_accept;dur=${(E-C).toFixed(2)}, request;dur=${(E-d).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===b&&!p?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}[f,i,j,k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},16131:a=>{a.exports=import("@oh-my-pi/pi-tui/thinking")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},21820:a=>{a.exports=require("os")},23729:(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(4937),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/new/route",pathname:"/api/agent/new",filename:"route",bundlePath:"app/api/agent/new/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\new\\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/agent/new/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)}})},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{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"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},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)}})},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},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")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=23729));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=6450,a.ids=[6450],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},4937:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>q});var e=c(23211),f=c(16131),g=c(29021),h=c(55511),i=c(80547),j=c(40402),k=c(56429),l=c(5908),m=c(38741),n=c(66544),o=c(4157),p=a([f,i,j,k,m]);async function q(a){let b;if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,n.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=(0,o.mN)();if(c)return e.NextResponse.json({error:`CUELO update ${c.phase}`,code:"update_draining",accepted:!1,requestId:c.requestId},{status:503});let d=performance.now(),p=!1;try{let{cwd:c,...n}=await a.json();if(b="string"==typeof n.type?n.type:void 0,!c||"string"!=typeof c)return e.NextResponse.json({error:"cwd is required",..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});if(!(0,g.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`,..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});let o=await (0,i.mc)();if(!(0,i.B7)(c,o))return e.NextResponse.json({error:"Access denied"},{status:403});let{provider:q,modelId:r,toolNames:s,thinkingLevel:t,oauthPosition:u,...v}=n;if(q&&!r||!q&&r)throw Error("provider and modelId must be provided together");let w=function(a){if(void 0===a)return;let b="string"==typeof a?(0,f.parseConfiguredThinkingLevel)(a):void 0;if(void 0===b)throw Error(`Invalid thinking level: ${String(a)}`);return b}(t),x=function(a){if(void 0!==a){if("number"!=typeof a||!Number.isSafeInteger(a)||a<0)throw Error(`Invalid oauthPosition: ${String(a)}`);return a}}(u);if(void 0!==x&&!(q&&r))throw Error("provider and modelId are required to select an account");let y=`__new__${(0,h.randomUUID)()}`;if(q&&r){let{modelRegistry:a}=await (0,m.getOmpRuntime)(),b=await (0,m.findModelWithRecovery)(a,q,r,{forceDiscovery:!0});if(b.miss)throw Error((0,l.zX)(b.miss))}let{session:z,realSessionId:A}=await (0,k.OF)(y,"",c,{...s?{toolNames:s}:{},...q&&r?{initialModel:{provider:q,modelId:r}}:{},...w?{thinkingLevel:w}:{},...void 0!==x?{accountOauthPosition:x}:{}});(0,i.wz)(c),(0,j.mD)();let B=await z.send({type:"get_state"}),C=performance.now();if("ensure_session"===v.type)return e.NextResponse.json({success:!0,sessionId:A,data:null,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}`}});let D=await z.send(v);p="prompt"===v.type;let E=performance.now();return e.NextResponse.json({success:!0,sessionId:A,data:D,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}, command_accept;dur=${(E-C).toFixed(2)}, request;dur=${(E-d).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===b&&!p?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}[f,i,j,k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},16131:a=>{a.exports=import("@oh-my-pi/pi-tui/thinking")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},21820:a=>{a.exports=require("os")},22547:(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(4937),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/new/route",pathname:"/api/agent/new",filename:"route",bundlePath:"app/api/agent/new/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\new\\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/agent/new/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)}})},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{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"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},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)}})},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},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")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=22547));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=8197,a.ids=[8197],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5452:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(23211),f=c(56429),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){return e.NextResponse.json({runningSessionIds:(0,f.HG)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},42569:(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(5452),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/running/route",pathname:"/api/agent/running",filename:"route",bundlePath:"app/api/agent/running/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\running\\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/agent/running/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)}})},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=42569));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=8197,a.ids=[8197],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5452:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(23211),f=c(56429),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){return e.NextResponse.json({runningSessionIds:(0,f.HG)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12203:(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(5452),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/running/route",pathname:"/api/agent/running",filename:"route",bundlePath:"app/api/agent/running/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\running\\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/agent/running/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)}})},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},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")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},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")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=12203));module.exports=c})();
@@ -0,0 +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,`
2
+ --- Begin attached document ${o+1}: ${JSON.stringify(p.name)} (${p.mimeType}, ${p.size} bytes) ---
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)}})},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")},90979:(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)}})},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=90979));module.exports=c})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../node_modules/@oh-my-pi/pi-ai/package.json","../../../../../node_modules/@oh-my-pi/pi-ai/src/index.ts","../../../../../node_modules/@oh-my-pi/pi-coding-agent/package.json","../../../../../node_modules/@oh-my-pi/pi-coding-agent/src/index.ts","../../../../../node_modules/@opentelemetry/api/build/src/api/context.js","../../../../../node_modules/@opentelemetry/api/build/src/api/diag.js","../../../../../node_modules/@opentelemetry/api/build/src/api/metrics.js","../../../../../node_modules/@opentelemetry/api/build/src/api/propagation.js","../../../../../node_modules/@opentelemetry/api/build/src/api/trace.js","../../../../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js","../../../../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js","../../../../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js","../../../../../node_modules/@opentelemetry/api/build/src/baggage/utils.js","../../../../../node_modules/@opentelemetry/api/build/src/context-api.js","../../../../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js","../../../../../node_modules/@opentelemetry/api/build/src/context/context.js","../../../../../node_modules/@opentelemetry/api/build/src/diag-api.js","../../../../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js","../../../../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js","../../../../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js","../../../../../node_modules/@opentelemetry/api/build/src/diag/types.js","../../../../../node_modules/@opentelemetry/api/build/src/index.js","../../../../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js","../../../../../node_modules/@opentelemetry/api/build/src/internal/semver.js","../../../../../node_modules/@opentelemetry/api/build/src/metrics-api.js","../../../../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js","../../../../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js","../../../../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js","../../../../../node_modules/@opentelemetry/api/build/src/propagation-api.js","../../../../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js","../../../../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js","../../../../../node_modules/@opentelemetry/api/build/src/trace-api.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/status.js","../../../../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js","../../../../../node_modules/@opentelemetry/api/build/src/version.js","../../../../../node_modules/@opentelemetry/api/package.json","../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../node_modules/@swc/helpers/package.json","../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../node_modules/next/dist/client/lib/console.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../node_modules/next/dist/lib/constants.js","../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../node_modules/next/dist/lib/is-error.js","../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../node_modules/next/dist/server/node-environment.js","../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../node_modules/next/dist/server/require-hook.js","../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../node_modules/next/package.json","../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/cjs/react.production.js","../../../../../node_modules/react/index.js","../../../../../node_modules/react/package.json","../../../../../package.json","../../../../package.json","../../../chunks/1813.js","../../../chunks/4741.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/attachments/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
@@ -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")},63969:(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=63969));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")},6979:(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)}})},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")},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=6979));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.RD)(),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.RD)();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.RD)();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.GA)(),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")},30189:(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.d(b,{Ef:()=>n,GA:()=>k,Ix:()=>m,RD:()=>i,ZU:()=>j});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=30189));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")},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)}})},43887:(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)}})},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=43887));module.exports=c})();