@baique/pi-web-sky 0.1.32 → 0.1.34
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 +17 -8
- package/.next/build-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +27 -6
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +70 -0
- package/.next/server/app/_global-error/page.js +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.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agent/[id]/bash-output/route.js +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js +31 -2
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
- package/.next/server/app/api/agent/[id]/route.js +30 -1
- package/.next/server/app/api/agent/[id]/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/agent/running/route.js +30 -1
- package/.next/server/app/api/agent/running/route.js.nft.json +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -30
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +3 -3
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -30
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/boards/[id]/canvas/route.js +1 -0
- package/.next/server/app/api/boards/[id]/canvas/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/canvas/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/edges/[eid]/route.js +1 -0
- package/.next/server/app/api/boards/[id]/edges/[eid]/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/edges/[eid]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/edges/route.js +1 -0
- package/.next/server/app/api/boards/[id]/edges/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/edges/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/nodes/[nid]/route.js +1 -0
- package/.next/server/app/api/boards/[id]/nodes/[nid]/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/nodes/[nid]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/nodes/route.js +1 -0
- package/.next/server/app/api/boards/[id]/nodes/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/nodes/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/[id]/route.js +1 -0
- package/.next/server/app/api/boards/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/reorder/route.js +1 -0
- package/.next/server/app/api/boards/reorder/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/reorder/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/boards/route.js +1 -0
- package/.next/server/app/api/boards/route.js.nft.json +1 -0
- package/.next/server/app/api/boards/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +2 -2
- package/.next/server/app/api/default-cwd/route.js +2 -2
- package/.next/server/app/api/file-index/route.js +2 -2
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/git/diff/route.js +1 -35
- package/.next/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next/server/app/api/git/status/route.js +1 -35
- package/.next/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/models/route.js +2 -2
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +2 -2
- package/.next/server/app/api/project-trust/route.js +30 -1
- package/.next/server/app/api/project-trust/route.js.nft.json +1 -1
- package/.next/server/app/api/quota/route.js +1 -1
- package/.next/server/app/api/search/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +31 -2
- package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +30 -1
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/export/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +30 -1
- package/.next/server/app/api/sessions/[id]/state/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js +30 -1
- package/.next/server/app/api/sessions/[id]/todos/route.js.nft.json +1 -1
- package/.next/server/app/api/sessions/route.js +30 -1
- package/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/board/route.js +1 -0
- package/.next/server/app/api/tasks/[id]/board/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/[id]/board/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/tasks/[id]/route.js +1 -1
- package/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/reorder/route.js +1 -30
- package/.next/server/app/api/tasks/reorder/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +1 -30
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/terminal/[id]/events/route.js +3 -3
- package/.next/server/app/api/terminal/[id]/route.js +2 -2
- package/.next/server/app/api/terminal/route.js +2 -2
- package/.next/server/app/api/worktrees/route.js +2 -2
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +8 -8
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +17 -8
- package/.next/server/chunks/2092.js +30 -0
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/402.js +1 -1
- package/.next/server/chunks/{3379.js → 5760.js} +1 -1
- package/.next/server/chunks/5794.js +35 -0
- package/.next/server/chunks/6429.js +1 -0
- package/.next/server/chunks/7513.js +1 -1
- package/.next/server/chunks/898.js +30 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/3178.73f47c1845fe51df.js +259 -0
- package/.next/static/chunks/3266.a491c09b3f6b57e6.js +1 -0
- package/.next/static/chunks/{3308.be8762955e7155d1.js → 3308.857c554428b3294e.js} +1 -1
- package/.next/static/chunks/3744.d362159c4d7b91f4.js +1 -0
- package/.next/static/chunks/54a60aa6.0e43cde7298ebcb7.js +78 -0
- package/.next/static/chunks/5518.79782f5b65bbefd6.js +1 -0
- package/.next/static/chunks/70e0d97a.337966195abe6fe0.js +1 -0
- package/.next/static/chunks/7268.7bf6d531e3905a52.js +1 -0
- package/.next/static/chunks/app/_global-error/page-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/canvas/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/edges/[eid]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/edges/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/nodes/[nid]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/nodes/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/[id]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/reorder/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/boards/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/home/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/models/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/quota/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/search/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/skills/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/board/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/tasks/[id]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/tasks/reorder/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/tasks/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/events/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/terminal/[id]/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/terminal/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/{layout-44c2a1db46fb38f3.js → layout-629d926928cb5e43.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/app/page-fca5ee35186517d3.js +89 -0
- package/.next/static/chunks/e3e7ddb2.a35db430b3564999.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9cbffd52890a7ee2.js +1 -0
- package/.next/static/chunks/webpack-a0d987c4f912a15f.js +1 -0
- package/.next/static/css/46396d55066d14af.css +1 -0
- package/.next/static/css/77c5948f82acf3c3.css +1 -0
- package/.next/static/css/80c818c5781fbadc.css +4 -0
- package/.next/static/rGUWWAqLz0cYSW8-IDVSA/_buildManifest.js +1 -0
- package/.next/trace +7 -7
- package/.next/trace-build +1 -1
- package/.next/types/app/api/boards/[id]/canvas/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/edges/[eid]/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/edges/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/nodes/[nid]/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/nodes/route.ts +353 -0
- package/.next/types/app/api/boards/[id]/route.ts +353 -0
- package/.next/types/app/api/boards/reorder/route.ts +353 -0
- package/.next/types/app/api/boards/route.ts +353 -0
- package/.next/types/app/api/tasks/[id]/board/route.ts +353 -0
- package/.next/types/routes.d.ts +10 -1
- package/.next/types/validator.ts +81 -0
- package/README.md +11 -0
- package/package.json +2 -1
- package/.next/server/chunks/1457.js +0 -30
- package/.next/static/chunks/3266.4c7192f2067645eb.js +0 -1
- package/.next/static/chunks/7268.236544be8e242c16.js +0 -1
- package/.next/static/chunks/app/_global-error/page-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/home/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/models/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/quota/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/search/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/todos/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/skills/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/tasks/[id]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/tasks/reorder/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/tasks/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/events/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/terminal/[id]/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/terminal/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/app/page-255f2073b07c4d6f.js +0 -89
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-11d96eed20d5efa5.js +0 -1
- package/.next/static/chunks/webpack-09241b8782696d25.js +0 -1
- package/.next/static/css/ad030894558ed286.css +0 -1
- package/.next/static/css/de7b7ffe9688501b.css +0 -1
- package/.next/static/qwmfKj7b5-4hr-C6kFkRA/_buildManifest.js +0 -1
- /package/.next/static/{qwmfKj7b5-4hr-C6kFkRA → rGUWWAqLz0cYSW8-IDVSA}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"39247":{"*":{"id":"55100","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"39247":{"*":{"id":"55100","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"57788":{"*":{"id":"19102","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"92152":{"*":{"id":"53245","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/wa/project/pi-web-sky/components/PwaRegistration.tsx":{"id":57788,"name":"*","chunks":["7177","static/chunks/app/layout-629d926928cb5e43.js"],"async":false},"/home/wa/project/pi-web-sky/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Noto_Sans_Mono\",\"arguments\":[{\"subsets\":[\"latin\",\"cyrillic\"],\"variable\":\"--font-noto-mono\",\"display\":\"swap\"}],\"variableName\":\"notoSansMono\"}":{"id":83683,"name":"*","chunks":["7177","static/chunks/app/layout-629d926928cb5e43.js"],"async":false},"/home/wa/project/pi-web-sky/node_modules/katex/dist/katex.min.css":{"id":84559,"name":"*","chunks":["7177","static/chunks/app/layout-629d926928cb5e43.js"],"async":false},"/home/wa/project/pi-web-sky/app/globals.css":{"id":66872,"name":"*","chunks":["7177","static/chunks/app/layout-629d926928cb5e43.js"],"async":false},"/home/wa/project/pi-web-sky/components/AppShell.tsx":{"id":92152,"name":"*","chunks":["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","5362","static/chunks/5362-7d57fb3b2e15c9a1.js","8974","static/chunks/app/page-fca5ee35186517d3.js"],"async":false},"/home/wa/project/pi-web-sky/hooks/useI18n.tsx":{"id":39247,"name":"*","chunks":["7330","static/chunks/d3ac728e-7964f816a1ca64e5.js","5362","static/chunks/5362-7d57fb3b2e15c9a1.js","8974","static/chunks/app/page-fca5ee35186517d3.js"],"async":false}},"entryCSSFiles":{"/home/wa/project/pi-web-sky/":[],"/home/wa/project/pi-web-sky/app/layout":[{"inlined":false,"path":"static/css/88714c00e109ce28.css"},{"inlined":false,"path":"static/css/77c5948f82acf3c3.css"}],"/home/wa/project/pi-web-sky/app/page":[{"inlined":false,"path":"static/css/46396d55066d14af.css"}]},"rscModuleMapping":{"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"39247":{"*":{"id":"73884","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"57788":{"*":{"id":"81276","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"66872":{"*":{"id":"82704","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"84559":{"*":{"id":"25319","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"92152":{"*":{"id":"35790","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -22,31 +22,40 @@
|
|
|
22
22
|
"/favicon.ico/route": "app/favicon.ico/route.js",
|
|
23
23
|
"/manifest.webmanifest/route": "app/manifest.webmanifest/route.js",
|
|
24
24
|
"/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
|
|
25
|
-
"/api/agent/new/route": "app/api/agent/new/route.js",
|
|
26
|
-
"/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
|
|
27
|
-
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
28
25
|
"/api/agent/running/route": "app/api/agent/running/route.js",
|
|
26
|
+
"/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
|
|
29
27
|
"/api/app-update/route": "app/api/app-update/route.js",
|
|
30
28
|
"/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
|
|
31
29
|
"/api/auth/providers/route": "app/api/auth/providers/route.js",
|
|
30
|
+
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
31
|
+
"/api/boards/[id]/canvas/route": "app/api/boards/[id]/canvas/route.js",
|
|
32
|
+
"/api/boards/[id]/edges/[eid]/route": "app/api/boards/[id]/edges/[eid]/route.js",
|
|
33
|
+
"/api/boards/[id]/edges/route": "app/api/boards/[id]/edges/route.js",
|
|
34
|
+
"/api/boards/[id]/nodes/[nid]/route": "app/api/boards/[id]/nodes/[nid]/route.js",
|
|
35
|
+
"/api/boards/[id]/nodes/route": "app/api/boards/[id]/nodes/route.js",
|
|
36
|
+
"/api/boards/[id]/route": "app/api/boards/[id]/route.js",
|
|
37
|
+
"/api/agent/new/route": "app/api/agent/new/route.js",
|
|
38
|
+
"/api/boards/reorder/route": "app/api/boards/reorder/route.js",
|
|
32
39
|
"/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
|
|
40
|
+
"/api/boards/route": "app/api/boards/route.js",
|
|
33
41
|
"/api/models-config/catalog/route": "app/api/models-config/catalog/route.js",
|
|
34
42
|
"/api/models-config/route": "app/api/models-config/route.js",
|
|
35
43
|
"/api/models-config/discover/route": "app/api/models-config/discover/route.js",
|
|
36
|
-
"/api/models-config/test/route": "app/api/models-config/test/route.js",
|
|
37
|
-
"/api/mcp/route": "app/api/mcp/route.js",
|
|
38
44
|
"/api/models/route": "app/api/models/route.js",
|
|
45
|
+
"/api/models-config/test/route": "app/api/models-config/test/route.js",
|
|
39
46
|
"/api/project-trust/route": "app/api/project-trust/route.js",
|
|
47
|
+
"/api/mcp/route": "app/api/mcp/route.js",
|
|
40
48
|
"/api/search/route": "app/api/search/route.js",
|
|
41
|
-
"/api/plugins/route": "app/api/plugins/route.js",
|
|
42
49
|
"/api/quota/route": "app/api/quota/route.js",
|
|
43
|
-
"/api/sessions/[id]/export/route": "app/api/sessions/[id]/export/route.js",
|
|
44
50
|
"/api/sessions/route": "app/api/sessions/route.js",
|
|
51
|
+
"/api/sessions/[id]/export/route": "app/api/sessions/[id]/export/route.js",
|
|
52
|
+
"/api/plugins/route": "app/api/plugins/route.js",
|
|
45
53
|
"/api/skills/check/route": "app/api/skills/check/route.js",
|
|
46
54
|
"/api/skills/install/route": "app/api/skills/install/route.js",
|
|
47
55
|
"/api/skills/route": "app/api/skills/route.js",
|
|
48
|
-
"/api/skills/update/route": "app/api/skills/update/route.js",
|
|
49
56
|
"/api/skills/search/route": "app/api/skills/search/route.js",
|
|
57
|
+
"/api/skills/update/route": "app/api/skills/update/route.js",
|
|
58
|
+
"/api/tasks/[id]/board/route": "app/api/tasks/[id]/board/route.js",
|
|
50
59
|
"/api/tasks/reorder/route": "app/api/tasks/reorder/route.js",
|
|
51
60
|
"/api/tasks/route": "app/api/tasks/route.js",
|
|
52
61
|
"/api/terminal/[id]/events/route": "app/api/terminal/[id]/events/route.js",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
exports.id=2092,exports.ids=[2092],exports.modules={6288:(a,b,c)=>{"use strict";c.d(b,{AC:()=>A,B_:()=>q,Ef:()=>n,FZ:()=>l,Lf:()=>z,NJ:()=>p,Nt:()=>D,PB:()=>r,R0:()=>v,WD:()=>t,bJ:()=>o,cV:()=>s,iu:()=>x,rN:()=>B,ss:()=>w,v$:()=>m,y1:()=>u});var d=c(55511),e=c(66737),f=c(71856);function g(a,b){return{id:a.id,projectKey:a.projectKey,name:a.name,isSystem:1===a.isSystem,taskId:a.taskId,sortOrder:a.sortOrder,created:a.created,updated:a.updated,nodeCount:b}}function h(a){return{id:a.id,boardId:a.boardId,kind:a.kind,refId:a.refId,x:a.x,y:a.y,w:a.w,h:a.h,expanded:1===a.expanded,props:function(a){try{let b=JSON.parse(a);return b&&"object"==typeof b&&!Array.isArray(b)?b:{}}catch{return{}}}(a.props),created:a.created,updated:a.updated}}function i(a){return{id:a.id,boardId:a.boardId,fromId:a.fromId,toId:a.toId,label:a.label,color:a.color,dashed:1===a.dashed,created:a.created,updated:a.updated}}function j(a){return(0,e.Lf)().prepare("SELECT COUNT(*) AS n FROM board_nodes WHERE board_id = ?").get(a).n}function k(a){return(0,e.Lf)().prepare("SELECT id, project_key AS projectKey, name, is_system AS isSystem, task_id AS taskId, sort_order AS sortOrder, created, updated FROM boards WHERE id = ?").get(a)}function l(){return{id:f.p,projectKey:"",name:"running",isSystem:!0,taskId:null,sortOrder:0,created:0,updated:0,nodeCount:0}}function m(a){if(a===f.p)return l();let b=k(a);return b?g(b,j(b.id)):void 0}function n(a){return(0,e.Lf)().prepare("SELECT id, project_key AS projectKey, name, is_system AS isSystem, task_id AS taskId, sort_order AS sortOrder, created, updated FROM boards WHERE project_key = ? ORDER BY sort_order, created, rowid").all(a).map(a=>g(a,j(a.id)))}function o(a,b){let c=(0,e.Lf)();if(0===b.length)return n(a);c.exec("BEGIN");try{let d=c.prepare("UPDATE boards SET sort_order = ?, updated = ? WHERE id = ? AND project_key = ?");b.forEach((b,c)=>{let e=d.run(c,Date.now(),b,a);if(0===e.changes)throw Error(`board ${b} does not belong to project ${a}`)}),c.exec("COMMIT")}catch(a){throw c.exec("ROLLBACK"),a}return n(a)}function p(a,b,c){let f=b.trim();if(!a)throw Error("projectKey is required");if(!f)throw Error("name must not be empty");let g=c??(0,d.randomUUID)(),h=Date.now(),i=(0,e.Lf)().prepare("SELECT MIN(sort_order) AS minOrder FROM boards WHERE project_key = ?").get(a),j=null===i.minOrder?0:i.minOrder-1;return(0,e.Lf)().prepare("INSERT INTO boards (id, project_key, name, is_system, task_id, sort_order, created, updated) VALUES (?, ?, ?, 0, ?, ?, ?, ?)").run(g,a,f,c??null,j,h,h),{id:g,projectKey:a,name:f,isSystem:!1,taskId:c??null,sortOrder:j,created:h,updated:h,nodeCount:0}}function q(a,b,c){let d=(0,e.Lf)().prepare("SELECT id, project_key AS projectKey, name, is_system AS isSystem, task_id AS taskId, sort_order AS sortOrder, created, updated FROM boards WHERE task_id = ?").get(a);return d?g(d,j(d.id)):p(b,c,a)}function r(a,b){if(a===f.p)return null;let c=b.trim();if(!c)throw Error("name must not be empty");let d=(0,e.Lf)(),h=k(a);if(!h)return null;let i=Date.now();return d.prepare("UPDATE boards SET name = ?, updated = ? WHERE id = ?").run(c,i,a),g({...h,name:c,updated:i},j(a))}function s(a){(0,e.Lf)().prepare("DELETE FROM board_nodes WHERE board_id = ?").run(a),(0,e.Lf)().prepare("DELETE FROM board_edges WHERE board_id = ?").run(a),(0,e.Lf)().prepare("DELETE FROM board_view WHERE board_id = ?").run(a),(0,e.Lf)().prepare("DELETE FROM boards WHERE id = ?").run(a)}function t(a){if(a===f.p)return!1;let b=(0,e.Lf)();if(!k(a))return!1;b.exec("BEGIN");try{s(a),b.exec("COMMIT")}catch(a){throw b.exec("ROLLBACK"),a}return!0}function u(a,b){(0,e.Lf)().prepare("UPDATE boards SET name = ?, updated = ? WHERE task_id = ?").run(b,Date.now(),a)}function v(a){let b=m(a);if(!b)return null;let c=(0,e.Lf)().prepare("SELECT id, board_id AS boardId, kind, ref_id AS refId, x, y, w, h, expanded, props, created, updated FROM board_nodes WHERE board_id = ? ORDER BY created, rowid").all(a),d=(0,e.Lf)().prepare("SELECT id, board_id AS boardId, from_id AS fromId, to_id AS toId, label, color, dashed, created, updated FROM board_edges WHERE board_id = ? ORDER BY created, rowid").all(a),f=(0,e.Lf)().prepare("SELECT board_id AS boardId, camera_x AS cameraX, camera_y AS cameraY, camera_z AS cameraZ, updated FROM board_view WHERE board_id = ?").get(a);return{board:b,nodes:c.map(h),edges:d.map(i),view:f?{boardId:f.boardId,cameraX:f.cameraX,cameraY:f.cameraY,cameraZ:f.cameraZ,updated:f.updated}:null}}function w(a,b,c){if(a===f.p)return!1;let d=(0,e.Lf)(),g=k(a);if(!g)return!1;if(c?.baseUpdated!==void 0&&c.baseUpdated!==g.updated)return"conflict";if(!c?.allowEmpty&&void 0!==b.nodes&&0===b.nodes.length&&d.prepare("SELECT COUNT(*) c FROM board_nodes WHERE board_id = ?").get(a).c>0)return"empty-overwrite";let h=Date.now();d.exec("BEGIN");try{if(b.nodes){d.prepare("DELETE FROM board_nodes WHERE board_id = ?").run(a);let c=d.prepare("INSERT INTO board_nodes (id, board_id, kind, ref_id, x, y, w, h, expanded, props, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let d of b.nodes)c.run(d.id,a,d.kind,d.refId,d.x,d.y,d.w,d.h,+!!d.expanded,JSON.stringify(d.props??{}),d.created||h,h)}if(b.edges){d.prepare("DELETE FROM board_edges WHERE board_id = ?").run(a);let c=d.prepare("INSERT INTO board_edges (id, board_id, from_id, to_id, label, color, dashed, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let d of b.edges)c.run(d.id,a,d.fromId,d.toId,d.label??null,d.color??null,+!!d.dashed,d.created||h,h)}void 0!==b.view&&(d.prepare("DELETE FROM board_view WHERE board_id = ?").run(a),b.view&&d.prepare("INSERT INTO board_view (board_id, camera_x, camera_y, camera_z, updated) VALUES (?, ?, ?, ?, ?)").run(a,b.view.cameraX??0,b.view.cameraY??0,b.view.cameraZ??1,h)),d.prepare("UPDATE boards SET updated = ? WHERE id = ?").run(h,a),d.exec("COMMIT")}catch(a){throw d.exec("ROLLBACK"),a}return!0}function x(a,b){if(a===f.p||!k(a))return null;let c=(0,d.randomUUID)(),g=Date.now();return(0,e.Lf)().prepare("INSERT INTO board_nodes (id, board_id, kind, ref_id, x, y, w, h, expanded, props, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)").run(c,a,b.kind??"session",b.refId??null,b.x,b.y,b.w??0,b.h??0,+!!b.expanded,JSON.stringify(b.props??{}),g,g),(0,e.Lf)().prepare("UPDATE boards SET updated = ? WHERE id = ?").run(g,a),y(a,c)??null}function y(a,b){let c=(0,e.Lf)().prepare("SELECT id, board_id AS boardId, kind, ref_id AS refId, x, y, w, h, expanded, props, created, updated FROM board_nodes WHERE board_id = ? AND id = ?").get(a,b);return c?h(c):void 0}function z(a,b,c){if(a===f.p)return null;let d=(0,e.Lf)(),g=y(a,b);if(!g)return null;let h=Date.now(),i={x:c.x??g.x,y:c.y??g.y,w:c.w??g.w,h:c.h??g.h,expanded:c.expanded??g.expanded,props:void 0!==c.props?{...g.props,...c.props}:g.props};return d.prepare("UPDATE board_nodes SET x = ?, y = ?, w = ?, h = ?, expanded = ?, props = ?, updated = ? WHERE board_id = ? AND id = ?").run(i.x,i.y,i.w,i.h,+!!i.expanded,JSON.stringify(i.props),h,a,b),d.prepare("UPDATE boards SET updated = ? WHERE id = ?").run(h,a),y(a,b)}function A(a,b){if(a===f.p)return!1;let c=(0,e.Lf)();if(!y(a,b))return!1;let d=Date.now();c.exec("BEGIN");try{c.prepare("DELETE FROM board_edges WHERE board_id = ? AND (from_id = ? OR to_id = ?)").run(a,b,b),c.prepare("DELETE FROM board_nodes WHERE board_id = ? AND id = ?").run(a,b),c.prepare("UPDATE boards SET updated = ? WHERE id = ?").run(d,a),c.exec("COMMIT")}catch(a){throw c.exec("ROLLBACK"),a}return!0}function B(a,b){if(a===f.p||!k(a))return null;let c=(0,e.Lf)(),g=y(a,b.fromId),h=y(a,b.toId);if(!g||!h||b.fromId===b.toId)return null;let i=(0,d.randomUUID)(),j=Date.now();return c.prepare("INSERT INTO board_edges (id, board_id, from_id, to_id, label, color, dashed, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)").run(i,a,b.fromId,b.toId,b.label??null,b.color??null,+!!b.dashed,j,j),c.prepare("UPDATE boards SET updated = ? WHERE id = ?").run(j,a),C(a,i)??null}function C(a,b){let c=(0,e.Lf)().prepare("SELECT id, board_id AS boardId, from_id AS fromId, to_id AS toId, label, color, dashed, created, updated FROM board_edges WHERE board_id = ? AND id = ?").get(a,b);return c?i(c):void 0}function D(a,b){if(a===f.p)return!1;let c=(0,e.Lf)();if(!C(a,b))return!1;let d=Date.now();return c.prepare("DELETE FROM board_edges WHERE board_id = ? AND id = ?").run(a,b),c.prepare("UPDATE boards SET updated = ? WHERE id = ?").run(d,a),!0}},66737:(a,b,c)=>{"use strict";c.d(b,{Lf:()=>g});var d=c(80099),e=c(21820),f=c(33873);function g(){var a;if(globalThis.__piWebDb)return globalThis.__piWebDb;let b=new d.DatabaseSync((0,f.join)(function(){let a=process.env.PI_CODING_AGENT_DIR;if(a){let b=a.startsWith("~")?(0,f.join)((0,e.homedir)(),a.slice(1)):a;return(0,f.normalize)(b)}return(0,f.join)((0,e.homedir)(),".pi","agent")}(),"pi-web.db"));return b.exec("PRAGMA journal_mode = WAL;"),b.exec("PRAGMA foreign_keys = ON;"),(a=b).exec(`
|
|
2
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
3
|
+
id TEXT PRIMARY KEY,
|
|
4
|
+
project_key TEXT NOT NULL,
|
|
5
|
+
name TEXT NOT NULL,
|
|
6
|
+
created INTEGER NOT NULL,
|
|
7
|
+
updated INTEGER NOT NULL
|
|
8
|
+
);
|
|
9
|
+
CREATE INDEX IF NOT EXISTS idx_tasks_project ON tasks(project_key);
|
|
10
|
+
|
|
11
|
+
CREATE TABLE IF NOT EXISTS session_meta (
|
|
12
|
+
session_id TEXT PRIMARY KEY,
|
|
13
|
+
task_id TEXT,
|
|
14
|
+
updated INTEGER NOT NULL
|
|
15
|
+
);
|
|
16
|
+
CREATE INDEX IF NOT EXISTS idx_meta_task ON session_meta(task_id);
|
|
17
|
+
|
|
18
|
+
CREATE TABLE IF NOT EXISTS search_state (
|
|
19
|
+
session_id TEXT PRIMARY KEY,
|
|
20
|
+
mtime TEXT NOT NULL,
|
|
21
|
+
title TEXT NOT NULL
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS session_search USING fts5(
|
|
25
|
+
session_id UNINDEXED,
|
|
26
|
+
title,
|
|
27
|
+
body,
|
|
28
|
+
tokenize = 'trigram'
|
|
29
|
+
);
|
|
30
|
+
`),function(a){let b=a.prepare("PRAGMA user_version").get().user_version;for(let c of h)if(!(c.version<=b)){a.exec("BEGIN");try{for(let b of c.statements)try{a.exec(b)}catch(b){let a=b instanceof Error?b.message:String(b);if(!/duplicate column name/i.test(a))throw b}a.exec(`PRAGMA user_version = ${c.version}`),a.exec("COMMIT"),b=c.version}catch(b){throw a.exec("ROLLBACK"),b}}}(a),globalThis.__piWebDb=b,b}let h=[{version:1,name:"pinned columns",statements:["ALTER TABLE tasks ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;","ALTER TABLE session_meta ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;"]},{version:2,name:"tasks.sort_order",statements:["ALTER TABLE tasks ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:3,name:"session boards",statements:["CREATE TABLE IF NOT EXISTS boards (\n id TEXT PRIMARY KEY,\n project_key TEXT NOT NULL,\n name TEXT NOT NULL,\n is_system INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_boards_project ON boards(project_key);","CREATE TABLE IF NOT EXISTS board_nodes (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n kind TEXT NOT NULL,\n ref_id TEXT,\n x REAL NOT NULL,\n y REAL NOT NULL,\n w REAL NOT NULL DEFAULT 0,\n h REAL NOT NULL DEFAULT 0,\n expanded INTEGER NOT NULL DEFAULT 0,\n props TEXT NOT NULL DEFAULT '{}',\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_nodes_board ON board_nodes(board_id);","CREATE TABLE IF NOT EXISTS board_edges (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n from_id TEXT NOT NULL,\n to_id TEXT NOT NULL,\n label TEXT,\n color TEXT,\n dashed INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_edges_board ON board_edges(board_id);","CREATE TABLE IF NOT EXISTS board_view (\n board_id TEXT PRIMARY KEY,\n camera_x REAL NOT NULL DEFAULT 0,\n camera_y REAL NOT NULL DEFAULT 0,\n camera_z REAL NOT NULL DEFAULT 1,\n updated INTEGER NOT NULL\n);"]},{version:4,name:"boards.sort_order",statements:["ALTER TABLE boards ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:5,name:"boards.task_id",statements:["ALTER TABLE boards ADD COLUMN task_id TEXT NULL;","CREATE INDEX IF NOT EXISTS idx_boards_task ON boards(task_id);"]}]},71856:(a,b,c)=>{"use strict";c.d(b,{p:()=>d});let d="__running__"},78335:()=>{},96487:()=>{}};
|
|
@@ -27,4 +27,4 @@ exports.id=2404,exports.ids=[2404],exports.modules={19225:(a,b,c)=>{"use strict"
|
|
|
27
27
|
body,
|
|
28
28
|
tokenize = 'trigram'
|
|
29
29
|
);
|
|
30
|
-
`),function(a){let b=a.prepare("PRAGMA user_version").get().user_version;for(let c of h)if(!(c.version<=b)){a.exec("BEGIN");try{for(let b of c.statements)try{a.exec(b)}catch(b){let a=b instanceof Error?b.message:String(b);if(!/duplicate column name/i.test(a))throw b}a.exec(`PRAGMA user_version = ${c.version}`),a.exec("COMMIT"),b=c.version}catch(b){throw a.exec("ROLLBACK"),b}}}(a),globalThis.__piWebDb=b,b}let h=[{version:1,name:"pinned columns",statements:["ALTER TABLE tasks ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;","ALTER TABLE session_meta ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;"]},{version:2,name:"tasks.sort_order",statements:["ALTER TABLE tasks ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]}]},72498:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Fk:()=>i,Y1:()=>g,er:()=>h});var e=c(75430),f=a([e]);function g(a,b){if(!(a&&(0,e.hasTrustRequiringProjectResources)(a)))return{requiresTrust:!1,trusted:!0};let c=new e.ProjectTrustStore(b);return{requiresTrust:!0,trusted:!0===c.get(a)}}function h(a,b){let c=g(a,b);return c.requiresTrust?(new e.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0}):c}function i(a,b){if(!g(a,b).requiresTrust)return;let c=new e.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},78335:()=>{},80547:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>l.uK,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.listAllSessions)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},82536:(a,b,c)=>{"use strict";c.d(b,{o:()=>h,x:()=>i});var d=c(29021),e=c(33873),f=c.n(e),g=c(58864);function h(a,b){for(let c of b){let b=(0,g.uK)(a)||(0,g.uK)(c),d=b?f().win32:f(),e=b?"\\":f().sep,h=d.resolve(a),i=d.resolve(c),j=b?h.toLowerCase():h,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return h(c,e)}},89950:(a,b,c)=>{"use strict";c.d(b,{l:()=>h,z:()=>g});let d=new Set(["models_json_key","models_json_command"]),e={"openai-codex":"ChatGPT Plus/Pro","github-copilot":"GitHub Copilot"};function f(a){let b=new Set,c=[];for(let d of a)b.has(d.id)||(b.add(d.id),c.push(d));return c}function g(a){let b=[];for(let c of f(a)){if(!c.hasApiKeyLogin||c.status.source&&d.has(c.status.source))continue;let a=c.status.configured&&"oauth"!==c.credentialType;b.push({id:c.id,displayName:c.name,configured:a,...a&&c.status.source?{source:c.status.source}:{},modelCount:c.modelCount,supportsOAuth:c.hasOAuth})}return b}function h(a){let b=[];for(let c of f(a))c.hasOAuth&&b.push({id:c.id,name:e[c.id]??c.oauthName??c.name,usesCallbackServer:!1,loggedIn:"oauth"===c.credentialType,supportsApiKey:c.hasApiKeyLogin});return b}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
|
|
30
|
+
`),function(a){let b=a.prepare("PRAGMA user_version").get().user_version;for(let c of h)if(!(c.version<=b)){a.exec("BEGIN");try{for(let b of c.statements)try{a.exec(b)}catch(b){let a=b instanceof Error?b.message:String(b);if(!/duplicate column name/i.test(a))throw b}a.exec(`PRAGMA user_version = ${c.version}`),a.exec("COMMIT"),b=c.version}catch(b){throw a.exec("ROLLBACK"),b}}}(a),globalThis.__piWebDb=b,b}let h=[{version:1,name:"pinned columns",statements:["ALTER TABLE tasks ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;","ALTER TABLE session_meta ADD COLUMN pinned INTEGER NOT NULL DEFAULT 0;"]},{version:2,name:"tasks.sort_order",statements:["ALTER TABLE tasks ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:3,name:"session boards",statements:["CREATE TABLE IF NOT EXISTS boards (\n id TEXT PRIMARY KEY,\n project_key TEXT NOT NULL,\n name TEXT NOT NULL,\n is_system INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_boards_project ON boards(project_key);","CREATE TABLE IF NOT EXISTS board_nodes (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n kind TEXT NOT NULL,\n ref_id TEXT,\n x REAL NOT NULL,\n y REAL NOT NULL,\n w REAL NOT NULL DEFAULT 0,\n h REAL NOT NULL DEFAULT 0,\n expanded INTEGER NOT NULL DEFAULT 0,\n props TEXT NOT NULL DEFAULT '{}',\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_nodes_board ON board_nodes(board_id);","CREATE TABLE IF NOT EXISTS board_edges (\n id TEXT PRIMARY KEY,\n board_id TEXT NOT NULL,\n from_id TEXT NOT NULL,\n to_id TEXT NOT NULL,\n label TEXT,\n color TEXT,\n dashed INTEGER NOT NULL DEFAULT 0,\n created INTEGER NOT NULL,\n updated INTEGER NOT NULL\n);","CREATE INDEX IF NOT EXISTS idx_board_edges_board ON board_edges(board_id);","CREATE TABLE IF NOT EXISTS board_view (\n board_id TEXT PRIMARY KEY,\n camera_x REAL NOT NULL DEFAULT 0,\n camera_y REAL NOT NULL DEFAULT 0,\n camera_z REAL NOT NULL DEFAULT 1,\n updated INTEGER NOT NULL\n);"]},{version:4,name:"boards.sort_order",statements:["ALTER TABLE boards ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0;"]},{version:5,name:"boards.task_id",statements:["ALTER TABLE boards ADD COLUMN task_id TEXT NULL;","CREATE INDEX IF NOT EXISTS idx_boards_task ON boards(task_id);"]}]},72498:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Fk:()=>i,Y1:()=>g,er:()=>h});var e=c(75430),f=a([e]);function g(a,b){if(!(a&&(0,e.hasTrustRequiringProjectResources)(a)))return{requiresTrust:!1,trusted:!0};let c=new e.ProjectTrustStore(b);return{requiresTrust:!0,trusted:!0===c.get(a)}}function h(a,b){let c=g(a,b);return c.requiresTrust?(new e.ProjectTrustStore(b).set(a,!0),{requiresTrust:!0,trusted:!0}):c}function i(a,b){if(!g(a,b).requiresTrust)return;let c=new e.ProjectTrustStore(b);return{resolveProjectTrust:async()=>!0===c.get(a)}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},78335:()=>{},80547:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>l.uK,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=c(58864),m=a([k]);async function n(){let a=Date.now(),b=globalThis.__piAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.listAllSessions)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__piAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){return(0,j.o)(a,b)}function p(a,b){return(0,j.x)(a,b)}k=(m.then?(await m)():m)[0],d()}catch(a){d(a)}})},82536:(a,b,c)=>{"use strict";c.d(b,{o:()=>h,x:()=>i});var d=c(29021),e=c(33873),f=c.n(e),g=c(58864);function h(a,b){for(let c of b){let b=(0,g.uK)(a)||(0,g.uK)(c),d=b?f().win32:f(),e=b?"\\":f().sep,h=d.resolve(a),i=d.resolve(c),j=b?h.toLowerCase():h,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return h(c,e)}},89950:(a,b,c)=>{"use strict";c.d(b,{l:()=>h,z:()=>g});let d=new Set(["models_json_key","models_json_command"]),e={"openai-codex":"ChatGPT Plus/Pro","github-copilot":"GitHub Copilot"};function f(a){let b=new Set,c=[];for(let d of a)b.has(d.id)||(b.add(d.id),c.push(d));return c}function g(a){let b=[];for(let c of f(a)){if(!c.hasApiKeyLogin||c.status.source&&d.has(c.status.source))continue;let a=c.status.configured&&"oauth"!==c.credentialType;b.push({id:c.id,displayName:c.name,configured:a,...a&&c.status.source?{source:c.status.source}:{},modelCount:c.modelCount,supportsOAuth:c.hasOAuth})}return b}function h(a){let b=[];for(let c of f(a))c.hasOAuth&&b.push({id:c.id,name:e[c.id]??c.oauthName??c.name,usesCallbackServer:!1,loggedIn:"oauth"===c.credentialType,supportsApiKey:c.hasApiKeyLogin});return b}},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";exports.id=402,exports.ids=[402],exports.modules={12039:(a,b,c)=>{function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return function(a,b={}){if("assistant"!==a.role)return a;let c=a.content;if(!Array.isArray(c))return a;let e=c.map(a=>(function(a,b={}){if(!d(a)||"toolCall"!==a.type)return null;let c={type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input},e=b.includeStreamingRawInput?function(a){if("string"==typeof a.rawInput)return a.rawInput;if("string"==typeof a.partialJson)return a.partialJson;if("string"==typeof a.partialArgs)return a.partialArgs;let b=d(a.customInput)?a.customInput:null,c=b&&"string"==typeof b.property?b.property:null,e=d(a.arguments)?a.arguments:null;return c&&e&&"string"==typeof e[c]?e[c]:void 0}(a):void 0;return void 0===e?c:{...c,rawInput:e}})(a,b)??a);return{...a,content:e}}(a)}c.d(b,{B:()=>e})},24923:(a,b,c)=>{c.d(b,{IL:()=>t,KI:()=>n,P9:()=>p,l:()=>s,xw:()=>r});var d=c(79646),e=c(29021),f=c(33873),g=c(28354),h=c(25252),i=c(58864);let j=(0,g.promisify)(d.execFile);function k(){globalThis.__piProjectCache?.clear()}async function l(a,b){let{stdout:c}=await j("git",["-C",a,...b],{timeout:1e4,maxBuffer:1048576,env:{...process.env,LC_ALL:"C"}});return c.trim()}function m(a){try{return(0,e.realpathSync)(a)}catch{return a}}async function n(a){let b,c=(globalThis.__piProjectCache||(globalThis.__piProjectCache=new Map),globalThis.__piProjectCache),d=c.get(a);if(d&&d.expiresAt>Date.now())return d.info;try{if(!(0,e.existsSync)(a))return b=function(a){let b=(0,f.dirname)(a);if(!b.endsWith("-worktrees"))return null;let c=b.slice(0,-10);return c&&(0,e.existsSync)((0,f.join)(c,".git"))?{projectRoot:m(c),branch:(0,f.basename)(a),isWorktree:!0,isTopLevel:!0}:null}(a)??{projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1},c.set(a,{info:b,expiresAt:Date.now()+6e4}),b;let[d,g,h,j]=(await l(a,["rev-parse","--path-format=absolute","--git-common-dir","--git-dir","--show-toplevel","--abbrev-ref","HEAD"])).split("\n").map(a=>a.trim()),[k,n,o]=[d,g,h].map(i.gB),p=m(a),q=(0,i.Eb)(o,p),r=!(0,i.Eb)(n,k)&&q,s=r?(0,f.dirname)(k):o;b={projectRoot:q?m(s):a,branch:j&&"HEAD"!==j?j:null,isWorktree:r,isTopLevel:q}}catch{b={projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1}}return c.set(a,{info:b,expiresAt:Date.now()+6e4}),b}async function o(a){let b=await l(a,["rev-parse","--path-format=absolute","--git-common-dir"]);return m((0,f.dirname)((0,i.gB)(b)))}async function p(a){let b=await l(a,["worktree","list","--porcelain"]),c=[],d=null,f=()=>{d?.path&&!d.prunable&&(0,e.existsSync)(d.path)&&c.push({path:d.path,branch:d.branch??null,isMain:0===c.length}),d=null};for(let a of b.split("\n"))a.startsWith("worktree ")?(f(),d={path:(0,i.gB)(a.slice(9).trim())}):a.startsWith("branch ")&&d?d.branch=a.slice(7).trim().replace(/^refs\/heads\//,""):a.startsWith("prunable")&&d?d.prunable=!0:""===a.trim()&&f();return f(),c}function q(a,b){return a.find(a=>(0,i.Eb)(a.path,b))}function r(a,b){return q(a,m(b))?.path??null}async function s(a,b){let c=b.trim();if(!c)throw Error("Branch name is required");let d=c.replace(/[\/\\:*?"<>|\s]+/g,"-").replace(/^-+|-+$/g,"");if(!d)throw Error(`Invalid branch name: ${b}`);let g=await o(a),i=`${(0,f.resolve)(g)}-worktrees`,j=(0,f.join)(i,d);if((0,e.existsSync)(j))throw Error(`Directory already exists: ${j}`);(0,e.mkdirSync)(i,{recursive:!0});let m=!1;try{await l(g,["rev-parse","--verify","--quiet",`refs/heads/${c}`]),m=!0}catch{m=!1}try{m?await l(g,["worktree","add","--",j,c]):await l(g,["worktree","add","-b",c,"--",j])}catch(a){throw Error(u(a))}return(0,h.wz)(j),k(),{path:j,branch:c}}async function t(a,b,c=!1){let d=q(await p(a),b);if(!d)throw Error(`Not a worktree of this repository: ${b}`);if(d.isMain)throw Error("Cannot remove the main worktree");try{await l(a,["worktree","remove",...c?["--force"]:[],d.path])}catch(a){throw Error(u(a))}k()}function u(a){let b=a.stderr;return"string"==typeof b&&b.trim()?b.trim():a instanceof Error?a.message:String(a)}},25252:(a,b,c)=>{c.d(b,{HM:()=>f,Nw:()=>e,wz:()=>g});var d=c(58864);function e(a){return(0,d.W3)(a)}function f(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function g(a){if(!a)return;let b=e(a);f().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}},27631:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{X:()=>k});var e=c(29021),f=c(79748),g=c(33873),h=c(75430),i=a([h]);function j(a){if(!a.trim())return null;try{return JSON.parse(a)}catch{return null}}h=(i.then?(await i)():i)[0];let k={scan:async function(a){let b,c=a??(0,g.join)((0,h.getAgentDir)(),"sessions");try{b=(await (0,f.readdir)(c,{withFileTypes:!0})).filter(a=>a.isDirectory()||a.isSymbolicLink()).map(a=>(0,g.join)(c,a.name))}catch{return[]}let d=[];for(let a of b)try{for(let b of(await (0,f.readdir)(a)))b.endsWith(".jsonl")&&d.push((0,g.join)(a,b))}catch{}let i=[];for(let a of d){let b=function(a){let b;try{b=(0,e.statSync)(a)}catch{return null}if(!b.isFile()||0===b.size)return null;let c=Math.min(49152,b.size),d=Buffer.alloc(c),f=(0,e.openSync)(a,"r");try{(0,e.readSync)(f,d,0,c,0)}catch{return null}finally{(0,e.closeSync)(f)}let g=null,h="";for(let a of d.toString("utf8").split("\n")){let b=j(a);if(b){if(!g){if("session"!==b.type)return null;g=b;continue}if("message"===b.type&&b.message?.role==="user"){let a=(function(a){let b=a.content;return"string"==typeof b?b:Array.isArray(b)?b.filter(a=>a&&"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join(" "):""})(b.message).trim();if(a){h=a.slice(0,300);break}}}}if(!g)return null;let i="string"==typeof g.id?g.id:"";if(!i)return null;let k=new Date("string"==typeof g.timestamp?g.timestamp:"");return Number.isNaN(k.getTime())&&k.setTime(b.mtime.getTime()),{path:a,id:i,cwd:"string"==typeof g.cwd?g.cwd:"",name:function(a,b){let c;if(b<=0)return;let d=Math.max(0,b-49152),f=Buffer.alloc(b-d),g=(0,e.openSync)(a,"r");try{(0,e.readSync)(g,f,0,f.length,d)}finally{(0,e.closeSync)(g)}let h=f.toString("utf8").split("\n");for(let a=1;a<h.length;a++){let b=j(h[a]);b?.type==="session_info"&&"string"==typeof b.name&&(c=b.name.trim()||void 0)}return c}(a,b.size),created:k,modified:b.mtime,firstMessage:h||"(no messages)",parentSessionPath:"string"==typeof g.parentSession?g.parentSession:void 0}}(a);b&&i.push(b)}return i.sort((a,b)=>b.modified.getTime()-a.modified.getTime()),i}};d()}catch(a){d(a)}})},40402:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B6:()=>F,BR:()=>A,DK:()=>C,Hh:()=>D,O5:()=>q,O8:()=>z,Uv:()=>E,eP:()=>B,listAllSessions:()=>s,mD:()=>t,os:()=>x,u1:()=>y,zH:()=>p});var e=c(75430),f=c(29021),g=c(79748),h=c(33873),i=c(66737),j=c(12039),k=c(74244),l=c(45902),m=c(24923),n=c(27631),o=a([e,n]);async function p(a){let b=[...new Set(a.map(a=>a.cwd).filter(Boolean))],c=new Map;await Promise.all(b.map(async a=>{c.set(a,await (0,m.KI)(a))}));let d=new Set;try{let a=(0,i.Lf)().prepare("SELECT session_id FROM session_meta WHERE pinned = 1").all();d=new Set(a.map(a=>a.session_id))}catch{}return a.map(a=>{let b=a.cwd?c.get(a.cwd):void 0,e=b?.projectRoot??a.cwd;return{...a,projectRoot:e,projectKey:(0,k.z)(e),...b?.isWorktree&&b.branch?{worktreeBranch:b.branch}:{},...d.has(a.id)?{pinned:!0}:{}}})}function q(a,b){let c=new Map(b.map(a=>[a.id,a]));for(let b of a)c.set(b.id,b);return[...c.values()].sort((a,b)=>b.modified.localeCompare(a.modified))}async function r(){let a=await n.X.scan(),b=new Map;for(let c of a)b.set((0,l.$)(c.path),c.id);let c=a.map(a=>(z(a.id,a.path),{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created.toISOString(),modified:a.modified.toISOString(),messageCount:0,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get((0,l.$)(a.parentSessionPath)):void 0,transient:!1}));return p(c)}async function s(a={}){a.force&&t();let b=globalThis.__piSessionListGeneration??0;if(globalThis.__piSessionListCache&&Date.now()-globalThis.__piSessionListCache.ts<I)return globalThis.__piSessionListCache.data;if(globalThis.__piSessionListPromise&&globalThis.__piSessionListPromiseGeneration===b)return globalThis.__piSessionListPromise;let c=r().then(a=>(globalThis.__piSessionListGeneration??0)!==b?s():(globalThis.__piSessionListCache={data:a,ts:Date.now()},a)).finally(()=>{globalThis.__piSessionListPromise===c&&(globalThis.__piSessionListPromise=void 0,globalThis.__piSessionListPromiseGeneration=void 0)});return globalThis.__piSessionListPromise=c,globalThis.__piSessionListPromiseGeneration=b,c}[e,n]=o.then?(await o)():o;let I=3e5;function t(){globalThis.__piSessionListGeneration=(globalThis.__piSessionListGeneration??0)+1,globalThis.__piSessionListCache=void 0}function u(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}function v(){return globalThis.__piPathToSessionIdCache||(globalThis.__piPathToSessionIdCache=new Map),globalThis.__piPathToSessionIdCache}async function w(a){let b,c=(0,h.join)((0,e.getAgentDir)(),"sessions");if(!a||!(0,f.existsSync)(c))return null;let d=`_${a}.jsonl`;try{b=await (0,g.readdir)(c,{withFileTypes:!0})}catch{return null}for(let e of b){let b;if(!e.isDirectory()&&!e.isSymbolicLink())continue;let f=(0,h.join)(c,e.name);try{b=await (0,g.readdir)(f)}catch{continue}let i=b.find(a=>a.endsWith(d));if(!i)continue;let j=(0,h.join)(f,i);try{if(B(j)?.id===a)return j}catch{}}return null}async function x(a){let b=u().get(a);if(b)return b;let c=await w(a);return c?(z(a,c),c):(await s(),u().get(a)??null)}async function y(a){let b=(0,l.$)(a),c=v().get(b);return c||(await s(),v().get(b))}function z(a,b){let c=(0,h.normalize)(b),d=(0,l.$)(c),e=u(),f=v(),g=e.get(a),i=g?(0,l.$)(g):void 0,j=f.get(d),k=j?e.get(j):void 0;i&&i!==d&&f.get(i)===a&&f.delete(i),j&&j!==a&&k&&(0,l.$)(k)===d&&e.delete(j),e.set(a,c),f.set(d,a)}function A(a){let b=u(),c=v(),d=b.get(a);b.delete(a);let e=d?(0,l.$)(d):void 0;e&&c.get(e)===a&&c.delete(e)}function B(a){let b=(0,f.openSync)(a,"r");try{let a=[],c=0,d=!1;for(;c<65536&&!d;){let e=Buffer.allocUnsafe(Math.min(4096,65536-c)),g=(0,f.readSync)(b,e,0,e.length,c);if(0===g)break;let h=e.subarray(0,g),i=h.indexOf(10);a.push(-1===i?h:h.subarray(0,i)),c+=g,d=-1!==i}if(!d&&c>=65536)return null;let e=Buffer.concat(a).toString("utf8").trimEnd();if(!e)return null;try{let a=JSON.parse(e);return"session"===a.type?a:null}catch{return null}}finally{(0,f.closeSync)(b)}}function C(a){return e.SessionManager.open(a).getEntries()}function D(a){let b=[];for(let c of a){if("custom"!==c.type||"pi-todo.state"!==c.customType)continue;let a=c.data;H(a)&&Array.isArray(a.todos)&&(b=a.todos.filter(a=>H(a)&&"string"==typeof a.content))}return b}function E(a,b,c={}){let{tail:d,excludeLeaf:f}=c,g=d&&d>0?function(a,b,c,d=!1){if(c<=0)return a;let e=new Map;for(let b of a)e.set(b.id,b);let f=b?e.get(b):a[a.length-1];if(d&&f?.parentId&&(f=e.get(f.parentId)),!f)return[];let g=[],h=f;for(;h&&g.length<c;)g.push(h),h=h.parentId?e.get(h.parentId):void 0;return g.reverse(),g}(a,b??null,d,f):a,h=new Map;for(let a of g)h.set(a.id,a);let i=(0,e.buildSessionContext)(g,b,h),k=(0,e.buildContextEntries)(g,b,h),l=[],m=[],n=[];for(let a of k){let b=function(a,b){switch(a.type){case"message":{let c=b.deferToolResultImages?function(a){if("toolResult"!==a.role)return a;let b=0,c=0,d=new Set,e=a.content.filter(a=>{let e=function(a){let b,c;if(!H(a)||"image"!==a.type||("string"==typeof a.data?(b=a.data,c="string"==typeof a.mimeType?a.mimeType:void 0):H(a.source)&&"base64"===a.source.type&&"string"==typeof a.source.data&&(b=a.source.data,c="string"==typeof a.source.media_type?a.source.media_type:void 0),!b))return null;let d=b.endsWith("==")?2:+!!b.endsWith("=");return{bytes:Math.max(0,Math.floor(3*b.length/4)-d),mime:c}}(a);return!e||(b+=1,c+=e.bytes,e.mime&&d.add(e.mime),!1)});if(0===b)return a;let f=d.size>0?`: ${[...d].join(", ")}`:"";return e.push({type:"text",text:`[${b} tool result image${1===b?"":"s"} omitted from initial history payload${f}, ~${c} bytes]`}),{...a,content:e}}((0,j.B)(a.message)):(0,j.B)(a.message);if(!b.deferThinking||"assistant"!==c.role)return c;let d=c.content;if(!Array.isArray(d))return c;return{...c,content:d.map(a=>"thinking"===a.type&&""!==a.thinking.trim()?{...a,thinking:"",deferred:!0}:a)}}case"compaction":return{role:"custom",customType:"compaction",content:a.summary,display:!0,details:{tokensBefore:a.tokensBefore,firstKeptEntryId:a.firstKeptEntryId},timestamp:G(a.timestamp)};case"branch_summary":if(!a.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
|
|
1
|
+
"use strict";exports.id=402,exports.ids=[402],exports.modules={12039:(a,b,c)=>{function d(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}function e(a){return function(a,b={}){if("assistant"!==a.role)return a;let c=a.content;if(!Array.isArray(c))return a;let e=c.map(a=>(function(a,b={}){if(!d(a)||"toolCall"!==a.type)return null;let c={type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input},e=b.includeStreamingRawInput?function(a){if("string"==typeof a.rawInput)return a.rawInput;if("string"==typeof a.partialJson)return a.partialJson;if("string"==typeof a.partialArgs)return a.partialArgs;let b=d(a.customInput)?a.customInput:null,c=b&&"string"==typeof b.property?b.property:null,e=d(a.arguments)?a.arguments:null;return c&&e&&"string"==typeof e[c]?e[c]:void 0}(a):void 0;return void 0===e?c:{...c,rawInput:e}})(a,b)??a);return{...a,content:e}}(a)}c.d(b,{B:()=>e})},24923:(a,b,c)=>{c.d(b,{IL:()=>t,KI:()=>n,P9:()=>p,l:()=>s,xw:()=>r});var d=c(79646),e=c(29021),f=c(33873),g=c(28354),h=c(25252),i=c(58864);let j=(0,g.promisify)(d.execFile);function k(){globalThis.__piProjectCache?.clear()}async function l(a,b){let{stdout:c}=await j("git",["-C",a,...b],{timeout:1e4,maxBuffer:1048576,env:{...process.env,LC_ALL:"C"}});return c.trim()}function m(a){try{return(0,e.realpathSync)(a)}catch{return a}}async function n(a){let b,c=(globalThis.__piProjectCache||(globalThis.__piProjectCache=new Map),globalThis.__piProjectCache),d=c.get(a);if(d&&d.expiresAt>Date.now())return d.info;try{if(!(0,e.existsSync)(a))return b=function(a){let b=(0,f.dirname)(a);if(!b.endsWith("-worktrees"))return null;let c=b.slice(0,-10);return c&&(0,e.existsSync)((0,f.join)(c,".git"))?{projectRoot:m(c),branch:(0,f.basename)(a),isWorktree:!0,isTopLevel:!0}:null}(a)??{projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1},c.set(a,{info:b,expiresAt:Date.now()+6e4}),b;let[d,g,h,j]=(await l(a,["rev-parse","--path-format=absolute","--git-common-dir","--git-dir","--show-toplevel","--abbrev-ref","HEAD"])).split("\n").map(a=>a.trim()),[k,n,o]=[d,g,h].map(i.gB),p=m(a),q=(0,i.Eb)(o,p),r=!(0,i.Eb)(n,k)&&q,s=r?(0,f.dirname)(k):o;b={projectRoot:q?m(s):a,branch:j&&"HEAD"!==j?j:null,isWorktree:r,isTopLevel:q}}catch{b={projectRoot:a,branch:null,isWorktree:!1,isTopLevel:!1}}return c.set(a,{info:b,expiresAt:Date.now()+6e4}),b}async function o(a){let b=await l(a,["rev-parse","--path-format=absolute","--git-common-dir"]);return m((0,f.dirname)((0,i.gB)(b)))}async function p(a){let b=await l(a,["worktree","list","--porcelain"]),c=[],d=null,f=()=>{d?.path&&!d.prunable&&(0,e.existsSync)(d.path)&&c.push({path:d.path,branch:d.branch??null,isMain:0===c.length}),d=null};for(let a of b.split("\n"))a.startsWith("worktree ")?(f(),d={path:(0,i.gB)(a.slice(9).trim())}):a.startsWith("branch ")&&d?d.branch=a.slice(7).trim().replace(/^refs\/heads\//,""):a.startsWith("prunable")&&d?d.prunable=!0:""===a.trim()&&f();return f(),c}function q(a,b){return a.find(a=>(0,i.Eb)(a.path,b))}function r(a,b){return q(a,m(b))?.path??null}async function s(a,b){let c=b.trim();if(!c)throw Error("Branch name is required");let d=c.replace(/[\/\\:*?"<>|\s]+/g,"-").replace(/^-+|-+$/g,"");if(!d)throw Error(`Invalid branch name: ${b}`);let g=await o(a),i=`${(0,f.resolve)(g)}-worktrees`,j=(0,f.join)(i,d);if((0,e.existsSync)(j))throw Error(`Directory already exists: ${j}`);(0,e.mkdirSync)(i,{recursive:!0});let m=!1;try{await l(g,["rev-parse","--verify","--quiet",`refs/heads/${c}`]),m=!0}catch{m=!1}try{m?await l(g,["worktree","add","--",j,c]):await l(g,["worktree","add","-b",c,"--",j])}catch(a){throw Error(u(a))}return(0,h.wz)(j),k(),{path:j,branch:c}}async function t(a,b,c=!1){let d=q(await p(a),b);if(!d)throw Error(`Not a worktree of this repository: ${b}`);if(d.isMain)throw Error("Cannot remove the main worktree");try{await l(a,["worktree","remove",...c?["--force"]:[],d.path])}catch(a){throw Error(u(a))}k()}function u(a){let b=a.stderr;return"string"==typeof b&&b.trim()?b.trim():a instanceof Error?a.message:String(a)}},25252:(a,b,c)=>{c.d(b,{HM:()=>f,Nw:()=>e,wz:()=>g});var d=c(58864);function e(a){return(0,d.W3)(a)}function f(){return globalThis.__piAdditionalAllowedRoots||(globalThis.__piAdditionalAllowedRoots=new Set),globalThis.__piAdditionalAllowedRoots}function g(a){if(!a)return;let b=e(a);f().add(b),globalThis.__piAllowedRootsCache?.roots.add(b)}},27631:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{X:()=>l});var e=c(29021),f=c(79748),g=c(33873),h=c(75430),i=a([h]);function j(a){if(!a.trim())return null;try{return JSON.parse(a)}catch{return null}}function k(a){let b=a.content;return"string"==typeof b?b:Array.isArray(b)?b.filter(a=>a&&"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join(" "):""}h=(i.then?(await i)():i)[0];let l={scan:async function(a){let b,c=a??(0,g.join)((0,h.getAgentDir)(),"sessions");try{b=(await (0,f.readdir)(c,{withFileTypes:!0})).filter(a=>a.isDirectory()||a.isSymbolicLink()).map(a=>(0,g.join)(c,a.name))}catch{return[]}let d=[];for(let a of b)try{for(let b of(await (0,f.readdir)(a)))b.endsWith(".jsonl")&&d.push((0,g.join)(a,b))}catch{}let i=[];for(let a of d){let b=function(a){let b;try{b=(0,e.statSync)(a)}catch{return null}if(!b.isFile()||0===b.size)return null;let c=function(a,b){let c=Math.min(4096,b),d="",f=(0,e.openSync)(a,"r");try{let a=null,g="";for(;;){let h=Buffer.alloc(c);(0,e.readSync)(f,h,0,c,0);let i=h.toString("utf8"),l=i.lastIndexOf("\n"),m=-1===l?i.length:l+1;for(let b of(d+=i.slice(0,m)).split("\n")){let c=j(b);if(c){if(!a){if("session"!==c.type)return null;a=c;continue}if("message"===c.type&&c.message?.role==="user"){let a=k(c.message).trim();if(a){g=a.slice(0,300);break}}}}if(!a)return null;if(g||c>=49152||c>=b||(c=Math.min(2*c,49152,b))<=0)break}return{header:a,firstMessage:g}}finally{(0,e.closeSync)(f)}}(a,b.size);if(!c)return null;let{header:d,firstMessage:f}=c,g="string"==typeof d.id?d.id:"";if(!g)return null;let h=new Date("string"==typeof d.timestamp?d.timestamp:"");Number.isNaN(h.getTime())&&h.setTime(b.mtime.getTime());let i=function(a,b){let c={name:void 0,lastReply:""};if(b<=0)return c;let d=(0,e.openSync)(a,"r");try{let a=b;for(let b=0;b<256&&a>0;b++){let b=Math.max(0,a-65536),f=a-b,g=Buffer.alloc(f);(0,e.readSync)(d,g,0,f,b);let h=g.toString("utf8").split("\n");for(let a=h.length-1;a>=1;a--){if(void 0!==c.name&&c.lastReply)continue;let b=j(h[a]);if(b){if(void 0===c.name&&"session_info"===b.type&&"string"==typeof b.name){let a=b.name.trim();a&&(c.name=a)}else if(!c.lastReply&&"message"===b.type&&b.message?.role==="assistant"){let a=k(b.message).trim();a&&(c.lastReply=a.slice(0,500))}if(void 0!==c.name&&c.lastReply)break}}a=b}return c}finally{(0,e.closeSync)(d)}}(a,b.size);return{path:a,id:g,cwd:"string"==typeof d.cwd?d.cwd:"",name:i.name,created:h,modified:b.mtime,firstMessage:f||"(no messages)",lastReply:i.lastReply,parentSessionPath:"string"==typeof d.parentSession?d.parentSession:void 0}}(a);b&&i.push(b)}return i.sort((a,b)=>b.modified.getTime()-a.modified.getTime()),i}};d()}catch(a){d(a)}})},40402:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B6:()=>F,BR:()=>A,DK:()=>C,Hh:()=>D,O5:()=>q,O8:()=>z,Uv:()=>E,eP:()=>B,listAllSessions:()=>s,mD:()=>t,os:()=>x,u1:()=>y,zH:()=>p});var e=c(75430),f=c(29021),g=c(79748),h=c(33873),i=c(66737),j=c(12039),k=c(74244),l=c(45902),m=c(24923),n=c(27631),o=a([e,n]);async function p(a){let b=[...new Set(a.map(a=>a.cwd).filter(Boolean))],c=new Map;await Promise.all(b.map(async a=>{c.set(a,await (0,m.KI)(a))}));let d=new Set;try{let a=(0,i.Lf)().prepare("SELECT session_id FROM session_meta WHERE pinned = 1").all();d=new Set(a.map(a=>a.session_id))}catch{}return a.map(a=>{let b=a.cwd?c.get(a.cwd):void 0,e=b?.projectRoot??a.cwd;return{...a,projectRoot:e,projectKey:(0,k.z)(e),...b?.branch?{branch:b.branch}:{},...b?.isWorktree?{isWorktree:!0}:{},...b?.isWorktree&&b.branch?{worktreeBranch:b.branch}:{},...d.has(a.id)?{pinned:!0}:{}}})}function q(a,b){let c=new Map(b.map(a=>[a.id,a]));for(let b of a)c.set(b.id,b);return[...c.values()].sort((a,b)=>b.modified.localeCompare(a.modified))}async function r(){let a=await n.X.scan(),b=new Map;for(let c of a)b.set((0,l.$)(c.path),c.id);let c=a.map(a=>(z(a.id,a.path),{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created.toISOString(),modified:a.modified.toISOString(),messageCount:0,firstMessage:a.firstMessage||"(no messages)",lastReply:a.lastReply||"",parentSessionId:a.parentSessionPath?b.get((0,l.$)(a.parentSessionPath)):void 0,transient:!1}));return p(c)}async function s(a={}){a.force&&t();let b=globalThis.__piSessionListGeneration??0;if(globalThis.__piSessionListCache&&Date.now()-globalThis.__piSessionListCache.ts<I)return globalThis.__piSessionListCache.data;if(globalThis.__piSessionListPromise&&globalThis.__piSessionListPromiseGeneration===b)return globalThis.__piSessionListPromise;let c=r().then(a=>(globalThis.__piSessionListGeneration??0)!==b?s():(globalThis.__piSessionListCache={data:a,ts:Date.now()},a)).finally(()=>{globalThis.__piSessionListPromise===c&&(globalThis.__piSessionListPromise=void 0,globalThis.__piSessionListPromiseGeneration=void 0)});return globalThis.__piSessionListPromise=c,globalThis.__piSessionListPromiseGeneration=b,c}[e,n]=o.then?(await o)():o;let I=3e5;function t(){globalThis.__piSessionListGeneration=(globalThis.__piSessionListGeneration??0)+1,globalThis.__piSessionListCache=void 0}function u(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}function v(){return globalThis.__piPathToSessionIdCache||(globalThis.__piPathToSessionIdCache=new Map),globalThis.__piPathToSessionIdCache}async function w(a){let b,c=(0,h.join)((0,e.getAgentDir)(),"sessions");if(!a||!(0,f.existsSync)(c))return null;let d=`_${a}.jsonl`;try{b=await (0,g.readdir)(c,{withFileTypes:!0})}catch{return null}for(let e of b){let b;if(!e.isDirectory()&&!e.isSymbolicLink())continue;let f=(0,h.join)(c,e.name);try{b=await (0,g.readdir)(f)}catch{continue}let i=b.find(a=>a.endsWith(d));if(!i)continue;let j=(0,h.join)(f,i);try{if(B(j)?.id===a)return j}catch{}}return null}async function x(a){let b=u().get(a);if(b)return b;let c=await w(a);return c?(z(a,c),c):(await s(),u().get(a)??null)}async function y(a){let b=(0,l.$)(a),c=v().get(b);return c||(await s(),v().get(b))}function z(a,b){let c=(0,h.normalize)(b),d=(0,l.$)(c),e=u(),f=v(),g=e.get(a),i=g?(0,l.$)(g):void 0,j=f.get(d),k=j?e.get(j):void 0;i&&i!==d&&f.get(i)===a&&f.delete(i),j&&j!==a&&k&&(0,l.$)(k)===d&&e.delete(j),e.set(a,c),f.set(d,a)}function A(a){let b=u(),c=v(),d=b.get(a);b.delete(a);let e=d?(0,l.$)(d):void 0;e&&c.get(e)===a&&c.delete(e)}function B(a){let b=(0,f.openSync)(a,"r");try{let a=[],c=0,d=!1;for(;c<65536&&!d;){let e=Buffer.allocUnsafe(Math.min(4096,65536-c)),g=(0,f.readSync)(b,e,0,e.length,c);if(0===g)break;let h=e.subarray(0,g),i=h.indexOf(10);a.push(-1===i?h:h.subarray(0,i)),c+=g,d=-1!==i}if(!d&&c>=65536)return null;let e=Buffer.concat(a).toString("utf8").trimEnd();if(!e)return null;try{let a=JSON.parse(e);return"session"===a.type?a:null}catch{return null}}finally{(0,f.closeSync)(b)}}function C(a){return e.SessionManager.open(a).getEntries()}function D(a){let b=[];for(let c of a){if("custom"!==c.type||"pi-todo.state"!==c.customType)continue;let a=c.data;H(a)&&Array.isArray(a.todos)&&(b=a.todos.filter(a=>H(a)&&"string"==typeof a.content))}return b}function E(a,b,c={}){let{tail:d,excludeLeaf:f}=c,g=d&&d>0?function(a,b,c,d=!1){if(c<=0)return a;let e=new Map;for(let b of a)e.set(b.id,b);let f=b?e.get(b):a[a.length-1];if(d&&f?.parentId&&(f=e.get(f.parentId)),!f)return[];let g=[],h=f;for(;h&&g.length<c;)g.push(h),h=h.parentId?e.get(h.parentId):void 0;return g.reverse(),g}(a,b??null,d,f):a,h=new Map;for(let a of g)h.set(a.id,a);let i=(0,e.buildSessionContext)(g,b,h),k=(0,e.buildContextEntries)(g,b,h),l=[],m=[],n=[];for(let a of k){let b=function(a,b){switch(a.type){case"message":{let c=b.deferToolResultImages?function(a){if("toolResult"!==a.role)return a;let b=0,c=0,d=new Set,e=a.content.filter(a=>{let e=function(a){let b,c;if(!H(a)||"image"!==a.type||("string"==typeof a.data?(b=a.data,c="string"==typeof a.mimeType?a.mimeType:void 0):H(a.source)&&"base64"===a.source.type&&"string"==typeof a.source.data&&(b=a.source.data,c="string"==typeof a.source.media_type?a.source.media_type:void 0),!b))return null;let d=b.endsWith("==")?2:+!!b.endsWith("=");return{bytes:Math.max(0,Math.floor(3*b.length/4)-d),mime:c}}(a);return!e||(b+=1,c+=e.bytes,e.mime&&d.add(e.mime),!1)});if(0===b)return a;let f=d.size>0?`: ${[...d].join(", ")}`:"";return e.push({type:"text",text:`[${b} tool result image${1===b?"":"s"} omitted from initial history payload${f}, ~${c} bytes]`}),{...a,content:e}}((0,j.B)(a.message)):(0,j.B)(a.message);if(!b.deferThinking||"assistant"!==c.role)return c;let d=c.content;if(!Array.isArray(d))return c;return{...c,content:d.map(a=>"thinking"===a.type&&""!==a.thinking.trim()?{...a,thinking:"",deferred:!0}:a)}}case"compaction":return{role:"custom",customType:"compaction",content:a.summary,display:!0,details:{tokensBefore:a.tokensBefore,firstKeptEntryId:a.firstKeptEntryId},timestamp:G(a.timestamp)};case"branch_summary":if(!a.summary)return null;return{role:"user",content:`*The conversation briefly explored another branch and returned with this summary:*
|
|
2
2
|
|
|
3
3
|
${a.summary}`,timestamp:G(a.timestamp)};case"custom_message":return{role:"custom",customType:a.customType,content:a.content,display:a.display,details:a.details,timestamp:G(a.timestamp)};default:return null}}(a,c);b&&(l.push(b),m.push(a.id),n.push(a.parentId))}let o=D(k);return{messages:l,entryIds:m,parentIds:n,thinkingLevel:i.thinkingLevel,model:i.model,todos:o}}function F(a,b,c,d=!1){if(c<=0)return!1;let e=new Map;for(let b of a)e.set(b.id,b);let f=b?e.get(b):a[a.length-1];d&&f?.parentId&&(f=e.get(f.parentId));let g=0;for(;f;){if(++g>c)return!0;f=f.parentId?e.get(f.parentId):void 0}return!1}function G(a){let b=Date.parse(a);return Number.isNaN(b)?void 0:b}function H(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}d()}catch(a){d(a)}})},45902:(a,b,c)=>{c.d(b,{$:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){let c="win32"===b?e().win32.normalize(a):e().posix.normalize(a);return"win32"===b?c.toLowerCase():c}},58864:(a,b,c)=>{c.d(b,{Eb:()=>j,W3:()=>h,gB:()=>g,uK:()=>f});var d=c(33873);let e=/^[a-zA-Z]:[\\/]/;function f(a){return e.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function g(a){return a&&"win32"===process.platform?(0,d.normalize)(a):a}function h(a){return a.replace(/\\/g,"/")}function i(a){let b=(0,d.normalize)(g(a)),c=(0,d.parse)(b).root.length,e=b.length;for(;e>c&&b[e-1]===d.sep;)e--;return b.slice(0,e)}function j(a,b){if(a===b)return!0;if(!a||!b)return!1;let c=i(a),d=i(b);return"win32"===process.platform?c.toLowerCase()===d.toLowerCase():c===d}},74244:(a,b,c)=>{c.d(b,{z:()=>f});var d=c(76760),e=c.n(d);function f(a,b=process.platform){if(!a)return a;let c="win32"===b?e().win32:e().posix,d=c.normalize(a),g=c.parse(d).root.length,h=d.length;for(;h>g&&d[h-1]===c.sep;)h--;let i=d.slice(0,h);return"win32"===b?i.toLowerCase():i}}};
|