cuelo 0.10.73 → 0.10.75

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 (322) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +32 -33
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +0 -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 +2 -2
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  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 +1 -1
  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 +2 -2
  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/attachment-settings/route.js +1 -1
  35. package/.next/server/app/api/attachments/[id]/transcription/route.js +2 -2
  36. package/.next/server/app/api/attachments/draft/route.js +1 -1
  37. package/.next/server/app/api/attachments/route.js +2 -2
  38. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  39. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  41. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  42. package/.next/server/app/api/auth/providers/route.js +1 -1
  43. package/.next/server/app/api/cwd/browse/route.js +1 -1
  44. package/.next/server/app/api/cwd/validate/route.js +1 -1
  45. package/.next/server/app/api/default-cwd/route.js +1 -1
  46. package/.next/server/app/api/display-settings/route.js +1 -1
  47. package/.next/server/app/api/document-text/route.js +2 -2
  48. package/.next/server/app/api/experiments/route.js +1 -1
  49. package/.next/server/app/api/file-index/route.js +1 -1
  50. package/.next/server/app/api/files/[...path]/route.js +1 -1
  51. package/.next/server/app/api/git/diff/route.js +2 -2
  52. package/.next/server/app/api/git/status/route.js +2 -2
  53. package/.next/server/app/api/github/projects/route.js +1 -1
  54. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  55. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  56. package/.next/server/app/api/gpt6/token/route.js +1 -1
  57. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  58. package/.next/server/app/api/home/route.js +1 -1
  59. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  60. package/.next/server/app/api/live/events/route.js +2 -2
  61. package/.next/server/app/api/live/interpret/cloud/events/route.js +2 -2
  62. package/.next/server/app/api/live/interpret/cloud/input/route.js +1 -1
  63. package/.next/server/app/api/live/interpret/cloud/route.js +1 -1
  64. package/.next/server/app/api/live/interpret/route.js +1 -1
  65. package/.next/server/app/api/live/offer/route.js +1 -1
  66. package/.next/server/app/api/live/voices/route.js +1 -1
  67. package/.next/server/app/api/mcp/route.js +2 -2
  68. package/.next/server/app/api/model-roles/route.js +1 -1
  69. package/.next/server/app/api/models/route.js +1 -1
  70. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  71. package/.next/server/app/api/models-config/discover/route.js +1 -1
  72. package/.next/server/app/api/models-config/route.js +2 -2
  73. package/.next/server/app/api/models-config/test/route.js +1 -1
  74. package/.next/server/app/api/plugins/route.js +1 -1
  75. package/.next/server/app/api/project-docs/route.js +1 -1
  76. package/.next/server/app/api/project-trust/route.js +1 -1
  77. package/.next/server/app/api/projects/route.js +2 -2
  78. package/.next/server/app/api/runs/[runId]/prelude/route.js +1 -1
  79. package/.next/server/app/api/runs/[runId]/route.js +1 -1
  80. package/.next/server/app/api/runs/[runId]/turns/route.js +1 -1
  81. package/.next/server/app/api/runs/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  85. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  86. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  87. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  88. package/.next/server/app/api/sessions/route.js +1 -1
  89. package/.next/server/app/api/sessions/search/route.js +1 -1
  90. package/.next/server/app/api/settings/route.js +1 -1
  91. package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
  92. package/.next/server/app/api/skills/check/route.js +1 -1
  93. package/.next/server/app/api/skills/install/route.js +2 -2
  94. package/.next/server/app/api/skills/route.js +2 -2
  95. package/.next/server/app/api/skills/search/route.js +1 -1
  96. package/.next/server/app/api/skills/update/route.js +1 -1
  97. package/.next/server/app/api/subagents/eta/route.js +1 -1
  98. package/.next/server/app/api/theme/route.js +1 -1
  99. package/.next/server/app/api/tool-image/route.js +1 -1
  100. package/.next/server/app/api/update-maintenance/route.js +3 -3
  101. package/.next/server/app/api/updates/route.js +1 -1
  102. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  103. package/.next/server/app/api/web-access/route.js +1 -1
  104. package/.next/server/app/api/web6/consults/route.js +1 -1
  105. package/.next/server/app/api/worktrees/route.js +1 -1
  106. package/.next/server/app/favicon.ico/route.js +1 -1
  107. package/.next/server/app/index.html +1 -1
  108. package/.next/server/app/index.rsc +5 -5
  109. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  110. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  111. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  112. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  113. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  114. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  115. package/.next/server/app/page.js +4 -4
  116. package/.next/server/app/page_client-reference-manifest.js +1 -1
  117. package/.next/server/app/recover/page.js +2 -2
  118. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  119. package/.next/server/app/recover.html +1 -1
  120. package/.next/server/app/recover.rsc +2 -2
  121. package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
  122. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  123. package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
  124. package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
  125. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  126. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  127. package/.next/server/app-paths-manifest.json +32 -33
  128. package/.next/server/chunks/3379.js +1 -1
  129. package/.next/server/chunks/4975.js +1 -1
  130. package/.next/server/middleware-build-manifest.js +1 -1
  131. package/.next/server/pages/404.html +1 -1
  132. package/.next/server/pages/500.html +1 -1
  133. package/.next/server/server-reference-manifest.json +1 -1
  134. package/.next/static/GbGLrHCsszq00qm7I8KWf/_buildManifest.js +1 -0
  135. package/.next/static/chunks/app/_global-error/page-60d4ba1619c3b27a.js +1 -0
  136. package/.next/static/chunks/app/api/agent/[id]/account/route-60d4ba1619c3b27a.js +1 -0
  137. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-60d4ba1619c3b27a.js +1 -0
  138. package/.next/static/chunks/app/api/agent/[id]/events/route-60d4ba1619c3b27a.js +1 -0
  139. package/.next/static/chunks/app/api/agent/[id]/route-60d4ba1619c3b27a.js +1 -0
  140. package/.next/static/chunks/app/api/agent/new/route-60d4ba1619c3b27a.js +1 -0
  141. package/.next/static/chunks/app/api/agent/running/route-60d4ba1619c3b27a.js +1 -0
  142. package/.next/static/chunks/app/api/attachment-settings/route-60d4ba1619c3b27a.js +1 -0
  143. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-60d4ba1619c3b27a.js +1 -0
  144. package/.next/static/chunks/app/api/attachments/draft/route-60d4ba1619c3b27a.js +1 -0
  145. package/.next/static/chunks/app/api/attachments/route-60d4ba1619c3b27a.js +1 -0
  146. package/.next/static/chunks/app/api/auth/all-providers/route-60d4ba1619c3b27a.js +1 -0
  147. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-60d4ba1619c3b27a.js +1 -0
  148. package/.next/static/chunks/app/api/auth/login/[provider]/route-60d4ba1619c3b27a.js +1 -0
  149. package/.next/static/chunks/app/api/auth/logout/[provider]/route-60d4ba1619c3b27a.js +1 -0
  150. package/.next/static/chunks/app/api/auth/providers/route-60d4ba1619c3b27a.js +1 -0
  151. package/.next/static/chunks/app/api/cwd/browse/route-60d4ba1619c3b27a.js +1 -0
  152. package/.next/static/chunks/app/api/cwd/validate/route-60d4ba1619c3b27a.js +1 -0
  153. package/.next/static/chunks/app/api/default-cwd/route-60d4ba1619c3b27a.js +1 -0
  154. package/.next/static/chunks/app/api/display-settings/route-60d4ba1619c3b27a.js +1 -0
  155. package/.next/static/chunks/app/api/document-text/route-60d4ba1619c3b27a.js +1 -0
  156. package/.next/static/chunks/app/api/experiments/route-60d4ba1619c3b27a.js +1 -0
  157. package/.next/static/chunks/app/api/file-index/route-60d4ba1619c3b27a.js +1 -0
  158. package/.next/static/chunks/app/api/files/[...path]/route-60d4ba1619c3b27a.js +1 -0
  159. package/.next/static/chunks/app/api/git/diff/route-60d4ba1619c3b27a.js +1 -0
  160. package/.next/static/chunks/app/api/git/status/route-60d4ba1619c3b27a.js +1 -0
  161. package/.next/static/chunks/app/api/github/projects/route-60d4ba1619c3b27a.js +1 -0
  162. package/.next/static/chunks/app/api/gpt6/handles/route-60d4ba1619c3b27a.js +1 -0
  163. package/.next/static/chunks/app/api/gpt6/reply/route-60d4ba1619c3b27a.js +1 -0
  164. package/.next/static/chunks/app/api/gpt6/token/route-60d4ba1619c3b27a.js +1 -0
  165. package/.next/static/chunks/app/api/gpt6/web6-session/route-60d4ba1619c3b27a.js +1 -0
  166. package/.next/static/chunks/app/api/home/route-60d4ba1619c3b27a.js +1 -0
  167. package/.next/static/chunks/app/api/live/call/[callId]/route-60d4ba1619c3b27a.js +1 -0
  168. package/.next/static/chunks/app/api/live/events/route-60d4ba1619c3b27a.js +1 -0
  169. package/.next/static/chunks/app/api/live/interpret/cloud/events/route-60d4ba1619c3b27a.js +1 -0
  170. package/.next/static/chunks/app/api/live/interpret/cloud/input/route-60d4ba1619c3b27a.js +1 -0
  171. package/.next/static/chunks/app/api/live/interpret/cloud/route-60d4ba1619c3b27a.js +1 -0
  172. package/.next/static/chunks/app/api/live/interpret/route-60d4ba1619c3b27a.js +1 -0
  173. package/.next/static/chunks/app/api/live/offer/route-60d4ba1619c3b27a.js +1 -0
  174. package/.next/static/chunks/app/api/live/voices/route-60d4ba1619c3b27a.js +1 -0
  175. package/.next/static/chunks/app/api/mcp/route-60d4ba1619c3b27a.js +1 -0
  176. package/.next/static/chunks/app/api/model-roles/route-60d4ba1619c3b27a.js +1 -0
  177. package/.next/static/chunks/app/api/models/route-60d4ba1619c3b27a.js +1 -0
  178. package/.next/static/chunks/app/api/models-config/catalog/route-60d4ba1619c3b27a.js +1 -0
  179. package/.next/static/chunks/app/api/models-config/discover/route-60d4ba1619c3b27a.js +1 -0
  180. package/.next/static/chunks/app/api/models-config/route-60d4ba1619c3b27a.js +1 -0
  181. package/.next/static/chunks/app/api/models-config/test/route-60d4ba1619c3b27a.js +1 -0
  182. package/.next/static/chunks/app/api/plugins/route-60d4ba1619c3b27a.js +1 -0
  183. package/.next/static/chunks/app/api/project-docs/route-60d4ba1619c3b27a.js +1 -0
  184. package/.next/static/chunks/app/api/project-trust/route-60d4ba1619c3b27a.js +1 -0
  185. package/.next/static/chunks/app/api/projects/route-60d4ba1619c3b27a.js +1 -0
  186. package/.next/static/chunks/app/api/runs/[runId]/prelude/route-60d4ba1619c3b27a.js +1 -0
  187. package/.next/static/chunks/app/api/runs/[runId]/route-60d4ba1619c3b27a.js +1 -0
  188. package/.next/static/chunks/app/api/runs/[runId]/turns/route-60d4ba1619c3b27a.js +1 -0
  189. package/.next/static/chunks/app/api/runs/route-60d4ba1619c3b27a.js +1 -0
  190. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-60d4ba1619c3b27a.js +1 -0
  191. package/.next/static/chunks/app/api/sessions/[id]/context/route-60d4ba1619c3b27a.js +1 -0
  192. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-60d4ba1619c3b27a.js +1 -0
  193. package/.next/static/chunks/app/api/sessions/[id]/export/route-60d4ba1619c3b27a.js +1 -0
  194. package/.next/static/chunks/app/api/sessions/[id]/route-60d4ba1619c3b27a.js +1 -0
  195. package/.next/static/chunks/app/api/sessions/[id]/state/route-60d4ba1619c3b27a.js +1 -0
  196. package/.next/static/chunks/app/api/sessions/route-60d4ba1619c3b27a.js +1 -0
  197. package/.next/static/chunks/app/api/sessions/search/route-60d4ba1619c3b27a.js +1 -0
  198. package/.next/static/chunks/app/api/settings/route-60d4ba1619c3b27a.js +1 -0
  199. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-60d4ba1619c3b27a.js +1 -0
  200. package/.next/static/chunks/app/api/skills/check/route-60d4ba1619c3b27a.js +1 -0
  201. package/.next/static/chunks/app/api/skills/install/route-60d4ba1619c3b27a.js +1 -0
  202. package/.next/static/chunks/app/api/skills/route-60d4ba1619c3b27a.js +1 -0
  203. package/.next/static/chunks/app/api/skills/search/route-60d4ba1619c3b27a.js +1 -0
  204. package/.next/static/chunks/app/api/skills/update/route-60d4ba1619c3b27a.js +1 -0
  205. package/.next/static/chunks/app/api/subagents/eta/route-60d4ba1619c3b27a.js +1 -0
  206. package/.next/static/chunks/app/api/theme/route-60d4ba1619c3b27a.js +1 -0
  207. package/.next/static/chunks/app/api/tool-image/route-60d4ba1619c3b27a.js +1 -0
  208. package/.next/static/chunks/app/api/update-maintenance/route-60d4ba1619c3b27a.js +1 -0
  209. package/.next/static/chunks/app/api/updates/route-60d4ba1619c3b27a.js +1 -0
  210. package/.next/static/chunks/app/api/web-access/recovery/route-60d4ba1619c3b27a.js +1 -0
  211. package/.next/static/chunks/app/api/web-access/route-60d4ba1619c3b27a.js +1 -0
  212. package/.next/static/chunks/app/api/web6/consults/route-60d4ba1619c3b27a.js +1 -0
  213. package/.next/static/chunks/app/api/worktrees/route-60d4ba1619c3b27a.js +1 -0
  214. package/.next/static/chunks/app/{layout-c43abed8da211f8e.js → layout-d5555fad58795a4a.js} +1 -1
  215. package/.next/static/chunks/app/manifest.webmanifest/route-60d4ba1619c3b27a.js +1 -0
  216. package/.next/static/chunks/app/{page-80ef3b16fd0afe77.js → page-6b041fdfd7becb10.js} +14 -14
  217. package/.next/static/chunks/next/dist/client/components/builtin/app-error-60d4ba1619c3b27a.js +1 -0
  218. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-60d4ba1619c3b27a.js +1 -0
  219. package/.next/static/chunks/next/dist/client/components/builtin/not-found-60d4ba1619c3b27a.js +1 -0
  220. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-60d4ba1619c3b27a.js +1 -0
  221. package/.next/static/css/{f3545b4a13efe99d.css → 8ce0f8ce0d9c44c6.css} +1 -1
  222. package/.next/trace +108 -108
  223. package/.next/trace-build +1 -1
  224. package/.next/types/routes.d.ts +1 -2
  225. package/.next/types/validator.ts +0 -9
  226. package/README.md +69 -41
  227. package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
  228. package/Tools/OMP_Global_Config/agent/RULES.md +10 -5
  229. package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +2 -2
  230. package/Tools/OMP_Global_Config/agent/rules/subagent.md +7 -4
  231. package/package.json +1 -1
  232. package/.next/server/app/api/live/interpret/gemini/route.js +0 -1
  233. package/.next/server/app/api/live/interpret/gemini/route.js.nft.json +0 -1
  234. package/.next/server/app/api/live/interpret/gemini/route_client-reference-manifest.js +0 -1
  235. package/.next/static/LgTSn8ceOcWY1yoxD-zxE/_buildManifest.js +0 -1
  236. package/.next/static/chunks/app/_global-error/page-5d43f36641917e5c.js +0 -1
  237. package/.next/static/chunks/app/api/agent/[id]/account/route-5d43f36641917e5c.js +0 -1
  238. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-5d43f36641917e5c.js +0 -1
  239. package/.next/static/chunks/app/api/agent/[id]/events/route-5d43f36641917e5c.js +0 -1
  240. package/.next/static/chunks/app/api/agent/[id]/route-5d43f36641917e5c.js +0 -1
  241. package/.next/static/chunks/app/api/agent/new/route-5d43f36641917e5c.js +0 -1
  242. package/.next/static/chunks/app/api/agent/running/route-5d43f36641917e5c.js +0 -1
  243. package/.next/static/chunks/app/api/attachment-settings/route-5d43f36641917e5c.js +0 -1
  244. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-5d43f36641917e5c.js +0 -1
  245. package/.next/static/chunks/app/api/attachments/draft/route-5d43f36641917e5c.js +0 -1
  246. package/.next/static/chunks/app/api/attachments/route-5d43f36641917e5c.js +0 -1
  247. package/.next/static/chunks/app/api/auth/all-providers/route-5d43f36641917e5c.js +0 -1
  248. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-5d43f36641917e5c.js +0 -1
  249. package/.next/static/chunks/app/api/auth/login/[provider]/route-5d43f36641917e5c.js +0 -1
  250. package/.next/static/chunks/app/api/auth/logout/[provider]/route-5d43f36641917e5c.js +0 -1
  251. package/.next/static/chunks/app/api/auth/providers/route-5d43f36641917e5c.js +0 -1
  252. package/.next/static/chunks/app/api/cwd/browse/route-5d43f36641917e5c.js +0 -1
  253. package/.next/static/chunks/app/api/cwd/validate/route-5d43f36641917e5c.js +0 -1
  254. package/.next/static/chunks/app/api/default-cwd/route-5d43f36641917e5c.js +0 -1
  255. package/.next/static/chunks/app/api/display-settings/route-5d43f36641917e5c.js +0 -1
  256. package/.next/static/chunks/app/api/document-text/route-5d43f36641917e5c.js +0 -1
  257. package/.next/static/chunks/app/api/experiments/route-5d43f36641917e5c.js +0 -1
  258. package/.next/static/chunks/app/api/file-index/route-5d43f36641917e5c.js +0 -1
  259. package/.next/static/chunks/app/api/files/[...path]/route-5d43f36641917e5c.js +0 -1
  260. package/.next/static/chunks/app/api/git/diff/route-5d43f36641917e5c.js +0 -1
  261. package/.next/static/chunks/app/api/git/status/route-5d43f36641917e5c.js +0 -1
  262. package/.next/static/chunks/app/api/github/projects/route-5d43f36641917e5c.js +0 -1
  263. package/.next/static/chunks/app/api/gpt6/handles/route-5d43f36641917e5c.js +0 -1
  264. package/.next/static/chunks/app/api/gpt6/reply/route-5d43f36641917e5c.js +0 -1
  265. package/.next/static/chunks/app/api/gpt6/token/route-5d43f36641917e5c.js +0 -1
  266. package/.next/static/chunks/app/api/gpt6/web6-session/route-5d43f36641917e5c.js +0 -1
  267. package/.next/static/chunks/app/api/home/route-5d43f36641917e5c.js +0 -1
  268. package/.next/static/chunks/app/api/live/call/[callId]/route-5d43f36641917e5c.js +0 -1
  269. package/.next/static/chunks/app/api/live/events/route-5d43f36641917e5c.js +0 -1
  270. package/.next/static/chunks/app/api/live/interpret/cloud/events/route-5d43f36641917e5c.js +0 -1
  271. package/.next/static/chunks/app/api/live/interpret/cloud/input/route-5d43f36641917e5c.js +0 -1
  272. package/.next/static/chunks/app/api/live/interpret/cloud/route-5d43f36641917e5c.js +0 -1
  273. package/.next/static/chunks/app/api/live/interpret/gemini/route-5d43f36641917e5c.js +0 -1
  274. package/.next/static/chunks/app/api/live/interpret/route-5d43f36641917e5c.js +0 -1
  275. package/.next/static/chunks/app/api/live/offer/route-5d43f36641917e5c.js +0 -1
  276. package/.next/static/chunks/app/api/live/voices/route-5d43f36641917e5c.js +0 -1
  277. package/.next/static/chunks/app/api/mcp/route-5d43f36641917e5c.js +0 -1
  278. package/.next/static/chunks/app/api/model-roles/route-5d43f36641917e5c.js +0 -1
  279. package/.next/static/chunks/app/api/models/route-5d43f36641917e5c.js +0 -1
  280. package/.next/static/chunks/app/api/models-config/catalog/route-5d43f36641917e5c.js +0 -1
  281. package/.next/static/chunks/app/api/models-config/discover/route-5d43f36641917e5c.js +0 -1
  282. package/.next/static/chunks/app/api/models-config/route-5d43f36641917e5c.js +0 -1
  283. package/.next/static/chunks/app/api/models-config/test/route-5d43f36641917e5c.js +0 -1
  284. package/.next/static/chunks/app/api/plugins/route-5d43f36641917e5c.js +0 -1
  285. package/.next/static/chunks/app/api/project-docs/route-5d43f36641917e5c.js +0 -1
  286. package/.next/static/chunks/app/api/project-trust/route-5d43f36641917e5c.js +0 -1
  287. package/.next/static/chunks/app/api/projects/route-5d43f36641917e5c.js +0 -1
  288. package/.next/static/chunks/app/api/runs/[runId]/prelude/route-5d43f36641917e5c.js +0 -1
  289. package/.next/static/chunks/app/api/runs/[runId]/route-5d43f36641917e5c.js +0 -1
  290. package/.next/static/chunks/app/api/runs/[runId]/turns/route-5d43f36641917e5c.js +0 -1
  291. package/.next/static/chunks/app/api/runs/route-5d43f36641917e5c.js +0 -1
  292. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-5d43f36641917e5c.js +0 -1
  293. package/.next/static/chunks/app/api/sessions/[id]/context/route-5d43f36641917e5c.js +0 -1
  294. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-5d43f36641917e5c.js +0 -1
  295. package/.next/static/chunks/app/api/sessions/[id]/export/route-5d43f36641917e5c.js +0 -1
  296. package/.next/static/chunks/app/api/sessions/[id]/route-5d43f36641917e5c.js +0 -1
  297. package/.next/static/chunks/app/api/sessions/[id]/state/route-5d43f36641917e5c.js +0 -1
  298. package/.next/static/chunks/app/api/sessions/route-5d43f36641917e5c.js +0 -1
  299. package/.next/static/chunks/app/api/sessions/search/route-5d43f36641917e5c.js +0 -1
  300. package/.next/static/chunks/app/api/settings/route-5d43f36641917e5c.js +0 -1
  301. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-5d43f36641917e5c.js +0 -1
  302. package/.next/static/chunks/app/api/skills/check/route-5d43f36641917e5c.js +0 -1
  303. package/.next/static/chunks/app/api/skills/install/route-5d43f36641917e5c.js +0 -1
  304. package/.next/static/chunks/app/api/skills/route-5d43f36641917e5c.js +0 -1
  305. package/.next/static/chunks/app/api/skills/search/route-5d43f36641917e5c.js +0 -1
  306. package/.next/static/chunks/app/api/skills/update/route-5d43f36641917e5c.js +0 -1
  307. package/.next/static/chunks/app/api/subagents/eta/route-5d43f36641917e5c.js +0 -1
  308. package/.next/static/chunks/app/api/theme/route-5d43f36641917e5c.js +0 -1
  309. package/.next/static/chunks/app/api/tool-image/route-5d43f36641917e5c.js +0 -1
  310. package/.next/static/chunks/app/api/update-maintenance/route-5d43f36641917e5c.js +0 -1
  311. package/.next/static/chunks/app/api/updates/route-5d43f36641917e5c.js +0 -1
  312. package/.next/static/chunks/app/api/web-access/recovery/route-5d43f36641917e5c.js +0 -1
  313. package/.next/static/chunks/app/api/web-access/route-5d43f36641917e5c.js +0 -1
  314. package/.next/static/chunks/app/api/web6/consults/route-5d43f36641917e5c.js +0 -1
  315. package/.next/static/chunks/app/api/worktrees/route-5d43f36641917e5c.js +0 -1
  316. package/.next/static/chunks/app/manifest.webmanifest/route-5d43f36641917e5c.js +0 -1
  317. package/.next/static/chunks/next/dist/client/components/builtin/app-error-5d43f36641917e5c.js +0 -1
  318. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5d43f36641917e5c.js +0 -1
  319. package/.next/static/chunks/next/dist/client/components/builtin/not-found-5d43f36641917e5c.js +0 -1
  320. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5d43f36641917e5c.js +0 -1
  321. package/.next/types/app/api/live/interpret/gemini/route.ts +0 -351
  322. /package/.next/static/{LgTSn8ceOcWY1yoxD-zxE → GbGLrHCsszq00qm7I8KWf}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var a={};a.id=123,a.ids=[123],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")},10539:(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(94551),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/git/diff/route",pathname:"/api/git/diff",filename:"route",bundlePath:"app/api/git/diff/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/git/diff/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/git/diff/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")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>z,$:()=>v});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}var m=c(90811);let n=(0,i.promisify)(d.execFile);async function o(a,b,c,d=8388608){let{stdout:e}=await n(a.command,c,{cwd:b,timeout:1e4,maxBuffer:d,env:{...process.env,LC_ALL:"C"}});return e}async function p(a,b){try{return a.toPosix((await o(a,b,["rev-parse","--show-toplevel"])).trim())||null}catch{return null}}function q(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}function r(a){return a.split(h().sep).join("/")}function s(a,b){let c=r(h().relative(a,b));return""===c?".":".."===c||c.startsWith("../")||h().isAbsolute(c)?void 0:`:(literal)${c}`}async function t(a,b,c){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await o(a,b,["status","--porcelain=v1","-z","--untracked-files=all",...c&&"."!==c?["--",c]:[]]))}async function u(a,b,c){if(!c)return{additions:0,deletions:0};try{let d=await o(a,b,["diff","--no-color","--no-ext-diff","--numstat","HEAD","--",c]),e=0,f=0;for(let a of d.split(/\r?\n/)){if(!a)continue;let[b,c]=a.split(" ",2),d=Number(b),g=Number(c);Number.isInteger(d)&&(e+=d),Number.isInteger(g)&&(f+=g)}return{additions:e,deletions:f}}catch{return{additions:0,deletions:0}}}async function v(a){let b=await (0,m.cu)(a),c=await p(b,a);if(!c)return{isGitRepository:!1,repositoryRoot:null,files:[],additions:0,deletions:0};let d=s(c,a),[e,g]=await Promise.all([t(b,c,d),u(b,c,d)]),i=e.flatMap(b=>{let d=h().resolve(c,b.path);return q(a,d)?[{filePath:d,...l(b),indexStatus:b.indexStatus,worktreeStatus:b.worktreeStatus}]:[]}),k=i.reduce((a,b)=>a+("untracked"===b.status?function(a){try{let b=f().lstatSync(a);if(!b.isFile()||b.size>j._4)return 0;let c=f().readFileSync(a);if(w(c)||0===c.length)return 0;let d=c.toString("utf8");return d.endsWith("\n")?d.split("\n").length-1:d.split("\n").length}catch{return 0}}(b.filePath):0),0);return{isGitRepository:!0,repositoryRoot:c,files:i,additions:g.additions+k,deletions:g.deletions}}function w(a){return a.includes(0)}function x(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
1
+ "use strict";(()=>{var a={};a.id=123,a.ids=[123],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>z,$:()=>v});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}var m=c(90811);let n=(0,i.promisify)(d.execFile);async function o(a,b,c,d=8388608){let{stdout:e}=await n(a.command,c,{cwd:b,timeout:1e4,maxBuffer:d,env:{...process.env,LC_ALL:"C"}});return e}async function p(a,b){try{return a.toPosix((await o(a,b,["rev-parse","--show-toplevel"])).trim())||null}catch{return null}}function q(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}function r(a){return a.split(h().sep).join("/")}function s(a,b){let c=r(h().relative(a,b));return""===c?".":".."===c||c.startsWith("../")||h().isAbsolute(c)?void 0:`:(literal)${c}`}async function t(a,b,c){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await o(a,b,["status","--porcelain=v1","-z","--untracked-files=all",...c&&"."!==c?["--",c]:[]]))}async function u(a,b,c){if(!c)return{additions:0,deletions:0};try{let d=await o(a,b,["diff","--no-color","--no-ext-diff","--numstat","HEAD","--",c]),e=0,f=0;for(let a of d.split(/\r?\n/)){if(!a)continue;let[b,c]=a.split(" ",2),d=Number(b),g=Number(c);Number.isInteger(d)&&(e+=d),Number.isInteger(g)&&(f+=g)}return{additions:e,deletions:f}}catch{return{additions:0,deletions:0}}}async function v(a){let b=await (0,m.cu)(a),c=await p(b,a);if(!c)return{isGitRepository:!1,repositoryRoot:null,files:[],additions:0,deletions:0};let d=s(c,a),[e,g]=await Promise.all([t(b,c,d),u(b,c,d)]),i=e.flatMap(b=>{let d=h().resolve(c,b.path);return q(a,d)?[{filePath:d,...l(b),indexStatus:b.indexStatus,worktreeStatus:b.worktreeStatus}]:[]}),k=i.reduce((a,b)=>a+("untracked"===b.status?function(a){try{let b=f().lstatSync(a);if(!b.isFile()||b.size>j._4)return 0;let c=f().readFileSync(a);if(w(c)||0===c.length)return 0;let d=c.toString("utf8");return d.endsWith("\n")?d.split("\n").length-1:d.split("\n").length}catch{return 0}}(b.filePath):0),0);return{isGitRepository:!0,repositoryRoot:c,files:i,additions:g.additions+k,deletions:g.deletions}}function w(a){return a.includes(0)}function x(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
2
2
  new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function y(a,b,c,d){try{return await o(a,b,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...d&&d!==c?[d,c]:[c]],4*j._4)}catch{return null}}async function z(a,b){let c,d,e=await (0,m.cu)(a),g=await p(e,a);if(!g||!q(g,b))return{supported:!1};let i=h().resolve(b),k=r(h().relative(g,i)),n=q(a,i)?s(g,a):void 0,o=(await t(e,g,n)).find(a=>a.path===k);if(!o)return{supported:!1};let{status:u}=l(o);if("deleted"===u){let a=await y(e,g,k,o.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:u,patch:a}:{supported:!1}}try{c=f().lstatSync(i)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let v=f().readFileSync(i);if(w(v))return{supported:!1};let z=v.toString("utf8");if("untracked"===u)d=x(k,z);else{let a=await y(e,g,k,o.originalPath);if(null===a){if("added"!==u)return{supported:!1};d=x(k,z)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:u,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{o:()=>j,x:()=>k});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=h(a)||h(b),d=c?f().win32:f(),e=c?"\\":f().sep,g=d.resolve(a),i=d.resolve(b),j=c?g.toLowerCase():g,k=c?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;return j===k||j.startsWith(l)}function j(a,b){for(let c of b)if(i(a,c))return!0;return!1}function k(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}for(let e=0;e<2;e++)for(let f of b)if(i(a,f)===(0===e))try{if(i(c,(0,d.realpathSync)(f)))return!0}catch{}return!1}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94551:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i});var e=c(23211),f=c(80547),g=c(33012),h=a([f]);async function i(a){try{let b=a.nextUrl.searchParams.get("cwd")?.trim()??"",c=a.nextUrl.searchParams.get("path")?.trim()??"";if(!b||!b.startsWith("/")&&!(0,f.uK)(b))return e.NextResponse.json({error:"cwd must be an absolute path"},{status:400});if(!c||!c.startsWith("/")&&!(0,f.uK)(c))return e.NextResponse.json({error:"path must be an absolute path"},{status:400});let d=await (0,f.mc)();if(!(0,f.A$)(b,d)||!(0,f.A$)(c,d)||!(0,f.B7)(b,d))return e.NextResponse.json({error:"Access denied"},{status:403});return e.NextResponse.json(await (0,g.S)(b,c))}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}f=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5948,402],()=>b(b.s=10539));module.exports=c})();
