@seqyuan/annovibe 0.8.135 → 0.8.137
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 +23 -19
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +17 -17
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +39 -17
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- 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 +4 -4
- package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/prepare/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +2 -2
- package/.next/server/app/api/agent/running/events/route.js +2 -2
- package/.next/server/app/api/agent/running/route.js +1 -1
- package/.next/server/app/api/agent/runtime/route.js +1 -1
- package/.next/server/app/api/apps/[id]/[[...path]]/route.js +2 -2
- package/.next/server/app/api/apps/route.js +2 -2
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/auth/totp/route.js +1 -1
- package/.next/server/app/api/debug-models/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -0
- package/.next/server/app/api/file-index/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/file-tree/delete/route.js +1 -1
- package/.next/server/app/api/file-tree/mkdir/route.js +1 -1
- package/.next/server/app/api/file-tree/rename/route.js +1 -1
- package/.next/server/app/api/file-tree/reveal/route.js +1 -1
- package/.next/server/app/api/file-tree/write/route.js +1 -1
- package/.next/server/app/api/file-watch/route.js +3 -3
- package/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/server/app/api/harness/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/im/cancel/route.js +1 -1
- package/.next/server/app/api/im/gateway-status/route.js +1 -1
- package/.next/server/app/api/im/gateway-token/route.js +1 -1
- package/.next/server/app/api/im/project/route.js +1 -1
- package/.next/server/app/api/im/projects/route.js +1 -1
- package/.next/server/app/api/im/session-ids/route.js +1 -1
- package/.next/server/app/api/im/turn/route.js +2 -2
- package/.next/server/app/api/images/upload/route.js +1 -1
- package/.next/server/app/api/internal/runtime/route.js +1 -1
- package/.next/server/app/api/memory/dismiss/route.js +2 -2
- package/.next/server/app/api/memory/promote/route.js +2 -2
- package/.next/server/app/api/models/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/plot-kernels/route.js +1 -1
- package/.next/server/app/api/plot-kernels/save/route.js +1 -1
- package/.next/server/app/api/plot-kernels/status/route.js +1 -1
- package/.next/server/app/api/plot-kernels/stop/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -0
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/project-trust/route.js +1 -0
- package/.next/server/app/api/project-trust/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/browse/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/search/route.js +1 -1
- package/.next/server/app/api/session-index/events/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +9 -8
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/export/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/media/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/media/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/shadowed/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -0
- package/.next/server/app/api/skills/check/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/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 +2 -0
- package/.next/server/app/api/skills/update/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/smoke/prompt-admission/route.js +1 -1
- package/.next/server/app/api/soul/route.js +1 -1
- package/.next/server/app/api/subagents/status/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +5 -5
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login/page.js +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +4 -4
- package/.next/server/app/login.segments/_full.segment.rsc +4 -4
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/.next/server/app/login.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/page.js +15 -37
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/page.js +3 -3
- package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/session-stream/page.js +2 -2
- package/.next/server/app/smoke/session-stream/page_client-reference-manifest.js +1 -1
- package/.next/server/app/smoke/session-stream.html +1 -1
- package/.next/server/app/smoke/session-stream.rsc +5 -5
- package/.next/server/app/smoke/session-stream.segments/_full.segment.rsc +5 -5
- package/.next/server/app/smoke/session-stream.segments/_head.segment.rsc +1 -1
- package/.next/server/app/smoke/session-stream.segments/_index.segment.rsc +4 -4
- package/.next/server/app/smoke/session-stream.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/smoke/session-stream.segments/smoke/session-stream/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/smoke/session-stream.segments/smoke/session-stream.segment.rsc +1 -1
- package/.next/server/app/smoke/session-stream.segments/smoke.segment.rsc +1 -1
- package/.next/server/app/smoke.html +2 -2
- package/.next/server/app/smoke.rsc +5 -5
- package/.next/server/app/smoke.segments/_full.segment.rsc +5 -5
- package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
- package/.next/server/app/smoke.segments/_index.segment.rsc +4 -4
- package/.next/server/app/smoke.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/smoke.segments/smoke.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +23 -19
- package/.next/server/chunks/1761.js +1 -1
- package/.next/server/chunks/402.js +4 -2
- package/.next/server/chunks/6429.js +10 -9
- package/.next/server/chunks/707.js +2 -2
- package/.next/server/chunks/7303.js +260 -0
- package/.next/server/chunks/7365.js +1 -0
- package/.next/server/chunks/8304.js +1 -1
- package/.next/server/chunks/8797.js +22 -0
- package/.next/server/functions-config-manifest.json +11 -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 +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/Dhz0OCkGsLWL775zzzmMs/_buildManifest.js +1 -0
- package/.next/static/chunks/{2693-b831832202452107.js → 2693-52c358cf5d84b069.js} +1 -1
- package/.next/static/chunks/291-e0c3c616f67fe126.js +22 -0
- package/.next/static/chunks/3309.581b04bacfeed701.js +1 -0
- package/.next/static/chunks/5618-5cda45604cf32c2a.js +22 -0
- package/.next/static/chunks/{3309.d0c34b5ef504a551.js → 5690.332f301b9df6f2dd.js} +1 -1
- package/.next/static/chunks/{6586.8c2a88c2a55300d2.js → 6586.25e1a0135b5e5bba.js} +1 -1
- package/.next/static/chunks/{1960.b1e26436d7a5f586.js → 7198.4c3df741a5e26fb2.js} +1 -1
- package/.next/static/chunks/{8863.8b769013468d83d4.js → 8863.4b2faadd47deb00c.js} +1 -1
- package/.next/static/chunks/9867-d66ff8fa3cb21f14.js +260 -0
- package/.next/static/chunks/app/_global-error/page-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/prepare/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/agent/runtime/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/apps/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/auth/totp/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/debug-models/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-tree/delete/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-tree/mkdir/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-tree/rename/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-tree/reveal/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-tree/write/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/file-watch/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/harness/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/home/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/cancel/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-status/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-token/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/project/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/projects/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/session-ids/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/im/turn/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/images/upload/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/memory/dismiss/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/memory/promote/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/models/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/save/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/status/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/stop/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/projects/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/search/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/session-index/events/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/media/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/settings/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/skills/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/smoke/prompt-admission/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/soul/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/subagents/status/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/api/version/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/favicon.ico/route-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/app/{layout-5608bfe5e8f4e4c0.js → layout-101c4ccdf12880f0.js} +1 -1
- package/.next/static/chunks/app/page-18dafddef38f1693.js +22 -0
- package/.next/static/chunks/app/smoke/{page-35df723c803f35e1.js → page-32674afc320aa48b.js} +2 -2
- package/.next/static/chunks/app/smoke/session-stream/page-e754151f65003821.js +6 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6908129cec5a3264.js +1 -0
- package/.next/static/chunks/{webpack-abcc6ba654c7ed4b.js → webpack-87d310cefc6fab2a.js} +1 -1
- package/.next/static/css/{88714c00e109ce28.css → 9bcd6051db4f8890.css} +1 -1
- package/.next/static/css/d68ecb6695873888.css +1 -0
- package/README.md +4 -1
- package/bin/pi-web.js +103 -25
- package/package.json +6 -5
- package/.next/server/app/api/sessions/[id]/kernel-state/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/kernel-state/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-artifact/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-artifact/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-review/route.js +0 -1
- package/.next/server/app/api/sessions/[id]/workbench-review/route_client-reference-manifest.js +0 -1
- package/.next/server/chunks/2562.js +0 -12
- package/.next/server/chunks/4584.js +0 -260
- package/.next/server/chunks/9230.js +0 -22
- package/.next/static/WmuL2h-UefYxq-xz32JzM/_buildManifest.js +0 -1
- package/.next/static/chunks/4456-646debea1b5bbec7.js +0 -260
- package/.next/static/chunks/5618-3b8444e736e6ae4d.js +0 -22
- package/.next/static/chunks/5690.64d843d3db8e1b4b.js +0 -1
- package/.next/static/chunks/9544-46c74a307e919fcb.js +0 -22
- package/.next/static/chunks/app/_global-error/page-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/prepare/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/agent/runtime/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/apps/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/auth/totp/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/debug-models/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-tree/delete/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-tree/mkdir/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-tree/rename/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-tree/reveal/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-tree/write/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/file-watch/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/harness/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/home/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/cancel/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-status/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-token/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/project/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/projects/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/session-ids/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/im/turn/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/images/upload/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/internal/runtime/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/memory/dismiss/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/memory/promote/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/models/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/save/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/status/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/stop/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/projects/browse/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/projects/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/search/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/session-index/events/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/settings/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/skills/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/smoke/prompt-admission/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/soul/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/subagents/status/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/api/version/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/favicon.ico/route-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/app/page-765bc8a2e911eb4c.js +0 -44
- package/.next/static/chunks/app/smoke/session-stream/page-49b8cf27895b9187.js +0 -6
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-c47e15c89def27e4.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c47e15c89def27e4.js +0 -1
- package/.next/static/css/4a3f6b9aa8eed19f.css +0 -1
- /package/.next/static/{WmuL2h-UefYxq-xz32JzM → Dhz0OCkGsLWL775zzzmMs}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9240,a.ids=[9240],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2072:(a,b,c)=>{"use strict";c.d(b,{Ak:()=>n,VZ:()=>j,Yb:()=>k,b5:()=>o,z3:()=>l});var d=c(69554),e=c(63620),f=c(19426),g=c(34013);let h=null;function i(){if(!h){let a=new d.Xf,b=new e.gZ;h=new f._k({crypto:a,base32:b})}return h}function j(){return i().generateSecret()}function k(a,b,c="AnnoVibe"){return i().toURI({secret:a,label:b,issuer:c})}async function l(a,b){try{return(await i().verify(b,{secret:a,epochTolerance:1})).valid}catch{return!1}}function m(a){return(0,g.Y8)(a,10)}function n(a,b){for(let c of b)if((0,g.Dm)(a,c))return c;return null}function o(){let a=[];for(let b=0;b<8;b++){let b=new Uint8Array(6);globalThis.crypto.getRandomValues(b);let c=Array.from(b,a=>a.toString(16).padStart(2,"0")).join("");a.push(`${c.slice(0,4)}-${c.slice(4,8)}-${c.slice(8,12)}`)}return{codes:a,hashes:a.map(m)}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31828:(a,b,c)=>{"use strict";c.d(b,{zb:()=>D,Vn:()=>H,yL:()=>u,kR:()=>J,eh:()=>G,US:()=>l,oB:()=>v,I0:()=>B,y2:()=>r,pg:()=>w,yn:()=>E,OJ:()=>F,WG:()=>A,hx:()=>C,BE:()=>s,JZ:()=>K});var d=c(29021),e=c(33873),f=c(21820),g=c(34013);function h(){return process.env.ANNOVIBE_AUTH_SECRET??process.env.PIDEX_AUTH_SECRET??"annovibe-default-secret"}async function i(a,b){let c=new TextEncoder,d=await globalThis.crypto.subtle.importKey("raw",c.encode(a),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return Array.from(new Uint8Array(await globalThis.crypto.subtle.sign("HMAC",d,c.encode(b))),a=>a.toString(16).padStart(2,"0")).join("")}async function j(a){let b,c=a??h(),d=`${Date.now()}:${(b=new Uint8Array(16),globalThis.crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,e=await i(c,d);return`${d}:${e}`}async function k(a,b){try{let c=b??h(),d=a.split(":"),e=d.pop(),f=d.join(":");if(!e||!f)return!1;let g=await i(c,f);if(e.length!==g.length)return!1;let j=0;for(let a=0;a<e.length;a++)j|=e.charCodeAt(a)^g.charCodeAt(a);return 0===j}catch{return!1}}function l(a){return`annovibe-auth-${function(){if(process.env.PORT)return process.env.PORT;let a=process.argv;for(let b=0;b<a.length;b++)if(("-p"===a[b]||"--port"===a[b])&&b+1<a.length)return a[b+1];return"30141"}()}=${a}; HttpOnly; SameSite=Lax; Path=/; Max-Age=2592000`}var m=c(62814);function n(){return process.env.PI_CODING_AGENT_DIR??(0,e.join)((0,f.homedir)(),".pi","agent")}function o(){return(0,e.join)(n(),"web-auth.json")}function p(){try{let a=o();if(!(0,d.existsSync)(a))return null;let b=(0,d.readFileSync)(a,"utf-8");return JSON.parse(b)}catch{return null}}function q(a){let b=n();(0,d.existsSync)(b)||(0,d.mkdirSync)(b,{recursive:!0}),(0,d.writeFileSync)(o(),JSON.stringify(a,null,2))}function r(){let a=p();return a?.enabled!==!1&&!!a?.passwordHash}function s(a){let b=p();return!!b?.passwordHash&&(0,g.Dm)(a,b.passwordHash)}function t(){let a=p();return a?.passwordHash??"annovibe-default-secret"}function u(){return j(t())}function v(){let a=p();return a?.totp??null}function w(){let a=p();return a?.totp?.status==="enabled"}let x=/^(1|true|yes|on)$/i;function y(a){var b,c;let d=(b=a.trim()).startsWith('"')&&b.endsWith('"')||b.startsWith("'")&&b.endsWith("'")?b.slice(1,-1):b;if(!d||"unknown"===d.toLowerCase())return null;if(d.startsWith("[")){let a=d.indexOf("]");a>0&&(d=d.slice(1,a))}else/^\d+\.\d+\.\d+\.\d+:\d+$/.test(d)&&(d=d.slice(0,d.lastIndexOf(":")));let e=d.indexOf("%");return e>=0&&(d=d.slice(0,e)),(c=d,/^\d+\.\d+\.\d+\.\d+$/.test(c)||c.includes(":"))?d:null}function z(a){let b=a.split(".");if(4!==b.length)return null;let c=0;for(let a of b){let b=parseInt(a,10);if(isNaN(b)||b<0||b>255)return null;c=c<<8|b}return c>>>0}function A(a){let b=p();if(!b?.totp||"enabled"!==b.totp.status)return!1;if("always"===b.totp.requireMode||!b.totp.requireMode)return!0;let c=b.totp.trustedNetworks??["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"];return!function(a,b){if(!a)return!0;for(let c of b)if(function(a,b){if(b.includes(":")){let[c,d]=b.split("/");return 128===parseInt(d??"128",10)&&a===c}return function(a,b){let[c,d]=b.split("/"),e=parseInt(d??"32",10),f=z(a),g=z(c);if(null===f||null===g||e<0||e>32)return!1;let h=0===e?0:-1<<32-e;return(f&h)==(g&h)}(a,b)}(a,c))return!0;return!1}(function(a){if(!x.test(process.env.ANNOVIBE_TRUST_PROXY_HEADERS??""))return null;let b=a.headers.get("forwarded");if(b){let a=b.split(",")[0]?.trim();if(a)for(let b of a.split(";")){let[a,c]=b.split("=",2);if(a?.trim().toLowerCase()==="for"&&c){let a=y(c);if(a)return a}}}let c=a.headers.get("x-forwarded-for");if(c){let a=y(c.split(",")[0]??"");if(a)return a}let d=a.headers.get("x-real-ip");if(d){let a=y(d);if(a)return a}return null}(a),c)}function B(){let a=p();return a?.totp?.status==="enabled"&&a.totp.secret?a.totp.secret:null}function C(a){var b;let c,d=v();b={secret:a,status:"pending",requireMode:d?.requireMode??"always",trustedNetworks:d?.trustedNetworks},(c=p()??{passwordHash:"",enabled:!0}).totp=b,q(c),(0,m.L)("totp_setup_started")}function D(a){let b=p();if(!b?.totp?.secret)throw Error("No pending TOTP setup");b.totp.status="enabled",b.totp.recoveryCodes=a,b.totp.requireMode||(b.totp.requireMode="always"),b.totp.trustedNetworks||(b.totp.trustedNetworks=["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]),q(b),(0,m.L)("totp_enabled")}function E(a){let b=p();b?.totp&&(b.totp.requireMode=a,q(b))}function F(a){let b=p();b?.totp&&(b.totp.trustedNetworks=a,q(b))}function G(){let a=p();a?.totp&&(delete a.totp,q(a),(0,m.L)("totp_disabled"))}function H(a){let b=p();b?.totp?.recoveryCodes&&(b.totp.recoveryCodes=b.totp.recoveryCodes.filter(b=>b!==a),q(b),(0,m.L)("recovery_code_used"))}let I=":annovibe-temp-token";async function J(){let a=t()+I,b=await j(a);return`t:${b}`}async function K(a){if(!a.startsWith("t:"))return!1;let b=a.slice(2),c=t()+I;if(!await k(b,c))return!1;try{let a=b.split(":");if(a.length<3)return!1;let c=parseInt(a[0],10);if(Date.now()-c>12e4)return!1}catch{return!1}return!0}},33873:a=>{"use strict";a.exports=require("path")},43579:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>z,POST:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31828),x=c(2072),y=c(62814);async function z(){let a=(0,w.oB)();return v.NextResponse.json({status:a?.status??"disabled",enabled:(0,w.pg)(),requireMode:a?.requireMode??"always",trustedNetworks:a?.trustedNetworks??["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]})}async function A(a){try{let{action:b}=await a.json().catch(()=>({}));if("check-recovery"===b){let{recoveryCode:b}=await a.json();if(!b)return v.NextResponse.json({error:"Recovery code required"},{status:400});let c=(0,w.oB)();if(!c?.recoveryCodes?.length)return v.NextResponse.json({error:"No recovery codes available"},{status:400});let d=(0,x.Ak)(b,c.recoveryCodes);if(!d)return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid recovery code"},{status:401});return(0,w.Vn)(d),v.NextResponse.json({success:!0})}if("setup"===b){let a=(0,x.VZ)();(0,w.hx)(a);let b=(0,x.Yb)(a,"AnnoVibe","AnnoVibe");return v.NextResponse.json({secret:a,uri:b})}if("verify-setup"===b){let b=(0,w.oB)();if(!b||"pending"!==b.status)return v.NextResponse.json({error:"No pending TOTP setup"},{status:400});let{code:c}=await a.json();if(!c||!/^\d{6}$/.test(c))return v.NextResponse.json({error:"6-digit verification code required"},{status:400});if(!await (0,x.z3)(b.secret,c))return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid verification code"},{status:401});let{codes:d,hashes:e}=(0,x.b5)();return(0,w.zb)(e),v.NextResponse.json({success:!0,recoveryCodes:d})}if("disable"===b){let b=(0,w.oB)();if(!b||"enabled"!==b.status)return v.NextResponse.json({error:"TOTP is not enabled"},{status:400});let{code:c}=await a.json();if(!c||!/^\d{6}$/.test(c))return v.NextResponse.json({error:"6-digit verification code required"},{status:400});if(!await (0,x.z3)(b.secret,c))return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid verification code"},{status:401});return(0,w.eh)(),v.NextResponse.json({success:!0})}if("get-recovery-codes"===b){let a=(0,w.oB)();return v.NextResponse.json({recoveryCodesLeft:a?.recoveryCodes?.length??0})}if("set-require-mode"===b){let{requireMode:b}=await a.json();if("always"!==b&&"untrusted"!==b)return v.NextResponse.json({error:"Invalid requireMode. Use 'always' or 'untrusted'"},{status:400});return(0,w.yn)(b),v.NextResponse.json({success:!0})}if("set-trusted-networks"===b){let{trustedNetworks:b}=await a.json();if(!Array.isArray(b))return v.NextResponse.json({error:"trustedNetworks must be an array of CIDR strings"},{status:400});return(0,w.OJ)(b),v.NextResponse.json({success:!0})}return v.NextResponse.json({error:"Unknown action"},{status:400})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/totp/route",pathname:"/api/auth/totp",filename:"route",bundlePath:"app/api/auth/totp/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/auth/totp/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/totp/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||B.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===B.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),b}},k=await B.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},62814:(a,b,c)=>{"use strict";c.d(b,{L:()=>g});var d=c(29021),e=c(33873),f=c(21820);function g(a,b){try{let c=(0,e.join)(process.env.PI_CODING_AGENT_DIR??(0,e.join)((0,f.homedir)(),".pi","agent"),"auth-audit.jsonl"),g=(0,e.dirname)(c);(0,d.existsSync)(g)||(0,d.mkdirSync)(g,{recursive:!0});let h={ts:new Date().toISOString(),...b?{ip:b}:{},action:a};(0,d.appendFileSync)(c,JSON.stringify(h)+"\n")}catch{}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4013,716],()=>b(b.s=43579));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=9240,a.ids=[9240],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2072:(a,b,c)=>{"use strict";c.d(b,{Ak:()=>n,VZ:()=>j,Yb:()=>k,b5:()=>o,z3:()=>l});var d=c(69554),e=c(63620),f=c(19426),g=c(34013);let h=null;function i(){if(!h){let a=new d.Xf,b=new e.gZ;h=new f._k({crypto:a,base32:b})}return h}function j(){return i().generateSecret()}function k(a,b,c="AnnoVibe"){return i().toURI({secret:a,label:b,issuer:c})}async function l(a,b){try{return(await i().verify(b,{secret:a,epochTolerance:1})).valid}catch{return!1}}function m(a){return(0,g.Y8)(a,10)}function n(a,b){for(let c of b)if((0,g.Dm)(a,c))return c;return null}function o(){let a=[];for(let b=0;b<8;b++){let b=new Uint8Array(6);globalThis.crypto.getRandomValues(b);let c=Array.from(b,a=>a.toString(16).padStart(2,"0")).join("");a.push(`${c.slice(0,4)}-${c.slice(4,8)}-${c.slice(8,12)}`)}return{codes:a,hashes:a.map(m)}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31828:(a,b,c)=>{"use strict";c.d(b,{zb:()=>D,Vn:()=>H,yL:()=>u,kR:()=>J,eh:()=>G,US:()=>l,oB:()=>v,I0:()=>B,y2:()=>r,pg:()=>w,yn:()=>E,OJ:()=>F,WG:()=>A,hx:()=>C,BE:()=>s,JZ:()=>K});var d=c(29021),e=c(33873),f=c(21820),g=c(34013);function h(){return process.env.ANNOVIBE_AUTH_SECRET??process.env.PIDEX_AUTH_SECRET??"annovibe-default-secret"}async function i(a,b){let c=new TextEncoder,d=await globalThis.crypto.subtle.importKey("raw",c.encode(a),{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return Array.from(new Uint8Array(await globalThis.crypto.subtle.sign("HMAC",d,c.encode(b))),a=>a.toString(16).padStart(2,"0")).join("")}async function j(a){let b,c=a??h(),d=`${Date.now()}:${(b=new Uint8Array(16),globalThis.crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,e=await i(c,d);return`${d}:${e}`}async function k(a,b){try{let c=b??h(),d=a.split(":"),e=d.pop(),f=d.join(":");if(!e||!f)return!1;let g=await i(c,f);if(e.length!==g.length)return!1;let j=0;for(let a=0;a<e.length;a++)j|=e.charCodeAt(a)^g.charCodeAt(a);return 0===j}catch{return!1}}function l(a){return`annovibe-auth-${function(){if(process.env.PORT)return process.env.PORT;let a=process.argv;for(let b=0;b<a.length;b++)if(("-p"===a[b]||"--port"===a[b])&&b+1<a.length)return a[b+1];return"30141"}()}=${a}; HttpOnly; SameSite=Lax; Path=/; Max-Age=2592000`}var m=c(62814);function n(){return process.env.PI_CODING_AGENT_DIR??(0,e.join)((0,f.homedir)(),".pi","agent")}function o(){return(0,e.join)(n(),"web-auth.json")}function p(){try{let a=o();if(!(0,d.existsSync)(a))return null;let b=(0,d.readFileSync)(a,"utf-8");return JSON.parse(b)}catch{return null}}function q(a){let b=n();(0,d.existsSync)(b)||(0,d.mkdirSync)(b,{recursive:!0}),(0,d.writeFileSync)(o(),JSON.stringify(a,null,2))}function r(){let a=p();return a?.enabled!==!1&&!!a?.passwordHash}function s(a){let b=p();return!!b?.passwordHash&&(0,g.Dm)(a,b.passwordHash)}function t(){let a=p();return a?.passwordHash??"annovibe-default-secret"}function u(){return j(t())}function v(){let a=p();return a?.totp??null}function w(){let a=p();return a?.totp?.status==="enabled"}let x=/^(1|true|yes|on)$/i;function y(a){var b,c;let d=(b=a.trim()).startsWith('"')&&b.endsWith('"')||b.startsWith("'")&&b.endsWith("'")?b.slice(1,-1):b;if(!d||"unknown"===d.toLowerCase())return null;if(d.startsWith("[")){let a=d.indexOf("]");a>0&&(d=d.slice(1,a))}else/^\d+\.\d+\.\d+\.\d+:\d+$/.test(d)&&(d=d.slice(0,d.lastIndexOf(":")));let e=d.indexOf("%");return e>=0&&(d=d.slice(0,e)),(c=d,/^\d+\.\d+\.\d+\.\d+$/.test(c)||c.includes(":"))?d:null}function z(a){let b=a.split(".");if(4!==b.length)return null;let c=0;for(let a of b){let b=parseInt(a,10);if(isNaN(b)||b<0||b>255)return null;c=c<<8|b}return c>>>0}function A(a){let b=p();if(!b?.totp||"enabled"!==b.totp.status)return!1;if("always"===b.totp.requireMode||!b.totp.requireMode)return!0;let c=b.totp.trustedNetworks??["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"];return!function(a,b){if(!a)return!0;for(let c of b)if(function(a,b){if(b.includes(":")){let[c,d]=b.split("/");return 128===parseInt(d??"128",10)&&a===c}return function(a,b){let[c,d]=b.split("/"),e=parseInt(d??"32",10),f=z(a),g=z(c);if(null===f||null===g||e<0||e>32)return!1;let h=0===e?0:-1<<32-e;return(f&h)==(g&h)}(a,b)}(a,c))return!0;return!1}(function(a){if(!x.test(process.env.ANNOVIBE_TRUST_PROXY_HEADERS??""))return null;let b=a.headers.get("forwarded");if(b){let a=b.split(",")[0]?.trim();if(a)for(let b of a.split(";")){let[a,c]=b.split("=",2);if(a?.trim().toLowerCase()==="for"&&c){let a=y(c);if(a)return a}}}let c=a.headers.get("x-forwarded-for");if(c){let a=y(c.split(",")[0]??"");if(a)return a}let d=a.headers.get("x-real-ip");if(d){let a=y(d);if(a)return a}return null}(a),c)}function B(){let a=p();return a?.totp?.status==="enabled"&&a.totp.secret?a.totp.secret:null}function C(a){var b;let c,d=v();b={secret:a,status:"pending",requireMode:d?.requireMode??"always",trustedNetworks:d?.trustedNetworks},(c=p()??{passwordHash:"",enabled:!0}).totp=b,q(c),(0,m.L)("totp_setup_started")}function D(a){let b=p();if(!b?.totp?.secret)throw Error("No pending TOTP setup");b.totp.status="enabled",b.totp.recoveryCodes=a,b.totp.requireMode||(b.totp.requireMode="always"),b.totp.trustedNetworks||(b.totp.trustedNetworks=["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]),q(b),(0,m.L)("totp_enabled")}function E(a){let b=p();b?.totp&&(b.totp.requireMode=a,q(b))}function F(a){let b=p();b?.totp&&(b.totp.trustedNetworks=a,q(b))}function G(){let a=p();a?.totp&&(delete a.totp,q(a),(0,m.L)("totp_disabled"))}function H(a){let b=p();b?.totp?.recoveryCodes&&(b.totp.recoveryCodes=b.totp.recoveryCodes.filter(b=>b!==a),q(b),(0,m.L)("recovery_code_used"))}let I=":annovibe-temp-token";async function J(){let a=t()+I,b=await j(a);return`t:${b}`}async function K(a){if(!a.startsWith("t:"))return!1;let b=a.slice(2),c=t()+I;if(!await k(b,c))return!1;try{let a=b.split(":");if(a.length<3)return!1;let c=parseInt(a[0],10);if(Date.now()-c>12e4)return!1}catch{return!1}return!0}},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},62814:(a,b,c)=>{"use strict";c.d(b,{L:()=>g});var d=c(29021),e=c(33873),f=c(21820);function g(a,b){try{let c=(0,e.join)(process.env.PI_CODING_AGENT_DIR??(0,e.join)((0,f.homedir)(),".pi","agent"),"auth-audit.jsonl"),g=(0,e.dirname)(c);(0,d.existsSync)(g)||(0,d.mkdirSync)(g,{recursive:!0});let h={ts:new Date().toISOString(),...b?{ip:b}:{},action:a};(0,d.appendFileSync)(c,JSON.stringify(h)+"\n")}catch{}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64227:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{GET:()=>z,POST:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(31828),x=c(2072),y=c(62814);async function z(){let a=(0,w.oB)();return v.NextResponse.json({status:a?.status??"disabled",enabled:(0,w.pg)(),requireMode:a?.requireMode??"always",trustedNetworks:a?.trustedNetworks??["127.0.0.0/8","::1","10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]})}async function A(a){try{let{action:b}=await a.json().catch(()=>({}));if("check-recovery"===b){let{recoveryCode:b}=await a.json();if(!b)return v.NextResponse.json({error:"Recovery code required"},{status:400});let c=(0,w.oB)();if(!c?.recoveryCodes?.length)return v.NextResponse.json({error:"No recovery codes available"},{status:400});let d=(0,x.Ak)(b,c.recoveryCodes);if(!d)return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid recovery code"},{status:401});return(0,w.Vn)(d),v.NextResponse.json({success:!0})}if("setup"===b){let a=(0,x.VZ)();(0,w.hx)(a);let b=(0,x.Yb)(a,"AnnoVibe","AnnoVibe");return v.NextResponse.json({secret:a,uri:b})}if("verify-setup"===b){let b=(0,w.oB)();if(!b||"pending"!==b.status)return v.NextResponse.json({error:"No pending TOTP setup"},{status:400});let{code:c}=await a.json();if(!c||!/^\d{6}$/.test(c))return v.NextResponse.json({error:"6-digit verification code required"},{status:400});if(!await (0,x.z3)(b.secret,c))return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid verification code"},{status:401});let{codes:d,hashes:e}=(0,x.b5)();return(0,w.zb)(e),v.NextResponse.json({success:!0,recoveryCodes:d})}if("disable"===b){let b=(0,w.oB)();if(!b||"enabled"!==b.status)return v.NextResponse.json({error:"TOTP is not enabled"},{status:400});let{code:c}=await a.json();if(!c||!/^\d{6}$/.test(c))return v.NextResponse.json({error:"6-digit verification code required"},{status:400});if(!await (0,x.z3)(b.secret,c))return(0,y.L)("totp_verify_fail"),v.NextResponse.json({error:"Invalid verification code"},{status:401});return(0,w.eh)(),v.NextResponse.json({success:!0})}if("get-recovery-codes"===b){let a=(0,w.oB)();return v.NextResponse.json({recoveryCodesLeft:a?.recoveryCodes?.length??0})}if("set-require-mode"===b){let{requireMode:b}=await a.json();if("always"!==b&&"untrusted"!==b)return v.NextResponse.json({error:"Invalid requireMode. Use 'always' or 'untrusted'"},{status:400});return(0,w.yn)(b),v.NextResponse.json({success:!0})}if("set-trusted-networks"===b){let{trustedNetworks:b}=await a.json();if(!Array.isArray(b))return v.NextResponse.json({error:"trustedNetworks must be an array of CIDR strings"},{status:400});return(0,w.OJ)(b),v.NextResponse.json({success:!0})}return v.NextResponse.json({error:"Unknown action"},{status:400})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/totp/route",pathname:"/api/auth/totp",filename:"route",bundlePath:"app/api/auth/totp/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/auth/totp/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/auth/totp/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||B.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===B.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),b}},k=await B.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4013,716],()=>b(b.s=64227));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3502,a.ids=[3502],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13637:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,dynamic:()=>l});var e=c(75430),f=c(19821),g=c(29021),h=c(33873),i=a([e,f]);[e,f]=i.then?(await i)():i;let l="force-dynamic";function j(a){return a.toLowerCase().replace(/-/g,"")}async function k(){let a=(0,e.getAgentDir)(),b=(0,h.join)(a,"models.json"),c=[];try{if((0,g.existsSync)(b)){let a=JSON.parse((0,g.readFileSync)(b,"utf-8"));c.push(...Object.keys(a.providers??{}))}}catch{}let d=new Set(c.map(j)),i=[],k=0,l=0,m=null;try{let a=e.
|
|
1
|
+
(()=>{var a={};a.id=3502,a.ids=[3502],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13637:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,dynamic:()=>l});var e=c(75430),f=c(19821),g=c(29021),h=c(33873),i=a([e,f]);[e,f]=i.then?(await i)():i;let l="force-dynamic";function j(a){return a.toLowerCase().replace(/-/g,"")}async function k(){let a=(0,e.getAgentDir)(),b=(0,h.join)(a,"models.json"),c=[];try{if((0,g.existsSync)(b)){let a=JSON.parse((0,g.readFileSync)(b,"utf-8"));c.push(...Object.keys(a.providers??{}))}}catch{}let d=new Set(c.map(j)),i=[],k=0,l=0,m=null;try{let a=await e.ModelRuntime.create(),b=await a.getAvailable();k=b.length;let c=d.size>0?b.filter(a=>d.has(j(a.provider))):b;l=c.length,c.length>0&&(m={provider:c[0].provider,id:c[0].id,name:c[0].name})}catch(a){i.push("ModelRuntime failed: "+String(a));try{let a=d.size>0?(0,f.getProviders)().filter(a=>d.has(j(a))):(0,f.getProviders)();for(let b of(k=(0,f.getProviders)().length,a))for(let a of(0,f.getModels)(b))m||(m={provider:a.provider,id:a.id,name:a.name}),l++;i.push("Compat fallback used (getModels/getProviders)")}catch(a){i.push("Compat fallback also failed: "+String(a))}}return Response.json({configuredProviders:c,totalBuiltin:k,filteredCount:l,firstModel:m,errors:i})}d()}catch(a){d(a)}})},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},19821:a=>{"use strict";a.exports=import("@earendil-works/pi-ai/compat")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},83893:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(13637),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/debug-models/route",pathname:"/api/debug-models",filename:"route",bundlePath:"app/api/debug-models/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/debug-models/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/debug-models/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=83893));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
1
|
+
(()=>{var a={};a.id=976,a.ids=[976],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89802:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{POST:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(29021),x=c(21820),y=c(33873);async function z(){try{let a=new Date,b=[a.getFullYear(),String(a.getMonth()+1).padStart(2,"0"),String(a.getDate()).padStart(2,"0")].join(""),c=(0,y.join)((0,x.homedir)(),"annovibe","workspace",b);return(0,w.mkdirSync)(c,{recursive:!0}),v.NextResponse.json({cwd:c})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/default-cwd/route",pathname:"/api/default-cwd",filename:"route",bundlePath:"app/api/default-cwd/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/default-cwd/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/default-cwd/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||A.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===A.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await A.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=89802));module.exports=c})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7067,a.ids=[7067],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17393:(a,b,c)=>{c.d(b,{R7:()=>d});function d(a,b,c=12){let e=b.trim(),f=[];for(let b of a){let a=function(a,b){let c,d=a.path.toLowerCase(),e=-1===(c=d.lastIndexOf("/"))?d:d.slice(c+1),f=b.toLowerCase();return f&&e!==f?e.startsWith(f)?1:d.startsWith(f)?2:e.includes(f)?3:d.includes(f)?4:!function(a,b){if(!b)return!0;let c=0;for(let d of a)if(d===b[c]&&(c+=1),c===b.length)return!0;return!1}(d,f)?null:5:0}(b,e);null!==a&&f.push({entry:b,score:a})}return f.sort((a,b)=>a.score-b.score||Number(b.entry.isDir)-Number(a.entry.isDir)||a.entry.path.length-b.entry.path.length||a.entry.path.localeCompare(b.entry.path)),f.slice(0,Math.max(0,c)).map(a=>a.entry)}},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74974:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>r});var e=c(23211),f=c(79646),g=c(28354),h=c(29021),i=c(33873),j=c(80547),k=c(17393),l=a([j]);j=(l.then?(await l)():l)[0];let s=(0,g.promisify)(f.execFile),t=new Set(["node_modules",".git",".next","dist","build","__pycache__",".turbo",".cache","coverage",".pytest_cache",".mypy_cache","target","vendor",".DS_Store"]),u=[".pyc"];function m(){return globalThis.__annovibeFileIndexCache||(globalThis.__annovibeFileIndexCache=new Map),globalThis.__annovibeFileIndexCache}function n(a){return a.split("\\").join("/")}function o(a){return t.has(a)||u.some(b=>a.endsWith(b))}async function p(a){try{let{stdout:b}=await s("git",["-C",a,"ls-files","-z","--cached","--others","--exclude-standard"],{encoding:"utf8",maxBuffer:0x2000000,timeout:5e3}),c=[];for(let a of b.split("\0")){if(!a)continue;let b=n(a);if(!o(b.split("/").pop()??b)&&(c.push({path:b,isDir:!1}),c.length>=1e5))break}return c}catch{return null}}async function q(a){let b,c,d,e=m().get(a);if(e&&e.expiresAt>Date.now())return e.listing;let f=await p(a),g=f??(b=[],c=!1,(d=(e,f)=>{let g;if(!c&&!(f>8)){try{g=(0,h.readdirSync)(e)}catch{return}for(let j of g){if(o(j))continue;let g=(0,i.join)(e,j),k=!1;try{k=(0,h.statSync)(g).isDirectory()}catch{continue}let l=n((0,i.relative)(a,g));if(k?f<8&&d(g,f+1):b.push({path:l,isDir:!1}),b.length>=5e4){c=!0;return}}}})(a,0),b),j=g.length>=(f?1e5:5e4);g.sort((a,b)=>a.path.localeCompare(b.path));let k={files:g,hardTruncated:j},l=m();if(l.size>=20){let a=l.keys().next().value;void 0!==a&&l.delete(a)}return l.set(a,{listing:k,expiresAt:Date.now()+1e4}),k}async function r(a){let b=a.nextUrl.searchParams.get("cwd")?.trim()??"",c=(a.nextUrl.searchParams.get("q")??"").slice(0,500);if(!b)return e.NextResponse.json({error:"cwd is required"},{status:400});try{let a=await (0,j.mc)();if(!(0,j.B7)(b,a))return e.NextResponse.json({error:"Access denied"},{status:403});let{files:d,hardTruncated:f}=await q(b);if(c)return e.NextResponse.json({cwd:b,files:(0,k.R7)(d,c,50),truncated:f},{headers:{"Cache-Control":"no-store"}});return e.NextResponse.json({cwd:b,files:d.slice(0,5e3),truncated:f||d.length>5e3},{headers:{"Cache-Control":"no-store"}})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87643:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(74974),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-index/route",pathname:"/api/file-index",filename:"route",bundlePath:"app/api/file-index/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-index/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-index/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=87643));module.exports=c})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/file-index/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{},"edgeSSRModuleMapping":{},"clientModules":{},"entryCSSFiles":{"/home/runner/work/annovibe/annovibe/app/api/file-index/route":[]},"rscModuleMapping":{},"edgeRscModuleMapping":{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2929,a.ids=[2929],a.modules={261:a=>{
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2929,a.ids=[2929],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},20355:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(83800),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/delete/route",pathname:"/api/file-tree/delete",filename:"route",bundlePath:"app/api/file-tree/delete/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/delete/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/delete/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},83800:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(23211),f=c(29021),g=c.n(f),h=c(80547),i=a([h]);h=(i.then?(await i)():i)[0];let k="force-dynamic";async function j(a){try{let b=(await a.json()).path;if(!b||"string"!=typeof b)return e.NextResponse.json({error:"Missing 'path' field"},{status:400});if(!g().existsSync(b))return e.NextResponse.json({error:"Not found"},{status:404});let c=await (0,h.mc)();if(!(0,h.B7)(b,c))return e.NextResponse.json({error:"Access denied"},{status:403});try{g().rmSync(b,{recursive:!0,force:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:403})}return e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=20355));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2469,a.ids=[2469],a.modules={261:a=>{
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2469,a.ids=[2469],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46152:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(23211),f=c(29021),g=c.n(f),h=c(80547),i=a([h]);h=(i.then?(await i)():i)[0];let k="force-dynamic";async function j(a){try{let b=(await a.json()).path;if(!b||"string"!=typeof b)return e.NextResponse.json({error:"Missing 'path' field"},{status:400});let c=await (0,h.mc)();if(!(0,h.qG)(b,c))return e.NextResponse.json({error:"Access denied"},{status:403});if(g().existsSync(b))return e.NextResponse.json({error:"Directory already exists"},{status:409});try{g().mkdirSync(b,{recursive:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:403})}return e.NextResponse.json({success:!0,path:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74607:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(46152),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/mkdir/route",pathname:"/api/file-tree/mkdir",filename:"route",bundlePath:"app/api/file-tree/mkdir/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/mkdir/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/mkdir/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=74607));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1938,a.ids=[1938],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64626:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{POST:()=>z,dynamic:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(29021),x=c.n(w);let y="force-dynamic";async function z(a){try{let{oldPath:b,newPath:c}=await a.json();if(!b||!c||"string"!=typeof b||"string"!=typeof c)return v.NextResponse.json({error:"Missing 'oldPath' or 'newPath' fields"},{status:400});if(!x().existsSync(b))return v.NextResponse.json({error:"Source not found"},{status:404});if(x().existsSync(c))return v.NextResponse.json({error:"A file or folder with the new name already exists"},{status:409});try{x().renameSync(b,c)}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a},{status:403})}return v.NextResponse.json({success:!0,path:c})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/rename/route",pathname:"/api/file-tree/rename",filename:"route",bundlePath:"app/api/file-tree/rename/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/rename/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/rename/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||A.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===A.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await A.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=64626));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1938,a.ids=[1938],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8989:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>k});var e=c(23211),f=c(29021),g=c.n(f),h=c(80547),i=a([h]);h=(i.then?(await i)():i)[0];let k="force-dynamic";async function j(a){try{let{oldPath:b,newPath:c}=await a.json();if(!b||!c||"string"!=typeof b||"string"!=typeof c)return e.NextResponse.json({error:"Missing 'oldPath' or 'newPath' fields"},{status:400});if(!g().existsSync(b))return e.NextResponse.json({error:"Source not found"},{status:404});let d=await (0,h.mc)();if(!(0,h.B7)(b,d)||!(0,h.qG)(c,d))return e.NextResponse.json({error:"Access denied"},{status:403});if(g().existsSync(c))return e.NextResponse.json({error:"A file or folder with the new name already exists"},{status:409});try{g().renameSync(b,c)}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:403})}return e.NextResponse.json({success:!0,path:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19645:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(8989),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/rename/route",pathname:"/api/file-tree/rename",filename:"route",bundlePath:"app/api/file-tree/rename/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/rename/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/rename/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=19645));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=5987,a.ids=[5987],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},34201:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>I,patchFetch:()=>H,routeModule:()=>D,serverHooks:()=>G,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>F});var d={};c.r(d),c.d(d,{POST:()=>C,dynamic:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(79646),x=c(29021),y=c.n(x),z=c(33873),A=c.n(z);let B="force-dynamic";async function C(a){try{let b=(await a.json()).path;if(!b||"string"!=typeof b)return v.NextResponse.json({error:"Missing 'path' field"},{status:400});if(!y().existsSync(b))return v.NextResponse.json({error:"Not found"},{status:404});return await new Promise((a,c)=>{let d,e=process.platform;if("darwin"===e)d=y().existsSync(b)&&y().statSync(b).isDirectory()?`open "${b}"`:`open -R "${b}"`;else if("win32"===e)d=`explorer /select,"${b}"`;else{let a=y().existsSync(b)?y().statSync(b):null,c=a?.isDirectory()?b:A().dirname(b);d=`xdg-open "${c}"`}(0,w.exec)(d,b=>{b?c(b):a()})}),v.NextResponse.json({success:!0})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/reveal/route",pathname:"/api/file-tree/reveal",filename:"route",bundlePath:"app/api/file-tree/reveal/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/reveal/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:E,workUnitAsyncStorage:F,serverHooks:G}=D;function H(){return(0,g.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:F})}async function I(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),D.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/reveal/route";"/index"===d&&(d="/");let e=await D.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||D.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===D.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await D.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>D.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>D.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await D.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await D.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await D.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=34201));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=5987,a.ids=[5987],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33283:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(51738),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/reveal/route",pathname:"/api/file-tree/reveal",filename:"route",bundlePath:"app/api/file-tree/reveal/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/reveal/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/reveal/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51738:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>m,dynamic:()=>n});var e=c(23211),f=c(79646),g=c(29021),h=c.n(g),i=c(80547),j=c(33873),k=c.n(j),l=a([i]);i=(l.then?(await l)():l)[0];let n="force-dynamic";async function m(a){try{let b=(await a.json()).path;if(!b||"string"!=typeof b)return e.NextResponse.json({error:"Missing 'path' field"},{status:400});if(!h().existsSync(b))return e.NextResponse.json({error:"Not found"},{status:404});let c=await (0,i.mc)();if(!(0,i.B7)(b,c))return e.NextResponse.json({error:"Access denied"},{status:403});return await new Promise((a,c)=>{let d,e=process.platform;if("darwin"===e)d=h().existsSync(b)&&h().statSync(b).isDirectory()?`open "${b}"`:`open -R "${b}"`;else if("win32"===e)d=`explorer /select,"${b}"`;else{let a=h().existsSync(b)?h().statSync(b):null,c=a?.isDirectory()?b:k().dirname(b);d=`xdg-open "${c}"`}(0,f.exec)(d,b=>{b?c(b):a()})}),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=33283));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7505,a.ids=[7505],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93204:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{POST:()=>B,dynamic:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(29021),x=c.n(w),y=c(33873),z=c.n(y);let A="force-dynamic";async function B(a){try{let b=await a.json(),c=b.path;if(!c||"string"!=typeof c)return v.NextResponse.json({error:"Missing 'path' field"},{status:400});let d=z().dirname(c);try{x().mkdirSync(d,{recursive:!0})}catch{if(!x().existsSync(d)||!x().statSync(d).isDirectory())return v.NextResponse.json({error:"Cannot create parent directory"},{status:403})}try{x().writeFileSync(c,b.content??"","utf-8")}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a},{status:403})}return v.NextResponse.json({success:!0,path:c})}catch(a){return v.NextResponse.json({error:String(a)},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/write/route",pathname:"/api/file-tree/write",filename:"route",bundlePath:"app/api/file-tree/write/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/write/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/write/route";"/index"===d&&(d="/");let e=await C.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||C.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===C.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await C.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>C.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>C.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await C.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await C.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=93204));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7505,a.ids=[7505],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18303:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(50412),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-tree/write/route",pathname:"/api/file-tree/write",filename:"route",bundlePath:"app/api/file-tree/write/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-tree/write/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-tree/write/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},50412:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l,dynamic:()=>m});var e=c(23211),f=c(29021),g=c.n(f),h=c(80547),i=c(33873),j=c.n(i),k=a([h]);h=(k.then?(await k)():k)[0];let m="force-dynamic";async function l(a){try{let b=await a.json(),c=b.path;if(!c||"string"!=typeof c)return e.NextResponse.json({error:"Missing 'path' field"},{status:400});let d=await (0,h.mc)();if(!(0,h.qG)(c,d))return e.NextResponse.json({error:"Access denied"},{status:403});let f=j().dirname(c);try{g().mkdirSync(f,{recursive:!0})}catch{if(!g().existsSync(f)||!g().statSync(f).isDirectory())return e.NextResponse.json({error:"Cannot create parent directory"},{status:403})}try{g().writeFileSync(c,b.content??"","utf-8")}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:403})}return e.NextResponse.json({success:!0,path:c})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=18303));module.exports=c})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var a={};a.id=5218,a.ids=[5218],a.modules={261:a=>{
|
|
1
|
+
"use strict";(()=>{var a={};a.id=5218,a.ids=[5218],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7981:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>i,dynamic:()=>j});var e=c(23211),f=c(87554),g=c(80547),h=a([g]);g=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(a){let b=a.nextUrl.searchParams.get("cwd");if(!b)return e.NextResponse.json({error:"Missing cwd parameter"},{status:400});let c=await (0,g.mc)();if(!(0,g.B7)(b,c))return e.NextResponse.json({error:"Access denied"},{status:403});let d=!1,h=new ReadableStream({start(c){let e=(0,f.B)(b,a=>{if(!d&&(0!==a.updatedDirs.length||0!==a.events.length))try{c.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(a)}
|
|
2
2
|
|
|
3
|
-
`))}catch{
|
|
3
|
+
`))}catch{d=!0,e()}});try{c.enqueue(new TextEncoder().encode(`event: connected
|
|
4
4
|
data: {"cwd":"${b}"}
|
|
5
5
|
|
|
6
|
-
`))}catch{c=!0,e()}a.signal.addEventListener("abort",()=>{c=!0,e()})}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-watch/route",pathname:"/api/file-watch",filename:"route",bundlePath:"app/api/file-watch/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-watch/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-watch/route";"/index"===d&&(d="/");let e=await E.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await E.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>E.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>E.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await E.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=395));module.exports=c})();
|
|
6
|
+
`))}catch{d=!0,e()}a.signal.addEventListener("abort",()=>{d=!0,e()})}});return new Response(h,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{a.exports=require("os")},29021:a=>{a.exports=require("fs")},29245:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(7981),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file-watch/route",pathname:"/api/file-watch",filename:"route",bundlePath:"app/api/file-watch/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/file-watch/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/file-watch/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{B7:()=>o,mc:()=>n,qG:()=>p,wz:()=>m});var e=c(29021),f=c(21820),g=c(33873),h=c(40402),i=c(10237),j=c(82536),k=a([h,i]);function l(){return globalThis.__annovibeAdditionalAllowedRoots||(globalThis.__annovibeAdditionalAllowedRoots=new Set),globalThis.__annovibeAdditionalAllowedRoots}function m(a){let b=a?.trim();if(!b)return;let c=(0,j.Nw)(b);l().add(c),globalThis.__annovibeAllowedRootsCache?.roots.add(c)}async function n(){let a=Date.now(),b=globalThis.__annovibeAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=new Set;try{for(let a of(await (0,h.dQ)()))a.cwd&&c.add((0,j.Nw)(a.cwd))}catch{}let d=(0,i.IJ)();if(d.ok)for(let a of Object.values(d.registry.projects))a.cwd&&c.add((0,j.Nw)(a.cwd));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^pi-cwd-\d{8}$/.test(a)&&c.add((0,j.Nw)((0,g.join)((0,f.homedir)(),a)))}catch{}for(let a of l())c.add(a);return globalThis.__annovibeAllowedRootsCache={roots:c,expiresAt:a+5e3},c}function o(a,b){return(0,j.xk)(a,b)}function p(a,b){if(!(0,j.o4)(a,b))return!1;let c=a;for(let a=0;a<64;a++){if((0,j.xk)(c,b))return!0;if((0,e.existsSync)(c))break;let a=(0,g.join)(c,"..");if(a===c)break;c=a}return!1}[h,i]=k.then?(await k)():k,d()}catch(a){d(a)}})},82536:(a,b,c)=>{c.d(b,{Nw:()=>h,o4:()=>j,uK:()=>i,xk:()=>k});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return a.replace(/\\/g,"/")}function i(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function j(a,b){for(let c of b){let b=i(a)||i(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),h=d.resolve(c),j=b?g.toLowerCase():g,k=b?h.toLowerCase():h,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}function k(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 j(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87554:(a,b,c)=>{c.d(b,{B:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=[/[/\\]node_modules[/\\]/,/[/\\]\.git[/\\]/,/[/\\]\.next[/\\]/,/[/\\]dist[/\\]/,/[/\\]build[/\\]/,/[/\\]__pycache__[/\\]/,/[/\\]\.cache[/\\]/,/[/\\]\.turbo[/\\]/,/[/\\]vendor[/\\]/,/[/\\]target[/\\]/,/\.pyc$/,/\.DS_Store$/];function i(a){return h.some(b=>b.test(a))}function j(a,b){let c=(globalThis.__piFileWatchers||(globalThis.__piFileWatchers=new Map),globalThis.__piFileWatchers),d=c.get(a);if(!d)try{let b=e().watch(a,{recursive:!0},(b,c)=>{var f,h;if(!c)return;let j=g().join(a,c);if(i(j))return;let k="rename"===b?e().existsSync(j)?"add":"unlink":"change";f=d,h={type:k,path:j},f.pendingEvents.set(h.path,h),f.debounceTimer&&clearTimeout(f.debounceTimer),f.debounceTimer=setTimeout(()=>{let a=new Set;for(let[,b]of f.pendingEvents)a.add(function(a){let b=Math.max(a.lastIndexOf("/"),a.lastIndexOf("\\"));return b>0?a.slice(0,b):a}(b.path));let b=[];for(let c of a)b.push({dirPath:c,children:function(a){try{return e().readdirSync(a).filter(b=>!i(g().join(a,b))).map(b=>{try{let c=g().join(a,b),d=e().statSync(c);return{name:b,isDir:d.isDirectory(),size:d.isFile()?d.size:0,modified:d.mtime.toISOString()}}catch{return null}}).filter(Boolean)}catch{return[]}}(c)});let c={updatedDirs:b,events:Array.from(f.pendingEvents.values())};for(let a of(f.pendingEvents.clear(),f.listeners))try{a(c)}catch{}},300)});b.on("error",()=>{c.delete(a)}),d={watcher:b,listeners:new Set,refCount:0,debounceTimer:null,pendingEvents:new Map},c.set(a,d)}catch{return()=>{}}d.refCount++;let f=a=>{"updatedDirs"in a&&b(a)};return d.listeners.add(f),()=>{d.listeners.delete(f),d.refCount--,d.refCount<=0&&(d.watcher.close(),null!==d.debounceTimer&&clearTimeout(d.debounceTimer),c.delete(a))}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,7831,402],()=>b(b.s=29245));module.exports=c})();
|