@seqyuan/annovibe 0.8.69 → 0.8.80
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 +13 -10
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +9 -9
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +20 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_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 +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- 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 +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/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 -0
- package/.next/server/app/api/auth/totp/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/default-cwd/route.js +1 -1
- 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 +2 -2
- package/.next/server/app/api/im/gateway-token/route.js +1 -1
- package/.next/server/app/api/im/project/route.js +2 -2
- package/.next/server/app/api/im/projects/route.js +2 -2
- 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 +7 -0
- package/.next/server/app/api/memory/dismiss/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/memory/promote/route.js +4 -4
- 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/projects/browse/route.js +1 -1
- package/.next/server/app/api/projects/route.js +2 -2
- package/.next/server/app/api/search/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/kernel-state/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/kernel-state/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/plan/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/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 +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- 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 +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/page.js +23 -9
- 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.html +222 -207
- package/.next/server/app/smoke.rsc +3 -3
- package/.next/server/app/smoke.segments/_full.segment.rsc +3 -3
- package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
- package/.next/server/app/smoke.segments/_index.segment.rsc +2 -2
- package/.next/server/app/smoke.segments/_tree.segment.rsc +2 -2
- 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 +13 -10
- package/.next/server/chunks/1494.js +47 -44
- package/.next/server/chunks/4013.js +1 -1
- package/.next/server/chunks/6429.js +202 -0
- package/.next/server/chunks/716.js +1 -0
- package/.next/server/chunks/7307.js +1 -1
- package/.next/server/chunks/7890.js +1 -1
- package/.next/server/chunks/7914.js +14 -0
- package/.next/server/chunks/9962.js +349 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/Lkq74HwcM_5v3YtKypHpV/_buildManifest.js +1 -0
- package/.next/static/chunks/{1142.8248bfb76c695146.js → 1142.463325d879ef45f8.js} +1 -1
- package/.next/static/chunks/{6859.bacad166ee995fe0.js → 2097.6c701b89fd60f2f1.js} +1 -1
- package/.next/static/chunks/{2160.e38d781fd5c4cde0.js → 2160.30eac4452ed5402b.js} +1 -1
- package/.next/static/chunks/363642f4-dc35a7a659350f8e.js +1 -0
- package/.next/static/chunks/4936-9558484c46c3ecc8.js +1 -0
- package/.next/static/chunks/6280-513d6c4ef41995b8.js +173 -0
- package/.next/static/chunks/{6586.395c3c72e985da50.js → 6586.8c2a88c2a55300d2.js} +1 -1
- package/.next/static/chunks/{6686.796c782c33ab8ca9.js → 6686.ba6a712accb45472.js} +1 -1
- package/.next/static/chunks/{9240.d38ddbe94e0bf128.js → 6859.8c142424e1250280.js} +1 -1
- package/.next/static/chunks/90542734.ecc36ada79772529.js +1 -0
- package/.next/static/chunks/9901-eb16ea7a0737ac0d.js +281 -0
- package/.next/static/chunks/app/_global-error/page-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/agent/runtime/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/apps/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/auth/totp/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/harness/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/home/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/cancel/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-status/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/gateway-token/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/project/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/projects/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/session-ids/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/im/turn/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/images/upload/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/memory/dismiss/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/memory/promote/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/models/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/save/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/status/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/plot-kernels/stop/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/projects/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/search/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/plan/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/settings/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/skills/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/soul/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/subagents/status/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/api/version/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/favicon.ico/route-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/app/login/page-41e9f7563ddb72eb.js +1 -0
- package/.next/static/chunks/app/page-bf65dd6dfaa85067.js +45 -0
- package/.next/static/chunks/app/smoke/{page-d1be0dc9ec4396ba.js → page-06d3574061580f4b.js} +2 -2
- package/.next/static/chunks/{framework-711ef29bc66f648c.js → framework-594babcea68f40f6.js} +1 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5a6ec8da473b874d.js +1 -0
- package/.next/static/chunks/webpack-b13282f72690ef5e.js +1 -0
- package/.next/static/css/c9f1fab452e74e95.css +1 -0
- package/package.json +4 -1
- package/.next/server/chunks/7601.js +0 -163
- package/.next/server/chunks/9093.js +0 -349
- package/.next/static/chunks/363642f4-043c1475ab9af70e.js +0 -1
- package/.next/static/chunks/8194-4a4c6b44dcfc55b3.js +0 -173
- package/.next/static/chunks/90542734.dc1a2723e4f6affb.js +0 -1
- package/.next/static/chunks/9901-a87c4e0037c62107.js +0 -278
- package/.next/static/chunks/app/_global-error/page-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/agent/runtime/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/apps/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/harness/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/home/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/cancel/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-status/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/gateway-token/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/project/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/projects/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/session-ids/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/im/turn/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/images/upload/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/internal/runtime/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/memory/promote/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/models/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/save/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/status/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/plot-kernels/stop/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/projects/browse/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/projects/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/search/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/plan/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/settings/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/skills/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/soul/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/subagents/status/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/api/version/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/favicon.ico/route-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/app/login/page-81d155b341701fb2.js +0 -1
- package/.next/static/chunks/app/page-9b0d820413a43b2f.js +0 -31
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8bc0531916c80cbc.js +0 -1
- package/.next/static/chunks/webpack-b7b531a4a8559f64.js +0 -1
- package/.next/static/css/d6038901c29122c8.css +0 -1
- package/.next/static/nFbDyer8nSnq4gO0cB2_z/_buildManifest.js +0 -1
- /package/.next/static/{nFbDyer8nSnq4gO0cB2_z → Lkq74HwcM_5v3YtKypHpV}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=6710,a.ids=[6710],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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},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")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
1
|
+
(()=>{var a={};a.id=6710,a.ids=[6710],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")},6303:(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(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)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},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")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
2
2
|
|
|
3
|
-
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},56773:(a,b,c)=>{"use strict";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=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65886:(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(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)}})},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},84552:(a,b,c)=>{"use strict";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}}c.d(b,{IZ:()=>d})},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,1761],()=>b(b.s=65886));module.exports=c})();
|
|
3
|
+
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},56773:(a,b,c)=>{"use strict";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=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},84552:(a,b,c)=>{"use strict";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}}c.d(b,{IZ:()=>d})},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,1761],()=>b(b.s=6303));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(()=>{var a={};a.id=9815,a.ids=[9815],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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},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")},31202:(a,b,c)=>{"use strict";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=>{"use strict";a.exports=require("path")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
2
2
|
|
|
3
|
-
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},81896:(a,b,c)=>{"use strict";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!1;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=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88168:(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(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)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,1761],()=>b(b.s=88168));module.exports=c})();
|
|
3
|
+
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},81896:(a,b,c)=>{"use strict";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!1;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=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92241:(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(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)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,1761],()=>b(b.s=92241));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7778,a.ids=[7778],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1434:(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(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=>{"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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},28701:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>j,GET:()=>h,PATCH:()=>i,dynamic:()=>k});var e=c(23211),f=c(31761),g=a([f]);f=(g.then?(await g)():g)[0];let k="force-dynamic";async function h(a){let b=a.nextUrl.searchParams.get("cwd");if(!b)return e.NextResponse.json({error:"Missing cwd"},{status:400});let c=(0,f.wY)(decodeURIComponent(b)),d=(0,f.Cv)();return c?e.NextResponse.json({...c,botSecret:void 0,hasSecret:!!c.botSecret,gatewayToken:d}):e.NextResponse.json({enabled:!1,channel:"wecom",botId:"",requireMentionInGroup:!1,allowedUsers:[],pairingCode:"",gatewayToken:d})}async function i(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:""},g={...b.config};g.regeneratePairingCode&&(delete g.regeneratePairingCode,g.pairingCode=Math.floor(1e6*Math.random()).toString().padStart(6,"0"));let h={...d,...g};(0,f.$7)(c,h);let i=(0,f.Mj)(c),j=(0,f.Cv)();return e.NextResponse.json({...h,botSecret:void 0,hasSecret:!!h.botSecret,sessionId:i?.sessionId??null,gatewayToken:j})}async function j(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=>{"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")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
1
|
+
(()=>{var a={};a.id=7778,a.ids=[7778],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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},28701:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>j,GET:()=>h,PATCH:()=>i,dynamic:()=>k});var e=c(23211),f=c(31761),g=a([f]);f=(g.then?(await g)():g)[0];let k="force-dynamic";async function h(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.Cv)(),h=(0,f.Mj)(c);return d?e.NextResponse.json({...d,botSecret:void 0,hasSecret:!!d.botSecret,sessionId:h?.sessionId??null,gatewayToken:g}):e.NextResponse.json({enabled:!1,channel:"wecom",botId:"",requireMentionInGroup:!1,allowedUsers:[],pairingCode:"",sessionId:null,gatewayToken:g})}async function i(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:""},g={...b.config};g.regeneratePairingCode&&(delete g.regeneratePairingCode,g.pairingCode=Math.floor(1e6*Math.random()).toString().padStart(6,"0"));let h={...d,...g};(0,f.$7)(c,h);let i=(0,f.Mj)(c),j=(0,f.Cv)();return e.NextResponse.json({...h,botSecret:void 0,hasSecret:!!h.botSecret,sessionId:i?.sessionId??null,gatewayToken:j})}async function j(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=>{"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")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
2
2
|
|
|
3
|
-
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}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")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,1761],()=>b(b.s=
|
|
3
|
+
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},55931:(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(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)}})},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}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")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,1761],()=>b(b.s=55931));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3785,a.ids=[3785],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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},
|
|
1
|
+
(()=>{var a={};a.id=3785,a.ids=[3785],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")},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},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")},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{$M:()=>e.getAgentDir,BR:()=>m,DK:()=>n,O8:()=>l,Uv:()=>o,dQ:()=>i,os:()=>k});var e=c(75430),f=c(12039),g=c(74788),h=a([e,g]);async function i(){let a=await e.SessionManager.listAll(),b=new Map,c=(0,g.tS)();for(let c of a)b.set(c.path,c.id);let d=j();return a.map(a=>{d.set(a.id,a.path);let e=c[a.id]??null;return{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0,sessionKind:e?.sessionKind,createdBy:e?.createdBy,sessionMeta:e}})}function j(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function k(a){let b=j().get(a);return b||(await i(),j().get(a)??null)}function l(a,b){j().set(a,b)}function m(a){j().delete(a)}function n(a){return e.SessionManager.open(a).getEntries()}function o(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
2
2
|
|
|
3
|
-
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},78335:()=>{},79520:(a,b,c)=>{"use strict";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=await (0,f.Rz)();return e.NextResponse.json({projects:b})}d()}catch(a){d(a)}})},81896:(a,b,c)=>{"use strict";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!1;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=>{"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,1761],()=>b(b.s=26352));module.exports=c})();
|
|
3
|
+
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}[e,g]=h.then?(await h)():h,d()}catch(a){d(a)}})},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")},74788:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>o,Of:()=>p,U5:()=>m,oR:()=>n,tS:()=>l});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=a([h]);h=(i.then?(await i)():i)[0];let q=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),r=Promise.resolve();function j(a){let b;b=(0,g.dirname)(q),(0,e.existsSync)(b)||(0,e.mkdirSync)(b,{recursive:!0});let c=`${q}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(c,JSON.stringify(a,null,2)),(0,e.renameSync)(c,q)}async function k(a){let b,c=r;r=new Promise(a=>{b=a}),await c;try{return await a()}finally{b()}}function l(){if(!(0,e.existsSync)(q))return{};try{let a=JSON.parse((0,e.readFileSync)(q,"utf-8")),b={};for(let[c,d]of Object.entries(a)){let a=function(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}(d);a&&(b[c]=a)}return b}catch{return{}}}function m(a){return l()[a]??null}async function n(a,b){await k(()=>{let c=l();c[a]=b,j(c)})}async function o(a,b){await k(()=>{let c=l(),d=c[a];d&&(c[a]={...d,...b},j(c))})}async function p(a){await k(()=>{let b=l();a in b&&(delete b[a],j(b))})}d()}catch(a){d(a)}})},75430:a=>{"use strict";a.exports=import("@earendil-works/pi-coding-agent")},77737:(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(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)}})},78335:()=>{},79520:(a,b,c)=>{"use strict";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=await (0,f.Rz)();return e.NextResponse.json({projects:b})}d()}catch(a){d(a)}})},81896:(a,b,c)=>{"use strict";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!1;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=>{"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,1761],()=>b(b.s=77737));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")},
|
|
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")},75430:a=>{a.exports=import("@earendil-works/pi-coding-agent")},76760:a=>{a.exports=require("node:path")},77315:(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)}})},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,7914,6429,1761],()=>b(b.s=77315));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")},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,f="",g=0,h="waiting_model",i=!1,j=new d,k=a=>{i||(i=!0,c&&clearTimeout(c),e?.(),j.push(a),j.close())};e=a.onEvent(b=>{if(!i)switch(b.type){case"agent_start":h="waiting_model",j.push({type:"status",phase:"waiting_model"});break;case"message_update":{let a=b.message;if(a?.role!=="assistant")break;let c=a.content;if(!Array.isArray(c))break;let d=c.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text);if(0===d.length)break;f=d.join("\n\n"),"running_tools"!==h&&(h="streaming"),j.push({type:"delta",text:f});break}case"tool_execution_start":g+=1,h="running_tools",j.push({type:"status",phase:"running_tools"});break;case"tool_execution_end":0===(g=Math.max(0,g-1))&&(h=f?"streaming":"waiting_model",j.push({type:"status",phase:h}));break;case"agent_end":{let c=b.error;c?k({type:"done",ok:!1,reply:c,sessionId:a.sessionId}):f.trim()?k({type:"done",ok:!0,reply:f.trim(),sessionId:a.sessionId}):k({type:"done",ok:!1,reply:"Agent finished without a text reply.",sessionId:a.sessionId})}}}),c=setTimeout(()=>{k({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){k({type:"done",ok:!1,reply:b instanceof Error?b.message:String(b),sessionId:a.sessionId})}for(;;){let a;try{a=await j.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)}
|
|
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")},16663:(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,f="",g=0,h="waiting_model",i=!1,j=new d,k=a=>{i||(i=!0,c&&clearTimeout(c),e?.(),j.push(a),j.close())};e=a.onEvent(b=>{if(!i)switch(b.type){case"agent_start":h="waiting_model",j.push({type:"status",phase:"waiting_model"});break;case"message_update":{let a=b.message;if(a?.role!=="assistant")break;let c=a.content;if(!Array.isArray(c))break;let d=c.filter(a=>a?.type==="text"&&"string"==typeof a.text).map(a=>a.text);if(0===d.length)break;f=d.join("\n\n"),"running_tools"!==h&&(h="streaming"),j.push({type:"delta",text:f});break}case"tool_execution_start":g+=1,h="running_tools",j.push({type:"status",phase:"running_tools"});break;case"tool_execution_end":0===(g=Math.max(0,g-1))&&(h=f?"streaming":"waiting_model",j.push({type:"status",phase:h}));break;case"agent_end":{let c=b.error;c?k({type:"done",ok:!1,reply:c,sessionId:a.sessionId}):f.trim()?k({type:"done",ok:!0,reply:f.trim(),sessionId:a.sessionId}):k({type:"done",ok:!1,reply:"Agent finished without a text reply.",sessionId:a.sessionId})}}}),c=setTimeout(()=>{k({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){k({type:"done",ok:!1,reply:b instanceof Error?b.message:String(b),sessionId:a.sessionId})}for(;;){let a;try{a=await j.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,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!1;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)}})},
|
|
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!1;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,7914,6429,1761],()=>b(b.s=16663));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2976,a.ids=[2976],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")},
|
|
1
|
+
(()=>{var a={};a.id=2976,a.ids=[2976],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")},31052:(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}}},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=31052));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")},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.
|
|
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")},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.80",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")},97251:(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)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5193,7914,6429],()=>b(b.s=97251));module.exports=c})();
|
|
@@ -0,0 +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")},14219:(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)}})},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")},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
|
+
`;(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
|
+
`:"";(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
|
+
|
|
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
|
+
`,"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=14219));module.exports=c})();
|