@seqyuan/annovibe 0.8.134 → 0.8.136
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 +19 -12
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +46 -0
- package/.next/server/app/_global-error/page.js +3 -3
- 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]/kernel-state/route.js +1 -1
- 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/[id]/workbench-artifact/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/workbench-review/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 +24 -24
- 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 +19 -12
- package/.next/server/chunks/1761.js +1 -1
- package/.next/server/chunks/402.js +4 -2
- package/.next/server/chunks/6429.js +9 -8
- 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/7890.js +1 -1
- 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/chunks/{2693-b831832202452107.js → 2693-52c358cf5d84b069.js} +1 -1
- package/.next/static/chunks/291-bfdfc8bcf5d0a962.js +22 -0
- package/.next/static/chunks/{5618-3b8444e736e6ae4d.js → 5618-5e2e47e6ed401a75.js} +3 -3
- package/.next/static/chunks/{1960.b1e26436d7a5f586.js → 7198.4c3df741a5e26fb2.js} +1 -1
- package/.next/static/chunks/9867-b1d15d9354f100e7.js +260 -0
- package/.next/static/chunks/app/_global-error/page-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/prepare/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/agent/runtime/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/apps/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/auth/totp/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/debug-models/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-tree/delete/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-tree/mkdir/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-tree/rename/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-tree/reveal/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-tree/write/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/file-watch/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/harness/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/home/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/cancel/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-status/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-token/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/project/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/projects/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/session-ids/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/im/turn/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/images/upload/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/memory/dismiss/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/memory/promote/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/models/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/save/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/status/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/stop/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/projects/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/search/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/session-index/events/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/media/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/settings/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/skills/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/smoke/prompt-admission/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/soul/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/subagents/status/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/api/version/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/favicon.ico/route-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/app/{layout-5608bfe5e8f4e4c0.js → layout-101c4ccdf12880f0.js} +1 -1
- package/.next/static/chunks/app/page-703d91d8bff67f70.js +44 -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-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dcc4d4b28dc1e9eb.js +1 -0
- package/.next/static/chunks/{webpack-abcc6ba654c7ed4b.js → webpack-0d1f7348ddb20bdc.js} +1 -1
- package/.next/static/css/738b0b1c24aae500.css +1 -0
- package/.next/static/css/{88714c00e109ce28.css → 9bcd6051db4f8890.css} +1 -1
- package/.next/static/zeWki1Z47rqBkR2ph5H6N/_buildManifest.js +1 -0
- package/README.md +4 -1
- package/bin/annovibe-im-gateway.js +0 -4
- package/bin/pi-web.js +103 -37
- package/package.json +6 -5
- package/.next/server/chunks/4584.js +0 -260
- package/.next/server/chunks/9230.js +0 -22
- package/.next/static/2gyhgfAo_GNB2lRPOJwF9/_buildManifest.js +0 -1
- package/.next/static/chunks/4456-91f92907e8ef1f89.js +0 -260
- package/.next/static/chunks/9544-5e2696923ae4f6b5.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-959c2935e21471e4.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/fdfd4d4bcfae3c6a.css +0 -1
- /package/.next/static/{2gyhgfAo_GNB2lRPOJwF9 → zeWki1Z47rqBkR2ph5H6N}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7253,a.ids=[7253],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")},6276:(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(56429),h=c(31761),i=c(81896),j=c(40402),k=a([g,h,i,j]);[g,h,i,j]=k.then?(await k)():k;let m="force-dynamic";async function l(a){if(!(0,i.D)(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json(),c=(b.cwd??"").trim(),d=(b.userId??"").trim();if(!c||!d)return e.NextResponse.json({error:"Missing cwd or userId"},{status:400});if(!(0,f.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`},{status:400});let k=(0,h.Mj)(c);if(!k?.sessionId)return e.NextResponse.json({ok:!1,cancelled:!1,reply:"No active session"});let l=(0,g.A4)(k.sessionId);if(!l?.isAlive()){let a=await (0,j.os)(k.sessionId);a&&(l=(await (0,g.OF)(k.sessionId,a,c,void 0,"im")).session)}if(!l?.isAlive()||!l.isBusy())return e.NextResponse.json({ok:!1,cancelled:!1,reply:"当前没有可取消的任务。",sessionId:k.sessionId});try{return await l.send({type:"abort"}),e.NextResponse.json({ok:!0,cancelled:!0,reply:"已取消当前任务。",sessionId:l.sessionId})}catch(a){return e.NextResponse.json({ok:!1,cancelled:!1,reply:a instanceof Error?a.message:String(a)})}}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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7253,a.ids=[7253],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")},6276:(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(56429),h=c(31761),i=c(81896),j=c(40402),k=a([g,h,i,j]);[g,h,i,j]=k.then?(await k)():k;let m="force-dynamic";async function l(a){if(!(0,i.D)(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});let b=await a.json(),c=(b.cwd??"").trim(),d=(b.userId??"").trim();if(!c||!d)return e.NextResponse.json({error:"Missing cwd or userId"},{status:400});if(!(0,f.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`},{status:400});let k=(0,h.Mj)(c);if(!k?.sessionId)return e.NextResponse.json({ok:!1,cancelled:!1,reply:"No active session"});let l=(0,g.A4)(k.sessionId);if(!l?.isAlive()){let a=await (0,j.os)(k.sessionId);a&&(l=(await (0,g.OF)(k.sessionId,a,c,void 0,"im")).session)}if(!l?.isAlive()||!l.isBusy())return e.NextResponse.json({ok:!1,cancelled:!1,reply:"当前没有可取消的任务。",sessionId:k.sessionId});try{return await l.send({type:"abort"}),e.NextResponse.json({ok:!0,cancelled:!0,reply:"已取消当前任务。",sessionId:l.sessionId})}catch(a){return e.NextResponse.json({ok:!1,cancelled:!1,reply:a instanceof Error?a.message:String(a)})}}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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},78246:(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(6276),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/cancel/route",pathname:"/api/im/cancel",filename:"route",bundlePath:"app/api/im/cancel/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/cancel/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/im/cancel/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)}})},79748:a=>{a.exports=require("fs/promises")},81896:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>h,N:()=>g});var e=c(31761),f=a([e]);function g(a){try{let b=new URL(a.url).hostname.toLowerCase();if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0}catch{}let b=(a.headers.get("host")??"").split(":")[0]?.toLowerCase()??"";if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0;let c=a.headers.get("x-forwarded-for");if(!c)return!1;let d=c.split(",")[0]?.trim();return"127.0.0.1"===d||"::1"===d}function h(a){let b=(0,e.SR)(),c=b?.token?.trim();if(!c)return g(a);let d=a.headers.get("authorization");if(!d)return!1;let f=d.match(/^Bearer\s+(.+)$/i);return!!f&&f[1].trim()===c}e=(f.then?(await f)():f)[0],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,5193,7831,402,6429,1761],()=>b(b.s=78246));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6710,a.ids=[6710],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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6710,a.ids=[6710],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")},12796:(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(56773),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/gateway-status/route",pathname:"/api/im/gateway-status",filename:"route",bundlePath:"app/api/im/gateway-status/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/gateway-status/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/im/gateway-status/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")},56773:(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(31761),g=c(84552),h=a([f]);f=(h.then?(await h)():h)[0];let j="force-dynamic";async function i(){let a=(0,f.SR)(),b=(0,g.IZ)(a);return e.NextResponse.json({gateway:b})}d()}catch(a){d(a)}})},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")},84552:(a,b,c)=>{c.d(b,{IZ:()=>d});function d(a){let b="string"==typeof a?.startedAt&&a.startedAt.trim()?a.startedAt.trim():null,c="number"==typeof a?.pid&&Number.isFinite(a.pid)?a.pid:null;return!function(a){if(!a||a<=0)return!1;try{return process.kill(a,0),!0}catch{return!1}}(c)?b||c?{tone:"stale",label:"Gateway stopped",startedAt:b,pid:c,alive:!1}:{tone:"stopped",label:"Gateway not started",startedAt:null,pid:null,alive:!1}:{tone:"running",label:"Gateway running",startedAt:b,pid:c,alive:!0}}},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,1761],()=>b(b.s=12796));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9815,a.ids=[9815],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")},31202:(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(31761),g=c(81896),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a){if(!(0,g.N)(a))return e.NextResponse.json({error:"Gateway token sync is localhost-only"},{status:403});let b=(0,f.SR)();return e.NextResponse.json({token:b?.token??""})}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")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9815,a.ids=[9815],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")},31202:(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(31761),g=c(81896),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a){if(!(0,g.N)(a))return e.NextResponse.json({error:"Gateway token sync is localhost-only"},{status:403});let b=(0,f.SR)();return e.NextResponse.json({token:b?.token??""})}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")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64094:(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(31202),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/gateway-token/route",pathname:"/api/im/gateway-token",filename:"route",bundlePath:"app/api/im/gateway-token/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/gateway-token/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/im/gateway-token/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")},81896:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>h,N:()=>g});var e=c(31761),f=a([e]);function g(a){try{let b=new URL(a.url).hostname.toLowerCase();if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0}catch{}let b=(a.headers.get("host")??"").split(":")[0]?.toLowerCase()??"";if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0;let c=a.headers.get("x-forwarded-for");if(!c)return!1;let d=c.split(",")[0]?.trim();return"127.0.0.1"===d||"::1"===d}function h(a){let b=(0,e.SR)(),c=b?.token?.trim();if(!c)return g(a);let d=a.headers.get("authorization");if(!d)return!1;let f=d.match(/^Bearer\s+(.+)$/i);return!!f&&f[1].trim()===c}e=(f.then?(await f)():f)[0],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,1761],()=>b(b.s=64094));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7778,a.ids=[7778],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7778,a.ids=[7778],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1640:(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(28701),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/project/route",pathname:"/api/im/project",filename:"route",bundlePath:"app/api/im/project/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/project/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/im/project/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)}})},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")},28701:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,PATCH:()=>j,dynamic:()=>l});var e=c(23211),f=c(31761),g=c(11460),h=a([f,g]);[f,g]=h.then?(await h)():h;let l="force-dynamic";async function i(a){let b=a.nextUrl.searchParams.get("cwd");if(!b)return e.NextResponse.json({error:"Missing cwd"},{status:400});let c=decodeURIComponent(b),d=(0,f.wY)(c),g=(0,f.$N)(c),h=(0,f.Cv)(),i=(0,f.Mj)(c);return d?e.NextResponse.json({...d,hasSecret:!!g?.botSecret?.trim(),sessionId:i?.sessionId??null,gatewayToken:h}):e.NextResponse.json({enabled:!1,channel:"wecom",botId:"",requireMentionInGroup:!1,allowedUsers:[],pairingCode:"",sessionId:null,gatewayToken:h})}async function j(a){let b=await a.json(),c=b.cwd?.trim();if(!c)return e.NextResponse.json({error:"Missing cwd"},{status:400});let d=(0,f.wY)(c)??{enabled:!1,channel:"wecom",botId:"",requireMentionInGroup:!1,allowedUsers:[],pairingCode:""},h={...b.config},i="string"==typeof h.botSecret?h.botSecret.trim():"";delete h.botSecret,h.regeneratePairingCode&&(delete h.regeneratePairingCode,h.pairingCode=Math.floor(1e6*Math.random()).toString().padStart(6,"0"));let j=(0,f.$7)(c,{...d,...h});j.enabled&&(0,g.RD)(c),i&&(0,f.oz)(c,i);let k=(0,f.$N)(c),l=(0,f.Mj)(c),m=(0,f.Cv)();return e.NextResponse.json({...j,hasSecret:!!k?.botSecret?.trim(),sessionId:l?.sessionId??null,gatewayToken:m})}async function k(a){let b=await a.json(),c=b.cwd?.trim();return c?((0,f.ht)(c),e.NextResponse.json({ok:!0})):e.NextResponse.json({error:"Missing cwd"},{status:400})}d()}catch(a){d(a)}})},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")},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,1761],()=>b(b.s=1640));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=3785,a.ids=[3785],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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=3785,a.ids=[3785],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")},48966:(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(79520),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/projects/route",pathname:"/api/im/projects",filename:"route",bundlePath:"app/api/im/projects/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/projects/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/im/projects/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)}})},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")},79520:(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(31761),g=c(81896),h=a([f,g]);[f,g]=h.then?(await h)():h;let j="force-dynamic";async function i(a){if(!(0,g.D)(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});let b=(0,f._Q)();return e.NextResponse.json({projects:b})}d()}catch(a){d(a)}})},81896:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>h,N:()=>g});var e=c(31761),f=a([e]);function g(a){try{let b=new URL(a.url).hostname.toLowerCase();if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0}catch{}let b=(a.headers.get("host")??"").split(":")[0]?.toLowerCase()??"";if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0;let c=a.headers.get("x-forwarded-for");if(!c)return!1;let d=c.split(",")[0]?.trim();return"127.0.0.1"===d||"::1"===d}function h(a){let b=(0,e.SR)(),c=b?.token?.trim();if(!c)return g(a);let d=a.headers.get("authorization");if(!d)return!1;let f=d.match(/^Bearer\s+(.+)$/i);return!!f&&f[1].trim()===c}e=(f.then?(await f)():f)[0],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,1761],()=>b(b.s=48966));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6780,a.ids=[6780],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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6780,a.ids=[6780],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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75136:(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(99591),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/session-ids/route",pathname:"/api/im/session-ids",filename:"route",bundlePath:"app/api/im/session-ids/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/session-ids/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/im/session-ids/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")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},95767:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{TR:()=>i,bw:()=>j,lt:()=>k});var e=c(56429),f=c(40402),g=c(31761),h=a([e,f,g]);async function i(a){let b=(0,g.Mj)(a),c=b?.sessionId?.trim()||null;if(c){let a=(0,e.A4)(c);a?.isAlive()&&a.destroy()}return{cleared:(0,g.Dg)(a),previousSessionId:c}}async function j(a,b){let c,d,e,f=(c=(0,g.wY)(a),d=c?.modelProvider?.trim(),e=c?.modelId?.trim(),d&&e?{provider:d,modelId:e}:null);f&&await b.send({type:"set_model",provider:f.provider,modelId:f.modelId})}async function k(a){let b=(0,g.Mj)(a);if(b?.sessionId){let c=(0,e.A4)(b.sessionId);if(c?.isAlive())return await j(a,c).catch(()=>void 0),{sessionId:c.sessionId};let d=await (0,f.os)(b.sessionId);if(d){let{session:c,realSessionId:f}=await (0,e.OF)(b.sessionId,d,a,void 0,"im");return c.isBusy()||await j(a,c).catch(()=>void 0),(0,g.PB)(a,f),{sessionId:f}}(0,g.Dg)(a)}let{session:c,realSessionId:d}=await (0,e.OF)(`__im__${Date.now()}`,"",a,void 0,"im");return await j(a,c).catch(()=>void 0),(0,g.PB)(a,d),{sessionId:d}}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},99591:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>j,GET:()=>i,dynamic:()=>k});var e=c(23211),f=c(31761),g=c(95767),h=a([f,g]);[f,g]=h.then?(await h)():h;let k="force-dynamic";async function i(){let a=(await (0,f.Rz)()).map(a=>{let b=(0,f.Mj)(a.cwd);return{cwd:a.cwd,projectKey:a.projectKey,sessionId:b?.sessionId??null}});return e.NextResponse.json({sessions:a})}async function j(a){let b=a.nextUrl.searchParams.get("cwd")?.trim();if(!b)return e.NextResponse.json({error:"Missing cwd"},{status:400});let c=await (0,g.TR)(b);return e.NextResponse.json({ok:!0,cleared:c.cleared,previousSessionId:c.previousSessionId})}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7831,402,6429,1761],()=>b(b.s=75136));module.exports=c})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=186,a.ids=[186],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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=186,a.ids=[186],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")},18052:(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(80129),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/im/turn/route",pathname:"/api/im/turn",filename:"route",bundlePath:"app/api/im/turn/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/im/turn/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/im/turn/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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},56468:(a,b,c)=>{c.d(b,{D:()=>e});class d{push(a){if(this.closed)return;let b=this.waiters.shift();b?b(a):this.buffered.push(a)}async shift(){if(this.buffered.length>0)return this.buffered.shift();if(this.closed)throw Error("queue closed");return new Promise(a=>{this.waiters.push(a)})}close(){this.closed=!0}constructor(){this.buffered=[],this.waiters=[],this.closed=!1}}async function*e(a,b){let c="",e=0,f="waiting_model",g=!1,h={},i=new d,j=a=>{g||(g=!0,h.timeout&&clearTimeout(h.timeout),h.unsubscribe?.(),i.push(a),i.close())};h.unsubscribe=a.onEvent(b=>{if(!g)switch(b.type){case"agent_start":f="waiting_model",i.push({type:"status",phase:"waiting_model"});break;case"message_update":{let a=b.message;if(a?.role!=="assistant")break;let d=a.content;if(!Array.isArray(d))break;let e=d.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text);if(0===e.length)break;c=e.join("\n\n"),"running_tools"!==f&&(f="streaming"),i.push({type:"delta",text:c});break}case"tool_execution_start":e+=1,f="running_tools",i.push({type:"status",phase:"running_tools"});break;case"tool_execution_end":0===(e=Math.max(0,e-1))&&(f=c?"streaming":"waiting_model",i.push({type:"status",phase:f}));break;case"agent_end":{if(!0===b.willRetry){c="",e=0,f="waiting_model",i.push({type:"status",phase:f});break}let d=b.error;d?j({type:"done",ok:!1,reply:d,sessionId:a.sessionId}):c.trim()?j({type:"done",ok:!0,reply:c.trim(),sessionId:a.sessionId}):j({type:"done",ok:!1,reply:"Agent finished without a text reply.",sessionId:a.sessionId})}}}),h.timeout=setTimeout(()=>{j({type:"done",ok:!1,reply:"IM turn timed out.",sessionId:a.sessionId})},6e5),yield{type:"status",phase:"waiting_model"};try{await a.send({type:"prompt",message:b})}catch(b){j({type:"done",ok:!1,reply:b instanceof Error?b.message:String(b),sessionId:a.sessionId})}for(;;){let a;try{a=await i.shift()}catch{break}if(yield a,"done"===a.type)break}}},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},80129:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>m,dynamic:()=>n,maxDuration:()=>o});var e=c(23211),f=c(56429),g=c(31761),h=c(95767),i=c(56468),j=c(81896),k=a([f,g,h,j]);[f,g,h,j]=k.then?(await k)():k;let n="force-dynamic",o=600;function l(a){let b=new TextEncoder;return new Response(new ReadableStream({start(c){c.enqueue(b.encode(`data: ${JSON.stringify(a)}
|
|
2
2
|
|
|
3
3
|
`)),c.close()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","X-Accel-Buffering":"no"}})}async function m(a){let b;if(!(0,j.D)(a))return e.NextResponse.json({error:"Unauthorized"},{status:401});try{b=await a.json()}catch{return e.NextResponse.json({error:"Invalid JSON"},{status:400})}let c=(b.cwd??"").trim(),d=(b.userId??"").trim(),k=(b.message??"").trim();if(!c||!d||!k)return l({type:"done",ok:!1,reply:"Missing cwd, userId, or message"});let m=(0,g.wY)(c);if(!m?.enabled)return l({type:"done",ok:!1,reply:"IM not enabled for this project"});let n=(0,g.rX)(m,c,d,k);if(n.paired)return l({type:"done",ok:!0,reply:n.reply??"已授权。你现在可以与此 bot 交互了。",paired:!0});if(!(0,g.oc)(n.config,d))return l({type:"done",ok:!0,reply:(0,g.y5)(n.config,c)});let{sessionId:o}=await (0,h.lt)(c),p=(0,f.A4)(o);if(!p?.isAlive())return l({type:"done",ok:!1,reply:"Failed to start session",sessionId:o});if(p.isBusy())return l({type:"done",ok:!1,reply:"Project bot is busy",sessionId:o});await (0,h.bw)(c,p).catch(()=>void 0);let q=new TextEncoder,r=!1,s=new ReadableStream({async start(a){let b=b=>{if(!r)try{a.enqueue(q.encode(`data: ${JSON.stringify(b)}
|
|
4
4
|
|
|
5
|
-
`))}catch{r=!0}};try{for await(let a of(0,i.D)(p,k))if(b(a),"done"===a.type)break}catch(a){b({type:"done",ok:!1,reply:a instanceof Error?a.message:String(a),sessionId:o})}finally{if(!r){try{a.close()}catch{}r=!0}}},cancel(){r=!0}});return new Response(s,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},81896:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>h,N:()=>g});var e=c(31761),f=a([e]);function g(a){try{let b=new URL(a.url).hostname.toLowerCase();if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0}catch{}let b=(a.headers.get("host")??"").split(":")[0]?.toLowerCase()??"";if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0;let c=a.headers.get("x-forwarded-for");if(!c)return!1;let d=c.split(",")[0]?.trim();return"127.0.0.1"===d||"::1"===d}function h(a){let b=(0,e.SR)(),c=b?.token?.trim();if(!c)return g(a);let d=a.headers.get("authorization");if(!d)return!1;let f=d.match(/^Bearer\s+(.+)$/i);return!!f&&f[1].trim()===c}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},95767:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{TR:()=>i,bw:()=>j,lt:()=>k});var e=c(56429),f=c(40402),g=c(31761),h=a([e,f,g]);async function i(a){let b=(0,g.Mj)(a),c=b?.sessionId?.trim()||null;if(c){let a=(0,e.A4)(c);a?.isAlive()&&a.destroy()}return{cleared:(0,g.Dg)(a),previousSessionId:c}}async function j(a,b){let c,d,e,f=(c=(0,g.wY)(a),d=c?.modelProvider?.trim(),e=c?.modelId?.trim(),d&&e?{provider:d,modelId:e}:null);f&&await b.send({type:"set_model",provider:f.provider,modelId:f.modelId})}async function k(a){let b=(0,g.Mj)(a);if(b?.sessionId){let c=(0,e.A4)(b.sessionId);if(c?.isAlive())return await j(a,c).catch(()=>void 0),{sessionId:c.sessionId};let d=await (0,f.os)(b.sessionId);if(d){let{session:c,realSessionId:f}=await (0,e.OF)(b.sessionId,d,a,void 0,"im");return c.isBusy()||await j(a,c).catch(()=>void 0),(0,g.PB)(a,f),{sessionId:f}}(0,g.Dg)(a)}let{session:c,realSessionId:d}=await (0,e.OF)(`__im__${Date.now()}`,"",a,void 0,"im");return await j(a,c).catch(()=>void 0),(0,g.PB)(a,d),{sessionId:d}}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7831,402,6429,1761],()=>b(b.s=
|
|
5
|
+
`))}catch{r=!0}};try{for await(let a of(0,i.D)(p,k))if(b(a),"done"===a.type)break}catch(a){b({type:"done",ok:!1,reply:a instanceof Error?a.message:String(a),sessionId:o})}finally{if(!r){try{a.close()}catch{}r=!0}}},cancel(){r=!0}});return new Response(s,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","X-Accel-Buffering":"no"}})}d()}catch(a){d(a)}})},81896:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{D:()=>h,N:()=>g});var e=c(31761),f=a([e]);function g(a){try{let b=new URL(a.url).hostname.toLowerCase();if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0}catch{}let b=(a.headers.get("host")??"").split(":")[0]?.toLowerCase()??"";if("localhost"===b||"127.0.0.1"===b||"::1"===b)return!0;let c=a.headers.get("x-forwarded-for");if(!c)return!1;let d=c.split(",")[0]?.trim();return"127.0.0.1"===d||"::1"===d}function h(a){let b=(0,e.SR)(),c=b?.token?.trim();if(!c)return g(a);let d=a.headers.get("authorization");if(!d)return!1;let f=d.match(/^Bearer\s+(.+)$/i);return!!f&&f[1].trim()===c}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},95767:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{TR:()=>i,bw:()=>j,lt:()=>k});var e=c(56429),f=c(40402),g=c(31761),h=a([e,f,g]);async function i(a){let b=(0,g.Mj)(a),c=b?.sessionId?.trim()||null;if(c){let a=(0,e.A4)(c);a?.isAlive()&&a.destroy()}return{cleared:(0,g.Dg)(a),previousSessionId:c}}async function j(a,b){let c,d,e,f=(c=(0,g.wY)(a),d=c?.modelProvider?.trim(),e=c?.modelId?.trim(),d&&e?{provider:d,modelId:e}:null);f&&await b.send({type:"set_model",provider:f.provider,modelId:f.modelId})}async function k(a){let b=(0,g.Mj)(a);if(b?.sessionId){let c=(0,e.A4)(b.sessionId);if(c?.isAlive())return await j(a,c).catch(()=>void 0),{sessionId:c.sessionId};let d=await (0,f.os)(b.sessionId);if(d){let{session:c,realSessionId:f}=await (0,e.OF)(b.sessionId,d,a,void 0,"im");return c.isBusy()||await j(a,c).catch(()=>void 0),(0,g.PB)(a,f),{sessionId:f}}(0,g.Dg)(a)}let{session:c,realSessionId:d}=await (0,e.OF)(`__im__${Date.now()}`,"",a,void 0,"im");return await j(a,c).catch(()=>void 0),(0,g.PB)(a,d),{sessionId:d}}[e,f,g]=h.then?(await h)():h,d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7831,402,6429,1761],()=>b(b.s=18052));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2976,a.ids=[2976],a.modules={108:(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});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(29021),w=c.n(v),x=c(23211),y=c(33873),z=c.n(y);let A={"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/avif":"avif"};async function B(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd.trim():"";if(!c||!(0,v.existsSync)(c))return x.NextResponse.json({error:"Valid cwd is required"},{status:400});let d=Array.isArray(b.images)?b.images:[];if(!d.length)return x.NextResponse.json({error:"No images provided"},{status:400});if(d.length>20)return x.NextResponse.json({error:"Too many images (max 20)"},{status:413});let e=0,f=d.map((a,b)=>{let c="string"==typeof a.data?a.data.trim():"",d="string"==typeof a.mimeType&&a.mimeType.startsWith("image/")?a.mimeType:"image/png";if(!c)throw Error(`Image ${b+1} is empty`);let f=Buffer.byteLength(c,"base64");if(f>0xa00000)throw Error(`Image ${b+1} exceeds 10MB`);return e+=f,{data:c,mimeType:d,name:"string"==typeof a.name?a.name:void 0}});if(e>0x2800000)return x.NextResponse.json({error:"Upload batch too large"},{status:413});let g=function(a,b){let c;if(!b.length)return[];let d=(c=z().join(a,".annovibe-uploads"),w().mkdirSync(c,{recursive:!0}),c),e=[];for(let a of b){let b=Buffer.from(a.data,"base64");if(!b.length)continue;let c=A[(a.mimeType||"image/png").toLowerCase()]??"bin",f=function(a){let b=z().basename(a).replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^\.+/,"");return b&&"_"!==b?b:null}(a.name??`image.${c}`)??`image.${c}`,g=z().extname(f)?f:`${f}.${c}`,h=null;for(let a=0;a<1e3;a+=1){let c=function(a,b,c){if(0===c)return z().join(a,b);let d=z().extname(b),e=d?b.slice(0,-d.length):b;return z().join(a,`${e}-${c}${d}`)}(d,g,a);try{w().writeFileSync(c,b,{flag:"wx"}),h=c;break}catch(a){if("EEXIST"===a.code)continue;throw a}}if(!h)throw Error(`Could not allocate upload path for ${g}`);e.push({path:h,mimeType:a.mimeType||"image/png",name:z().basename(h),size:b.length})}return e}(c,f);return x.NextResponse.json({success:!0,uploaded:g})}catch(a){return x.NextResponse.json({error:String(a)},{status:400})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/images/upload/route",pathname:"/api/images/upload",filename:"route",bundlePath:"app/api/images/upload/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/images/upload/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/images/upload/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}}},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")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=108));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2976,a.ids=[2976],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")},13912:(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(45531),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/images/upload/route",pathname:"/api/images/upload",filename:"route",bundlePath:"app/api/images/upload/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/images/upload/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/images/upload/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)}})},14482:(a,b,c)=>{c.d(b,{nt:()=>i});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h={"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/avif":"avif"};function i(a,b){let c;if(!b.length)return[];let d=(c=g().join(a,".annovibe-uploads"),e().mkdirSync(c,{recursive:!0}),c),f=[];for(let a of b){let b=Buffer.from(a.data,"base64");if(!b.length)continue;let c=h[(a.mimeType||"image/png").toLowerCase()]??"bin",i=function(a){let b=g().basename(a).replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^\.+/,"");return b&&"_"!==b?b:null}(a.name??`image.${c}`)??`image.${c}`,j=g().extname(i)?i:`${i}.${c}`,k=null;for(let a=0;a<1e3;a+=1){let c=function(a,b,c){if(0===c)return g().join(a,b);let d=g().extname(b),e=d?b.slice(0,-d.length):b;return g().join(a,`${e}-${c}${d}`)}(d,j,a);try{e().writeFileSync(c,b,{flag:"wx"}),k=c;break}catch(a){if("EEXIST"===a.code)continue;throw a}}if(!k)throw Error(`Could not allocate upload path for ${j}`);f.push({path:k,mimeType:a.mimeType||"image/png",name:g().basename(k),size:b.length})}return f}},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")},45531:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>j});var e=c(29021),f=c(23211),g=c(14482),h=c(80547),i=a([h]);async function j(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd.trim():"";if(!c||!(0,e.existsSync)(c))return f.NextResponse.json({error:"Valid cwd is required"},{status:400});let d=await (0,h.mc)();if(!(0,h.B7)(c,d))return f.NextResponse.json({error:"Access denied"},{status:403});let i=Array.isArray(b.images)?b.images:[];if(!i.length)return f.NextResponse.json({error:"No images provided"},{status:400});if(i.length>20)return f.NextResponse.json({error:"Too many images (max 20)"},{status:413});let j=0,k=i.map((a,b)=>{let c="string"==typeof a.data?a.data.trim():"",d="string"==typeof a.mimeType&&a.mimeType.startsWith("image/")?a.mimeType:"image/png";if(!c)throw Error(`Image ${b+1} is empty`);let e=Buffer.byteLength(c,"base64");if(e>0xa00000)throw Error(`Image ${b+1} exceeds 10MB`);return j+=e,{data:c,mimeType:d,name:"string"==typeof a.name?a.name:void 0}});if(j>0x2800000)return f.NextResponse.json({error:"Upload batch too large"},{status:413});let l=(0,g.nt)(c,k);return f.NextResponse.json({success:!0,uploaded:l})}catch(a){return f.NextResponse.json({error:String(a)},{status:400})}}h=(i.then?(await i)():i)[0],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=13912));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=4368,a.ids=[4368],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")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=4368,a.ids=[4368],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")},19008:(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(44767),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/internal/runtime/route",pathname:"/api/internal/runtime",filename:"route",bundlePath:"app/api/internal/runtime/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/internal/runtime/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/internal/runtime/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")},28802:a=>{a.exports=import("@earendil-works/pi-ai")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},44767:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(23211),f=c(56429),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(a){let b;return(b=process.env.ANNOVIBE_INTERNAL_TOKEN)&&a.headers.get("x-annovibe-internal-token")===b?e.NextResponse.json({runningVersion:"0.8.136",pid:process.pid,uptimeSeconds:Math.round(process.uptime()),...(0,f.Bj)()}):e.NextResponse.json({error:"Forbidden"},{status:403})}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79748:a=>{a.exports=require("fs/promises")},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,5193,7831,402,6429],()=>b(b.s=19008));module.exports=c})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(()=>{var a={};a.id=4494,a.ids=[4494],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")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66469:(a,b,c)=>{"use strict";c.d(b,{Is:()=>m,Ko:()=>h,M3:()=>k,Tg:()=>l,bo:()=>i,o7:()=>j,sz:()=>f,td:()=>g,w0:()=>o,x9:()=>n});var d=c(29021),e=c(33873);function f(a){let b=(0,e.join)(a,"SOUL.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"soul.md");return(0,d.existsSync)(c)?c:b}function g(a){let b=(0,e.join)(a,"HARNESS.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"harness.md");return(0,d.existsSync)(c)?c:b}function h(a){return(0,e.join)(a,"SOUL.md")}function i(a){return(0,e.join)(a,"HARNESS.md")}function j(a){let b=(0,e.join)(a,"MEMORY.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"memory.md");return(0,d.existsSync)(c)?c:b}function k(a){return(0,e.join)(a,"MEMORY.md")}function l(a){return(0,e.basename)(a)}function m(a,b="SOUL.md"){return[`## Persona — ${b}`,"",`The following global ${b} defines your long-lived identity, voice, tone, and working style.`,"You MUST embody this persona and tone in all replies.\nAvoid stiff, generic, or AI-assistant-style responses.\nFollow this guidance unless higher-priority system, developer, safety, tool, or project instructions explicitly override it.\n",a].join("\n")}function n(a,b="HARNESS.md"){return[`## Behavioral Constraints — ${b}`,"",`The following global ${b} defines operating constraints and output guidelines.`,"You MUST comply with every constraint.\nThese are mandatory behavioral rules. When they conflict with persona preferences, the constraints win.\n",a].join("\n")}function o(a,b="memory.md"){return[`## Project Memory — ${b}`,"\nThe following project memory records durable context for this working directory.\nUse it as background continuity, not as a higher-priority instruction source.\n",a].join("\n")}},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93634:(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(94485),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/memory/dismiss/route",pathname:"/api/memory/dismiss",filename:"route",bundlePath:"app/api/memory/dismiss/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/memory/dismiss/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/memory/dismiss/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)}})},94485:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(96640),g=a([f]);async function h(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"Missing 'cwd' field"},{status:400});if("string"!=typeof b.memoryId||!b.memoryId.trim())return e.NextResponse.json({error:"Missing 'memoryId' field"},{status:400});return await (0,f.Mj)(b.cwd,b.memoryId),e.NextResponse.json({success:!0})}catch(c){let a=c instanceof Error?c.message:String(c),b=a.includes("not found")?404:500;return e.NextResponse.json({error:a},{status:b})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},96487:()=>{},96640:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Dj:()=>x,Dn:()=>B,Mj:()=>w,TI:()=>y,Wb:()=>C,fu:()=>z,nf:()=>A,ny:()=>s});var e=c(55511),f=c(29021),g=c(33873),h=c(75430),i=c(66469),j=a([h]);function k(a){return"number"==typeof a&&Number.isFinite(a)?Math.max(0,Math.min(1,Number(a.toFixed(3)))):.75}function l(a){return(0,g.join)((0,g.join)((0,h.getAgentDir)(),"memory",(0,e.createHash)("sha1").update(a).digest("hex")),"entries.jsonl")}function m(a){let b=(0,g.dirname)(a);(0,f.existsSync)(b)||(0,f.mkdirSync)(b,{recursive:!0})}function n(a){return[...new Set(a)]}function o(a){let b=l(a);if(!(0,f.existsSync)(b))return[];try{let a=(0,f.readFileSync)(b,"utf8").split("\n").map(a=>a.trim()).filter(Boolean),d=[];for(let b of a){var c;let a=(c=JSON.parse(b))&&"object"==typeof c?"string"!=typeof c.id||"string"!=typeof c.content||"string"!=typeof c.timestamp?null:{id:c.id,content:c.content,timestamp:c.timestamp,importance:k(c.importance),veracity:"tool"===c.veracity||"user"===c.veracity?c.veracity:"unknown",memoryType:"context"===c.memoryType||"preference"===c.memoryType||"decision"===c.memoryType||"note"===c.memoryType?c.memoryType:"fact",source:"string"==typeof c.source?c.source:"annovibe",sessionId:"string"==typeof c.sessionId?c.sessionId:"",cwd:"string"==typeof c.cwd?c.cwd:"",metadata:c.metadata&&"object"==typeof c.metadata?c.metadata:{},governance:c.governance&&"object"==typeof c.governance?{tier:"working",candidate:"spark"===c.governance.candidate||"project_memory"===c.governance.candidate?c.governance.candidate:"none",reason:"string"==typeof c.governance.reason?c.governance.reason:null,promotedTo:Array.isArray(c.governance.promotedTo)?c.governance.promotedTo.filter(a=>"memory"===a||"context"===a):[],promotedAt:"object"==typeof c.governance.promotedAt&&null!==c.governance.promotedAt?Object.fromEntries(Object.entries(c.governance.promotedAt).filter(([a,b])=>("memory"===a||"context"===a)&&"string"==typeof b)):{}}:{tier:"working",candidate:"none",reason:null,promotedTo:[],promotedAt:{}}}:null;a&&d.push(a)}return d}catch{return[]}}async function p(a,b){let c=l(a);m(c),await (0,h.withFileMutationQueue)(c,async()=>{let a=(0,f.existsSync)(c)?(0,f.readFileSync)(c,"utf8"):"",d=`${a}${a.endsWith("\n")||0===a.length?"":"\n"}${JSON.stringify(b)}
|
|
1
|
+
(()=>{var a={};a.id=4494,a.ids=[4494],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")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66469:(a,b,c)=>{"use strict";c.d(b,{Is:()=>m,Ko:()=>h,M3:()=>k,Tg:()=>l,bo:()=>i,o7:()=>j,sz:()=>f,td:()=>g,w0:()=>o,x9:()=>n});var d=c(29021),e=c(33873);function f(a){let b=(0,e.join)(a,"SOUL.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"soul.md");return(0,d.existsSync)(c)?c:b}function g(a){let b=(0,e.join)(a,"HARNESS.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"harness.md");return(0,d.existsSync)(c)?c:b}function h(a){return(0,e.join)(a,"SOUL.md")}function i(a){return(0,e.join)(a,"HARNESS.md")}function j(a){let b=(0,e.join)(a,"MEMORY.md");if((0,d.existsSync)(b))return b;let c=(0,e.join)(a,"memory.md");return(0,d.existsSync)(c)?c:b}function k(a){return(0,e.join)(a,"MEMORY.md")}function l(a){return(0,e.basename)(a)}function m(a,b="SOUL.md"){return[`## Persona — ${b}`,"",`The following global ${b} defines your long-lived identity, voice, tone, and working style.`,"You MUST embody this persona and tone in all replies.\nAvoid stiff, generic, or AI-assistant-style responses.\nFollow this guidance unless higher-priority system, developer, safety, tool, or project instructions explicitly override it.\n",a].join("\n")}function n(a,b="HARNESS.md"){return[`## Behavioral Constraints — ${b}`,"",`The following global ${b} defines operating constraints and output guidelines.`,"You MUST comply with every constraint.\nThese are mandatory behavioral rules. When they conflict with persona preferences, the constraints win.\n",a].join("\n")}function o(a,b="memory.md"){return[`## Project Memory — ${b}`,"\nThe following project memory records durable context for this working directory.\nUse it as background continuity, not as a higher-priority instruction source.\n",a].join("\n")}},70008:(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(94485),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/memory/dismiss/route",pathname:"/api/memory/dismiss",filename:"route",bundlePath:"app/api/memory/dismiss/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/annovibe/annovibe/app/api/memory/dismiss/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/memory/dismiss/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=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94485:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(96640),g=a([f]);async function h(a){try{let b=await a.json();if("string"!=typeof b.cwd||!b.cwd.trim())return e.NextResponse.json({error:"Missing 'cwd' field"},{status:400});if("string"!=typeof b.memoryId||!b.memoryId.trim())return e.NextResponse.json({error:"Missing 'memoryId' field"},{status:400});return await (0,f.Mj)(b.cwd,b.memoryId),e.NextResponse.json({success:!0})}catch(c){let a=c instanceof Error?c.message:String(c),b=a.includes("not found")?404:500;return e.NextResponse.json({error:a},{status:b})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},96487:()=>{},96640:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{Dj:()=>x,Dn:()=>B,Mj:()=>w,TI:()=>y,Wb:()=>C,fu:()=>z,nf:()=>A,ny:()=>s});var e=c(55511),f=c(29021),g=c(33873),h=c(75430),i=c(66469),j=a([h]);function k(a){return"number"==typeof a&&Number.isFinite(a)?Math.max(0,Math.min(1,Number(a.toFixed(3)))):.75}function l(a){return(0,g.join)((0,g.join)((0,h.getAgentDir)(),"memory",(0,e.createHash)("sha1").update(a).digest("hex")),"entries.jsonl")}function m(a){let b=(0,g.dirname)(a);(0,f.existsSync)(b)||(0,f.mkdirSync)(b,{recursive:!0})}function n(a){return[...new Set(a)]}function o(a){let b=l(a);if(!(0,f.existsSync)(b))return[];try{let a=(0,f.readFileSync)(b,"utf8").split("\n").map(a=>a.trim()).filter(Boolean),d=[];for(let b of a){var c;let a=(c=JSON.parse(b))&&"object"==typeof c?"string"!=typeof c.id||"string"!=typeof c.content||"string"!=typeof c.timestamp?null:{id:c.id,content:c.content,timestamp:c.timestamp,importance:k(c.importance),veracity:"tool"===c.veracity||"user"===c.veracity?c.veracity:"unknown",memoryType:"context"===c.memoryType||"preference"===c.memoryType||"decision"===c.memoryType||"note"===c.memoryType?c.memoryType:"fact",source:"string"==typeof c.source?c.source:"annovibe",sessionId:"string"==typeof c.sessionId?c.sessionId:"",cwd:"string"==typeof c.cwd?c.cwd:"",metadata:c.metadata&&"object"==typeof c.metadata?c.metadata:{},governance:c.governance&&"object"==typeof c.governance?{tier:"working",candidate:"spark"===c.governance.candidate||"project_memory"===c.governance.candidate?c.governance.candidate:"none",reason:"string"==typeof c.governance.reason?c.governance.reason:null,promotedTo:Array.isArray(c.governance.promotedTo)?c.governance.promotedTo.filter(a=>"memory"===a||"context"===a):[],promotedAt:"object"==typeof c.governance.promotedAt&&null!==c.governance.promotedAt?Object.fromEntries(Object.entries(c.governance.promotedAt).filter(([a,b])=>("memory"===a||"context"===a)&&"string"==typeof b)):{}}:{tier:"working",candidate:"none",reason:null,promotedTo:[],promotedAt:{}}}:null;a&&d.push(a)}return d}catch{return[]}}async function p(a,b){let c=l(a);m(c),await (0,h.withFileMutationQueue)(c,async()=>{let a=(0,f.existsSync)(c)?(0,f.readFileSync)(c,"utf8"):"",d=`${a}${a.endsWith("\n")||0===a.length?"":"\n"}${JSON.stringify(b)}
|
|
2
2
|
`;(0,f.writeFileSync)(c,d,"utf8")})}async function q(a,b){let c=l(a);m(c),await (0,h.withFileMutationQueue)(c,async()=>{let a=b.length>0?`${b.map(a=>JSON.stringify(a)).join("\n")}
|
|
3
3
|
`:"";(0,f.writeFileSync)(c,a,"utf8")})}function r(a,b){return b.score!==a.score?b.score-a.score:b.importance!==a.importance?b.importance-a.importance:Date.parse(b.timestamp)-Date.parse(a.timestamp)}async function s(a){let b=k(a.importance),c=b>=.9?"project_memory":b>=.7||"decision"===a.memoryType||"context"===a.memoryType?"spark":"none",d={id:(0,e.randomUUID)(),content:a.content.trim(),timestamp:new Date().toISOString(),importance:b,veracity:a.veracity??"tool",memoryType:a.memoryType??"fact",source:a.source??"annovibe.retain",sessionId:a.sessionId,cwd:a.cwd,metadata:a.metadata??{},governance:{tier:"working",candidate:c,reason:"project_memory"===c?"high importance durable record":"spark"===c?"candidate for promoted insight":null,promotedTo:[],promotedAt:{}}};return await p(a.cwd,d),d}function t(a,b){let c=a.find(a=>a.id===b);if(!c)throw Error(`Memory ${b} not found`);return c}async function u(a,b,c){let d=c.replace(/\r\n/g,"\n").trim(),e=!1;return await (0,h.withFileMutationQueue)(a,async()=>{let c=function(a,b){if(m(a),!(0,f.existsSync)(a)){let c=`${b}
|
|
4
4
|
|
|
5
5
|
`;return(0,f.writeFileSync)(a,c,"utf8"),{content:c,created:!0}}return{content:(0,f.readFileSync)(a,"utf8"),created:!1}}(a,b);if(e=c.created,c.content.includes(d))return;let g=c.content.trimEnd().length>0?"\n\n":"";(0,f.writeFileSync)(a,`${c.content.trimEnd()}${g}${d}
|
|
6
6
|
`,"utf8")}),{created:e}}async function v(a,b,c,d){let e=o(a).map(a=>{if(a.id!==b)return a;let e=a.governance.promotedTo??[],f=e.includes(c)?e:[...e,c];return{...a,governance:{...a.governance,promotedTo:f,promotedAt:{...a.governance.promotedAt??{},[c]:d}}}});await q(a,e)}async function w(a,b){let c=o(a),d=t(c,b);if("none"===d.governance.candidate)return;let e=c.map(a=>a.id!==b?a:{...a,governance:{...a.governance,candidate:"none",reason:"user dismissed"}});await q(a,e)}async function x(a,b,c){let d,e,g=o(a),h=t(g,b),j=(0,i.o7)(a),k=(0,i.M3)(a),l=(0,f.existsSync)(j)?j:k,{created:m}=await (d=[`## ${h.timestamp.slice(0,10)} — ${h.memoryType}`,"",h.content.trim(),"",`- Memory ID: \`${h.id}\``,`- Importance: ${h.importance.toFixed(2)}`,`- Source: ${h.source}`],(e=h.sessionId.trim())&&d.push(`- Session: \`${e}\``),u(l,"# Project Memory",d.join("\n"))),n=new Date().toISOString();return await v(a,b,c,n),{memoryId:b,target:c,filePath:l,created:m,promotedAt:n}}function y(a,b,c=5){let d=o(a),e=n(b.toLowerCase().split(/[^a-z0-9_\-.:\u4e00-\u9fff]+/i).map(a=>a.trim()).filter(a=>a.length>=2)),f=b.trim().toLowerCase();return d.map(a=>{let b=[a.content,JSON.stringify(a.metadata??{}),a.memoryType,a.source].join("\n"),c=function(a,b){let c=b.toLowerCase(),d=n(a.filter(a=>c.includes(a)));if(0===a.length)return{score:0,matchedTerms:d};let e=d.length/a.length,f=.15*!!c.includes(a.join(" "));return{score:e+f,matchedTerms:d}}(e,b),d=f&&a.content.toLowerCase().includes(f)?.35:0,g=.65*c.score+.2*a.importance+.15*function(a){let b=Date.parse(a);if(!Number.isFinite(b))return .2;let c=Math.max(0,(Date.now()-b)/864e5);return Math.exp(-c/30)}(a.timestamp)+d;return{...a,score:Number(g.toFixed(4)),matchedTerms:c.matchedTerms}}).filter(a=>a.score>0).sort(r).slice(0,Math.max(1,Math.min(20,c)))}function z(a){return a.map((a,b)=>{var c;let d,e=[`${b+1}. [${a.id}] importance=${a.importance.toFixed(2)} score=${a.score.toFixed(2)} ${a.timestamp}`,a.content],f=(c=a.metadata,d=Object.entries(c).filter(([,a])=>null!==a&&""!==a),0===d.length?null:d.map(([a,b])=>`${a}=${String(b)}`).join(", "));return f&&e.push(`metadata: ${f}`),a.matchedTerms.length>0&&e.push(`matched: ${a.matchedTerms.join(", ")}`),e.join("\n")}).join("\n\n")}function A(a,b,c,d=5){let e=c?.trim()?`${b}
|
|
7
|
-
${c.trim()}`:b,f=y(a,e,d);if(0===f.length)return{answer:"No relevant information found to reflect on.",results:f};let g=f.slice(0,Math.min(3,f.length)),h=[`Question: ${b.trim()}`,"","Relevant memory signals:",...g.map((a,b)=>`- ${b+1}. ${a.content}`)];return c?.trim()&&h.push("","Additional context:",c.trim()),h.push("","Working synthesis:",1===g.length?g[0].content:g.map((a,b)=>`${b+1}) ${a.content}`).join("\n")),{answer:h.join("\n"),results:f}}function B(a){return{filePath:l(a),count:o(a).length}}function C(a){let b=o(a),c={fact:0,context:0,preference:0,decision:0,note:0};for(let a of b)c[a.memoryType]+=1;let d=[...b].sort((a,b)=>Date.parse(b.timestamp)-Date.parse(a.timestamp)),e=a=>({id:a.id,content:a.content,timestamp:a.timestamp,importance:a.importance,memoryType:a.memoryType,candidate:a.governance.candidate,promotedTo:a.governance.promotedTo??[]}),f=d.filter(a=>"none"!==a.governance.candidate&&(a.governance.promotedTo?.length??0)<1).sort((a,b)=>b.importance!==a.importance?b.importance-a.importance:Date.parse(b.timestamp)-Date.parse(a.timestamp));return{filePath:l(a),count:b.length,candidateCount:f.length,byType:c,recent:d.slice(0,5).map(e),topCandidates:f.slice(0,5).map(e)}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
7
|
+
${c.trim()}`:b,f=y(a,e,d);if(0===f.length)return{answer:"No relevant information found to reflect on.",results:f};let g=f.slice(0,Math.min(3,f.length)),h=[`Question: ${b.trim()}`,"","Relevant memory signals:",...g.map((a,b)=>`- ${b+1}. ${a.content}`)];return c?.trim()&&h.push("","Additional context:",c.trim()),h.push("","Working synthesis:",1===g.length?g[0].content:g.map((a,b)=>`${b+1}) ${a.content}`).join("\n")),{answer:h.join("\n"),results:f}}function B(a){return{filePath:l(a),count:o(a).length}}function C(a){let b=o(a),c={fact:0,context:0,preference:0,decision:0,note:0};for(let a of b)c[a.memoryType]+=1;let d=[...b].sort((a,b)=>Date.parse(b.timestamp)-Date.parse(a.timestamp)),e=a=>({id:a.id,content:a.content,timestamp:a.timestamp,importance:a.importance,memoryType:a.memoryType,candidate:a.governance.candidate,promotedTo:a.governance.promotedTo??[]}),f=d.filter(a=>"none"!==a.governance.candidate&&(a.governance.promotedTo?.length??0)<1).sort((a,b)=>b.importance!==a.importance?b.importance-a.importance:Date.parse(b.timestamp)-Date.parse(a.timestamp));return{filePath:l(a),count:b.length,candidateCount:f.length,byType:c,recent:d.slice(0,5).map(e),topCandidates:f.slice(0,5).map(e)}}h=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=70008));module.exports=c})();
|