@colinxu/pi-web-classic 0.0.0-stage → 0.12.3
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 -0
- package/.next/app-path-routes-manifest.json +75 -0
- package/.next/build-manifest.json +20 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +157 -0
- package/.next/react-loadable-manifest.json +401 -0
- package/.next/required-server-files.js +398 -0
- package/.next/required-server-files.json +398 -0
- package/.next/routes-manifest.json +561 -0
- package/.next/server/app/_global-error/page.js +31 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +35 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +20 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page.js +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +35 -0
- package/.next/server/app/_not-found.rsc +22 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +7 -0
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -0
- package/.next/server/app/api/agent/[id]/bash-output/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/events/route.js +3 -0
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/lease/route.js +1 -0
- package/.next/server/app/api/agent/[id]/lease/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js +1 -0
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/new/route.js +1 -0
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/running/route.js +1 -0
- package/.next/server/app/api/agent/running/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/app-update/route.js +1 -0
- package/.next/server/app/api/app-update/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/providers/route.js +1 -0
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cache-miss-notices/route.js +1 -0
- package/.next/server/app/api/cache-miss-notices/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cwd/browse/route.js +1 -0
- package/.next/server/app/api/cwd/browse/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cwd/validate/route.js +1 -0
- package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/default-cwd/route.js +1 -0
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/file-index/route.js +1 -0
- package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/files/[...path]/route.js +49 -0
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/git/diff/route.js +6 -0
- package/.next/server/app/api/git/diff/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/git/status/route.js +6 -0
- package/.next/server/app/api/git/status/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/home/route.js +1 -0
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/route.js +2 -0
- package/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/sign-in/[flowId]/route.js +1 -0
- package/.next/server/app/api/mcp/sign-in/[flowId]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/sign-in/route.js +1 -0
- package/.next/server/app/api/mcp/sign-in/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/test/route.js +1 -0
- package/.next/server/app/api/mcp/test/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/default/route.js +1 -0
- package/.next/server/app/api/models/default/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/enabled/route.js +1 -0
- package/.next/server/app/api/models/enabled/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/refresh/route.js +1 -0
- package/.next/server/app/api/models/refresh/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -0
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/catalog/route.js +1 -0
- package/.next/server/app/api/models-config/catalog/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js +1 -0
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -0
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/test/route.js +1 -0
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/open-in-explorer/route.js +1 -0
- package/.next/server/app/api/open-in-explorer/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/check/route.js +1 -0
- package/.next/server/app/api/plugins/check/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/plugins/route.js +1 -0
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/project-trust/route.js +1 -0
- package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/provider-usage/query/route.js +1 -0
- package/.next/server/app/api/provider-usage/query/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/push/config/route.js +1 -0
- package/.next/server/app/api/push/config/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/push/subscribe/route.js +1 -0
- package/.next/server/app/api/push/subscribe/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +11 -0
- package/.next/server/app/api/sessions/[id]/auto-name/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/export/route.js +54 -0
- package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/fork/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/fork/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/state/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/delete/route.js +1 -0
- package/.next/server/app/api/sessions/delete/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/route.js +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/search/route.js +1 -0
- package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/stats/route.js +1 -0
- package/.next/server/app/api/sessions/stats/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/ui-state/route.js +1 -0
- package/.next/server/app/api/sessions/ui-state/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/check/route.js +1 -0
- package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/content/route.js +1 -0
- package/.next/server/app/api/skills/content/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/install/route.js +1 -0
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +4 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/search/route.js +1 -0
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/update/route.js +1 -0
- package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/subagents/[id]/route.js +1 -0
- package/.next/server/app/api/subagents/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/subagents/profiles/route.js +1 -0
- package/.next/server/app/api/subagents/profiles/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/subagents/settings/route.js +1 -0
- package/.next/server/app/api/subagents/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/terminal/[id]/events/route.js +4 -0
- package/.next/server/app/api/terminal/[id]/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/terminal/[id]/route.js +1 -0
- package/.next/server/app/api/terminal/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/terminal/route.js +1 -0
- package/.next/server/app/api/terminal/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/tools/settings/route.js +1 -0
- package/.next/server/app/api/tools/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/web-auth/route.js +1 -0
- package/.next/server/app/api/web-auth/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/worktrees/route.js +1 -0
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -0
- package/.next/server/app/favicon.ico/route.js +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +29 -0
- package/.next/server/app/index.rsc +23 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +27 -0
- package/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +8 -0
- package/.next/server/app/login/page.js +1 -0
- package/.next/server/app/login/page_client-reference-manifest.js +1 -0
- package/.next/server/app/login.html +1 -0
- package/.next/server/app/login.meta +34 -0
- package/.next/server/app/login.rsc +26 -0
- package/.next/server/app/login.segments/_full.segment.rsc +26 -0
- package/.next/server/app/login.segments/_tree.segment.rsc +7 -0
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +32 -0
- package/.next/server/app/manifest.webmanifest/route.js +17 -0
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -0
- package/.next/server/app/page.js +309 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +75 -0
- package/.next/server/chunks/11.js +1 -0
- package/.next/server/chunks/1207.js +1 -0
- package/.next/server/chunks/1286.js +1 -0
- package/.next/server/chunks/1412.js +38 -0
- package/.next/server/chunks/1605.js +1 -0
- package/.next/server/chunks/169.js +1 -0
- package/.next/server/chunks/18.js +86 -0
- package/.next/server/chunks/1813.js +1 -0
- package/.next/server/chunks/1906.js +1 -0
- package/.next/server/chunks/2022.js +1 -0
- package/.next/server/chunks/2069.js +1 -0
- package/.next/server/chunks/2156.js +1 -0
- package/.next/server/chunks/2157.js +1 -0
- package/.next/server/chunks/2243.js +1 -0
- package/.next/server/chunks/2325.js +82 -0
- package/.next/server/chunks/2430.js +193 -0
- package/.next/server/chunks/2498.js +1 -0
- package/.next/server/chunks/27.js +1 -0
- package/.next/server/chunks/2838.js +1 -0
- package/.next/server/chunks/2897.js +79 -0
- package/.next/server/chunks/2970.js +165 -0
- package/.next/server/chunks/3227.js +1 -0
- package/.next/server/chunks/3266.js +1 -0
- package/.next/server/chunks/3379.js +1 -0
- package/.next/server/chunks/3428.js +32 -0
- package/.next/server/chunks/3479.js +1 -0
- package/.next/server/chunks/3618.js +1 -0
- package/.next/server/chunks/367.js +115 -0
- package/.next/server/chunks/3698.js +93 -0
- package/.next/server/chunks/3709.js +148 -0
- package/.next/server/chunks/3757.js +1 -0
- package/.next/server/chunks/3824.js +1 -0
- package/.next/server/chunks/4107.js +62 -0
- package/.next/server/chunks/426.js +14 -0
- package/.next/server/chunks/4569.js +34 -0
- package/.next/server/chunks/4698.js +1 -0
- package/.next/server/chunks/4755.js +153 -0
- package/.next/server/chunks/4815.js +3 -0
- package/.next/server/chunks/5002.js +1 -0
- package/.next/server/chunks/5112.js +1 -0
- package/.next/server/chunks/5289.js +8 -0
- package/.next/server/chunks/5318.js +1 -0
- package/.next/server/chunks/5452.js +23 -0
- package/.next/server/chunks/5453.js +1 -0
- package/.next/server/chunks/5582.js +8 -0
- package/.next/server/chunks/5749.js +27 -0
- package/.next/server/chunks/5782.js +36 -0
- package/.next/server/chunks/6163.js +104 -0
- package/.next/server/chunks/6169.js +64 -0
- package/.next/server/chunks/6208.js +172 -0
- package/.next/server/chunks/6399.js +24 -0
- package/.next/server/chunks/6429.js +32 -0
- package/.next/server/chunks/6496.js +1 -0
- package/.next/server/chunks/6686.js +1 -0
- package/.next/server/chunks/6823.js +215 -0
- package/.next/server/chunks/6888.js +1 -0
- package/.next/server/chunks/6953.js +1 -0
- package/.next/server/chunks/7245.js +77 -0
- package/.next/server/chunks/7307.js +1 -0
- package/.next/server/chunks/7372.js +287 -0
- package/.next/server/chunks/7384.js +226 -0
- package/.next/server/chunks/7492.js +1 -0
- package/.next/server/chunks/7516.js +1 -0
- package/.next/server/chunks/7531.js +24 -0
- package/.next/server/chunks/7591.js +1 -0
- package/.next/server/chunks/7755.js +138 -0
- package/.next/server/chunks/7916.js +1 -0
- package/.next/server/chunks/8078.js +94 -0
- package/.next/server/chunks/8253.js +41 -0
- package/.next/server/chunks/8635.js +1 -0
- package/.next/server/chunks/8637.js +1 -0
- package/.next/server/chunks/8688.js +1 -0
- package/.next/server/chunks/8872.js +1 -0
- package/.next/server/chunks/9006.js +1 -0
- package/.next/server/chunks/9018.js +1 -0
- package/.next/server/chunks/9047.js +1 -0
- package/.next/server/chunks/9108.js +1 -0
- package/.next/server/chunks/9165.js +1 -0
- package/.next/server/chunks/9280.js +256 -0
- package/.next/server/chunks/9419.js +1 -0
- package/.next/server/chunks/9430.js +1 -0
- package/.next/server/chunks/9586.js +1 -0
- package/.next/server/chunks/9690.js +90 -0
- package/.next/server/chunks/974.js +1 -0
- package/.next/server/chunks/9775.js +1 -0
- package/.next/server/chunks/992.js +1 -0
- package/.next/server/chunks/9926.js +1 -0
- package/.next/server/functions-config-manifest.json +27 -0
- package/.next/server/instrumentation.js +1 -0
- package/.next/server/instrumentation.js.nft.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/middleware.js +163 -0
- package/.next/server/middleware.js.nft.json +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +53 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/2ftfKxA2Tk6WrtjeFq3pC/_buildManifest.js +1 -0
- package/.next/static/2ftfKxA2Tk6WrtjeFq3pC/_ssgManifest.js +1 -0
- package/.next/static/chunks/1213.4848a5579bece837.js +24 -0
- package/.next/static/chunks/1278-902e48c12cf60065.js +1 -0
- package/.next/static/chunks/1326.72decfb808c97abe.js +1 -0
- package/.next/static/chunks/1519.2f596e5f5af9ef57.js +62 -0
- package/.next/static/chunks/2280.e03ab3748922284c.js +1 -0
- package/.next/static/chunks/2521.2ba812532f472610.js +77 -0
- package/.next/static/chunks/2585.4d6aa847c780c666.js +1 -0
- package/.next/static/chunks/2589.e456c324416f9615.js +1 -0
- package/.next/static/chunks/2600.45ba17a0f756fc31.js +1 -0
- package/.next/static/chunks/2619.9431a3f48da8eef4.js +1 -0
- package/.next/static/chunks/26d302b2.cd19dc0940cb3e75.js +122 -0
- package/.next/static/chunks/2768.1a75ba9e2be767cf.js +1 -0
- package/.next/static/chunks/2931.c5527c92f7264e9a.js +41 -0
- package/.next/static/chunks/3016.406e568aa95ff867.js +1 -0
- package/.next/static/chunks/3052.5da5bde6a131930a.js +90 -0
- package/.next/static/chunks/3064.3a2a1e7cd4fdca5f.js +1 -0
- package/.next/static/chunks/3174.03fbed7b7d7a8256.js +1 -0
- package/.next/static/chunks/3189.b048866768087750.js +1 -0
- package/.next/static/chunks/3217.457eee26edea225c.js +24 -0
- package/.next/static/chunks/3308.935f7625e681e15a.js +74 -0
- package/.next/static/chunks/331.fc5d78e1e91daf43.js +1 -0
- package/.next/static/chunks/3510.5d4d1c79533e080c.js +1 -0
- package/.next/static/chunks/364.ce5400a9dd70b9dc.js +1 -0
- package/.next/static/chunks/370.a485dd5092c76362.js +1 -0
- package/.next/static/chunks/3789.c418b69121761983.js +1 -0
- package/.next/static/chunks/3794-6f271a1eb27dfa20.js +52 -0
- package/.next/static/chunks/3831.25ae62d10dccc27a.js +1 -0
- package/.next/static/chunks/3a7aa434.9780f397da64eb81.js +82 -0
- package/.next/static/chunks/4020.3cc19c463c49f969.js +23 -0
- package/.next/static/chunks/4035.f5bcc2e4f0beee2b.js +1 -0
- package/.next/static/chunks/405.7027b68fbb48582a.js +215 -0
- package/.next/static/chunks/4159.8f53338a07b26845.js +138 -0
- package/.next/static/chunks/4208.e3c7f2d5c26dcf2e.js +287 -0
- package/.next/static/chunks/4263.ffa8d9bd8a0faaae.js +1 -0
- package/.next/static/chunks/4561.70303588b0cd3621.js +34 -0
- package/.next/static/chunks/4592.507c41f345e21bee.js +93 -0
- package/.next/static/chunks/4799.1d3f2e30954503b8.js +1 -0
- package/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
- package/.next/static/chunks/514.b804c51b26f5e126.js +1 -0
- package/.next/static/chunks/5270.2b9a21b6ce8fd8d2.js +1 -0
- package/.next/static/chunks/52733464.74fafefbfa340fc8.js +1 -0
- package/.next/static/chunks/5354.b559c717a607dc5c.js +1 -0
- package/.next/static/chunks/5448.23a76c3983fec0f6.js +38 -0
- package/.next/static/chunks/5772-c8175d2fabf63b95.js +3 -0
- package/.next/static/chunks/587.d52737d7288c11b4.js +1 -0
- package/.next/static/chunks/5909.172aa3edf289b590.js +115 -0
- package/.next/static/chunks/5949.54e8a766895688d7.js +104 -0
- package/.next/static/chunks/60c48509.2ba44b5cbe52c6e7.js +158 -0
- package/.next/static/chunks/6361.4b1fa56fca9b6356.js +148 -0
- package/.next/static/chunks/6774.07517a60a602aadd.js +86 -0
- package/.next/static/chunks/6968.b80277c724dbc96e.js +1 -0
- package/.next/static/chunks/7236.55a9728d35f5b8a6.js +1 -0
- package/.next/static/chunks/7390.bc7f4ed9f76fe9e1.js +1 -0
- package/.next/static/chunks/7806.a903780fcfa3a30e.js +1 -0
- package/.next/static/chunks/790.45f73b5eb2e089eb.js +1 -0
- package/.next/static/chunks/8216.64a72d4d35ea7be0.js +1 -0
- package/.next/static/chunks/830.a6da04c322e3204a.js +1 -0
- package/.next/static/chunks/8378.6acf715f56997572.js +226 -0
- package/.next/static/chunks/8501.3b0a97ac3e782a0f.js +79 -0
- package/.next/static/chunks/8663.7deb45d41d190483.js +27 -0
- package/.next/static/chunks/872.96937e758ddce860.js +1 -0
- package/.next/static/chunks/8803.75bde095fe3613f5.js +1 -0
- package/.next/static/chunks/8863.582d77dad0e1cc29.js +1 -0
- package/.next/static/chunks/90542734.90283a0c0c838d51.js +1 -0
- package/.next/static/chunks/9379.979bec4531e0611a.js +64 -0
- package/.next/static/chunks/9389.906fe7aa9cd6a170.js +1 -0
- package/.next/static/chunks/9472.08db7006e4a030a4.js +94 -0
- package/.next/static/chunks/9647.29c5a9819b36fcda.js +15 -0
- package/.next/static/chunks/966.7ab226a15142fae2.js +1 -0
- package/.next/static/chunks/975.710b5962d34d4598.js +22 -0
- package/.next/static/chunks/9884.fca67f18c0fb2808.js +36 -0
- package/.next/static/chunks/9932-60e21347ba9f8664.js +7 -0
- package/.next/static/chunks/a339c874.7657a67d1b0d46c1.js +32 -0
- package/.next/static/chunks/app/_global-error/page-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/_not-found/page-1e1cf8cba5576cd4.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/lease/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/cache-miss-notices/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/home/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/[flowId]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/mcp/sign-in/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/mcp/test/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models/default/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models/enabled/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models/refresh/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/open-in-explorer/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/plugins/check/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/provider-usage/query/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/push/config/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/push/subscribe/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/fork/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/delete/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/search/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/stats/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/sessions/ui-state/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/content/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/subagents/[id]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/subagents/profiles/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/subagents/settings/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/tools/settings/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/layout-3339966738755d72.js +1 -0
- package/.next/static/chunks/app/login/page-3a355df23c47aa56.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/app/page-c6eefaf480702550.js +287 -0
- package/.next/static/chunks/d3ac728e-7964f816a1ca64e5.js +1 -0
- package/.next/static/chunks/e413bedd.1332b3d1558778d6.js +153 -0
- package/.next/static/chunks/e868780c-1584512c612787d7.js +18 -0
- package/.next/static/chunks/ea233666.528d9a11a2c6fe2f.js +62 -0
- package/.next/static/chunks/framework-b33a8f5d57cd8d87.js +1 -0
- package/.next/static/chunks/main-63ddef04e98b28f4.js +5 -0
- package/.next/static/chunks/main-app-a98576891fdd8f60.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-30078bc26a2476fc.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cbe4231fb889bdce.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-b6c37de25f933bc6.js +1 -0
- package/.next/static/css/49692dbfa6f26eeb.css +1 -0
- package/.next/static/css/6d897e2692233627.css +1 -0
- package/.next/static/css/9bcd6051db4f8890.css +1 -0
- package/.next/static/css/b944d46e6fd6c54d.css +1 -0
- package/.next/static/css/c82f0c18392f486f.css +1 -0
- package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
- package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
- package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
- package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
- package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
- package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
- package/.next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- package/.next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- package/.next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
- package/.next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
- package/.next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- package/.next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- package/.next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- package/.next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- package/.next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- package/.next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- package/.next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- package/.next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- package/.next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
- package/.next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- package/.next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- package/.next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- package/.next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- package/.next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- package/.next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
- package/.next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- package/.next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- package/.next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- package/.next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- package/.next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- package/.next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- package/.next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
- package/.next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
- package/.next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- package/.next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- package/.next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- package/.next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- package/.next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- package/.next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- package/.next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- package/.next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- package/.next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- package/.next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- package/.next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- package/.next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
- package/.next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- package/.next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
- package/.next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
- package/.next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- package/.next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
- package/.next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
- package/.next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- package/.next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
- package/.next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
- package/.next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
- package/.next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
- package/.next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
- package/.next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- package/.next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- package/.next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- package/.next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
- package/.next/trace +83 -0
- package/.next/trace-build +1 -0
- package/.next/types/app/api/agent/[id]/bash-output/route.ts +353 -0
- package/.next/types/app/api/agent/[id]/events/route.ts +353 -0
- package/.next/types/app/api/agent/[id]/lease/route.ts +353 -0
- package/.next/types/app/api/agent/[id]/route.ts +353 -0
- package/.next/types/app/api/agent/new/route.ts +353 -0
- package/.next/types/app/api/agent/running/route.ts +353 -0
- package/.next/types/app/api/app-update/route.ts +353 -0
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +353 -0
- package/.next/types/app/api/auth/login/[provider]/route.ts +353 -0
- package/.next/types/app/api/auth/logout/[provider]/route.ts +353 -0
- package/.next/types/app/api/auth/providers/route.ts +353 -0
- package/.next/types/app/api/cache-miss-notices/route.ts +353 -0
- package/.next/types/app/api/cwd/browse/route.ts +353 -0
- package/.next/types/app/api/cwd/validate/route.ts +353 -0
- package/.next/types/app/api/default-cwd/route.ts +353 -0
- package/.next/types/app/api/file-index/route.ts +353 -0
- package/.next/types/app/api/files/[...path]/route.ts +353 -0
- package/.next/types/app/api/git/diff/route.ts +353 -0
- package/.next/types/app/api/git/status/route.ts +353 -0
- package/.next/types/app/api/home/route.ts +353 -0
- package/.next/types/app/api/mcp/route.ts +353 -0
- package/.next/types/app/api/mcp/sign-in/[flowId]/route.ts +353 -0
- package/.next/types/app/api/mcp/sign-in/route.ts +353 -0
- package/.next/types/app/api/mcp/test/route.ts +353 -0
- package/.next/types/app/api/models/default/route.ts +353 -0
- package/.next/types/app/api/models/enabled/route.ts +353 -0
- package/.next/types/app/api/models/refresh/route.ts +353 -0
- package/.next/types/app/api/models/route.ts +353 -0
- package/.next/types/app/api/models-config/catalog/route.ts +353 -0
- package/.next/types/app/api/models-config/discover/route.ts +353 -0
- package/.next/types/app/api/models-config/route.ts +353 -0
- package/.next/types/app/api/models-config/test/route.ts +353 -0
- package/.next/types/app/api/open-in-explorer/route.ts +353 -0
- package/.next/types/app/api/plugins/check/route.ts +353 -0
- package/.next/types/app/api/plugins/route.ts +353 -0
- package/.next/types/app/api/project-trust/route.ts +353 -0
- package/.next/types/app/api/provider-usage/query/route.ts +353 -0
- package/.next/types/app/api/push/config/route.ts +353 -0
- package/.next/types/app/api/push/subscribe/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/auto-name/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/context/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/entries/[entryId]/thinking/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/entries/[entryId]/tool-result-image/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/export/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/fork/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/route.ts +353 -0
- package/.next/types/app/api/sessions/[id]/state/route.ts +353 -0
- package/.next/types/app/api/sessions/delete/route.ts +353 -0
- package/.next/types/app/api/sessions/route.ts +353 -0
- package/.next/types/app/api/sessions/search/route.ts +353 -0
- package/.next/types/app/api/sessions/stats/route.ts +353 -0
- package/.next/types/app/api/sessions/ui-state/route.ts +353 -0
- package/.next/types/app/api/skills/check/route.ts +353 -0
- package/.next/types/app/api/skills/content/route.ts +353 -0
- package/.next/types/app/api/skills/install/route.ts +353 -0
- package/.next/types/app/api/skills/route.ts +353 -0
- package/.next/types/app/api/skills/search/route.ts +353 -0
- package/.next/types/app/api/skills/update/route.ts +353 -0
- package/.next/types/app/api/subagents/[id]/route.ts +353 -0
- package/.next/types/app/api/subagents/profiles/route.ts +353 -0
- package/.next/types/app/api/subagents/settings/route.ts +353 -0
- package/.next/types/app/api/terminal/[id]/events/route.ts +353 -0
- package/.next/types/app/api/terminal/[id]/route.ts +353 -0
- package/.next/types/app/api/terminal/route.ts +353 -0
- package/.next/types/app/api/tools/settings/route.ts +353 -0
- package/.next/types/app/api/web-auth/route.ts +353 -0
- package/.next/types/app/api/worktrees/route.ts +353 -0
- package/.next/types/app/layout.ts +89 -0
- package/.next/types/app/login/page.ts +89 -0
- package/.next/types/app/page.ts +89 -0
- package/.next/types/cache-life.d.ts +146 -0
- package/.next/types/package.json +1 -0
- package/.next/types/root-params.d.ts +3 -0
- package/.next/types/routes.d.ts +140 -0
- package/.next/types/validator.ts +682 -0
- package/LICENSE +22 -0
- package/README.md +208 -2
- package/bin/browser-opener.js +34 -0
- package/bin/node-version.js +35 -0
- package/bin/pi-web-commands.js +118 -0
- package/bin/pi-web-node-args.js +11 -0
- package/bin/pi-web-options.js +141 -0
- package/bin/pi-web-update.js +148 -0
- package/bin/pi-web.js +157 -0
- package/bin/prepare-terminal.js +14 -0
- package/bin/process-lifecycle.js +81 -0
- package/bin/rotate-preview-secrets.js +105 -0
- package/bin/run-records.js +212 -0
- package/next.config.ts +110 -0
- package/package.json +105 -4
- package/public/icons/apple-touch-icon.png +0 -0
- package/public/icons/catppuccin/LICENSE +22 -0
- package/public/icons/catppuccin/README.md +10 -0
- package/public/icons/catppuccin/latte/_file.svg +3 -0
- package/public/icons/catppuccin/latte/_folder.svg +3 -0
- package/public/icons/catppuccin/latte/_folder_open.svg +3 -0
- package/public/icons/catppuccin/latte/bash.svg +7 -0
- package/public/icons/catppuccin/latte/bun-lock.svg +8 -0
- package/public/icons/catppuccin/latte/config.svg +3 -0
- package/public/icons/catppuccin/latte/css.svg +6 -0
- package/public/icons/catppuccin/latte/database.svg +3 -0
- package/public/icons/catppuccin/latte/docker.svg +3 -0
- package/public/icons/catppuccin/latte/env.svg +3 -0
- package/public/icons/catppuccin/latte/eslint.svg +6 -0
- package/public/icons/catppuccin/latte/git.svg +6 -0
- package/public/icons/catppuccin/latte/go.svg +3 -0
- package/public/icons/catppuccin/latte/graphql.svg +3 -0
- package/public/icons/catppuccin/latte/html.svg +6 -0
- package/public/icons/catppuccin/latte/javascript-react.svg +8 -0
- package/public/icons/catppuccin/latte/javascript.svg +6 -0
- package/public/icons/catppuccin/latte/json.svg +3 -0
- package/public/icons/catppuccin/latte/lock.svg +3 -0
- package/public/icons/catppuccin/latte/markdown.svg +3 -0
- package/public/icons/catppuccin/latte/ms-word.svg +6 -0
- package/public/icons/catppuccin/latte/next.svg +6 -0
- package/public/icons/catppuccin/latte/npm-lock.svg +7 -0
- package/public/icons/catppuccin/latte/pdf.svg +3 -0
- package/public/icons/catppuccin/latte/python.svg +8 -0
- package/public/icons/catppuccin/latte/rust.svg +6 -0
- package/public/icons/catppuccin/latte/sass.svg +3 -0
- package/public/icons/catppuccin/latte/terraform.svg +3 -0
- package/public/icons/catppuccin/latte/toml.svg +3 -0
- package/public/icons/catppuccin/latte/typescript-react.svg +8 -0
- package/public/icons/catppuccin/latte/typescript.svg +6 -0
- package/public/icons/catppuccin/latte/yaml.svg +3 -0
- package/public/icons/catppuccin/mocha/_file.svg +3 -0
- package/public/icons/catppuccin/mocha/_folder.svg +3 -0
- package/public/icons/catppuccin/mocha/_folder_open.svg +3 -0
- package/public/icons/catppuccin/mocha/bash.svg +7 -0
- package/public/icons/catppuccin/mocha/bun-lock.svg +8 -0
- package/public/icons/catppuccin/mocha/config.svg +3 -0
- package/public/icons/catppuccin/mocha/css.svg +6 -0
- package/public/icons/catppuccin/mocha/database.svg +3 -0
- package/public/icons/catppuccin/mocha/docker.svg +3 -0
- package/public/icons/catppuccin/mocha/env.svg +3 -0
- package/public/icons/catppuccin/mocha/eslint.svg +6 -0
- package/public/icons/catppuccin/mocha/git.svg +6 -0
- package/public/icons/catppuccin/mocha/go.svg +3 -0
- package/public/icons/catppuccin/mocha/graphql.svg +3 -0
- package/public/icons/catppuccin/mocha/html.svg +6 -0
- package/public/icons/catppuccin/mocha/javascript-react.svg +8 -0
- package/public/icons/catppuccin/mocha/javascript.svg +6 -0
- package/public/icons/catppuccin/mocha/json.svg +3 -0
- package/public/icons/catppuccin/mocha/lock.svg +3 -0
- package/public/icons/catppuccin/mocha/markdown.svg +3 -0
- package/public/icons/catppuccin/mocha/ms-word.svg +6 -0
- package/public/icons/catppuccin/mocha/next.svg +6 -0
- package/public/icons/catppuccin/mocha/npm-lock.svg +7 -0
- package/public/icons/catppuccin/mocha/pdf.svg +3 -0
- package/public/icons/catppuccin/mocha/python.svg +8 -0
- package/public/icons/catppuccin/mocha/rust.svg +6 -0
- package/public/icons/catppuccin/mocha/sass.svg +3 -0
- package/public/icons/catppuccin/mocha/terraform.svg +3 -0
- package/public/icons/catppuccin/mocha/toml.svg +3 -0
- package/public/icons/catppuccin/mocha/typescript-react.svg +8 -0
- package/public/icons/catppuccin/mocha/typescript.svg +6 -0
- package/public/icons/catppuccin/mocha/yaml.svg +3 -0
- package/public/icons/icon-192.png +0 -0
- package/public/icons/icon-512.png +0 -0
- package/public/offline.html +83 -0
- package/public/provider-icons.svg +54 -0
- package/public/sw.js +183 -0
- package/public/sw.test.mjs +339 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
4
|
+
const { execFileSync, spawnSync } = require("child_process");
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
8
|
+
const path = require("path");
|
|
9
|
+
|
|
10
|
+
const NPM_LATEST_URL = "https://registry.npmjs.org/@colinxu%2Fpi-web-classic/latest";
|
|
11
|
+
const FETCH_TIMEOUT_MS = 10_000;
|
|
12
|
+
const MANUAL_COMMAND = "npm install -g @colinxu/pi-web-classic@latest";
|
|
13
|
+
|
|
14
|
+
// Port of lib/app-update.ts (bin cannot import TypeScript).
|
|
15
|
+
function parseStableVersion(version) {
|
|
16
|
+
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
|
|
17
|
+
if (!match) return null;
|
|
18
|
+
const parts = match.slice(1).map(Number);
|
|
19
|
+
return parts.every(Number.isSafeInteger) ? parts : null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function isNewerStableVersion(candidate, current) {
|
|
23
|
+
const candidateParts = parseStableVersion(candidate);
|
|
24
|
+
const currentParts = parseStableVersion(current);
|
|
25
|
+
if (!candidateParts || !currentParts) return false;
|
|
26
|
+
for (let index = 0; index < candidateParts.length; index += 1) {
|
|
27
|
+
if (candidateParts[index] !== currentParts[index]) {
|
|
28
|
+
return candidateParts[index] > currentParts[index];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function fetchLatestVersion() {
|
|
35
|
+
const response = await fetch(NPM_LATEST_URL, {
|
|
36
|
+
headers: { Accept: "application/json" },
|
|
37
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS),
|
|
38
|
+
});
|
|
39
|
+
if (!response.ok) throw new Error(`npm registry returned HTTP ${response.status}`);
|
|
40
|
+
const { version } = await response.json();
|
|
41
|
+
if (typeof version !== "string" || !parseStableVersion(version)) {
|
|
42
|
+
throw new Error("npm registry returned an invalid version");
|
|
43
|
+
}
|
|
44
|
+
return version;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// npm's own CLI script run through this node, so no shell is needed on
|
|
48
|
+
// Windows (same lookup as lib/node-cli.ts). null: no way to run npm safely.
|
|
49
|
+
function findNpmInvocation(args, nodeDir = path.dirname(process.execPath), platform = process.platform, exists = fs.existsSync) {
|
|
50
|
+
for (const script of [
|
|
51
|
+
path.join(nodeDir, "node_modules", "npm", "bin", "npm-cli.js"),
|
|
52
|
+
path.join(nodeDir, "..", "lib", "node_modules", "npm", "bin", "npm-cli.js"),
|
|
53
|
+
]) {
|
|
54
|
+
if (exists(script)) return { command: process.execPath, args: [script, ...args] };
|
|
55
|
+
}
|
|
56
|
+
return platform === "win32" ? null : { command: "npm", args };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function realpathOrSelf(target, realpath = fs.realpathSync) {
|
|
60
|
+
try {
|
|
61
|
+
return realpath(target);
|
|
62
|
+
} catch {
|
|
63
|
+
return path.resolve(target);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// "global": pkgDir is <npm root -g>/@colinxu/pi-web-classic; "npx": an npx cache; else "other".
|
|
68
|
+
function getInstallKind({ pkgDir, npmRoot, realpath = fs.realpathSync }) {
|
|
69
|
+
const realPkgDir = realpathOrSelf(pkgDir, realpath);
|
|
70
|
+
if (realPkgDir.split(/[\\/]/).includes("_npx")) return "npx";
|
|
71
|
+
if (!npmRoot) return "other";
|
|
72
|
+
const inGlobalRoot =
|
|
73
|
+
path.basename(realPkgDir) === "pi-web-classic" &&
|
|
74
|
+
path.basename(path.dirname(realPkgDir)) === "@colinxu" &&
|
|
75
|
+
realpathOrSelf(path.dirname(path.dirname(realPkgDir)), realpath) === realpathOrSelf(npmRoot, realpath);
|
|
76
|
+
return inGlobalRoot ? "global" : "other";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function getGlobalNpmRoot() {
|
|
80
|
+
const invocation = findNpmInvocation(["root", "-g"]);
|
|
81
|
+
if (!invocation) return null;
|
|
82
|
+
try {
|
|
83
|
+
return execFileSync(invocation.command, invocation.args, { encoding: "utf8", timeout: 30_000 }).trim();
|
|
84
|
+
} catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function runNpmInstall(version) {
|
|
90
|
+
const invocation = findNpmInvocation(["install", "-g", `@colinxu/pi-web-classic@${version}`]);
|
|
91
|
+
if (!invocation) return null;
|
|
92
|
+
const result = spawnSync(invocation.command, invocation.args, { stdio: "inherit" });
|
|
93
|
+
return result.status ?? 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function runUpdate({
|
|
97
|
+
check,
|
|
98
|
+
currentVersion,
|
|
99
|
+
pkgDir,
|
|
100
|
+
listRecords,
|
|
101
|
+
formatRecord,
|
|
102
|
+
fetchLatest = fetchLatestVersion,
|
|
103
|
+
getNpmRoot = getGlobalNpmRoot,
|
|
104
|
+
install = runNpmInstall,
|
|
105
|
+
realpath = fs.realpathSync,
|
|
106
|
+
log = console.log,
|
|
107
|
+
error = console.error,
|
|
108
|
+
}) {
|
|
109
|
+
let latest;
|
|
110
|
+
try {
|
|
111
|
+
latest = await fetchLatest();
|
|
112
|
+
} catch (fetchError) {
|
|
113
|
+
error(`Could not check for updates: ${fetchError.message}`);
|
|
114
|
+
return 1;
|
|
115
|
+
}
|
|
116
|
+
if (!isNewerStableVersion(latest, currentVersion)) {
|
|
117
|
+
log(`pi-web ${currentVersion} is up to date.`);
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
log(`pi-web ${latest} is available (installed: ${currentVersion}).`);
|
|
121
|
+
if (check) return 0;
|
|
122
|
+
|
|
123
|
+
// A running `next start` has .next/ open; never replace it underneath.
|
|
124
|
+
const running = await listRecords();
|
|
125
|
+
if (running.length > 0) {
|
|
126
|
+
error(`pi-web is running:\n${running.map(formatRecord).join("\n")}\nRun \`pwc stop\` first, then update.`);
|
|
127
|
+
return 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const kind = getInstallKind({ pkgDir, npmRoot: getNpmRoot(), realpath });
|
|
131
|
+
if (kind === "npx") {
|
|
132
|
+
error("This pi-web runs from the npx cache. Run `npx @colinxu/pi-web-classic@latest` instead.");
|
|
133
|
+
return 1;
|
|
134
|
+
}
|
|
135
|
+
if (kind !== "global") {
|
|
136
|
+
error(`This pi-web is not a global npm install. Update it yourself, for example: ${MANUAL_COMMAND}`);
|
|
137
|
+
return 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const code = install(latest);
|
|
141
|
+
if (code === null) {
|
|
142
|
+
error(`Could not find npm. Run: ${MANUAL_COMMAND}`);
|
|
143
|
+
return 1;
|
|
144
|
+
}
|
|
145
|
+
return code;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
module.exports = { findNpmInvocation, getInstallKind, isNewerStableVersion, runUpdate };
|
package/bin/pi-web.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
+
const { getUnsupportedNodeVersionMessage, isNodeVersionSupported } = require("./node-version");
|
|
6
|
+
|
|
7
|
+
if (!isNodeVersionSupported(process.versions.node)) {
|
|
8
|
+
console.error(getUnsupportedNodeVersionMessage(process.versions.node));
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
13
|
+
const { spawn } = require("child_process");
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
15
|
+
const path = require("path");
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
17
|
+
const fs = require("fs");
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
19
|
+
const { getHelpText, parseCommandLine } = require("./pi-web-options");
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
21
|
+
const { getNextNodeArgs } = require("./pi-web-node-args");
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
23
|
+
const { wireChildProcessLifecycle } = require("./process-lifecycle");
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
25
|
+
const { rotatePreviewSecrets, getRotationWarning } = require("./rotate-preview-secrets");
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
27
|
+
const { openInBrowser } = require("./browser-opener");
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
29
|
+
const { createRunRecordTracker, getOpenUrl, getRunDir } = require("./run-records");
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
31
|
+
const { getPackageVersion, runCommand } = require("./pi-web-commands");
|
|
32
|
+
|
|
33
|
+
let launchOptions;
|
|
34
|
+
try {
|
|
35
|
+
launchOptions = parseCommandLine();
|
|
36
|
+
} catch (error) {
|
|
37
|
+
fs.writeSync(
|
|
38
|
+
process.stderr.fd,
|
|
39
|
+
`${error instanceof Error ? error.message : String(error)}\n`,
|
|
40
|
+
);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (launchOptions.help) {
|
|
45
|
+
fs.writeSync(process.stdout.fd, getHelpText());
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (launchOptions.command === "start") {
|
|
50
|
+
startServer(launchOptions);
|
|
51
|
+
} else {
|
|
52
|
+
runCommand(launchOptions).then(
|
|
53
|
+
exitWhenIdle,
|
|
54
|
+
(error) => {
|
|
55
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
56
|
+
exitWhenIdle(1);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Leave once the event loop drains instead of calling process.exit() right
|
|
62
|
+
// after a fetch(): on Windows, Node.js 23 up to 24.19 / 26.6 can then abort
|
|
63
|
+
// with a libuv assertion (UV_HANDLE_CLOSING, win/async.c) while background
|
|
64
|
+
// work from the fetch is still winding down (#1174, nodejs/node#56645). The
|
|
65
|
+
// unref'd timer only fires if something still holds the loop open.
|
|
66
|
+
function exitWhenIdle(code) {
|
|
67
|
+
process.exitCode = code;
|
|
68
|
+
setTimeout(() => process.exit(code), 2_000).unref();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function startServer({ port, hostname, openBrowser }) {
|
|
72
|
+
|
|
73
|
+
const pkgDir = path.join(__dirname, "..");
|
|
74
|
+
const nextDir = path.join(pkgDir, ".next");
|
|
75
|
+
|
|
76
|
+
// Resolve next's CLI entry directly to avoid relying on .bin symlinks (which
|
|
77
|
+
// may not exist when installed via npx).
|
|
78
|
+
let nextBin;
|
|
79
|
+
try {
|
|
80
|
+
nextBin = require.resolve("next/dist/bin/next", { paths: [pkgDir] });
|
|
81
|
+
} catch {
|
|
82
|
+
// Fallback: locate next package root and derive the bin path manually.
|
|
83
|
+
try {
|
|
84
|
+
const nextPkg = require.resolve("next/package.json", { paths: [pkgDir] });
|
|
85
|
+
nextBin = path.join(path.dirname(nextPkg), "dist", "bin", "next");
|
|
86
|
+
} catch {
|
|
87
|
+
nextBin = path.join(pkgDir, "node_modules", "next", "dist", "bin", "next");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const loopbackHostnames = new Set(["127.0.0.1", "localhost", "::1", "[::1]"]);
|
|
92
|
+
const passwordEnabled = Boolean(process.env.PI_WEB_PASSWORD);
|
|
93
|
+
|
|
94
|
+
if (!fs.existsSync(nextDir)) {
|
|
95
|
+
console.error("Build artifacts not found. Please report this issue.");
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Replace the published preview-mode secrets with fresh random values so the
|
|
100
|
+
// previewModeId baked into the npm tarball cannot be used to skip the proxy
|
|
101
|
+
// (via the x-prerender-revalidate header). Must happen before `next start`.
|
|
102
|
+
const rotation = rotatePreviewSecrets(nextDir);
|
|
103
|
+
if (!rotation.ok) {
|
|
104
|
+
console.warn(getRotationWarning(rotation.reason));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!loopbackHostnames.has(hostname)) {
|
|
108
|
+
if (passwordEnabled) {
|
|
109
|
+
console.warn(
|
|
110
|
+
`Warning: pi-web is listening on ${hostname} with password authentication over HTTP. Use HTTPS or a trusted VPN to protect the password in transit.`,
|
|
111
|
+
);
|
|
112
|
+
} else {
|
|
113
|
+
console.warn(
|
|
114
|
+
`Warning: pi-web is listening on ${hostname} without authentication. Only use this on a trusted network.`,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const nextArgs = ["start", "-p", port];
|
|
120
|
+
nextArgs.push("-H", hostname);
|
|
121
|
+
|
|
122
|
+
// Always run next's JS entry with node directly — avoids .bin symlink issues
|
|
123
|
+
// and path-with-spaces problems on Windows when shell: true is used.
|
|
124
|
+
const child = spawn(process.execPath, getNextNodeArgs(nextBin, nextArgs), {
|
|
125
|
+
cwd: pkgDir,
|
|
126
|
+
stdio: ["inherit", "pipe", "inherit"],
|
|
127
|
+
env: { ...process.env, PI_WEB_HOSTNAME: hostname },
|
|
128
|
+
});
|
|
129
|
+
wireChildProcessLifecycle(child);
|
|
130
|
+
|
|
131
|
+
// Port 0 lets the OS pick a port we never learn, so such a server gets no record.
|
|
132
|
+
const runRecord = createRunRecordTracker({
|
|
133
|
+
dir: getRunDir,
|
|
134
|
+
record: {
|
|
135
|
+
pid: process.pid,
|
|
136
|
+
nextPid: child.pid,
|
|
137
|
+
port: Number(port),
|
|
138
|
+
hostname,
|
|
139
|
+
url: getOpenUrl(hostname, port),
|
|
140
|
+
version: getPackageVersion(pkgDir),
|
|
141
|
+
startedAt: new Date().toISOString(),
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
let serverReady = false;
|
|
146
|
+
const url = `http://${hostname}:${port}`;
|
|
147
|
+
|
|
148
|
+
child.stdout.on("data", (chunk) => {
|
|
149
|
+
const text = chunk.toString();
|
|
150
|
+
process.stdout.write(text);
|
|
151
|
+
if (!serverReady && text.includes("Ready")) {
|
|
152
|
+
serverReady = true;
|
|
153
|
+
if (port !== "0") runRecord.markReady();
|
|
154
|
+
if (openBrowser) openInBrowser(url);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// node-pty 1.1.0 ships macOS spawn-helper binaries without executable bits.
|
|
2
|
+
// Remove this workaround once the upstream package preserves those modes.
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
4
|
+
const { chmodSync, statSync } = require("node:fs");
|
|
5
|
+
const { dirname, join } = require("node:path");
|
|
6
|
+
|
|
7
|
+
if (process.platform === "darwin") {
|
|
8
|
+
const root = dirname(require.resolve("node-pty/package.json"));
|
|
9
|
+
for (const directory of ["build/Release", "build/Debug", `prebuilds/darwin-${process.arch}`]) {
|
|
10
|
+
const helper = join(root, directory, "spawn-helper");
|
|
11
|
+
const stat = statSync(helper, { throwIfNoEntry: false });
|
|
12
|
+
if (stat?.isFile() && (stat.mode & 0o111) !== 0o111) chmodSync(helper, stat.mode | 0o111);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
4
|
+
const os = require("node:os");
|
|
5
|
+
|
|
6
|
+
const forwardedSignals = ["SIGINT", "SIGTERM"];
|
|
7
|
+
const shutdownTimeoutMs = 5_000;
|
|
8
|
+
|
|
9
|
+
function getSignalExitCode(signal) {
|
|
10
|
+
const signalNumber = signal ? os.constants.signals[signal] : undefined;
|
|
11
|
+
return typeof signalNumber === "number" ? 128 + signalNumber : 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function wireChildProcessLifecycle(
|
|
15
|
+
child,
|
|
16
|
+
parentProcess = process,
|
|
17
|
+
timeoutMs = shutdownTimeoutMs,
|
|
18
|
+
log = console.error,
|
|
19
|
+
) {
|
|
20
|
+
const signalHandlers = new Map();
|
|
21
|
+
let shutdownTimer;
|
|
22
|
+
// Set once we forward a signal, so an exit we asked for stays quiet and one
|
|
23
|
+
// we did not gets reported.
|
|
24
|
+
let shuttingDown = false;
|
|
25
|
+
|
|
26
|
+
const forceKill = () => child.kill("SIGKILL");
|
|
27
|
+
|
|
28
|
+
function unwire() {
|
|
29
|
+
if (shutdownTimer) clearTimeout(shutdownTimer);
|
|
30
|
+
for (const [forwardedSignal, handler] of signalHandlers) {
|
|
31
|
+
parentProcess.removeListener(forwardedSignal, handler);
|
|
32
|
+
}
|
|
33
|
+
child.removeListener("error", handleError);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function handleError(error) {
|
|
37
|
+
const failedToSpawn = child.pid === undefined;
|
|
38
|
+
log(
|
|
39
|
+
`[pi-web] ${failedToSpawn ? "could not run the Next.js process" : "Next.js process error"}: ${error.message}`,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (failedToSpawn) {
|
|
43
|
+
unwire();
|
|
44
|
+
parentProcess.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
for (const signal of forwardedSignals) {
|
|
49
|
+
const handler = () => {
|
|
50
|
+
if (shutdownTimer) {
|
|
51
|
+
forceKill();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
shuttingDown = true;
|
|
56
|
+
shutdownTimer = setTimeout(forceKill, timeoutMs);
|
|
57
|
+
shutdownTimer.unref();
|
|
58
|
+
child.kill(signal);
|
|
59
|
+
};
|
|
60
|
+
signalHandlers.set(signal, handler);
|
|
61
|
+
parentProcess.on(signal, handler);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
child.on("error", handleError);
|
|
65
|
+
|
|
66
|
+
child.once("exit", (code, signal) => {
|
|
67
|
+
unwire();
|
|
68
|
+
|
|
69
|
+
// A shutdown the user asked for needs no explanation; anything else left
|
|
70
|
+
// the window closing with no stated reason.
|
|
71
|
+
if (!shuttingDown) {
|
|
72
|
+
log(
|
|
73
|
+
`[pi-web] Next.js exited unexpectedly (${signal ? `signal ${signal}` : `code ${code}`})`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
parentProcess.exit(code ?? getSignalExitCode(signal));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = { wireChildProcessLifecycle };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// The published npm tarball ships `.next/prerender-manifest.json`, whose
|
|
4
|
+
// `preview` block holds the build's preview-mode secrets. One of them,
|
|
5
|
+
// `previewModeId`, is the value Next compares against the `x-prerender-revalidate`
|
|
6
|
+
// request header: when they match, Next treats the request as an on-demand
|
|
7
|
+
// revalidation and skips middleware/proxy entirely (see next-server.js
|
|
8
|
+
// `runMiddleware`). Because the value is baked into every published version, an
|
|
9
|
+
// attacker who reads the tarball can send that header and bypass `proxy.ts` —
|
|
10
|
+
// the central password gate and the Host/Origin/Fetch-Metadata checks.
|
|
11
|
+
//
|
|
12
|
+
// `next start` reads these secrets only from this file (there is no runtime env
|
|
13
|
+
// override) and never regenerates them, so we rewrite the three preview secrets
|
|
14
|
+
// with fresh random values before launching Next. That makes the published
|
|
15
|
+
// values useless and unique per launch. Done at startup rather than in a
|
|
16
|
+
// postinstall hook so it runs on the guaranteed launch path and cannot be
|
|
17
|
+
// skipped with `--ignore-scripts`.
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
20
|
+
const crypto = require("crypto");
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
22
|
+
const fs = require("fs");
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
24
|
+
const path = require("path");
|
|
25
|
+
|
|
26
|
+
const PRERENDER_MANIFEST = "prerender-manifest.json";
|
|
27
|
+
|
|
28
|
+
function freshPreviewSecrets() {
|
|
29
|
+
return {
|
|
30
|
+
// Lengths mirror what Next generates at build time.
|
|
31
|
+
previewModeId: crypto.randomBytes(16).toString("hex"),
|
|
32
|
+
previewModeSigningKey: crypto.randomBytes(32).toString("hex"),
|
|
33
|
+
previewModeEncryptionKey: crypto.randomBytes(32).toString("hex"),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Rewrite the preview-mode secrets in `.next/prerender-manifest.json` with fresh
|
|
39
|
+
* random values. Never throws: returns a status the caller can surface so a
|
|
40
|
+
* read-only install (where the rewrite cannot happen) is visible rather than a
|
|
41
|
+
* silent bypass.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} nextDir absolute path to the package's `.next` directory
|
|
44
|
+
* @returns {{ ok: boolean, reason?: string, error?: Error }}
|
|
45
|
+
*/
|
|
46
|
+
function rotatePreviewSecrets(nextDir) {
|
|
47
|
+
const manifestPath = path.join(nextDir, PRERENDER_MANIFEST);
|
|
48
|
+
|
|
49
|
+
let manifest;
|
|
50
|
+
try {
|
|
51
|
+
manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
52
|
+
} catch (error) {
|
|
53
|
+
if (error && error.code === "ENOENT") {
|
|
54
|
+
return { ok: false, reason: "missing" };
|
|
55
|
+
}
|
|
56
|
+
return { ok: false, reason: "unreadable", error };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!manifest || typeof manifest !== "object" || typeof manifest.preview !== "object") {
|
|
60
|
+
return { ok: false, reason: "unexpected-shape" };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
manifest.preview = { ...manifest.preview, ...freshPreviewSecrets() };
|
|
64
|
+
|
|
65
|
+
// Write to a sibling temp file and rename so a concurrent `next start` never
|
|
66
|
+
// reads a half-written manifest.
|
|
67
|
+
const tempPath = path.join(nextDir, `${PRERENDER_MANIFEST}.${process.pid}.tmp`);
|
|
68
|
+
try {
|
|
69
|
+
fs.writeFileSync(tempPath, JSON.stringify(manifest));
|
|
70
|
+
fs.renameSync(tempPath, manifestPath);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
try {
|
|
73
|
+
fs.rmSync(tempPath, { force: true });
|
|
74
|
+
} catch {
|
|
75
|
+
// Best effort: leaving a stray temp file is harmless.
|
|
76
|
+
}
|
|
77
|
+
return { ok: false, reason: "unwritable", error };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return { ok: true };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function getRotationWarning(reason) {
|
|
84
|
+
const detail =
|
|
85
|
+
reason === "unwritable"
|
|
86
|
+
? "the install directory is not writable"
|
|
87
|
+
: reason === "missing"
|
|
88
|
+
? "its prerender manifest is missing"
|
|
89
|
+
: reason === "unreadable"
|
|
90
|
+
? "its prerender manifest could not be read"
|
|
91
|
+
: "its prerender manifest has an unexpected format";
|
|
92
|
+
return [
|
|
93
|
+
`Warning: could not rotate pi-web's preview-mode secrets because ${detail}.`,
|
|
94
|
+
"This instance keeps the published preview id, so a client that knows it can",
|
|
95
|
+
"bypass the proxy's authentication and Host/Origin checks via the",
|
|
96
|
+
"x-prerender-revalidate header. Run from a writable install, or restrict",
|
|
97
|
+
"network access to this instance.",
|
|
98
|
+
].join("\n");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports = {
|
|
102
|
+
PRERENDER_MANIFEST,
|
|
103
|
+
rotatePreviewSecrets,
|
|
104
|
+
getRotationWarning,
|
|
105
|
+
};
|