@qt4798/pi-web 0.17.14 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +21 -19
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +29 -1
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +26 -12
  8. package/.next/server/app/_global-error/page.js +2 -2
  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/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page.js +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +3 -3
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
  23. package/.next/server/app/api/agent/[id]/events/route.js +3 -3
  24. package/.next/server/app/api/agent/[id]/lease/route.js +1 -0
  25. package/.next/server/app/api/agent/[id]/lease/route.js.nft.json +1 -0
  26. package/.next/server/app/api/{deepseek/balance → agent/[id]/lease}/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/agent/[id]/route.js +1 -1
  28. package/.next/server/app/api/agent/new/route.js +1 -1
  29. package/.next/server/app/api/agent/running/events/route.js +2 -2
  30. package/.next/server/app/api/agent/running/route.js +1 -1
  31. package/.next/server/app/api/app-update/route.js +1 -1
  32. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  33. package/.next/server/app/api/auth/combined/route.js +1 -1
  34. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  35. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  36. package/.next/server/app/api/auth/providers/route.js +1 -1
  37. package/.next/server/app/api/backup/export/route.js +1 -1
  38. package/.next/server/app/api/backup/import/route.js +1 -1
  39. package/.next/server/app/api/cwd/browse/route.js +1 -1
  40. package/.next/server/app/api/cwd/validate/route.js +1 -1
  41. package/.next/server/app/api/default-cwd/route.js +1 -1
  42. package/.next/server/app/api/events/route.js +2 -2
  43. package/.next/server/app/api/features/route.js +1 -1
  44. package/.next/server/app/api/file-index/route.js +1 -1
  45. package/.next/server/app/api/files/[...path]/route.js +3 -3
  46. package/.next/server/app/api/git/diff/route.js +2 -2
  47. package/.next/server/app/api/git/push/route.js +1 -1
  48. package/.next/server/app/api/git/stash/route.js +1 -1
  49. package/.next/server/app/api/git/status/route.js +2 -2
  50. package/.next/server/app/api/home/route.js +1 -1
  51. package/.next/server/app/api/import/discover/route.js +1 -1
  52. package/.next/server/app/api/import/execute/route.js +1 -1
  53. package/.next/server/app/api/import/status/route.js +1 -1
  54. package/.next/server/app/api/logs/route.js +1 -1
  55. package/.next/server/app/api/mcp/restart/route.js +1 -1
  56. package/.next/server/app/api/mcp/route.js +2 -2
  57. package/.next/server/app/api/models/route.js +1 -1
  58. package/.next/server/app/api/models-config/builtin/route.js +1 -1
  59. package/.next/server/app/api/models-config/catalog/route.js +1 -1
  60. package/.next/server/app/api/models-config/discover/route.js +1 -1
  61. package/.next/server/app/api/models-config/route.js +1 -1
  62. package/.next/server/app/api/models-config/test/route.js +1 -1
  63. package/.next/server/app/api/modes/route.js +1 -1
  64. package/.next/server/app/api/plugins/check/route.js +1 -1
  65. package/.next/server/app/api/plugins/route.js +1 -1
  66. package/.next/server/app/api/project-aliases/route.js +1 -1
  67. package/.next/server/app/api/project-state/route.js +1 -1
  68. package/.next/server/app/api/project-trust/route.js +1 -1
  69. package/.next/server/app/api/projects/visibility/route.js +1 -1
  70. package/.next/server/app/api/provider-usage/query/route.js +1 -0
  71. package/.next/server/app/api/{deepseek/balance → provider-usage/query}/route.js.nft.json +1 -1
  72. package/.next/server/app/api/provider-usage/query/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/proxy/route.js +1 -1
  74. package/.next/server/app/api/proxy/test/route.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
  76. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  77. package/.next/server/app/api/sessions/[id]/details/route.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
  80. package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
  81. package/.next/server/app/api/sessions/[id]/queue-recovery/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
  84. package/.next/server/app/api/sessions/route.js +1 -1
  85. package/.next/server/app/api/sessions/search/route.js +1 -1
  86. package/.next/server/app/api/settings/title-model/route.js +1 -1
  87. package/.next/server/app/api/skills/check/route.js +1 -1
  88. package/.next/server/app/api/skills/install/route.js +1 -1
  89. package/.next/server/app/api/skills/route.js +1 -1
  90. package/.next/server/app/api/skills/search/route.js +1 -1
  91. package/.next/server/app/api/skills/update/route.js +1 -1
  92. package/.next/server/app/api/snippets/[id]/route.js +1 -1
  93. package/.next/server/app/api/snippets/route.js +1 -1
  94. package/.next/server/app/api/subagents/[id]/route.js +1 -1
  95. package/.next/server/app/api/subagents/profiles/route.js +1 -1
  96. package/.next/server/app/api/subagents/settings/route.js +1 -1
  97. package/.next/server/app/api/tasks/[id]/[action]/route.js +1 -1
  98. package/.next/server/app/api/tasks/[id]/changed-files/route.js +1 -1
  99. package/.next/server/app/api/tasks/[id]/diff/route.js +2 -2
  100. package/.next/server/app/api/tasks/[id]/events/route.js +1 -1
  101. package/.next/server/app/api/tasks/[id]/route.js +1 -1
  102. package/.next/server/app/api/tasks/batch/route.js +1 -1
  103. package/.next/server/app/api/tasks/events/route.js +1 -1
  104. package/.next/server/app/api/tasks/route.js +1 -1
  105. package/.next/server/app/api/tasks/settings/route.js +1 -1
  106. package/.next/server/app/api/tasks/templates/route.js +1 -1
  107. package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
  108. package/.next/server/app/api/terminal/[id]/route.js +1 -1
  109. package/.next/server/app/api/terminal/route.js +1 -1
  110. package/.next/server/app/api/themes/[name]/route.js +1 -1
  111. package/.next/server/app/api/themes/route.js +1 -1
  112. package/.next/server/app/api/tools/extension-tools/route.js +1 -1
  113. package/.next/server/app/api/tools/settings/route.js +1 -1
  114. package/.next/server/app/api/usage/route.js +1 -1
  115. package/.next/server/app/api/vision-config/route.js +2 -2
  116. package/.next/server/app/api/web-auth/route.js +1 -0
  117. package/.next/server/app/api/web-auth/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/worktrees/route.js +1 -1
  119. package/.next/server/app/icon.ico/route.js +1 -1
  120. package/.next/server/app/icon.png/route.js +1 -1
  121. package/.next/server/app/icon.svg/route.js +1 -1
  122. package/.next/server/app/index.html +1 -1
  123. package/.next/server/app/index.rsc +5 -5
  124. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  125. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  126. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  127. package/.next/server/app/login/page.js +3 -0
  128. package/.next/server/app/login/page.js.nft.json +1 -0
  129. package/.next/server/app/login/page_client-reference-manifest.js +1 -0
  130. package/.next/server/app/login.html +1 -0
  131. package/.next/server/app/login.meta +26 -0
  132. package/.next/server/app/login.rsc +23 -0
  133. package/.next/server/app/login.segments/_full.segment.rsc +23 -0
  134. package/.next/server/app/login.segments/_tree.segment.rsc +4 -0
  135. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +29 -0
  136. package/.next/server/app/page.js +13 -13
  137. package/.next/server/app/page.js.nft.json +1 -1
  138. package/.next/server/app/page_client-reference-manifest.js +1 -1
  139. package/.next/server/app-paths-manifest.json +21 -19
  140. package/.next/server/chunks/1352.js +1 -0
  141. package/.next/server/chunks/4253.js +7 -7
  142. package/.next/server/chunks/5582.js +5 -5
  143. package/.next/server/chunks/6429.js +7 -7
  144. package/.next/server/chunks/7915.js +1 -1
  145. package/.next/server/instrumentation.js +1 -1
  146. package/.next/server/instrumentation.js.nft.json +1 -1
  147. package/.next/server/middleware-build-manifest.js +1 -1
  148. package/.next/server/middleware.js +1 -1
  149. package/.next/server/pages/404.html +1 -1
  150. package/.next/server/pages/500.html +1 -1
  151. package/.next/server/prefetch-hints.json +14 -0
  152. package/.next/static/SG1lpxg7rrh2GYecN7CkV/_buildManifest.js +1 -0
  153. package/.next/static/chunks/5772-ddd18c0d4b7715e5.js +3 -0
  154. package/.next/static/chunks/7650-4f948821e59fd720.js +1 -0
  155. package/.next/static/chunks/9247-7890abc5e443c0b9.js +1 -0
  156. package/.next/static/chunks/app/_global-error/page-442ef8efc99801fc.js +1 -0
  157. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-442ef8efc99801fc.js +1 -0
  158. package/.next/static/chunks/app/api/agent/[id]/events/route-442ef8efc99801fc.js +1 -0
  159. package/.next/static/chunks/app/api/agent/[id]/lease/route-442ef8efc99801fc.js +1 -0
  160. package/.next/static/chunks/app/api/agent/[id]/route-442ef8efc99801fc.js +1 -0
  161. package/.next/static/chunks/app/api/agent/new/route-442ef8efc99801fc.js +1 -0
  162. package/.next/static/chunks/app/api/agent/running/events/route-442ef8efc99801fc.js +1 -0
  163. package/.next/static/chunks/app/api/agent/running/route-442ef8efc99801fc.js +1 -0
  164. package/.next/static/chunks/app/api/app-update/route-442ef8efc99801fc.js +1 -0
  165. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-442ef8efc99801fc.js +1 -0
  166. package/.next/static/chunks/app/api/auth/combined/route-442ef8efc99801fc.js +1 -0
  167. package/.next/static/chunks/app/api/auth/login/[provider]/route-442ef8efc99801fc.js +1 -0
  168. package/.next/static/chunks/app/api/auth/logout/[provider]/route-442ef8efc99801fc.js +1 -0
  169. package/.next/static/chunks/app/api/auth/providers/route-442ef8efc99801fc.js +1 -0
  170. package/.next/static/chunks/app/api/backup/export/route-442ef8efc99801fc.js +1 -0
  171. package/.next/static/chunks/app/api/backup/import/route-442ef8efc99801fc.js +1 -0
  172. package/.next/static/chunks/app/api/cwd/browse/route-442ef8efc99801fc.js +1 -0
  173. package/.next/static/chunks/app/api/cwd/validate/route-442ef8efc99801fc.js +1 -0
  174. package/.next/static/chunks/app/api/default-cwd/route-442ef8efc99801fc.js +1 -0
  175. package/.next/static/chunks/app/api/events/route-442ef8efc99801fc.js +1 -0
  176. package/.next/static/chunks/app/api/features/route-442ef8efc99801fc.js +1 -0
  177. package/.next/static/chunks/app/api/file-index/route-442ef8efc99801fc.js +1 -0
  178. package/.next/static/chunks/app/api/files/[...path]/route-442ef8efc99801fc.js +1 -0
  179. package/.next/static/chunks/app/api/git/diff/route-442ef8efc99801fc.js +1 -0
  180. package/.next/static/chunks/app/api/git/push/route-442ef8efc99801fc.js +1 -0
  181. package/.next/static/chunks/app/api/git/stash/route-442ef8efc99801fc.js +1 -0
  182. package/.next/static/chunks/app/api/git/status/route-442ef8efc99801fc.js +1 -0
  183. package/.next/static/chunks/app/api/home/route-442ef8efc99801fc.js +1 -0
  184. package/.next/static/chunks/app/api/import/discover/route-442ef8efc99801fc.js +1 -0
  185. package/.next/static/chunks/app/api/import/execute/route-442ef8efc99801fc.js +1 -0
  186. package/.next/static/chunks/app/api/import/status/route-442ef8efc99801fc.js +1 -0
  187. package/.next/static/chunks/app/api/logs/route-442ef8efc99801fc.js +1 -0
  188. package/.next/static/chunks/app/api/mcp/restart/route-442ef8efc99801fc.js +1 -0
  189. package/.next/static/chunks/app/api/mcp/route-442ef8efc99801fc.js +1 -0
  190. package/.next/static/chunks/app/api/models/route-442ef8efc99801fc.js +1 -0
  191. package/.next/static/chunks/app/api/models-config/builtin/route-442ef8efc99801fc.js +1 -0
  192. package/.next/static/chunks/app/api/models-config/catalog/route-442ef8efc99801fc.js +1 -0
  193. package/.next/static/chunks/app/api/models-config/discover/route-442ef8efc99801fc.js +1 -0
  194. package/.next/static/chunks/app/api/models-config/route-442ef8efc99801fc.js +1 -0
  195. package/.next/static/chunks/app/api/models-config/test/route-442ef8efc99801fc.js +1 -0
  196. package/.next/static/chunks/app/api/modes/route-442ef8efc99801fc.js +1 -0
  197. package/.next/static/chunks/app/api/plugins/check/route-442ef8efc99801fc.js +1 -0
  198. package/.next/static/chunks/app/api/plugins/route-442ef8efc99801fc.js +1 -0
  199. package/.next/static/chunks/app/api/project-aliases/route-442ef8efc99801fc.js +1 -0
  200. package/.next/static/chunks/app/api/project-state/route-442ef8efc99801fc.js +1 -0
  201. package/.next/static/chunks/app/api/project-trust/route-442ef8efc99801fc.js +1 -0
  202. package/.next/static/chunks/app/api/projects/visibility/route-442ef8efc99801fc.js +1 -0
  203. package/.next/static/chunks/app/api/provider-usage/query/route-442ef8efc99801fc.js +1 -0
  204. package/.next/static/chunks/app/api/proxy/route-442ef8efc99801fc.js +1 -0
  205. package/.next/static/chunks/app/api/proxy/test/route-442ef8efc99801fc.js +1 -0
  206. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-442ef8efc99801fc.js +1 -0
  207. package/.next/static/chunks/app/api/sessions/[id]/context/route-442ef8efc99801fc.js +1 -0
  208. package/.next/static/chunks/app/api/sessions/[id]/details/route-442ef8efc99801fc.js +1 -0
  209. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-442ef8efc99801fc.js +1 -0
  210. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-442ef8efc99801fc.js +1 -0
  211. package/.next/static/chunks/app/api/sessions/[id]/export/route-442ef8efc99801fc.js +1 -0
  212. package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-442ef8efc99801fc.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/[id]/route-442ef8efc99801fc.js +1 -0
  214. package/.next/static/chunks/app/api/sessions/[id]/state/route-442ef8efc99801fc.js +1 -0
  215. package/.next/static/chunks/app/api/sessions/route-442ef8efc99801fc.js +1 -0
  216. package/.next/static/chunks/app/api/sessions/search/route-442ef8efc99801fc.js +1 -0
  217. package/.next/static/chunks/app/api/settings/title-model/route-442ef8efc99801fc.js +1 -0
  218. package/.next/static/chunks/app/api/skills/check/route-442ef8efc99801fc.js +1 -0
  219. package/.next/static/chunks/app/api/skills/install/route-442ef8efc99801fc.js +1 -0
  220. package/.next/static/chunks/app/api/skills/route-442ef8efc99801fc.js +1 -0
  221. package/.next/static/chunks/app/api/skills/search/route-442ef8efc99801fc.js +1 -0
  222. package/.next/static/chunks/app/api/skills/update/route-442ef8efc99801fc.js +1 -0
  223. package/.next/static/chunks/app/api/snippets/[id]/route-442ef8efc99801fc.js +1 -0
  224. package/.next/static/chunks/app/api/snippets/route-442ef8efc99801fc.js +1 -0
  225. package/.next/static/chunks/app/api/subagents/[id]/route-442ef8efc99801fc.js +1 -0
  226. package/.next/static/chunks/app/api/subagents/profiles/route-442ef8efc99801fc.js +1 -0
  227. package/.next/static/chunks/app/api/subagents/settings/route-442ef8efc99801fc.js +1 -0
  228. package/.next/static/chunks/app/api/tasks/[id]/[action]/route-442ef8efc99801fc.js +1 -0
  229. package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-442ef8efc99801fc.js +1 -0
  230. package/.next/static/chunks/app/api/tasks/[id]/diff/route-442ef8efc99801fc.js +1 -0
  231. package/.next/static/chunks/app/api/tasks/[id]/events/route-442ef8efc99801fc.js +1 -0
  232. package/.next/static/chunks/app/api/tasks/[id]/route-442ef8efc99801fc.js +1 -0
  233. package/.next/static/chunks/app/api/tasks/batch/route-442ef8efc99801fc.js +1 -0
  234. package/.next/static/chunks/app/api/tasks/events/route-442ef8efc99801fc.js +1 -0
  235. package/.next/static/chunks/app/api/tasks/route-442ef8efc99801fc.js +1 -0
  236. package/.next/static/chunks/app/api/tasks/settings/route-442ef8efc99801fc.js +1 -0
  237. package/.next/static/chunks/app/api/tasks/templates/route-442ef8efc99801fc.js +1 -0
  238. package/.next/static/chunks/app/api/terminal/[id]/events/route-442ef8efc99801fc.js +1 -0
  239. package/.next/static/chunks/app/api/terminal/[id]/route-442ef8efc99801fc.js +1 -0
  240. package/.next/static/chunks/app/api/terminal/route-442ef8efc99801fc.js +1 -0
  241. package/.next/static/chunks/app/api/themes/[name]/route-442ef8efc99801fc.js +1 -0
  242. package/.next/static/chunks/app/api/themes/route-442ef8efc99801fc.js +1 -0
  243. package/.next/static/chunks/app/api/tools/extension-tools/route-442ef8efc99801fc.js +1 -0
  244. package/.next/static/chunks/app/api/tools/settings/route-442ef8efc99801fc.js +1 -0
  245. package/.next/static/chunks/app/api/usage/route-442ef8efc99801fc.js +1 -0
  246. package/.next/static/chunks/app/api/vision-config/route-442ef8efc99801fc.js +1 -0
  247. package/.next/static/chunks/app/api/web-auth/route-442ef8efc99801fc.js +1 -0
  248. package/.next/static/chunks/app/api/worktrees/route-442ef8efc99801fc.js +1 -0
  249. package/.next/static/chunks/app/{layout-4d62e08c230b8ea9.js → layout-9aea218f73c7fe87.js} +1 -1
  250. package/.next/static/chunks/app/login/page-0e84371f9eaa744e.js +1 -0
  251. package/.next/static/chunks/app/page-afdc9bc1943a7acf.js +206 -0
  252. package/.next/static/chunks/next/dist/client/components/builtin/app-error-442ef8efc99801fc.js +1 -0
  253. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-442ef8efc99801fc.js +1 -0
  254. package/.next/static/chunks/next/dist/client/components/builtin/not-found-442ef8efc99801fc.js +1 -0
  255. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-442ef8efc99801fc.js +1 -0
  256. package/.next/static/css/452ea33c857da08e.css +1 -0
  257. package/.next/trace +10 -8
  258. package/.next/trace-build +1 -1
  259. package/.next/types/app/api/{deepseek/balance → agent/[id]/lease}/route.ts +3 -3
  260. package/.next/types/app/api/provider-usage/query/route.ts +353 -0
  261. package/.next/types/app/api/{pair → web-auth}/route.ts +3 -3
  262. package/.next/types/app/login/page.ts +89 -0
  263. package/.next/types/routes.d.ts +6 -4
  264. package/.next/types/validator.ts +36 -18
  265. package/package.json +1 -1
  266. package/.next/server/app/api/deepseek/balance/route.js +0 -1
  267. package/.next/server/app/api/pair/route.js +0 -2
  268. package/.next/server/app/api/pair/route_client-reference-manifest.js +0 -1
  269. package/.next/server/chunks/4154.js +0 -1
  270. package/.next/static/chunks/9660-8945dc0e772329fb.js +0 -1
  271. package/.next/static/chunks/app/_global-error/page-1f18a3ac6ad460ce.js +0 -1
  272. package/.next/static/chunks/app/api/agent/[id]/bash-output/route-1f18a3ac6ad460ce.js +0 -1
  273. package/.next/static/chunks/app/api/agent/[id]/events/route-1f18a3ac6ad460ce.js +0 -1
  274. package/.next/static/chunks/app/api/agent/[id]/route-1f18a3ac6ad460ce.js +0 -1
  275. package/.next/static/chunks/app/api/agent/new/route-1f18a3ac6ad460ce.js +0 -1
  276. package/.next/static/chunks/app/api/agent/running/events/route-1f18a3ac6ad460ce.js +0 -1
  277. package/.next/static/chunks/app/api/agent/running/route-1f18a3ac6ad460ce.js +0 -1
  278. package/.next/static/chunks/app/api/app-update/route-1f18a3ac6ad460ce.js +0 -1
  279. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-1f18a3ac6ad460ce.js +0 -1
  280. package/.next/static/chunks/app/api/auth/combined/route-1f18a3ac6ad460ce.js +0 -1
  281. package/.next/static/chunks/app/api/auth/login/[provider]/route-1f18a3ac6ad460ce.js +0 -1
  282. package/.next/static/chunks/app/api/auth/logout/[provider]/route-1f18a3ac6ad460ce.js +0 -1
  283. package/.next/static/chunks/app/api/auth/providers/route-1f18a3ac6ad460ce.js +0 -1
  284. package/.next/static/chunks/app/api/backup/export/route-1f18a3ac6ad460ce.js +0 -1
  285. package/.next/static/chunks/app/api/backup/import/route-1f18a3ac6ad460ce.js +0 -1
  286. package/.next/static/chunks/app/api/cwd/browse/route-1f18a3ac6ad460ce.js +0 -1
  287. package/.next/static/chunks/app/api/cwd/validate/route-1f18a3ac6ad460ce.js +0 -1
  288. package/.next/static/chunks/app/api/deepseek/balance/route-1f18a3ac6ad460ce.js +0 -1
  289. package/.next/static/chunks/app/api/default-cwd/route-1f18a3ac6ad460ce.js +0 -1
  290. package/.next/static/chunks/app/api/events/route-1f18a3ac6ad460ce.js +0 -1
  291. package/.next/static/chunks/app/api/features/route-1f18a3ac6ad460ce.js +0 -1
  292. package/.next/static/chunks/app/api/file-index/route-1f18a3ac6ad460ce.js +0 -1
  293. package/.next/static/chunks/app/api/files/[...path]/route-1f18a3ac6ad460ce.js +0 -1
  294. package/.next/static/chunks/app/api/git/diff/route-1f18a3ac6ad460ce.js +0 -1
  295. package/.next/static/chunks/app/api/git/push/route-1f18a3ac6ad460ce.js +0 -1
  296. package/.next/static/chunks/app/api/git/stash/route-1f18a3ac6ad460ce.js +0 -1
  297. package/.next/static/chunks/app/api/git/status/route-1f18a3ac6ad460ce.js +0 -1
  298. package/.next/static/chunks/app/api/home/route-1f18a3ac6ad460ce.js +0 -1
  299. package/.next/static/chunks/app/api/import/discover/route-1f18a3ac6ad460ce.js +0 -1
  300. package/.next/static/chunks/app/api/import/execute/route-1f18a3ac6ad460ce.js +0 -1
  301. package/.next/static/chunks/app/api/import/status/route-1f18a3ac6ad460ce.js +0 -1
  302. package/.next/static/chunks/app/api/logs/route-1f18a3ac6ad460ce.js +0 -1
  303. package/.next/static/chunks/app/api/mcp/restart/route-1f18a3ac6ad460ce.js +0 -1
  304. package/.next/static/chunks/app/api/mcp/route-1f18a3ac6ad460ce.js +0 -1
  305. package/.next/static/chunks/app/api/models/route-1f18a3ac6ad460ce.js +0 -1
  306. package/.next/static/chunks/app/api/models-config/builtin/route-1f18a3ac6ad460ce.js +0 -1
  307. package/.next/static/chunks/app/api/models-config/catalog/route-1f18a3ac6ad460ce.js +0 -1
  308. package/.next/static/chunks/app/api/models-config/discover/route-1f18a3ac6ad460ce.js +0 -1
  309. package/.next/static/chunks/app/api/models-config/route-1f18a3ac6ad460ce.js +0 -1
  310. package/.next/static/chunks/app/api/models-config/test/route-1f18a3ac6ad460ce.js +0 -1
  311. package/.next/static/chunks/app/api/modes/route-1f18a3ac6ad460ce.js +0 -1
  312. package/.next/static/chunks/app/api/pair/route-1f18a3ac6ad460ce.js +0 -1
  313. package/.next/static/chunks/app/api/plugins/check/route-1f18a3ac6ad460ce.js +0 -1
  314. package/.next/static/chunks/app/api/plugins/route-1f18a3ac6ad460ce.js +0 -1
  315. package/.next/static/chunks/app/api/project-aliases/route-1f18a3ac6ad460ce.js +0 -1
  316. package/.next/static/chunks/app/api/project-state/route-1f18a3ac6ad460ce.js +0 -1
  317. package/.next/static/chunks/app/api/project-trust/route-1f18a3ac6ad460ce.js +0 -1
  318. package/.next/static/chunks/app/api/projects/visibility/route-1f18a3ac6ad460ce.js +0 -1
  319. package/.next/static/chunks/app/api/proxy/route-1f18a3ac6ad460ce.js +0 -1
  320. package/.next/static/chunks/app/api/proxy/test/route-1f18a3ac6ad460ce.js +0 -1
  321. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-1f18a3ac6ad460ce.js +0 -1
  322. package/.next/static/chunks/app/api/sessions/[id]/context/route-1f18a3ac6ad460ce.js +0 -1
  323. package/.next/static/chunks/app/api/sessions/[id]/details/route-1f18a3ac6ad460ce.js +0 -1
  324. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-1f18a3ac6ad460ce.js +0 -1
  325. package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-1f18a3ac6ad460ce.js +0 -1
  326. package/.next/static/chunks/app/api/sessions/[id]/export/route-1f18a3ac6ad460ce.js +0 -1
  327. package/.next/static/chunks/app/api/sessions/[id]/queue-recovery/route-1f18a3ac6ad460ce.js +0 -1
  328. package/.next/static/chunks/app/api/sessions/[id]/route-1f18a3ac6ad460ce.js +0 -1
  329. package/.next/static/chunks/app/api/sessions/[id]/state/route-1f18a3ac6ad460ce.js +0 -1
  330. package/.next/static/chunks/app/api/sessions/route-1f18a3ac6ad460ce.js +0 -1
  331. package/.next/static/chunks/app/api/sessions/search/route-1f18a3ac6ad460ce.js +0 -1
  332. package/.next/static/chunks/app/api/settings/title-model/route-1f18a3ac6ad460ce.js +0 -1
  333. package/.next/static/chunks/app/api/skills/check/route-1f18a3ac6ad460ce.js +0 -1
  334. package/.next/static/chunks/app/api/skills/install/route-1f18a3ac6ad460ce.js +0 -1
  335. package/.next/static/chunks/app/api/skills/route-1f18a3ac6ad460ce.js +0 -1
  336. package/.next/static/chunks/app/api/skills/search/route-1f18a3ac6ad460ce.js +0 -1
  337. package/.next/static/chunks/app/api/skills/update/route-1f18a3ac6ad460ce.js +0 -1
  338. package/.next/static/chunks/app/api/snippets/[id]/route-1f18a3ac6ad460ce.js +0 -1
  339. package/.next/static/chunks/app/api/snippets/route-1f18a3ac6ad460ce.js +0 -1
  340. package/.next/static/chunks/app/api/subagents/[id]/route-1f18a3ac6ad460ce.js +0 -1
  341. package/.next/static/chunks/app/api/subagents/profiles/route-1f18a3ac6ad460ce.js +0 -1
  342. package/.next/static/chunks/app/api/subagents/settings/route-1f18a3ac6ad460ce.js +0 -1
  343. package/.next/static/chunks/app/api/tasks/[id]/[action]/route-1f18a3ac6ad460ce.js +0 -1
  344. package/.next/static/chunks/app/api/tasks/[id]/changed-files/route-1f18a3ac6ad460ce.js +0 -1
  345. package/.next/static/chunks/app/api/tasks/[id]/diff/route-1f18a3ac6ad460ce.js +0 -1
  346. package/.next/static/chunks/app/api/tasks/[id]/events/route-1f18a3ac6ad460ce.js +0 -1
  347. package/.next/static/chunks/app/api/tasks/[id]/route-1f18a3ac6ad460ce.js +0 -1
  348. package/.next/static/chunks/app/api/tasks/batch/route-1f18a3ac6ad460ce.js +0 -1
  349. package/.next/static/chunks/app/api/tasks/events/route-1f18a3ac6ad460ce.js +0 -1
  350. package/.next/static/chunks/app/api/tasks/route-1f18a3ac6ad460ce.js +0 -1
  351. package/.next/static/chunks/app/api/tasks/settings/route-1f18a3ac6ad460ce.js +0 -1
  352. package/.next/static/chunks/app/api/tasks/templates/route-1f18a3ac6ad460ce.js +0 -1
  353. package/.next/static/chunks/app/api/terminal/[id]/events/route-1f18a3ac6ad460ce.js +0 -1
  354. package/.next/static/chunks/app/api/terminal/[id]/route-1f18a3ac6ad460ce.js +0 -1
  355. package/.next/static/chunks/app/api/terminal/route-1f18a3ac6ad460ce.js +0 -1
  356. package/.next/static/chunks/app/api/themes/[name]/route-1f18a3ac6ad460ce.js +0 -1
  357. package/.next/static/chunks/app/api/themes/route-1f18a3ac6ad460ce.js +0 -1
  358. package/.next/static/chunks/app/api/tools/extension-tools/route-1f18a3ac6ad460ce.js +0 -1
  359. package/.next/static/chunks/app/api/tools/settings/route-1f18a3ac6ad460ce.js +0 -1
  360. package/.next/static/chunks/app/api/usage/route-1f18a3ac6ad460ce.js +0 -1
  361. package/.next/static/chunks/app/api/vision-config/route-1f18a3ac6ad460ce.js +0 -1
  362. package/.next/static/chunks/app/api/worktrees/route-1f18a3ac6ad460ce.js +0 -1
  363. package/.next/static/chunks/app/page-8395b621a827f00d.js +0 -206
  364. package/.next/static/chunks/next/dist/client/components/builtin/app-error-1f18a3ac6ad460ce.js +0 -1
  365. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-1f18a3ac6ad460ce.js +0 -1
  366. package/.next/static/chunks/next/dist/client/components/builtin/not-found-1f18a3ac6ad460ce.js +0 -1
  367. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-1f18a3ac6ad460ce.js +0 -1
  368. package/.next/static/css/cec93cc3229def39.css +0 -1
  369. package/.next/static/fwxgxkq48MSClqkLjyFF9/_buildManifest.js +0 -1
  370. /package/.next/server/app/api/{pair → web-auth}/route.js.nft.json +0 -0
  371. /package/.next/static/{fwxgxkq48MSClqkLjyFF9 → SG1lpxg7rrh2GYecN7CkV}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},6999:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Tu:()=>o,o$:()=>n});var e=c(73024),f=c(76760),g=c(80974),h=c.n(g),i=c(75430),j=c(8102),k=a([i]);i=(k.then?(await k)():k)[0];let p={retries:{retries:10,factor:2,minTimeout:50,maxTimeout:2e3,randomize:!0},stale:3e4};function l(){return(0,f.join)((0,i.getAgentDir)(),"settings.json")}function m(){let a=l();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}async function n(a){let b=l(),c=null,d=await h().lock(b,{...p,onCompromised:a=>{c=a}});try{if(c)throw c;let d=m(),e=await a(d);if(c)throw c;if(!e||"object"!=typeof e||!e.settings)throw Error("settings.json mutation must return { settings }");if(!1===e.changed)return{changed:!1};if((0,j.$)(b,JSON.stringify(e.settings,null,2)),c)throw c;return{changed:!0}}finally{d().catch(()=>{})}}function o(){return m()}d()}catch(a){d(a)}})},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){let c=d(),e=c.entries.get(a);if(e&&e.expiresAt>Date.now())return Promise.resolve(e.data);if(e)return c.inFlight.has(a)||g(c,a,b).catch(()=>{}),Promise.resolve(e.data);let f=c.inFlight.get(a);return f||g(c,a,b)}function g(a,b,c){let d=a.inFlight.get(b);if(d)return d;let e=a.generation,f=Promise.resolve().then(c).then(c=>{if(a.generation===e&&a.inFlight.get(b)===f){let d=Date.now();for(let[b,c]of a.entries)c.expiresAt<=d&&a.entries.delete(b);for(;a.entries.size>=32;){let b=a.entries.keys().next().value;if(void 0===b)break;a.entries.delete(b)}a.entries.set(b,{data:c,expiresAt:d+6e4})}return c}).finally(()=>{a.inFlight.get(b)===f&&a.inFlight.delete(b)});return a.inFlight.set(b,f),f}c.d(b,{k:()=>e,r:()=>f})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67742:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/auth/logout/[provider]/route.ts",nextConfigOutput:"standalone",userland:()=>c(86152),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/[provider]/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},69429:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{C:()=>n,Q:()=>m});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=a([g]);g=(j.then?(await j)():j)[0];let o={encoding:"utf-8",mode:384};function k(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}async function l(a,b){let c,d=(0,f.dirname)(a);if((0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448}),!(0,e.existsSync)(a)){(0,e.writeFileSync)(a,"{}",o);try{(0,e.chmodSync)(a,384)}catch{}}let g=await i().lock(a,{retries:{retries:10,factor:2,minTimeout:100,maxTimeout:1e4,randomize:!0},stale:3e4,onCompromised:a=>{c=a}}),h=()=>{if(c)throw c};try{h();let c=JSON.parse((0,e.readFileSync)(a,"utf-8"));if(!k(c))throw Error("Invalid auth.json: expected an object");let{result:d,changed:f}=b(c);if(f){h(),(0,e.writeFileSync)(a,JSON.stringify(c,null,2),o);try{(0,e.chmodSync)(a,384)}catch{}h()}return d}finally{try{await g()}catch{}}}function m(a,b,c=(0,f.join)((0,g.getAgentDir)(),"auth.json")){return l(c,c=>(c[a]=b,{result:void 0,changed:!0}))}function n(a,b,c=(0,f.join)((0,g.getAgentDir)(),"auth.json")){return l(c,c=>{if(!Object.hasOwn(c,a))return{result:{status:"not_found"},changed:!1};let d=c[a],e=k(d)&&"string"==typeof d.type?d.type:"unknown";return e!==b?{result:{status:"type_mismatch",storedType:e},changed:!1}:(delete c[a],{result:{status:"removed"},changed:!0})})}d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(75430),f=c(28967),g=c(18904),h=c(69429),i=a([e,g,h]);[e,g,h]=i.then?(await i)():i;let k="force-dynamic";async function j(a,{params:b}){let{provider:c}=await b,d=await e.ModelRuntime.create();if(!d.getProvider(c)?.auth.oauth)return Response.json({error:`Unknown provider: ${c}`},{status:400});let i=await (0,h.C)(c,"oauth");return"type_mismatch"===i.status?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):((0,f.k)(),(0,g.Ln)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,974,8904],()=>b(b.s=67742));module.exports=c})();
