cuelo 0.6.1 → 0.6.3
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 -11
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +12 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- 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]/account/route.js +1 -1
- package/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/server/app/api/agent/[id]/events/route.js +1 -1
- 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/running/route.js +1 -1
- package/.next/server/app/api/attachments/route.js +3 -3
- 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/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/display-settings/route.js +1 -1
- package/.next/server/app/api/document-text/route.js +2 -2
- package/.next/server/app/api/experiments/route.js +1 -1
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/server/app/api/git/status/route.js +2 -2
- package/.next/server/app/api/gpt6/handles/route.js +1 -1
- package/.next/server/app/api/gpt6/reply/route.js +1 -1
- package/.next/server/app/api/gpt6/token/route.js +1 -1
- package/.next/server/app/api/gpt6/web6-session/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/live/call/[callId]/route.js +1 -1
- package/.next/server/app/api/live/events/route.js +2 -2
- package/.next/server/app/api/live/offer/route.js +1 -1
- package/.next/server/app/api/live/voices/route.js +1 -1
- package/.next/server/app/api/lounge/events/route.js +4 -0
- package/.next/server/app/api/lounge/events/route.js.nft.json +1 -0
- package/.next/server/app/api/lounge/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lounge/route.js +1 -0
- package/.next/server/app/api/lounge/route.js.nft.json +1 -0
- package/.next/server/app/api/lounge/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +3 -3
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/project-trust/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/runs/[runId]/route.js +1 -1
- package/.next/server/app/api/runs/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/sidecars/[service]/[...path]/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/server/app/api/theme/route.js +1 -1
- package/.next/server/app/api/tool-image/route.js +1 -1
- package/.next/server/app/api/update-maintenance/route.js +2 -2
- package/.next/server/app/api/updates/route.js +1 -1
- package/.next/server/app/api/web-access/recovery/route.js +1 -1
- package/.next/server/app/api/web-access/route.js +1 -1
- package/.next/server/app/api/web6/consults/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +17 -17
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover/page.js +2 -2
- package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recover.html +1 -1
- package/.next/server/app/recover.rsc +3 -3
- package/.next/server/app/recover.segments/_full.segment.rsc +3 -3
- package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
- package/.next/server/app/recover.segments/_index.segment.rsc +3 -3
- package/.next/server/app/recover.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +13 -11
- package/.next/server/chunks/2651.js +2 -2
- package/.next/server/chunks/3379.js +1 -1
- package/.next/server/chunks/3707.js +5 -0
- package/.next/server/chunks/5582.js +1 -1
- package/.next/server/chunks/6429.js +5 -5
- package/.next/server/functions-config-manifest.json +2 -0
- package/.next/server/middleware-build-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/chunks/8579-73b103d96227d1b8.js +7 -0
- package/.next/static/chunks/app/_global-error/page-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/account/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/agent/running/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/attachments/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/display-settings/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/document-text/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/experiments/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/gpt6/handles/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/gpt6/reply/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/gpt6/token/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/gpt6/web6-session/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/home/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/live/call/[callId]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/live/events/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/live/offer/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/live/voices/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/lounge/events/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/lounge/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/model-roles/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/models/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/project-trust/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/projects/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/runs/[runId]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/runs/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/settings/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/skills/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/theme/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/tool-image/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/update-maintenance/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/updates/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/web-access/recovery/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/web-access/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/web6/consults/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/{layout-43a56002b0fb773b.js → layout-483ef2fa8ff4fe98.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/app/page-bac6b66a3725ef8b.js +22 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d1e510cc33aec52f.js +1 -0
- package/.next/static/chunks/{webpack-4094d78ef0b4c382.js → webpack-13c58b226bf07c7e.js} +1 -1
- package/.next/static/css/{792a9d55c2fd2c0c.css → 078ee14f375802c0.css} +1 -1
- package/.next/static/css/1f257674fb782a57.css +1 -0
- package/.next/static/oBwJ3c4Q_HKgoiBl0dxdQ/_buildManifest.js +1 -0
- package/.next/trace +105 -104
- package/.next/trace-build +1 -1
- package/.next/types/app/api/lounge/events/route.ts +351 -0
- package/.next/types/app/api/lounge/route.ts +351 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/README.md +10 -1
- package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
- package/Tools/OMP_Global_Config/agent/RULES.md +1 -1
- package/Tools/OMP_Global_Config/agent/extensions/character-voice.ts +16 -0
- package/Tools/OMP_Global_Config/agent/extensions/lib/mcp-selection.ts +11 -9
- package/Tools/OMP_Global_Config/agent/extensions/steering-reply-gate.ts +12 -3
- package/Tools/OMP_Global_Config/agent/prompt-copies/RULES.en.md +2 -2
- package/Tools/OMP_Global_Config/agent/rules/verdict.md +4 -0
- package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +1059 -0
- package/package.json +2 -1
- package/.next/static/9IHPWkHderLIQA0fYAPmt/_buildManifest.js +0 -1
- package/.next/static/chunks/6379-7da431a165ac5d41.js +0 -7
- package/.next/static/chunks/app/_global-error/page-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/account/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/agent/running/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/attachments/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/display-settings/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/document-text/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/experiments/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/handles/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/reply/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/token/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/gpt6/web6-session/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/home/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/live/call/[callId]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/live/events/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/live/offer/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/live/voices/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/model-roles/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/models/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/models-config/discover/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/project-trust/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/projects/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/runs/[runId]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/runs/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/settings/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/sidecars/[service]/[...path]/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/skills/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/theme/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/tool-image/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/update-maintenance/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/updates/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/web-access/recovery/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/web-access/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/web6/consults/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/app/page-952f237df95e7ee4.js +0 -22
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-0c0ee2cbde2b8cfd.js +0 -1
- package/.next/static/css/bbe00993de567f95.css +0 -1
- /package/.next/static/{9IHPWkHderLIQA0fYAPmt → oBwJ3c4Q_HKgoiBl0dxdQ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=3432,a.ids=[3432],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")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},7255:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(48161),g=c(57075),h=c(80104),i=c(65630),j=a([i]);async function k(a,{params:b}){let{id:c}=await b,d=null,j=!1;try{let b=new URL(a.url);d=b.searchParams.get("path"),j="1"===b.searchParams.get("download")}catch{return e.NextResponse.json({error:"invalid url"},{status:400})}if(!d)return e.NextResponse.json({error:"path required"},{status:400});let l=(0,h.fM)(d,(0,f.tmpdir)());if(!l)return e.NextResponse.json({error:"invalid path"},{status:400});if(!await (0,i.jV)(l,c))return e.NextResponse.json({error:"forbidden"},{status:403});try{if(j){let{handle:a}=await (0,h.Vn)(l),b=g.Readable.toWeb(a.createReadStream());return new Response(b,{headers:{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="bash-output.log"',"Cache-Control":"no-store"}})}let a=await (0,h.GV)(l);if(a.tooLarge)return e.NextResponse.json({error:`Full output is too large to display (limit ${h.gQ} bytes)`,data:{size:a.size,maxBytes:h.gQ}},{status:413});return e.NextResponse.json({success:!0,data:{output:a.content}})}catch{return e.NextResponse.json({error:"full output unavailable"},{status:404})}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},57075:a=>{a.exports=require("node:stream")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80104:(a,b,c)=>{c.d(b,{GV:()=>j,Vn:()=>i,fM:()=>h,gQ:()=>g});var d=c(73024),e=c(51455),f=c(76760);let g=5242880;function h(a,b){let c=(0,f.resolve)(a);return(0,f.dirname)(c)===(0,f.resolve)(b)&&/^pi-bash-[A-Za-z0-9_-]+\.log$/.test((0,f.basename)(c))?c:null}async function i(a){if(!(await (0,e.lstat)(a)).isFile())throw Error("Bash output path is not a regular file");let b="number"==typeof d.constants.O_NOFOLLOW?d.constants.O_NOFOLLOW:0,c=await (0,e.open)(a,d.constants.O_RDONLY|b);try{let a=await c.stat();if(!a.isFile())throw Error("Bash output path is not a regular file");return{handle:c,fileInfo:a}}catch(a){throw await c.close(),a}}async function j(a,b=g){let{handle:c,fileInfo:d}=await i(a);try{if(d.size>b)return{tooLarge:!0,size:d.size};let a=Buffer.alloc(d.size),e=0;for(;e<a.length;){let b=await c.read(a,e,a.length-e,e);if(0===b.bytesRead)break;e+=b.bytesRead}return{tooLarge:!1,content:a.subarray(0,e).toString("utf8"),size:e}}finally{await c.close()}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91443:(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(7255),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/bash-output/route",pathname:"/api/agent/[id]/bash-output",filename:"route",bundlePath:"app/api/agent/[id]/bash-output/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\bash-output\\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/agent/[id]/bash-output/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=91443));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=3432,a.ids=[3432],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")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},7255:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k});var e=c(23211),f=c(48161),g=c(57075),h=c(80104),i=c(65630),j=a([i]);async function k(a,{params:b}){let{id:c}=await b,d=null,j=!1;try{let b=new URL(a.url);d=b.searchParams.get("path"),j="1"===b.searchParams.get("download")}catch{return e.NextResponse.json({error:"invalid url"},{status:400})}if(!d)return e.NextResponse.json({error:"path required"},{status:400});let l=(0,h.fM)(d,(0,f.tmpdir)());if(!l)return e.NextResponse.json({error:"invalid path"},{status:400});if(!await (0,i.jV)(l,c))return e.NextResponse.json({error:"forbidden"},{status:403});try{if(j){let{handle:a}=await (0,h.Vn)(l),b=g.Readable.toWeb(a.createReadStream());return new Response(b,{headers:{"Content-Type":"text/plain; charset=utf-8","Content-Disposition":'attachment; filename="bash-output.log"',"Cache-Control":"no-store"}})}let a=await (0,h.GV)(l);if(a.tooLarge)return e.NextResponse.json({error:`Full output is too large to display (limit ${h.gQ} bytes)`,data:{size:a.size,maxBytes:h.gQ}},{status:413});return e.NextResponse.json({success:!0,data:{output:a.content}})}catch{return e.NextResponse.json({error:"full output unavailable"},{status:404})}}i=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},8303:(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(7255),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/bash-output/route",pathname:"/api/agent/[id]/bash-output",filename:"route",bundlePath:"app/api/agent/[id]/bash-output/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\bash-output\\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/agent/[id]/bash-output/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},49180:(a,b,c)=>{c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{a.exports=require("node:fs/promises")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},57075:a=>{a.exports=require("node:stream")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65630:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Iq:()=>h,jV:()=>i});var e=c(40402),f=c(49180),g=a([e]);async function h(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.iX)(a,await (0,e.DK)(c))}catch{return!1}}async function i(a,b){if(!(0,f.ah)(b))return!1;try{let c=await (0,e.os)(b);if(!c)return!1;return(0,f.j1)(a,await (0,e.DK)(c))}catch{return!1}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79646:a=>{a.exports=require("child_process")},80104:(a,b,c)=>{c.d(b,{GV:()=>j,Vn:()=>i,fM:()=>h,gQ:()=>g});var d=c(73024),e=c(51455),f=c(76760);let g=5242880;function h(a,b){let c=(0,f.resolve)(a);return(0,f.dirname)(c)===(0,f.resolve)(b)&&/^pi-bash-[A-Za-z0-9_-]+\.log$/.test((0,f.basename)(c))?c:null}async function i(a){if(!(await (0,e.lstat)(a)).isFile())throw Error("Bash output path is not a regular file");let b="number"==typeof d.constants.O_NOFOLLOW?d.constants.O_NOFOLLOW:0,c=await (0,e.open)(a,d.constants.O_RDONLY|b);try{let a=await c.stat();if(!a.isFile())throw Error("Bash output path is not a regular file");return{handle:c,fileInfo:a}}catch(a){throw await c.close(),a}}async function j(a,b=g){let{handle:c,fileInfo:d}=await i(a);try{if(d.size>b)return{tooLarge:!0,size:d.size};let a=Buffer.alloc(d.size),e=0;for(;e<a.length;){let b=await c.read(a,e,a.length-e,e);if(0===b.bytesRead)break;e+=b.bytesRead}return{tooLarge:!1,content:a.subarray(0,e).toString("utf8"),size:e}}finally{await c.close()}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582],()=>b(b.s=8303));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";(()=>{var a={};a.id=5907,a.ids=[5907],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19225:(a,b,c)=>{a.exports=c(44870)},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},74186:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>j,dynamic:()=>k});var e=c(40402),f=c(56429),g=c(66544),h=c(4157),i=a([e,f]);[e,f]=i.then?(await i)():i;let k="force-dynamic",l=new Set(["turn_start","turn_end","tool_execution_update"]);async function j(a,{params:b}){let{id:c}=await b;if(!(0,g.EN)(a))return new Response("Untrusted API request",{status:403});let d=(0,f.A4)(c);if(!d||!d.isAlive()){let a=await (0,e.os)(c);if(!a)return new Response("Session not found",{status:404});try{({session:d}=await (0,f.OF)(c,a,void 0))}catch{return new Response("Failed to start agent",{status:500})}}let i="1"===new URL(a.url).searchParams.get("timing"),k="1"===new URL(a.url).searchParams.get("entries"),m=new ReadableStream({start(b){let g=new TextEncoder,j=a=>{i&&(a={...a,serverEmittedAt:Date.now()});let c=`data: ${JSON.stringify(a)}
|
|
2
2
|
|
|
3
|
-
`;b.enqueue(g.encode(c))},m=(0,f.KI)(j),n=d.onEvent(a=>{let b=k?"session_snapshot"===a.type?a:"agent_start"===a.type?{type:"agent_start"}:null:"session_snapshot"===a.type?null:function(a){if(l.has(a.type))return null;if("message_update"===a.type){let b={...a};return delete b.assistantMessageEvent,b}return"agent_end"===a.type?{type:"agent_end"}:a}(a);if(b){if(k)return void j(b);if(i)return void m.push({...b,serverObservedAt:Date.now(),streamEventType:a.assistantMessageEvent?.type});m.push(b)}},{keepAlive:k});if(j({type:"connected",sessionId:c}),k){let a=d.inner.sessionManager,b=a.getLeafId();b&&j({type:"session_snapshot",sessionId:c,entryId:b,context:(0,e.Uv)(a.getEntries(),b,{deferThinking:!0,deferToolResultImages:!0})})}let o=setInterval(()=>{try{b.enqueue(g.encode(":\n\n"))}catch{}},3e4),p="",q=setInterval(()=>{try{let a=(0,h.mN)(),b=a?`${a.requestId}:${a.phase}`:"";if(!a||b===p)return;p=b,j({type:"update_maintenance",requestId:a.requestId,phase:a.phase,stageHash:a.stageHash})}catch{}},2e3);a.signal?.addEventListener("abort",()=>{clearInterval(o),clearInterval(q),m.close(),n(),b.close()})}});return new Response(m,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},
|
|
3
|
+
`;b.enqueue(g.encode(c))},m=(0,f.KI)(j),n=d.onEvent(a=>{let b=k?"session_snapshot"===a.type?a:"agent_start"===a.type?{type:"agent_start"}:null:"session_snapshot"===a.type?null:function(a){if(l.has(a.type))return null;if("message_update"===a.type){let b={...a};return delete b.assistantMessageEvent,b}return"agent_end"===a.type?{type:"agent_end"}:a}(a);if(b){if(k)return void j(b);if(i)return void m.push({...b,serverObservedAt:Date.now(),streamEventType:a.assistantMessageEvent?.type});m.push(b)}},{keepAlive:k});if(j({type:"connected",sessionId:c}),k){let a=d.inner.sessionManager,b=a.getLeafId();b&&j({type:"session_snapshot",sessionId:c,entryId:b,context:(0,e.Uv)(a.getEntries(),b,{deferThinking:!0,deferToolResultImages:!0})})}let o=setInterval(()=>{try{b.enqueue(g.encode(":\n\n"))}catch{}},3e4),p="",q=setInterval(()=>{try{let a=(0,h.mN)(),b=a?`${a.requestId}:${a.phase}`:"";if(!a||b===p)return;p=b,j({type:"update_maintenance",requestId:a.requestId,phase:a.phase,stageHash:a.stageHash})}catch{}},2e3);a.signal?.addEventListener("abort",()=>{clearInterval(o),clearInterval(q),m.close(),n(),b.close()})}});return new Response(m,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}d()}catch(a){d(a)}})},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},93195:(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(74186),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/events/route",pathname:"/api/agent/[id]/events",filename:"route",bundlePath:"app/api/agent/[id]/events/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\events\\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/agent/[id]/events/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5582,3229,6429],()=>b(b.s=93195));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=5221,a.ids=[5221],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79256:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,POST:()=>k});var e=c(23211),f=c(40402),g=c(56429),h=c(66544),i=c(4157),j=a([f,g]);async function k(a,{params:b}){let c;if(!(0,h.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let d=(0,i.mN)();if(d)return e.NextResponse.json({error:`CUELO update ${d.phase}`,code:"update_draining",accepted:!1,requestId:d.requestId},{status:503});let j=performance.now(),{id:l}=await b,m=!1;try{let b=await a.json();c="string"==typeof b.type?b.type:void 0;let d=(0,g.A4)(l);if(d?.isAlive()){let a=performance.now(),c=await d.send(b);m="prompt"===b.type;let f=performance.now();return e.NextResponse.json({success:!0,data:c},{headers:{"Server-Timing":`session_prepare;dur=${(a-j).toFixed(2)}, command_accept;dur=${(f-a).toFixed(2)}, request;dur=${(f-j).toFixed(2)}`}})}let h=await (0,f.os)(l);if(!h)return e.NextResponse.json({error:"Session not found",..."prompt"===b.type?{code:"prompt_rejected",accepted:!1}:{}},{status:404});let{session:i}=await (0,g.OF)(l,h,void 0),k=performance.now(),n=await i.send(b);m="prompt"===b.type;let o=performance.now();return e.NextResponse.json({success:!0,data:n},{headers:{"Server-Timing":`session_prepare;dur=${(k-j).toFixed(2)}, command_accept;dur=${(o-k).toFixed(2)}, request;dur=${(o-j).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===c&&!m?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}async function l(a,{params:b}){let{id:c}=await b;try{let a=(0,g.A4)(c);if(!a||!a.isAlive())return e.NextResponse.json({running:!1});let b=await a.send({type:"get_state"});return e.NextResponse.json({running:!0,state:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[f,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88631:(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(79256),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/route",pathname:"/api/agent/[id]",filename:"route",bundlePath:"app/api/agent/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\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/agent/[id]/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=88631));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=5221,a.ids=[5221],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79256:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>l,POST:()=>k});var e=c(23211),f=c(40402),g=c(56429),h=c(66544),i=c(4157),j=a([f,g]);async function k(a,{params:b}){let c;if(!(0,h.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,h.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let d=(0,i.mN)();if(d)return e.NextResponse.json({error:`CUELO update ${d.phase}`,code:"update_draining",accepted:!1,requestId:d.requestId},{status:503});let j=performance.now(),{id:l}=await b,m=!1;try{let b=await a.json();c="string"==typeof b.type?b.type:void 0;let d=(0,g.A4)(l);if(d?.isAlive()){let a=performance.now(),c=await d.send(b);m="prompt"===b.type;let f=performance.now();return e.NextResponse.json({success:!0,data:c},{headers:{"Server-Timing":`session_prepare;dur=${(a-j).toFixed(2)}, command_accept;dur=${(f-a).toFixed(2)}, request;dur=${(f-j).toFixed(2)}`}})}let h=await (0,f.os)(l);if(!h)return e.NextResponse.json({error:"Session not found",..."prompt"===b.type?{code:"prompt_rejected",accepted:!1}:{}},{status:404});let{session:i}=await (0,g.OF)(l,h,void 0),k=performance.now(),n=await i.send(b);m="prompt"===b.type;let o=performance.now();return e.NextResponse.json({success:!0,data:n},{headers:{"Server-Timing":`session_prepare;dur=${(k-j).toFixed(2)}, command_accept;dur=${(o-k).toFixed(2)}, request;dur=${(o-j).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===c&&!m?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}async function l(a,{params:b}){let{id:c}=await b;try{let a=(0,g.A4)(c);if(!a||!a.isAlive())return e.NextResponse.json({running:!1});let b=await a.send({type:"get_state"});return e.NextResponse.json({running:!0,state:b})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}[f,g]=j.then?(await j)():j,d()}catch(a){d(a)}})},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},84755:(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(79256),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/[id]/route",pathname:"/api/agent/[id]",filename:"route",bundlePath:"app/api/agent/[id]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\[id]\\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/agent/[id]/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=84755));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=6450,a.ids=[6450],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},4937:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>q});var e=c(23211),f=c(16131),g=c(29021),h=c(55511),i=c(80547),j=c(40402),k=c(56429),l=c(5908),m=c(38741),n=c(66544),o=c(4157),p=a([f,i,j,k,m]);async function q(a){let b;if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,n.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=(0,o.mN)();if(c)return e.NextResponse.json({error:`CUELO update ${c.phase}`,code:"update_draining",accepted:!1,requestId:c.requestId},{status:503});let d=performance.now(),p=!1;try{let{cwd:c,...n}=await a.json();if(b="string"==typeof n.type?n.type:void 0,!c||"string"!=typeof c)return e.NextResponse.json({error:"cwd is required",..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});if(!(0,g.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`,..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});let o=await (0,i.mc)();if(!(0,i.B7)(c,o))return e.NextResponse.json({error:"Access denied"},{status:403});let{provider:q,modelId:r,toolNames:s,thinkingLevel:t,oauthPosition:u,...v}=n;if(q&&!r||!q&&r)throw Error("provider and modelId must be provided together");let w=function(a){if(void 0===a)return;let b="string"==typeof a?(0,f.parseConfiguredThinkingLevel)(a):void 0;if(void 0===b)throw Error(`Invalid thinking level: ${String(a)}`);return b}(t),x=function(a){if(void 0!==a){if("number"!=typeof a||!Number.isSafeInteger(a)||a<0)throw Error(`Invalid oauthPosition: ${String(a)}`);return a}}(u);if(void 0!==x&&!(q&&r))throw Error("provider and modelId are required to select an account");let y=`__new__${(0,h.randomUUID)()}`;if(q&&r){let{modelRegistry:a}=await (0,m.getOmpRuntime)(),b=await (0,m.findModelWithRecovery)(a,q,r,{forceDiscovery:!0});if(b.miss)throw Error((0,l.zX)(b.miss))}let{session:z,realSessionId:A}=await (0,k.OF)(y,"",c,{...s?{toolNames:s}:{},...q&&r?{initialModel:{provider:q,modelId:r}}:{},...w?{thinkingLevel:w}:{},...void 0!==x?{accountOauthPosition:x}:{}});(0,i.wz)(c),(0,j.mD)();let B=await z.send({type:"get_state"}),C=performance.now();if("ensure_session"===v.type)return e.NextResponse.json({success:!0,sessionId:A,data:null,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}`}});let D=await z.send(v);p="prompt"===v.type;let E=performance.now();return e.NextResponse.json({success:!0,sessionId:A,data:D,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}, command_accept;dur=${(E-C).toFixed(2)}, request;dur=${(E-d).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===b&&!p?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}[f,i,j,k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},16131:a=>{a.exports=import("@oh-my-pi/pi-tui/thinking")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},21820:a=>{a.exports=require("os")},22547:(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(4937),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/new/route",pathname:"/api/agent/new",filename:"route",bundlePath:"app/api/agent/new/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\new\\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/agent/new/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=22547));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=6450,a.ids=[6450],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},4937:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>q});var e=c(23211),f=c(16131),g=c(29021),h=c(55511),i=c(80547),j=c(40402),k=c(56429),l=c(5908),m=c(38741),n=c(66544),o=c(4157),p=a([f,i,j,k,m]);async function q(a){let b;if(!(0,n.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});if(!(0,n.E2)(a))return e.NextResponse.json({error:"Content-Type must be application/json"},{status:415});let c=(0,o.mN)();if(c)return e.NextResponse.json({error:`CUELO update ${c.phase}`,code:"update_draining",accepted:!1,requestId:c.requestId},{status:503});let d=performance.now(),p=!1;try{let{cwd:c,...n}=await a.json();if(b="string"==typeof n.type?n.type:void 0,!c||"string"!=typeof c)return e.NextResponse.json({error:"cwd is required",..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});if(!(0,g.existsSync)(c))return e.NextResponse.json({error:`Directory does not exist: ${c}`,..."prompt"===b?{code:"prompt_rejected",accepted:!1}:{}},{status:400});let o=await (0,i.mc)();if(!(0,i.B7)(c,o))return e.NextResponse.json({error:"Access denied"},{status:403});let{provider:q,modelId:r,toolNames:s,thinkingLevel:t,oauthPosition:u,...v}=n;if(q&&!r||!q&&r)throw Error("provider and modelId must be provided together");let w=function(a){if(void 0===a)return;let b="string"==typeof a?(0,f.parseConfiguredThinkingLevel)(a):void 0;if(void 0===b)throw Error(`Invalid thinking level: ${String(a)}`);return b}(t),x=function(a){if(void 0!==a){if("number"!=typeof a||!Number.isSafeInteger(a)||a<0)throw Error(`Invalid oauthPosition: ${String(a)}`);return a}}(u);if(void 0!==x&&!(q&&r))throw Error("provider and modelId are required to select an account");let y=`__new__${(0,h.randomUUID)()}`;if(q&&r){let{modelRegistry:a}=await (0,m.getOmpRuntime)(),b=await (0,m.findModelWithRecovery)(a,q,r,{forceDiscovery:!0});if(b.miss)throw Error((0,l.zX)(b.miss))}let{session:z,realSessionId:A}=await (0,k.OF)(y,"",c,{...s?{toolNames:s}:{},...q&&r?{initialModel:{provider:q,modelId:r}}:{},...w?{thinkingLevel:w}:{},...void 0!==x?{accountOauthPosition:x}:{}});(0,i.wz)(c),(0,j.mD)();let B=await z.send({type:"get_state"}),C=performance.now();if("ensure_session"===v.type)return e.NextResponse.json({success:!0,sessionId:A,data:null,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}`}});let D=await z.send(v);p="prompt"===v.type;let E=performance.now();return e.NextResponse.json({success:!0,sessionId:A,data:D,model:B.model?{provider:B.model.provider,modelId:B.model.id}:null,thinkingLevel:B.thinkingLevel,configuredThinkingLevel:B.configuredThinkingLevel},{headers:{"Server-Timing":`session_prepare;dur=${(C-d).toFixed(2)}, command_accept;dur=${(E-C).toFixed(2)}, request;dur=${(E-d).toFixed(2)}`}})}catch(a){return e.NextResponse.json({error:a instanceof Error?a.message:String(a),..."prompt"===b&&!p?{code:"prompt_rejected",accepted:!1}:{}},{status:500})}}[f,i,j,k,m]=p.then?(await p)():p,d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},16131:a=>{a.exports=import("@oh-my-pi/pi-tui/thinking")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},21820:a=>{a.exports=require("os")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},66544:(a,b,c)=>{c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},71823:(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(4937),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/new/route",pathname:"/api/agent/new",filename:"route",bundlePath:"app/api/agent/new/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\new\\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/agent/new/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},80547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{A$:()=>o,B7:()=>p,Nw:()=>i.Nw,mc:()=>n,uK:()=>m,wz:()=>i.wz});var e=c(29021),f=c(21820),g=c(33873),h=c.n(g),i=c(25252),j=c(82536),k=c(40402),l=a([k]);k=(l.then?(await l)():l)[0];let q=/^[a-zA-Z]:[\\/]/;function m(a){return q.test(a)||a.startsWith("\\\\")||a.startsWith("//")}async function n(){let a=Date.now(),b=globalThis.__ompAllowedRootsCache;if(b&&b.expiresAt>a)return b.roots;let c=await (0,k.wb)(),d=new Set;for(let a of c)a.cwd&&d.add((0,i.Nw)(a.cwd)),a.projectRoot&&d.add((0,i.Nw)(a.projectRoot));try{for(let a of(0,e.readdirSync)((0,f.homedir)()))/^omp-cwd-\d{8}$/.test(a)&&d.add((0,i.Nw)(h().join((0,f.homedir)(),a)))}catch{}for(let a of(0,i.HM)())d.add(a);return globalThis.__ompAllowedRootsCache={roots:d,expiresAt:a+5e3},d}function o(a,b){for(let c of b){let b=m(a)||m(c),d=b?h().win32:h(),e=b?"\\":h().sep,f=d.resolve(a),g=d.resolve(c),i=b?f.toLowerCase():f,j=b?g.toLowerCase():g,k=j.endsWith(e)?j:j+e;if(i===j||i.startsWith(k))return!0}return!1}function p(a,b){return(0,j.x)(a,b)}d()}catch(a){d(a)}})},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},82536:(a,b,c)=>{c.d(b,{x:()=>i});var d=c(29021),e=c(33873),f=c.n(e);let g=/^[a-zA-Z]:[\\/]/;function h(a){return g.test(a)||a.startsWith("\\\\")||a.startsWith("//")}function i(a,b){let c;try{c=(0,d.realpathSync)(a)}catch{return!1}let e=new Set;for(let a of b)try{e.add((0,d.realpathSync)(a))}catch{}return function(a,b){for(let c of b){let b=h(a)||h(c),d=b?f().win32:f(),e=b?"\\":f().sep,g=d.resolve(a),i=d.resolve(c),j=b?g.toLowerCase():g,k=b?i.toLowerCase():i,l=k.endsWith(e)?k:k+e;if(j===k||j.startsWith(l))return!0}return!1}(c,e)}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=71823));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8197,a.ids=[8197],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5452:(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(){return e.NextResponse.json({runningSessionIds:(0,f.HG)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8197,a.ids=[8197],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1740:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/custom-tools")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4327:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/system-prompt")},5452:(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(){return e.NextResponse.json({runningSessionIds:(0,f.HG)()},{headers:{"Cache-Control":"no-store"}})}d()}catch(a){d(a)}})},5969:a=>{a.exports=import("@oh-my-pi/pi-agent-core/compaction")},9655:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/runtime-init")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},14882:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/messages")},19819:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/goals/settings")},25167:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-mode")},26854:a=>{a.exports=import("@oh-my-pi/pi-tui")},28315:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/extensibility/skills")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33594:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/available-commands")},33873:a=>{a.exports=require("path")},43696:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/modes/rpc/rpc-subagents")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{a.exports=require("node:os")},48331:a=>{a.exports=import("@oh-my-pi/pi-agent-core")},53739:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/session/exit-diagnostics")},55511:a=>{a.exports=require("crypto")},58505:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config")},59895:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/builtin-registry")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63411:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-settings")},73024:a=>{a.exports=require("node:fs")},73079:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-roles")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},78310:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/registry/agent-registry")},79646:a=>{a.exports=require("child_process")},82512:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/plan-mode/plan-files")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},88692:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/config/model-resolver")},91271:(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(5452),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/agent/running/route",pathname:"/api/agent/running",filename:"route",bundlePath:"app/api/agent/running/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\agent\\running\\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/agent/running/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},94285:a=>{a.exports=import("@oh-my-pi/pi-coding-agent/slash-commands/acp-builtins")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5582,3229,6429],()=>b(b.s=91271));module.exports=c})();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3032,a.ids=[3032],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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},8207:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l,dynamic:()=>n,runtime:()=>m});var e=c(76760),f=c(23211),g=c(91524),h=c(69835),i=c(38741),j=c(66544),k=a([i]);i=(k.then?(await k)():k)[0];let m="nodejs",n="force-dynamic";async function l(a){if(!(0,j.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});try{let{agentDir:b}=await (0,i.getOmpRuntime)();return await (0,h.LE)(a,{root:(0,e.join)(b,h.Fg),transcribe:g.Du})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai")},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")},36208:(a,b,c)=>{"use strict";c.d(b,{Lg:()=>i,Qw:()=>d,Vf:()=>g,e6:()=>f,iH:()=>e,we:()=>j});let d=8388608,e=12e4,f=250,g=0x1900000,h={".mp3":"audio/mpeg",".wav":"audio/wav",".wave":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".oga":"audio/ogg",".opus":"audio/ogg",".flac":"audio/flac",".webm":"audio/webm",".aac":"audio/aac",".aif":"audio/aiff",".aiff":"audio/aiff"};function i(a){let b=a.name.toLocaleLowerCase(),c=b.lastIndexOf("."),d=c>0?h[b.slice(c)]:void 0;if(d)return d;let e=a.type.toLocaleLowerCase().split(";",1)[0]?.trim();return e?.startsWith("audio/")?e:null}function j(a){return function(a){let b;if(!a.startsWith(k))return null;let c=a.indexOf("\n");if(c<0)return null;let f=a.slice(0,c);if(!f.endsWith(l))return null;try{b=JSON.parse(f.slice(k.length,-l.length))}catch{return null}if(!function(a){if(!a||"object"!=typeof a||!Number.isSafeInteger(a.userMessageLength)||(a.userMessageLength??-1)<0||!Array.isArray(a.documents)||0===a.documents.length||a.documents.length>3)return!1;let b=0,c=0;for(let f of a.documents){if(!f||"object"!=typeof f||"string"!=typeof f.name||0===f.name.length||"text/markdown"!==f.mimeType&&"text/plain"!==f.mimeType&&"application/pdf"!==f.mimeType||!Number.isSafeInteger(f.size)||(f.size??-1)<0||(f.size??0)>d||!Number.isSafeInteger(f.textLength)||(f.textLength??-1)<0||(f.textLength??0)>e)return!1;b+=f.size??0,c+=f.textLength??0}return b<=0x1000000&&c<=24e4}(b))return null;let g=c+1;if(!a.startsWith(m,g))return null;let h=(g+=m.length)+b.userMessageLength;if(h>a.length)return null;let i=a.slice(g,h);if(g=h,!a.startsWith(n,g))return null;g+=n.length;let j=[];for(let c=0;c<b.documents.length;c+=1){var o,p,q;let d=b.documents[c],e=(o=c,p=d,`
|
|
1
|
+
(()=>{var a={};a.id=3032,a.ids=[3032],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1535:(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(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\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/attachments/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},8207:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>l,dynamic:()=>n,runtime:()=>m});var e=c(76760),f=c(23211),g=c(91524),h=c(69835),i=c(38741),j=c(66544),k=a([i]);i=(k.then?(await k)():k)[0];let m="nodejs",n="force-dynamic";async function l(a){if(!(0,j.EN)(a))return f.NextResponse.json({error:"Untrusted API request"},{status:403});try{let{agentDir:b}=await (0,i.getOmpRuntime)();return await (0,h.LE)(a,{root:(0,e.join)(b,h.Fg),transcribe:g.Du})}catch(a){return f.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{"use strict";a.exports=import("@oh-my-pi/pi-ai")},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")},36208:(a,b,c)=>{"use strict";c.d(b,{Lg:()=>i,Qw:()=>d,Vf:()=>g,e6:()=>f,iH:()=>e,we:()=>j});let d=8388608,e=12e4,f=250,g=0x1900000,h={".mp3":"audio/mpeg",".wav":"audio/wav",".wave":"audio/wav",".m4a":"audio/mp4",".ogg":"audio/ogg",".oga":"audio/ogg",".opus":"audio/ogg",".flac":"audio/flac",".webm":"audio/webm",".aac":"audio/aac",".aif":"audio/aiff",".aiff":"audio/aiff"};function i(a){let b=a.name.toLocaleLowerCase(),c=b.lastIndexOf("."),d=c>0?h[b.slice(c)]:void 0;if(d)return d;let e=a.type.toLocaleLowerCase().split(";",1)[0]?.trim();return e?.startsWith("audio/")?e:null}function j(a){return function(a){let b;if(!a.startsWith(k))return null;let c=a.indexOf("\n");if(c<0)return null;let f=a.slice(0,c);if(!f.endsWith(l))return null;try{b=JSON.parse(f.slice(k.length,-l.length))}catch{return null}if(!function(a){if(!a||"object"!=typeof a||!Number.isSafeInteger(a.userMessageLength)||(a.userMessageLength??-1)<0||!Array.isArray(a.documents)||0===a.documents.length||a.documents.length>3)return!1;let b=0,c=0;for(let f of a.documents){if(!f||"object"!=typeof f||"string"!=typeof f.name||0===f.name.length||"text/markdown"!==f.mimeType&&"text/plain"!==f.mimeType&&"application/pdf"!==f.mimeType||!Number.isSafeInteger(f.size)||(f.size??-1)<0||(f.size??0)>d||!Number.isSafeInteger(f.textLength)||(f.textLength??-1)<0||(f.textLength??0)>e)return!1;b+=f.size??0,c+=f.textLength??0}return b<=0x1000000&&c<=24e4}(b))return null;let g=c+1;if(!a.startsWith(m,g))return null;let h=(g+=m.length)+b.userMessageLength;if(h>a.length)return null;let i=a.slice(g,h);if(g=h,!a.startsWith(n,g))return null;g+=n.length;let j=[];for(let c=0;c<b.documents.length;c+=1){var o,p,q;let d=b.documents[c],e=(o=c,p=d,`
|
|
2
2
|
--- Begin attached document ${o+1}: ${JSON.stringify(p.name)} (${p.mimeType}, ${p.size} bytes) ---
|
|
3
3
|
`);if(!a.startsWith(e,g))return null;let f=(g+=e.length)+d.textLength;if(f>a.length)return null;let h=a.slice(g,f);g=f;let i=(q=c,`
|
|
4
|
-
--- End attached document ${q+1} ---`);if(!a.startsWith(i,g))return null;g+=i.length,j.push({name:d.name,mimeType:d.mimeType,size:d.size,text:h})}return g===a.length?{message:i,documents:j}:null}(a)?.message??a}let k="\x3c!-- omp-web-document-context-v1:",l=" --\x3e",m="User message:\n",n="\n\nAttached documents (locally extracted text supplied by the user):\n"},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49180:(a,b,c)=>{"use strict";c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55484:(a,b,c)=>{"use strict";c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},66829:(a,b,c)=>{"use strict";c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},69835:(a,b,c)=>{"use strict";c.d(b,{Fg:()=>l,LE:()=>p});var d=c(51455),e=c(76760),f=c.n(e),g=c(66829),h=c(36208),i=c(91524),j=c(55484),k=c(49180);let l="cuelo-attachments",m=/^(?:con|prn|aux|nul|com[0-9¹²³]|lpt[0-9¹²³])(?:\..*)?$/i;async function n(a,b,c,e){let g=(b??"new").toLowerCase();await (0,d.mkdir)(a,{recursive:!0});let h=await (0,d.realpath)(a),i=f().join(h,g);if(await (0,d.mkdir)(i,{recursive:!0}),f().relative(h,await (0,d.realpath)(i))!==g)throw Error("Attachment folder resolves outside the attachment root");let j=function(a){let b=a.replace(/[<>:"|?*\u0000-\u001f]/g,"_").replace(/[. ]+$/,"");if(!b)return"attachment";let c=Array.from(b);if(c.length>150){let a=Array.from(f().extname(b)).slice(0,20).join("");b=c.slice(0,150-a.length).join("")+a}return m.test(b)?`_${b}`:b}(c),k=f().extname(j),l=j.slice(0,j.length-k.length);for(let a=1;a<=1e3;a+=1){let b=f().join(i,1===a?j:`${l} (${a})${k}`);try{return await (0,d.writeFile)(b,e,{flag:"wx"}),b}catch(a){if("EEXIST"!==a.code)throw a}}throw Error(`Too many attachments named ${j}`)}function o(a,b,c){return Response.json({code:b,error:c},{status:a})}async function p(a,{root:b,transcribe:c}){let d;if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return o(415,"unsupported","multipart/form-data body required");try{d=await (0,g.s)(a,h.Vf+65536)}catch(a){if(a instanceof g.H)return o(413,"file_too_large","Attachments must be 25MB or smaller");return o(400,"invalid_form","Malformed multipart body")}let e=d.get("file");if(!e||"string"==typeof e)return o(400,"missing_file","file is required");if(e.size>h.Vf)return o(413,"file_too_large","Attachments must be 25MB or smaller");let f=(0,j.SI)([e.name]);if(f)return o(400,"invalid_name",f);let l=d.get("sessionId"),m="string"==typeof l&&l?l:null;if(null!==m&&!(0,k.ah)(m))return o(400,"invalid_session","Invalid session id");let q=new Uint8Array(await e.arrayBuffer()),r=await n(b,m,e.name,q),s=(0,h.Lg)(e),t={path:r,size:q.byteLength,mimeType:s??(e.type||"application/octet-stream")};if(s)if(q.byteLength>i.EH)t.transcriptError=`audio is larger than the ${i.EH/1024/1024} MB transcription limit`;else try{t.transcript=await c(q,s,a.signal)}catch(a){t.transcriptError=a instanceof Error?a.message:String(a)}return Response.json(t)}},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90979:(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(8207),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/route",pathname:"/api/attachments",filename:"route",bundlePath:"app/api/attachments/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\attachments\\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/attachments/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},91524:(a,b,c)=>{"use strict";c.d(b,{Du:()=>h,EH:()=>f});let d="google-antigravity",e="gemini-3.8-flash",f=0xe00000;class g extends Error{}async function h(a,b,h){let i;if(a.byteLength>f)throw Error(`audio exceeds the ${f/1024/1024} MB transcription limit`);let[{completeSimple:j},{getOmpRuntime:k}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),Promise.resolve().then(c.bind(c,38741))]),{modelRegistry:l}=await k(),m=l.find(d,e);if(!m)throw Error(`${d}/${e} is not available`);if(!m.input.includes("image"))throw Error(`${e} does not accept inline media`);let n=await l.getApiKeyAndHeaders(m);if(!n.ok||!n.apiKey)throw Error(n.ok?`No credentials for ${d}`:n.error);let o=AbortSignal.timeout(18e4),p={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},q={apiKey:n.apiKey,headers:n.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:h?AbortSignal.any([h,o]):o};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; ");throw new g(`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
|
|
5
|
-
[transcript truncated at the output limit]`:b}(await j(m,p,q))}catch(a){if(!(a instanceof g)||q.signal.aborted)throw a;i=a}throw i}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
4
|
+
--- End attached document ${q+1} ---`);if(!a.startsWith(i,g))return null;g+=i.length,j.push({name:d.name,mimeType:d.mimeType,size:d.size,text:h})}return g===a.length?{message:i,documents:j}:null}(a)?.message??a}let k="\x3c!-- omp-web-document-context-v1:",l=" --\x3e",m="User message:\n",n="\n\nAttached documents (locally extracted text supplied by the user):\n"},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49180:(a,b,c)=>{"use strict";c.d(b,{ah:()=>e,iX:()=>h,j1:()=>i});let d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(a){return!!a&&d.test(a)}function f(a){return a.replace(/\\/g,"/")}function g(a){return/[A-Za-z0-9._~+%@/\\:-]/.test(a)}function h(a,b){for(let c of b){let b=[];if(!function a(b,c){if("string"==typeof b)return void c.push(b);if(b&&"object"==typeof b){if(Array.isArray(b)){for(let d of b)a(d,c);return}for(let d of Object.values(b))a(d,c)}}(c,b),b.some(b=>(function(a,b){let c=f(b),d=c.startsWith("/")?[c,`file://${c}`]:[c];for(let b of new Set([f(a),f(function(a){try{return decodeURIComponent(a)}catch{return a}}(a))]))for(let a of d){let c=b.indexOf(a);for(;-1!==c;){let d=0===c?"":b[c-1],e=c+a.length;if((0===c||!g(d))&&function(a,b){if(b>=a.length)return!0;let c=a[b];return":"===c?/\d/.test(a[b+1]??""):!g(c)}(b,e))return!0;c=b.indexOf(a,c+1)}}return!1})(b,a)))return!0}return!1}function i(a,b){return b.some(b=>"message"===b.type&&"bashExecution"===b.message.role&&b.message.fullOutputPath===a)}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55484:(a,b,c)=>{"use strict";c.d(b,{Ey:()=>i,Gu:()=>k,SI:()=>j});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f);let h=new Set(["error","overwrite","skip"]);function i(a){let b=a??"error";return h.has(b)?b:null}function j(a){if(0===a.length)return"No files selected";let b=new Set;for(let c of a){if(!c||"."===c||".."===c||c.includes("\0"))return`Invalid file name: ${c||"(empty)"}`;if(c.includes("/")||c.includes("\\")||g().basename(c)!==c)return`File names must not contain a path: ${c}`;if(b.has(c))return`Duplicate file name in upload: ${c}`;b.add(c)}return null}function k(a,b){let c=[],d=[];for(let f of b){let b,h=g().join(a,f);try{b=e().lstatSync(h)}catch(a){if("ENOENT"===a.code)continue;throw a}c.push(f),(!b.isFile()||b.isSymbolicLink())&&d.push(f)}return{conflicts:c,nonReplaceable:d}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>j,EN:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){return!!function(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function j(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},66829:(a,b,c)=>{"use strict";c.d(b,{H:()=>d,s:()=>e});class d extends Error{constructor(){super("Request body exceeds the allowed size")}}async function e(a,b){let c=function(a){let b=a.headers.get("content-length");if(!b||!/^\d+$/.test(b))return null;let c=Number(b);return Number.isSafeInteger(c)?c:null}(a);if(null!==c&&c>b)throw new d;let e=a.body?.getReader();if(!e)return a.formData();let f=[],g=0;try{for(;;){let{done:a,value:c}=await e.read();if(a)break;if(g+c.byteLength>b)throw await e.cancel().catch(()=>{}),new d;g+=c.byteLength;let h=new Uint8Array(c.byteLength);h.set(c),f.push(h)}}finally{e.releaseLock()}let h=a.headers.get("content-type");return new Response(new Blob(f),{headers:h?{"content-type":h}:void 0}).formData()}},69835:(a,b,c)=>{"use strict";c.d(b,{Fg:()=>l,LE:()=>p});var d=c(51455),e=c(76760),f=c.n(e),g=c(66829),h=c(36208),i=c(91524),j=c(55484),k=c(49180);let l="cuelo-attachments",m=/^(?:con|prn|aux|nul|com[0-9¹²³]|lpt[0-9¹²³])(?:\..*)?$/i;async function n(a,b,c,e){let g=(b??"new").toLowerCase();await (0,d.mkdir)(a,{recursive:!0});let h=await (0,d.realpath)(a),i=f().join(h,g);if(await (0,d.mkdir)(i,{recursive:!0}),f().relative(h,await (0,d.realpath)(i))!==g)throw Error("Attachment folder resolves outside the attachment root");let j=function(a){let b=a.replace(/[<>:"|?*\u0000-\u001f]/g,"_").replace(/[. ]+$/,"");if(!b)return"attachment";let c=Array.from(b);if(c.length>150){let a=Array.from(f().extname(b)).slice(0,20).join("");b=c.slice(0,150-a.length).join("")+a}return m.test(b)?`_${b}`:b}(c),k=f().extname(j),l=j.slice(0,j.length-k.length);for(let a=1;a<=1e3;a+=1){let b=f().join(i,1===a?j:`${l} (${a})${k}`);try{return await (0,d.writeFile)(b,e,{flag:"wx"}),b}catch(a){if("EEXIST"!==a.code)throw a}}throw Error(`Too many attachments named ${j}`)}function o(a,b,c){return Response.json({code:b,error:c},{status:a})}async function p(a,{root:b,transcribe:c}){let d;if(a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase()!=="multipart/form-data")return o(415,"unsupported","multipart/form-data body required");try{d=await (0,g.s)(a,h.Vf+65536)}catch(a){if(a instanceof g.H)return o(413,"file_too_large","Attachments must be 25MB or smaller");return o(400,"invalid_form","Malformed multipart body")}let e=d.get("file");if(!e||"string"==typeof e)return o(400,"missing_file","file is required");if(e.size>h.Vf)return o(413,"file_too_large","Attachments must be 25MB or smaller");let f=(0,j.SI)([e.name]);if(f)return o(400,"invalid_name",f);let l=d.get("sessionId"),m="string"==typeof l&&l?l:null;if(null!==m&&!(0,k.ah)(m))return o(400,"invalid_session","Invalid session id");let q=new Uint8Array(await e.arrayBuffer()),r=await n(b,m,e.name,q),s=(0,h.Lg)(e),t={path:r,size:q.byteLength,mimeType:s??(e.type||"application/octet-stream")};if(s)if(q.byteLength>i.EH)t.transcriptError=`audio is larger than the ${i.EH/1024/1024} MB transcription limit`;else try{t.transcript=await c(q,s,a.signal)}catch(a){t.transcriptError=a instanceof Error?a.message:String(a)}return Response.json(t)}},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91524:(a,b,c)=>{"use strict";c.d(b,{Du:()=>h,EH:()=>f});let d="google-antigravity",e="gemini-3.8-flash",f=0xe00000;class g extends Error{}async function h(a,b,h){let i;if(a.byteLength>f)throw Error(`audio exceeds the ${f/1024/1024} MB transcription limit`);let[{completeSimple:j},{getOmpRuntime:k}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),Promise.resolve().then(c.bind(c,38741))]),{modelRegistry:l}=await k(),m=l.find(d,e);if(!m)throw Error(`${d}/${e} is not available`);if(!m.input.includes("image"))throw Error(`${e} does not accept inline media`);let n=await l.getApiKeyAndHeaders(m);if(!n.ok||!n.apiKey)throw Error(n.ok?`No credentials for ${d}`:n.error);let o=AbortSignal.timeout(18e4),p={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},q={apiKey:n.apiKey,headers:n.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:h?AbortSignal.any([h,o]):o};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; ");throw new g(`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
|
|
5
|
+
[transcript truncated at the output limit]`:b}(await j(m,p,q))}catch(a){if(!(a instanceof g)||q.signal.aborted)throw a;i=a}throw i}},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=1535));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1541,a.ids=[1541],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},13760:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h,dynamic:()=>i});var e=c(89950),f=c(28247),g=a([f]);f=(g.then?(await g)():g)[0];let i="force-dynamic";async function h(){let a=(0,e.z)(await (0,f.z)());return Response.json({providers:a})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29843:a=>{a.exports=import("@oh-my-pi/pi-catalog/provider-models/descriptors")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65503:(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(13760),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/all-providers/route",pathname:"/api/auth/all-providers",filename:"route",bundlePath:"app/api/auth/all-providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\all-providers\\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/auth/all-providers/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87998:a=>{a.exports=import("@oh-my-pi/pi-ai/oauth")},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,877],()=>b(b.s=65503));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8743,a.ids=[8743],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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},43887:(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(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\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/auth/api-key/[provider]/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},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")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=43887));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=8743,a.ids=[8743],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")},5908:(a,b,c)=>{"use strict";function d(a,b={}){let c=b.intervalMs??6e4,e=b.now??Date.now,f=new Map,g=new Map;return{recover:(b,d={})=>{let h=g.get(b);if(h)return h.then(a=>({...a,shared:!0}));let i=e(),j=f.get(b);if(!d.force&&void 0!==j&&i-j<c)return Promise.resolve({outcome:"throttled",shared:!1});f.set(b,i);let k=a.refreshProvider(b,"online").then(()=>({outcome:"refreshed",shared:!1})).catch(a=>({outcome:"failed",shared:!1,error:function(a){let b=[],c=a;for(let a=0;a<3&&void 0!==c;a+=1){if(c instanceof Error){b.push(c.message),c=c.cause;continue}if("object"==typeof c&&null!==c){let a=c;"string"==typeof a.message&&b.push(a.message),"string"==typeof a.code&&b.push(a.code),"number"==typeof a.status&&b.push(`HTTP ${a.status}`),c=a.cause;continue}b.push(String(c));break}let d=b.join(" "),e=d.match(/\b(?:HTTP\s*)?([45]\d{2})\b/i)?.[1];if("401"===e||"403"===e||/\b(?:api[- ]?key|credential|authentication|unauthorized|forbidden)\b/i.test(d))return e?`provider authentication failed (HTTP ${e})`:"provider authentication failed";let f=d.match(/\b(EAI_AGAIN|ECONNREFUSED|ECONNRESET|ENETUNREACH|ENOTFOUND|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|UND_ERR_HEADERS_TIMEOUT|UND_ERR_BODY_TIMEOUT)\b/i)?.[1];return f?f.toUpperCase():/\b(?:timed?\s*out|timeout)\b/i.test(d)?"request timed out":e?`HTTP ${e}`:"discovery request failed"}(a)})).finally(()=>{g.get(b)===k&&g.delete(b)});return g.set(b,k),k}}}function e(a){return a.providerKnown?"failed"===a.recovery.outcome?`Model ${a.selector} is not in the model list and the discovery refresh for provider "${a.provider}" failed: ${a.recovery.error??"unknown error"}.`:"throttled"===a.recovery.outcome?`Model ${a.selector} is not in the model list. Discovery for provider "${a.provider}" was refreshed recently, so this lookup did not fetch again.`:`Model ${a.selector} is not in the model list after refreshing discovery for provider "${a.provider}".`:`Unknown model provider "${a.provider}" for ${a.selector}: the provider is not registered.`}c.d(b,{fw:()=>d,zX:()=>e})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},18470:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>k,GET:()=>i,POST:()=>j,dynamic:()=>l});var e=c(23211),f=c(28967),g=c(38741),h=a([g]);g=(h.then?(await h)():h)[0];let l="force-dynamic";async function i(a,{params:b}){let{provider:c}=await b,{modelRegistry:d,authStorage:f}=await (0,g.getOmpRuntime)(),h=f.keys.source(c),j=d.getAll().filter(a=>a.provider===c).length;return e.NextResponse.json({provider:c,displayName:c,configured:void 0!==h,source:h?.kind,models:j})}async function j(a,{params:b}){let{provider:c}=await b;try{let{apiKey:b}=await a.json();if(!b||"string"!=typeof b||!b.trim())return e.NextResponse.json({error:"apiKey is required"},{status:400});let{modelRegistry:d,authStorage:h}=await (0,g.getOmpRuntime)();if(!d.hasProvider(c))return e.NextResponse.json({error:`Unknown provider: ${c}`},{status:400});return await h.credentials.set(c,{type:"api_key",key:b.trim(),source:"login"}),(0,f.kn)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}async function k(a,{params:b}){let{provider:c}=await b;try{let{authStorage:a}=await (0,g.getOmpRuntime)();if(a.credentials.list(c).some(a=>"oauth"===a.credential.type))return e.NextResponse.json({error:`${c} is authenticated with OAuth, not an API key`},{status:409});return await a.credentials.remove(c),(0,f.kn)(),(0,g.invalidateOmpRuntime)(),e.NextResponse.json({success:!0})}catch(a){return e.NextResponse.json({error:String(a)},{status:500})}}d()}catch(a){d(a)}})},28967:(a,b,c)=>{"use strict";function d(){return globalThis.__ompModelsCacheState||(globalThis.__ompModelsCacheState={entries:new Map,inFlight:new Map,generation:0}),globalThis.__ompModelsCacheState}function e(){let a=d();a.generation+=1,a.entries.clear(),a.inFlight.clear()}function f(a,b){return b?{...a,modelError:b}:a}function g(a){return{...a,modelError:"Model list is temporarily unavailable. Check your configuration and try again."}}function h(a,b){let c=d(),e=c.entries.get(a);if(e){if(e.expiresAt>Date.now())return Promise.resolve(e.data);c.entries.delete(a)}let f=c.inFlight.get(a);if(f)return f;let g=c.generation,h=Promise.resolve().then(b).then(b=>{if(c.generation===g&&c.inFlight.get(a)===h){let d=Date.now();for(let[a,b]of c.entries)b.expiresAt<=d&&c.entries.delete(a);for(;c.entries.size>=32;){let a=c.entries.keys().next().value;if(void 0===a)break;c.entries.delete(a)}c.entries.set(a,{data:b,expiresAt:d+6e4})}return b}).finally(()=>{c.inFlight.get(a)===h&&c.inFlight.delete(a)});return c.inFlight.set(a,h),h}c.d(b,{Fw:()=>g,Mx:()=>f,kn:()=>e,rC:()=>h})},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},38741:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{findModelWithRecovery:()=>m,getOmpRuntime:()=>i,getSettingsForCwd:()=>j,invalidateOmpRuntime:()=>k,missingModelRecoveryFor:()=>l,recoverMissingModelRefs:()=>n});var e=c(92582),f=c(5908),g=a([e]);async function h(){let a=(0,e.getAgentDir)(),b=await e.Settings.init({agentDir:a}),c=await (0,e.discoverAuthStorage)(a),d=new e.ModelRegistry(c);return await d.refresh("online-if-uncached"),{agentDir:a,settings:b,authStorage:c,modelRegistry:d}}function i(){return globalThis.__ompRuntimePromise??=h().catch(a=>{throw globalThis.__ompRuntimePromise=void 0,a}),globalThis.__ompRuntimePromise}async function j(a){let{settings:b}=await i();return a&&b.getCwd()!==a?b.cloneForCwd(a):b}function k(){globalThis.__ompRuntimePromise=void 0}function l(a){let b=globalThis.__ompMissingModelRecovery??=new WeakMap,c=b.get(a);return c||(c=(0,f.fw)(a),b.set(a,c)),c}async function m(a,b,c,d={}){let e=a.find(b,c);if(e)return{model:e};let f=await l(a).recover(b,{force:d.forceDiscovery}),g=a.find(b,c);return g?{model:g}:{miss:{selector:`${b}/${c}`,provider:b,providerKnown:a.hasProvider(b),recovery:f}}}async function n(a,b){let c=new Set;for(let d of b)d.provider&&d.modelId&&(a.find(d.provider,d.modelId)||c.add(d.provider));0!==c.size&&await Promise.all([...c].map(b=>l(a).recover(b)))}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},38923:(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(18470),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/auth/api-key/[provider]/route",pathname:"/api/auth/api-key/[provider]",filename:"route",bundlePath:"app/api/auth/api-key/[provider]/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"D:\\a\\CUELO\\CUELO\\app\\api\\auth\\api-key\\[provider]\\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/auth/api-key/[provider]/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,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.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=`${O} ${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(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!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=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.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!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.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:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)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});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||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)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},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")},92582:a=>{"use strict";a.exports=import("@oh-my-pi/pi-coding-agent")},96487:()=>{}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=38923));module.exports=c})();
|