6
+ ${e}${f}`}async function y(a,b,c,d){try{return await o(a,b,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...d&&d!==c?[d,c]:[c]],4*j._4)}catch{return null}}async function z(a,b){let c,d,e=await (0,m.cu)(a),g=await p(e,a);if(!g||!q(g,b))return{supported:!1};let i=h().resolve(b),k=r(h().relative(g,i)),n=q(a,i)?s(g,a):void 0,o=(await t(e,g,n)).find(a=>a.path===k);if(!o)return{supported:!1};let{status:u}=l(o);if("deleted"===u){let a=await y(e,g,k,o.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:u,patch:a}:{supported:!1}}try{c=f().lstatSync(i)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let v=f().readFileSync(i);if(w(v))return{supported:!1};let z=v.toString("utf8");if("untracked"===u)d=x(k,z);else{let a=await y(e,g,k,o.originalPath);if(null===a){if("added"!==u)return{supported:!1};d=x(k,z)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:u,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},68339:(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(94551),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/git/diff/route",pathname:"/api/git/diff",filename:"route",bundlePath:"app/api/git/diff/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/git/diff/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/git/diff/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)}})},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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{o:()=>j,x:()=>k});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=h(a)||h(b),d=c?f().win32:f(),e=c?"\\":f().sep,g=d.resolve(a),i=d.resolve(b),j=c?g.toLowerCase():g,k=c?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;return j===k||j.startsWith(l)}function j(a,b){for(let c of b)if(i(a,c))return!0;return!1}function k(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}for(let e=0;e<2;e++)for(let f of b)if(i(a,f)===(0===e))try{if(i(c,(0,d.realpathSync)(f)))return!0}catch{}return!1}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94551:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i});var e=c(23211),f=c(80547),g=c(33012),h=a([f]);async function i(a){try{let b=a.nextUrl.searchParams.get("cwd")?.trim()??"",c=a.nextUrl.searchParams.get("path")?.trim()??"";if(!b||!b.startsWith("/")&&!(0,f.uK)(b))return e.NextResponse.json({error:"cwd must be an absolute path"},{status:400});if(!c||!c.startsWith("/")&&!(0,f.uK)(c))return e.NextResponse.json({error:"path must be an absolute path"},{status:400});let d=await (0,f.mc)();if(!(0,f.A$)(b,d)||!(0,f.A$)(c,d)||!(0,f.B7)(b,d))return e.NextResponse.json({error:"Access denied"},{status:403});return e.NextResponse.json(await (0,g.S)(b,c))}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}f=(h.then?(await h)():h)[0],d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5948,402],()=>b(b.s=68339));module.exports=c})();
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var a={};a.id=3507,a.ids=[3507],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},26649:(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(83518),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/git/status/route",pathname:"/api/git/status",filename:"route",bundlePath:"app/api/git/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/git/status/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/git/status/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")},33012:(a,b,c)=>{c.d(b,{S:()=>z,$:()=>v});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}var m=c(90811);let n=(0,i.promisify)(d.execFile);async function o(a,b,c,d=8388608){let{stdout:e}=await n(a.command,c,{cwd:b,timeout:1e4,maxBuffer:d,env:{...process.env,LC_ALL:"C"}});return e}async function p(a,b){try{return a.toPosix((await o(a,b,["rev-parse","--show-toplevel"])).trim())||null}catch{return null}}function q(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}function r(a){return a.split(h().sep).join("/")}function s(a,b){let c=r(h().relative(a,b));return""===c?".":".."===c||c.startsWith("../")||h().isAbsolute(c)?void 0:`:(literal)${c}`}async function t(a,b,c){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await o(a,b,["status","--porcelain=v1","-z","--untracked-files=all",...c&&"."!==c?["--",c]:[]]))}async function u(a,b,c){if(!c)return{additions:0,deletions:0};try{let d=await o(a,b,["diff","--no-color","--no-ext-diff","--numstat","HEAD","--",c]),e=0,f=0;for(let a of d.split(/\r?\n/)){if(!a)continue;let[b,c]=a.split(" ",2),d=Number(b),g=Number(c);Number.isInteger(d)&&(e+=d),Number.isInteger(g)&&(f+=g)}return{additions:e,deletions:f}}catch{return{additions:0,deletions:0}}}async function v(a){let b=await (0,m.cu)(a),c=await p(b,a);if(!c)return{isGitRepository:!1,repositoryRoot:null,files:[],additions:0,deletions:0};let d=s(c,a),[e,g]=await Promise.all([t(b,c,d),u(b,c,d)]),i=e.flatMap(b=>{let d=h().resolve(c,b.path);return q(a,d)?[{filePath:d,...l(b),indexStatus:b.indexStatus,worktreeStatus:b.worktreeStatus}]:[]}),k=i.reduce((a,b)=>a+("untracked"===b.status?function(a){try{let b=f().lstatSync(a);if(!b.isFile()||b.size>j._4)return 0;let c=f().readFileSync(a);if(w(c)||0===c.length)return 0;let d=c.toString("utf8");return d.endsWith("\n")?d.split("\n").length-1:d.split("\n").length}catch{return 0}}(b.filePath):0),0);return{isGitRepository:!0,repositoryRoot:c,files:i,additions:g.additions+k,deletions:g.deletions}}function w(a){return a.includes(0)}function x(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
1
+ "use strict";(()=>{var a={};a.id=3507,a.ids=[3507],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},813:(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(83518),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/git/status/route",pathname:"/api/git/status",filename:"route",bundlePath:"app/api/git/status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/git/status/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/git/status/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)}})},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33012:(a,b,c)=>{c.d(b,{S:()=>z,$:()=>v});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(28354),j=c(1060);let k=new Set(["DD","AU","UD","UA","DU","AA","UU"]);function l(a){let b=`${a.indexStatus}${a.worktreeStatus}`;return"??"===b?{status:"untracked",code:"U"}:k.has(b)||b.includes("U")?{status:"conflict",code:"C"}:b.includes("D")?{status:"deleted",code:"D"}:b.includes("R")||b.includes("C")?{status:"renamed",code:"R"}:b.includes("A")?{status:"added",code:"A"}:{status:"modified",code:"M"}}var m=c(90811);let n=(0,i.promisify)(d.execFile);async function o(a,b,c,d=8388608){let{stdout:e}=await n(a.command,c,{cwd:b,timeout:1e4,maxBuffer:d,env:{...process.env,LC_ALL:"C"}});return e}async function p(a,b){try{return a.toPosix((await o(a,b,["rev-parse","--show-toplevel"])).trim())||null}catch{return null}}function q(a,b){let c=h().relative(h().resolve(a),h().resolve(b));return""===c||!c.startsWith(`..${h().sep}`)&&".."!==c&&!h().isAbsolute(c)}function r(a){return a.split(h().sep).join("/")}function s(a,b){let c=r(h().relative(a,b));return""===c?".":".."===c||c.startsWith("../")||h().isAbsolute(c)?void 0:`:(literal)${c}`}async function t(a,b,c){return function(a){let b=a.split("\0"),c=[];for(let a=0;a<b.length;a++){let d=b[a];if(!d||d.length<4||" "!==d[2])continue;let e=d[0],f=d[1],g={path:d.slice(3),indexStatus:e,worktreeStatus:f};("R"===e||"C"===e||"R"===f||"C"===f)&&(g.originalPath=b[++a]||void 0),c.push(g)}return c}(await o(a,b,["status","--porcelain=v1","-z","--untracked-files=all",...c&&"."!==c?["--",c]:[]]))}async function u(a,b,c){if(!c)return{additions:0,deletions:0};try{let d=await o(a,b,["diff","--no-color","--no-ext-diff","--numstat","HEAD","--",c]),e=0,f=0;for(let a of d.split(/\r?\n/)){if(!a)continue;let[b,c]=a.split(" ",2),d=Number(b),g=Number(c);Number.isInteger(d)&&(e+=d),Number.isInteger(g)&&(f+=g)}return{additions:e,deletions:f}}catch{return{additions:0,deletions:0}}}async function v(a){let b=await (0,m.cu)(a),c=await p(b,a);if(!c)return{isGitRepository:!1,repositoryRoot:null,files:[],additions:0,deletions:0};let d=s(c,a),[e,g]=await Promise.all([t(b,c,d),u(b,c,d)]),i=e.flatMap(b=>{let d=h().resolve(c,b.path);return q(a,d)?[{filePath:d,...l(b),indexStatus:b.indexStatus,worktreeStatus:b.worktreeStatus}]:[]}),k=i.reduce((a,b)=>a+("untracked"===b.status?function(a){try{let b=f().lstatSync(a);if(!b.isFile()||b.size>j._4)return 0;let c=f().readFileSync(a);if(w(c)||0===c.length)return 0;let d=c.toString("utf8");return d.endsWith("\n")?d.split("\n").length-1:d.split("\n").length}catch{return 0}}(b.filePath):0),0);return{isGitRepository:!0,repositoryRoot:c,files:i,additions:g.additions+k,deletions:g.deletions}}function w(a){return a.includes(0)}function x(a,b){let c=b.endsWith("\n"),d=b.split("\n");c&&d.pop();let e=d.map(a=>`+${a}`).join("\n"),f=!c&&d.length>0?"\n\":"";return`diff --git a/${a} b/${a}
2
2
  new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function y(a,b,c,d){try{return await o(a,b,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...d&&d!==c?[d,c]:[c]],4*j._4)}catch{return null}}async function z(a,b){let c,d,e=await (0,m.cu)(a),g=await p(e,a);if(!g||!q(g,b))return{supported:!1};let i=h().resolve(b),k=r(h().relative(g,i)),n=q(a,i)?s(g,a):void 0,o=(await t(e,g,n)).find(a=>a.path===k);if(!o)return{supported:!1};let{status:u}=l(o);if("deleted"===u){let a=await y(e,g,k,o.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:u,patch:a}:{supported:!1}}try{c=f().lstatSync(i)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let v=f().readFileSync(i);if(w(v))return{supported:!1};let z=v.toString("utf8");if("untracked"===u)d=x(k,z);else{let a=await y(e,g,k,o.originalPath);if(null===a){if("added"!==u)return{supported:!1};d=x(k,z)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:u,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{o:()=>j,x:()=>k});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=h(a)||h(b),d=c?f().win32:f(),e=c?"\\":f().sep,g=d.resolve(a),i=d.resolve(b),j=c?g.toLowerCase():g,k=c?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;return j===k||j.startsWith(l)}function j(a,b){for(let c of b)if(i(a,c))return!0;return!1}function k(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}for(let e=0;e<2;e++)for(let f of b)if(i(a,f)===(0===e))try{if(i(c,(0,d.realpathSync)(f)))return!0}catch{}return!1}},83518:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(29021),f=c.n(e),g=c(23211),h=c(80547),i=c(33012),j=a([h]);async function k(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,h.uK)(c))return g.NextResponse.json({error:"cwd must be an absolute path"},{status:400});let d=await (0,h.mc)();if(!(0,h.A$)(c,d))return g.NextResponse.json({error:"Access denied"},{status:403});try{b=f().statSync(c)}catch{return g.NextResponse.json({error:"Directory not found"},{status:404})}if(!b.isDirectory())return g.NextResponse.json({error:"Not a directory"},{status:400});if(!(0,h.B7)(c,d))return g.NextResponse.json({error:"Access denied"},{status:403});return g.NextResponse.json(await (0,i.$)(c))}catch(a){return g.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},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,5948,402],()=>b(b.s=26649));module.exports=c})();
