@rexvane/piweb 0.3.21 → 0.3.23
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 +9 -6
- package/.next/build-manifest.json +5 -5
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +7 -7
- package/.next/react-loadable-manifest.json +18 -11
- package/.next/required-server-files.js +16 -1
- package/.next/required-server-files.json +16 -1
- package/.next/routes-manifest.json +20 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- 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.meta +8 -0
- package/.next/server/app/_global-error.rsc +15 -11
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -11
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +20 -16
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +3 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +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.meta +8 -0
- package/.next/server/app/_not-found.rsc +17 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +17 -13
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +24 -20
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/side-chat/route.js +5 -0
- package/.next/server/app/api/agent/[id]/side-chat/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/side-chat/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/tree/route.js +1 -1
- package/.next/server/app/api/agent/[id]/tree/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/files/route.js +1 -1
- package/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/server/app/api/fs/route.js +1 -1
- package/.next/server/app/api/fs/route.js.nft.json +1 -1
- package/.next/server/app/api/git/route.js +4 -4
- package/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/server/app/api/github/route.js +5 -0
- package/.next/server/app/api/github/route.js.nft.json +1 -0
- package/.next/server/app/api/github/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/growth/route.js +1 -1
- package/.next/server/app/api/growth/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/models/defaults/route.js +1 -0
- package/.next/server/app/api/models/defaults/route.js.nft.json +1 -0
- package/.next/server/app/api/models/defaults/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/route.js.nft.json +1 -1
- package/.next/server/app/api/pi-settings/route.js +1 -1
- package/.next/server/app/api/pi-settings/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/prompts/route.js +1 -1
- package/.next/server/app/api/prompts/route.js.nft.json +1 -1
- package/.next/server/app/api/remote/route.js +4 -4
- package/.next/server/app/api/remote/route.js.nft.json +1 -1
- package/.next/server/app/api/security/route.js +1 -1
- package/.next/server/app/api/security/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/import/route.js +2 -2
- package/.next/server/app/api/sessions/import/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/update/route.js +2 -2
- package/.next/server/app/api/update/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/api/web-auth/route.js +2 -2
- package/.next/server/app/api/web-auth/route.js.nft.json +1 -1
- package/.next/server/app/api/workspaces/route.js +1 -1
- package/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/.next/server/app/icon.svg.meta +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.meta +8 -0
- package/.next/server/app/index.rsc +20 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +26 -19
- package/.next/server/app/index.segments/_full.segment.rsc +20 -13
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.meta +8 -0
- package/.next/server/app/login.rsc +23 -17
- package/.next/server/app/login.segments/_full.segment.rsc +23 -17
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +30 -24
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +9 -6
- package/.next/server/chunks/1813.js +23 -0
- package/.next/server/chunks/2430.js +377 -0
- package/.next/server/chunks/2970.js +305 -0
- package/.next/server/chunks/3421.js +1 -0
- package/.next/server/chunks/3924.js +6 -0
- package/.next/server/chunks/4807.js +1 -0
- package/.next/server/chunks/538.js +1 -1
- package/.next/server/chunks/5393.js +1 -0
- package/.next/server/chunks/5802.js +2 -0
- package/.next/server/chunks/6229.js +1 -0
- package/.next/server/chunks/7496.js +1 -0
- package/.next/server/chunks/7662.js +2 -0
- package/.next/server/chunks/8686.js +1 -0
- package/.next/server/chunks/{593.js → 974.js} +1 -1
- package/.next/server/chunks/{920.js → 9920.js} +2 -2
- package/.next/server/functions-config-manifest.json +2 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +185 -23
- package/.next/server/middleware.js.nft.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/preview-props.json +5 -0
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/chunks/2716.44fdf1b21454b961.js +1 -0
- package/.next/static/chunks/316-698d10eb465bd8ef.js +1 -0
- package/.next/static/chunks/3794-0978865cda773008.js +52 -0
- package/.next/static/chunks/4673.e261707dce391be7.js +1 -0
- package/.next/static/chunks/4686-0cd87513f9ea3538.js +1 -0
- package/.next/static/chunks/4778.eddd3a5813f85824.js +1 -0
- package/.next/static/chunks/4bd1b696-e199e788e58acf79.js +1 -0
- package/.next/static/chunks/{5173.91ddb803785009f8.js → 5173.dfd1cbb795b9a21c.js} +1 -1
- package/.next/static/chunks/618.949981da99be7182.js +4 -0
- package/.next/static/chunks/7411.5f79671208209b13.js +1 -0
- package/.next/static/chunks/app/_global-error/page-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/side-chat/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/tree/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/config/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/files/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/fs/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/git/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/github/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/growth/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/health/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/models/defaults/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/models/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/pi-settings/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/prompts/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/remote/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/security/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/import/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/skills/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/update/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/version/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/web-auth/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/api/workspaces/route-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/app/page-dc3cb41d91c7432e.js +1 -0
- package/.next/static/chunks/framework-47b723d27f4a4963.js +1 -0
- package/.next/static/chunks/main-5403f0764579e5fe.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cbaaee0d7aacb85a.js +1 -0
- package/.next/static/chunks/webpack-2ac3d76b81895f5b.js +1 -0
- package/.next/static/css/9fc559c2c4ad1d0f.css +1 -0
- package/.next/static/css/c6e2227c36ec2fd6.css +1 -0
- package/.next/static/css/{2959bd6b626b7ffe.css → f15a853af8b5127f.css} +1 -1
- package/.next/static/hYPL1-dmhKFjLS3f5yoqN/_buildManifest.js +1 -0
- package/.next/types/app/api/agent/[id]/events/route.ts +3 -1
- package/.next/types/app/api/agent/[id]/route.ts +3 -1
- package/.next/types/app/api/agent/[id]/side-chat/route.ts +355 -0
- package/.next/types/app/api/agent/[id]/tree/route.ts +3 -1
- package/.next/types/app/api/agent/new/route.ts +3 -1
- package/.next/types/app/api/config/route.ts +3 -1
- package/.next/types/app/api/files/route.ts +3 -1
- package/.next/types/app/api/fs/route.ts +3 -1
- package/.next/types/app/api/git/route.ts +3 -1
- package/.next/types/app/api/github/route.ts +355 -0
- package/.next/types/app/api/growth/route.ts +3 -1
- package/.next/types/app/api/health/route.ts +3 -1
- package/.next/types/app/api/models/defaults/route.ts +355 -0
- package/.next/types/app/api/models/route.ts +3 -1
- package/.next/types/app/api/pi-settings/route.ts +3 -1
- package/.next/types/app/api/plugins/route.ts +3 -1
- package/.next/types/app/api/prompts/route.ts +3 -1
- package/.next/types/app/api/remote/route.ts +3 -1
- package/.next/types/app/api/security/route.ts +3 -1
- package/.next/types/app/api/sessions/[id]/export/route.ts +3 -1
- package/.next/types/app/api/sessions/[id]/route.ts +3 -1
- package/.next/types/app/api/sessions/import/route.ts +3 -1
- package/.next/types/app/api/sessions/route.ts +3 -1
- package/.next/types/app/api/skills/route.ts +3 -1
- package/.next/types/app/api/update/route.ts +3 -1
- package/.next/types/app/api/version/route.ts +3 -1
- package/.next/types/app/api/web-auth/route.ts +3 -1
- package/.next/types/app/api/workspaces/route.ts +3 -1
- package/.next/types/app/layout.ts +4 -1
- package/.next/types/app/login/page.ts +4 -1
- package/.next/types/app/page.ts +4 -1
- package/.next/types/cache-life.d.ts +11 -43
- package/.next/types/routes.d.ts +4 -1
- package/.next/types/validator.ts +86 -2
- package/next.config.ts +2 -0
- package/package.json +8 -2
- package/scripts/release.mjs +3 -7
- package/scripts/runtime/check-installed.mjs +66 -0
- package/scripts/runtime/pi-packages.mjs +51 -0
- package/scripts/verify-package.mjs +29 -7
- package/src/app/api/agent/[id]/side-chat/route.ts +77 -0
- package/src/app/api/files/route.ts +5 -2
- package/src/app/api/github/route.ts +26 -0
- package/src/app/api/models/defaults/route.ts +18 -0
- package/src/app/api/models/route.ts +24 -1
- package/src/app/globals.css +1748 -0
- package/src/components/AppShell.tsx +145 -43
- package/src/components/ChatInput.tsx +264 -79
- package/src/components/ChatWindow.tsx +13 -23
- package/src/components/ContextMeter.tsx +213 -144
- package/src/components/DrawerPanel.tsx +1 -1
- package/src/components/FileViewer.tsx +89 -8
- package/src/components/GitPanel.tsx +110 -40
- package/src/components/GrowthTree.tsx +30 -5
- package/src/components/ModelSelector.tsx +21 -5
- package/src/components/ProjectPanel.tsx +55 -30
- package/src/components/PromptPanel.tsx +2 -4
- package/src/components/ProviderSetupModal.module.css +20 -0
- package/src/components/ProviderSetupModal.tsx +134 -29
- package/src/components/SettingsPanel.tsx +252 -27
- package/src/components/TrajectoryView.tsx +4 -6
- package/src/components/chat/reading-anchor.ts +81 -0
- package/src/components/composer/ComposerImages.tsx +326 -0
- package/src/components/side-chat/SideChatPanel.module.css +131 -0
- package/src/components/side-chat/SideChatPanel.tsx +189 -0
- package/src/components/side-chat/icons.tsx +8 -0
- package/src/components/side-chat/request-history.ts +29 -0
- package/src/components/side-chat/store.ts +248 -0
- package/src/hooks/useFileViewer.ts +6 -4
- package/src/hooks/useGrowth.ts +3 -0
- package/src/hooks/usePiWeb.ts +12 -2
- package/src/hooks/useWorkspaceFiles.ts +93 -0
- package/src/i18n.tsx +150 -2
- package/src/lib/agent-manager.ts +135 -104
- package/src/lib/files-service.ts +166 -3
- package/src/lib/format.ts +56 -0
- package/src/lib/git-service.ts +45 -13
- package/src/lib/github-identity.ts +245 -0
- package/src/lib/growth-service.ts +6 -2
- package/src/lib/hero-model-memory.ts +28 -0
- package/src/lib/model-defaults.ts +105 -0
- package/src/lib/model-draft.ts +257 -9
- package/src/lib/model-endpoint.ts +23 -0
- package/src/lib/model-files.ts +33 -0
- package/src/lib/models-service.ts +240 -78
- package/src/lib/path-security.ts +24 -32
- package/src/lib/pi.ts +27 -2
- package/src/lib/process-format.ts +3 -2
- package/src/lib/session/metrics.ts +31 -0
- package/src/lib/session-reader.ts +1 -1
- package/src/lib/side-chat/context.ts +123 -0
- package/src/lib/side-chat/service.ts +191 -0
- package/src/lib/side-chat/types.ts +61 -0
- package/src/lib/thinking-level.ts +39 -0
- package/src/lib/trajectory.ts +17 -3
- package/src/lib/types.ts +12 -1
- package/src/lib/update-service.ts +4 -6
- package/src/lib/workspace-index.ts +270 -0
- package/.next/server/chunks/229.js +0 -1
- package/.next/server/chunks/393.js +0 -1
- package/.next/server/chunks/421.js +0 -1
- package/.next/server/chunks/430.js +0 -193
- package/.next/server/chunks/496.js +0 -1
- package/.next/server/chunks/662.js +0 -2
- package/.next/server/chunks/686.js +0 -1
- package/.next/server/chunks/741.js +0 -165
- package/.next/server/chunks/802.js +0 -2
- package/.next/server/chunks/807.js +0 -1
- package/.next/server/chunks/813.js +0 -1
- package/.next/server/chunks/924.js +0 -6
- package/.next/static/chunks/2716.7ad073038e94a802.js +0 -1
- package/.next/static/chunks/316-5ea443ee6b512aa9.js +0 -1
- package/.next/static/chunks/3794-3679f1c05160977c.js +0 -52
- package/.next/static/chunks/4673.8a5a9e6855350e34.js +0 -1
- package/.next/static/chunks/4686-882531aef1d2e250.js +0 -1
- package/.next/static/chunks/4778.305dc6abb9889627.js +0 -1
- package/.next/static/chunks/4bd1b696-93bf506b236d6248.js +0 -1
- package/.next/static/chunks/618.ee5d5bf1c647e483.js +0 -4
- package/.next/static/chunks/839.bfd2db36483faa3e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/tree/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/config/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/files/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/fs/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/git/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/growth/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/health/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/models/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/pi-settings/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/prompts/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/remote/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/security/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/import/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/skills/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/update/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/version/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/web-auth/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/api/workspaces/route-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/app/page-c04af72e549695bd.js +0 -1
- package/.next/static/chunks/framework-c4e651fe89edfa91.js +0 -1
- package/.next/static/chunks/main-6159b22a8cb0b7c5.js +0 -5
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b179d9f7f6f2daf9.js +0 -1
- package/.next/static/chunks/webpack-9b4bb574e5817654.js +0 -1
- package/.next/static/css/ea27b9e30f76303f.css +0 -1
- package/.next/static/sNX5GQkOWuK5YEID1hT-C/_buildManifest.js +0 -1
- /package/.next/static/{sNX5GQkOWuK5YEID1hT-C → hYPL1-dmhKFjLS3f5yoqN}/_ssgManifest.js +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as entry from '../../../src/app/layout.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
|
5
|
-
import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal, Prefetch, EnsureStatic } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
6
|
|
|
7
7
|
type TEntry = typeof import('../../../src/app/layout.js')
|
|
8
8
|
|
|
@@ -15,8 +15,11 @@ checkFields<Diff<{
|
|
|
15
15
|
default: Function
|
|
16
16
|
config?: {}
|
|
17
17
|
generateStaticParams?: Function
|
|
18
|
+
unstable_paramMatching?: {}
|
|
19
|
+
unstable_generateParamMatching?: Function
|
|
18
20
|
instant?: InstantConfigForTypeCheckInternal
|
|
19
21
|
prefetch?: Prefetch
|
|
22
|
+
ensureStatic?: EnsureStatic
|
|
20
23
|
unstable_dynamicStaleTime?: number
|
|
21
24
|
revalidate?: RevalidateRange<TEntry> | false
|
|
22
25
|
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as entry from '../../../../src/app/login/page.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
|
5
|
-
import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal, Prefetch, EnsureStatic } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
6
|
|
|
7
7
|
type TEntry = typeof import('../../../../src/app/login/page.js')
|
|
8
8
|
|
|
@@ -15,8 +15,11 @@ checkFields<Diff<{
|
|
|
15
15
|
default: Function
|
|
16
16
|
config?: {}
|
|
17
17
|
generateStaticParams?: Function
|
|
18
|
+
unstable_paramMatching?: {}
|
|
19
|
+
unstable_generateParamMatching?: Function
|
|
18
20
|
instant?: InstantConfigForTypeCheckInternal
|
|
19
21
|
prefetch?: Prefetch
|
|
22
|
+
ensureStatic?: EnsureStatic
|
|
20
23
|
unstable_dynamicStaleTime?: number
|
|
21
24
|
revalidate?: RevalidateRange<TEntry> | false
|
|
22
25
|
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
package/.next/types/app/page.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as entry from '../../../src/app/page.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
|
5
|
-
import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
5
|
+
import type { InstantConfigForTypeCheckInternal, Prefetch, EnsureStatic } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
6
|
|
|
7
7
|
type TEntry = typeof import('../../../src/app/page.js')
|
|
8
8
|
|
|
@@ -15,8 +15,11 @@ checkFields<Diff<{
|
|
|
15
15
|
default: Function
|
|
16
16
|
config?: {}
|
|
17
17
|
generateStaticParams?: Function
|
|
18
|
+
unstable_paramMatching?: {}
|
|
19
|
+
unstable_generateParamMatching?: Function
|
|
18
20
|
instant?: InstantConfigForTypeCheckInternal
|
|
19
21
|
prefetch?: Prefetch
|
|
22
|
+
ensureStatic?: EnsureStatic
|
|
20
23
|
unstable_dynamicStaleTime?: number
|
|
21
24
|
revalidate?: RevalidateRange<TEntry> | false
|
|
22
25
|
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// Type definitions for Next.js cacheLife configs
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'
|
|
5
|
-
export {
|
|
6
|
-
updateTag,
|
|
7
|
-
revalidateTag,
|
|
8
|
-
revalidatePath,
|
|
9
|
-
refresh,
|
|
10
|
-
} from 'next/dist/server/web/spec-extension/revalidate'
|
|
11
|
-
export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'
|
|
12
|
-
export { io } from 'next/dist/server/request/io'
|
|
3
|
+
export {}
|
|
13
4
|
|
|
5
|
+
declare module 'next/cache' {
|
|
6
|
+
export interface CacheLifeProfiles {
|
|
7
|
+
"default": true
|
|
8
|
+
"seconds": true
|
|
9
|
+
"minutes": true
|
|
10
|
+
"hours": true
|
|
11
|
+
"days": true
|
|
12
|
+
"weeks": true
|
|
13
|
+
"max": true
|
|
14
|
+
}
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Cache this `"use cache"` for a timespan defined by the `"default"` profile.
|
|
@@ -110,37 +111,4 @@ declare module 'next/cache' {
|
|
|
110
111
|
*/
|
|
111
112
|
export function cacheLife(profile: "max"): void
|
|
112
113
|
|
|
113
|
-
/**
|
|
114
|
-
* Cache this `"use cache"` using a custom timespan.
|
|
115
|
-
* ```
|
|
116
|
-
* stale: ... // seconds
|
|
117
|
-
* revalidate: ... // seconds
|
|
118
|
-
* expire: ... // seconds
|
|
119
|
-
* ```
|
|
120
|
-
*
|
|
121
|
-
* This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
|
|
122
|
-
*
|
|
123
|
-
* If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
|
|
124
|
-
*/
|
|
125
|
-
export function cacheLife(profile: {
|
|
126
|
-
/**
|
|
127
|
-
* This cache may be stale on clients for ... seconds before checking with the server.
|
|
128
|
-
*/
|
|
129
|
-
stale?: number,
|
|
130
|
-
/**
|
|
131
|
-
* If the server receives a new request after ... seconds, start revalidating new values in the background.
|
|
132
|
-
*/
|
|
133
|
-
revalidate?: number,
|
|
134
|
-
/**
|
|
135
|
-
* If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
|
|
136
|
-
*/
|
|
137
|
-
expire?: number
|
|
138
|
-
}): void
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
import { cacheTag } from 'next/dist/server/use-cache/cache-tag'
|
|
142
|
-
export { cacheTag }
|
|
143
|
-
|
|
144
|
-
export const unstable_cacheTag: typeof cacheTag
|
|
145
|
-
export const unstable_cacheLife: typeof cacheLife
|
|
146
114
|
}
|
package/.next/types/routes.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
|
|
4
4
|
type AppRoutes = "/" | "/login"
|
|
5
|
-
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/[id]/tree" | "/api/agent/new" | "/api/config" | "/api/files" | "/api/fs" | "/api/git" | "/api/growth" | "/api/health" | "/api/models" | "/api/pi-settings" | "/api/plugins" | "/api/prompts" | "/api/remote" | "/api/security" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/export" | "/api/sessions/import" | "/api/skills" | "/api/update" | "/api/version" | "/api/web-auth" | "/api/workspaces"
|
|
5
|
+
type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/[id]/side-chat" | "/api/agent/[id]/tree" | "/api/agent/new" | "/api/config" | "/api/files" | "/api/fs" | "/api/git" | "/api/github" | "/api/growth" | "/api/health" | "/api/models" | "/api/models/defaults" | "/api/pi-settings" | "/api/plugins" | "/api/prompts" | "/api/remote" | "/api/security" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/export" | "/api/sessions/import" | "/api/skills" | "/api/update" | "/api/version" | "/api/web-auth" | "/api/workspaces"
|
|
6
6
|
type PageRoutes = never
|
|
7
7
|
type LayoutRoutes = "/"
|
|
8
8
|
type RedirectRoutes = never
|
|
@@ -14,15 +14,18 @@ interface ParamMap {
|
|
|
14
14
|
"/": {}
|
|
15
15
|
"/api/agent/[id]": { "id": string; }
|
|
16
16
|
"/api/agent/[id]/events": { "id": string; }
|
|
17
|
+
"/api/agent/[id]/side-chat": { "id": string; }
|
|
17
18
|
"/api/agent/[id]/tree": { "id": string; }
|
|
18
19
|
"/api/agent/new": {}
|
|
19
20
|
"/api/config": {}
|
|
20
21
|
"/api/files": {}
|
|
21
22
|
"/api/fs": {}
|
|
22
23
|
"/api/git": {}
|
|
24
|
+
"/api/github": {}
|
|
23
25
|
"/api/growth": {}
|
|
24
26
|
"/api/health": {}
|
|
25
27
|
"/api/models": {}
|
|
28
|
+
"/api/models/defaults": {}
|
|
26
29
|
"/api/pi-settings": {}
|
|
27
30
|
"/api/plugins": {}
|
|
28
31
|
"/api/prompts": {}
|
package/.next/types/validator.ts
CHANGED
|
@@ -6,6 +6,11 @@ import type { AppRoutes, LayoutRoutes, ParamMap, AppRouteHandlerRoutes } from ".
|
|
|
6
6
|
import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
|
|
7
7
|
import type { NextRequest } from 'next/server.js'
|
|
8
8
|
|
|
9
|
+
type ParamMatchFragment<Route extends keyof ParamMap> = Partial<Record<keyof ParamMap[Route], string>>
|
|
10
|
+
type ParamMatchingExports<Route extends keyof ParamMap> =
|
|
11
|
+
| { unstable_paramMatching?: ParamMatchFragment<Route>; unstable_generateParamMatching?: never }
|
|
12
|
+
| { unstable_paramMatching?: never; unstable_generateParamMatching?: () => Promise<ParamMatchFragment<Route>> | ParamMatchFragment<Route> }
|
|
13
|
+
|
|
9
14
|
type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
|
|
10
15
|
default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
11
16
|
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
|
@@ -19,7 +24,7 @@ type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
|
|
|
19
24
|
) => Promise<any> | any
|
|
20
25
|
metadata?: any
|
|
21
26
|
viewport?: any
|
|
22
|
-
}
|
|
27
|
+
} & ParamMatchingExports<Route>
|
|
23
28
|
|
|
24
29
|
type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
|
|
25
30
|
default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
@@ -34,7 +39,7 @@ type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
|
|
|
34
39
|
) => Promise<any> | any
|
|
35
40
|
metadata?: any
|
|
36
41
|
viewport?: any
|
|
37
|
-
}
|
|
42
|
+
} & ParamMatchingExports<Route>
|
|
38
43
|
|
|
39
44
|
type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
|
|
40
45
|
GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
@@ -52,6 +57,14 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
52
57
|
type __IsExpected<Specific extends AppPageConfig<"/login">> = Specific
|
|
53
58
|
const handler = {} as typeof import("../../src/app/login/page.js")
|
|
54
59
|
type __Check = __IsExpected<typeof handler>
|
|
60
|
+
|
|
61
|
+
type __ParamMatchingValue =
|
|
62
|
+
typeof handler extends { unstable_paramMatching: infer Matcher } ? Matcher :
|
|
63
|
+
typeof handler extends { unstable_generateParamMatching: (...args: any[]) => infer Matcher } ? Awaited<Matcher> : {}
|
|
64
|
+
type __InvalidParamMatchingKeys = Exclude<keyof __ParamMatchingValue, keyof ParamMap["/login"]>
|
|
65
|
+
type __AssertNoInvalidParamMatchingKeys<Invalid extends never> = Invalid
|
|
66
|
+
const __paramMatchingKeyCheck: __AssertNoInvalidParamMatchingKeys<__InvalidParamMatchingKeys> | undefined = undefined
|
|
67
|
+
void __paramMatchingKeyCheck
|
|
55
68
|
// @ts-ignore
|
|
56
69
|
type __Unused = __Check
|
|
57
70
|
}
|
|
@@ -61,6 +74,14 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
61
74
|
type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
|
|
62
75
|
const handler = {} as typeof import("../../src/app/page.js")
|
|
63
76
|
type __Check = __IsExpected<typeof handler>
|
|
77
|
+
|
|
78
|
+
type __ParamMatchingValue =
|
|
79
|
+
typeof handler extends { unstable_paramMatching: infer Matcher } ? Matcher :
|
|
80
|
+
typeof handler extends { unstable_generateParamMatching: (...args: any[]) => infer Matcher } ? Awaited<Matcher> : {}
|
|
81
|
+
type __InvalidParamMatchingKeys = Exclude<keyof __ParamMatchingValue, keyof ParamMap["/"]>
|
|
82
|
+
type __AssertNoInvalidParamMatchingKeys<Invalid extends never> = Invalid
|
|
83
|
+
const __paramMatchingKeyCheck: __AssertNoInvalidParamMatchingKeys<__InvalidParamMatchingKeys> | undefined = undefined
|
|
84
|
+
void __paramMatchingKeyCheck
|
|
64
85
|
// @ts-ignore
|
|
65
86
|
type __Unused = __Check
|
|
66
87
|
}
|
|
@@ -70,6 +91,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
70
91
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]/events">> = Specific
|
|
71
92
|
const handler = {} as typeof import("../../src/app/api/agent/[id]/events/route.js")
|
|
72
93
|
type __Check = __IsExpected<typeof handler>
|
|
94
|
+
|
|
73
95
|
// @ts-ignore
|
|
74
96
|
type __Unused = __Check
|
|
75
97
|
}
|
|
@@ -79,6 +101,17 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
79
101
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]">> = Specific
|
|
80
102
|
const handler = {} as typeof import("../../src/app/api/agent/[id]/route.js")
|
|
81
103
|
type __Check = __IsExpected<typeof handler>
|
|
104
|
+
|
|
105
|
+
// @ts-ignore
|
|
106
|
+
type __Unused = __Check
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Validate ../../src/app/api/agent/[id]/side-chat/route.ts
|
|
110
|
+
{
|
|
111
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]/side-chat">> = Specific
|
|
112
|
+
const handler = {} as typeof import("../../src/app/api/agent/[id]/side-chat/route.js")
|
|
113
|
+
type __Check = __IsExpected<typeof handler>
|
|
114
|
+
|
|
82
115
|
// @ts-ignore
|
|
83
116
|
type __Unused = __Check
|
|
84
117
|
}
|
|
@@ -88,6 +121,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
88
121
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]/tree">> = Specific
|
|
89
122
|
const handler = {} as typeof import("../../src/app/api/agent/[id]/tree/route.js")
|
|
90
123
|
type __Check = __IsExpected<typeof handler>
|
|
124
|
+
|
|
91
125
|
// @ts-ignore
|
|
92
126
|
type __Unused = __Check
|
|
93
127
|
}
|
|
@@ -97,6 +131,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
97
131
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/new">> = Specific
|
|
98
132
|
const handler = {} as typeof import("../../src/app/api/agent/new/route.js")
|
|
99
133
|
type __Check = __IsExpected<typeof handler>
|
|
134
|
+
|
|
100
135
|
// @ts-ignore
|
|
101
136
|
type __Unused = __Check
|
|
102
137
|
}
|
|
@@ -106,6 +141,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
106
141
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/config">> = Specific
|
|
107
142
|
const handler = {} as typeof import("../../src/app/api/config/route.js")
|
|
108
143
|
type __Check = __IsExpected<typeof handler>
|
|
144
|
+
|
|
109
145
|
// @ts-ignore
|
|
110
146
|
type __Unused = __Check
|
|
111
147
|
}
|
|
@@ -115,6 +151,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
115
151
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/files">> = Specific
|
|
116
152
|
const handler = {} as typeof import("../../src/app/api/files/route.js")
|
|
117
153
|
type __Check = __IsExpected<typeof handler>
|
|
154
|
+
|
|
118
155
|
// @ts-ignore
|
|
119
156
|
type __Unused = __Check
|
|
120
157
|
}
|
|
@@ -124,6 +161,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
124
161
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/fs">> = Specific
|
|
125
162
|
const handler = {} as typeof import("../../src/app/api/fs/route.js")
|
|
126
163
|
type __Check = __IsExpected<typeof handler>
|
|
164
|
+
|
|
127
165
|
// @ts-ignore
|
|
128
166
|
type __Unused = __Check
|
|
129
167
|
}
|
|
@@ -133,6 +171,17 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
133
171
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/git">> = Specific
|
|
134
172
|
const handler = {} as typeof import("../../src/app/api/git/route.js")
|
|
135
173
|
type __Check = __IsExpected<typeof handler>
|
|
174
|
+
|
|
175
|
+
// @ts-ignore
|
|
176
|
+
type __Unused = __Check
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Validate ../../src/app/api/github/route.ts
|
|
180
|
+
{
|
|
181
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/github">> = Specific
|
|
182
|
+
const handler = {} as typeof import("../../src/app/api/github/route.js")
|
|
183
|
+
type __Check = __IsExpected<typeof handler>
|
|
184
|
+
|
|
136
185
|
// @ts-ignore
|
|
137
186
|
type __Unused = __Check
|
|
138
187
|
}
|
|
@@ -142,6 +191,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
142
191
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/growth">> = Specific
|
|
143
192
|
const handler = {} as typeof import("../../src/app/api/growth/route.js")
|
|
144
193
|
type __Check = __IsExpected<typeof handler>
|
|
194
|
+
|
|
145
195
|
// @ts-ignore
|
|
146
196
|
type __Unused = __Check
|
|
147
197
|
}
|
|
@@ -151,6 +201,17 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
151
201
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/health">> = Specific
|
|
152
202
|
const handler = {} as typeof import("../../src/app/api/health/route.js")
|
|
153
203
|
type __Check = __IsExpected<typeof handler>
|
|
204
|
+
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
type __Unused = __Check
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Validate ../../src/app/api/models/defaults/route.ts
|
|
210
|
+
{
|
|
211
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models/defaults">> = Specific
|
|
212
|
+
const handler = {} as typeof import("../../src/app/api/models/defaults/route.js")
|
|
213
|
+
type __Check = __IsExpected<typeof handler>
|
|
214
|
+
|
|
154
215
|
// @ts-ignore
|
|
155
216
|
type __Unused = __Check
|
|
156
217
|
}
|
|
@@ -160,6 +221,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
160
221
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models">> = Specific
|
|
161
222
|
const handler = {} as typeof import("../../src/app/api/models/route.js")
|
|
162
223
|
type __Check = __IsExpected<typeof handler>
|
|
224
|
+
|
|
163
225
|
// @ts-ignore
|
|
164
226
|
type __Unused = __Check
|
|
165
227
|
}
|
|
@@ -169,6 +231,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
169
231
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/pi-settings">> = Specific
|
|
170
232
|
const handler = {} as typeof import("../../src/app/api/pi-settings/route.js")
|
|
171
233
|
type __Check = __IsExpected<typeof handler>
|
|
234
|
+
|
|
172
235
|
// @ts-ignore
|
|
173
236
|
type __Unused = __Check
|
|
174
237
|
}
|
|
@@ -178,6 +241,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
178
241
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/plugins">> = Specific
|
|
179
242
|
const handler = {} as typeof import("../../src/app/api/plugins/route.js")
|
|
180
243
|
type __Check = __IsExpected<typeof handler>
|
|
244
|
+
|
|
181
245
|
// @ts-ignore
|
|
182
246
|
type __Unused = __Check
|
|
183
247
|
}
|
|
@@ -187,6 +251,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
187
251
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/prompts">> = Specific
|
|
188
252
|
const handler = {} as typeof import("../../src/app/api/prompts/route.js")
|
|
189
253
|
type __Check = __IsExpected<typeof handler>
|
|
254
|
+
|
|
190
255
|
// @ts-ignore
|
|
191
256
|
type __Unused = __Check
|
|
192
257
|
}
|
|
@@ -196,6 +261,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
196
261
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/remote">> = Specific
|
|
197
262
|
const handler = {} as typeof import("../../src/app/api/remote/route.js")
|
|
198
263
|
type __Check = __IsExpected<typeof handler>
|
|
264
|
+
|
|
199
265
|
// @ts-ignore
|
|
200
266
|
type __Unused = __Check
|
|
201
267
|
}
|
|
@@ -205,6 +271,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
205
271
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/security">> = Specific
|
|
206
272
|
const handler = {} as typeof import("../../src/app/api/security/route.js")
|
|
207
273
|
type __Check = __IsExpected<typeof handler>
|
|
274
|
+
|
|
208
275
|
// @ts-ignore
|
|
209
276
|
type __Unused = __Check
|
|
210
277
|
}
|
|
@@ -214,6 +281,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
214
281
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]/export">> = Specific
|
|
215
282
|
const handler = {} as typeof import("../../src/app/api/sessions/[id]/export/route.js")
|
|
216
283
|
type __Check = __IsExpected<typeof handler>
|
|
284
|
+
|
|
217
285
|
// @ts-ignore
|
|
218
286
|
type __Unused = __Check
|
|
219
287
|
}
|
|
@@ -223,6 +291,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
223
291
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]">> = Specific
|
|
224
292
|
const handler = {} as typeof import("../../src/app/api/sessions/[id]/route.js")
|
|
225
293
|
type __Check = __IsExpected<typeof handler>
|
|
294
|
+
|
|
226
295
|
// @ts-ignore
|
|
227
296
|
type __Unused = __Check
|
|
228
297
|
}
|
|
@@ -232,6 +301,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
232
301
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/import">> = Specific
|
|
233
302
|
const handler = {} as typeof import("../../src/app/api/sessions/import/route.js")
|
|
234
303
|
type __Check = __IsExpected<typeof handler>
|
|
304
|
+
|
|
235
305
|
// @ts-ignore
|
|
236
306
|
type __Unused = __Check
|
|
237
307
|
}
|
|
@@ -241,6 +311,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
241
311
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions">> = Specific
|
|
242
312
|
const handler = {} as typeof import("../../src/app/api/sessions/route.js")
|
|
243
313
|
type __Check = __IsExpected<typeof handler>
|
|
314
|
+
|
|
244
315
|
// @ts-ignore
|
|
245
316
|
type __Unused = __Check
|
|
246
317
|
}
|
|
@@ -250,6 +321,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
250
321
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills">> = Specific
|
|
251
322
|
const handler = {} as typeof import("../../src/app/api/skills/route.js")
|
|
252
323
|
type __Check = __IsExpected<typeof handler>
|
|
324
|
+
|
|
253
325
|
// @ts-ignore
|
|
254
326
|
type __Unused = __Check
|
|
255
327
|
}
|
|
@@ -259,6 +331,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
259
331
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/update">> = Specific
|
|
260
332
|
const handler = {} as typeof import("../../src/app/api/update/route.js")
|
|
261
333
|
type __Check = __IsExpected<typeof handler>
|
|
334
|
+
|
|
262
335
|
// @ts-ignore
|
|
263
336
|
type __Unused = __Check
|
|
264
337
|
}
|
|
@@ -268,6 +341,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
268
341
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/version">> = Specific
|
|
269
342
|
const handler = {} as typeof import("../../src/app/api/version/route.js")
|
|
270
343
|
type __Check = __IsExpected<typeof handler>
|
|
344
|
+
|
|
271
345
|
// @ts-ignore
|
|
272
346
|
type __Unused = __Check
|
|
273
347
|
}
|
|
@@ -277,6 +351,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
277
351
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/web-auth">> = Specific
|
|
278
352
|
const handler = {} as typeof import("../../src/app/api/web-auth/route.js")
|
|
279
353
|
type __Check = __IsExpected<typeof handler>
|
|
354
|
+
|
|
280
355
|
// @ts-ignore
|
|
281
356
|
type __Unused = __Check
|
|
282
357
|
}
|
|
@@ -286,6 +361,7 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
286
361
|
type __IsExpected<Specific extends RouteHandlerConfig<"/api/workspaces">> = Specific
|
|
287
362
|
const handler = {} as typeof import("../../src/app/api/workspaces/route.js")
|
|
288
363
|
type __Check = __IsExpected<typeof handler>
|
|
364
|
+
|
|
289
365
|
// @ts-ignore
|
|
290
366
|
type __Unused = __Check
|
|
291
367
|
}
|
|
@@ -299,6 +375,14 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
|
|
|
299
375
|
type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
|
|
300
376
|
const handler = {} as typeof import("../../src/app/layout.js")
|
|
301
377
|
type __Check = __IsExpected<typeof handler>
|
|
378
|
+
|
|
379
|
+
type __ParamMatchingValue =
|
|
380
|
+
typeof handler extends { unstable_paramMatching: infer Matcher } ? Matcher :
|
|
381
|
+
typeof handler extends { unstable_generateParamMatching: (...args: any[]) => infer Matcher } ? Awaited<Matcher> : {}
|
|
382
|
+
type __InvalidParamMatchingKeys = Exclude<keyof __ParamMatchingValue, keyof ParamMap["/"]>
|
|
383
|
+
type __AssertNoInvalidParamMatchingKeys<Invalid extends never> = Invalid
|
|
384
|
+
const __paramMatchingKeyCheck: __AssertNoInvalidParamMatchingKeys<__InvalidParamMatchingKeys> | undefined = undefined
|
|
385
|
+
void __paramMatchingKeyCheck
|
|
302
386
|
// @ts-ignore
|
|
303
387
|
type __Unused = __Check
|
|
304
388
|
}
|
package/next.config.ts
CHANGED
|
@@ -39,6 +39,8 @@ export default (phase: string): NextConfig => {
|
|
|
39
39
|
return {
|
|
40
40
|
// Keep dev output separate so `next build` cannot invalidate a running dev server.
|
|
41
41
|
distDir: buildDir,
|
|
42
|
+
// A global installation must not infer its tracing root from a lockfile in the user's home.
|
|
43
|
+
outputFileTracingRoot: process.cwd(),
|
|
42
44
|
typescript: buildDir.startsWith(".next-releases/") ? { tsconfigPath: ".next-releases/tsconfig.json" } : undefined,
|
|
43
45
|
// Webpack's dev chunk names are stable. A per-process prefix prevents an older
|
|
44
46
|
// browser cache entry from hydrating HTML emitted by a newer dev server.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rexvane/piweb",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Modern web UI for the pi coding agent, driven by the official pi SDK without modifying pi",
|
|
@@ -52,8 +52,14 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@automann/maple-mono-cn": "^7.9.2",
|
|
55
|
+
"@earendil-works/chord": "1.1.0",
|
|
56
|
+
"@earendil-works/pi-agent-core": "1.1.0",
|
|
55
57
|
"@earendil-works/pi-ai": "1.1.0",
|
|
58
|
+
"@earendil-works/pi-codemode": "1.1.0",
|
|
56
59
|
"@earendil-works/pi-coding-agent": "1.1.0",
|
|
60
|
+
"@earendil-works/pi-mcp": "1.1.0",
|
|
61
|
+
"@earendil-works/pi-telemetry": "1.1.0",
|
|
62
|
+
"@earendil-works/pi-tui": "1.1.0",
|
|
57
63
|
"@lobehub/icons-static-svg": "^1.95.0",
|
|
58
64
|
"@tailwindcss/postcss": "^4.2.2",
|
|
59
65
|
"@types/node": "^26",
|
|
@@ -62,7 +68,7 @@
|
|
|
62
68
|
"@types/react-dom": "^19",
|
|
63
69
|
"highlight.js": "^11.11.1",
|
|
64
70
|
"jsonc-parser": "3.3.1",
|
|
65
|
-
"next": "16.
|
|
71
|
+
"next": "16.4.0",
|
|
66
72
|
"postcss": "^8.5.26",
|
|
67
73
|
"proper-lockfile": "4.1.2",
|
|
68
74
|
"react": "^19.3.0",
|
package/scripts/release.mjs
CHANGED
|
@@ -7,6 +7,8 @@ import { pathToFileURL, fileURLToPath } from "node:url";
|
|
|
7
7
|
import { assertInstallation, assertLocalPath, readProductionBuild, resolveBuildOutput, RELEASES_DIR, RELEASE_MANIFEST } from "./build-output.mjs";
|
|
8
8
|
import { runCommand } from "./process-runner.mjs";
|
|
9
9
|
import { isMainModule } from "./entrypoint.mjs";
|
|
10
|
+
import { installPiRuntime, PI_PACKAGE } from "./runtime/pi-packages.mjs";
|
|
11
|
+
export { PI_PACKAGE, PI_AI_PACKAGE } from "./runtime/pi-packages.mjs";
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Root of the PiWeb installation this module belongs to.
|
|
@@ -92,9 +94,6 @@ export async function verifyReleaseConfig(root = process.cwd(), env = process.en
|
|
|
92
94
|
}
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
export const PI_PACKAGE = "@earendil-works/pi-coding-agent";
|
|
96
|
-
export const PI_AI_PACKAGE = "@earendil-works/pi-ai";
|
|
97
|
-
|
|
98
97
|
/**
|
|
99
98
|
* Shared by the UI and update:pi; called only after the building state is durable.
|
|
100
99
|
* @param {{root: string, env: Record<string, string | undefined>, run: typeof runCommand, signal?: AbortSignal}} context
|
|
@@ -102,10 +101,7 @@ export const PI_AI_PACKAGE = "@earendil-works/pi-ai";
|
|
|
102
101
|
* @returns {Promise<string>}
|
|
103
102
|
*/
|
|
104
103
|
export async function installPiUpdate({ root, env, run, signal }, assertIdle = async () => {}) {
|
|
105
|
-
await assertIdle
|
|
106
|
-
await run("npm", ["install", "--save-exact", `${PI_PACKAGE}@latest`, `${PI_AI_PACKAGE}@latest`, "--no-audit", "--no-fund"], {
|
|
107
|
-
cwd: root, env, timeoutMs: 600_000, signal,
|
|
108
|
-
});
|
|
104
|
+
await installPiRuntime({ root, env, run, signal }, { assertIdle });
|
|
109
105
|
await run("npm", ["run", "sync:provider-icons"], { cwd: root, env, timeoutMs: 60_000, signal });
|
|
110
106
|
const manifest = JSON.parse(await fs.readFile(path.join(root, "node_modules", PI_PACKAGE, "package.json"), "utf8"));
|
|
111
107
|
if (typeof manifest.version !== "string" || !manifest.version) throw new Error("Pi engine package version is missing");
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** Exercise the SDK and production startup inside the freshly installed artifact. */
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import http from "node:http";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import next from "next";
|
|
8
|
+
import { isMainModule } from "../entrypoint.mjs";
|
|
9
|
+
import { PI_RUNTIME_PACKAGES, verifyPiRuntimePins } from "./pi-packages.mjs";
|
|
10
|
+
|
|
11
|
+
export async function checkInstalledRuntime(root = process.cwd()) {
|
|
12
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
13
|
+
const version = verifyPiRuntimePins(manifest);
|
|
14
|
+
for (const name of PI_RUNTIME_PACKAGES) {
|
|
15
|
+
let dir = path.dirname(fileURLToPath(import.meta.resolve(name)));
|
|
16
|
+
while (!fs.existsSync(path.join(dir, "package.json"))) {
|
|
17
|
+
const parent = path.dirname(dir);
|
|
18
|
+
if (parent === dir) throw new Error("package.json missing: " + name);
|
|
19
|
+
dir = parent;
|
|
20
|
+
}
|
|
21
|
+
const actual = JSON.parse(fs.readFileSync(path.join(dir, "package.json"), "utf8")).version;
|
|
22
|
+
if (actual !== version) throw new Error(name + " resolved to " + actual + ", expected " + version);
|
|
23
|
+
}
|
|
24
|
+
await import("@earendil-works/pi-coding-agent");
|
|
25
|
+
await import("@earendil-works/pi-ai");
|
|
26
|
+
|
|
27
|
+
const app = next({ dev: false, dir: root });
|
|
28
|
+
const server = http.createServer(app.getRequestHandler());
|
|
29
|
+
const routes = ["/api/health", "/api/version", "/api/models", "/api/sessions", "/api/workspaces", "/api/pi-settings"];
|
|
30
|
+
try {
|
|
31
|
+
await app.prepare();
|
|
32
|
+
await new Promise((resolve, reject) => {
|
|
33
|
+
server.once("error", reject);
|
|
34
|
+
server.listen(0, "127.0.0.1", resolve);
|
|
35
|
+
});
|
|
36
|
+
const base = "http://127.0.0.1:" + server.address().port;
|
|
37
|
+
for (const route of routes) {
|
|
38
|
+
const response = await fetch(base + route, { signal: AbortSignal.timeout(30_000) });
|
|
39
|
+
const body = await response.json();
|
|
40
|
+
if (!response.ok || body.success !== true) {
|
|
41
|
+
throw new Error(route + " failed: " + response.status + " " + JSON.stringify(body));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const page = await fetch(base + "/", { signal: AbortSignal.timeout(30_000) });
|
|
45
|
+
if (!page.ok || !(page.headers.get("content-type") ?? "").includes("text/html") || (await page.text()).length < 500) {
|
|
46
|
+
throw new Error("production home page failed: " + page.status);
|
|
47
|
+
}
|
|
48
|
+
return { version, routes, homePage: true };
|
|
49
|
+
} finally {
|
|
50
|
+
if (server.listening) {
|
|
51
|
+
server.closeAllConnections();
|
|
52
|
+
await new Promise((resolve) => server.close(resolve));
|
|
53
|
+
}
|
|
54
|
+
await app.close();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (isMainModule(import.meta.url)) {
|
|
59
|
+
try {
|
|
60
|
+
console.log(JSON.stringify(await checkInstalledRuntime()));
|
|
61
|
+
process.exit(0);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.error(error);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** Pi's packages are released together and must resolve to the same runtime version. */
|
|
2
|
+
export const PI_PACKAGE = "@earendil-works/pi-coding-agent";
|
|
3
|
+
export const PI_AI_PACKAGE = "@earendil-works/pi-ai";
|
|
4
|
+
export const PI_RUNTIME_PACKAGES = Object.freeze([
|
|
5
|
+
PI_PACKAGE, PI_AI_PACKAGE,
|
|
6
|
+
"@earendil-works/pi-agent-core",
|
|
7
|
+
"@earendil-works/pi-codemode",
|
|
8
|
+
"@earendil-works/pi-mcp",
|
|
9
|
+
"@earendil-works/pi-telemetry",
|
|
10
|
+
"@earendil-works/pi-tui",
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
/** @param {string} version */
|
|
14
|
+
export function piRuntimeSpecs(version) {
|
|
15
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(version)) {
|
|
16
|
+
throw new Error("Pi runtime requires an exact version; received " + JSON.stringify(version));
|
|
17
|
+
}
|
|
18
|
+
return PI_RUNTIME_PACKAGES.map((name) => name + "@" + version);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The repository lockfile is not used when a user installs a published package. */
|
|
22
|
+
export function verifyPiRuntimePins(manifest) {
|
|
23
|
+
const version = manifest.dependencies?.[PI_PACKAGE];
|
|
24
|
+
piRuntimeSpecs(version);
|
|
25
|
+
for (const name of PI_RUNTIME_PACKAGES) {
|
|
26
|
+
if (manifest.dependencies?.[name] !== version) {
|
|
27
|
+
throw new Error("Pi runtime dependency " + name + " must be pinned to " + version
|
|
28
|
+
+ "; a published package can otherwise mix incompatible Pi versions");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return version;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the release once, then install every Pi package at that exact version.
|
|
36
|
+
* Separate @latest lookups can mix releases while upstream is publishing.
|
|
37
|
+
* @param {{root: string, env: Record<string, string | undefined>, run: typeof import("../process-runner.mjs").runCommand, signal?: AbortSignal}} context
|
|
38
|
+
* @param {{omitDev?: boolean, assertIdle?: () => Promise<void>}} [options]
|
|
39
|
+
*/
|
|
40
|
+
export async function installPiRuntime({ root, env, run, signal }, { omitDev = false, assertIdle = async () => {} } = {}) {
|
|
41
|
+
await assertIdle();
|
|
42
|
+
const version = (await run("npm", ["view", PI_PACKAGE + "@latest", "version"], {
|
|
43
|
+
cwd: root, env, timeoutMs: 30_000, signal,
|
|
44
|
+
})).trim();
|
|
45
|
+
const specs = piRuntimeSpecs(version);
|
|
46
|
+
await assertIdle();
|
|
47
|
+
await run("npm", ["install", "--save-exact", ...specs, ...(omitDev ? ["--omit=dev"] : []), "--no-audit", "--no-fund"], {
|
|
48
|
+
cwd: root, env, timeoutMs: 600_000, signal,
|
|
49
|
+
});
|
|
50
|
+
return version;
|
|
51
|
+
}
|