cuelo 0.9.6 → 0.9.7

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 (346) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +12 -11
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +2 -2
  6. package/.next/required-server-files.json +2 -2
  7. package/.next/routes-manifest.json +6 -0
  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 +3 -3
  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 +3 -3
  51. package/.next/server/app/api/git/diff/route.js +1 -1
  52. package/.next/server/app/api/git/status/route.js +1 -1
  53. package/.next/server/app/api/github/projects/route.js +1 -0
  54. package/.next/server/app/api/github/projects/route.js.nft.json +1 -0
  55. package/.next/server/app/api/github/projects/route_client-reference-manifest.js +1 -0
  56. package/.next/server/app/api/gpt6/handles/route.js +1 -1
  57. package/.next/server/app/api/gpt6/reply/route.js +1 -1
  58. package/.next/server/app/api/gpt6/token/route.js +1 -1
  59. package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
  60. package/.next/server/app/api/home/route.js +1 -1
  61. package/.next/server/app/api/live/call/[callId]/route.js +1 -1
  62. package/.next/server/app/api/live/character-voice/route.js +1 -1
  63. package/.next/server/app/api/live/events/route.js +2 -2
  64. package/.next/server/app/api/live/offer/route.js +1 -1
  65. package/.next/server/app/api/live/voices/route.js +1 -1
  66. package/.next/server/app/api/lounge/events/route.js +2 -2
  67. package/.next/server/app/api/lounge/route.js +1 -1
  68. package/.next/server/app/api/mcp/route.js +2 -2
  69. package/.next/server/app/api/model-roles/route.js +1 -1
  70. package/.next/server/app/api/models/route.js +1 -1
  71. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  72. package/.next/server/app/api/models-config/discover/route.js +1 -1
  73. package/.next/server/app/api/models-config/route.js +3 -3
  74. package/.next/server/app/api/models-config/test/route.js +1 -1
  75. package/.next/server/app/api/office-avatars/[id]/route.js +1 -1
  76. package/.next/server/app/api/office-avatars/route.js +1 -1
  77. package/.next/server/app/api/plugins/route.js +1 -1
  78. package/.next/server/app/api/project-trust/route.js +1 -1
  79. package/.next/server/app/api/projects/route.js +1 -1
  80. package/.next/server/app/api/runs/[runId]/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/theme/route.js +1 -1
  98. package/.next/server/app/api/tool-image/route.js +1 -1
  99. package/.next/server/app/api/update-maintenance/route.js +2 -2
  100. package/.next/server/app/api/updates/route.js +1 -1
  101. package/.next/server/app/api/web-access/recovery/route.js +1 -1
  102. package/.next/server/app/api/web-access/route.js +1 -1
  103. package/.next/server/app/api/web6/consults/route.js +1 -1
  104. package/.next/server/app/api/worktrees/route.js +1 -1
  105. package/.next/server/app/favicon.ico/route.js +1 -1
  106. package/.next/server/app/index.html +1 -1
  107. package/.next/server/app/index.rsc +5 -5
  108. package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  109. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  110. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  111. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  112. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  113. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  114. package/.next/server/app/office/page.js +2 -2
  115. package/.next/server/app/office/page_client-reference-manifest.js +1 -1
  116. package/.next/server/app/office-preview/page.js +2 -2
  117. package/.next/server/app/office-preview/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/office-preview.html +1 -1
  119. package/.next/server/app/office-preview.rsc +2 -2
  120. package/.next/server/app/office-preview.segments/_full.segment.rsc +2 -2
  121. package/.next/server/app/office-preview.segments/_head.segment.rsc +1 -1
  122. package/.next/server/app/office-preview.segments/_index.segment.rsc +2 -2
  123. package/.next/server/app/office-preview.segments/_tree.segment.rsc +1 -1
  124. package/.next/server/app/office-preview.segments/office-preview/__PAGE__.segment.rsc +1 -1
  125. package/.next/server/app/office-preview.segments/office-preview.segment.rsc +1 -1
  126. package/.next/server/app/office.html +1 -1
  127. package/.next/server/app/office.rsc +5 -5
  128. package/.next/server/app/office.segments/_full.segment.rsc +5 -5
  129. package/.next/server/app/office.segments/_head.segment.rsc +1 -1
  130. package/.next/server/app/office.segments/_index.segment.rsc +2 -2
  131. package/.next/server/app/office.segments/_tree.segment.rsc +2 -2
  132. package/.next/server/app/office.segments/office/__PAGE__.segment.rsc +4 -4
  133. package/.next/server/app/office.segments/office.segment.rsc +1 -1
  134. package/.next/server/app/page.js +2 -2
  135. package/.next/server/app/page_client-reference-manifest.js +1 -1
  136. package/.next/server/app/recover/page.js +2 -2
  137. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  138. package/.next/server/app/recover.html +1 -1
  139. package/.next/server/app/recover.rsc +2 -2
  140. package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
  141. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  142. package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
  143. package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
  144. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  145. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  146. package/.next/server/app-paths-manifest.json +12 -11
  147. package/.next/server/chunks/1008.js +2 -2
  148. package/.next/server/chunks/2651.js +1 -1
  149. package/.next/server/chunks/3379.js +1 -1
  150. package/.next/server/chunks/5489.js +12 -12
  151. package/.next/server/chunks/6429.js +2 -2
  152. package/.next/server/chunks/7362.js +1 -1
  153. package/.next/server/middleware-build-manifest.js +1 -1
  154. package/.next/server/middleware.js +2 -2
  155. package/.next/server/pages/404.html +1 -1
  156. package/.next/server/pages/500.html +1 -1
  157. package/.next/server/server-reference-manifest.json +1 -1
  158. package/.next/static/chunks/6110-9f1e951aafcdd72e.js +1 -0
  159. package/.next/static/chunks/9575-fe25836fd76b4655.js +22 -0
  160. package/.next/static/chunks/app/{api/agent/[id]/bash-output/route-6b1496af498bb4fd.js → _global-error/page-318ea6a550b5034e.js} +1 -1
  161. package/.next/static/chunks/app/api/agent/[id]/{events/route-6b1496af498bb4fd.js → account/route-318ea6a550b5034e.js} +1 -1
  162. package/.next/static/chunks/app/{_global-error/page-6b1496af498bb4fd.js → api/agent/[id]/bash-output/route-318ea6a550b5034e.js} +1 -1
  163. package/.next/static/chunks/app/api/agent/[id]/{account/route-6b1496af498bb4fd.js → events/route-318ea6a550b5034e.js} +1 -1
  164. package/.next/static/chunks/app/api/agent/[id]/route-318ea6a550b5034e.js +1 -0
  165. package/.next/static/chunks/app/api/agent/new/route-318ea6a550b5034e.js +1 -0
  166. package/.next/static/chunks/app/api/agent/running/route-318ea6a550b5034e.js +1 -0
  167. package/.next/static/chunks/app/api/attachment-settings/route-318ea6a550b5034e.js +1 -0
  168. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-318ea6a550b5034e.js +1 -0
  169. package/.next/static/chunks/app/api/attachments/draft/route-318ea6a550b5034e.js +1 -0
  170. package/.next/static/chunks/app/api/attachments/route-318ea6a550b5034e.js +1 -0
  171. package/.next/static/chunks/app/api/auth/all-providers/route-318ea6a550b5034e.js +1 -0
  172. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-318ea6a550b5034e.js +1 -0
  173. package/.next/static/chunks/app/api/auth/login/[provider]/route-318ea6a550b5034e.js +1 -0
  174. package/.next/static/chunks/app/api/auth/logout/[provider]/route-318ea6a550b5034e.js +1 -0
  175. package/.next/static/chunks/app/api/auth/providers/route-318ea6a550b5034e.js +1 -0
  176. package/.next/static/chunks/app/api/cwd/browse/route-318ea6a550b5034e.js +1 -0
  177. package/.next/static/chunks/app/api/cwd/validate/route-318ea6a550b5034e.js +1 -0
  178. package/.next/static/chunks/app/api/default-cwd/route-318ea6a550b5034e.js +1 -0
  179. package/.next/static/chunks/app/api/display-settings/route-318ea6a550b5034e.js +1 -0
  180. package/.next/static/chunks/app/api/document-text/route-318ea6a550b5034e.js +1 -0
  181. package/.next/static/chunks/app/api/experiments/route-318ea6a550b5034e.js +1 -0
  182. package/.next/static/chunks/app/api/file-index/route-318ea6a550b5034e.js +1 -0
  183. package/.next/static/chunks/app/api/files/[...path]/route-318ea6a550b5034e.js +1 -0
  184. package/.next/static/chunks/app/api/git/diff/route-318ea6a550b5034e.js +1 -0
  185. package/.next/static/chunks/app/api/git/status/route-318ea6a550b5034e.js +1 -0
  186. package/.next/static/chunks/app/api/github/projects/route-318ea6a550b5034e.js +1 -0
  187. package/.next/static/chunks/app/api/gpt6/handles/route-318ea6a550b5034e.js +1 -0
  188. package/.next/static/chunks/app/api/gpt6/reply/route-318ea6a550b5034e.js +1 -0
  189. package/.next/static/chunks/app/api/gpt6/token/route-318ea6a550b5034e.js +1 -0
  190. package/.next/static/chunks/app/api/gpt6/web6-session/route-318ea6a550b5034e.js +1 -0
  191. package/.next/static/chunks/app/api/home/route-318ea6a550b5034e.js +1 -0
  192. package/.next/static/chunks/app/api/live/call/[callId]/route-318ea6a550b5034e.js +1 -0
  193. package/.next/static/chunks/app/api/live/character-voice/route-318ea6a550b5034e.js +1 -0
  194. package/.next/static/chunks/app/api/live/events/route-318ea6a550b5034e.js +1 -0
  195. package/.next/static/chunks/app/api/live/offer/route-318ea6a550b5034e.js +1 -0
  196. package/.next/static/chunks/app/api/live/voices/route-318ea6a550b5034e.js +1 -0
  197. package/.next/static/chunks/app/api/lounge/events/route-318ea6a550b5034e.js +1 -0
  198. package/.next/static/chunks/app/api/lounge/route-318ea6a550b5034e.js +1 -0
  199. package/.next/static/chunks/app/api/mcp/route-318ea6a550b5034e.js +1 -0
  200. package/.next/static/chunks/app/api/model-roles/route-318ea6a550b5034e.js +1 -0
  201. package/.next/static/chunks/app/api/models/route-318ea6a550b5034e.js +1 -0
  202. package/.next/static/chunks/app/api/models-config/catalog/route-318ea6a550b5034e.js +1 -0
  203. package/.next/static/chunks/app/api/models-config/discover/route-318ea6a550b5034e.js +1 -0
  204. package/.next/static/chunks/app/api/models-config/route-318ea6a550b5034e.js +1 -0
  205. package/.next/static/chunks/app/api/models-config/test/route-318ea6a550b5034e.js +1 -0
  206. package/.next/static/chunks/app/api/office-avatars/[id]/route-318ea6a550b5034e.js +1 -0
  207. package/.next/static/chunks/app/api/office-avatars/route-318ea6a550b5034e.js +1 -0
  208. package/.next/static/chunks/app/api/plugins/route-318ea6a550b5034e.js +1 -0
  209. package/.next/static/chunks/app/api/project-trust/route-318ea6a550b5034e.js +1 -0
  210. package/.next/static/chunks/app/api/projects/route-318ea6a550b5034e.js +1 -0
  211. package/.next/static/chunks/app/api/runs/[runId]/route-318ea6a550b5034e.js +1 -0
  212. package/.next/static/chunks/app/api/runs/route-318ea6a550b5034e.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-318ea6a550b5034e.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/context/route-318ea6a550b5034e.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-318ea6a550b5034e.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/[id]/export/route-318ea6a550b5034e.js +1 -0
  217. package/.next/static/chunks/app/api/sessions/[id]/route-318ea6a550b5034e.js +1 -0
  218. package/.next/static/chunks/app/api/sessions/[id]/state/route-318ea6a550b5034e.js +1 -0
  219. package/.next/static/chunks/app/api/sessions/route-318ea6a550b5034e.js +1 -0
  220. package/.next/static/chunks/app/api/sessions/search/route-318ea6a550b5034e.js +1 -0
  221. package/.next/static/chunks/app/api/settings/route-318ea6a550b5034e.js +1 -0
  222. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-318ea6a550b5034e.js +1 -0
  223. package/.next/static/chunks/app/api/skills/check/route-318ea6a550b5034e.js +1 -0
  224. package/.next/static/chunks/app/api/skills/install/route-318ea6a550b5034e.js +1 -0
  225. package/.next/static/chunks/app/api/skills/route-318ea6a550b5034e.js +1 -0
  226. package/.next/static/chunks/app/api/skills/search/route-318ea6a550b5034e.js +1 -0
  227. package/.next/static/chunks/app/api/skills/update/route-318ea6a550b5034e.js +1 -0
  228. package/.next/static/chunks/app/api/theme/route-318ea6a550b5034e.js +1 -0
  229. package/.next/static/chunks/app/api/tool-image/route-318ea6a550b5034e.js +1 -0
  230. package/.next/static/chunks/app/api/update-maintenance/route-318ea6a550b5034e.js +1 -0
  231. package/.next/static/chunks/app/api/updates/route-318ea6a550b5034e.js +1 -0
  232. package/.next/static/chunks/app/api/web-access/recovery/route-318ea6a550b5034e.js +1 -0
  233. package/.next/static/chunks/app/api/web-access/route-318ea6a550b5034e.js +1 -0
  234. package/.next/static/chunks/app/api/web6/consults/route-318ea6a550b5034e.js +1 -0
  235. package/.next/static/chunks/app/api/worktrees/route-318ea6a550b5034e.js +1 -0
  236. package/.next/static/chunks/app/{layout-15c56b62f49b1c1d.js → layout-2bf5721b24426873.js} +1 -1
  237. package/.next/static/chunks/app/manifest.webmanifest/route-318ea6a550b5034e.js +1 -0
  238. package/.next/static/chunks/app/office/page-8dc604f9b5e6f220.js +1 -0
  239. package/.next/static/chunks/app/page-952b1ef4df5ac896.js +1 -0
  240. package/.next/static/chunks/next/dist/client/components/builtin/app-error-318ea6a550b5034e.js +1 -0
  241. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-318ea6a550b5034e.js +1 -0
  242. package/.next/static/chunks/next/dist/client/components/builtin/not-found-318ea6a550b5034e.js +1 -0
  243. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-318ea6a550b5034e.js +1 -0
  244. package/.next/static/chunks/{webpack-fe8f1f81562a2b61.js → webpack-68986b211ad38cf1.js} +1 -1
  245. package/.next/static/css/4fae42750604bc1a.css +1 -0
  246. package/.next/static/vrwvD7kuXEjDJZtO0Q3iO/_buildManifest.js +1 -0
  247. package/.next/trace +108 -108
  248. package/.next/trace-build +1 -1
  249. package/.next/types/app/api/github/projects/route.ts +351 -0
  250. package/.next/types/routes.d.ts +2 -1
  251. package/.next/types/validator.ts +9 -0
  252. package/README.md +6 -3
  253. package/Tools/CUELO_Setup/files/native-runtime-patch.js +3 -3
  254. package/Tools/OMP_Global_Config/agent/RULES.md +1 -0
  255. package/Tools/OMP_Global_Config/agent/TITLE_SYSTEM.md +17 -0
  256. package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +11 -4
  257. package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +2 -1
  258. package/Tools/OMP_Global_Config/agent/tools/git-finalizer/finalizer.ps1 +68 -31
  259. package/Tools/OMP_Global_Config/agent/tools/git-finalizer/index.ts +8 -6
  260. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +1119 -129
  261. package/bin/docker-entrypoint.mjs +19 -0
  262. package/install.mjs +11 -7
  263. package/package.json +8 -7
  264. package/.next/static/chunks/6110-004be57c825af4d9.js +0 -1
  265. package/.next/static/chunks/9575-4a84cf066c2f1257.js +0 -22
  266. package/.next/static/chunks/app/api/agent/[id]/route-6b1496af498bb4fd.js +0 -1
  267. package/.next/static/chunks/app/api/agent/new/route-6b1496af498bb4fd.js +0 -1
  268. package/.next/static/chunks/app/api/agent/running/route-6b1496af498bb4fd.js +0 -1
  269. package/.next/static/chunks/app/api/attachment-settings/route-6b1496af498bb4fd.js +0 -1
  270. package/.next/static/chunks/app/api/attachments/[id]/transcription/route-6b1496af498bb4fd.js +0 -1
  271. package/.next/static/chunks/app/api/attachments/draft/route-6b1496af498bb4fd.js +0 -1
  272. package/.next/static/chunks/app/api/attachments/route-6b1496af498bb4fd.js +0 -1
  273. package/.next/static/chunks/app/api/auth/all-providers/route-6b1496af498bb4fd.js +0 -1
  274. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-6b1496af498bb4fd.js +0 -1
  275. package/.next/static/chunks/app/api/auth/login/[provider]/route-6b1496af498bb4fd.js +0 -1
  276. package/.next/static/chunks/app/api/auth/logout/[provider]/route-6b1496af498bb4fd.js +0 -1
  277. package/.next/static/chunks/app/api/auth/providers/route-6b1496af498bb4fd.js +0 -1
  278. package/.next/static/chunks/app/api/cwd/browse/route-6b1496af498bb4fd.js +0 -1
  279. package/.next/static/chunks/app/api/cwd/validate/route-6b1496af498bb4fd.js +0 -1
  280. package/.next/static/chunks/app/api/default-cwd/route-6b1496af498bb4fd.js +0 -1
  281. package/.next/static/chunks/app/api/display-settings/route-6b1496af498bb4fd.js +0 -1
  282. package/.next/static/chunks/app/api/document-text/route-6b1496af498bb4fd.js +0 -1
  283. package/.next/static/chunks/app/api/experiments/route-6b1496af498bb4fd.js +0 -1
  284. package/.next/static/chunks/app/api/file-index/route-6b1496af498bb4fd.js +0 -1
  285. package/.next/static/chunks/app/api/files/[...path]/route-6b1496af498bb4fd.js +0 -1
  286. package/.next/static/chunks/app/api/git/diff/route-6b1496af498bb4fd.js +0 -1
  287. package/.next/static/chunks/app/api/git/status/route-6b1496af498bb4fd.js +0 -1
  288. package/.next/static/chunks/app/api/gpt6/handles/route-6b1496af498bb4fd.js +0 -1
  289. package/.next/static/chunks/app/api/gpt6/reply/route-6b1496af498bb4fd.js +0 -1
  290. package/.next/static/chunks/app/api/gpt6/token/route-6b1496af498bb4fd.js +0 -1
  291. package/.next/static/chunks/app/api/gpt6/web6-session/route-6b1496af498bb4fd.js +0 -1
  292. package/.next/static/chunks/app/api/home/route-6b1496af498bb4fd.js +0 -1
  293. package/.next/static/chunks/app/api/live/call/[callId]/route-6b1496af498bb4fd.js +0 -1
  294. package/.next/static/chunks/app/api/live/character-voice/route-6b1496af498bb4fd.js +0 -1
  295. package/.next/static/chunks/app/api/live/events/route-6b1496af498bb4fd.js +0 -1
  296. package/.next/static/chunks/app/api/live/offer/route-6b1496af498bb4fd.js +0 -1
  297. package/.next/static/chunks/app/api/live/voices/route-6b1496af498bb4fd.js +0 -1
  298. package/.next/static/chunks/app/api/lounge/events/route-6b1496af498bb4fd.js +0 -1
  299. package/.next/static/chunks/app/api/lounge/route-6b1496af498bb4fd.js +0 -1
  300. package/.next/static/chunks/app/api/mcp/route-6b1496af498bb4fd.js +0 -1
  301. package/.next/static/chunks/app/api/model-roles/route-6b1496af498bb4fd.js +0 -1
  302. package/.next/static/chunks/app/api/models/route-6b1496af498bb4fd.js +0 -1
  303. package/.next/static/chunks/app/api/models-config/catalog/route-6b1496af498bb4fd.js +0 -1
  304. package/.next/static/chunks/app/api/models-config/discover/route-6b1496af498bb4fd.js +0 -1
  305. package/.next/static/chunks/app/api/models-config/route-6b1496af498bb4fd.js +0 -1
  306. package/.next/static/chunks/app/api/models-config/test/route-6b1496af498bb4fd.js +0 -1
  307. package/.next/static/chunks/app/api/office-avatars/[id]/route-6b1496af498bb4fd.js +0 -1
  308. package/.next/static/chunks/app/api/office-avatars/route-6b1496af498bb4fd.js +0 -1
  309. package/.next/static/chunks/app/api/plugins/route-6b1496af498bb4fd.js +0 -1
  310. package/.next/static/chunks/app/api/project-trust/route-6b1496af498bb4fd.js +0 -1
  311. package/.next/static/chunks/app/api/projects/route-6b1496af498bb4fd.js +0 -1
  312. package/.next/static/chunks/app/api/runs/[runId]/route-6b1496af498bb4fd.js +0 -1
  313. package/.next/static/chunks/app/api/runs/route-6b1496af498bb4fd.js +0 -1
  314. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-6b1496af498bb4fd.js +0 -1
  315. package/.next/static/chunks/app/api/sessions/[id]/context/route-6b1496af498bb4fd.js +0 -1
  316. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-6b1496af498bb4fd.js +0 -1
  317. package/.next/static/chunks/app/api/sessions/[id]/export/route-6b1496af498bb4fd.js +0 -1
  318. package/.next/static/chunks/app/api/sessions/[id]/route-6b1496af498bb4fd.js +0 -1
  319. package/.next/static/chunks/app/api/sessions/[id]/state/route-6b1496af498bb4fd.js +0 -1
  320. package/.next/static/chunks/app/api/sessions/route-6b1496af498bb4fd.js +0 -1
  321. package/.next/static/chunks/app/api/sessions/search/route-6b1496af498bb4fd.js +0 -1
  322. package/.next/static/chunks/app/api/settings/route-6b1496af498bb4fd.js +0 -1
  323. package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-6b1496af498bb4fd.js +0 -1
  324. package/.next/static/chunks/app/api/skills/check/route-6b1496af498bb4fd.js +0 -1
  325. package/.next/static/chunks/app/api/skills/install/route-6b1496af498bb4fd.js +0 -1
  326. package/.next/static/chunks/app/api/skills/route-6b1496af498bb4fd.js +0 -1
  327. package/.next/static/chunks/app/api/skills/search/route-6b1496af498bb4fd.js +0 -1
  328. package/.next/static/chunks/app/api/skills/update/route-6b1496af498bb4fd.js +0 -1
  329. package/.next/static/chunks/app/api/theme/route-6b1496af498bb4fd.js +0 -1
  330. package/.next/static/chunks/app/api/tool-image/route-6b1496af498bb4fd.js +0 -1
  331. package/.next/static/chunks/app/api/update-maintenance/route-6b1496af498bb4fd.js +0 -1
  332. package/.next/static/chunks/app/api/updates/route-6b1496af498bb4fd.js +0 -1
  333. package/.next/static/chunks/app/api/web-access/recovery/route-6b1496af498bb4fd.js +0 -1
  334. package/.next/static/chunks/app/api/web-access/route-6b1496af498bb4fd.js +0 -1
  335. package/.next/static/chunks/app/api/web6/consults/route-6b1496af498bb4fd.js +0 -1
  336. package/.next/static/chunks/app/api/worktrees/route-6b1496af498bb4fd.js +0 -1
  337. package/.next/static/chunks/app/manifest.webmanifest/route-6b1496af498bb4fd.js +0 -1
  338. package/.next/static/chunks/app/office/page-424e244f1c7fcdc6.js +0 -1
  339. package/.next/static/chunks/app/page-b43b2b8679ed66e2.js +0 -1
  340. package/.next/static/chunks/next/dist/client/components/builtin/app-error-6b1496af498bb4fd.js +0 -1
  341. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6b1496af498bb4fd.js +0 -1
  342. package/.next/static/chunks/next/dist/client/components/builtin/not-found-6b1496af498bb4fd.js +0 -1
  343. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6b1496af498bb4fd.js +0 -1
  344. package/.next/static/css/00f20b26266e86ed.css +0 -1
  345. package/.next/static/kRJ4zgHxJf680foSBrfpf/_buildManifest.js +0 -1
  346. /package/.next/static/{kRJ4zgHxJf680foSBrfpf → vrwvD7kuXEjDJZtO0Q3iO}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1304:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>x,POST:()=>u});var e=c(23211),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(1060),l=c(88473),m=c(65630),n=c(66544),o=c(55484),p=c(66829),q=a([j,m]);[j,m]=q.then?(await q)():q;let y=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store",".git"]),z=[".pyc"],A=new Set(["list","read","download","meta","preview","watch"]),B={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",html:"html",htm:"html",css:"css",scss:"css",less:"css",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function r(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":B[b.split(".").pop()??""]??"text"}function s(a){let b=a.join("/"),c=(0,j.Nw)(b);return(0,j.uK)(c)?c:"/"+b.replace(/^\/+/,"")}async function t(a){let b,c=s(a),d=await (0,j.mc)();if(!(0,j.A$)(c,d))return{response:e.NextResponse.json({error:"Access denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:e.NextResponse.json({error:"Upload directory not found"},{status:404})}}if(!b.isDirectory())return{response:e.NextResponse.json({error:"Upload target is not a directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of d)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:e.NextResponse.json({error:"Access denied"},{status:403})}}async function u(a,{params:b}){if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let d,{path:f}=await b,h=await t(f);if("response"in h)return h.response;let{directory:j}=h,k=a.nextUrl.searchParams.get("type")??"upload";if("upload-check"===k){var c;let b=await a.json().catch(()=>null),d=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!d)return e.NextResponse.json({error:"fileNames must be an array of strings"},{status:400});let f=(0,o.SI)(d);if(f)return e.NextResponse.json({error:f},{status:400});return e.NextResponse.json((0,o.Gu)(j,d))}if("upload"!==k)return e.NextResponse.json({error:"Invalid upload request type"},{status:400});let l=(0,o.Ey)(a.nextUrl.searchParams.get("conflict"));if(!l)return e.NextResponse.json({error:"Invalid conflict strategy"},{status:400});try{d=await (0,p.s)(a,0x6500000)}catch(a){if(a instanceof p.H)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});throw a}let m=d.getAll("files").filter(a=>"string"!=typeof a);if(m.some(a=>a.size>0x1900000))return e.NextResponse.json({error:"Each upload must be 25MB or smaller"},{status:413});if(m.reduce((a,b)=>a+b.size,0)>0x6400000)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});let n=m.map(a=>a.name),q=(0,o.SI)(n);if(q)return e.NextResponse.json({error:q},{status:400});let r=(0,o.Gu)(j,n);if("error"===l&&r.conflicts.length>0)return e.NextResponse.json({error:"One or more files already exist",conflicts:r.conflicts,nonReplaceable:r.nonReplaceable},{status:409});let s=new Set(r.conflicts),u=new Set(r.nonReplaceable),v=[],w=[],x=[];for(let a of m){let b,c=i().join(j,a.name);if(s.has(a.name)&&"skip"===l){w.push(a.name);continue}if(s.has(a.name)&&u.has(a.name)){x.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}if(s.has(a.name))try{g().unlinkSync(c)}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}try{g().writeFileSync(c,b,{flag:"wx"}),v.push(a.name)}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)})}}return e.NextResponse.json({uploaded:v,skipped:w,errors:x},{status:x.length>0?207:200})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function v(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function w(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e)};if(!d)return new Response(v(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(v(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function x(a,{params:b}){try{var d,f,h;let n,{path:o}=await b,p=s(o),q=(d=a.nextUrl.searchParams.get("type")??"list",A.has(d)?d:null);if(!q)return e.NextResponse.json({error:"Invalid file request type"},{status:400});let t=a.nextUrl.searchParams.get("sessionId"),u=await (0,j.mc)(),v=(0,j.A$)(p,u),x=!v&&"list"!==q&&await (0,m.Iq)(p,t);if(!v&&!x)return e.NextResponse.json({error:"Access denied"},{status:403});try{n=g().statSync(p)}catch{return e.NextResponse.json({error:"Not found"},{status:404})}if(!x&&!(0,j.B7)(p,u))return e.NextResponse.json({error:"Access denied"},{status:403});if("read"===q){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,k.cV)(p);if(b){if(n.size>k.kv)return e.NextResponse.json({error:"Image too large (>10MB)"},{status:413});return w(p,n,b,a.headers.get("range"))}let c=(0,k.X)(p);if(c)return w(p,n,c,a.headers.get("range"));let d=(0,k.oC)(p);if(d)return w(p,n,d,a.headers.get("range"));if(n.size>k._4)return e.NextResponse.json({error:"File too large for preview (>256KB)"},{status:413});let f=g().readFileSync(p,"utf-8"),h=r(p);return e.NextResponse.json({content:f,language:h,size:n.size})}if("download"===q){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,k.cV)(p)||(0,k.X)(p)||(0,k.oC)(p)||"application/octet-stream";return w(p,n,b,a.headers.get("range"),!0)}if("meta"===q){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=(0,k.cV)(p),b=(0,k.X)(p),c=(0,k.oC)(p);return e.NextResponse.json({size:n.size,language:r(p),mime:a||b||c||"text/plain",previewKind:(0,k.Ac)(p)})}if("preview"===q){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});if("docx"!==(0,k.GO)(p))return e.NextResponse.json({error:"Preview not available for this file type"},{status:400});if(n.size>k.jL)return e.NextResponse.json({error:"DOCX too large for preview (>10MB)"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(f=(await a.convertToHtml({path:p},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,h=i().basename(p),`<!doctype html>
1
+ "use strict";(()=>{var a={};a.id=4037,a.ids=[4037],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1304:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>x,POST:()=>u});var e=c(23211),f=c(29021),g=c.n(f),h=c(33873),i=c.n(h),j=c(80547),k=c(1060),l=c(88473),m=c(65630),n=c(66544),o=c(55484),p=c(66829),q=a([j,m]);[j,m]=q.then?(await q)():q;let y=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store",".git"]),z=[".pyc"],A=new Set(["list","read","download","meta","preview","watch"]),B={ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",kt:"kotlin",swift:"swift",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",html:"html",htm:"html",css:"css",scss:"css",less:"css",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",toml:"toml",xml:"xml",md:"markdown",mdx:"markdown",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",sql:"sql",graphql:"graphql",gql:"graphql",dockerfile:"dockerfile",tf:"hcl",hcl:"hcl",env:"bash",gitignore:"bash",txt:"text",pdf:"pdf",docx:"word"};function r(a){let b=i().basename(a).toLowerCase();return"dockerfile"===b||b.startsWith("dockerfile.")?"dockerfile":".env"===b||b.startsWith(".env.")?"bash":"makefile"===b||"gnumakefile"===b?"makefile":B[b.split(".").pop()??""]??"text"}function s(a){let b=a.join("/"),c=(0,j.Nw)(b);return(0,j.uK)(c)?c:"/"+b.replace(/^\/+/,"")}async function t(a){let b,c=(0,j.mU)(s(a),(0,j.Ph)()),d=await (0,j.mc)();if(!(0,j.A$)(c,d))return{response:e.NextResponse.json({error:"Access denied"},{status:403})};try{b=g().statSync(c)}catch{return{response:e.NextResponse.json({error:"Upload directory not found"},{status:404})}}if(!b.isDirectory())return{response:e.NextResponse.json({error:"Upload target is not a directory"},{status:400})};let f=g().realpathSync(c),h=new Set;for(let a of d)try{h.add(g().realpathSync(a))}catch{}return(0,j.A$)(f,h)?{directory:f}:{response:e.NextResponse.json({error:"Access denied"},{status:403})}}async function u(a,{params:b}){if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let d,{path:f}=await b,h=await t(f);if("response"in h)return h.response;let{directory:j}=h,k=a.nextUrl.searchParams.get("type")??"upload";if("upload-check"===k){var c;let b=await a.json().catch(()=>null),d=(c=b?.fileNames,Array.isArray(c)&&c.every(a=>"string"==typeof a)?c:null);if(!d)return e.NextResponse.json({error:"fileNames must be an array of strings"},{status:400});let f=(0,o.SI)(d);if(f)return e.NextResponse.json({error:f},{status:400});return e.NextResponse.json((0,o.Gu)(j,d))}if("upload"!==k)return e.NextResponse.json({error:"Invalid upload request type"},{status:400});let l=(0,o.Ey)(a.nextUrl.searchParams.get("conflict"));if(!l)return e.NextResponse.json({error:"Invalid conflict strategy"},{status:400});try{d=await (0,p.s)(a,0x6500000)}catch(a){if(a instanceof p.H)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});throw a}let m=d.getAll("files").filter(a=>"string"!=typeof a);if(m.some(a=>a.size>0x1900000))return e.NextResponse.json({error:"Each upload must be 25MB or smaller"},{status:413});if(m.reduce((a,b)=>a+b.size,0)>0x6400000)return e.NextResponse.json({error:"Uploads must total 100MB or less"},{status:413});let n=m.map(a=>a.name),q=(0,o.SI)(n);if(q)return e.NextResponse.json({error:q},{status:400});let r=(0,o.Gu)(j,n);if("error"===l&&r.conflicts.length>0)return e.NextResponse.json({error:"One or more files already exist",conflicts:r.conflicts,nonReplaceable:r.nonReplaceable},{status:409});let s=new Set(r.conflicts),u=new Set(r.nonReplaceable),v=[],w=[],x=[];for(let a of m){let b,c=i().join(j,a.name);if(s.has(a.name)&&"skip"===l){w.push(a.name);continue}if(s.has(a.name)&&u.has(a.name)){x.push({name:a.name,error:"Cannot replace a directory or symbolic link"});continue}try{b=Buffer.from(await a.arrayBuffer())}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}if(s.has(a.name))try{g().unlinkSync(c)}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)});continue}try{g().writeFileSync(c,b,{flag:"wx"}),v.push(a.name)}catch(b){x.push({name:a.name,error:b instanceof Error?b.message:String(b)})}}return e.NextResponse.json({uploaded:v,skipped:w,errors:x},{status:x.length>0?207:200})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}function v(a,b){let c=g().createReadStream(a,b),d=!1;return new ReadableStream({start(a){c.on("data",b=>{if(!d)try{a.enqueue(new Uint8Array(b))}catch{d=!0,c.destroy()}}),c.once("end",()=>{if(!d){d=!0;try{a.close()}catch{}}}),c.once("error",b=>{if(!d){d=!0;try{a.error(b)}catch{}}})},cancel(){d=!0,c.destroy()}})}function w(a,b,c,d,e=!1){let f={"Content-Type":c,"Cache-Control":"no-cache","Accept-Ranges":"bytes","Content-Disposition":function(a,b=!1){let c=i().basename(a),d=c.replace(/[^\x20-\x7E]|["\\;\r\n]/g,"_")||"download";return`${b?"attachment":"inline"}; filename="${d}"; filename*=UTF-8''${encodeURIComponent(c).replace(/[!'()*]/g,a=>`%${a.charCodeAt(0).toString(16).toUpperCase()}`)}`}(a,e)};if(!d)return new Response(v(a),{headers:{...f,"Content-Length":String(b.size)}});let g=/^bytes=(\d*)-(\d*)$/.exec(d);if(!g)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let h=g[1]?Number(g[1]):0,j=g[2]?Number(g[2]):b.size-1;if(!g[1]&&g[2]){let a=Number(g[2]);h=Math.max(b.size-a,0),j=b.size-1}if(!Number.isFinite(h)||!Number.isFinite(j)||h<0||j<h||h>=b.size)return new Response(null,{status:416,headers:{...f,"Content-Range":`bytes */${b.size}`}});let k=(j=Math.min(j,b.size-1))-h+1;return new Response(v(a,{start:h,end:j}),{status:206,headers:{...f,"Content-Length":String(k),"Content-Range":`bytes ${h}-${j}/${b.size}`}})}async function x(a,{params:b}){try{var d,f,h;let n,{path:o}=await b,p=s(o),q=(0,j.mU)(p,(0,j.Ph)()),t=(d=a.nextUrl.searchParams.get("type")??"list",A.has(d)?d:null);if(!t)return e.NextResponse.json({error:"Invalid file request type"},{status:400});let u=a.nextUrl.searchParams.get("sessionId"),v=await (0,j.mc)(),x=(0,j.A$)(q,v),B=!x&&"list"!==t&&await (0,m.Iq)(p,u);if(!x&&!B)return e.NextResponse.json({error:"Access denied"},{status:403});try{n=g().statSync(q)}catch{return e.NextResponse.json({error:"Not found"},{status:404})}if(!B&&!(0,j.B7)(q,v))return e.NextResponse.json({error:"Access denied"},{status:403});if("read"===t){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,k.cV)(q);if(b){if(n.size>k.kv)return e.NextResponse.json({error:"Image too large (>10MB)"},{status:413});return w(q,n,b,a.headers.get("range"))}let c=(0,k.X)(q);if(c)return w(q,n,c,a.headers.get("range"));let d=(0,k.oC)(q);if(d)return w(q,n,d,a.headers.get("range"));if(n.size>k._4)return e.NextResponse.json({error:"File too large for preview (>256KB)"},{status:413});let f=g().readFileSync(q,"utf-8"),h=r(q);return e.NextResponse.json({content:f,language:h,size:n.size})}if("download"===t){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let b=(0,k.cV)(q)||(0,k.X)(q)||(0,k.oC)(q)||"application/octet-stream";return w(q,n,b,a.headers.get("range"),!0)}if("meta"===t){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=(0,k.cV)(q),b=(0,k.X)(q),c=(0,k.oC)(q);return e.NextResponse.json({size:n.size,language:r(q),mime:a||b||c||"text/plain",previewKind:(0,k.Ac)(q)})}if("preview"===t){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});if("docx"!==(0,k.GO)(q))return e.NextResponse.json({error:"Preview not available for this file type"},{status:400});if(n.size>k.jL)return e.NextResponse.json({error:"DOCX too large for preview (>10MB)"},{status:413});let a=await c.e(3379).then(c.t.bind(c,53379,19)),b=(f=(await a.convertToHtml({path:q},{externalFileAccess:!1,convertImage:a.images.dataUri})).value,h=i().basename(q),`<!doctype html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
@@ -43,7 +43,7 @@
43
43
  ${f}
44
44
  </main>
45
45
  </body>
46
- </html>`);return new Response(b,{headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-cache","Content-Security-Policy":"default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'","Referrer-Policy":"no-referrer","X-Content-Type-Options":"nosniff"}})}if("watch"===q){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=null,b=n.mtimeMs,c=n.size,d=new ReadableStream({start(d){let e=(a,b)=>{let c=`event: ${a}
46
+ </html>`);return new Response(b,{headers:{"Content-Type":"text/html; charset=utf-8","Cache-Control":"no-cache","Content-Security-Policy":"default-src 'none'; img-src data:; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'","Referrer-Policy":"no-referrer","X-Content-Type-Options":"nosniff"}})}if("watch"===t){if(!n.isFile())return e.NextResponse.json({error:"Not a file"},{status:400});let a=null,b=n.mtimeMs,c=n.size,d=new ReadableStream({start(d){let e=(a,b)=>{let c=`event: ${a}
47
47
  data: ${JSON.stringify(b)}
48
48
 
49
- `;try{d.enqueue(new TextEncoder().encode(c))}catch{}};e("connected",{filePath:p});try{(a=g().watch(p,()=>{try{let a=g().statSync(p);if(a.mtimeMs===b&&a.size===c)return;b=a.mtimeMs,c=a.size,e("change",{mtime:a.mtime.toISOString(),size:a.size})}catch{e("change",{mtime:new Date().toISOString(),size:0})}})).on("error",()=>{try{d.close()}catch{}})}catch{e("error",{message:"Failed to watch file"}),d.close()}},cancel(){try{a?.close()}catch{}}});return new Response(d,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}if(!n.isDirectory())return e.NextResponse.json({error:"Not a directory"},{status:400});let B=g().readdirSync(p,{withFileTypes:!0}).filter(a=>!y.has(a.name)&&!z.some(b=>a.name.endsWith(b))).flatMap(a=>{let b=(0,l.w)(a,i().join(p,a.name));return null===b?[]:[{name:a.name,isDir:b,size:0,modified:""}]}).sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name));return e.NextResponse.json({entries:B,path:p})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},1932:a=>{a.exports=require("url")},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")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},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")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55484:(a,b,c)=>{c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},60357:(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(1304),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/[...path]/route",pathname:"/api/files/[...path]",filename:"route",bundlePath:"app/api/files/[...path]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\files\\[...path]\\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/files/[...path]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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"))}},66829:(a,b,c)=>{c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88473:(a,b,c)=>{c.d(b,{w:()=>f});var d=c(29021),e=c.n(d);function f(a,b){if(a.isDirectory())return!0;if(a.isFile())return!1;try{return e().statSync(b).isDirectory()}catch{return null}}},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=60357));module.exports=c})();
49
+ `;try{d.enqueue(new TextEncoder().encode(c))}catch{}};e("connected",{filePath:q});try{(a=g().watch(q,()=>{try{let a=g().statSync(q);if(a.mtimeMs===b&&a.size===c)return;b=a.mtimeMs,c=a.size,e("change",{mtime:a.mtime.toISOString(),size:a.size})}catch{e("change",{mtime:new Date().toISOString(),size:0})}})).on("error",()=>{try{d.close()}catch{}})}catch{e("error",{message:"Failed to watch file"}),d.close()}},cancel(){try{a?.close()}catch{}}});return new Response(d,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}if(!n.isDirectory())return e.NextResponse.json({error:"Not a directory"},{status:400});let C=g().readdirSync(q,{withFileTypes:!0}).filter(a=>!y.has(a.name)&&!z.some(b=>a.name.endsWith(b))).flatMap(a=>{let b=(0,l.w)(a,i().join(q,a.name));return null===b?[]:[{name:a.name,isDir:b,size:0,modified:""}]}).sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name));return e.NextResponse.json({entries:C,path:q})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},1932:a=>{a.exports=require("url")},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")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},40575:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/tools/todo")},44075:(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(1304),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/[...path]/route",pathname:"/api/files/[...path]",filename:"route",bundlePath:"app/api/files/[...path]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\files\\[...path]\\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/files/[...path]/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55484:(a,b,c)=>{c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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"))}},66829:(a,b,c)=>{c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,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,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88473:(a,b,c)=>{c.d(b,{w:()=>f});var d=c(29021),e=c.n(d);function f(a,b){if(a.isDirectory())return!0;if(a.isFile())return!1;try{return e().statSync(b).isDirectory()}catch{return null}}},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=44075));module.exports=c})();
@@ -3,4 +3,4 @@ new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function w(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function x(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b),i=q(h().relative(e,g)),k=(await r(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m){let a=await w(e,i,k.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:m,patch:a}:{supported:!1}}try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let n=f().readFileSync(g);if(u(n))return{supported:!1};let s=n.toString("utf8");if("untracked"===m)d=v(i,s);else{let a=await w(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=v(i,s)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,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")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},83193:(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:"D:\\a\\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)}})},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,5582],()=>b(b.s=83193));module.exports=c})();
6
+ ${e}${f}`}async function w(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function x(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b),i=q(h().relative(e,g)),k=(await r(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m){let a=await w(e,i,k.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:m,patch:a}:{supported:!1}}try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let n=f().readFileSync(g);if(u(n))return{supported:!1};let s=n.toString("utf8");if("untracked"===m)d=v(i,s);else{let a=await w(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=v(i,s)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,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")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},60159:(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:"D:\\a\\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)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},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,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},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,5582],()=>b(b.s=60159));module.exports=c})();
@@ -3,4 +3,4 @@ new file mode 100644
3
3
  --- /dev/null
4
4
  +++ b/${a}
5
5
  @@ -0,0 +1,${d.length} @@
6
- ${e}${f}`}async function w(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function x(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b),i=q(h().relative(e,g)),k=(await r(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m){let a=await w(e,i,k.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:m,patch:a}:{supported:!1}}try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let n=f().readFileSync(g);if(u(n))return{supported:!1};let s=n.toString("utf8");if("untracked"===m)d=v(i,s);else{let a=await w(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=v(i,s)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,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")},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")},75537:(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:"D:\\a\\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)}})},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},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,5582],()=>b(b.s=75537));module.exports=c})();
6
+ ${e}${f}`}async function w(a,b,c){try{return await n(a,["diff","--no-color","--no-ext-diff","--unified=3","HEAD","--",...c&&c!==b?[c,b]:[b]],4*j._4)}catch{return null}}async function x(a,b){let c,d,e=await o(a);if(!e||!p(e,b))return{supported:!1};let g=h().resolve(b),i=q(h().relative(e,g)),k=(await r(e)).find(a=>a.path===i);if(!k)return{supported:!1};let{status:m}=l(k);if("deleted"===m){let a=await w(e,i,k.originalPath);return a?.includes("\n@@ ")?{supported:!0,status:m,patch:a}:{supported:!1}}try{c=f().lstatSync(g)}catch{return{supported:!1}}if(!c.isFile()||c.size>j._4)return{supported:!1};let n=f().readFileSync(g);if(u(n))return{supported:!1};let s=n.toString("utf8");if("untracked"===m)d=v(i,s);else{let a=await w(e,i,k.originalPath);if(null===a){if("added"!==m)return{supported:!1};d=v(i,s)}else d=a}return d.includes("\n@@ ")?{supported:!0,status:m,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")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55991:(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:"D:\\a\\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)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},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,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},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,5582],()=>b(b.s=55991));module.exports=c})();
@@ -0,0 +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")},42033:(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:"D:\\a\\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}}},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=42033));module.exports=c})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../node_modules/@opentelemetry/api/build/src/api/context.js","../../../../../../node_modules/@opentelemetry/api/build/src/api/diag.js","../../../../../../node_modules/@opentelemetry/api/build/src/api/metrics.js","../../../../../../node_modules/@opentelemetry/api/build/src/api/propagation.js","../../../../../../node_modules/@opentelemetry/api/build/src/api/trace.js","../../../../../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js","../../../../../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js","../../../../../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js","../../../../../../node_modules/@opentelemetry/api/build/src/baggage/utils.js","../../../../../../node_modules/@opentelemetry/api/build/src/context-api.js","../../../../../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js","../../../../../../node_modules/@opentelemetry/api/build/src/context/context.js","../../../../../../node_modules/@opentelemetry/api/build/src/diag-api.js","../../../../../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js","../../../../../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js","../../../../../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js","../../../../../../node_modules/@opentelemetry/api/build/src/diag/types.js","../../../../../../node_modules/@opentelemetry/api/build/src/index.js","../../../../../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js","../../../../../../node_modules/@opentelemetry/api/build/src/internal/semver.js","../../../../../../node_modules/@opentelemetry/api/build/src/metrics-api.js","../../../../../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js","../../../../../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js","../../../../../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js","../../../../../../node_modules/@opentelemetry/api/build/src/propagation-api.js","../../../../../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js","../../../../../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace-api.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/status.js","../../../../../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js","../../../../../../node_modules/@opentelemetry/api/build/src/version.js","../../../../../../node_modules/@opentelemetry/api/package.json","../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../node_modules/@swc/helpers/package.json","../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/react/cjs/react.development.js","../../../../../../node_modules/react/cjs/react.production.js","../../../../../../node_modules/react/index.js","../../../../../../node_modules/react/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/1813.js","../../../../chunks/4741.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/github/projects/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"D:\\a\\CUELO\\CUELO\\app\\api\\github\\projects\\route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
@@ -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")},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")},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")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>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")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},83737:(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:"D:\\a\\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)}})},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}))}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,5582,3229,6429],()=>b(b.s=83737));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")},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")},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")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},56511:(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:"D:\\a\\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)}})},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")},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")},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},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}))}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,5582,3229,6429],()=>b(b.s=56511));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")},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")},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")},42337:(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:"D:\\a\\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")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>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")},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}))}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,5582,3229,6429],()=>b(b.s=42337));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")},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")},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")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>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")},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}))}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")},98023:(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:"D:\\a\\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)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=98023));module.exports=c})();