1
+ (()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},6999:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Tu:()=>o,o$:()=>n});var e=c(73024),f=c(76760),g=c(80974),h=c.n(g),i=c(75430),j=c(8102),k=a([i]);i=(k.then?(await k)():k)[0];let p={retries:{retries:10,factor:2,minTimeout:50,maxTimeout:2e3,randomize:!0},stale:3e4};function l(){return(0,f.join)((0,i.getAgentDir)(),"settings.json")}function m(){let a=l();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}async function n(a){let b=l(),c=null,d=await h().lock(b,{...p,onCompromised:a=>{c=a}});try{if(c)throw c;let d=m(),e=await a(d);if(c)throw c;if(!e||"object"!=typeof e||!e.settings)throw Error("settings.json mutation must return { settings }");if(!1===e.changed)return{changed:!1};if((0,j.$)(b,JSON.stringify(e.settings,null,2)),c)throw c;return{changed:!0}}finally{d().catch(()=>{})}}function o(){return m()}d()}catch(a){d(a)}})},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__piModelsCacheState||(globalThis.__piModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__piModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){let c=d(),e=c.entries.get(a);if(e&&e.expiresAt>Date.now())return Promise.resolve(e.data);if(e)return c.inFlight.has(a)||g(c,a,b).catch(()=>{}),Promise.resolve(e.data);let f=c.inFlight.get(a);return f||g(c,a,b)}function g(a,b,c){let d=a.inFlight.get(b);if(d)return d;let e=a.generation,f=Promise.resolve().then(c).then(c=>{if(a.generation===e&&a.inFlight.get(b)===f){let d=Date.now();for(let[b,c]of a.entries)c.expiresAt<=d&&a.entries.delete(b);for(;a.entries.size>=32;){let b=a.entries.keys().next().value;if(void 0===b)break;a.entries.delete(b)}a.entries.set(b,{data:c,expiresAt:d+6e4})}return c}).finally(()=>{a.inFlight.get(b)===f&&a.inFlight.delete(b)});return a.inFlight.set(b,f),f}c.d(b,{k:()=>e,r:()=>f})},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},37598:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/logout/[provider]/route",pathname:"/api/auth/logout/[provider]",filename:"route",bundlePath:"app/api/auth/logout/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/auth/logout/[provider]/route.ts",nextConfigOutput:"standalone",userland:()=>c(86152),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/[provider]/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69429:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{C:()=>n,Q:()=>m});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=a([g]);g=(j.then?(await j)():j)[0];let o={encoding:"utf-8",mode:384};function k(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}async function l(a,b){let c,d=(0,f.dirname)(a);if((0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448}),!(0,e.existsSync)(a)){(0,e.writeFileSync)(a,"{}",o);try{(0,e.chmodSync)(a,384)}catch{}}let g=await i().lock(a,{retries:{retries:10,factor:2,minTimeout:100,maxTimeout:1e4,randomize:!0},stale:3e4,onCompromised:a=>{c=a}}),h=()=>{if(c)throw c};try{h();let c=JSON.parse((0,e.readFileSync)(a,"utf-8"));if(!k(c))throw Error("Invalid auth.json: expected an object");let{result:d,changed:f}=b(c);if(f){h(),(0,e.writeFileSync)(a,JSON.stringify(c,null,2),o);try{(0,e.chmodSync)(a,384)}catch{}h()}return d}finally{try{await g()}catch{}}}function m(a,b,c=(0,f.join)((0,g.getAgentDir)(),"auth.json")){return l(c,c=>(c[a]=b,{result:void 0,changed:!0}))}function n(a,b,c=(0,f.join)((0,g.getAgentDir)(),"auth.json")){return l(c,c=>{if(!Object.hasOwn(c,a))return{result:{status:"not_found"},changed:!1};let d=c[a],e=k(d)&&"string"==typeof d.type?d.type:"unknown";return e!==b?{result:{status:"type_mismatch",storedType:e},changed:!1}:(delete c[a],{result:{status:"removed"},changed:!0})})}d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},86152:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(75430),f=c(28967),g=c(18904),h=c(69429),i=a([e,g,h]);[e,g,h]=i.then?(await i)():i;let k="force-dynamic";async function j(a,{params:b}){let{provider:c}=await b,d=await e.ModelRuntime.create();if(!d.getProvider(c)?.auth.oauth)return Response.json({error:`Unknown provider: ${c}`},{status:400});let i=await (0,h.C)(c,"oauth");return"type_mismatch"===i.status?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):((0,f.k)(),(0,g.Ln)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,974,8904],()=>b(b.s=37598));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";async function d(a){let b=a.getModels(),c=new Map;try{for(let b of(await a.listCredentials()))("api_key"===b.type||"oauth"===b.type)&&c.set(b.providerId,b.type)}catch{}return a.getProviders().map(d=>({id:d.id,name:d.name,hasApiKeyLogin:!!d.auth.apiKey?.login,hasOAuth:!!d.auth.oauth,...d.auth.oauth?.name?{oauthName:d.auth.oauth.name}:{},status:a.getProviderAuthStatus(d.id),...c.has(d.id)?{credentialType:c.get(d.id)}:{},modelCount:b.filter(a=>a.provider===d.id).length}))}c.d(b,{z:()=>d})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49482:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/auth/providers/route.ts",nextConfigOutput:"standalone",userland:()=>c(69226),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,dynamic:()=>j});var e=c(75430),f=c(89950),g=c(28247),h=a([e]);e=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(){let a=await e.ModelRuntime.create(),b=await (0,g.z)(a),c=(0,f.l)(b),d=(0,f.z)(b);return Response.json({providers:c,oauthProviders:c,apiKeyProviders:d})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89950:(a,b,c)=>{"use strict";c.d(b,{l:()=>h,z:()=>g});let d=new Set(["models_json_key","models_json_command"]),e={"openai-codex":"ChatGPT Plus/Pro","github-copilot":"GitHub Copilot"};function f(a){let b=new Set;return a.filter(a=>!b.has(a.id)&&(b.add(a.id),!0))}function g(a){return f(a).flatMap(a=>{if(!a.hasApiKeyLogin||a.status.source&&d.has(a.status.source))return[];let b=a.status.configured&&"oauth"!==a.credentialType;return[{id:a.id,displayName:a.name,configured:b,...b&&a.status.source?{source:a.status.source}:{},modelCount:a.modelCount,supportsOAuth:a.hasOAuth}]})}function h(a){return f(a).flatMap(a=>a.hasOAuth?[{id:a.id,name:e[a.id]??a.oauthName??a.name,usesCallbackServer:!1,loggedIn:"oauth"===a.credentialType,supportsApiKey:a.hasApiKeyLogin}]:[])}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=49482));module.exports=c})();
1
+ (()=>{var a={};a.id=6919,a.ids=[6919],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},28247:(a,b,c)=>{"use strict";async function d(a){let b=a.getModels(),c=new Map;try{for(let b of(await a.listCredentials()))("api_key"===b.type||"oauth"===b.type)&&c.set(b.providerId,b.type)}catch{}return a.getProviders().map(d=>({id:d.id,name:d.name,hasApiKeyLogin:!!d.auth.apiKey?.login,hasOAuth:!!d.auth.oauth,...d.auth.oauth?.name?{oauthName:d.auth.oauth.name}:{},status:a.getProviderAuthStatus(d.id),...c.has(d.id)?{credentialType:c.get(d.id)}:{},modelCount:b.filter(a=>a.provider===d.id).length}))}c.d(b,{z:()=>d})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69226:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,dynamic:()=>j});var e=c(75430),f=c(89950),g=c(28247),h=a([e]);e=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(){let a=await e.ModelRuntime.create(),b=await (0,g.z)(a),c=(0,f.l)(b),d=(0,f.z)(b);return Response.json({providers:c,oauthProviders:c,apiKeyProviders:d})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},82626:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/providers/route",pathname:"/api/auth/providers",filename:"route",bundlePath:"app/api/auth/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/auth/providers/route.ts",nextConfigOutput:"standalone",userland:()=>c(69226),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89950:(a,b,c)=>{"use strict";c.d(b,{l:()=>h,z:()=>g});let d=new Set(["models_json_key","models_json_command"]),e={"openai-codex":"ChatGPT Plus/Pro","github-copilot":"GitHub Copilot"};function f(a){let b=new Set;return a.filter(a=>!b.has(a.id)&&(b.add(a.id),!0))}function g(a){return f(a).flatMap(a=>{if(!a.hasApiKeyLogin||a.status.source&&d.has(a.status.source))return[];let b=a.status.configured&&"oauth"!==a.credentialType;return[{id:a.id,displayName:a.name,configured:b,...b&&a.status.source?{source:a.status.source}:{},modelCount:a.modelCount,supportsOAuth:a.hasOAuth}]})}function h(a){return f(a).flatMap(a=>a.hasOAuth?[{id:a.id,name:e[a.id]??a.oauthName??a.name,usesCallbackServer:!1,loggedIn:"oauth"===a.credentialType,supportsApiKey:a.hasApiKeyLogin}]:[])}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=82626));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=3853,a.ids=[3853],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69052:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(23211),f=c(89628),g=c(66544),h=a([f]);f=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){if(!(0,g.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});try{let b=await a.json(),c=(0,f.uj)({includeSecrets:!1!==b.includeSecrets,includeSessions:!0===b.includeSessions}),d=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);return new e.NextResponse(new Uint8Array(c),{status:200,headers:{"Content-Type":"application/zip","Content-Disposition":`attachment; filename="pi-backup-${d}.zip"`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77030:a=>{a.exports=require("node:net")},83122:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/backup/export/route",pathname:"/api/backup/export",filename:"route",bundlePath:"app/api/backup/export/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/backup/export/route.ts",nextConfigOutput:"standalone",userland:()=>c(69052),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/backup/export/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,6106,7915],()=>b(b.s=83122));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=3853,a.ids=[3853],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},15898:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/backup/export/route",pathname:"/api/backup/export",filename:"route",bundlePath:"app/api/backup/export/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/backup/export/route.ts",nextConfigOutput:"standalone",userland:()=>c(69052),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/backup/export/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69052:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(23211),f=c(89628),g=c(66544),h=a([f]);f=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){if(!(0,g.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});try{let b=await a.json(),c=(0,f.uj)({includeSecrets:!1!==b.includeSecrets,includeSessions:!0===b.includeSessions}),d=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);return new e.NextResponse(new Uint8Array(c),{status:200,headers:{"Content-Type":"application/zip","Content-Disposition":`attachment; filename="pi-backup-${d}.zip"`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77030:a=>{a.exports=require("node:net")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,6106,7915],()=>b(b.s=15898));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=3408,a.ids=[3408],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46832:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/backup/import/route",pathname:"/api/backup/import",filename:"route",bundlePath:"app/api/backup/import/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/backup/import/route.ts",nextConfigOutput:"standalone",userland:()=>c(89267),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/backup/import/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72498:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Fk:()=>i,Y1:()=>g,er:()=>h});var e=c(75430),f=a([e]);function g(a,b){return a&&(0,e.hasTrustRequiringProjectResources)(a)?{requiresTrust:!0,trusted:!0===new e.ProjectTrustStore(b).get(a)}:{requiresTrust:!1,trusted:!0}}function h(a,b){let c=g(a,b);return c.requiresTrust?(new e.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0}):c}function i(a,b){if(!g(a,b).requiresTrust)return;let c=new e.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77030:a=>{a.exports=require("node:net")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89267:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>n,dynamic:()=>o});var e=c(23211),f=c(55511),g=c(21820),h=c(75430),i=c(89628),j=c(66544),k=c(72498),l=a([h,i,k]);[h,i,k]=l.then?(await l)():l;let o="force-dynamic",p=globalThis.__piBackupBuffers??=new Map;function m(a,b=400){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:b})}async function n(a){let b;if(!(0,j.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});try{b=await a.formData()}catch{return e.NextResponse.json({error:"Failed to parse form data — the upload may be too large or malformed"},{status:413})}let c=b.get("file");if(c instanceof File&&c.size>0x20000000)return e.NextResponse.json({error:`File too large (${(c.size/1024/1024).toFixed(1)}MB). Maximum is 512MB.`},{status:413});let d=String(b.get("phase")??"parse");try{if("parse"===d){let a;if(!(c instanceof File))return m("file field required",400);let b=Buffer.from(await c.arrayBuffer()),d=(0,i.DT)(b);try{let b=(0,i.jE)(d.servers,d.binScripts);a={manifest:d.manifest,categories:d.categories,servers:b.servers,warnings:[...d.manifest.warnings,...b.warnings],npmPackages:(0,i.lz)(d)}}finally{(0,i.g3)(d)}let g=function(a){let b=(0,f.randomUUID)();if(p.set(b,{buffer:a,expiresAt:Date.now()+18e5}),p.size>16){let a=Date.now();for(let[b,c]of p)c.expiresAt<=a&&p.delete(b);for(;p.size>16;){let a=null,b=1/0;for(let[c,d]of p)d.expiresAt<b&&(b=d.expiresAt,a=c);if(null===a)break;p.delete(a)}}return b}(b);return e.NextResponse.json({phase:"preview",token:g,preview:a})}if("restore"===d){let a,c,d,f,j=String(b.get("token")??""),l=(f=p.get(j))?f.expiresAt<=Date.now()?(p.delete(j),null):f.buffer:null;if(!l)return m("Backup token expired — please upload the file again",400);let n=String(b.get("selections")??"");try{a=JSON.parse(n)}catch{return m("Invalid selections payload",400)}if(!Array.isArray(a.categories))return m("selections.categories required",400);Array.isArray(a.skippedMcpServers)||(a.skippedMcpServers=[]);let o=(0,i.DT)(l);try{let b=(0,i.dH)(o,a);c=b.report,d=b.npmPackages}finally{(0,i.g3)(o)}if(p.delete(j),!0===a.reinstallNpm&&d.length>0){let a=(0,h.getAgentDir)(),b=(0,g.homedir)(),e=h.SettingsManager.create(b,a,{projectTrusted:(0,k.Y1)(b,a).trusted}),f=new h.DefaultPackageManager({cwd:b,agentDir:a,settingsManager:e});(async()=>{for(let a of d)try{await f.installAndPersist(a,{local:!1})}catch(b){c.warnings.push(`npm package ${a} reinstall failed: ${b instanceof Error?b.message:String(b)}`)}})(),c.warnings.push(`npm packages reinstalling in background: ${d.join(", ")} — restart to load them.`)}return e.NextResponse.json({phase:"report",report:c})}return m(`Unsupported phase: ${d}`,400)}catch(a){return m(a,400)}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,6106,7915],()=>b(b.s=46832));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=3408,a.ids=[3408],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},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")},34396:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/backup/import/route",pathname:"/api/backup/import",filename:"route",bundlePath:"app/api/backup/import/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/backup/import/route.ts",nextConfigOutput:"standalone",userland:()=>c(89267),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/backup/import/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},72498:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Fk:()=>i,Y1:()=>g,er:()=>h});var e=c(75430),f=a([e]);function g(a,b){return a&&(0,e.hasTrustRequiringProjectResources)(a)?{requiresTrust:!0,trusted:!0===new e.ProjectTrustStore(b).get(a)}:{requiresTrust:!1,trusted:!0}}function h(a,b){let c=g(a,b);return c.requiresTrust?(new e.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0}):c}function i(a,b){if(!g(a,b).requiresTrust)return;let c=new e.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},77030:a=>{a.exports=require("node:net")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89267:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>n,dynamic:()=>o});var e=c(23211),f=c(55511),g=c(21820),h=c(75430),i=c(89628),j=c(66544),k=c(72498),l=a([h,i,k]);[h,i,k]=l.then?(await l)():l;let o="force-dynamic",p=globalThis.__piBackupBuffers??=new Map;function m(a,b=400){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:b})}async function n(a){let b;if(!(0,j.EN)(a))return e.NextResponse.json({error:"Access denied"},{status:403});try{b=await a.formData()}catch{return e.NextResponse.json({error:"Failed to parse form data — the upload may be too large or malformed"},{status:413})}let c=b.get("file");if(c instanceof File&&c.size>0x20000000)return e.NextResponse.json({error:`File too large (${(c.size/1024/1024).toFixed(1)}MB). Maximum is 512MB.`},{status:413});let d=String(b.get("phase")??"parse");try{if("parse"===d){let a;if(!(c instanceof File))return m("file field required",400);let b=Buffer.from(await c.arrayBuffer()),d=(0,i.DT)(b);try{let b=(0,i.jE)(d.servers,d.binScripts);a={manifest:d.manifest,categories:d.categories,servers:b.servers,warnings:[...d.manifest.warnings,...b.warnings],npmPackages:(0,i.lz)(d)}}finally{(0,i.g3)(d)}let g=function(a){let b=(0,f.randomUUID)();if(p.set(b,{buffer:a,expiresAt:Date.now()+18e5}),p.size>16){let a=Date.now();for(let[b,c]of p)c.expiresAt<=a&&p.delete(b);for(;p.size>16;){let a=null,b=1/0;for(let[c,d]of p)d.expiresAt<b&&(b=d.expiresAt,a=c);if(null===a)break;p.delete(a)}}return b}(b);return e.NextResponse.json({phase:"preview",token:g,preview:a})}if("restore"===d){let a,c,d,f,j=String(b.get("token")??""),l=(f=p.get(j))?f.expiresAt<=Date.now()?(p.delete(j),null):f.buffer:null;if(!l)return m("Backup token expired — please upload the file again",400);let n=String(b.get("selections")??"");try{a=JSON.parse(n)}catch{return m("Invalid selections payload",400)}if(!Array.isArray(a.categories))return m("selections.categories required",400);Array.isArray(a.skippedMcpServers)||(a.skippedMcpServers=[]);let o=(0,i.DT)(l);try{let b=(0,i.dH)(o,a);c=b.report,d=b.npmPackages}finally{(0,i.g3)(o)}if(p.delete(j),!0===a.reinstallNpm&&d.length>0){let a=(0,h.getAgentDir)(),b=(0,g.homedir)(),e=h.SettingsManager.create(b,a,{projectTrusted:(0,k.Y1)(b,a).trusted}),f=new h.DefaultPackageManager({cwd:b,agentDir:a,settingsManager:e});(async()=>{for(let a of d)try{await f.installAndPersist(a,{local:!1})}catch(b){c.warnings.push(`npm package ${a} reinstall failed: ${b instanceof Error?b.message:String(b)}`)}})(),c.warnings.push(`npm packages reinstalling in background: ${d.join(", ")} — restart to load them.`)}return e.NextResponse.json({phase:"report",report:c})}return m(`Unsupported phase: ${d}`,400)}catch(a){return m(a,400)}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,6106,7915],()=>b(b.s=34396));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1180:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>n});var d=c(23211),e=c(79748),f=c(21820),g=c(33873),h=c.n(g),i=c(58864);async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,e.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?h().win32:h().posix,c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function l(a){return(0,e.realpath)(function(a,b=process.platform){return"~"===a?(0,f.homedir)():a.startsWith("~/")?h().resolve((0,f.homedir)(),a.slice(2)):"linux"===b&&/^[a-zA-Z]:/.test(a)?h().resolve((0,i.pJ)(a)):h().resolve(a)}(a))}async function m(a){let b=await (0,e.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:h().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=h().join(a,b.name),d=await (0,e.realpath)(c);if(!(await (0,e.stat)(d)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}async function n(a){try{let b,c=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(c))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let g=c||(0,f.homedir)();try{b=await l(g)}catch{return d.NextResponse.json({error:"Directory does not exist"},{status:404})}let h=await (0,e.stat)(b);if(!h.isDirectory()){let a=k(b);if(a)try{let c=await (0,e.stat)(a);c.isDirectory()&&(b=a,h=c)}catch{}}if(!h.isDirectory())return d.NextResponse.json({error:"Path is not a directory"},{status:400});let i=await m(b);return d.NextResponse.json({path:b,parentPath:k(b),directories:i})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},54762:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/cwd/browse/route.ts",nextConfigOutput:"standalone",userland:()=>c(1180),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},58864:(a,b,c)=>{"use strict";c.d(b,{A_:()=>h,Eb:()=>k,W3:()=>j,gB:()=>i,pJ:()=>g,uK:()=>f});var d=c(33873);let e=/^[a-zA-Z]:[\\/]/;function f(a){return e.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function g(a){let b=a.trim().match(/^([a-zA-Z]):(?:[\\/](.*))?$/);if(b){let a=b[1].toLowerCase(),c=(b[2]??"").replace(/\\/g,"/");return c?`/mnt/${a}/${c}`:`/mnt/${a}`}return a}function h(a){let b=a.join("/"),c=j(b);return/^[a-zA-Z]:$/.test(c)?`${c}/`:f(c)?c:"/"+b.replace(/^\/+/,"")}function i(a){return a&&"win32"===process.platform?(0,d.normalize)(a):a}function j(a){return a.replace(/\\/g,"/")}function k(a,b){return a===b||!!a&&!!b&&"win32"===process.platform&&i(a).toLowerCase()===i(b).toLowerCase()}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=54762));module.exports=c})();
1
+ (()=>{var a={};a.id=7769,a.ids=[7769],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1180:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>n});var d=c(23211),e=c(79748),f=c(21820),g=c(33873),h=c.n(g),i=c(58864);async function j(){return(await Promise.all("ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(a=>({name:`${a}:`,path:`${a}:\\`})).map(async a=>{try{return(await (0,e.stat)(a.path)).isDirectory()?a:null}catch{return null}}))).filter(a=>null!==a)}function k(a){let b=/^[a-zA-Z]:[\\/]/.test(a)||a.startsWith("\\\\")?h().win32:h().posix,c=b.normalize(a),d=b.dirname(c);return d===c?null:d}async function l(a){return(0,e.realpath)(function(a,b=process.platform){return"~"===a?(0,f.homedir)():a.startsWith("~/")?h().resolve((0,f.homedir)(),a.slice(2)):"linux"===b&&/^[a-zA-Z]:/.test(a)?h().resolve((0,i.pJ)(a)):h().resolve(a)}(a))}async function m(a){let b=await (0,e.readdir)(a,{withFileTypes:!0});return(await Promise.all(b.map(async b=>{if(b.isDirectory())return{name:b.name,path:h().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=h().join(a,b.name),d=await (0,e.realpath)(c);if(!(await (0,e.stat)(d)).isDirectory())return null;return{name:b.name,path:c}}catch{return null}}))).filter(a=>null!==a).sort((a,b)=>a.name.localeCompare(b.name))}async function n(a){try{let b,c=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(c))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let g=c||(0,f.homedir)();try{b=await l(g)}catch{return d.NextResponse.json({error:"Directory does not exist"},{status:404})}let h=await (0,e.stat)(b);if(!h.isDirectory()){let a=k(b);if(a)try{let c=await (0,e.stat)(a);c.isDirectory()&&(b=a,h=c)}catch{}}if(!h.isDirectory())return d.NextResponse.json({error:"Path is not a directory"},{status:400});let i=await m(b);return d.NextResponse.json({path:b,parentPath:k(b),directories:i})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},27938:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/browse/route",pathname:"/api/cwd/browse",filename:"route",bundlePath:"app/api/cwd/browse/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/cwd/browse/route.ts",nextConfigOutput:"standalone",userland:()=>c(1180),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},58864:(a,b,c)=>{"use strict";c.d(b,{A_:()=>h,Eb:()=>k,W3:()=>j,gB:()=>i,pJ:()=>g,uK:()=>f});var d=c(33873);let e=/^[a-zA-Z]:[\\/]/;function f(a){return e.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function g(a){let b=a.trim().match(/^([a-zA-Z]):(?:[\\/](.*))?$/);if(b){let a=b[1].toLowerCase(),c=(b[2]??"").replace(/\\/g,"/");return c?`/mnt/${a}/${c}`:`/mnt/${a}`}return a}function h(a){let b=a.join("/"),c=j(b);return/^[a-zA-Z]:$/.test(c)?`${c}/`:f(c)?c:"/"+b.replace(/^\/+/,"")}function i(a){return a&&"win32"===process.platform?(0,d.normalize)(a):a}function j(a){return a.replace(/\\/g,"/")}function k(a,b){return a===b||!!a&&!!b&&"win32"===process.platform&&i(a).toLowerCase()===i(b).toLowerCase()}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=27938));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},9698:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/cwd/validate/route.ts",nextConfigOutput:"standalone",userland:()=>c(20816),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20816:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>o});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(58864),k=c(66544),l=c(74244),m=c(24923),n=a([i]);async function o(a){if(!(0,k.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,k.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b,c,d=await a.json(),k="string"==typeof d.cwd?d.cwd.trim():"";if(!k)return e.NextResponse.json({error:"Path is required"},{status:400});let n="~"===k?(0,g.homedir)():k.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),k.slice(2)):"linux"===process.platform&&/^[a-zA-Z]:/.test(k)?(0,h.resolve)((0,j.pJ)(k)):(0,h.isAbsolute)(k)?k:(0,h.resolve)(k);try{b=(0,f.statSync)(n)}catch{return e.NextResponse.json({error:`Directory does not exist: ${k}`},{status:400})}if(!b.isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${k}`},{status:400});try{c=(0,f.realpathSync)(n)}catch{c=n}(0,i.wz)(c);let o=await (0,m.KI)(c);return e.NextResponse.json({success:!0,cwd:c,projectRoot:o.projectRoot,projectKey:(0,l.z)(o.projectRoot)})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(n.then?(await n)():n)[0],d()}catch(a){d(a)}})},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")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>l,EN:()=>k});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(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;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}let j=new Set(["POST","PUT","PATCH","DELETE"]);function k(a,b=h()){if(!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b))return!1;if(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))return!0;if(!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))){if(j.has((a.method??"GET").toUpperCase())){let b=a.headers.get("host"),c=b?f(b):null;return null!==c&&!!("localhost"===c||c.endsWith(".localhost")||/^127\./.test(c)||"::1"===c||"[::1]"===c)}return!0}return function(a){let b,c,d;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let e=a.headers.get("origin");if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&(i(e)===f||function(a,b){let c,d;try{c=new URL(a),d=new URL(b)}catch{return!1}if(c.protocol!==d.protocol||c.hostname.toLowerCase()!==d.hostname.toLowerCase())return!1;if(!c.port)return!0;let e=d.port||("https:"===d.protocol?"443":"80");return c.port===e}(e,f)))return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a)}function l(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")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,mc:()=>n,uK:()=>l.uK,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=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.dQ)(),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)()))/^pi-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.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974,426,5582],()=>b(b.s=9698));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=2837,a.ids=[2837],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20816:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>o});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(58864),k=c(66544),l=c(74244),m=c(24923),n=a([i]);async function o(a){if(!(0,k.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,k.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b,c,d=await a.json(),k="string"==typeof d.cwd?d.cwd.trim():"";if(!k)return e.NextResponse.json({error:"Path is required"},{status:400});let n="~"===k?(0,g.homedir)():k.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),k.slice(2)):"linux"===process.platform&&/^[a-zA-Z]:/.test(k)?(0,h.resolve)((0,j.pJ)(k)):(0,h.isAbsolute)(k)?k:(0,h.resolve)(k);try{b=(0,f.statSync)(n)}catch{return e.NextResponse.json({error:`Directory does not exist: ${k}`},{status:400})}if(!b.isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${k}`},{status:400});try{c=(0,f.realpathSync)(n)}catch{c=n}(0,i.wz)(c);let o=await (0,m.KI)(c);return e.NextResponse.json({success:!0,cwd:c,projectRoot:o.projectRoot,projectKey:(0,l.z)(o.projectRoot)})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(n.then?(await n)():n)[0],d()}catch(a){d(a)}})},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")},33994:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cwd/validate/route",pathname:"/api/cwd/validate",filename:"route",bundlePath:"app/api/cwd/validate/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/cwd/validate/route.ts",nextConfigOutput:"standalone",userland:()=>c(20816),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{c.d(b,{E2:()=>l,EN:()=>k});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(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;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}let j=new Set(["POST","PUT","PATCH","DELETE"]);function k(a,b=h()){if(!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b))return!1;if(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))return!0;if(!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))){if(j.has((a.method??"GET").toUpperCase())){let b=a.headers.get("host"),c=b?f(b):null;return null!==c&&!!("localhost"===c||c.endsWith(".localhost")||/^127\./.test(c)||"::1"===c||"[::1]"===c)}return!0}return function(a){let b,c,d;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let e=a.headers.get("origin");if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&(i(e)===f||function(a,b){let c,d;try{c=new URL(a),d=new URL(b)}catch{return!1}if(c.protocol!==d.protocol||c.hostname.toLowerCase()!==d.hostname.toLowerCase())return!1;if(!c.port)return!0;let e=d.port||("https:"===d.protocol?"443":"80");return c.port===e}(e,f)))return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a)}function l(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")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,mc:()=>n,uK:()=>l.uK,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=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.dQ)(),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)()))/^pi-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.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974,426,5582],()=>b(b.s=33994));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.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")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},47784:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/default-cwd/route",pathname:"/api/default-cwd",filename:"route",bundlePath:"app/api/default-cwd/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/default-cwd/route.ts",nextConfigOutput:"standalone",userland:()=>c(65551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/default-cwd/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65551:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(66544),k=a([i]);async function l(a){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let a=new Date().toISOString().slice(0,10).replace(/-/g,""),b=(0,h.join)((0,g.homedir)(),`pi-cwd-${a}`);return(0,f.mkdirSync)(b,{recursive:!0}),(0,i.wz)(b),e.NextResponse.json({cwd:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},66544:(a,b,c)=>{c.d(b,{E2:()=>l,EN:()=>k});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(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;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}let j=new Set(["POST","PUT","PATCH","DELETE"]);function k(a,b=h()){if(!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b))return!1;if(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))return!0;if(!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))){if(j.has((a.method??"GET").toUpperCase())){let b=a.headers.get("host"),c=b?f(b):null;return null!==c&&!!("localhost"===c||c.endsWith(".localhost")||/^127\./.test(c)||"::1"===c||"[::1]"===c)}return!0}return function(a){let b,c,d;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let e=a.headers.get("origin");if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&(i(e)===f||function(a,b){let c,d;try{c=new URL(a),d=new URL(b)}catch{return!1}if(c.protocol!==d.protocol||c.hostname.toLowerCase()!==d.hostname.toLowerCase())return!1;if(!c.port)return!0;let e=d.port||("https:"===d.protocol?"443":"80");return c.port===e}(e,f)))return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a)}function l(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")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,mc:()=>n,uK:()=>l.uK,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=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.dQ)(),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)()))/^pi-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.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974,426,5582],()=>b(b.s=47784));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19716:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/default-cwd/route",pathname:"/api/default-cwd",filename:"route",bundlePath:"app/api/default-cwd/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/default-cwd/route.ts",nextConfigOutput:"standalone",userland:()=>c(65551),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/default-cwd/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},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")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65551:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(66544),k=a([i]);async function l(a){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});try{let a=new Date().toISOString().slice(0,10).replace(/-/g,""),b=(0,h.join)((0,g.homedir)(),`pi-cwd-${a}`);return(0,f.mkdirSync)(b,{recursive:!0}),(0,i.wz)(b),e.NextResponse.json({cwd:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},66544:(a,b,c)=>{c.d(b,{E2:()=>l,EN:()=>k});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(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;let c=e(b.hostname);return b.port?`${c}:${b.port}`:c}catch{return null}}function h(){return[process.env.PI_WEB_HOSTNAME,...process.env.PI_WEB_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function i(a){try{return new URL(a).origin}catch{return null}}let j=new Set(["POST","PUT","PATCH","DELETE"]);function k(a,b=h()){if(!function(a,b=h()){let c=a.headers.get("host"),g=c?f(c):null;return!!g&&(!!("localhost"===g||g.endsWith(".localhost")||(0,d.isIP)(g))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===g}))}(a,b))return!1;if(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))return!0;if(!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))){if(j.has((a.method??"GET").toUpperCase())){let b=a.headers.get("host"),c=b?f(b):null;return null!==c&&!!("localhost"===c||c.endsWith(".localhost")||/^127\./.test(c)||"::1"===c||"[::1]"===c)}return!0}return function(a){let b,c,d;if("cross-site"===a.headers.get("sec-fetch-site"))return!1;let e=a.headers.get("origin");if(!e)return!0;let f=(b=new URL(a.url),(c=a.headers.get("host"))?i(`${b.protocol}//${c}`):null);if(null!==f&&(i(e)===f||function(a,b){let c,d;try{c=new URL(a),d=new URL(b)}catch{return!1}if(c.protocol!==d.protocol||c.hostname.toLowerCase()!==d.hostname.toLowerCase())return!1;if(!c.port)return!0;let e=d.port||("https:"===d.protocol?"443":"80");return c.port===e}(e,f)))return!0;if("same-origin"!==a.headers.get("sec-fetch-site")||!a.headers.get("x-forwarded-proto"))return!1;let h=a.headers.get("host");if(!h)return!1;try{d=new URL(e).host}catch{return!1}let j=g(d);return null!==j&&j===g(h)}(a)}function l(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")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,mc:()=>n,uK:()=>l.uK,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=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.dQ)(),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)()))/^pi-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.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974,426,5582],()=>b(b.s=19716));module.exports=c})();
@@ -1,5 +1,5 @@
1
- "use strict";(()=>{var a={};a.id=8301,a.ids=[8301],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19225:(a,b,c)=>{a.exports=c(44870)},19866:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/events/route",pathname:"/api/events",filename:"route",bundlePath:"app/api/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/events/route.ts",nextConfigOutput:"standalone",userland:()=>c(63084),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/events/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63084:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>g,dynamic:()=>h});var e=c(56429),f=a([e]);e=(f.then?(await f)():f)[0];let h="force-dynamic";async function g(a){let b=new ReadableStream({start(b){let c=new TextEncoder,d=(0,e.l8)(a=>{try{b.enqueue(c.encode(`data: ${JSON.stringify(a)}
1
+ "use strict";(()=>{var a={};a.id=8301,a.ids=[8301],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{a.exports=require("readline")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19225:(a,b,c)=>{a.exports=c(44870)},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63084:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>g,dynamic:()=>h});var e=c(56429),f=a([e]);e=(f.then?(await f)():f)[0];let h="force-dynamic";async function g(a){let b=new ReadableStream({start(b){let c=new TextEncoder,d=(0,e.l8)(a=>{try{b.enqueue(c.encode(`data: ${JSON.stringify(a)}
2
2
 
3
3
  `))}catch{}}),f=setInterval(()=>{try{b.enqueue(c.encode(`data: ${JSON.stringify({type:"heartbeat"})}
4
4
 
5
- `))}catch{}},3e4);a.signal.addEventListener("abort",()=>{clearInterval(f),d();try{b.close()}catch{}},{once:!0})}});return new Response(b,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,974,426,4229,5582,8904,6429],()=>b(b.s=19866));module.exports=c})();
5
+ `))}catch{}},3e4);a.signal.addEventListener("abort",()=>{clearInterval(f),d();try{b.close()}catch{}},{once:!0})}});return new Response(b,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},80481:a=>{a.exports=require("node:readline")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},93970:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/events/route",pathname:"/api/events",filename:"route",bundlePath:"app/api/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/events/route.ts",nextConfigOutput:"standalone",userland:()=>c(63084),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/events/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,974,426,4229,5582,8904,6429],()=>b(b.s=93970));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=4427,a.ids=[4427],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")},6999:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Tu:()=>o,o$:()=>n});var e=c(73024),f=c(76760),g=c(80974),h=c.n(g),i=c(75430),j=c(8102),k=a([i]);i=(k.then?(await k)():k)[0];let p={retries:{retries:10,factor:2,minTimeout:50,maxTimeout:2e3,randomize:!0},stale:3e4};function l(){return(0,f.join)((0,i.getAgentDir)(),"settings.json")}function m(){let a=l();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}async function n(a){let b=l(),c=null,d=await h().lock(b,{...p,onCompromised:a=>{c=a}});try{if(c)throw c;let d=m(),e=await a(d);if(c)throw c;if(!e||"object"!=typeof e||!e.settings)throw Error("settings.json mutation must return { settings }");if(!1===e.changed)return{changed:!1};if((0,j.$)(b,JSON.stringify(e.settings,null,2)),c)throw c;return{changed:!0}}finally{d().catch(()=>{})}}function o(){return m()}d()}catch(a){d(a)}})},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63740:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S:()=>g,b:()=>h});var e=c(6999),f=a([e]);e=(f.then?(await f)():f)[0];let i="features";function g(){let a=(0,e.Tu)()[i],b={tasksBoard:!0};return!a||"object"!=typeof a||Array.isArray(a)?b:{tasksBoard:"boolean"==typeof a.tasksBoard?a.tasksBoard:b.tasksBoard}}async function h(a){await (0,e.o$)(b=>(b[i]=a,{settings:b}))}d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91946:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/features/route",pathname:"/api/features",filename:"route",bundlePath:"app/api/features/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/features/route.ts",nextConfigOutput:"standalone",userland:()=>c(99378),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/features/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{},99378:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,PUT:()=>i,dynamic:()=>j});var e=c(23211),f=c(63740),g=a([f]);f=(g.then?(await g)():g)[0];let j="force-dynamic";async function h(){return e.NextResponse.json((0,f.S)())}async function i(a){try{let b=await a.json(),c=(0,f.S)(),d={tasksBoard:"boolean"==typeof b.tasksBoard?b.tasksBoard:c.tasksBoard};return await (0,f.b)(d),e.NextResponse.json({success:!0,features:d})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}d()}catch(a){d(a)}})}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974],()=>b(b.s=91946));module.exports=c})();
1
+ (()=>{var a={};a.id=4427,a.ids=[4427],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")},6999:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Tu:()=>o,o$:()=>n});var e=c(73024),f=c(76760),g=c(80974),h=c.n(g),i=c(75430),j=c(8102),k=a([i]);i=(k.then?(await k)():k)[0];let p={retries:{retries:10,factor:2,minTimeout:50,maxTimeout:2e3,randomize:!0},stale:3e4};function l(){return(0,f.join)((0,i.getAgentDir)(),"settings.json")}function m(){let a=l();if(!(0,e.existsSync)(a))return{};try{let b=JSON.parse((0,e.readFileSync)(a,"utf8"));return null===b||"object"!=typeof b||Array.isArray(b)?{}:b}catch{return{}}}async function n(a){let b=l(),c=null,d=await h().lock(b,{...p,onCompromised:a=>{c=a}});try{if(c)throw c;let d=m(),e=await a(d);if(c)throw c;if(!e||"object"!=typeof e||!e.settings)throw Error("settings.json mutation must return { settings }");if(!1===e.changed)return{changed:!1};if((0,j.$)(b,JSON.stringify(e.settings,null,2)),c)throw c;return{changed:!0}}finally{d().catch(()=>{})}}function o(){return m()}d()}catch(a){d(a)}})},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10146:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/features/route",pathname:"/api/features",filename:"route",bundlePath:"app/api/features/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Volumes/1T 原装/项目研发/pi-web-QT/app/api/features/route.ts",nextConfigOutput:"standalone",userland:()=>c(99378),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/features/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63740:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S:()=>g,b:()=>h});var e=c(6999),f=a([e]);e=(f.then?(await f)():f)[0];let i="features";function g(){let a=(0,e.Tu)()[i],b={tasksBoard:!0};return!a||"object"!=typeof a||Array.isArray(a)?b:{tasksBoard:"boolean"==typeof a.tasksBoard?a.tasksBoard:b.tasksBoard}}async function h(a){await (0,e.o$)(b=>(b[i]=a,{settings:b}))}d()}catch(a){d(a)}})},73024:a=>{"use strict";a.exports=require("node:fs")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{},99378:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,PUT:()=>i,dynamic:()=>j});var e=c(23211),f=c(63740),g=a([f]);f=(g.then?(await g)():g)[0];let j="force-dynamic";async function h(){return e.NextResponse.json((0,f.S)())}async function i(a){try{let b=await a.json(),c=(0,f.S)(),d={tasksBoard:"boolean"==typeof b.tasksBoard?b.tasksBoard:c.tasksBoard};return await (0,f.b)(d),e.NextResponse.json({success:!0,features:d})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}d()}catch(a){d(a)}})}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974],()=>b(b.s=10146));module.exports=c})();