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
|
-
"use strict";(()=>{var a={};a.id=6324,a.ids=[6324],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")},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")},44289:(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/subagents/profiles/route",pathname:"/api/subagents/profiles",filename:"route",bundlePath:"app/api/subagents/profiles/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\subagents\\profiles\\route.ts",nextConfigOutput:"",userland:()=>c(83570),...{}}),{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/subagents/profiles/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)}}},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")},83570:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>p,GET:()=>m,PATCH:()=>o,PUT:()=>n,dynamic:()=>q});var e=c(23211),f=c(29021),g=c(80547),h=c(7048),i=c(27367),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let q="force-dynamic";async function k(a){if("string"!=typeof a||!a||!(0,f.existsSync)(a))throw Error("Valid cwd required");if(!(0,g.B7)(a,await (0,g.mc)()))throw Error("Access denied");return a}function l(a){if("global"!==a&&"project"!==a)throw Error("scope must be global or project");return a}async function m(a){try{let b=await k(new URL(a.url).searchParams.get("cwd"));return e.NextResponse.json({profiles:(0,h.fw)(b)})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function n(a){try{let b=await a.json(),c=await k(b.cwd),d=l(b.scope);if(!b.profile||"string"!=typeof b.profile.name)return e.NextResponse.json({error:"profile required"},{status:400});return e.NextResponse.json({profile:(0,h.kj)(c,d,b.profile)})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function o(a){try{let b=await a.json(),c=await k(b.cwd),d=function(a){if("builtin"===a)return a;if("global"!==a&&"project"!==a)throw Error("scope must be global, project, or builtin");return a}(b.scope);if("string"!=typeof b.name)return e.NextResponse.json({error:"name required"},{status:400});if("boolean"!=typeof b.enabled)return e.NextResponse.json({error:"enabled required"},{status:400});let f=b.name,g=(0,h.fw)(c).find(a=>a.scope===d&&a.name.toLowerCase()===f.toLowerCase());if(!g)return e.NextResponse.json({error:"Agent profile not found"},{status:404});if("builtin"===d)return(0,i.o9)(g.name,!b.enabled),e.NextResponse.json({profile:{...g,enabled:b.enabled}});let j={name:g.name,displayName:g.displayName,description:g.description,systemPrompt:g.systemPrompt,tools:g.tools,...void 0!==g.extensionTools?{extensionTools:[...g.extensionTools]}:{},...void 0!==g.disallowedExtensionTools?{disallowedExtensionTools:[...g.disallowedExtensionTools]}:{},loadSkills:g.loadSkills,...void 0!==g.skills?{skills:[...g.skills]}:{},loadExtensions:g.loadExtensions,...void 0!==g.extensions?{extensions:[...g.extensions]}:{},codemode:g.codemode,mcp:g.mcp,promptMode:g.promptMode,model:g.model,thinking:g.thinking,maxTurns:g.maxTurns,inheritContext:g.inheritContext,runInBackground:g.runInBackground,color:g.color,isolation:g.isolation,persistSession:g.persistSession,enabled:g.enabled};return e.NextResponse.json({profile:(0,h.kj)(c,d,{...j,enabled:b.enabled})})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function p(a){try{let b=await a.json(),c=await k(b.cwd),d=l(b.scope);if("string"!=typeof b.name)return e.NextResponse.json({error:"name required"},{status:400});return(0,h.q9)(c,d,b.name),e.NextResponse.json({ok:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}d()}catch(a){d(a)}})},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=44289));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6324,a.ids=[6324],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")},4069:(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/subagents/profiles/route",pathname:"/api/subagents/profiles",filename:"route",bundlePath:"app/api/subagents/profiles/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\subagents\\profiles\\route.ts",nextConfigOutput:"",userland:()=>c(83570),...{}}),{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/subagents/profiles/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=>{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")},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")},83570:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>p,GET:()=>m,PATCH:()=>o,PUT:()=>n,dynamic:()=>q});var e=c(23211),f=c(29021),g=c(80547),h=c(7048),i=c(27367),j=a([g,h,i]);[g,h,i]=j.then?(await j)():j;let q="force-dynamic";async function k(a){if("string"!=typeof a||!a||!(0,f.existsSync)(a))throw Error("Valid cwd required");if(!(0,g.B7)(a,await (0,g.mc)()))throw Error("Access denied");return a}function l(a){if("global"!==a&&"project"!==a)throw Error("scope must be global or project");return a}async function m(a){try{let b=await k(new URL(a.url).searchParams.get("cwd"));return e.NextResponse.json({profiles:(0,h.fw)(b)})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function n(a){try{let b=await a.json(),c=await k(b.cwd),d=l(b.scope);if(!b.profile||"string"!=typeof b.profile.name)return e.NextResponse.json({error:"profile required"},{status:400});return e.NextResponse.json({profile:(0,h.kj)(c,d,b.profile)})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function o(a){try{let b=await a.json(),c=await k(b.cwd),d=function(a){if("builtin"===a)return a;if("global"!==a&&"project"!==a)throw Error("scope must be global, project, or builtin");return a}(b.scope);if("string"!=typeof b.name)return e.NextResponse.json({error:"name required"},{status:400});if("boolean"!=typeof b.enabled)return e.NextResponse.json({error:"enabled required"},{status:400});let f=b.name,g=(0,h.fw)(c).find(a=>a.scope===d&&a.name.toLowerCase()===f.toLowerCase());if(!g)return e.NextResponse.json({error:"Agent profile not found"},{status:404});if("builtin"===d)return(0,i.o9)(g.name,!b.enabled),e.NextResponse.json({profile:{...g,enabled:b.enabled}});let j={name:g.name,displayName:g.displayName,description:g.description,systemPrompt:g.systemPrompt,tools:g.tools,...void 0!==g.extensionTools?{extensionTools:[...g.extensionTools]}:{},...void 0!==g.disallowedExtensionTools?{disallowedExtensionTools:[...g.disallowedExtensionTools]}:{},loadSkills:g.loadSkills,...void 0!==g.skills?{skills:[...g.skills]}:{},loadExtensions:g.loadExtensions,...void 0!==g.extensions?{extensions:[...g.extensions]}:{},codemode:g.codemode,mcp:g.mcp,promptMode:g.promptMode,model:g.model,thinking:g.thinking,maxTurns:g.maxTurns,inheritContext:g.inheritContext,runInBackground:g.runInBackground,color:g.color,isolation:g.isolation,persistSession:g.persistSession,enabled:g.enabled};return e.NextResponse.json({profile:(0,h.kj)(c,d,{...j,enabled:b.enabled})})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}async function p(a){try{let b=await a.json(),c=await k(b.cwd),d=l(b.scope);if("string"!=typeof b.name)return e.NextResponse.json({error:"name required"},{status:400});return(0,h.q9)(c,d,b.name),e.NextResponse.json({ok:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:"Access denied"===a?403:400})}}d()}catch(a){d(a)}})},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=4069));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=4306,a.ids=[4306],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")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27199:(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/subagents/settings/route",pathname:"/api/subagents/settings",filename:"route",bundlePath:"app/api/subagents/settings/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\subagents\\settings\\route.ts",nextConfigOutput:"",userland:()=>c(39881),...{}}),{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/subagents/settings/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)}}},27367:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{N:()=>o,Q$:()=>n,UF:()=>s,UM:()=>r,ef:()=>p,hd:()=>m,o9:()=>q});var e=c(73024),f=c(76760),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let s=32;function j(a){if(!Array.isArray(a))return[];let b=[],c=new Set;for(let d of a){if("string"!=typeof d)continue;let a=d.trim(),e=a.toLowerCase();!a||c.has(e)||(c.add(e),b.push(a))}return b}function k(a=(0,g.getAgentDir)()){return(0,f.join)(a,"agents","settings.json")}function l(a){if(!(0,e.existsSync)(a))return{};let b=JSON.parse((0,e.readFileSync)(a,"utf8"));if(null===b||"object"!=typeof b||Array.isArray(b))throw Error("Invalid subagent settings: expected an object");return b}function m(a=k()){var b,c,d,e;let f=l(a);return c=!0===f.builtInEnabled,b=f.maxConcurrent,d="number"==typeof b&&Number.isInteger(b)&&b>=1&&b<=s?b:10,e=j(f.disabledBuiltIns),Object.defineProperty({builtInEnabled:c,disabledBuiltIns:e},"maxConcurrent",{value:d,enumerable:!1,configurable:!0})}function n(a=k()){try{return new Set(m(a).disabledBuiltIns.map(a=>a.toLowerCase()))}catch{return new Set}}function o(a=k()){try{return m(a).builtInEnabled}catch{return!1}}function p(a,b=k()){let c=l(b);return(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,h.$)(b,JSON.stringify({...c,version:1,builtInEnabled:a},null,2)),m(b)}function q(a,b,c=k()){let d=a.trim();if(!d)throw Error("Sub-agent name is required");let g=l(c),i=j(g.disabledBuiltIns),n=d.toLowerCase(),o=i.some(a=>a.toLowerCase()===n);if(b===o)return m(c);let p=b?o?i:[...i,d]:i.filter(a=>a.toLowerCase()!==n);return(0,e.mkdirSync)((0,f.dirname)(c),{recursive:!0}),(0,h.$)(c,JSON.stringify({...g,version:1,disabledBuiltIns:p},null,2)),m(c)}function r(a,b=k()){if(!Number.isInteger(a)||a<1||a>s)throw Error(`maxConcurrent must be an integer between 1 and ${s}`);let c=l(b);return(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,h.$)(b,JSON.stringify({...c,version:1,maxConcurrent:a},null,2)),m(b)}d()}catch(a){d(a)}})},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")},39881:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,PUT:()=>j,dynamic:()=>k});var e=c(23211),f=c(66544),g=c(27367),h=a([g]);g=(h.then?(await h)():h)[0];let k="force-dynamic";async function i(){try{let a=(0,g.hd)();return e.NextResponse.json({enabled:a.builtInEnabled,maxConcurrent:a.maxConcurrent})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}async function j(a){if(!(0,f.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,f.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json();if(void 0===b.enabled&&void 0===b.maxConcurrent)return e.NextResponse.json({error:"enabled or maxConcurrent is required"},{status:400});if(void 0!==b.enabled&&"boolean"!=typeof b.enabled)return e.NextResponse.json({error:"enabled must be a boolean"},{status:400});if(void 0!==b.maxConcurrent&&("number"!=typeof b.maxConcurrent||!Number.isInteger(b.maxConcurrent)||b.maxConcurrent<1||b.maxConcurrent>g.UF))return e.NextResponse.json({error:`maxConcurrent must be an integer between 1 and ${g.UF}`},{status:400});let c=(0,g.hd)();return void 0!==b.enabled&&(c=(0,g.ef)(b.enabled)),void 0!==b.maxConcurrent&&(c=(0,g.UM)(b.maxConcurrent)),e.NextResponse.json({enabled:c.builtInEnabled,maxConcurrent:c.maxConcurrent})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},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:()=>{},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=27199));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=4306,a.ids=[4306],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")},8102:(a,b,c)=>{"use strict";c.d(b,{$:()=>g});var d=c(55511),e=c(29021),f=c(33873);function g(a,b){let c=(0,f.dirname)(a),g=(0,f.join)(c,`.${(0,f.basename)(a)}-${(0,d.randomUUID)()}.tmp`),h=!1;try{(0,e.writeFileSync)(g,b,{encoding:"utf8",flag:"wx",mode:384,flush:!0}),(0,e.renameSync)(g,a)}catch(a){throw h=!0,a}finally{try{(0,e.unlinkSync)(g)}catch(a){if("ENOENT"!==a.code&&!h)throw a}}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},27367:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{N:()=>o,Q$:()=>n,UF:()=>s,UM:()=>r,ef:()=>p,hd:()=>m,o9:()=>q});var e=c(73024),f=c(76760),g=c(75430),h=c(8102),i=a([g]);g=(i.then?(await i)():i)[0];let s=32;function j(a){if(!Array.isArray(a))return[];let b=[],c=new Set;for(let d of a){if("string"!=typeof d)continue;let a=d.trim(),e=a.toLowerCase();!a||c.has(e)||(c.add(e),b.push(a))}return b}function k(a=(0,g.getAgentDir)()){return(0,f.join)(a,"agents","settings.json")}function l(a){if(!(0,e.existsSync)(a))return{};let b=JSON.parse((0,e.readFileSync)(a,"utf8"));if(null===b||"object"!=typeof b||Array.isArray(b))throw Error("Invalid subagent settings: expected an object");return b}function m(a=k()){var b,c,d,e;let f=l(a);return c=!0===f.builtInEnabled,b=f.maxConcurrent,d="number"==typeof b&&Number.isInteger(b)&&b>=1&&b<=s?b:10,e=j(f.disabledBuiltIns),Object.defineProperty({builtInEnabled:c,disabledBuiltIns:e},"maxConcurrent",{value:d,enumerable:!1,configurable:!0})}function n(a=k()){try{return new Set(m(a).disabledBuiltIns.map(a=>a.toLowerCase()))}catch{return new Set}}function o(a=k()){try{return m(a).builtInEnabled}catch{return!1}}function p(a,b=k()){let c=l(b);return(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,h.$)(b,JSON.stringify({...c,version:1,builtInEnabled:a},null,2)),m(b)}function q(a,b,c=k()){let d=a.trim();if(!d)throw Error("Sub-agent name is required");let g=l(c),i=j(g.disabledBuiltIns),n=d.toLowerCase(),o=i.some(a=>a.toLowerCase()===n);if(b===o)return m(c);let p=b?o?i:[...i,d]:i.filter(a=>a.toLowerCase()!==n);return(0,e.mkdirSync)((0,f.dirname)(c),{recursive:!0}),(0,h.$)(c,JSON.stringify({...g,version:1,disabledBuiltIns:p},null,2)),m(c)}function r(a,b=k()){if(!Number.isInteger(a)||a<1||a>s)throw Error(`maxConcurrent must be an integer between 1 and ${s}`);let c=l(b);return(0,e.mkdirSync)((0,f.dirname)(b),{recursive:!0}),(0,h.$)(b,JSON.stringify({...c,version:1,maxConcurrent:a},null,2)),m(b)}d()}catch(a){d(a)}})},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")},39881:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,PUT:()=>j,dynamic:()=>k});var e=c(23211),f=c(66544),g=c(27367),h=a([g]);g=(h.then?(await h)():h)[0];let k="force-dynamic";async function i(){try{let a=(0,g.hd)();return e.NextResponse.json({enabled:a.builtInEnabled,maxConcurrent:a.maxConcurrent})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}async function j(a){if(!(0,f.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,f.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});try{let b=await a.json();if(void 0===b.enabled&&void 0===b.maxConcurrent)return e.NextResponse.json({error:"enabled or maxConcurrent is required"},{status:400});if(void 0!==b.enabled&&"boolean"!=typeof b.enabled)return e.NextResponse.json({error:"enabled must be a boolean"},{status:400});if(void 0!==b.maxConcurrent&&("number"!=typeof b.maxConcurrent||!Number.isInteger(b.maxConcurrent)||b.maxConcurrent<1||b.maxConcurrent>g.UF))return e.NextResponse.json({error:`maxConcurrent must be an integer between 1 and ${g.UF}`},{status:400});let c=(0,g.hd)();return void 0!==b.enabled&&(c=(0,g.ef)(b.enabled)),void 0!==b.maxConcurrent&&(c=(0,g.UM)(b.maxConcurrent)),e.NextResponse.json({enabled:c.builtInEnabled,maxConcurrent:c.maxConcurrent})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},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")},73244:(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/subagents/settings/route",pathname:"/api/subagents/settings",filename:"route",bundlePath:"app/api/subagents/settings/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\subagents\\settings\\route.ts",nextConfigOutput:"",userland:()=>c(39881),...{}}),{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/subagents/settings/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")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1813],()=>b(b.s=73244));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var a={};a.id=6252,a.ids=[6252],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")},14566:a=>{"use strict";a.exports=require("node-pty")},
|
|
2
|
-
`:"";b.enqueue(
|
|
1
|
+
(()=>{var a={};a.id=6252,a.ids=[6252],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")},14566:a=>{"use strict";a.exports=require("node-pty")},14732:(a,b,c)=>{"use strict";function d(a){return{address:function(a){let b=a?.split(",")[0]?.trim()??"";if(!b||b.length>64||!/^[0-9A-Za-z.:%[\]_-]+$/.test(b))return null;let c=/^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/i.exec(b);return c?c[1]:b}(a.get("x-forwarded-for")),client:function(a){if(!a)return null;let b=[e.find(([b])=>b.test(a))?.[1],f.find(([b])=>b.test(a))?.[1]].filter(a=>!!a);return b.length>0?b.join(" \xb7 "):null}(a.get("user-agent"))}}c.d(b,{lN:()=>d});let e=[[/\bEdg(?:e|A|iOS)?\//,"Edge"],[/\bOPR\/|\bOpera\b/,"Opera"],[/\bFirefox\/|\bFxiOS\//,"Firefox"],[/\bChrome\/|\bCriOS\//,"Chrome"],[/\bVersion\/[\d.]+.*\bSafari\//,"Safari"]],f=[[/\b(?:iPhone|iPad|iPod)\b/,"iOS"],[/\bAndroid\b/,"Android"],[/\bCrOS\b/,"ChromeOS"],[/\bWindows\b/,"Windows"],[/\bMacintosh\b|\bMac OS X\b/,"macOS"],[/\bLinux\b/,"Linux"]]},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},21820:a=>{"use strict";a.exports=require("os")},22664:a=>{"use strict";a.exports={}},26832:(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/terminal/[id]/events/route",pathname:"/api/terminal/[id]/events",filename:"route",bundlePath:"app/api/terminal/[id]/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\yun\\pi-web-yun\\app\\api\\terminal\\[id]\\events\\route.ts",nextConfigOutput:"",userland:()=>c(49907),...{}}),{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/terminal/[id]/events/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)}}},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")},49907:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i,runtime:()=>j});var e=c(53872),f=c(73968),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic",j="nodejs";async function h(a,{params:b}){let{id:c}=await b;if(!(0,f.hr)(c))return new Response("Terminal not found",{status:404});let d=a.headers.get("last-event-id")??new URL(a.url).searchParams.get("after"),g=null!==d&&/^\d+$/.test(d)&&Number.isSafeInteger(Number(d))?Number(d):void 0,i=()=>{},j=new ReadableStream({start(b){let d=new TextEncoder,h=!1,j=null,k=null,l=(0,e.NZ)((0,e.UP)("terminal",a)),m=c=>{if(!h&&(h=!0,l(),j&&clearInterval(j),k?.(),a.signal.removeEventListener("abort",n),c))try{b.close()}catch{}},n=()=>m(!0),o=a=>{if(!h)try{if((b.desiredSize??0)<=0)return void m(!0);let c="output"===a.type?`id: ${a.offset}
|
|
2
|
+
`:"";b.enqueue(d.encode(`${c}data: ${JSON.stringify(a)}
|
|
3
3
|
|
|
4
|
-
`)),("exit"===a.type||"closed"===a.type)&&
|
|
4
|
+
`)),("exit"===a.type||"closed"===a.type)&&m(!0)}catch{m(!1)}};i=m;let p=(0,f.BJ)(c,o,g);if(!p)return void m(!0);if(k=p.unsubscribe,b.enqueue(d.encode(":\n\n")),o(p.output),p.exited&&o({type:"exit",exitCode:p.exitCode??0}),!h){if(a.signal.addEventListener("abort",n,{once:!0}),a.signal.aborted)return void n();j=setInterval(()=>{try{(b.desiredSize??0)<=0?m(!0):h||b.enqueue(d.encode(":\n\n"))}catch{m(!1)}},3e4)}},cancel(){i(!1)}},{highWaterMark:262144,size:a=>a.byteLength});return new Response(j,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},53872:(a,b,c)=>{"use strict";c.d(b,{NZ:()=>i,UP:()=>h,lX:()=>j});var d=c(95412),e=c(14732);let f=Symbol.for("pi-web:page-streams");function g(){let a=globalThis,b=a[f];if(b instanceof Set)return b;let c=new Set;return a[f]=c,c}function h(a,b){let c=new URL(b.url).searchParams.get("holder");return{kind:a,holder:(0,d.SF)(c)?c:null,...(0,e.lN)(b.headers)}}function i(a){let b={...a},c=g();return c.add(b),()=>{c.delete(b)}}function j(){return[...g()].map(a=>({...a}))}},55511:a=>{"use strict";a.exports=require("crypto")},58864:(a,b,c)=>{"use strict";c.d(b,{A_:()=>h,Eb:()=>l,V:()=>m,W3:()=>j,gB:()=>i,uK:()=>g});var d=c(29021),e=c(33873);let f=/^[a-zA-Z]:[\\/]/;function g(a){return f.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function h(a){let b=a.join("/"),c=j(b);return/^[a-zA-Z]:$/.test(c)?`${c}/`:g(c)?c:"/"+b.replace(/^\/+/,"")}function i(a){return a&&"win32"===process.platform?(0,e.normalize)(a):a}function j(a){return a.replace(/\\/g,"/")}function k(a){let b=(0,e.normalize)(i(a)),c=(0,e.parse)(b).root.length,d=b.length;for(;d>c&&b[d-1]===e.sep;)d--;return b.slice(0,d)}function l(a,b){if(a===b)return!0;if(!a||!b)return!1;let c=k(a),d=k(b);return"win32"===process.platform?c.toLowerCase()===d.toLowerCase():c===d}function m(a){let b=(0,e.resolve)(a),c=b;for(;;)try{return(0,e.join)((0,d.realpathSync)(c),(0,e.relative)(c,b))}catch{let a=(0,e.dirname)(c);if(a===c)return b;c=a}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73968:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{BJ:()=>t,BY:()=>w,Bb:()=>r,Nu:()=>v,OA:()=>u,PB:()=>p,Sz:()=>s,hr:()=>q});var e=c(55511),f=c(29021),g=c(21820),h=c(33873),i=c(75430),j=c(58864),k=a([i]);function l(){if(!globalThis.__piWebTerminals){globalThis.__piWebTerminals=new Map;let a=()=>{for(let a of globalThis.__piWebTerminals.keys())w(a,!0)};process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__piWebTerminals}function m(a,b){for(let c of a.listeners)c(b)}function n(a,b){b.cleanupTimer||b.listeners.size||l().get(a)!==b||(b.cleanupAt=Date.now()+12e4,b.cleanupTimer=setTimeout(()=>w(a),12e4),b.cleanupTimer.unref?.())}function o(a,b){return Math.min(1e3,Math.max(2,Number.isFinite(a)?Math.floor(a):b))}function p(a,b,d,k=(0,e.randomUUID)()){let q,r=l().get(k);if(r){if(!(0,j.Eb)(r.cwd,a))throw Error("Terminal belongs to a different workspace");return k}try{if("darwin"===process.platform)try{let a=(0,h.dirname)(22664);for(let b of["build/Release","build/Debug",`prebuilds/darwin-${process.arch}`]){let c=(0,h.join)(a,b,"spawn-helper"),d=(0,f.statSync)(c,{throwIfNoEntry:!1});d?.isFile()&&(73&d.mode)!=73&&(0,f.chmodSync)(c,73|d.mode)}}catch{}({spawn:q}=c(14566))}catch(a){throw Error(`Cannot load the node-pty native terminal module for ${process.platform}-${process.arch}. The binary may be missing or incompatible. In the pi-web installation directory (the npx cache directory when using npx), run: npm rebuild node-pty --build-from-source --ignore-scripts=false --foreground-scripts. On Debian/Ubuntu, install build tools first: sudo apt-get install -y python3 build-essential. Then restart pi-web. Original error: ${a instanceof Error?a.message:String(a)}`,{cause:a})}let s=function(){if("win32"!==process.platform)return{file:process.env.SHELL||"/bin/sh",args:["-l"]};try{return{file:(0,i.getPowerShellConfig)().shell,args:[]}}catch{return{file:process.env.ComSpec??"cmd.exe",args:[]}}}(),t=q(s.file,s.args,{name:"xterm-256color",cols:o(b,80),rows:o(d,24),cwd:a||(0,g.homedir)(),env:function(){let a={};for(let[b,c]of Object.entries(process.env)){let d="win32"===process.platform?b.toUpperCase():b;void 0!==c&&"PI_WEB_PASSWORD"!==d&&(a[b]=c)}return a.TERM="xterm-256color",a.COLORTERM="truecolor",process.env.LANG||process.env.LC_ALL||process.env.LC_CTYPE||(a.LANG="C.UTF-8"),a}()}),u={pty:t,cwd:a,listeners:new Set,backlog:"",offset:0,exited:!1,exitCode:null,cleanupTimer:null,cleanupAt:null};return l().set(k,u),n(k,u),t.onData(a=>{u.backlog=(u.backlog+a).slice(-131072),u.offset+=a.length,m(u,{type:"output",data:a,offset:u.offset})}),t.onExit(({exitCode:a})=>{u.cleanupTimer&&clearTimeout(u.cleanupTimer),u.cleanupTimer=null,u.cleanupAt=null,u.exited=!0,u.exitCode=a,m(u,{type:"exit",exitCode:a}),n(k,u)}),k}function q(a){return l().has(a)}function r(a){return l().get(a)?.cwd}function s(a=Date.now()){let b={count:0,listeners:0,detached:0,exited:0,nextCleanupAt:null},c=globalThis.__piWebTerminals;if(!(c instanceof Map))return b;for(let d of c.values()){let c=d.listeners?.size??0;b.count+=1,b.listeners+=c,0===c&&(b.detached+=1),d.exited&&(b.exited+=1);let e=d.cleanupAt;if("number"!=typeof e)continue;let f=Math.max(e,a);(null===b.nextCleanupAt||f<b.nextCleanupAt)&&(b.nextCleanupAt=f)}return b}function t(a,b,c){let d=l().get(a);if(!d)return null;d.listeners.add(b),d.cleanupTimer&&clearTimeout(d.cleanupTimer),d.cleanupTimer=null,d.cleanupAt=null;let e=d.offset-d.backlog.length,f=void 0===c||c<e||c>d.offset;return{output:{type:"output",data:f?d.backlog:d.backlog.slice(c-e),offset:d.offset,reset:f},exited:d.exited,exitCode:d.exitCode,unsubscribe:()=>{d.listeners.delete(b),n(a,d)}}}function u(a,b){let c=l().get(a);return!!c&&!c.exited&&(c.pty.write(b),!0)}function v(a,b,c){let d=l().get(a);return!!d&&!d.exited&&(d.pty.resize(o(b,80),o(c,24)),!0)}function w(a,b=!1){let c=l().get(a);return!!c&&(c.cleanupTimer&&clearTimeout(c.cleanupTimer),c.cleanupAt=null,l().delete(a),!c.exited&&(c.pty.kill(b?"SIGKILL":void 0),b||(c.cleanupTimer=setTimeout(()=>{c.exited||c.pty.kill("SIGKILL")},2e3),c.cleanupTimer.unref?.())),m(c,{type:"closed"}),c.listeners.clear(),!0)}i=(k.then?(await k)():k)[0],d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},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()}}},95412:(a,b,c)=>{"use strict";c.d(b,{Qj:()=>j,SF:()=>g,Vj:()=>k,sJ:()=>i});let d=/^[A-Za-z0-9_-]{1,64}$/;function e(a,b){if("string"!=typeof a||0===a.trim().length)throw Error(`Session liveness provider ${b} must be a non-empty string`)}let f=function(){let a,b=globalThis,c=Symbol.for("@agegr/pi-web/session-liveness/v1"),d=b[c];if(d&&"object"==typeof d&&1===d.version&&"function"==typeof d.register&&"function"==typeof d.hasActiveProvider)return d;let f=(a=new Map,{version:1,register(b){if(!b||"object"!=typeof b)throw Error("Session liveness provider must be an object");if(e(b.name,"name"),e(b.sessionId,"sessionId"),void 0!==b.sessionFile&&e(b.sessionFile,"sessionFile"),"function"!=typeof b.isActive)throw Error("Session liveness provider isActive must be a function");let c=Symbol(b.name);a.set(c,b);let d=!1;return()=>{d||(d=!0,a.delete(c))}},hasActiveProvider(b){let c=new Set([b.sessionId,b.sessionFile].filter(a=>!!a));for(let b of a.values())if(c.has(b.sessionId)||b.sessionFile&&c.has(b.sessionFile))try{let a=b.isActive();if("boolean"!=typeof a)throw Error("isActive() must return a boolean");if(a)return!0}catch(a){return console.error(`[pi-web] Session liveness provider '${b.name}' failed; preserving the session:`,a),!0}return!1},list:()=>Array.from(a.values(),a=>({name:a.name,sessionId:a.sessionId,...void 0!==a.sessionFile?{sessionFile:a.sessionFile}:{},isActive:()=>a.isActive()}))});return b[c]=f,f}();function g(a){return"string"==typeof a&&d.test(a)}function h(){return"function"==typeof f.list?f.list():null}function i(){return h()?.map(a=>({name:a.name,sessionId:a.sessionId,sessionFile:a.sessionFile??null}))??null}function j(a){let b=h();if(!b)return null;let c=new Set([a.sessionId,a.sessionFile].filter(a=>!!a));return b.filter(a=>c.has(a.sessionId)||void 0!==a.sessionFile&&c.has(a.sessionFile)).map(a=>{let b;try{let c=a.isActive();b="boolean"==typeof c?c:"error"}catch{b="error"}return{name:a.name,sessionId:a.sessionId,sessionFile:a.sessionFile??null,active:b,byFile:!c.has(a.sessionId)}})}function k(a){return f.hasActiveProvider(a)}},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970],()=>b(b.s=26832));module.exports=c})();
|