6
+ ${e}${f}`}async function y(a,b,c,d){try{return await o(a,b,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...d&&d!==c?[d,c]:[c]],4*j._4)}catch{return null}}async function z(a,b){let c,d,e=await (0,m.cu)(a),g=await p(e,a);if(!g||!q(g,b))return{supported:!1};let i=h().resolve(b),k=r(h().relative(g,i)),n=q(a,i)?s(g,a):void 0,o=(await t(e,g,n)).find(a=>a.path===k);if(!o)return{supported:!1};let{status:u}=l(o);if("deleted"===u){let a=await y(e,g,k,o.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:u,patch:a}:{supported:!1}}try{c=f().lstatSync(i)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let v=f().readFileSync(i);if(w(v))return{supported:!1};let z=v.toString("utf8");if("untracked"===u)d=x(k,z);else{let a=await y(e,g,k,o.originalPath);if(null===a){if("added"!==u)return{supported:!1};d=x(k,z)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:u,patch:d}:{supported:!1}}},33873:a=>{a.exports=require("path")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{o:()=>j,x:()=>k});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=h(a)||h(b),d=c?f().win32:f(),e=c?"\\":f().sep,g=d.resolve(a),i=d.resolve(b),j=c?g.toLowerCase():g,k=c?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;return j===k||j.startsWith(l)}function j(a,b){for(let c of b)if(i(a,c))return!0;return!1}function k(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}for(let e=0;e<2;e++)for(let f of b)if(i(a,f)===(0===e))try{if(i(c,(0,d.realpathSync)(f)))return!0}catch{}return!1}},83518:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(29021),f=c.n(e),g=c(23211),h=c(80547),i=c(33012),j=a([h]);async function k(a){try{let b,c=a.nextUrl.searchParams.get("cwd")?.trim()??"";if(!c||!c.startsWith("/")&&!(0,h.uK)(c))return g.NextResponse.json({error:"cwd must be an absolute path"},{status:400});let d=await (0,h.mc)();if(!(0,h.A$)(c,d))return g.NextResponse.json({error:"Access denied"},{status:403});try{b=f().statSync(c)}catch{return g.NextResponse.json({error:"Directory not found"},{status:404})}if(!b.isDirectory())return g.NextResponse.json({error:"Not a directory"},{status:400});if(!(0,h.B7)(c,d))return g.NextResponse.json({error:"Access denied"},{status:403});return g.NextResponse.json(await (0,i.$)(c))}catch(a){return g.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},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,5948,402],()=>b(b.s=813));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8344,a.ids=[8344],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94468:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>S,patchFetch:()=>R,routeModule:()=>N,serverHooks:()=>Q,workAsyncStorage:()=>O,workUnitAsyncStorage:()=>P});var d={};c.r(d),c.d(d,{GET:()=>L,POST:()=>M,dynamic:()=>J});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31421),x=c(51455),y=c(76760);let z=(0,require("node:util").promisify)(w.execFile);class A extends Error{constructor(a,b){super(a),this.status=b}}let B=globalThis;function C(){let a=process.env.CUELO_GITHUB_WORKSPACE?.trim();if(!a)throw new A("GitHub projects are not enabled on this instance.",404);if(!(0,y.isAbsolute)(a))throw new A("CUELO_GITHUB_WORKSPACE must be an absolute directory.",500);return a}function D(a){let b=a.trim();if(b.startsWith("https://")){let a;try{a=new URL(b)}catch{throw new A("Enter a valid GitHub HTTPS repository URL.",400)}if("github.com"!==a.hostname||a.port||a.username||a.password||a.search||a.hash)throw new A("Use a GitHub repository URL without credentials or query parameters.",400);b=a.pathname.replace(/^\//,"").replace(/\/$/,"")}let c=(b=b.replace(/\.git$/,"")).split("/");if(2!==c.length||!/^[a-zA-Z0-9][a-zA-Z0-9-]{0,38}$/.test(c[0])||!/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,99}$/.test(c[1]))throw new A("Enter OWNER/REPO or https://github.com/OWNER/REPO.",400);return b}async function E(a,b,c,d=3e4){let{stdout:e}=await z(a,b,{cwd:c,timeout:d,maxBuffer:8388608,env:{...process.env,GIT_TERMINAL_PROMPT:"0",GH_PROMPT_DISABLED:"1"}});return e.trim()}async function F(){C();let a=null;try{a=await E("gh",["api","user","--jq",".login"])}catch(a){if("ENOENT"===a.code)throw new A("GitHub CLI is not installed on the server.",503);try{await E("gh",["auth","status","--hostname","github.com"])}catch{return{connected:!1,login:null,device:B.__cueloGithubLogin?.view??null}}throw new A("GitHub could not be reached. Try again after checking the server connection.",502)}return{connected:!0,login:a,device:B.__cueloGithubLogin?.view??null}}async function G(){C();try{let a=await E("gh",["api","--paginate","user/repos?per_page=100&sort=pushed&affiliation=owner,collaborator,organization_member","--jq",".[] | {fullName:.full_name,description:.description,private:.private,url:.html_url}"]);return a?a.split("\n").map(a=>JSON.parse(a)):[]}catch{throw new A("Could not load repositories. Check GitHub sign-in and try again.",502)}}async function H(a){let b,c=C();await (0,x.mkdir)(c,{recursive:!0});let d=await (0,x.realpath)(c),[e,f]=a.toLowerCase().split("/"),g=(0,y.join)(d,e);await (0,x.mkdir)(g,{recursive:!0});let h=await (0,x.realpath)(g),i=(0,y.relative)(d,h);if(i.startsWith("..")||(0,y.isAbsolute)(i))throw new A("Repository directory escapes the cloud workspace.",400);let j=(0,y.join)(h,f);try{b=await (0,x.lstat)(j)}catch(a){if("ENOENT"!==a.code)throw a}if(b){if(!b.isDirectory()||b.isSymbolicLink())throw new A("That workspace path is already used by another file.",409);try{let b=await E("git",["remote","get-url","origin"],j);if(D(b).toLowerCase()!==a.toLowerCase())throw Error("different origin");let c=await E("git",["rev-parse","--show-toplevel"],j);if(await (0,x.realpath)(c)!==await (0,x.realpath)(j))throw Error("not a repository root");return j}catch{throw new A("A different repository already occupies that folder. Open it as a server folder instead.",409)}}let k=await (0,x.mkdtemp)((0,y.join)(h,".cuelo-clone-"));try{return await E("git",["-c","core.hooksPath=/dev/null","clone","--",`https://github.com/${a}.git`,k],void 0,18e4),await (0,x.rename)(k,j),j}catch{throw new A("Could not import the repository. Check its name and your GitHub access, then try again.",502)}finally{await (0,x.rm)(k,{recursive:!0,force:!0})}}async function I(a){let b=C(),c=D(a),d=`${b}\0${c.toLowerCase()}`,e=B.__cueloGithubClones??=new Map,f=e.get(d);return f||(f=H(c),e.set(d,f),f.finally(()=>e.delete(d)).catch(()=>{})),f}let J="force-dynamic";function K(a){return v.NextResponse.json({error:a instanceof A?a.message:"GitHub workspace operation failed."},{status:a instanceof A?a.status:500})}async function L(a){try{if(C(),"repositories"===new URL(a.url).searchParams.get("view"))return v.NextResponse.json({repositories:await G()});return v.NextResponse.json(await F())}catch(a){return K(a)}}async function M(a){try{let b;C();try{b=await a.json()}catch{return v.NextResponse.json({error:"Expected a JSON request."},{status:400})}if(!b||"object"!=typeof b||Array.isArray(b))return v.NextResponse.json({error:"Expected a JSON object."},{status:400});if("login"===b.action)return v.NextResponse.json({device:function(){C();let a=B.__cueloGithubLogin;if(a?.view.state==="pending"&&a.view.expiresAt>Date.now())return a.view;let b={state:"pending",expiresAt:Date.now()+9e5},c=(0,w.spawn)("gh",["auth","login","--hostname","github.com","--git-protocol","https","--web"],{env:{...process.env,GH_PROMPT_DISABLED:"1",GH_BROWSER:"true",BROWSER:"true",NO_COLOR:"1",LC_ALL:"C"},stdio:["pipe","pipe","pipe"]});B.__cueloGithubLogin={child:c,view:b};let d="",e=a=>{d=(d+a.toString()).slice(-4096);let e=d.match(/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i)?.[1];e&&!b.code&&(b.code=e,c.stdin?.write("\n"))};c.stdout?.on("data",e),c.stderr?.on("data",e);let f=setTimeout(()=>{b.state="error",b.error="GitHub sign-in expired. Start again.",c.kill()},9e5);return f.unref(),c.on("error",()=>{clearTimeout(f),b.state="error",b.error="Could not start GitHub CLI sign-in."}),c.on("close",async a=>{if(clearTimeout(f),"error"!==b.state){if(0!==a){b.state="error",b.error="GitHub sign-in did not complete. Try again.";return}try{await E("gh",["auth","setup-git","--hostname","github.com"]),b.state="complete"}catch{b.state="error",b.error="Signed in, but Git credential setup failed."}}}),b}()},{status:202});if("open"===b.action&&"string"==typeof b.repository)return v.NextResponse.json({cwd:await I(b.repository)});return v.NextResponse.json({error:"Choose login or open with a GitHub repository."},{status:400})}catch(a){return K(a)}}let N=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/github/projects/route",pathname:"/api/github/projects",filename:"route",bundlePath:"app/api/github/projects/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/github/projects/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:O,workUnitAsyncStorage:P,serverHooks:Q}=N;function R(){return(0,g.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:P})}async function S(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),N.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/github/projects/route";"/index"===d&&(d="/");let e=await N.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:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||N.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===N.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await N.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>N.onRequestError(a,b,d,e,B)},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=>N.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&&C&&D&&!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(!I)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 N.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await N.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!I)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",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&I||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 N.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=94468));module.exports=c})();
1
+ (()=>{var a={};a.id=8344,a.ids=[8344],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19719:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>S,patchFetch:()=>R,routeModule:()=>N,serverHooks:()=>Q,workAsyncStorage:()=>O,workUnitAsyncStorage:()=>P});var d={};c.r(d),c.d(d,{GET:()=>L,POST:()=>M,dynamic:()=>J});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31421),x=c(51455),y=c(76760);let z=(0,require("node:util").promisify)(w.execFile);class A extends Error{constructor(a,b){super(a),this.status=b}}let B=globalThis;function C(){let a=process.env.CUELO_GITHUB_WORKSPACE?.trim();if(!a)throw new A("GitHub projects are not enabled on this instance.",404);if(!(0,y.isAbsolute)(a))throw new A("CUELO_GITHUB_WORKSPACE must be an absolute directory.",500);return a}function D(a){let b=a.trim();if(b.startsWith("https://")){let a;try{a=new URL(b)}catch{throw new A("Enter a valid GitHub HTTPS repository URL.",400)}if("github.com"!==a.hostname||a.port||a.username||a.password||a.search||a.hash)throw new A("Use a GitHub repository URL without credentials or query parameters.",400);b=a.pathname.replace(/^\//,"").replace(/\/$/,"")}let c=(b=b.replace(/\.git$/,"")).split("/");if(2!==c.length||!/^[a-zA-Z0-9][a-zA-Z0-9-]{0,38}$/.test(c[0])||!/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,99}$/.test(c[1]))throw new A("Enter OWNER/REPO or https://github.com/OWNER/REPO.",400);return b}async function E(a,b,c,d=3e4){let{stdout:e}=await z(a,b,{cwd:c,timeout:d,maxBuffer:8388608,env:{...process.env,GIT_TERMINAL_PROMPT:"0",GH_PROMPT_DISABLED:"1"}});return e.trim()}async function F(){C();let a=null;try{a=await E("gh",["api","user","--jq",".login"])}catch(a){if("ENOENT"===a.code)throw new A("GitHub CLI is not installed on the server.",503);try{await E("gh",["auth","status","--hostname","github.com"])}catch{return{connected:!1,login:null,device:B.__cueloGithubLogin?.view??null}}throw new A("GitHub could not be reached. Try again after checking the server connection.",502)}return{connected:!0,login:a,device:B.__cueloGithubLogin?.view??null}}async function G(){C();try{let a=await E("gh",["api","--paginate","user/repos?per_page=100&sort=pushed&affiliation=owner,collaborator,organization_member","--jq",".[] | {fullName:.full_name,description:.description,private:.private,url:.html_url}"]);return a?a.split("\n").map(a=>JSON.parse(a)):[]}catch{throw new A("Could not load repositories. Check GitHub sign-in and try again.",502)}}async function H(a){let b,c=C();await (0,x.mkdir)(c,{recursive:!0});let d=await (0,x.realpath)(c),[e,f]=a.toLowerCase().split("/"),g=(0,y.join)(d,e);await (0,x.mkdir)(g,{recursive:!0});let h=await (0,x.realpath)(g),i=(0,y.relative)(d,h);if(i.startsWith("..")||(0,y.isAbsolute)(i))throw new A("Repository directory escapes the cloud workspace.",400);let j=(0,y.join)(h,f);try{b=await (0,x.lstat)(j)}catch(a){if("ENOENT"!==a.code)throw a}if(b){if(!b.isDirectory()||b.isSymbolicLink())throw new A("That workspace path is already used by another file.",409);try{let b=await E("git",["remote","get-url","origin"],j);if(D(b).toLowerCase()!==a.toLowerCase())throw Error("different origin");let c=await E("git",["rev-parse","--show-toplevel"],j);if(await (0,x.realpath)(c)!==await (0,x.realpath)(j))throw Error("not a repository root");return j}catch{throw new A("A different repository already occupies that folder. Open it as a server folder instead.",409)}}let k=await (0,x.mkdtemp)((0,y.join)(h,".cuelo-clone-"));try{return await E("git",["-c","core.hooksPath=/dev/null","clone","--",`https://github.com/${a}.git`,k],void 0,18e4),await (0,x.rename)(k,j),j}catch{throw new A("Could not import the repository. Check its name and your GitHub access, then try again.",502)}finally{await (0,x.rm)(k,{recursive:!0,force:!0})}}async function I(a){let b=C(),c=D(a),d=`${b}\0${c.toLowerCase()}`,e=B.__cueloGithubClones??=new Map,f=e.get(d);return f||(f=H(c),e.set(d,f),f.finally(()=>e.delete(d)).catch(()=>{})),f}let J="force-dynamic";function K(a){return v.NextResponse.json({error:a instanceof A?a.message:"GitHub workspace operation failed."},{status:a instanceof A?a.status:500})}async function L(a){try{if(C(),"repositories"===new URL(a.url).searchParams.get("view"))return v.NextResponse.json({repositories:await G()});return v.NextResponse.json(await F())}catch(a){return K(a)}}async function M(a){try{let b;C();try{b=await a.json()}catch{return v.NextResponse.json({error:"Expected a JSON request."},{status:400})}if(!b||"object"!=typeof b||Array.isArray(b))return v.NextResponse.json({error:"Expected a JSON object."},{status:400});if("login"===b.action)return v.NextResponse.json({device:function(){C();let a=B.__cueloGithubLogin;if(a?.view.state==="pending"&&a.view.expiresAt>Date.now())return a.view;let b={state:"pending",expiresAt:Date.now()+9e5},c=(0,w.spawn)("gh",["auth","login","--hostname","github.com","--git-protocol","https","--web"],{env:{...process.env,GH_PROMPT_DISABLED:"1",GH_BROWSER:"true",BROWSER:"true",NO_COLOR:"1",LC_ALL:"C"},stdio:["pipe","pipe","pipe"]});B.__cueloGithubLogin={child:c,view:b};let d="",e=a=>{d=(d+a.toString()).slice(-4096);let e=d.match(/one-time code:\s*([A-Z0-9]{4}-[A-Z0-9]{4})/i)?.[1];e&&!b.code&&(b.code=e,c.stdin?.write("\n"))};c.stdout?.on("data",e),c.stderr?.on("data",e);let f=setTimeout(()=>{b.state="error",b.error="GitHub sign-in expired. Start again.",c.kill()},9e5);return f.unref(),c.on("error",()=>{clearTimeout(f),b.state="error",b.error="Could not start GitHub CLI sign-in."}),c.on("close",async a=>{if(clearTimeout(f),"error"!==b.state){if(0!==a){b.state="error",b.error="GitHub sign-in did not complete. Try again.";return}try{await E("gh",["auth","setup-git","--hostname","github.com"]),b.state="complete"}catch{b.state="error",b.error="Signed in, but Git credential setup failed."}}}),b}()},{status:202});if("open"===b.action&&"string"==typeof b.repository)return v.NextResponse.json({cwd:await I(b.repository)});return v.NextResponse.json({error:"Choose login or open with a GitHub repository."},{status:400})}catch(a){return K(a)}}let N=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/github/projects/route",pathname:"/api/github/projects",filename:"route",bundlePath:"app/api/github/projects/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/github/projects/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:O,workUnitAsyncStorage:P,serverHooks:Q}=N;function R(){return(0,g.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:P})}async function S(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),N.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/github/projects/route";"/index"===d&&(d="/");let e=await N.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:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||N.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===N.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==B?void 0:B.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await N.getIncrementalCache(a,x,A,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>N.onRequestError(a,b,d,e,B)},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=>N.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&&C&&D&&!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(!I)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 N.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await N.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!I)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",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&I||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 N.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=19719));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=69,a.ids=[69],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},20012:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>p,GET:()=>o,POST:()=>n,dynamic:()=>q});var e=c(23211),f=c(73024),g=c(80547),h=c(56429),i=c(40402),j=c(66544),k=c(94997),l=a([g,h,i,k]);[g,h,i,k]=l.then?(await l)():l;let q="force-dynamic";function m(a){return a.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase()}async function n(a){let b=(0,k.yK)(a);if(b)return b;if(!(0,j.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd.trim():"",d="string"==typeof b.sessionId?b.sessionId.trim():"";if(!c)return e.NextResponse.json({error:"cwd is required",code:"invalid_argument"},{status:400});if(!d)return e.NextResponse.json({error:"sessionId is required",code:"invalid_argument"},{status:400});if(!(0,f.existsSync)(c))return e.NextResponse.json({error:"Folder not found",code:"invalid_argument"},{status:400});if(!(0,g.B7)(c,await (0,g.mc)()))return e.NextResponse.json({error:"Access denied",code:"invalid_argument"},{status:403});let j=(0,h.A4)(d);if(j?.isAlive()){if(m(j.cwd)!==m(c))return e.NextResponse.json({error:`세션 ${d}의 작업폴더는 ${j.cwd}입니다. 그 폴더로 다시 발급하세요.`,code:"cwd_mismatch"},{status:409})}else if(!await (0,i.os)(d))return e.NextResponse.json({error:`세션 ${d}를 찾을 수 없습니다.`,code:"session_not_found"},{status:404});let l=(0,k.X_)().issueHandle({cwd:c,sessionId:d,..."string"==typeof b.instruction?{instruction:b.instruction}:{},...void 0===b.ttlMinutes?{}:{ttlMinutes:b.ttlMinutes}});return await (0,k.ai)(l.sessionId,l.handle,l.expiresAt),e.NextResponse.json({handle:l.handle,cwd:l.cwd,sessionId:l.sessionId,createdAt:l.createdAt,expiresAt:l.expiresAt,startSentence:l.startSentence,handleKey:l.handleKey,...null===l.token?{}:{token:l.token}})}catch(a){return(0,k.Ni)(a)}}async function o(a){let b=(0,k.yK)(a);if(b)return b;try{let{handles:a,tokenPresent:b}=(0,k.X_)().listHandles();return e.NextResponse.json({handles:a.map(a=>({handle:a.handle,cwd:a.cwd,sessionId:a.sessionId,createdAt:a.createdAt,expiresAt:a.expiresAt,revokedAt:a.revokedAt,status:a.status})),tokenPresent:b})}catch(a){return(0,k.Ni)(a)}}async function p(a){let b=(0,k.yK)(a);if(b)return b;try{let b=new URL(a.url).searchParams.get("handle")??"";return e.NextResponse.json((0,k.X_)().revokeHandle(b))}catch(a){return(0,k.Ni)(a)}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},56145:(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(20012),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/handles/route",pathname:"/api/gpt6/handles",filename:"route",bundlePath:"app/api/gpt6/handles/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/handles/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/gpt6/handles/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)}})},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},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,5948,402,3229,2240,6429],()=>b(b.s=56145));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=69,a.ids=[69],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},20012:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>p,GET:()=>o,POST:()=>n,dynamic:()=>q});var e=c(23211),f=c(73024),g=c(80547),h=c(56429),i=c(40402),j=c(66544),k=c(94997),l=a([g,h,i,k]);[g,h,i,k]=l.then?(await l)():l;let q="force-dynamic";function m(a){return a.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase()}async function n(a){let b=(0,k.yK)(a);if(b)return b;if(!(0,j.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd.trim():"",d="string"==typeof b.sessionId?b.sessionId.trim():"";if(!c)return e.NextResponse.json({error:"cwd is required",code:"invalid_argument"},{status:400});if(!d)return e.NextResponse.json({error:"sessionId is required",code:"invalid_argument"},{status:400});if(!(0,f.existsSync)(c))return e.NextResponse.json({error:"Folder not found",code:"invalid_argument"},{status:400});if(!(0,g.B7)(c,await (0,g.mc)()))return e.NextResponse.json({error:"Access denied",code:"invalid_argument"},{status:403});let j=(0,h.A4)(d);if(j?.isAlive()){if(m(j.cwd)!==m(c))return e.NextResponse.json({error:`세션 ${d}의 작업폴더는 ${j.cwd}입니다. 그 폴더로 다시 발급하세요.`,code:"cwd_mismatch"},{status:409})}else if(!await (0,i.os)(d))return e.NextResponse.json({error:`세션 ${d}를 찾을 수 없습니다.`,code:"session_not_found"},{status:404});let l=(0,k.X_)().issueHandle({cwd:c,sessionId:d,..."string"==typeof b.instruction?{instruction:b.instruction}:{},...void 0===b.ttlMinutes?{}:{ttlMinutes:b.ttlMinutes}});return await (0,k.ai)(l.sessionId,l.handle,l.expiresAt),e.NextResponse.json({handle:l.handle,cwd:l.cwd,sessionId:l.sessionId,createdAt:l.createdAt,expiresAt:l.expiresAt,startSentence:l.startSentence,handleKey:l.handleKey,...null===l.token?{}:{token:l.token}})}catch(a){return(0,k.Ni)(a)}}async function o(a){let b=(0,k.yK)(a);if(b)return b;try{let{handles:a,tokenPresent:b}=(0,k.X_)().listHandles();return e.NextResponse.json({handles:a.map(a=>({handle:a.handle,cwd:a.cwd,sessionId:a.sessionId,createdAt:a.createdAt,expiresAt:a.expiresAt,revokedAt:a.revokedAt,status:a.status})),tokenPresent:b})}catch(a){return(0,k.Ni)(a)}}async function p(a){let b=(0,k.yK)(a);if(b)return b;try{let b=new URL(a.url).searchParams.get("handle")??"";return e.NextResponse.json((0,k.X_)().revokeHandle(b))}catch(a){return(0,k.Ni)(a)}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},35589:(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(20012),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/handles/route",pathname:"/api/gpt6/handles",filename:"route",bundlePath:"app/api/gpt6/handles/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/handles/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/gpt6/handles/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)}})},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(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")},79748:a=>{a.exports=require("fs/promises")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,Ph:()=>r,mU:()=>s,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 t=/^[a-zA-Z]:[\\/]/;function m(a){return t.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)}function q(a){return"string"==typeof a?.windows&&t.test(a.windows)&&"string"==typeof a.local&&h().posix.isAbsolute(a.local)}function r(a=(0,k.$M)()){let b=globalThis.__cueloLegacyPathMaps??=new Map,c=b.get(a);if(c)return c;let d=[];try{let b=JSON.parse((0,e.readFileSync)(h().join(a,"cuelo-legacy-paths.json"),"utf8"));Array.isArray(b?.prefixes)&&(d=b.prefixes.filter(q))}catch{}return b.set(a,d),d}function s(a,b){if(!b.length||!t.test(a))return a;let c=a=>h().win32.normalize(a).split("\\").filter(Boolean),d=c(a),e=d.map(a=>a.toLowerCase()),f=null;for(let a of b){let b=c(a.windows).map(a=>a.toLowerCase());b.length>e.length||f&&b.length<=f.length||b.every((a,b)=>a===e[b])&&(f={length:b.length,local:a.local})}return f?h().posix.join(f.local,...d.slice(f.length)):a}d()}catch(a){d(a)}})},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},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,5948,402,3229,2240,6429],()=>b(b.s=35589));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=9640,a.ids=[9640],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},42931:(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(71399),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/reply/route",pathname:"/api/gpt6/reply",filename:"route",bundlePath:"app/api/gpt6/reply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/reply/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/gpt6/reply/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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},71399:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h,dynamic:()=>i});var e=c(23211),f=c(94997),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(a){let b,c=(0,f.X_)(),d=(0,f.ud)(a);if(!c.acceptsToken(d))return e.NextResponse.json({error:"Unauthorized",code:"invalid_token"},{status:401});try{b=await a.json()}catch{return e.NextResponse.json({error:"JSON 본문을 해석할 수 없습니다.",code:"invalid_argument"},{status:400})}let g=b&&"object"==typeof b&&!Array.isArray(b)?b:{};try{return e.NextResponse.json(await c.publishReply(g))}catch(a){return(0,f.Ni)(a)}}d()}catch(a){d(a)}})},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")},79748:a=>{a.exports=require("fs/promises")},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},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,5948,402,3229,2240,6429],()=>b(b.s=42931));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=9640,a.ids=[9640],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},26907:(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(71399),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/reply/route",pathname:"/api/gpt6/reply",filename:"route",bundlePath:"app/api/gpt6/reply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/reply/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/gpt6/reply/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)}})},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},71399:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h,dynamic:()=>i});var e=c(23211),f=c(94997),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(a){let b,c=(0,f.X_)(),d=(0,f.ud)(a);if(!c.acceptsToken(d))return e.NextResponse.json({error:"Unauthorized",code:"invalid_token"},{status:401});try{b=await a.json()}catch{return e.NextResponse.json({error:"JSON 본문을 해석할 수 없습니다.",code:"invalid_argument"},{status:400})}let g=b&&"object"==typeof b&&!Array.isArray(b)?b:{};try{return e.NextResponse.json(await c.publishReply(g))}catch(a){return(0,f.Ni)(a)}}d()}catch(a){d(a)}})},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")},79748:a=>{a.exports=require("fs/promises")},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},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,5948,402,3229,2240,6429],()=>b(b.s=26907));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=8135,a.ids=[8135],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},58409:(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(67706),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/token/route",pathname:"/api/gpt6/token",filename:"route",bundlePath:"app/api/gpt6/token/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/token/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/gpt6/token/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)}})},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},67706:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(23211),f=c(66544),g=c(94997),h=a([g]);g=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){let b=(0,g.yK)(a);if(b)return b;if(!(0,f.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c=(0,g.X_)().rotateToken("string"==typeof b.token?b.token.trim():"");return e.NextResponse.json({token:c.token,rotatedAt:c.rotatedAt})}catch(a){return(0,g.Ni)(a)}}d()}catch(a){d(a)}})},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")},79748:a=>{a.exports=require("fs/promises")},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},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,5948,402,3229,2240,6429],()=>b(b.s=58409));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=8135,a.ids=[8135],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")},3330:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/persisted-revive")},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")},22127:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/memory-backend/redact")},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")},31421:a=>{a.exports=require("node:child_process")},33374:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/patterns")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},34722:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/task/settings")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},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")},45511:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/helpers/parse")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},57588:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/secrets/regex")},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:()=>k,EN:()=>j,e9:()=>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()){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}))}function j(a,b=g()){return!!i(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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},67706:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(23211),f=c(66544),g=c(94997),h=a([g]);g=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){let b=(0,g.yK)(a);if(b)return b;if(!(0,f.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c=(0,g.X_)().rotateToken("string"==typeof b.token?b.token.trim():"");return e.NextResponse.json({token:c.token,rotatedAt:c.rotatedAt})}catch(a){return(0,g.Ni)(a)}}d()}catch(a){d(a)}})},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")},79748:a=>{a.exports=require("fs/promises")},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")},90431:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/async/job-manager")},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")},94997:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KJ:()=>t,Ni:()=>x,X_:()=>u,ai:()=>s,ud:()=>v,yK:()=>w});var e=c(77598),f=c(73024),g=c(77030),h=c(76760),i=c(23211),j=c(92582),k=c(8102),l=c(85821),m=c(66544),n=c(56429),o=c(40402),p=a([j,n,o]);function q(a){return{get cwd(){return a.cwd},isAlive:()=>a.isAlive(),isRunning:()=>a.isRunning(),appendCustomMessage:(b,c,d,e)=>{let f=a.inner.sessionManager,g=f.appendCustomMessageEntry(b,c,d,e);if(b===l.gt){let b=f.getEntries();a.publishSessionSnapshot(g,(0,o.Uv)(b,f.getLeafId(),{deferThinking:!0,deferToolResultImages:!0,cwd:a.cwd}))}return g}}}async function r(a){let b=await (0,o.os)(a);if(!b)return;let{session:c}=await (0,n.OF)(a,b,void 0);return q(c)}async function s(a,b,c){try{let d=(0,n.A4)(a),e=d?.isAlive()?q(d):await r(a);if(!e)return!1;return e.appendCustomMessage(l.Ro,(0,l.lN)(b,c),!0,{source:l.$f,handle:b}),!0}catch(a){return console.warn(`[gpt6] 바인딩 통지를 남기지 못했습니다 (${b}):`,a),!1}}async function t(a,b){let c=a.trim(),d=b.trim();if(!c||!d)throw new l.YA("invalid_argument","sessionId와 requestId가 필요합니다.");let e=(0,n.A4)(c),f=e?.isAlive()?q(e):await r(c);if(!f)throw new l.YA("session_not_found",`세션 ${c}의 기록을 찾을 수 없습니다.`);let g=u().issueHandle({cwd:f.cwd,sessionId:c,instruction:"WEB6 자동 상담",web6RequestId:d});return await s(g.sessionId,g.handle,g.expiresAt),g}function u(){let a=(0,h.join)((0,j.getAgentDir)(),"gpt6-handles.json");return(0,l.xI)({readStore:()=>{try{return(0,f.readFileSync)(a,"utf8")}catch(a){if("ENOENT"===a.code)return null;throw a}},writeStore:b=>{(0,f.mkdirSync)((0,h.dirname)(a),{recursive:!0}),(0,k.$)(a,b)},now:()=>new Date,randomToken:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleKey:()=>(0,e.randomBytes)(32).toString("base64url"),randomHandleDigits:()=>String((0,e.randomInt)(0,1e4)).padStart(4,"0"),getSession:a=>{let b=(0,n.A4)(a);return b?q(b):void 0},resumeSession:r})}function v(a){let b=/^Bearer\s+(\S+)$/i.exec(a.headers.get("authorization")??"");return b?b[1]:""}function w(a){return(0,m.EN)(a)?!function(a){let b=a.headers.get("x-forwarded-for");if(!b)return!1;let c=b.split(",");var d=c[c.length-1]??"";let e=d.trim().toLowerCase().replace(/^::ffff:/,"");if("::1"===e)return!0;if(4!==(0,g.isIP)(e))return!1;let f=e.split(".").map(Number);return!f.some(a=>!Number.isInteger(a)||a<0||a>255)&&(127===f[0]||100===f[0]&&f[1]>=64&&f[1]<=127)}(a)?i.NextResponse.json({error:"Connection numbers are managed from this machine or its tailnet only.",code:"local_only"},{status:403}):null:i.NextResponse.json({error:"Untrusted API request"},{status:403})}function x(a){return a instanceof l.YA?i.NextResponse.json({error:a.message,code:a.code},{status:(0,l.YO)(a.code)}):i.NextResponse.json({error:a instanceof Error?a.message:String(a),code:"internal_error"},{status:500})}[j,n,o]=p.then?(await p)():p,d()}catch(a){d(a)}})},96175:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-lifecycle")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")},96477:(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(67706),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/gpt6/token/route",pathname:"/api/gpt6/token",filename:"route",bundlePath:"app/api/gpt6/token/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/gpt6/token/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/gpt6/token/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5948,402,3229,2240,6429],()=>b(b.s=96477));module.exports=c})();