pi-yun 0.2.3 → 0.2.5
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +14 -13
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +4 -4
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +6 -6
- package/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +1 -3
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
- package/.next/server/app/api/agent/[id]/lease/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/debug/route.js +1 -0
- package/.next/server/app/api/agent/debug/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/debug/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/cache-miss-notices/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js.nft.json +2 -2
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js.nft.json +2 -2
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/git/diff/route.js +1 -1
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/mcp/sign-in/[flowId]/route.js +1 -1
- package/.next/server/app/api/mcp/sign-in/route.js +1 -1
- package/.next/server/app/api/mcp/test/route.js +1 -1
- package/.next/server/app/api/models/default/route.js +1 -1
- package/.next/server/app/api/models/default/route.js.nft.json +2 -2
- package/.next/server/app/api/models/enabled/route.js +1 -1
- package/.next/server/app/api/models/enabled/route.js.nft.json +2 -2
- package/.next/server/app/api/models/refresh/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/open-in-explorer/route.js +1 -1
- package/.next/server/app/api/plugins/check/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
- package/.next/server/app/api/provider-usage/query/route.js +1 -1
- package/.next/server/app/api/push/config/route.js +1 -1
- package/.next/server/app/api/push/subscribe/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/fork/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/delete/route.js +1 -1
- package/.next/server/app/api/sessions/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/search/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js +1 -1
- package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/ui-state/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/content/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/subagents/[id]/route.js +1 -1
- package/.next/server/app/api/subagents/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/subagents/profiles/route.js +1 -1
- package/.next/server/app/api/subagents/settings/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/events/route.js +3 -3
- package/.next/server/app/api/terminal/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/terminal/[id]/route.js +1 -1
- package/.next/server/app/api/terminal/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/terminal/route.js +1 -1
- package/.next/server/app/api/tools/settings/route.js +1 -1
- package/.next/server/app/api/web-auth/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +9 -9
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/index.segments/_full.segment.rsc +9 -9
- package/.next/server/app/index.segments/_tree.segment.rsc +5 -5
- package/.next/server/app/login/page.js +3 -3
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +7 -7
- package/.next/server/app/login.segments/_full.segment.rsc +7 -7
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +11 -10
- package/.next/server/app/manifest.webmanifest/route.js +1 -17
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page.js +923 -59
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pet-preview/page.js +1 -1
- package/.next/server/app/pet-preview/page.js.nft.json +1 -1
- package/.next/server/app/pet-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/pet-preview.html +1 -1
- package/.next/server/app/pet-preview.rsc +7 -7
- package/.next/server/app/pet-preview.segments/_full.segment.rsc +7 -7
- package/.next/server/app/pet-preview.segments/_tree.segment.rsc +4 -4
- package/.next/server/app/pet-preview.segments/pet-preview/__PAGE__.segment.rsc +6 -6
- package/.next/server/app-paths-manifest.json +14 -13
- package/.next/server/chunks/1207.js +1 -1
- package/.next/server/chunks/1906.js +1 -1
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/chunks/2498.js +1 -1
- package/.next/server/chunks/27.js +1 -1
- package/.next/server/chunks/3371.js +1 -0
- package/.next/server/chunks/3374.js +2 -2
- package/.next/server/chunks/3757.js +1 -1
- package/.next/server/chunks/3824.js +1 -1
- package/.next/server/chunks/4698.js +1 -1
- package/.next/server/chunks/5138.js +1 -0
- package/.next/server/chunks/5582.js +3 -3
- package/.next/server/chunks/6429.js +11 -9
- package/.next/server/chunks/7365.js +1 -1
- package/.next/server/chunks/8177.js +1 -0
- package/.next/server/chunks/8781.js +3 -0
- package/.next/server/functions-config-manifest.json +1 -0
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/EemFyRH2znEKEODTd_e9W/_buildManifest.js +1 -0
- package/.next/static/chunks/1278-d14efc5351094e2a.js +1 -0
- package/.next/static/chunks/{9932-60e21347ba9f8664.js → 4908-bc77348603c9c216.js} +2 -2
- package/.next/static/chunks/app/_global-error/{page-cbe4231fb889bdce.js → page-aea014bebc656830.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/{route-cbe4231fb889bdce.js → route-aea014bebc656830.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/events/{route-cbe4231fb889bdce.js → route-aea014bebc656830.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/lease/{route-cbe4231fb889bdce.js → route-aea014bebc656830.js} +1 -1
- package/.next/static/chunks/app/api/agent/[id]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/agent/debug/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/cache-miss-notices/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/home/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/mcp/test/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models/default/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models/enabled/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models/refresh/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/open-in-explorer/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/plugins/check/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/provider-usage/query/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/push/config/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/push/subscribe/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/fork/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/delete/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/stats/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/sessions/ui-state/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/content/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/subagents/[id]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/subagents/profiles/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/subagents/settings/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/tools/settings/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/layout-887864247723a15f.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-aea014bebc656830.js +1 -0
- package/.next/static/chunks/app/page-5fe4e4e656618c55.js +1093 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-aea014bebc656830.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-aea014bebc656830.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-aea014bebc656830.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-aea014bebc656830.js +1 -0
- package/.next/static/chunks/{webpack-03add08f717df51e.js → webpack-98cb88af9c517ce2.js} +1 -1
- package/.next/static/css/08eddaaa4f97d65e.css +1 -0
- package/.next/static/css/2f63bdc85a747c1b.css +1 -0
- package/.next/static/css/{edd81c2e355e9677.css → 3540eb37e32475c8.css} +1 -1
- package/.next/static/css/948bdf99ac6477ce.css +1 -0
- package/.next/trace +14 -85
- package/.next/trace-build +1 -1
- package/.next/types/app/api/agent/debug/route.ts +353 -0
- package/.next/types/app/manifest.webmanifest/route.ts +353 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/README.md +6 -1
- package/bin/browser-opener.js +44 -1
- package/bin/network-addresses.js +62 -0
- package/bin/pi-web.js +10 -2
- package/package.json +13 -11
- package/.next/server/chunks/5787.js +0 -1
- package/.next/server/chunks/7492.js +0 -1
- package/.next/static/chunks/1278-93326582f35e0b95.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/cache-miss-notices/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/home/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/mcp/sign-in/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/mcp/test/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models/default/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models/enabled/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models/refresh/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/open-in-explorer/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/plugins/check/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/provider-usage/query/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/push/config/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/push/subscribe/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/fork/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/delete/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/stats/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/sessions/ui-state/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/content/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/subagents/[id]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/subagents/profiles/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/subagents/settings/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/tools/settings/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/web-auth/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/layout-b1ce6552c10e045b.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/app/page-3d87202e7f491be4.js +0 -229
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-cbe4231fb889bdce.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cbe4231fb889bdce.js +0 -1
- package/.next/static/css/0ba51581376fe049.css +0 -1
- package/.next/static/css/d986dbac15b9ebaa.css +0 -1
- package/.next/static/css/e678fb57b00f0bb2.css +0 -1
- package/.next/static/pmfOa9kKCLb5t2FbVpaNk/_buildManifest.js +0 -1
- /package/.next/static/{pmfOa9kKCLb5t2FbVpaNk → EemFyRH2znEKEODTd_e9W}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9183,a.ids=[9183],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")},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")},
|
|
1
|
+
(()=>{var a={};a.id=9183,a.ids=[9183],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")},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")},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")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>m,dynamic:()=>g});var d=c(23211);let e=/^(\d+)\.(\d+)\.(\d+)$/;function f(a){let b=e.exec(a);if(!b)return null;let c=b.slice(1).map(Number);return c.some(a=>!Number.isSafeInteger(a))?null:c}let g="force-dynamic",h="0.2.5",i=`https://registry.npmjs.org/${"pi-yun".replace("/","%2F")}/latest`,j="1"===process.env.PI_WEB_SKIP_VERSION_CHECK;async function k(){let a=await fetch(i,{cache:"no-store",headers:{Accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!a.ok)throw Error(`npm registry returned HTTP ${a.status}`);let b=await a.json(),c="string"==typeof b.version?b.version:"",d=f(c)?`https://github.com/Jason-24/pi-web-yun/releases/tag/v${c}`:null;if(!d)throw Error("npm registry returned an invalid version");return{currentVersion:h,latestVersion:c,updateAvailable:function(a,b){let c=f(a),d=f(b);if(!c||!d)return!1;for(let a=0;a<c.length;a+=1)if(c[a]!==d[a])return c[a]>d[a];return!1}(c,h),releaseUrl:d}}async function l(){let a=globalThis.__piWebAppUpdateCache??={expiresAt:0};if(a.value&&a.expiresAt>Date.now())return a.value;a.inFlight||(a.inFlight=k().then(b=>(a.value=b,a.expiresAt=Date.now()+432e5,b)).finally(()=>{a.inFlight=void 0}));try{return await a.inFlight}catch(b){if(a.value)return a.value;throw b}}async function m(){if(j)return d.NextResponse.json({currentVersion:h,latestVersion:h,updateAvailable:!1,releaseUrl:""});try{return d.NextResponse.json(await l())}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:502})}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},98394:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/app-update/route",pathname:"/api/app-update",filename:"route",bundlePath:"app/api/app-update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\app-update\\route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=98394));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8743,a.ids=[8743],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")},12412:a=>{a.exports=require("assert")},18470:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(69429),h=c(60268),i=a([g,h]);[g,h]=i.then?(await i)():i;let l="force-dynamic";async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let d=await (0,h.OH)(),i=d.getProvider(c)?.auth.apiKey;if(!i?.login)throw Error(`${c} does not support API key login`);let j=!1,k=await i.login({signal:a.signal,notify:()=>{},prompt:async a=>{if("select"===a.type){let b=a.options.find(a=>"api-key"===a.id||"bearer-token"===a.id);if(b)return b.id;throw Error(`${c} requires interactive authentication setup`)}if(!j&&"secret"===a.type)return j=!0,b.trim();throw Error(`${c} requires additional authentication settings`)}});return await (0,g.Q)(c,k),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let a=await (0,g.C)(c,"api_key");if("type_mismatch"===a.status)return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8743,a.ids=[8743],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")},12412:a=>{a.exports=require("assert")},18470:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(69429),h=c(60268),i=a([g,h]);[g,h]=i.then?(await i)():i;let l="force-dynamic";async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let d=await (0,h.OH)(),i=d.getProvider(c)?.auth.apiKey;if(!i?.login)throw Error(`${c} does not support API key login`);let j=!1,k=await i.login({signal:a.signal,notify:()=>{},prompt:async a=>{if("select"===a.type){let b=a.options.find(a=>"api-key"===a.id||"bearer-token"===a.id);if(b)return b.id;throw Error(`${c} requires interactive authentication setup`)}if(!j&&"secret"===a.type)return j=!0,b.trim();throw Error(`${c} requires additional authentication settings`)}});return await (0,g.Q)(c,k),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let a=await (0,g.C)(c,"api_key");if("type_mismatch"===a.status)return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},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")},50124:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\auth\\api-key\\[provider]\\route.ts",nextConfigOutput:"",userland:()=>c(18470),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/api-key/[provider]/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},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")},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,[2970,1813,974,3824],()=>b(b.s=50124));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1004,a.ids=[1004],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},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")},18904:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IR:()=>j,py:()=>h,uw:()=>i});var e=c(75430),f=a([e]);e=(f.then?(await f)():f)[0];let k=new Set(["off","minimal","low","medium","high","xhigh","max"]);function g(a,b){return a.provider===b.provider&&a.id===b.modelId}async function h(a,b){let c=(b??[]).map(a=>a.trim()).filter(Boolean);if(0===c.length)return{visible:await a.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let d=await a.getAvailable(),{scopedModels:f,diagnostics:g}=await (0,e.resolveModelScopeWithDiagnostics)(c,{getAvailable:async()=>d}),h=g.filter(a=>"no-match"!==a.code||0===f.length||!function(a){if(!(a.includes("*")||a.includes("?")||a.includes("[")))return!1;let b=a.lastIndexOf(":");return b<0||k.has(a.slice(b+1))}(a.pattern)).map(a=>a.message);if(0===f.length)return{visible:d,scopedModels:[],thinkingLevelPins:{},warnings:h};let i={};for(let a of f)a.thinkingLevel&&(i[`${a.model.provider}/${a.model.id}`]=a.thinkingLevel);return{visible:f.map(a=>a.model),scopedModels:f,thinkingLevelPins:i,warnings:h}}function i(a){return a.scopedModels.length>0?[...a.visible]:[...a.visible].sort((a,b)=>a.provider.localeCompare(b.provider))}function j(a,b={}){let c=b.requestedModel,d=b.defaultModel,e=c?a.visible.find(a=>g(a,c)):void 0;if(c&&!e)throw Error(`Model is not available in the enabled scope: ${c.provider}/${c.modelId}`);let f=e?a.scopedModels.find(a=>a.model===e||g(a.model,{provider:e.provider,modelId:e.id})):void 0,h=!e&&d?a.scopedModels.find(a=>g(a.model,d)):void 0,i=e?void 0:h??a.scopedModels[0],k=e||i||!d?void 0:a.visible.find(a=>g(a,d)),l=e??i?.model??k,m=f??i,n=b.thinkingLevel??m?.thinkingLevel;return{...l?{model:l}:{},...n?{thinkingLevel:n}:{},scopedModels:[...a.scopedModels]}}d()}catch(a){d(a)}})},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},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){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},28994:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S9:()=>l,TH:()=>k,je:()=>m,vd:()=>i});var e=c(28967),f=c(18904),g=a([f]);function h(){return globalThis.__piWebProviderModelCatalog??=new Map,globalThis.__piWebProviderModelCatalog}async function i(a){let b=new Map;for(let c of(await a.getAvailable()))b.set(c.provider,[...b.get(c.provider)??[],c]);let c=[...b.keys()].some(a=>!h().has(a));for(let[a,c]of b)h().set(a,c);c&&(0,e.kn)()}function j(a){let b=new Set(a.getModels().map(a=>a.provider));return[...h()].flatMap(([a,c])=>b.has(a)?[]:c)}function k(a){return new Proxy(a,{get(a,b,c){if("getAvailable"===b)return async(...b)=>{let[c]=b,d=j(a).filter(a=>!c||a.provider===c);return[...await a.getAvailable(...b),...d]};let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}})}function l(a,b,c){return j(a).find(a=>a.provider===b&&a.id===c)}async function m(a,b,c){let d;if(0===j(a).length)return;try{d=(0,f.IR)(await (0,f.py)(k(a),b),c)}catch{return}let e=d.model&&l(a,d.model.provider,d.model.id);return e?{model:e,...d.thinkingLevel?{thinkingLevelPin:d.thinkingLevel}:{}}:void 0}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},45977:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/login/[provider]/route",pathname:"/api/auth/login/[provider]",filename:"route",bundlePath:"app/api/auth/login/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\auth\\login\\[provider]\\route.ts",nextConfigOutput:"",userland:()=>c(46879),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/[provider]/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},46879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>j,dynamic:()=>l});var e=c(77598),f=c(28967),g=c(60268),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";function i(){return globalThis.__piLoginCallbacks||(globalThis.__piLoginCallbacks=new Map),globalThis.__piLoginCallbacks}async function j(a,{params:b}){let{provider:c}=await b,{token:d,code:e}=await a.json();if(!d||!e)return Response.json({error:"token and code required"},{status:400});let f=i(),g=f.get(d);return g?d.startsWith(`${c}-`)?(g.resolve(e),f.delete(d),Response.json({ok:!0,provider:c})):Response.json({error:"Token does not match provider"},{status:400}):Response.json({error:"No pending login for token"},{status:404})}async function k(a,{params:b}){let{provider:c}=await b,d=new TextEncoder,h=(a,b)=>{a.enqueue(d.encode(`data: ${JSON.stringify(b)}
|
|
1
|
+
(()=>{var a={};a.id=1004,a.ids=[1004],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},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")},18904:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IR:()=>j,py:()=>h,uw:()=>i});var e=c(75430),f=a([e]);e=(f.then?(await f)():f)[0];let k=new Set(["off","minimal","low","medium","high","xhigh","max"]);function g(a,b){return a.provider===b.provider&&a.id===b.modelId}async function h(a,b){let c=(b??[]).map(a=>a.trim()).filter(Boolean);if(0===c.length)return{visible:await a.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let d=await a.getAvailable(),{scopedModels:f,diagnostics:g}=await (0,e.resolveModelScopeWithDiagnostics)(c,{getAvailable:async()=>d}),h=g.filter(a=>"no-match"!==a.code||0===f.length||!function(a){if(!(a.includes("*")||a.includes("?")||a.includes("[")))return!1;let b=a.lastIndexOf(":");return b<0||k.has(a.slice(b+1))}(a.pattern)).map(a=>a.message);if(0===f.length)return{visible:d,scopedModels:[],thinkingLevelPins:{},warnings:h};let i={};for(let a of f)a.thinkingLevel&&(i[`${a.model.provider}/${a.model.id}`]=a.thinkingLevel);return{visible:f.map(a=>a.model),scopedModels:f,thinkingLevelPins:i,warnings:h}}function i(a){return a.scopedModels.length>0?[...a.visible]:[...a.visible].sort((a,b)=>a.provider.localeCompare(b.provider))}function j(a,b={}){let c=b.requestedModel,d=b.defaultModel,e=c?a.visible.find(a=>g(a,c))??b.availableModels?.find(a=>g(a,c)):void 0;if(c&&!e)throw Error(`Model is not available${b.availableModels?"":" in the enabled scope"}: ${c.provider}/${c.modelId}`);let f=e?a.scopedModels.find(a=>a.model===e||g(a.model,{provider:e.provider,modelId:e.id})):void 0,h=!e&&d?a.scopedModels.find(a=>g(a.model,d)):void 0,i=e?void 0:h??a.scopedModels[0],k=e||i||!d?void 0:a.visible.find(a=>g(a,d)),l=e??i?.model??k,m=f??i,n=b.thinkingLevel??m?.thinkingLevel;return{...l?{model:l}:{},...n?{thinkingLevel:n}:{},scopedModels:[...a.scopedModels]}}d()}catch(a){d(a)}})},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},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){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},28994:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S9:()=>l,TH:()=>k,je:()=>m,vd:()=>i});var e=c(28967),f=c(18904),g=a([f]);function h(){return globalThis.__piWebProviderModelCatalog??=new Map,globalThis.__piWebProviderModelCatalog}async function i(a){let b=new Set(a.getRegisteredProviderIds()),c=new Map;for(let d of(await a.getAvailable()))!b.has(d.provider)&&(!a.getModel(d.provider,d.id)||a.getPhysicalModel(d.provider,d.id))||c.set(d.provider,[...c.get(d.provider)??[],d]);let d=[...c.keys()].some(a=>!h().has(a));for(let[a,b]of c)h().set(a,b);d&&(0,e.kn)()}function j(a){let b=new Set(a.getModels().map(a=>a.provider));return[...h()].flatMap(([a,c])=>b.has(a)?[]:c)}function k(a){return new Proxy(a,{get(a,b,c){if("getAvailable"===b)return async(...b)=>{let[c]=b,d=j(a).filter(a=>!c||a.provider===c);return[...await a.getAvailable(...b),...d]};let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}})}function l(a,b,c){return j(a).find(a=>a.provider===b&&a.id===c)}async function m(a,b,c){let d;if(0===j(a).length)return;try{d=(0,f.IR)(await (0,f.py)(k(a),b),c)}catch{return}let e=d.model&&l(a,d.model.provider,d.model.id);return e?{model:e,...d.thinkingLevel?{thinkingLevelPin:d.thinkingLevel}:{}}:void 0}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},46879:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>j,dynamic:()=>l});var e=c(77598),f=c(28967),g=c(60268),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";function i(){return globalThis.__piLoginCallbacks||(globalThis.__piLoginCallbacks=new Map),globalThis.__piLoginCallbacks}async function j(a,{params:b}){let{provider:c}=await b,{token:d,code:e}=await a.json();if(!d||!e)return Response.json({error:"token and code required"},{status:400});let f=i(),g=f.get(d);return g?d.startsWith(`${c}-`)?(g.resolve(e),f.delete(d),Response.json({ok:!0,provider:c})):Response.json({error:"Token does not match provider"},{status:400}):Response.json({error:"No pending login for token"},{status:404})}async function k(a,{params:b}){let{provider:c}=await b,d=new TextEncoder,h=(a,b)=>{a.enqueue(d.encode(`data: ${JSON.stringify(b)}
|
|
2
2
|
|
|
3
|
-
`))},j=new AbortController;a.signal.addEventListener("abort",()=>j.abort());let l=new ReadableStream({async start(a){let b,d=await (0,g.O_)();if(!d.getProvider(c)?.auth.oauth){h(a,{type:"error",message:`Unknown provider: ${c}`}),a.close();return}let k=i(),l=new Set,m=()=>{let a=`${c}-${(0,e.randomUUID)()}`;l.add(a);let b=new Promise((b,c)=>{k.set(a,{resolve:c=>{l.delete(a),k.delete(a),b(c)},reject:b=>{l.delete(a),k.delete(a),c(b)}})});return{token:a,promise:b}},n=()=>(b||(b=m()).promise.finally(()=>{b=void 0}).catch(()=>{}),b),o=()=>{for(let a of l)k.get(a)?.reject(Error("Login cancelled")),k.delete(a);l.clear()};j.signal.addEventListener("abort",o);try{await d.login(c,"oauth",{prompt:async b=>{let c="manual_code"===b.type?n():m();return"select"===b.type?h(a,{type:"select_request",message:b.message,options:b.options,token:c.token}):h(a,{type:"prompt_request",message:b.message,placeholder:b.placeholder??null,token:c.token}),c.promise},notify:b=>{if("auth_url"===b.type){let c=n();h(a,{type:"auth",url:b.url,instructions:b.instructions??null,token:c.token})}else"device_code"===b.type?h(a,{type:"device_code",userCode:b.userCode,verificationUri:b.verificationUri,intervalSeconds:b.intervalSeconds??null,expiresInSeconds:b.expiresInSeconds??null}):h(a,{type:"progress",message:b.message})},signal:j.signal}),(0,f.kn)(),h(a,{type:"success"})}catch(c){let b=c instanceof Error?c.message:String(c);"Login cancelled"!==b?h(a,{type:"error",message:b}):h(a,{type:"cancelled"})}finally{o(),a.close()}},cancel(){j.abort()}});return new Response(l,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},55511:a=>{"use strict";a.exports=require("crypto")},60268:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{OH:()=>k,O_:()=>j,nx:()=>l});var e=c(75430),f=c(77598),g=c(28994),h=c(63108),i=a([e,g]);async function j(){let a=(0,e.getAgentDir)(),b=await (0,e.createAgentSessionServices)({cwd:a,agentDir:a});return await (0,g.vd)(b.modelRuntime),b.modelRuntime}[e,g]=i.then?(await i)():i;let m=Symbol.for("pi-web:shared-model-runtime-refresh");async function k(){var a;let b,c=(0,e.getAgentDir)(),d=globalThis.__piWebSharedModelRuntime;(!d||d.agentDir!==c||d.expiresAt<=Date.now())&&((b={agentDir:a=c,runtime:j(),queueKey:`${a}\0${(0,f.randomUUID)()}`,expiresAt:1/0}).runtime.then(()=>{b.expiresAt=Date.now()+6e5},()=>{globalThis.__piWebSharedModelRuntime===b&&(globalThis.__piWebSharedModelRuntime=void 0)}),d=b,globalThis.__piWebSharedModelRuntime=d);let i=await d.runtime;return(0,h.T)(m,d.queueKey,async()=>(await i.refresh({allowNetwork:!1}),await (0,g.vd)(i),i))}function l(){globalThis.__piWebSharedModelRuntime=void 0}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63108:(a,b,c)=>{"use strict";function d(a,b,c){let d=globalThis,e=d[a]??=new Map,f=(e.get(b)??Promise.resolve()).then(c),g=f.then(()=>void 0,()=>void 0);return e.set(b,g),g.then(()=>{e.get(b)===g&&e.delete(b)}),f}c.d(b,{T:()=>d})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},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()}}},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970],()=>b(b.s=45977));module.exports=c})();
|
|
3
|
+
`))},j=new AbortController;a.signal.addEventListener("abort",()=>j.abort());let l=new ReadableStream({async start(a){let b,d=await (0,g.O_)();if(!d.getProvider(c)?.auth.oauth){h(a,{type:"error",message:`Unknown provider: ${c}`}),a.close();return}let k=i(),l=new Set,m=()=>{let a=`${c}-${(0,e.randomUUID)()}`;l.add(a);let b=new Promise((b,c)=>{k.set(a,{resolve:c=>{l.delete(a),k.delete(a),b(c)},reject:b=>{l.delete(a),k.delete(a),c(b)}})});return{token:a,promise:b}},n=()=>(b||(b=m()).promise.finally(()=>{b=void 0}).catch(()=>{}),b),o=()=>{for(let a of l)k.get(a)?.reject(Error("Login cancelled")),k.delete(a);l.clear()};j.signal.addEventListener("abort",o);try{await d.login(c,"oauth",{prompt:async b=>{let c="manual_code"===b.type?n():m();return"select"===b.type?h(a,{type:"select_request",message:b.message,options:b.options,token:c.token}):h(a,{type:"prompt_request",message:b.message,placeholder:b.placeholder??null,token:c.token}),c.promise},notify:b=>{if("auth_url"===b.type){let c=n();h(a,{type:"auth",url:b.url,instructions:b.instructions??null,token:c.token})}else"device_code"===b.type?h(a,{type:"device_code",userCode:b.userCode,verificationUri:b.verificationUri,intervalSeconds:b.intervalSeconds??null,expiresInSeconds:b.expiresInSeconds??null}):h(a,{type:"progress",message:b.message})},signal:j.signal}),(0,f.kn)(),h(a,{type:"success"})}catch(c){let b=c instanceof Error?c.message:String(c);"Login cancelled"!==b?h(a,{type:"error",message:b}):h(a,{type:"cancelled"})}finally{o(),a.close()}},cancel(){j.abort()}});return new Response(l,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},47642:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/auth/login/[provider]/route",pathname:"/api/auth/login/[provider]",filename:"route",bundlePath:"app/api/auth/login/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\auth\\login\\[provider]\\route.ts",nextConfigOutput:"",userland:()=>c(46879),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/login/[provider]/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},55511:a=>{"use strict";a.exports=require("crypto")},60268:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{OH:()=>k,O_:()=>j,nx:()=>l});var e=c(75430),f=c(77598),g=c(28994),h=c(63108),i=a([e,g]);async function j(){let a=(0,e.getAgentDir)(),b=await (0,e.createAgentSessionServices)({cwd:a,agentDir:a});return await (0,g.vd)(b.modelRuntime),b.modelRuntime}[e,g]=i.then?(await i)():i;let m=Symbol.for("pi-web:shared-model-runtime-refresh");async function k(){var a;let b,c=(0,e.getAgentDir)(),d=globalThis.__piWebSharedModelRuntime;(!d||d.agentDir!==c||d.expiresAt<=Date.now())&&((b={agentDir:a=c,runtime:j(),queueKey:`${a}\0${(0,f.randomUUID)()}`,expiresAt:1/0}).runtime.then(()=>{b.expiresAt=Date.now()+36e5},()=>{globalThis.__piWebSharedModelRuntime===b&&(globalThis.__piWebSharedModelRuntime=void 0)}),d=b,globalThis.__piWebSharedModelRuntime=d);let i=await d.runtime;return(0,h.T)(m,d.queueKey,async()=>(await i.refresh({allowNetwork:!1}),await (0,g.vd)(i),i))}function l(){globalThis.__piWebSharedModelRuntime=void 0}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63108:(a,b,c)=>{"use strict";function d(a,b,c){let d=globalThis,e=d[a]??=new Map,f=(e.get(b)??Promise.resolve()).then(c),g=f.then(()=>void 0,()=>void 0);return e.set(b,g),g.then(()=>{e.get(b)===g&&e.delete(b)}),f}c.d(b,{T:()=>d})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},77598:a=>{"use strict";a.exports=require("node:crypto")},78335:()=>{},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()}}},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970],()=>b(b.s=47642));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},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")},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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8933,a.ids=[8933],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},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")},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")},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")},81115:a=>{a.exports=require("constants")},86152:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>j});var e=c(28967),f=c(69429),g=c(60268),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,d=await (0,g.OH)();if(!d.getProvider(c)?.auth.oauth)return Response.json({error:`Unknown provider: ${c}`},{status:400});let h=await (0,f.C)(c,"oauth");return"type_mismatch"===h.status?Response.json({error:`${c} is authenticated with an API key, not OAuth`},{status:409}):((0,e.kn)(),Response.json({ok:!0}))}d()}catch(a){d(a)}})},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()}}},93522:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\auth\\logout\\[provider]\\route.ts",nextConfigOutput:"",userland:()=>c(86152),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/logout/[provider]/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,974,3824],()=>b(b.s=93522));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")},18904:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IR:()=>j,py:()=>h,uw:()=>i});var e=c(75430),f=a([e]);e=(f.then?(await f)():f)[0];let k=new Set(["off","minimal","low","medium","high","xhigh","max"]);function g(a,b){return a.provider===b.provider&&a.id===b.modelId}async function h(a,b){let c=(b??[]).map(a=>a.trim()).filter(Boolean);if(0===c.length)return{visible:await a.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let d=await a.getAvailable(),{scopedModels:f,diagnostics:g}=await (0,e.resolveModelScopeWithDiagnostics)(c,{getAvailable:async()=>d}),h=g.filter(a=>"no-match"!==a.code||0===f.length||!function(a){if(!(a.includes("*")||a.includes("?")||a.includes("[")))return!1;let b=a.lastIndexOf(":");return b<0||k.has(a.slice(b+1))}(a.pattern)).map(a=>a.message);if(0===f.length)return{visible:d,scopedModels:[],thinkingLevelPins:{},warnings:h};let i={};for(let a of f)a.thinkingLevel&&(i[`${a.model.provider}/${a.model.id}`]=a.thinkingLevel);return{visible:f.map(a=>a.model),scopedModels:f,thinkingLevelPins:i,warnings:h}}function i(a){return a.scopedModels.length>0?[...a.visible]:[...a.visible].sort((a,b)=>a.provider.localeCompare(b.provider))}function j(a,b={}){let c=b.requestedModel,d=b.defaultModel,e=c?a.visible.find(a=>g(a,c)):void 0;if(c&&!e)throw Error(`Model is not available in the enabled scope: ${c.provider}/${c.modelId}`);let f=e?a.scopedModels.find(a=>a.model===e||g(a.model,{provider:e.provider,modelId:e.id})):void 0,h=!e&&d?a.scopedModels.find(a=>g(a.model,d)):void 0,i=e?void 0:h??a.scopedModels[0],k=e||i||!d?void 0:a.visible.find(a=>g(a,d)),l=e??i?.model??k,m=f??i,n=b.thinkingLevel??m?.thinkingLevel;return{...l?{model:l}:{},...n?{thinkingLevel:n}:{},scopedModels:[...a.scopedModels]}}d()}catch(a){d(a)}})},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})},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){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},28994:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S9:()=>l,TH:()=>k,je:()=>m,vd:()=>i});var e=c(28967),f=c(18904),g=a([f]);function h(){return globalThis.__piWebProviderModelCatalog??=new Map,globalThis.__piWebProviderModelCatalog}async function i(a){let b=new Map;for(let c of(await a.getAvailable()))b.set(c.provider,[...b.get(c.provider)??[],c]);let c=[...b.keys()].some(a=>!h().has(a));for(let[a,c]of b)h().set(a,c);c&&(0,e.kn)()}function j(a){let b=new Set(a.getModels().map(a=>a.provider));return[...h()].flatMap(([a,c])=>b.has(a)?[]:c)}function k(a){return new Proxy(a,{get(a,b,c){if("getAvailable"===b)return async(...b)=>{let[c]=b,d=j(a).filter(a=>!c||a.provider===c);return[...await a.getAvailable(...b),...d]};let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}})}function l(a,b,c){return j(a).find(a=>a.provider===b&&a.id===c)}async function m(a,b,c){let d;if(0===j(a).length)return;try{d=(0,f.IR)(await (0,f.py)(k(a),b),c)}catch{return}let e=d.model&&l(a,d.model.provider,d.model.id);return e?{model:e,...d.thinkingLevel?{thinkingLevelPin:d.thinkingLevel}:{}}:void 0}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},59261:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\auth\\providers\\route.ts",nextConfigOutput:"",userland:()=>c(69226),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},60268:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{OH:()=>k,O_:()=>j,nx:()=>l});var e=c(75430),f=c(77598),g=c(28994),h=c(63108),i=a([e,g]);async function j(){let a=(0,e.getAgentDir)(),b=await (0,e.createAgentSessionServices)({cwd:a,agentDir:a});return await (0,g.vd)(b.modelRuntime),b.modelRuntime}[e,g]=i.then?(await i)():i;let m=Symbol.for("pi-web:shared-model-runtime-refresh");async function k(){var a;let b,c=(0,e.getAgentDir)(),d=globalThis.__piWebSharedModelRuntime;(!d||d.agentDir!==c||d.expiresAt<=Date.now())&&((b={agentDir:a=c,runtime:j(),queueKey:`${a}\0${(0,f.randomUUID)()}`,expiresAt:1/0}).runtime.then(()=>{b.expiresAt=Date.now()+6e5},()=>{globalThis.__piWebSharedModelRuntime===b&&(globalThis.__piWebSharedModelRuntime=void 0)}),d=b,globalThis.__piWebSharedModelRuntime=d);let i=await d.runtime;return(0,h.T)(m,d.queueKey,async()=>(await i.refresh({allowNetwork:!1}),await (0,g.vd)(i),i))}function l(){globalThis.__piWebSharedModelRuntime=void 0}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63108:(a,b,c)=>{"use strict";function d(a,b,c){let d=globalThis,e=d[a]??=new Map,f=(e.get(b)??Promise.resolve()).then(c),g=f.then(()=>void 0,()=>void 0);return e.set(b,g),g.then(()=>{e.get(b)===g&&e.delete(b)}),f}c.d(b,{T:()=>d})},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(89950),f=c(28247),g=c(60268),h=a([g]);g=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(){let a=await (0,g.OH)(),b=await (0,f.z)(a),c=(0,e.l)(b),d=(0,e.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")},77598:a=>{"use strict";a.exports=require("node:crypto")},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,c=[];for(let d of a)b.has(d.id)||(b.add(d.id),c.push(d));return c}function g(a){let b=[];for(let c of f(a)){if(!c.hasApiKeyLogin||c.status.source&&d.has(c.status.source))continue;let a=c.status.configured&&"oauth"!==c.credentialType;b.push({id:c.id,displayName:c.name,configured:a,...a&&c.status.source?{source:c.status.source}:{},modelCount:c.modelCount,supportsOAuth:c.hasOAuth})}return b}function h(a){let b=[];for(let c of f(a))c.hasOAuth&&b.push({id:c.id,name:e[c.id]??c.oauthName??c.name,usesCallbackServer:!1,loggedIn:"oauth"===c.credentialType,supportsApiKey:c.hasApiKeyLogin});return b}},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,[2970],()=>b(b.s=59261));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")},18904:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{IR:()=>j,py:()=>h,uw:()=>i});var e=c(75430),f=a([e]);e=(f.then?(await f)():f)[0];let k=new Set(["off","minimal","low","medium","high","xhigh","max"]);function g(a,b){return a.provider===b.provider&&a.id===b.modelId}async function h(a,b){let c=(b??[]).map(a=>a.trim()).filter(Boolean);if(0===c.length)return{visible:await a.getAvailable(),scopedModels:[],thinkingLevelPins:{},warnings:[]};let d=await a.getAvailable(),{scopedModels:f,diagnostics:g}=await (0,e.resolveModelScopeWithDiagnostics)(c,{getAvailable:async()=>d}),h=g.filter(a=>"no-match"!==a.code||0===f.length||!function(a){if(!(a.includes("*")||a.includes("?")||a.includes("[")))return!1;let b=a.lastIndexOf(":");return b<0||k.has(a.slice(b+1))}(a.pattern)).map(a=>a.message);if(0===f.length)return{visible:d,scopedModels:[],thinkingLevelPins:{},warnings:h};let i={};for(let a of f)a.thinkingLevel&&(i[`${a.model.provider}/${a.model.id}`]=a.thinkingLevel);return{visible:f.map(a=>a.model),scopedModels:f,thinkingLevelPins:i,warnings:h}}function i(a){return a.scopedModels.length>0?[...a.visible]:[...a.visible].sort((a,b)=>a.provider.localeCompare(b.provider))}function j(a,b={}){let c=b.requestedModel,d=b.defaultModel,e=c?a.visible.find(a=>g(a,c))??b.availableModels?.find(a=>g(a,c)):void 0;if(c&&!e)throw Error(`Model is not available${b.availableModels?"":" in the enabled scope"}: ${c.provider}/${c.modelId}`);let f=e?a.scopedModels.find(a=>a.model===e||g(a.model,{provider:e.provider,modelId:e.id})):void 0,h=!e&&d?a.scopedModels.find(a=>g(a.model,d)):void 0,i=e?void 0:h??a.scopedModels[0],k=e||i||!d?void 0:a.visible.find(a=>g(a,d)),l=e??i?.model??k,m=f??i,n=b.thinkingLevel??m?.thinkingLevel;return{...l?{model:l}:{},...n?{thinkingLevel:n}:{},scopedModels:[...a.scopedModels]}}d()}catch(a){d(a)}})},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})},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){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},28994:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{S9:()=>l,TH:()=>k,je:()=>m,vd:()=>i});var e=c(28967),f=c(18904),g=a([f]);function h(){return globalThis.__piWebProviderModelCatalog??=new Map,globalThis.__piWebProviderModelCatalog}async function i(a){let b=new Set(a.getRegisteredProviderIds()),c=new Map;for(let d of(await a.getAvailable()))!b.has(d.provider)&&(!a.getModel(d.provider,d.id)||a.getPhysicalModel(d.provider,d.id))||c.set(d.provider,[...c.get(d.provider)??[],d]);let d=[...c.keys()].some(a=>!h().has(a));for(let[a,b]of c)h().set(a,b);d&&(0,e.kn)()}function j(a){let b=new Set(a.getModels().map(a=>a.provider));return[...h()].flatMap(([a,c])=>b.has(a)?[]:c)}function k(a){return new Proxy(a,{get(a,b,c){if("getAvailable"===b)return async(...b)=>{let[c]=b,d=j(a).filter(a=>!c||a.provider===c);return[...await a.getAvailable(...b),...d]};let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}})}function l(a,b,c){return j(a).find(a=>a.provider===b&&a.id===c)}async function m(a,b,c){let d;if(0===j(a).length)return;try{d=(0,f.IR)(await (0,f.py)(k(a),b),c)}catch{return}let e=d.model&&l(a,d.model.provider,d.model.id);return e?{model:e,...d.thinkingLevel?{thinkingLevelPin:d.thinkingLevel}:{}}:void 0}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},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")},60268:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{OH:()=>k,O_:()=>j,nx:()=>l});var e=c(75430),f=c(77598),g=c(28994),h=c(63108),i=a([e,g]);async function j(){let a=(0,e.getAgentDir)(),b=await (0,e.createAgentSessionServices)({cwd:a,agentDir:a});return await (0,g.vd)(b.modelRuntime),b.modelRuntime}[e,g]=i.then?(await i)():i;let m=Symbol.for("pi-web:shared-model-runtime-refresh");async function k(){var a;let b,c=(0,e.getAgentDir)(),d=globalThis.__piWebSharedModelRuntime;(!d||d.agentDir!==c||d.expiresAt<=Date.now())&&((b={agentDir:a=c,runtime:j(),queueKey:`${a}\0${(0,f.randomUUID)()}`,expiresAt:1/0}).runtime.then(()=>{b.expiresAt=Date.now()+36e5},()=>{globalThis.__piWebSharedModelRuntime===b&&(globalThis.__piWebSharedModelRuntime=void 0)}),d=b,globalThis.__piWebSharedModelRuntime=d);let i=await d.runtime;return(0,h.T)(m,d.queueKey,async()=>(await i.refresh({allowNetwork:!1}),await (0,g.vd)(i),i))}function l(){globalThis.__piWebSharedModelRuntime=void 0}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63108:(a,b,c)=>{"use strict";function d(a,b,c){let d=globalThis,e=d[a]??=new Map,f=(e.get(b)??Promise.resolve()).then(c),g=f.then(()=>void 0,()=>void 0);return e.set(b,g),g.then(()=>{e.get(b)===g&&e.delete(b)}),f}c.d(b,{T:()=>d})},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(89950),f=c(28247),g=c(60268),h=a([g]);g=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(){let a=await (0,g.OH)(),b=await (0,f.z)(a),c=(0,e.l)(b),d=(0,e.z)(b);return Response.json({providers:c,oauthProviders:c,apiKeyProviders:d})}d()}catch(a){d(a)}})},71262:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\auth\\providers\\route.ts",nextConfigOutput:"",userland:()=>c(69226),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/providers/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},77598:a=>{"use strict";a.exports=require("node:crypto")},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,c=[];for(let d of a)b.has(d.id)||(b.add(d.id),c.push(d));return c}function g(a){let b=[];for(let c of f(a)){if(!c.hasApiKeyLogin||c.status.source&&d.has(c.status.source))continue;let a=c.status.configured&&"oauth"!==c.credentialType;b.push({id:c.id,displayName:c.name,configured:a,...a&&c.status.source?{source:c.status.source}:{},modelCount:c.modelCount,supportsOAuth:c.hasOAuth})}return b}function h(a){let b=[];for(let c of f(a))c.hasOAuth&&b.push({id:c.id,name:e[c.id]??c.oauthName??c.name,usesCallbackServer:!1,loggedIn:"oauth"===c.credentialType,supportsApiKey:c.hasApiKeyLogin});return b}},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,[2970],()=>b(b.s=71262));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=6021,a.ids=[6021],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10674:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{AC:()=>o,WD:()=>k,cj:()=>m,lz:()=>n});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=a([g]);function k(a=(0,g.getAgentDir)()){return(0,f.join)(a,"settings.json")}function l(a){if(!(0,e.existsSync)(a))return{};let b=JSON.parse((0,e.readFileSync)(a,"utf8"));if("object"!=typeof b||null===b||Array.isArray(b))throw Error("Invalid settings.json: expected an object");return b}function m(a){if(void 0!==a.defaultTools){if(!Array.isArray(a.defaultTools)||a.defaultTools.some(a=>"string"!=typeof a))throw Error("Invalid settings.json: defaultTools must be an array of strings");return[...a.defaultTools]}}async function n(a,b){if(!(0,e.existsSync)(a))return b({});let c=await i().lock(a,{realpath:!1,retries:10});try{return b(l(a))}finally{await c()}}async function o(a,b){(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0});try{(0,e.writeFileSync)(a,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let c=await i().lock(a,{realpath:!1,retries:10});try{let c=l(a),d=b(c);return(0,e.writeFileSync)(a,JSON.stringify(c,null,2),"utf8"),(0,e.chmodSync)(a,384),d}finally{await c()}}g=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},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")},16265:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cache-miss-notices/route",pathname:"/api/cache-miss-notices",filename:"route",bundlePath:"app/api/cache-miss-notices/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\cache-miss-notices\\route.ts",nextConfigOutput:"",userland:()=>c(21392),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cache-miss-notices/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21392:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,PUT:()=>m,dynamic:()=>n});var e=c(73024),f=c(23211),g=c(10674),h=c(66544),i=a([g]);g=(i.then?(await i)():i)[0];let n="force-dynamic",o="showCacheMissNotices";async function j(){return(0,g.lz)((0,g.WD)(),a=>!0===a[o])}function k(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}async function l(){try{return f.NextResponse.json({enabled:await j()})}catch(a){return k(a)}}async function m(a){let b;if(!(0,h.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return f.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{b=await a.json()}catch{return f.NextResponse.json({error:"Invalid JSON body"},{status:400})}let c=b?.enabled;if("boolean"!=typeof c)return f.NextResponse.json({error:"enabled must be a boolean"},{status:400});try{if(!c&&!(0,e.existsSync)((0,g.WD)()))return f.NextResponse.json({enabled:!1});return await (0,g.AC)((0,g.WD)(),a=>{c?a[o]=!0:delete a[o]}),f.NextResponse.json({enabled:await j()})}catch(a){return k(a)}}d()}catch(a){d(a)}})},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")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j});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}}function j(a,b=h()){return!!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)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;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)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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{"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")},77030:a=>{"use strict";a.exports=require("node:net")},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:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,974],()=>b(b.s=16265));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=6021,a.ids=[6021],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10674:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{AC:()=>o,WD:()=>k,cj:()=>m,lz:()=>n});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=a([g]);function k(a=(0,g.getAgentDir)()){return(0,f.join)(a,"settings.json")}function l(a){var b;let c;if(!(0,e.existsSync)(a))return{};let d=(0,e.readFileSync)(a,"utf8");try{c=JSON.parse(d)}catch(c){let b=c instanceof Error?c.message:String(c);throw SyntaxError(`${a}: ${b}`)}if(b=c,"object"!=typeof b||null===b||Array.isArray(b))throw Error("Invalid settings.json: expected an object");return c}function m(a){if(void 0!==a.defaultTools){if(!Array.isArray(a.defaultTools)||a.defaultTools.some(a=>"string"!=typeof a))throw Error("Invalid settings.json: defaultTools must be an array of strings");return[...a.defaultTools]}}async function n(a,b){if(!(0,e.existsSync)(a))return b({});let c=await i().lock(a,{realpath:!1,retries:10});try{return b(l(a))}finally{await c()}}async function o(a,b){(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0});try{(0,e.writeFileSync)(a,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let c=await i().lock(a,{realpath:!1,retries:10});try{let c=l(a),d=b(c);return(0,e.writeFileSync)(a,JSON.stringify(c,null,2),"utf8"),(0,e.chmodSync)(a,384),d}finally{await c()}}g=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},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")},21392:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,PUT:()=>m,dynamic:()=>n});var e=c(73024),f=c(23211),g=c(10674),h=c(66544),i=a([g]);g=(i.then?(await i)():i)[0];let n="force-dynamic",o="showCacheMissNotices";async function j(){return(0,g.lz)((0,g.WD)(),a=>!0===a[o])}function k(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}async function l(){try{return f.NextResponse.json({enabled:await j()})}catch(a){return k(a)}}async function m(a){let b;if(!(0,h.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return f.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{b=await a.json()}catch{return f.NextResponse.json({error:"Invalid JSON body"},{status:400})}let c=b?.enabled;if("boolean"!=typeof c)return f.NextResponse.json({error:"enabled must be a boolean"},{status:400});try{if(!c&&!(0,e.existsSync)((0,g.WD)()))return f.NextResponse.json({enabled:!1});return await (0,g.AC)((0,g.WD)(),a=>{c?a[o]=!0:delete a[o]}),f.NextResponse.json({enabled:await j()})}catch(a){return k(a)}}d()}catch(a){d(a)}})},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")},31946:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/cache-miss-notices/route",pathname:"/api/cache-miss-notices",filename:"route",bundlePath:"app/api/cache-miss-notices/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\cache-miss-notices\\route.ts",nextConfigOutput:"",userland:()=>c(21392),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cache-miss-notices/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},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")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j});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}}function j(a,b=h()){return!!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)&&(!!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{let b=new URL(a.url);return/^\/api\/sessions\/[^/]+\/export$/.test(b.pathname)||function(a){if(!a.pathname.startsWith("/api/files/")||"read"!==a.searchParams.get("type"))return!1;let b=a.pathname.slice(a.pathname.lastIndexOf("/")+1);try{return decodeURIComponent(b).toLowerCase().endsWith(".pdf")}catch{return!1}}(b)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;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)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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{"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")},77030:a=>{"use strict";a.exports=require("node:net")},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:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,974],()=>b(b.s=31946));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,POST:()=>o});var d=c(23211),e=c(79748),f=c(66544),g=c(21820),h=c(33873),i=c.n(h);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)}async function k(a){return(0,e.realpath)("~"===a?(0,g.homedir)():a.startsWith("~/")?i().resolve((0,g.homedir)(),a.slice(2)):i().resolve(a))}async function l(a,b){let c=b.trim();if(!(c&&"."!==c&&".."!==c&&!/[\\/\0]/.test(c)))throw Error("Directory name must be a single folder name");let d=await k(a);if(!(await (0,e.stat)(d)).isDirectory())throw Error("Parent path is not a directory");let f=i().join(d,c);return await (0,e.mkdir)(f),(0,e.realpath)(f)}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:i().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=i().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{var b;let c,f,h,l,n=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(n))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let o=n||(0,g.homedir)();try{c=await k(o)}catch{return d.NextResponse.json({error:"Directory does not exist"},{status:404})}if(!(await (0,e.stat)(c)).isDirectory())return d.NextResponse.json({error:"Path is not a directory"},{status:400});let p=await m(c);return d.NextResponse.json({path:c,parentPath:(b=c,h=(f=/^[a-zA-Z]:[\\/]/.test(b)||b.startsWith("\\\\")?i().win32:i().posix).normalize(b),(l=f.dirname(h))===h?null:l),directories:p})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}async function o(a){if(!(0,f.EN)(a))return d.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,f.E2)(a))return d.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c="string"==typeof b.path?b.path.trim():"",e="string"==typeof b.name?b.name.trim():"";if(!c)return d.NextResponse.json({error:"Parent path is required"},{status:400});if(!e)return d.NextResponse.json({error:"Directory name is required"},{status:400});let f=await l(c,e);return d.NextResponse.json({success:!0,path:f})}catch(b){let a=b&&"object"==typeof b&&"code"in b?String(b.code):"";if("EEXIST"===a)return d.NextResponse.json({error:"A file or directory with this name already exists"},{status:409});if("ENOENT"===a)return d.NextResponse.json({error:"Parent directory does not exist"},{status:404});if("EACCES"===a||"EPERM"===a)return d.NextResponse.json({error:"Permission denied"},{status:403});if("EINVAL"===a||"ENAMETOOLONG"===a)return d.NextResponse.json({error:"Directory name is invalid"},{status:400});if(b instanceof Error&&("Directory name must be a single folder name"===b.message||"Parent path is not a directory"===b.message))return d.NextResponse.json({error:b.message},{status:400});return d.NextResponse.json({error:String(b)},{status:500})}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4249:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\cwd\\browse\\route.ts",nextConfigOutput:"",userland:()=>c(1180),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},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")},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")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j});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}}function j(a,b=h()){return!!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)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;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)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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},77030:a=>{"use strict";a.exports=require("node:net")},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,[2970,1813],()=>b(b.s=4249));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,POST:()=>o});var d=c(23211),e=c(79748),f=c(66544),g=c(21820),h=c(33873),i=c.n(h);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)}async function k(a){return(0,e.realpath)("~"===a?(0,g.homedir)():a.startsWith("~/")?i().resolve((0,g.homedir)(),a.slice(2)):i().resolve(a))}async function l(a,b){let c=b.trim();if(!(c&&"."!==c&&".."!==c&&!/[\\/\0]/.test(c)))throw Error("Directory name must be a single folder name");let d=await k(a);if(!(await (0,e.stat)(d)).isDirectory())throw Error("Parent path is not a directory");let f=i().join(d,c);return await (0,e.mkdir)(f),(0,e.realpath)(f)}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:i().join(a,b.name)};if(!b.isSymbolicLink())return null;try{let c=i().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{var b;let c,f,h,l,n=a.nextUrl.searchParams.get("path")?.trim();if(function(a,b=process.platform){return"win32"===b&&!a}(n))return d.NextResponse.json({path:"",parentPath:null,drives:await j(),directories:[]});let o=n||(0,g.homedir)();try{c=await k(o)}catch{return d.NextResponse.json({error:"Directory does not exist"},{status:404})}if(!(await (0,e.stat)(c)).isDirectory())return d.NextResponse.json({error:"Path is not a directory"},{status:400});let p=await m(c);return d.NextResponse.json({path:c,parentPath:(b=c,h=(f=/^[a-zA-Z]:[\\/]/.test(b)||b.startsWith("\\\\")?i().win32:i().posix).normalize(b),(l=f.dirname(h))===h?null:l),directories:p})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}async function o(a){if(!(0,f.EN)(a))return d.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,f.E2)(a))return d.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json(),c="string"==typeof b.path?b.path.trim():"",e="string"==typeof b.name?b.name.trim():"";if(!c)return d.NextResponse.json({error:"Parent path is required"},{status:400});if(!e)return d.NextResponse.json({error:"Directory name is required"},{status:400});let f=await l(c,e);return d.NextResponse.json({success:!0,path:f})}catch(b){let a=b&&"object"==typeof b&&"code"in b?String(b.code):"";if("EEXIST"===a)return d.NextResponse.json({error:"A file or directory with this name already exists"},{status:409});if("ENOENT"===a)return d.NextResponse.json({error:"Parent directory does not exist"},{status:404});if("EACCES"===a||"EPERM"===a)return d.NextResponse.json({error:"Permission denied"},{status:403});if("EINVAL"===a||"ENAMETOOLONG"===a)return d.NextResponse.json({error:"Directory name is invalid"},{status:400});if(b instanceof Error&&("Directory name must be a single folder name"===b.message||"Parent path is not a directory"===b.message))return d.NextResponse.json({error:b.message},{status:400});return d.NextResponse.json({error:String(b)},{status:500})}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7834:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\cwd\\browse\\route.ts",nextConfigOutput:"",userland:()=>c(1180),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/browse/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},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")},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")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j});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}}function j(a,b=h()){return!!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)&&(!!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{let b=new URL(a.url);return/^\/api\/sessions\/[^/]+\/export$/.test(b.pathname)||function(a){if(!a.pathname.startsWith("/api/files/")||"read"!==a.searchParams.get("type"))return!1;let b=a.pathname.slice(a.pathname.lastIndexOf("/")+1);try{return decodeURIComponent(b).toLowerCase().endsWith(".pdf")}catch{return!1}}(b)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d,e=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;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)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 k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},77030:a=>{"use strict";a.exports=require("node:net")},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,[2970,1813],()=>b(b.s=7834));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/.next/server/app/api/cwd/browse/route.js.nft.json
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 42523465 bytes
|
|
4
|
+
sha256: cb57661fa2a06dcc273f1306424a3fe85e43d1845d0d9524e2aef8d3e0f86332
|
|
@@ -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")},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")},10879:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$q:()=>x,Vy:()=>v,bA:()=>y,ej:()=>u,yh:()=>C});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(63108),l=c(37431),m=c(12069),n=a([g]);g=(n.then?(await n)():n)[0];let z=new Set(["version","revision","sessions","projects","removedProjects","projectOrder","projectNames","__proto__"]),A=Symbol.for("pi-web:session-ui-state-write-queue"),B={realpath:!1,stale:1e4,retries:{retries:10,factor:2,minTimeout:25,maxTimeout:500},onCompromised:a=>{console.warn(`[pi-web] the session UI state lock was compromised: ${a.message}`)}};class C extends Error{constructor(a="Another process holds the session UI state lock"){super(a),this.name="SessionUiStateLockedError"}}function o(){return globalThis.__piWebSessionUiStateCache??={reads:new Map,revisions:new Map}}function p(a,b){let c=o().revisions;b>(c.get(a)??-1)&&c.set(a,b)}function q(a){return structuredClone(a)}function r(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web-session-state.json")}function s(a){let b;try{b=JSON.parse(a)}catch{return{ok:!1}}let c=(0,m.Jx)(b);return c?{ok:!0,state:c,raw:b}:{ok:!1}}function t(a){let b,c;try{b=(0,e.statSync)(a)}catch(c){let b=c?.code;if("ENOENT"===b||"ENOTDIR"===b)return o().reads.delete(a),(0,m.ly)();throw c}let d=o().reads.get(a);if(d&&d.mtimeMs===b.mtimeMs&&d.size===b.size&&d.ino===b.ino)return d.state;let f=(0,l.y)(a,4194304);if(void 0===f)return o().reads.delete(a),(0,m.ly)();let g=s(f);return g.ok?(c=g.state,p(a,c.revision)):(console.warn(`[pi-web] ${a} is not valid session UI state; reading it as empty until the next change sets it aside`),c=(0,m.ly)()),o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:c}),c}function u(a){try{return q(t(a??r()))}catch(a){return console.warn(`[pi-web] could not read the session UI state: ${a instanceof Error?a.message:String(a)}`),(0,m.ly)()}}function v(a){try{return t(a??r()).revision}catch{return null}}function w(a,b){return(0,k.T)(A,a,async()=>{let c;(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0});try{c=await i().lock(a,B)}catch(a){if("ELOCKED"===a?.code)throw new C;throw a}try{let c,d=o().revisions.get(a)??0,f=(0,l.y)(a,4194304),g={},h=!1;if(void 0===f)c={...(0,m.ly)(),revision:d};else{let b=s(f);if(b.ok)for(let[a,d]of(c=b.state,Object.entries(b.raw)))z.has(a)||(g[a]=d);else{let b=`${a}.corrupt-${Date.now()}`;try{(0,e.renameSync)(a,b),console.warn(`[pi-web] ${a} could not be parsed; moved it to ${b} and started from an empty session UI state`)}catch(b){console.warn(`[pi-web] ${a} could not be parsed and could not be moved aside (${b instanceof Error?b.message:String(b)}); starting from an empty session UI state`)}c={...(0,m.ly)(),revision:d+1},h=!0}}let i=b(c);if(!i.changed&&!h)return q(c);let k={...i.state,version:m.fS,revision:c.revision+ +!!i.changed},n={version:k.version,revision:k.revision,sessions:k.sessions,projects:k.projects,...k.removedProjects&&Object.keys(k.removedProjects).length>0?{removedProjects:k.removedProjects}:{},...k.projectOrder?.length?{projectOrder:k.projectOrder}:{},...k.projectNames&&Object.keys(k.projectNames).length>0?{projectNames:k.projectNames}:{},...g};(0,j.$)(a,JSON.stringify(n,null,2)+"\n"),p(a,k.revision);try{let b=(0,e.statSync)(a);o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:q(k)})}catch{o().reads.delete(a)}return q(k)}finally{try{await c()}catch{}}})}function x(a,b){let c;try{c=b??r()}catch(a){return Promise.reject(a)}return w(c,b=>(0,m.D7)(b,a,Date.now()))}async function y(a,b){let c=b??r(),d=[...new Set(a)];if(0===d.length)return;let e=a=>d.some(b=>Object.prototype.hasOwnProperty.call(a.sessions,b));e(t(c))&&await w(c,a=>{if(!e(a))return{state:a,changed:!1};let b={...a.sessions};for(let a of d)delete b[a];return{state:{...a,sessions:b},changed:!0}})}d()}catch(a){d(a)}})},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:()=>m});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(74244),k=c(24923),l=a([i]);async function m(a){try{let b,c=await a.json(),d="string"==typeof c.cwd?c.cwd.trim():"";if(!d)return e.NextResponse.json({error:"Path is required"},{status:400});let l="~"===d?(0,g.homedir)():d.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),d.slice(2)):(0,h.isAbsolute)(d)?d:(0,h.resolve)(d);try{b=(0,f.statSync)(l)}catch{return e.NextResponse.json({error:`Directory does not exist: ${d}`},{status:400})}if(!b.isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${d}`},{status:400});(0,i.wz)(l);let m=await (0,k.KI)(l);return e.NextResponse.json({success:!0,cwd:l,projectRoot:m.projectRoot,projectKey:(0,j.z)(m.projectRoot)})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(l.then?(await l)():l)[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")},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")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>m,B7:()=>n,mc:()=>l,uK:()=>j.uK,wz:()=>e.wz});var e=c(25252),f=c(82536),g=c(40402),h=c(10879),i=c(12069),j=c(58864),k=a([g,h]);async function l(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,g.dQ)(),d=new Set;for(let a of c)a.cwd&&d.add((0,e.Nw)(a.cwd)),a.projectRoot&&d.add((0,e.Nw)(a.projectRoot));for(let a of(0,e.HM)())d.add(a);let f=(0,h.ej)();for(let[a,b]of Object.entries(f.projects))(0,i.KV)(f,a)||d.add((0,e.Nw)(b.root));return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function m(a,b){return(0,f.o4)(a,b)}function n(a,b){return(0,f.xk)(a,b)}[g,h]=k.then?(await k)():k,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")},99321:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\cwd\\validate\\route.ts",nextConfigOutput:"",userland:()=>c(20816),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813,426,974,5582,5e3],()=>b(b.s=99321));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")},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")},10879:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{$q:()=>x,Vy:()=>v,bA:()=>y,ej:()=>u,yh:()=>C});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(63108),l=c(37431),m=c(12069),n=a([g]);g=(n.then?(await n)():n)[0];let z=new Set(["version","revision","sessions","projects","removedProjects","projectOrder","projectNames","__proto__"]),A=Symbol.for("pi-web:session-ui-state-write-queue"),B={realpath:!1,stale:1e4,retries:{retries:10,factor:2,minTimeout:25,maxTimeout:500},onCompromised:a=>{console.warn(`[pi-web] the session UI state lock was compromised: ${a.message}`)}};class C extends Error{constructor(a="Another process holds the session UI state lock"){super(a),this.name="SessionUiStateLockedError"}}function o(){return globalThis.__piWebSessionUiStateCache??={reads:new Map,revisions:new Map}}function p(a,b){let c=o().revisions;b>(c.get(a)??-1)&&c.set(a,b)}function q(a){return structuredClone(a)}function r(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web-session-state.json")}function s(a){let b;try{b=JSON.parse(a)}catch{return{ok:!1}}let c=(0,m.Jx)(b);return c?{ok:!0,state:c,raw:b}:{ok:!1}}function t(a){let b,c;try{b=(0,e.statSync)(a)}catch(c){let b=c?.code;if("ENOENT"===b||"ENOTDIR"===b)return o().reads.delete(a),(0,m.ly)();throw c}let d=o().reads.get(a);if(d&&d.mtimeMs===b.mtimeMs&&d.size===b.size&&d.ino===b.ino)return d.state;let f=(0,l.y)(a,4194304);if(void 0===f)return o().reads.delete(a),(0,m.ly)();let g=s(f);return g.ok?(c=g.state,p(a,c.revision)):(console.warn(`[pi-web] ${a} is not valid session UI state; reading it as empty until the next change sets it aside`),c=(0,m.ly)()),o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:c}),c}function u(a){try{return q(t(a??r()))}catch(a){return console.warn(`[pi-web] could not read the session UI state: ${a instanceof Error?a.message:String(a)}`),(0,m.ly)()}}function v(a){try{return t(a??r()).revision}catch{return null}}function w(a,b){return(0,k.T)(A,a,async()=>{let c;(0,e.mkdirSync)((0,f.dirname)(a),{recursive:!0});try{c=await i().lock(a,B)}catch(a){if("ELOCKED"===a?.code)throw new C;throw a}try{let c,d=o().revisions.get(a)??0,f=(0,l.y)(a,4194304),g={},h=!1;if(void 0===f)c={...(0,m.ly)(),revision:d};else{let b=s(f);if(b.ok)for(let[a,d]of(c=b.state,Object.entries(b.raw)))z.has(a)||(g[a]=d);else{let b=`${a}.corrupt-${Date.now()}`;try{(0,e.renameSync)(a,b),console.warn(`[pi-web] ${a} could not be parsed; moved it to ${b} and started from an empty session UI state`)}catch(b){console.warn(`[pi-web] ${a} could not be parsed and could not be moved aside (${b instanceof Error?b.message:String(b)}); starting from an empty session UI state`)}c={...(0,m.ly)(),revision:d+1},h=!0}}let i=b(c);if(!i.changed&&!h)return q(c);let k={...i.state,version:m.fS,revision:c.revision+ +!!i.changed},n={version:k.version,revision:k.revision,sessions:k.sessions,projects:k.projects,...k.removedProjects&&Object.keys(k.removedProjects).length>0?{removedProjects:k.removedProjects}:{},...k.projectOrder?.length?{projectOrder:k.projectOrder}:{},...k.projectNames&&Object.keys(k.projectNames).length>0?{projectNames:k.projectNames}:{},...g};(0,j.$)(a,JSON.stringify(n,null,2)+"\n"),p(a,k.revision);try{let b=(0,e.statSync)(a);o().reads.set(a,{mtimeMs:b.mtimeMs,size:b.size,ino:b.ino,state:q(k)})}catch{o().reads.delete(a)}return q(k)}finally{try{await c()}catch{}}})}function x(a,b){let c;try{c=b??r()}catch(a){return Promise.reject(a)}return w(c,b=>(0,m.D7)(b,a,Date.now()))}async function y(a,b){let c=b??r(),d=[...new Set(a)];if(0===d.length)return;let e=a=>d.some(b=>Object.prototype.hasOwnProperty.call(a.sessions,b));e(t(c))&&await w(c,a=>{if(!e(a))return{state:a,changed:!1};let b={...a.sessions};for(let a of d)delete b[a];return{state:{...a,sessions:b},changed:!0}})}d()}catch(a){d(a)}})},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:()=>m});var e=c(23211),f=c(29021),g=c(21820),h=c(33873),i=c(80547),j=c(74244),k=c(24923),l=a([i]);async function m(a){try{let b,c=await a.json(),d="string"==typeof c.cwd?c.cwd.trim():"";if(!d)return e.NextResponse.json({error:"Path is required"},{status:400});let l="~"===d?(0,g.homedir)():d.startsWith("~/")?(0,h.resolve)((0,g.homedir)(),d.slice(2)):(0,h.isAbsolute)(d)?d:(0,h.resolve)(d);try{b=(0,f.statSync)(l)}catch{return e.NextResponse.json({error:`Directory does not exist: ${d}`},{status:400})}if(!b.isDirectory())return e.NextResponse.json({error:`Path is not a directory: ${d}`},{status:400});(0,i.wz)(l);let m=await (0,k.KI)(l);return e.NextResponse.json({success:!0,cwd:l,projectRoot:m.projectRoot,projectKey:(0,j.z)(m.projectRoot)})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}i=(l.then?(await l)():l)[0],d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},27610:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>A,patchFetch:()=>z,routeModule:()=>v,serverHooks:()=>y,workAsyncStorage:()=>w,workUnitAsyncStorage:()=>x});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(10246),u=c(37527);let v=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:"D:\\yun\\pi-web-yun\\app\\api\\cwd\\validate\\route.ts",nextConfigOutput:"",userland:()=>c(20816),...{}}),{workAsyncStorage:w,workUnitAsyncStorage:x,serverHooks:y}=v;function z(){return(0,f.patchFetch)({workAsyncStorage:w,workUnitAsyncStorage:x})}async function A(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),v.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/cwd/validate/route";"/index"===d&&(d="/");let f=await v.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:w,deploymentId:x,params:y,nextConfig:z,parsedUrl:A,isDraftMode:B,prerenderManifest:C,routerServerContext:D,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,resolvedPathname:G,clientReferenceManifest:H,serverActionsManifest:I}=f,J=(0,j.normalizeAppPath)(d),K=!!C.routes[G]&&(v.isDev||(0,t.isRouteCacheOwner)(G,v.cacheOwner,C.routes[G])),L=!!(C.dynamicRoutes[J]||K),M=async()=>((null==D?void 0:D.render404)?await D.render404(a,b,A,!1):b.end("This page could not be found"),null);if(L&&!B){let a=C.dynamicRoutes[J];if(a&&!1===a.fallback&&!K){if(z.adapterPath)return await M();throw new s.NoFallbackError}}let N=null;!L||v.isDev||B||(N="/index"===(N=G)?"/":N);let O=!0===v.isDev||!L,P=L&&!O;I&&H&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:H,serverActionsManifest:I});let Q=a.method||"GET",R=(0,h.getTracer)(),S=R.getActiveScopeSpan(),T=!!(null==D?void 0:D.isWrappedByNextServer),U=!!(0,g.getRequestMeta)(a,"minimalMode"),V=(0,g.getRequestMeta)(a,"incrementalCache")||await v.getIncrementalCache(a,z,C,U);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let W={params:y,previewProps:C.preview,renderOpts:{experimental:{authInterrupts:!!z.experimental.authInterrupts,useCacheTimeout:z.experimental.useCacheTimeout},cacheComponents:!!z.cacheComponents,validationLevel:z.experimental.instantInsights.validationLevel,isDraftMode:B,supportsDynamicResponse:O,incrementalCache:V,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:z.cacheLife,staticPageGenerationTimeout:z.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>v.onRequestError(a,b,d,e,D)},sharedContext:{buildId:w,deploymentId:x}},X=new k.NodeNextRequest(a),Y=new k.NodeNextResponse(b),Z=l.NextRequestAdapter.fromNodeNextRequest(X,(0,l.signalFromNodeResponse)(b)),$=async({previousCacheEntry:e})=>{try{if(!U&&E&&F&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await v.handle(Z,W);a.fetchMetrics=W.renderOpts.fetchMetrics;let f=W.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=W.renderOpts.collectedTags;if(!L)return await (0,o.I)(X,Y,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!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,e=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?z.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await v.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),b}},_=async(d,f)=>{try{var g,i;let d=await v.handleResponse({req:a,nextConfig:z,cacheKey:N,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:F,responseGenerator:$,waitUntil:c.waitUntil,isMinimalMode:U});if(!L)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==u.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});U||b.setHeader("x-nextjs-cache",E?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),B&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);U&&L||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)(X,Y,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await v.onRequestError(a,b,{routerKind:"App Router",routePath:J,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:P,isOnDemandRevalidate:E})},!1,D),L)throw b;await (0,o.I)(X,Y,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=R.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")||J,g=`${Q} ${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(T&&S)await _(S,void 0);else{let b=R.getActiveScopeSpan();await R.withPropagatedContext(a.headers,()=>R.trace(m.BaseServerSpan.handleRequest,{spanName:`${Q} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":Q,"http.target":a.url}},a=>_(a,b)),void 0,!T)}}},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")},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")},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")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>m,B7:()=>n,mc:()=>l,uK:()=>j.uK,wz:()=>e.wz});var e=c(25252),f=c(82536),g=c(40402),h=c(10879),i=c(12069),j=c(58864),k=a([g,h]);async function l(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,g.dQ)(),d=new Set;for(let a of c)a.cwd&&d.add((0,e.Nw)(a.cwd)),a.projectRoot&&d.add((0,e.Nw)(a.projectRoot));for(let a of(0,e.HM)())d.add(a);let f=(0,h.ej)();for(let[a,b]of Object.entries(f.projects))(0,i.KV)(f,a)||d.add((0,e.Nw)(b.root));return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function m(a,b){return(0,f.o4)(a,b)}function n(a,b){return(0,f.xk)(a,b)}[g,h]=k.then?(await k)():k,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,[2970,1813,426,974,5582,5e3],()=>b(b.s=27610));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/.next/server/app/api/cwd/validate/route.js.nft.json
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 42737493 bytes
|
|
4
|
+
sha256: d5190b327750b2b8a2cba018d9f8417b479ec632b989eb888e070df103c9d15f
|