@pricening/pi-web 0.9.7 → 0.9.9
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 +13 -11
- package/.next/build-manifest.json +2 -2
- 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 +12 -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 +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/archives/route.js +1 -0
- package/.next/server/app/api/archives/route.js.nft.json +1 -0
- package/.next/server/app/api/archives/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/archives/sessions/route.js +1 -0
- package/.next/server/app/api/archives/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/archives/sessions/route_client-reference-manifest.js +1 -0
- 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/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- 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 +1 -1
- package/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/server/app/api/git/status/route.js +2 -2
- package/.next/server/app/api/home/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/pins/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/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 +4 -3
- 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]/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 +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +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/skills/check/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/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 +1 -1
- package/.next/server/app/api/terminal/[id]/route.js +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 +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page.js +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 +4 -4
- package/.next/server/app/login.segments/_full.segment.rsc +4 -4
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +20 -20
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +13 -11
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/chunks/3573.js +1 -1
- package/.next/server/chunks/4353.js +1 -0
- package/.next/server/chunks/5582.js +2 -2
- package/.next/server/chunks/6429.js +1 -1
- package/.next/server/chunks/8410.js +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/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1278-c20177e2f0547fb0.js +1 -0
- package/.next/static/chunks/app/_global-error/page-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/lease/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/archives/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/archives/sessions/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/home/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/models/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/pins/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/plugins/check/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/provider-usage/query/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/push/config/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/push/subscribe/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/skills/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/subagents/[id]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/subagents/profiles/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/subagents/settings/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/tools/settings/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/{layout-5bc416fd5398564d.js → layout-d336308f5f5c4e97.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/app/page-ebd11e43d32c7c7f.js +283 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-0d0785de797ec9c7.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-0d0785de797ec9c7.js +1 -0
- package/.next/static/css/{f4a799a04a7a8a76.css → ca4e6d06382119bd.css} +1 -1
- package/.next/static/qDrZc4StIk3gX1M8cE65k/_buildManifest.js +1 -0
- package/.next/trace +40 -41
- package/.next/trace-build +1 -1
- package/.next/types/app/api/archives/route.ts +353 -0
- package/.next/types/app/api/archives/sessions/route.ts +353 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/README.ja.md +7 -130
- package/README.md +51 -123
- package/README.ru.md +7 -130
- package/README.zh-CN.md +51 -77
- package/package.json +3 -3
- package/.next/server/chunks/2349.js +0 -1
- package/.next/static/8LHW2XYS_VC9FpfLDlmpF/_buildManifest.js +0 -1
- package/.next/static/chunks/1278-4e101e127edaae15.js +0 -1
- package/.next/static/chunks/app/_global-error/page-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/lease/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/home/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/models/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/pins/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/plugins/check/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/provider-usage/query/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/push/config/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/push/subscribe/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/sessions/search/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/skills/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/subagents/[id]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/subagents/profiles/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/subagents/settings/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/tools/settings/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/web-auth/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/app/page-904541ae65f082d4.js +0 -283
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-6f128c132ee86731.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6f128c132ee86731.js +0 -1
- /package/.next/static/{8LHW2XYS_VC9FpfLDlmpF → qDrZc4StIk3gX1M8cE65k}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8197,a.ids=[8197],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")},5452:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j,dynamic:()=>k});var e=c(23211),f=c(40402),g=c(61815),h=c(56429),i=a([f,g,h]);[f,g,h]=i.then?(await i)():i;let k="force-dynamic";async function j(){return e.NextResponse.json({sessionListVersion:(0,f.bA)(),runningSessionIds:(0,h.HG)(),completionNotificationSuppressedSessionIds:(0,h.x8)(),pins:(0,g.TC)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},24598:(a,b,c)=>{c.d(b,{cb:()=>i,eZ:()=>g,pU:()=>h,tE:()=>d,yO:()=>f});let d=500;function e(a){return Object.keys(a).sort()}function f(a,b){return{sessions:e(a),projects:e(b)}}function g(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>512?null:b}function h(a){return"session"===a||"project"===a?a:null}function i(a,b){let c=0,d={};for(let[e,f]of Object.entries(a))b.has(e)?d[e]=f:c+=1;return c>0?{map:d,removed:c}:{map:a,removed:0}}},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55399:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/agent/running/route",pathname:"/api/agent/running",filename:"route",bundlePath:"app/api/agent/running/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/agent/running/route.ts",nextConfigOutput:"",userland:()=>c(5452),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/agent/running/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},61815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{DC:()=>v,TC:()=>s,oW:()=>u});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(24598),l=a([g]);function m(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","pins.json")}function n(){return{version:1,sessions:{},projects:{}}}function o(a){if(!a||"object"!=typeof a)return{};let b={};for(let[c,d]of Object.entries(a)){if(!c)continue;let a=d&&"object"==typeof d?d:null,e="string"==typeof a?.pinnedAt?a.pinnedAt:"";b[c]={pinnedAt:e}}return b}g=(l.then?(await l)():l)[0];let w=new Map;function p(a){try{let b=(0,e.statSync)(a);return{mtimeMs:b.mtimeMs,size:b.size}}catch{return null}}function q(a){try{var b=(0,e.readFileSync)(a,"utf8");try{let a=JSON.parse(b);if(!a||"object"!=typeof a)return n();return{version:"number"==typeof a.version?a.version:1,sessions:o(a.sessions),projects:o(a.projects)}}catch{return n()}}catch{return n()}}function r(a=(0,g.getAgentDir)()){let b=m(a),c=p(b);if(!c)return n();let d=w.get(b);if(d&&d.mtimeMs===c.mtimeMs&&d.size===c.size)return d.store;let e=q(b);return w.set(b,{...c,store:e}),e}function s(a=(0,g.getAgentDir)()){let b=r(a);return(0,k.yO)(b.sessions,b.projects)}async function t(a,b){let c=m(a),d=(0,f.dirname)(c);(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448});try{(0,e.writeFileSync)(c,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let g=await i().lock(c,{realpath:!1,retries:10});try{let a=b(q(c));if(!a.changed)return;(0,j.$)(c,JSON.stringify(a.store,null,2));try{(0,e.chmodSync)(c,384)}catch{}let d=p(c);d?w.set(c,{...d,store:a.store}):w.delete(c)}finally{await g()}}async function u(a){let{kind:b,key:c,pinned:d}=a,e=a.agentDir??(0,g.getAgentDir)();return await t(e,a=>{let e="session"===b?a.sessions:a.projects,f=Object.prototype.hasOwnProperty.call(e,c);if(d===f)return{store:a,changed:!1};let g={...e};if(d){if(Object.keys(g).length>=k.tE)throw Error(`Cannot pin more than ${k.tE} ${b}s`);g[c]={pinnedAt:new Date().toISOString()}}else delete g[c];return{store:"session"===b?{...a,sessions:g}:{...a,projects:g},changed:!0}}),s(e)}async function v(a){let b=a.agentDir??(0,g.getAgentDir)();if(!(0,e.existsSync)(m(b)))return!1;let c=new Set(a.sessionIds),d=new Set(a.projectKeys),f=r(b),h=(0,k.cb)(f.sessions,c),i=(0,k.cb)(f.projects,d);if(0===h.removed&&0===i.removed)return!1;try{return await t(b,a=>{let b=(0,k.cb)(a.sessions,c),e=(0,k.cb)(a.projects,d);return 0===b.removed&&0===e.removed?{store:a,changed:!1}:{store:{...a,sessions:b.map,projects:e.map},changed:!0}}),!0}catch{return!1}}d()}catch(a){d(a)}})},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")},80481:a=>{a.exports=require("node:readline")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,5582,2243,6429],()=>b(b.s=55399));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8197,a.ids=[8197],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")},5452:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,dynamic:()=>l});var e=c(23211),f=c(40402),g=c(61815),h=c(79874),i=c(56429),j=a([f,g,h,i]);[f,g,h,i]=j.then?(await j)():j;let l="force-dynamic";async function k(){return e.NextResponse.json({sessionListVersion:(0,f.bA)(),runningSessionIds:(0,i.HG)(),completionNotificationSuppressedSessionIds:(0,i.x8)(),pins:(0,g.TC)(),archives:(0,h._$)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},24598:(a,b,c)=>{c.d(b,{cb:()=>i,eZ:()=>g,pU:()=>h,tE:()=>d,yO:()=>f});let d=500;function e(a){return Object.keys(a).sort()}function f(a,b){return{sessions:e(a),projects:e(b)}}function g(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>512?null:b}function h(a){return"session"===a||"project"===a?a:null}function i(a,b){let c=0,d={};for(let[e,f]of Object.entries(a))b.has(e)?d[e]=f:c+=1;return c>0?{map:d,removed:c}:{map:a,removed:0}}},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29862:a=>{a.exports=import("@earendil-works/pi-tui")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48067:(a,b,c)=>{c.d(b,{Xx:()=>e,f5:()=>f,fq:()=>g,x3:()=>d});let d=500;function e(a){return{projects:Object.keys(a).sort()}}function f(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>512?null:b}function g(a,b){let c=0,d={};for(let[e,f]of Object.entries(a))b.has(e)?d[e]=f:c+=1;return c>0?{map:d,removed:c}:{map:a,removed:0}}},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},61815:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{DC:()=>v,TC:()=>s,oW:()=>u});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(24598),l=a([g]);function m(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","pins.json")}function n(){return{version:1,sessions:{},projects:{}}}function o(a){if(!a||"object"!=typeof a)return{};let b={};for(let[c,d]of Object.entries(a)){if(!c)continue;let a=d&&"object"==typeof d?d:null,e="string"==typeof a?.pinnedAt?a.pinnedAt:"";b[c]={pinnedAt:e}}return b}g=(l.then?(await l)():l)[0];let w=new Map;function p(a){try{let b=(0,e.statSync)(a);return{mtimeMs:b.mtimeMs,size:b.size}}catch{return null}}function q(a){try{var b=(0,e.readFileSync)(a,"utf8");try{let a=JSON.parse(b);if(!a||"object"!=typeof a)return n();return{version:"number"==typeof a.version?a.version:1,sessions:o(a.sessions),projects:o(a.projects)}}catch{return n()}}catch{return n()}}function r(a=(0,g.getAgentDir)()){let b=m(a),c=p(b);if(!c)return n();let d=w.get(b);if(d&&d.mtimeMs===c.mtimeMs&&d.size===c.size)return d.store;let e=q(b);return w.set(b,{...c,store:e}),e}function s(a=(0,g.getAgentDir)()){let b=r(a);return(0,k.yO)(b.sessions,b.projects)}async function t(a,b){let c=m(a),d=(0,f.dirname)(c);(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448});try{(0,e.writeFileSync)(c,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let g=await i().lock(c,{realpath:!1,retries:10});try{let a=b(q(c));if(!a.changed)return;(0,j.$)(c,JSON.stringify(a.store,null,2));try{(0,e.chmodSync)(c,384)}catch{}let d=p(c);d?w.set(c,{...d,store:a.store}):w.delete(c)}finally{await g()}}async function u(a){let{kind:b,key:c,pinned:d}=a,e=a.agentDir??(0,g.getAgentDir)();return await t(e,a=>{let e="session"===b?a.sessions:a.projects,f=Object.prototype.hasOwnProperty.call(e,c);if(d===f)return{store:a,changed:!1};let g={...e};if(d){if(Object.keys(g).length>=k.tE)throw Error(`Cannot pin more than ${k.tE} ${b}s`);g[c]={pinnedAt:new Date().toISOString()}}else delete g[c];return{store:"session"===b?{...a,sessions:g}:{...a,projects:g},changed:!0}}),s(e)}async function v(a){let b=a.agentDir??(0,g.getAgentDir)();if(!(0,e.existsSync)(m(b)))return!1;let c=new Set(a.sessionIds),d=new Set(a.projectKeys),f=r(b),h=(0,k.cb)(f.sessions,c),i=(0,k.cb)(f.projects,d);if(0===h.removed&&0===i.removed)return!1;try{return await t(b,a=>{let b=(0,k.cb)(a.sessions,c),e=(0,k.cb)(a.projects,d);return 0===b.removed&&0===e.removed?{store:a,changed:!1}:{store:{...a,sessions:b.map,projects:e.map},changed:!0}}),!0}catch{return!1}}d()}catch(a){d(a)}})},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")},77551:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/agent/running/route",pathname:"/api/agent/running",filename:"route",bundlePath:"app/api/agent/running/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/agent/running/route.ts",nextConfigOutput:"",userland:()=>c(5452),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/agent/running/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},79874:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Ah:()=>u,_$:()=>r,_X:()=>t});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(48067),l=a([g]);function m(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","archives.json")}function n(){return{version:1,projects:{}}}g=(l.then?(await l)():l)[0];let v=new Map;function o(a){try{let b=(0,e.statSync)(a);return{mtimeMs:b.mtimeMs,size:b.size}}catch{return null}}function p(a){try{var b=(0,e.readFileSync)(a,"utf8");try{let a=JSON.parse(b);if(!a||"object"!=typeof a)return n();return{version:"number"==typeof a.version?a.version:1,projects:function(a){if(!a||"object"!=typeof a)return{};let b={};for(let[c,d]of Object.entries(a)){if(!c)continue;let a=d&&"object"==typeof d?d:null,e="string"==typeof a?.archivedAt?a.archivedAt:"";b[c]={archivedAt:e}}return b}(a.projects)}}catch{return n()}}catch{return n()}}function q(a=(0,g.getAgentDir)()){let b=m(a),c=o(b);if(!c)return n();let d=v.get(b);if(d&&d.mtimeMs===c.mtimeMs&&d.size===c.size)return d.store;let e=p(b);return v.set(b,{...c,store:e}),e}function r(a=(0,g.getAgentDir)()){return(0,k.Xx)(q(a).projects)}async function s(a,b){let c=m(a),d=(0,f.dirname)(c);(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448});try{(0,e.writeFileSync)(c,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let g=await i().lock(c,{realpath:!1,retries:10});try{let a=b(p(c));if(!a.changed)return;(0,j.$)(c,JSON.stringify(a.store,null,2));try{(0,e.chmodSync)(c,384)}catch{}let d=o(c);d?v.set(c,{...d,store:a.store}):v.delete(c)}finally{await g()}}async function t(a){let{key:b,archived:c}=a,d=a.agentDir??(0,g.getAgentDir)();return await s(d,a=>{let d=Object.prototype.hasOwnProperty.call(a.projects,b);if(c===d)return{store:a,changed:!1};let e={...a.projects};if(c){if(Object.keys(e).length>=k.x3)throw Error(`Cannot archive more than ${k.x3} projects`);e[b]={archivedAt:new Date().toISOString()}}else delete e[b];return{store:{...a,projects:e},changed:!0}}),r(d)}async function u(a){let b=a.agentDir??(0,g.getAgentDir)();if(!(0,e.existsSync)(m(b)))return!1;let c=new Set(a.projectKeys),d=(0,k.fq)(q(b).projects,c);if(0===d.removed)return!1;try{return await s(b,a=>{let b=(0,k.fq)(a.projects,c);return 0===b.removed?{store:a,changed:!1}:{store:{...a,projects:b.map},changed:!0}}),!0}catch{return!1}}d()}catch(a){d(a)}})},80481:a=>{a.exports=require("node:readline")},81115:a=>{a.exports=require("constants")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,426,974,5582,2243,6429],()=>b(b.s=77551));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9183,a.ids=[9183],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
(()=>{var a={};a.id=9183,a.ids=[9183],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3155:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/app-update/route",pathname:"/api/app-update",filename:"route",bundlePath:"app/api/app-update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/app-update/route.ts",nextConfigOutput:"",userland:()=>c(62445),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/app-update/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},62445:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>l,dynamic:()=>g});var d=c(23211);let e=/^(\d+)\.(\d+)\.(\d+)$/;function f(a){let b=e.exec(a);if(!b)return null;let c=b.slice(1).map(Number);return c.some(a=>!Number.isSafeInteger(a))?null:c}let g="force-dynamic",h="0.9.9",i="1"===process.env.PI_WEB_SKIP_VERSION_CHECK;async function j(){let a=await fetch("https://registry.npmjs.org/@pricening%2Fpi-web/latest",{cache:"no-store",headers:{Accept:"application/json"},signal:AbortSignal.timeout(5e3)});if(!a.ok)throw Error(`npm registry returned HTTP ${a.status}`);let b=await a.json(),c="string"==typeof b.version?b.version:"",d=f(c)?`https://github.com/PriceNing/pi-web/releases/tag/v${c}`:null;if(!d)throw Error("npm registry returned an invalid version");return{currentVersion:h,latestVersion:c,updateAvailable:function(a,b){let c=f(a),d=f(b);if(!c||!d)return!1;for(let a=0;a<c.length;a+=1)if(c[a]!==d[a])return c[a]>d[a];return!1}(c,h),releaseUrl:d}}async function k(){let a=globalThis.__piWebAppUpdateCache??={expiresAt:0};if(a.value&&a.expiresAt>Date.now())return a.value;a.inFlight||(a.inFlight=j().then(b=>(a.value=b,a.expiresAt=Date.now()+432e5,b)).finally(()=>{a.inFlight=void 0}));try{return await a.inFlight}catch(b){if(a.value)return a.value;throw b}}async function l(){if(i)return d.NextResponse.json({currentVersion:h,latestVersion:h,updateAvailable:!1,releaseUrl:""});try{return d.NextResponse.json(await k())}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:502})}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=3155));module.exports=c})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var a={};a.id=1059,a.ids=[1059],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")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},24598:(a,b,c)=>{"use strict";c.d(b,{cb:()=>i,eZ:()=>g,pU:()=>h,tE:()=>d,yO:()=>f});let d=500;function e(a){return Object.keys(a).sort()}function f(a,b){return{sessions:e(a),projects:e(b)}}function g(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>512?null:b}function h(a){return"session"===a||"project"===a?a:null}function i(a,b){let c=0,d={};for(let[e,f]of Object.entries(a))b.has(e)?d[e]=f:c+=1;return c>0?{map:d,removed:c}:{map:a,removed:0}}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},38062:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j,POST:()=>k,dynamic:()=>l});var e=c(23211),f=c(79874),g=c(48067),h=c(61815),i=a([f,h]);[f,h]=i.then?(await i)():i;let l="force-dynamic";async function j(){try{return e.NextResponse.json((0,f._$)(),{headers:{"Cache-Control":"no-store"}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a){let b;try{b=await a.json()}catch{return e.NextResponse.json({error:"Invalid JSON body"},{status:400})}let c=b,d=(0,g.f5)(c.key);if(!d)return e.NextResponse.json({error:"key must be a non-empty string"},{status:400});try{let a="boolean"==typeof c.archived?c.archived:void 0;void 0===a&&(a=!(0,f._$)().projects.includes(d));let b=await (0,f._X)({key:d,archived:a});if(a)try{await (0,h.oW)({kind:"project",key:d,pinned:!1})}catch{}return e.NextResponse.json(b,{headers:{"Cache-Control":"no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:409})}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48067:(a,b,c)=>{"use strict";c.d(b,{Xx:()=>e,f5:()=>f,fq:()=>g,x3:()=>d});let d=500;function e(a){return{projects:Object.keys(a).sort()}}function f(a){if("string"!=typeof a)return null;let b=a.trim();return!b||b.length>512?null:b}function g(a,b){let c=0,d={};for(let[e,f]of Object.entries(a))b.has(e)?d[e]=f:c+=1;return c>0?{map:d,removed:c}:{map:a,removed:0}}},55511:a=>{"use strict";a.exports=require("crypto")},61815:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{DC:()=>v,TC:()=>s,oW:()=>u});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(24598),l=a([g]);function m(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","pins.json")}function n(){return{version:1,sessions:{},projects:{}}}function o(a){if(!a||"object"!=typeof a)return{};let b={};for(let[c,d]of Object.entries(a)){if(!c)continue;let a=d&&"object"==typeof d?d:null,e="string"==typeof a?.pinnedAt?a.pinnedAt:"";b[c]={pinnedAt:e}}return b}g=(l.then?(await l)():l)[0];let w=new Map;function p(a){try{let b=(0,e.statSync)(a);return{mtimeMs:b.mtimeMs,size:b.size}}catch{return null}}function q(a){try{var b=(0,e.readFileSync)(a,"utf8");try{let a=JSON.parse(b);if(!a||"object"!=typeof a)return n();return{version:"number"==typeof a.version?a.version:1,sessions:o(a.sessions),projects:o(a.projects)}}catch{return n()}}catch{return n()}}function r(a=(0,g.getAgentDir)()){let b=m(a),c=p(b);if(!c)return n();let d=w.get(b);if(d&&d.mtimeMs===c.mtimeMs&&d.size===c.size)return d.store;let e=q(b);return w.set(b,{...c,store:e}),e}function s(a=(0,g.getAgentDir)()){let b=r(a);return(0,k.yO)(b.sessions,b.projects)}async function t(a,b){let c=m(a),d=(0,f.dirname)(c);(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448});try{(0,e.writeFileSync)(c,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let g=await i().lock(c,{realpath:!1,retries:10});try{let a=b(q(c));if(!a.changed)return;(0,j.$)(c,JSON.stringify(a.store,null,2));try{(0,e.chmodSync)(c,384)}catch{}let d=p(c);d?w.set(c,{...d,store:a.store}):w.delete(c)}finally{await g()}}async function u(a){let{kind:b,key:c,pinned:d}=a,e=a.agentDir??(0,g.getAgentDir)();return await t(e,a=>{let e="session"===b?a.sessions:a.projects,f=Object.prototype.hasOwnProperty.call(e,c);if(d===f)return{store:a,changed:!1};let g={...e};if(d){if(Object.keys(g).length>=k.tE)throw Error(`Cannot pin more than ${k.tE} ${b}s`);g[c]={pinnedAt:new Date().toISOString()}}else delete g[c];return{store:"session"===b?{...a,sessions:g}:{...a,projects:g},changed:!0}}),s(e)}async function v(a){let b=a.agentDir??(0,g.getAgentDir)();if(!(0,e.existsSync)(m(b)))return!1;let c=new Set(a.sessionIds),d=new Set(a.projectKeys),f=r(b),h=(0,k.cb)(f.sessions,c),i=(0,k.cb)(f.projects,d);if(0===h.removed&&0===i.removed)return!1;try{return await t(b,a=>{let b=(0,k.cb)(a.sessions,c),e=(0,k.cb)(a.projects,d);return 0===b.removed&&0===e.removed?{store:a,changed:!1}:{store:{...a,sessions:b.map,projects:e.map},changed:!0}}),!0}catch{return!1}}d()}catch(a){d(a)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},75099:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/archives/route",pathname:"/api/archives",filename:"route",bundlePath:"app/api/archives/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/pi-web/pi-web/app/api/archives/route.ts",nextConfigOutput:"",userland:()=>c(38062),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/archives/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{"use strict";a.exports=require("node:path")},78335:()=>{},79874:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Ah:()=>u,_$:()=>r,_X:()=>t});var e=c(73024),f=c(76760),g=c(75430),h=c(80974),i=c.n(h),j=c(8102),k=c(48067),l=a([g]);function m(a=(0,g.getAgentDir)()){return(0,f.join)(a,"pi-web","archives.json")}function n(){return{version:1,projects:{}}}g=(l.then?(await l)():l)[0];let v=new Map;function o(a){try{let b=(0,e.statSync)(a);return{mtimeMs:b.mtimeMs,size:b.size}}catch{return null}}function p(a){try{var b=(0,e.readFileSync)(a,"utf8");try{let a=JSON.parse(b);if(!a||"object"!=typeof a)return n();return{version:"number"==typeof a.version?a.version:1,projects:function(a){if(!a||"object"!=typeof a)return{};let b={};for(let[c,d]of Object.entries(a)){if(!c)continue;let a=d&&"object"==typeof d?d:null,e="string"==typeof a?.archivedAt?a.archivedAt:"";b[c]={archivedAt:e}}return b}(a.projects)}}catch{return n()}}catch{return n()}}function q(a=(0,g.getAgentDir)()){let b=m(a),c=o(b);if(!c)return n();let d=v.get(b);if(d&&d.mtimeMs===c.mtimeMs&&d.size===c.size)return d.store;let e=p(b);return v.set(b,{...c,store:e}),e}function r(a=(0,g.getAgentDir)()){return(0,k.Xx)(q(a).projects)}async function s(a,b){let c=m(a),d=(0,f.dirname)(c);(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0,mode:448});try{(0,e.writeFileSync)(c,"{}",{flag:"wx",mode:384})}catch(a){if("EEXIST"!==a.code)throw a}let g=await i().lock(c,{realpath:!1,retries:10});try{let a=b(p(c));if(!a.changed)return;(0,j.$)(c,JSON.stringify(a.store,null,2));try{(0,e.chmodSync)(c,384)}catch{}let d=o(c);d?v.set(c,{...d,store:a.store}):v.delete(c)}finally{await g()}}async function t(a){let{key:b,archived:c}=a,d=a.agentDir??(0,g.getAgentDir)();return await s(d,a=>{let d=Object.prototype.hasOwnProperty.call(a.projects,b);if(c===d)return{store:a,changed:!1};let e={...a.projects};if(c){if(Object.keys(e).length>=k.x3)throw Error(`Cannot archive more than ${k.x3} projects`);e[b]={archivedAt:new Date().toISOString()}}else delete e[b];return{store:{...a,projects:e},changed:!0}}),r(d)}async function u(a){let b=a.agentDir??(0,g.getAgentDir)();if(!(0,e.existsSync)(m(b)))return!1;let c=new Set(a.projectKeys),d=(0,k.fq)(q(b).projects,c);if(0===d.removed)return!1;try{return await s(b,a=>{let b=(0,k.fq)(a.projects,c);return 0===b.removed?{store:a,changed:!1}:{store:{...a,projects:b.map},changed:!0}}),!0}catch{return!1}}d()}catch(a){d(a)}})},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,974],()=>b(b.s=75099));module.exports=c})();
|