@37chengshan/ompweb 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +13 -10
- package/.next/build-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/required-server-files.js +2 -2
- package/.next/required-server-files.json +2 -2
- package/.next/routes-manifest.json +18 -0
- package/.next/server/app/_global-error/page.js +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +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 +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/running/events/route.js +1 -1
- package/.next/server/app/api/agents/route.js +1 -1
- package/.next/server/app/api/app-update/releases/route.js +1 -0
- package/.next/server/app/api/app-update/releases/route.js.nft.json +1 -0
- package/.next/server/app/api/app-update/releases/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -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/diagnostics/route.js +1 -0
- package/.next/server/app/api/diagnostics/route.js.nft.json +1 -0
- package/.next/server/app/api/diagnostics/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/file-index/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/server/app/api/git/status/route.js +1 -1
- package/.next/server/app/api/github/status/route.js +1 -1
- package/.next/server/app/api/github/status/route.js.nft.json +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/mcp/route.js +2 -2
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/server/app/api/models/fetch/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/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/omp-settings/route.js +1 -1
- package/.next/server/app/api/omp-update/route.js +2 -2
- package/.next/server/app/api/omp-version/route.js +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/projects/route.js +2 -2
- package/.next/server/app/api/providers/enable/route.js +1 -1
- package/.next/server/app/api/proxy/route.js +1 -0
- package/.next/server/app/api/proxy/route.js.nft.json +1 -0
- package/.next/server/app/api/proxy/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reveal/route.js +1 -1
- package/.next/server/app/api/scripts/route.js +1 -1
- package/.next/server/app/api/scripts/run/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/archive/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]/plan/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/[id]/subagents/[subagentId]/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
- package/.next/server/app/api/sessions/archive/route.js +1 -1
- package/.next/server/app/api/sessions/import/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +1 -1
- 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/terminal/input/route.js +3 -3
- package/.next/server/app/api/terminal/open/route.js +1 -1
- package/.next/server/app/api/terminal/resize/route.js +3 -3
- package/.next/server/app/api/terminal/session/route.js +3 -3
- package/.next/server/app/api/terminal/stream/route.js +4 -4
- package/.next/server/app/api/web-auth/session/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 +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +13 -10
- package/.next/server/chunks/2760.js +5 -0
- package/.next/server/chunks/3798.js +5 -5
- package/.next/server/chunks/5309.js +1 -1
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +13 -10
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/react-loadable-manifest.json +4 -4
- package/.next/standalone/.next/required-server-files.json +2 -2
- package/.next/standalone/.next/routes-manifest.json +18 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/agent/[id]/bash-output/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/standalone/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agent/running/events/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/route.js +1 -1
- package/.next/standalone/.next/server/app/api/app-update/releases/route.js +1 -0
- package/.next/standalone/.next/server/app/api/app-update/releases/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/app-update/releases/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/app-update/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cwd/browse/route.js +1 -1
- package/.next/standalone/.next/server/app/api/cwd/validate/route.js +1 -1
- package/.next/standalone/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/standalone/.next/server/app/api/diagnostics/route.js +1 -0
- package/.next/standalone/.next/server/app/api/diagnostics/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/diagnostics/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/file-index/route.js +1 -1
- package/.next/standalone/.next/server/app/api/files/[...path]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/git/diff/route.js +2 -2
- package/.next/standalone/.next/server/app/api/git/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/github/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/github/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/home/route.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
- package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/model-roles/route.js +1 -1
- package/.next/standalone/.next/server/app/api/models/fetch/route.js +1 -1
- package/.next/standalone/.next/server/app/api/models/route.js +1 -1
- package/.next/standalone/.next/server/app/api/models-config/catalog/route.js +1 -1
- package/.next/standalone/.next/server/app/api/models-config/route.js +1 -1
- package/.next/standalone/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/standalone/.next/server/app/api/omp-settings/route.js +1 -1
- package/.next/standalone/.next/server/app/api/omp-update/route.js +2 -2
- package/.next/standalone/.next/server/app/api/omp-version/route.js +1 -1
- package/.next/standalone/.next/server/app/api/plugins/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
- package/.next/standalone/.next/server/app/api/providers/enable/route.js +1 -1
- package/.next/standalone/.next/server/app/api/proxy/route.js +1 -0
- package/.next/standalone/.next/server/app/api/proxy/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/proxy/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/reveal/route.js +1 -1
- package/.next/standalone/.next/server/app/api/scripts/route.js +1 -1
- package/.next/standalone/.next/server/app/api/scripts/run/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/archive/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/auto-name/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/entries/[entryId]/thinking/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/export/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/plan/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/state/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/subagents/[subagentId]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/subagents/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/archive/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/import/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/check/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/skills/update/route.js +1 -1
- package/.next/standalone/.next/server/app/api/terminal/input/route.js +3 -3
- package/.next/standalone/.next/server/app/api/terminal/open/route.js +1 -1
- package/.next/standalone/.next/server/app/api/terminal/resize/route.js +3 -3
- package/.next/standalone/.next/server/app/api/terminal/session/route.js +3 -3
- package/.next/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- package/.next/standalone/.next/server/app/api/web-auth/session/route.js +1 -1
- package/.next/standalone/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/standalone/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login/page.js +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/standalone/.next/server/app/page.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +13 -10
- package/.next/standalone/.next/server/chunks/2760.js +5 -0
- package/.next/standalone/.next/server/chunks/3798.js +5 -5
- package/.next/standalone/.next/server/chunks/5309.js +1 -1
- package/.next/standalone/.next/server/instrumentation.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/linux-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/linux-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/linux-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/linux-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/win-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/win-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/win-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/dist-desktop/mac-arm64/OmpWeb.app/Contents/Resources/standalone/dist-desktop/win-arm64-unpacked/resources/standalone/.omp/mcp.json +11 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/.next/static/chunks/1147.a11b66ffeb201d02.js +126 -0
- package/.next/static/chunks/2584-d4cd2d8de76d5e35.js +1 -0
- package/.next/static/chunks/{3550.d3f97c806e3623e2.js → 3596.9fdb605d40673ac8.js} +1 -1
- package/.next/static/chunks/app/_global-error/page-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agent/running/events/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/agents/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/app-update/releases/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/app-update/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/cwd/browse/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/cwd/validate/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/diagnostics/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/file-index/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/git/diff/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/git/status/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/github/status/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/home/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/model-roles/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/models/fetch/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/models/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/models-config/catalog/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/omp-settings/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/omp-update/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/omp-version/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/plugins/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/projects/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/providers/enable/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/proxy/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/reveal/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/scripts/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/scripts/run/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/export/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/plan/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/state/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/subagents/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/archive/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/import/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/skills/check/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/skills/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/skills/update/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/terminal/input/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/terminal/open/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/terminal/resize/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/terminal/session/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/terminal/stream/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/web-auth/session/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/api/worktrees/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/app/{page-122708b0165e41be.js → page-e7e7426ef3ec9ec1.js} +1 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b24b35e3a039f3af.js +1 -0
- package/.next/static/chunks/webpack-9691f4590ba70cb8.js +1 -0
- package/.next/static/r2kW0snAtbTZ8muUOUByQ/_buildManifest.js +1 -0
- package/README.md +7 -20
- package/README.zh-CN.md +7 -20
- package/desktop/main.js +30 -2
- package/next.config.ts +9 -0
- package/package.json +1 -1
- package/public/trayTemplate.png +0 -0
- package/.next/server/chunks/7834.js +0 -5
- package/.next/standalone/.next/server/chunks/7834.js +0 -5
- package/.next/static/chunks/2584-f6cc0dc1511c8e00.js +0 -1
- package/.next/static/chunks/303.7d4586c12f686528.js +0 -126
- package/.next/static/chunks/app/_global-error/page-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/bash-output/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agent/running/events/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/agents/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/app-update/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/cwd/browse/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/cwd/validate/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/file-index/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/git/diff/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/git/status/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/github/status/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/home/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/mcp/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/model-roles/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/models/fetch/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/models/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/models-config/catalog/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/omp-settings/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/omp-update/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/omp-version/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/plugins/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/projects/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/providers/enable/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/reveal/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/scripts/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/scripts/run/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/archive/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/entries/[entryId]/thinking/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/export/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/plan/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/state/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/subagents/[subagentId]/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/subagents/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/archive/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/import/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/skills/check/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/skills/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/skills/update/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/terminal/input/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/terminal/open/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/terminal/resize/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/terminal/session/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/terminal/stream/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/web-auth/session/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/api/worktrees/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b0b6e7e566c944c1.js +0 -1
- package/.next/static/chunks/webpack-6821c41c73aad973.js +0 -1
- package/.next/static/pSABcr8MzgqcXzoz0WmZG/_buildManifest.js +0 -1
- /package/.next/static/{pSABcr8MzgqcXzoz0WmZG → r2kW0snAtbTZ8muUOUByQ}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=2053,a.ids=[2053],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2053,a.ids=[2053],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},21972:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>h});var d=c(23211),e=c(19038),f=c(10229),g=c(80547);let h="force-dynamic";async function i(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd:"";if(!c)return d.NextResponse.json({error:"cwd required",code:"cwd_required"},{status:400});let h=await (0,g.mc)();if(!(0,g.B7)(c,h))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let i="string"==typeof b.package?b.package:void 0,j="global"===b.scope||"project"===b.scope?b.scope:void 0;if(i&&!j||!i&&j)return d.NextResponse.json({error:"package and scope must be provided together",code:"package_scope_together"},{status:400});let{skills:k}=await (0,f.y9)(c),l=k.map(a=>a.install).filter(a=>!!a).filter(a=>!i||a.package===i&&a.scope===j);if(i&&0===l.length)return d.NextResponse.json({error:"Installed skill not found",code:"skill_not_installed"},{status:404});let m=await (0,e.S7)(l,{githubToken:process.env.GITHUB_TOKEN||process.env.GH_TOKEN});return d.NextResponse.json({updates:m})}catch(a){return d.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500})}}},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")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},54239:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/check/route",pathname:"/api/skills/check",filename:"route",bundlePath:"app/api/skills/check/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/check/route.ts",nextConfigOutput:"standalone",userland:()=>c(21972),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/check/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3294,4509,3290],()=>b(b.s=54239));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7812,a.ids=[7812],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7812,a.ids=[7812],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},36217:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/install/route",pathname:"/api/skills/install",filename:"route",bundlePath:"app/api/skills/install/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/install/route.ts",nextConfigOutput:"standalone",userland:()=>c(43987),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/install/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},41204:a=>{a.exports=require("string_decoder")},43987:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>i,dynamic:()=>g});var d=c(23211),e=c(97990),f=c(80547);let g="force-dynamic",h=/\x1B\[[0-9;]*m/g;async function i(a){try{let{package:b,scope:c,cwd:g}=await a.json();if(!b?.trim())return d.NextResponse.json({error:"package required",code:"package_required"},{status:400});let i="project"!==c;if(!i){if(!g)return d.NextResponse.json({error:"cwd required for project install",code:"cwd_required_for_project_install"},{status:400});let a=await (0,f.mc)();if(!(0,f.B7)(g,a))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403})}let j=["skills","add",b.trim(),"-y","--agent","universal"];i&&j.push("-g");let{stdout:k,stderr:l}=await (0,e.a)(j,{timeout:6e4,cwd:!i&&g?g:void 0,env:{...process.env,FORCE_COLOR:"0"}}),m=(k+l).replace(h,"");if(!/Installation complete|Installed \d+ skill/.test(m)){let a=m.slice(-300);return d.NextResponse.json(a?{error:a}:{error:"Install failed",code:"skill_install_failed"},{status:500})}return d.NextResponse.json({success:!0,output:m})}catch(b){let a=((b.stdout??"")+(b.stderr??"")).replace(h,"");return d.NextResponse.json({error:a||(b.message??String(b))},{status:500})}}},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},97990:(a,b,c)=>{c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873),h=c(19771);let i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=36217));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";(()=>{var a={};a.id=9968,a.ids=[9968],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10229:(a,b,c)=>{c.d(b,{Jw:()=>n,y9:()=>w,pM:()=>l,Sb:()=>q,Ss:()=>t});var d=c(29021),e=c(21820),f=c(33873),g=c(63294),h=c(85887);function i(a){try{let b=JSON.parse((0,d.readFileSync)(a,"utf8"));return b.skills&&"object"==typeof b.skills?b.skills:{}}catch{return{}}}function j(a,b){let c=(0,f.relative)((0,f.resolve)(b),(0,f.resolve)(a));return""!==c&&".."!==c&&!c.startsWith(`..${f.sep}`)&&!(0,f.isAbsolute)(c)}function k(a,b,c){var d;let e=function(a,b){if(a[b])return a[b];let c=b.toLowerCase(),d=Object.keys(a).find(a=>a.toLowerCase()===c);return d?a[d]:void 0}(a,b);if(!e||"string"!=typeof e.source||!e.source.trim())return;let f="string"==typeof e.sourceType?e.sourceType:void 0,g=(d=e.source.trim(),"github"!==f?d.replace(/\/$/,""):d.replace(/^git\+/,"").replace(/^https?:\/\/github\.com\//,"").replace(/^git@github\.com:/,"").replace(/\.git$/,"").replace(/\/$/,""));if(!g)return;let h="string"==typeof e.skillPath?e.skillPath:void 0,i="string"==typeof e.ref?e.ref:void 0,j="global"===c?e.skillFolderHash:e.computedHash,k="string"==typeof j&&j?j:void 0,l="github"===f&&/^[\w.-]+\/[\w.-]+$/.test(g);return{package:`${g}@${b}`,scope:c,source:g,sourceType:f,skillsShUrl:"local"===f?void 0:function(a,b){if(!a||a.includes("://")||a.startsWith("git@"))return;let c=a.split("/").filter(Boolean).map(encodeURIComponent).join("/");if(c)return`https://skills.sh/${c}/${encodeURIComponent(b)}`}(g,b),...h&&{skillPath:h},...i&&{ref:i},...k&&{versionHash:k},canCheckForUpdates:!!(l&&h&&k&&("global"===c||!i))}}function l(a){let b=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(a);if(!b)return{frontmatter:{},body:a};try{let c=(0,g.qg)(b[1]);return{frontmatter:c&&"object"==typeof c&&!Array.isArray(c)?c:{},body:a.slice(b[0].length)}}catch{return{frontmatter:{},body:a.slice(b[0].length)}}}function m(a){let b=(0,e.homedir)(),c=(0,h.$M)(),g=function(a){let b=(0,e.homedir)(),c=[],g=f.resolve(a);for(;c.push(g),!(0,d.existsSync)(f.join(g,".git"))&&g!==b;){let a=f.dirname(g);if(a===g)break;g=a}return c}(a),i=g.filter(a=>a!==b),j=[];for(let a of i)j.push({dir:f.join(a,".omp","skills"),source:".omp",scope:"project",requireDescription:!0});j.push({dir:f.join(c,"skills"),source:".omp",scope:"user",requireDescription:!0});let k=process.env.CLAUDE_CONFIG_DIR||f.join(b,".claude");for(let a of(j.push({dir:f.join(k,"skills"),source:".claude",scope:"user"}),i))j.push({dir:f.join(a,".claude","skills"),source:".claude",scope:"project"});for(let a of i)j.push({dir:f.join(a,".agent","skills"),source:".agents",scope:"project"}),j.push({dir:f.join(a,".agents","skills"),source:".agents",scope:"project"});j.push({dir:f.join(b,".agent","skills"),source:".agents",scope:"user"}),j.push({dir:f.join(b,".agents","skills"),source:".agents",scope:"user"}),j.push({dir:f.join(b,".codex","skills"),source:".codex",scope:"user"}),j.push({dir:f.join(a,".codex","skills"),source:".codex",scope:"project"});let l=g[g.length-1];return j.push({dir:f.join(l,".github","skills"),source:".github",scope:"project",requireDescription:!0}),j.push({dir:f.join(c,"managed-skills"),source:"managed",scope:"user",requireDescription:!0}),j}function n(a){return m(a??(0,e.homedir)()).map(a=>a.dir)}let o=["disable-model-invocation","disableModelInvocation","hide"],p=o[0];function q(a){return o.some(b=>{var c;return!0===(c=a[b])||"true"===c})}let r=/^---\r?\n([\s\S]*?)\r?\n---(\r?\n|$)/,s=RegExp(`^(?:${o.join("|")})[ \\t]*:.*$`);function t(a,b){let c,d=r.exec(a);if(!d)return b?`---
|
|
2
2
|
${p}: true
|
|
3
3
|
---
|
|
4
|
-
${a}`:a;let e=d[0].includes("\r\n")?"\r\n":"\n",f=d[1].split(/\r?\n/),g=f.reduce((a,b,c)=>(s.test(b)&&a.push(c),a),[]);if(b)if(0===g.length)c=[`${p}: true`,...f];else{let a=g[0],b=/^([\w-]+)/.exec(f[a])?.[1]??p;c=f.map((c,d)=>d===a?`${b}: true`:c).filter((b,c)=>c===a||!g.includes(c))}else{if(0===g.length)return a;c=f.filter((a,b)=>!g.includes(b))}return`---${e}${c.join(e)}${e}---${d[2]}`+a.slice(d[0].length)}async function u(a,b){let c;try{let b=Reflect.get(d.promises,"readdir");c=await b(a.dir,{withFileTypes:!0})}catch(c){return"ENOENT"!==c.code&&b.push({type:"warning",message:`Failed to read skills directory: ${String(c)}`,path:a.dir}),[]}let e=[];return await Promise.all(c.map(async c=>{let g;if(c.name.startsWith(".")||!c.isDirectory()&&!c.isSymbolicLink())return;let h=f.join(a.dir,c.name,"SKILL.md");try{g=await d.promises.readFile(h,"utf8")}catch(a){"ENOENT"!==a.code&&b.push({type:"warning",message:"Failed to read skill file",path:h});return}let{frontmatter:i}=l(g);if(!1===i.enabled)return;let j="string"==typeof i.description?i.description:"";if(a.requireDescription&&!j)return;let k=i.name,m="string"==typeof k&&k.trim()?k.trim():c.name;e.push({name:m,description:j,filePath:h,baseDir:f.join(a.dir,c.name),disableModelInvocation:q(i),sourceInfo:{source:a.source,scope:a.scope}})})),e}async function v(a){let b=[],c=new Map;for(let d of m(a))for(let a of(await u(d,b)))c.has(a.name)||c.set(a.name,a);return{skills:[...c.values()].sort((a,b)=>{let c=a.name.toLowerCase().localeCompare(b.name.toLowerCase());return 0!==c?c:a.filePath.localeCompare(b.filePath)}),diagnostics:b}}async function w(a){let{skills:b,diagnostics:c}=await v(a);return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:g=function(a={}){let b=a.homeDir??(0,e.homedir)(),c=a.xdgStateHome??(void 0===a.homeDir?process.env.XDG_STATE_HOME:void 0);return c?(0,f.join)(c,"skills",".skill-lock.json"):(0,f.join)(b,".agents",".skill-lock.json")}(),projectLockPath:h=(0,f.join)(b,"skills-lock.json")}){let l=i(g),m=i(h),n=[(0,f.join)(c,"skills"),(0,f.join)((0,e.homedir)(),".agents","skills")],o=[(0,f.join)(b,".omp","skills"),(0,f.join)(b,".agents","skills")];return a.map(a=>{if(!(0,d.existsSync)(a.filePath))return a;let b=n.some(b=>j(a.filePath,b))?k(l,a.name,"global"):o.some(b=>j(a.filePath,b))?k(m,a.name,"project"):void 0;return b?{...a,install:b}:a})}(b,{cwd:a,agentDir:(0,h.$M)()}),diagnostics:c}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45403:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>j,PATCH:()=>k,dynamic:()=>i});var d=c(23211),e=c(29021),f=c(33873),g=c(10229),h=c(80547);let i="force-dynamic";async function j(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return d.NextResponse.json({error:"cwd required",code:"cwd_required"},{status:400});try{let a=await (0,h.mc)();if(!(0,h.B7)(c,a))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return d.NextResponse.json(await (0,g.y9)(c))}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let{filePath:b,disableModelInvocation:c,cwd:i}=await a.json();if(!b)return d.NextResponse.json({error:"filePath required",code:"file_path_required"},{status:400});if("SKILL.md"!==(0,f.basename)(b))return d.NextResponse.json({error:"not a SKILL.md file",code:"not_a_skill_file"},{status:400});if(!(0,e.existsSync)(b))return d.NextResponse.json({error:"file not found",code:"file_not_found"},{status:404});let j=new Set(await (0,h.mc)()),k=i&&(0,h.B7)(i,j)?i:void 0;for(let a of(0,g.Jw)(k))j.add(a);let l=(0,e.realpathSync)(b);if(!(0,h.B7)(l,j))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let m=(0,e.readFileSync)(l,"utf8"),n=(0,g.Ss)(m,c);n!==m&&(0,e.writeFileSync)(l,n,"utf8");let{frontmatter:o}=(0,g.pM)(n);return d.NextResponse.json({success:!0,disableModelInvocation:(0,g.Sb)(o)})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91899:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:()=>c(45403),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3294,4509],()=>b(b.s=91899));module.exports=c})();
|
|
4
|
+
${a}`:a;let e=d[0].includes("\r\n")?"\r\n":"\n",f=d[1].split(/\r?\n/),g=f.reduce((a,b,c)=>(s.test(b)&&a.push(c),a),[]);if(b)if(0===g.length)c=[`${p}: true`,...f];else{let a=g[0],b=/^([\w-]+)/.exec(f[a])?.[1]??p;c=f.map((c,d)=>d===a?`${b}: true`:c).filter((b,c)=>c===a||!g.includes(c))}else{if(0===g.length)return a;c=f.filter((a,b)=>!g.includes(b))}return`---${e}${c.join(e)}${e}---${d[2]}`+a.slice(d[0].length)}async function u(a,b){let c;try{let b=Reflect.get(d.promises,"readdir");c=await b(a.dir,{withFileTypes:!0})}catch(c){return"ENOENT"!==c.code&&b.push({type:"warning",message:`Failed to read skills directory: ${String(c)}`,path:a.dir}),[]}let e=[];return await Promise.all(c.map(async c=>{let g;if(c.name.startsWith(".")||!c.isDirectory()&&!c.isSymbolicLink())return;let h=f.join(a.dir,c.name,"SKILL.md");try{g=await d.promises.readFile(h,"utf8")}catch(a){"ENOENT"!==a.code&&b.push({type:"warning",message:"Failed to read skill file",path:h});return}let{frontmatter:i}=l(g);if(!1===i.enabled)return;let j="string"==typeof i.description?i.description:"";if(a.requireDescription&&!j)return;let k=i.name,m="string"==typeof k&&k.trim()?k.trim():c.name;e.push({name:m,description:j,filePath:h,baseDir:f.join(a.dir,c.name),disableModelInvocation:q(i),sourceInfo:{source:a.source,scope:a.scope}})})),e}async function v(a){let b=[],c=new Map;for(let d of m(a))for(let a of(await u(d,b)))c.has(a.name)||c.set(a.name,a);return{skills:[...c.values()].sort((a,b)=>{let c=a.name.toLowerCase().localeCompare(b.name.toLowerCase());return 0!==c?c:a.filePath.localeCompare(b.filePath)}),diagnostics:b}}async function w(a){let{skills:b,diagnostics:c}=await v(a);return{skills:function(a,{cwd:b,agentDir:c,globalLockPath:g=function(a={}){let b=a.homeDir??(0,e.homedir)(),c=a.xdgStateHome??(void 0===a.homeDir?process.env.XDG_STATE_HOME:void 0);return c?(0,f.join)(c,"skills",".skill-lock.json"):(0,f.join)(b,".agents",".skill-lock.json")}(),projectLockPath:h=(0,f.join)(b,"skills-lock.json")}){let l=i(g),m=i(h),n=[(0,f.join)(c,"skills"),(0,f.join)((0,e.homedir)(),".agents","skills")],o=[(0,f.join)(b,".omp","skills"),(0,f.join)(b,".agents","skills")];return a.map(a=>{if(!(0,d.existsSync)(a.filePath))return a;let b=n.some(b=>j(a.filePath,b))?k(l,a.name,"global"):o.some(b=>j(a.filePath,b))?k(m,a.name,"project"):void 0;return b?{...a,install:b}:a})}(b,{cwd:a,agentDir:(0,h.$M)()}),diagnostics:c}}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12557:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:()=>c(45403),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45403:(a,b,c)=>{c.r(b),c.d(b,{GET:()=>j,PATCH:()=>k,dynamic:()=>i});var d=c(23211),e=c(29021),f=c(33873),g=c(10229),h=c(80547);let i="force-dynamic";async function j(a){let{searchParams:b}=new URL(a.url),c=b.get("cwd");if(!c)return d.NextResponse.json({error:"cwd required",code:"cwd_required"},{status:400});try{let a=await (0,h.mc)();if(!(0,h.B7)(c,a))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});return d.NextResponse.json(await (0,g.y9)(c))}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}async function k(a){try{let{filePath:b,disableModelInvocation:c,cwd:i}=await a.json();if(!b)return d.NextResponse.json({error:"filePath required",code:"file_path_required"},{status:400});if("SKILL.md"!==(0,f.basename)(b))return d.NextResponse.json({error:"not a SKILL.md file",code:"not_a_skill_file"},{status:400});if(!(0,e.existsSync)(b))return d.NextResponse.json({error:"file not found",code:"file_not_found"},{status:404});let j=new Set(await (0,h.mc)()),k=i&&(0,h.B7)(i,j)?i:void 0;for(let a of(0,g.Jw)(k))j.add(a);let l=(0,e.realpathSync)(b);if(!(0,h.B7)(l,j))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let m=(0,e.readFileSync)(l,"utf8"),n=(0,g.Ss)(m,c);n!==m&&(0,e.writeFileSync)(l,n,"utf8");let{frontmatter:o}=(0,g.pM)(n);return d.NextResponse.json({success:!0,disableModelInvocation:(0,g.Sb)(o)})}catch(a){return d.NextResponse.json({error:String(a)},{status:500})}}},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3294,4509],()=>b(b.s=12557));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3955,a.ids=[3955],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74849:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/search/route.ts",nextConfigOutput:"standalone",userland:()=>c(78638),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},78335:()=>{},78638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>l,dynamic:()=>f});var d=c(23211),e=c(97990);let f="force-dynamic",g=/\x1B\[[0-9;]*m/g,h=process.env.SKILLS_API_URL||"https://skills.sh";function i(a){let b=a.replace(g,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function j(a,b){let c=`${h}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${h}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>k(b.installs)-k(a.installs))}function k(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function l(a){try{let b,{query:c,limit:f}=await a.json();if(!c?.trim())return d.NextResponse.json({error:"query required",code:"query_required"},{status:400});let g=(b="number"==typeof f?f:Number(f),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await j(c.trim(),g);return d.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,e.a)(["skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),f=i(a+b).slice(0,g);return d.NextResponse.json({results:f})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?i(a):[];if(b.length>0)return d.NextResponse.json({results:b});return d.NextResponse.json({error:c.message??String(c)},{status:500})}}},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},97990:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873),h=c(19771);let i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=74849));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=3955,a.ids=[3955],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{"use strict";a.exports=require("process")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},52371:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/search/route",pathname:"/api/skills/search",filename:"route",bundlePath:"app/api/skills/search/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/search/route.ts",nextConfigOutput:"standalone",userland:()=>c(78638),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/search/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},78638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>l,dynamic:()=>f});var d=c(23211),e=c(97990);let f="force-dynamic",g=/\x1B\[[0-9;]*m/g,h=process.env.SKILLS_API_URL||"https://skills.sh";function i(a){let b=a.replace(g,""),c=[],d=b.split("\n");for(let a=0;a<d.length;a++){let b=d[a].trim().match(/^([\w.\-]+\/[\w.\-@:]+)\s+([\d.,]+[KMB]?\s+installs)$/);if(b){let e=d[a+1]?.trim().replace(/^└\s*/,"");c.push({package:b[1],installs:b[2],url:e?.startsWith("https://")?e:""})}}return c}async function j(a,b){let c=`${h}/api/search?q=${encodeURIComponent(a)}&limit=${b}`,d=await fetch(c,{cache:"no-store"});if(!d.ok)throw Error(`skills.sh search failed: HTTP ${d.status}`);return((await d.json()).skills??[]).map(a=>{var b;let c=a.name?.trim(),d=a.source?.trim(),e=a.id?.trim();return c&&(d||e)?{package:`${d||e}@${c}`,installs:(b=a.installs)&&!(b<=0)?b>=1e6?`${(b/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:b>=1e3?`${(b/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${b} install${1===b?"":"s"}`:"",url:e?`${h}/${e}`:""}:null}).filter(a=>null!==a).sort((a,b)=>k(b.installs)-k(a.installs))}function k(a){let b=a.match(/^([\d.]+)([KMB])?\s+installs?$/);if(!b)return 0;let c=Number(b[1]);return Number.isFinite(c)?c*("B"===b[2]?1e9:"M"===b[2]?1e6:"K"===b[2]?1e3:1):0}async function l(a){try{let b,{query:c,limit:f}=await a.json();if(!c?.trim())return d.NextResponse.json({error:"query required",code:"query_required"},{status:400});let g=(b="number"==typeof f?f:Number(f),Number.isFinite(b)?Math.min(50,Math.max(1,Math.floor(b))):50);try{let a=await j(c.trim(),g);return d.NextResponse.json({results:a})}catch{let{stdout:a,stderr:b}=await (0,e.a)(["skills","find",c.trim()],{timeout:2e4,env:{...process.env,FORCE_COLOR:"0"}}),f=i(a+b).slice(0,g);return d.NextResponse.json({results:f})}}catch(c){let a=(c.stdout??"")+(c.stderr??""),b=a?i(a):[];if(b.length>0)return d.NextResponse.json({results:b});return d.NextResponse.json({error:c.message??String(c)},{status:500})}}},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{},97990:(a,b,c)=>{"use strict";c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873),h=c(19771);let i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=52371));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=9156,a.ids=[9156],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},
|
|
1
|
+
"use strict";(()=>{var a={};a.id=9156,a.ids=[9156],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")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11457:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/skills/update/route",pathname:"/api/skills/update",filename:"route",bundlePath:"app/api/skills/update/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/skills/update/route.ts",nextConfigOutput:"standalone",userland:()=>c(56679),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/skills/update/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19771:a=>{a.exports=require("process")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},56679:(a,b,c)=>{c.r(b),c.d(b,{POST:()=>j,dynamic:()=>i});var d=c(23211),e=c(97990),f=c(19038),g=c(10229),h=c(80547);let i="force-dynamic";async function j(a){try{let b=await a.json(),c="string"==typeof b.cwd?b.cwd:"",i="string"==typeof b.package?b.package:"",j="global"===b.scope||"project"===b.scope?b.scope:void 0;if(!c||!i||!j)return d.NextResponse.json({error:"cwd, package, and scope are required",code:"cwd_package_scope_required"},{status:400});let k=await (0,h.mc)();if(!(0,h.B7)(c,k))return d.NextResponse.json({error:"Access denied",code:"access_denied"},{status:403});let{skills:l}=await (0,g.y9)(c),m=l.find(a=>a.install?.package===i&&a.install.scope===j);if(!m?.install)return d.NextResponse.json({error:"Installed skill not found",code:"skill_not_installed"},{status:404});if(!m.install.canCheckForUpdates)return d.NextResponse.json({error:"This skill cannot be updated automatically",code:"skill_update_unsupported"},{status:400});let{stdout:n,stderr:o}=await (0,e.a)((0,f.CU)(m.install),{timeout:6e4,cwd:"project"===j?c:void 0,env:{...process.env,FORCE_COLOR:"0"}}),p=(await (0,g.y9)(c)).skills.find(a=>a.install?.package===i&&a.install.scope===j);return d.NextResponse.json({success:!0,skill:p,output:`${n}${o}`.slice(-500)})}catch(b){let a=`${b.stdout??""}${b.stderr??""}`;return d.NextResponse.json({error:a||b.message||String(b)},{status:500})}}},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},97990:(a,b,c)=>{c.d(b,{a:()=>j});var d=c(79646),e=c(28354),f=c(29021),g=c(33873),h=c(19771);let i=(0,e.promisify)(d.execFile);async function j(a,b={}){let c=function(){let a=(0,g.dirname)(h.execPath);for(let b of[(0,g.join)(a,"node_modules","npm","bin","npx-cli.js"),(0,g.join)(a,"..","lib","node_modules","npm","bin","npx-cli.js")])try{if((0,f.existsSync)(b))return b}catch{}return null}(),{command:d,commandArgs:e}=c?{command:h.execPath,commandArgs:[c,...a]}:{command:"npx",commandArgs:a};return i(d,e,{timeout:b.timeout,cwd:b.cwd,env:b.env})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,3294,4509,3290],()=>b(b.s=11457));module.exports=c})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var a={};a.id=191,a.ids=[191],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{"use strict";c.d(b,{Hx:()=>
|
|
1
|
+
(()=>{var a={};a.id=191,a.ids=[191],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{"use strict";c.d(b,{Hx:()=>p,n_:()=>k,Bw:()=>l,Nu:()=>o,O7:()=>m,l0:()=>n});var d=c(55511),e=c.n(d),f=c(29021),g=c.n(f);let h=require("node-pty");var i=c(87831);let j=globalThis.__ompTerminalSessions??new Map;function k(a){let b,c=a;c&&"string"==typeof c&&g().existsSync(c)||(c=process.cwd());try{c=g().realpathSync(c)}catch{c=process.cwd()}let d=Date.now();for(let[a,b]of j)if(0===b.subscribers.size&&d-b.lastActivityAt>18e5){try{b.process.kill()}catch{}j.delete(a)}for(;j.size>=8;){let a=null,b="";for(let[c,d]of j)(!a||d.createdAt<a.createdAt)&&(a=d,b=c);if(!a)break;try{a.process.kill()}catch{}j.delete(b)}let f=`term-${e().randomBytes(8).toString("hex")}`;try{b=function(a,b){var c;let{shell:d,args:e}=(c=process.platform,"win32"===c?{shell:b.COMSPEC||"cmd.exe",args:[]}:{shell:b.SHELL||("darwin"===c?"/bin/zsh":"/bin/bash"),args:["-i"]});return h.spawn(d,e,{name:"xterm-256color",cols:80,rows:24,cwd:a,env:function(a){let b={};for(let[c,d]of Object.entries(a))"string"==typeof d&&(b[c]=d);return b}({...b,...(0,i.cS)(process.env.OMP_WEB_PROXY_URL||null)})})}(c,{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor",LANG:process.env.LANG||"en_US.UTF-8",LC_ALL:process.env.LC_ALL||"en_US.UTF-8"})}catch(a){throw Error(`Failed to spawn terminal shell: ${a instanceof Error?a.message:String(a)}`)}let k={id:f,process:b,cwd:c,createdAt:d,lastActivityAt:d,subscribers:new Set,historyBuffer:[],historyBytes:0},l=a=>{for(k.lastActivityAt=Date.now(),k.historyBuffer.push(a),k.historyBytes+=Buffer.byteLength(a,"utf8");k.historyBytes>1048576&&k.historyBuffer.length>1;){let a=k.historyBuffer.shift();a&&(k.historyBytes-=Buffer.byteLength(a,"utf8"))}k.subscribers.forEach(b=>{try{b(a)}catch(a){console.error("[TerminalManager] Callback error:",a)}})};return l(`\r
|
|
2
2
|
\x1b[38;2;176;62;34m⌥ omp web\x1b[0m \x1b[90m\xb7 Terminal Ready \xb7\x1b[0m \x1b[36m${c}\x1b[0m\r
|
|
3
3
|
\r
|
|
4
|
-
`),b.onData(a=>{
|
|
4
|
+
`),b.onData(a=>{l(a)}),b.onExit(({exitCode:a})=>{l(`\r
|
|
5
5
|
\x1b[33m[Terminal closed with code ${a??0}]\x1b[0m\r
|
|
6
|
-
`),i.delete(f)}),i.set(f,j),{id:f,cwd:c}}function k(a){return i.get(a)}function l(a,b){let c=i.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function m(a,b){let c=i.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function n(a,b,c){let d=i.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function o(a){let b=i.get(a);if(!b)return!1;try{b.process.kill()}catch{}return i.delete(a),!0}globalThis.__ompTerminalSessions=i},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},36105:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/input/route",pathname:"/api/terminal/input",filename:"route",bundlePath:"app/api/terminal/input/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/input/route.ts",nextConfigOutput:"standalone",userland:()=>c(78106),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/input/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78106:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>g,dynamic:()=>f});var d=c(23211),e=c(2717);let f="force-dynamic";async function g(a){try{let{id:b,data:c}=await a.json().catch(()=>({}));if(!b||"string"!=typeof c)return d.NextResponse.json({error:"Invalid request payload"},{status:400});let f=(0,e.l0)(b,c);return d.NextResponse.json({ok:f})}catch(b){let a=b instanceof Error?b.message:"Failed to write input";return d.NextResponse.json({error:a},{status:500})}}},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=36105));module.exports=c})();
|
|
6
|
+
`),j.delete(f)}),j.set(f,k),{id:f,cwd:c}}function l(a){return j.get(a)}function m(a,b){let c=j.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function n(a,b){let c=j.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function o(a,b,c){let d=j.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function p(a){let b=j.get(a);if(!b)return!1;try{b.process.kill()}catch{}return j.delete(a),!0}globalThis.__ompTerminalSessions=j},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},49131:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/input/route",pathname:"/api/terminal/input",filename:"route",bundlePath:"app/api/terminal/input/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/input/route.ts",nextConfigOutput:"standalone",userland:()=>c(78106),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/input/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78106:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>g,dynamic:()=>f});var d=c(23211),e=c(2717);let f="force-dynamic";async function g(a){try{let{id:b,data:c}=await a.json().catch(()=>({}));if(!b||"string"!=typeof c)return d.NextResponse.json({error:"Invalid request payload"},{status:400});let f=(0,e.l0)(b,c);return d.NextResponse.json({ok:f})}catch(b){let a=b instanceof Error?b.message:"Failed to write input";return d.NextResponse.json({error:a},{status:500})}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.d(b,{Cn:()=>o,cS:()=>q,li:()=>l,qM:()=>p,qt:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873),h=c(91645),i=c.n(h);let j=(0,g.join)((0,f.homedir)(),".omp","agent","proxy.json"),k=[7890,7897,1087,1080,8118,8888];function l(){try{let a=JSON.parse((0,e.readFileSync)(j,"utf8"));if("auto"===a.mode||"manual"===a.mode||"off"===a.mode)return{mode:a.mode,url:"string"==typeof a.url?a.url:void 0}}catch{}return{mode:"auto"}}function m(a){(0,e.mkdirSync)((0,g.dirname)(j),{recursive:!0});let b=`${j}.tmp-${process.pid}`;(0,e.writeFileSync)(b,JSON.stringify(a,null,2)+"\n"),(0,e.renameSync)(b,j)}function n(a,b="127.0.0.1",c=400){return new Promise(d=>{let e=new(i()).Socket,f=a=>{e.destroy(),d(a)};e.setTimeout(c),e.once("connect",()=>f(!0)),e.once("timeout",()=>f(!1)),e.once("error",()=>f(!1)),e.connect(a,b)})}async function o(){let a=[];for(let b of function(){let a=process.platform;try{if("darwin"===a){let a=(0,d.execFileSync)("scutil",["--proxy"],{encoding:"utf8",timeout:3e3}),b=[],c=/HTTPProxy\s*:\s*(\S+)/.exec(a)?.[1],e=/HTTPPort\s*:\s*(\d+)/.exec(a)?.[1],f=/HTTPSProxy\s*:\s*(\S+)/.exec(a)?.[1],g=/HTTPSPort\s*:\s*(\d+)/.exec(a)?.[1];return c&&e&&b.push({url:`http://${c}:${e}`,source:"system-http"}),f&&g&&b.push({url:`http://${f}:${g}`,source:"system-https"}),b}if("win32"===a){let a=(0,d.execFileSync)("reg",["query","HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"],{encoding:"utf8",timeout:3e3}),b=/ProxyEnable\s+REG_DWORD\s+0x(\d+)/i.exec(a)?.[1];if("1"===b){let b=/ProxyServer\s+REG_SZ\s+(\S+)/i.exec(a)?.[1];if(b)return[{url:/^https?:\/\//i.test(b)?b:`http://${b}`,source:"system-proxy"}]}return[]}if("linux"===a){let a=[];for(let b of["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy"]){let c=process.env[b];if(c){let b=/^https?:\/\//i.test(c)?c:`http://${c}`;a.some(a=>a.url===b)||a.push({url:b,source:"env"})}}try{let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy","mode"],{encoding:"utf8",timeout:2e3}).trim();if("'manual'"===b){let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","host"],{encoding:"utf8",timeout:2e3}).trim().replace(/^'|'$/g,""),c=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","port"],{encoding:"utf8",timeout:2e3}).trim();b&&c&&a.push({url:`http://${b}:${c}`,source:"gnome"})}}catch{}return a}}catch{}return[]}())await n(Number(new URL(b.url).port))&&a.push(b);for(let b of k)if(await n(b)){let c=`http://127.0.0.1:${b}`;a.some(a=>a.url===c)||a.push({url:c,source:"local-port"})}let b=l(),c=!1;if("manual"===b.mode&&b.url)try{let a=Number(new URL(b.url).port);c=await n(a,new URL(b.url).hostname)}catch{c=!1}let e=a[0]?.url??(c&&b.url?b.url:null);return{candidates:a,recommended:e,manualReachable:c}}async function p(){let a=l();if("off"===a.mode)return null;if("manual"===a.mode){if(!a.url)return null;try{let b=Number(new URL(a.url).port);return await n(b,new URL(a.url).hostname)?a.url:null}catch{return null}}return(await o()).recommended}function q(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}},91645:a=>{"use strict";a.exports=require("net")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=49131));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3805,a.ids=[3805],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51256:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>i,dynamic:()=>h});var d=c(23211),e=c(79646),f=c(29021),g=c.n(f);let h="force-dynamic";async function i(a){try{let b=await a.json().catch(()=>({})),c=b?.cwd;c&&"string"==typeof c&&g().existsSync(c)||(c=process.cwd());let f=g().realpathSync(c),h="",i="Terminal";return"darwin"===process.platform?(h=`open -a Terminal "${f}"`,i="Terminal.app"):"win32"===process.platform?(h=`start cmd.exe /K "cd /d ${f}"`,i="Command Prompt"):(h=`x-terminal-emulator --working-directory="${f}" || gnome-terminal --working-directory="${f}" || xterm -e "cd '${f}' && exec $SHELL"`,i="Terminal"),(0,e.exec)(h,a=>{a&&console.error("[Terminal Open] Failed to launch terminal:",a)}),d.NextResponse.json({ok:!0,cwd:f,terminal:i})}catch(b){let a=b instanceof Error?b.message:"Failed to open terminal";return d.NextResponse.json({error:a},{status:500})}}},
|
|
1
|
+
(()=>{var a={};a.id=3805,a.ids=[3805],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")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51256:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>i,dynamic:()=>h});var d=c(23211),e=c(79646),f=c(29021),g=c.n(f);let h="force-dynamic";async function i(a){try{let b=await a.json().catch(()=>({})),c=b?.cwd;c&&"string"==typeof c&&g().existsSync(c)||(c=process.cwd());let f=g().realpathSync(c),h="",i="Terminal";return"darwin"===process.platform?(h=`open -a Terminal "${f}"`,i="Terminal.app"):"win32"===process.platform?(h=`start cmd.exe /K "cd /d ${f}"`,i="Command Prompt"):(h=`x-terminal-emulator --working-directory="${f}" || gnome-terminal --working-directory="${f}" || xterm -e "cd '${f}' && exec $SHELL"`,i="Terminal"),(0,e.exec)(h,a=>{a&&console.error("[Terminal Open] Failed to launch terminal:",a)}),d.NextResponse.json({ok:!0,cwd:f,terminal:i})}catch(b){let a=b instanceof Error?b.message:"Failed to open terminal";return d.NextResponse.json({error:a},{status:500})}}},53151:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/open/route",pathname:"/api/terminal/open",filename:"route",bundlePath:"app/api/terminal/open/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/open/route.ts",nextConfigOutput:"standalone",userland:()=>c(51256),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/open/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=53151));module.exports=c})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var a={};a.id=5517,a.ids=[5517],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{"use strict";c.d(b,{Hx:()=>
|
|
1
|
+
(()=>{var a={};a.id=5517,a.ids=[5517],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{"use strict";c.d(b,{Hx:()=>p,n_:()=>k,Bw:()=>l,Nu:()=>o,O7:()=>m,l0:()=>n});var d=c(55511),e=c.n(d),f=c(29021),g=c.n(f);let h=require("node-pty");var i=c(87831);let j=globalThis.__ompTerminalSessions??new Map;function k(a){let b,c=a;c&&"string"==typeof c&&g().existsSync(c)||(c=process.cwd());try{c=g().realpathSync(c)}catch{c=process.cwd()}let d=Date.now();for(let[a,b]of j)if(0===b.subscribers.size&&d-b.lastActivityAt>18e5){try{b.process.kill()}catch{}j.delete(a)}for(;j.size>=8;){let a=null,b="";for(let[c,d]of j)(!a||d.createdAt<a.createdAt)&&(a=d,b=c);if(!a)break;try{a.process.kill()}catch{}j.delete(b)}let f=`term-${e().randomBytes(8).toString("hex")}`;try{b=function(a,b){var c;let{shell:d,args:e}=(c=process.platform,"win32"===c?{shell:b.COMSPEC||"cmd.exe",args:[]}:{shell:b.SHELL||("darwin"===c?"/bin/zsh":"/bin/bash"),args:["-i"]});return h.spawn(d,e,{name:"xterm-256color",cols:80,rows:24,cwd:a,env:function(a){let b={};for(let[c,d]of Object.entries(a))"string"==typeof d&&(b[c]=d);return b}({...b,...(0,i.cS)(process.env.OMP_WEB_PROXY_URL||null)})})}(c,{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor",LANG:process.env.LANG||"en_US.UTF-8",LC_ALL:process.env.LC_ALL||"en_US.UTF-8"})}catch(a){throw Error(`Failed to spawn terminal shell: ${a instanceof Error?a.message:String(a)}`)}let k={id:f,process:b,cwd:c,createdAt:d,lastActivityAt:d,subscribers:new Set,historyBuffer:[],historyBytes:0},l=a=>{for(k.lastActivityAt=Date.now(),k.historyBuffer.push(a),k.historyBytes+=Buffer.byteLength(a,"utf8");k.historyBytes>1048576&&k.historyBuffer.length>1;){let a=k.historyBuffer.shift();a&&(k.historyBytes-=Buffer.byteLength(a,"utf8"))}k.subscribers.forEach(b=>{try{b(a)}catch(a){console.error("[TerminalManager] Callback error:",a)}})};return l(`\r
|
|
2
2
|
\x1b[38;2;176;62;34m⌥ omp web\x1b[0m \x1b[90m\xb7 Terminal Ready \xb7\x1b[0m \x1b[36m${c}\x1b[0m\r
|
|
3
3
|
\r
|
|
4
|
-
`),b.onData(a=>{
|
|
4
|
+
`),b.onData(a=>{l(a)}),b.onExit(({exitCode:a})=>{l(`\r
|
|
5
5
|
\x1b[33m[Terminal closed with code ${a??0}]\x1b[0m\r
|
|
6
|
-
`),i.delete(f)}),i.set(f,j),{id:f,cwd:c}}function k(a){return i.get(a)}function l(a,b){let c=i.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function m(a,b){let c=i.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function n(a,b,c){let d=i.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function o(a){let b=i.get(a);if(!b)return!1;try{b.process.kill()}catch{}return i.delete(a),!0}globalThis.__ompTerminalSessions=i},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},17265:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/resize/route",pathname:"/api/terminal/resize",filename:"route",bundlePath:"app/api/terminal/resize/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/resize/route.ts",nextConfigOutput:"standalone",userland:()=>c(63756),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/resize/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63756:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>g,dynamic:()=>f});var d=c(23211),e=c(2717);let f="force-dynamic";async function g(a){try{let{id:b,cols:c,rows:f}=await a.json().catch(()=>({}));if("string"!=typeof b||!b)return d.NextResponse.json({error:"Missing id"},{status:400});let g=Number(c),h=Number(f);if(!Number.isFinite(g)||!Number.isFinite(h)||g<2||h<1)return d.NextResponse.json({error:"Invalid cols/rows"},{status:400});let i=(0,e.Nu)(b,Math.floor(g),Math.floor(h));return d.NextResponse.json({ok:i})}catch(b){let a=b instanceof Error?b.message:"Failed to resize terminal";return d.NextResponse.json({error:a},{status:500})}}},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=17265));module.exports=c})();
|
|
6
|
+
`),j.delete(f)}),j.set(f,k),{id:f,cwd:c}}function l(a){return j.get(a)}function m(a,b){let c=j.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function n(a,b){let c=j.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function o(a,b,c){let d=j.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function p(a){let b=j.get(a);if(!b)return!1;try{b.process.kill()}catch{}return j.delete(a),!0}globalThis.__ompTerminalSessions=j},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63756:(a,b,c)=>{"use strict";c.r(b),c.d(b,{POST:()=>g,dynamic:()=>f});var d=c(23211),e=c(2717);let f="force-dynamic";async function g(a){try{let{id:b,cols:c,rows:f}=await a.json().catch(()=>({}));if("string"!=typeof b||!b)return d.NextResponse.json({error:"Missing id"},{status:400});let g=Number(c),h=Number(f);if(!Number.isFinite(g)||!Number.isFinite(h)||g<2||h<1)return d.NextResponse.json({error:"Invalid cols/rows"},{status:400});let i=(0,e.Nu)(b,Math.floor(g),Math.floor(h));return d.NextResponse.json({ok:i})}catch(b){let a=b instanceof Error?b.message:"Failed to resize terminal";return d.NextResponse.json({error:a},{status:500})}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},81827:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/resize/route",pathname:"/api/terminal/resize",filename:"route",bundlePath:"app/api/terminal/resize/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/resize/route.ts",nextConfigOutput:"standalone",userland:()=>c(63756),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/resize/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{"use strict";c.d(b,{Cn:()=>o,cS:()=>q,li:()=>l,qM:()=>p,qt:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873),h=c(91645),i=c.n(h);let j=(0,g.join)((0,f.homedir)(),".omp","agent","proxy.json"),k=[7890,7897,1087,1080,8118,8888];function l(){try{let a=JSON.parse((0,e.readFileSync)(j,"utf8"));if("auto"===a.mode||"manual"===a.mode||"off"===a.mode)return{mode:a.mode,url:"string"==typeof a.url?a.url:void 0}}catch{}return{mode:"auto"}}function m(a){(0,e.mkdirSync)((0,g.dirname)(j),{recursive:!0});let b=`${j}.tmp-${process.pid}`;(0,e.writeFileSync)(b,JSON.stringify(a,null,2)+"\n"),(0,e.renameSync)(b,j)}function n(a,b="127.0.0.1",c=400){return new Promise(d=>{let e=new(i()).Socket,f=a=>{e.destroy(),d(a)};e.setTimeout(c),e.once("connect",()=>f(!0)),e.once("timeout",()=>f(!1)),e.once("error",()=>f(!1)),e.connect(a,b)})}async function o(){let a=[];for(let b of function(){let a=process.platform;try{if("darwin"===a){let a=(0,d.execFileSync)("scutil",["--proxy"],{encoding:"utf8",timeout:3e3}),b=[],c=/HTTPProxy\s*:\s*(\S+)/.exec(a)?.[1],e=/HTTPPort\s*:\s*(\d+)/.exec(a)?.[1],f=/HTTPSProxy\s*:\s*(\S+)/.exec(a)?.[1],g=/HTTPSPort\s*:\s*(\d+)/.exec(a)?.[1];return c&&e&&b.push({url:`http://${c}:${e}`,source:"system-http"}),f&&g&&b.push({url:`http://${f}:${g}`,source:"system-https"}),b}if("win32"===a){let a=(0,d.execFileSync)("reg",["query","HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"],{encoding:"utf8",timeout:3e3}),b=/ProxyEnable\s+REG_DWORD\s+0x(\d+)/i.exec(a)?.[1];if("1"===b){let b=/ProxyServer\s+REG_SZ\s+(\S+)/i.exec(a)?.[1];if(b)return[{url:/^https?:\/\//i.test(b)?b:`http://${b}`,source:"system-proxy"}]}return[]}if("linux"===a){let a=[];for(let b of["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy"]){let c=process.env[b];if(c){let b=/^https?:\/\//i.test(c)?c:`http://${c}`;a.some(a=>a.url===b)||a.push({url:b,source:"env"})}}try{let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy","mode"],{encoding:"utf8",timeout:2e3}).trim();if("'manual'"===b){let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","host"],{encoding:"utf8",timeout:2e3}).trim().replace(/^'|'$/g,""),c=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","port"],{encoding:"utf8",timeout:2e3}).trim();b&&c&&a.push({url:`http://${b}:${c}`,source:"gnome"})}}catch{}return a}}catch{}return[]}())await n(Number(new URL(b.url).port))&&a.push(b);for(let b of k)if(await n(b)){let c=`http://127.0.0.1:${b}`;a.some(a=>a.url===c)||a.push({url:c,source:"local-port"})}let b=l(),c=!1;if("manual"===b.mode&&b.url)try{let a=Number(new URL(b.url).port);c=await n(a,new URL(b.url).hostname)}catch{c=!1}let e=a[0]?.url??(c&&b.url?b.url:null);return{candidates:a,recommended:e,manualReachable:c}}async function p(){let a=l();if("off"===a.mode)return null;if("manual"===a.mode){if(!a.url)return null;try{let b=Number(new URL(a.url).port);return await n(b,new URL(a.url).hostname)?a.url:null}catch{return null}}return(await o()).recommended}function q(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}},91645:a=>{"use strict";a.exports=require("net")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=81827));module.exports=c})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=2795,a.ids=[2795],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{c.d(b,{Hx:()=>
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2795,a.ids=[2795],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2717:(a,b,c)=>{c.d(b,{Hx:()=>p,n_:()=>k,Bw:()=>l,Nu:()=>o,O7:()=>m,l0:()=>n});var d=c(55511),e=c.n(d),f=c(29021),g=c.n(f);let h=require("node-pty");var i=c(87831);let j=globalThis.__ompTerminalSessions??new Map;function k(a){let b,c=a;c&&"string"==typeof c&&g().existsSync(c)||(c=process.cwd());try{c=g().realpathSync(c)}catch{c=process.cwd()}let d=Date.now();for(let[a,b]of j)if(0===b.subscribers.size&&d-b.lastActivityAt>18e5){try{b.process.kill()}catch{}j.delete(a)}for(;j.size>=8;){let a=null,b="";for(let[c,d]of j)(!a||d.createdAt<a.createdAt)&&(a=d,b=c);if(!a)break;try{a.process.kill()}catch{}j.delete(b)}let f=`term-${e().randomBytes(8).toString("hex")}`;try{b=function(a,b){var c;let{shell:d,args:e}=(c=process.platform,"win32"===c?{shell:b.COMSPEC||"cmd.exe",args:[]}:{shell:b.SHELL||("darwin"===c?"/bin/zsh":"/bin/bash"),args:["-i"]});return h.spawn(d,e,{name:"xterm-256color",cols:80,rows:24,cwd:a,env:function(a){let b={};for(let[c,d]of Object.entries(a))"string"==typeof d&&(b[c]=d);return b}({...b,...(0,i.cS)(process.env.OMP_WEB_PROXY_URL||null)})})}(c,{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor",LANG:process.env.LANG||"en_US.UTF-8",LC_ALL:process.env.LC_ALL||"en_US.UTF-8"})}catch(a){throw Error(`Failed to spawn terminal shell: ${a instanceof Error?a.message:String(a)}`)}let k={id:f,process:b,cwd:c,createdAt:d,lastActivityAt:d,subscribers:new Set,historyBuffer:[],historyBytes:0},l=a=>{for(k.lastActivityAt=Date.now(),k.historyBuffer.push(a),k.historyBytes+=Buffer.byteLength(a,"utf8");k.historyBytes>1048576&&k.historyBuffer.length>1;){let a=k.historyBuffer.shift();a&&(k.historyBytes-=Buffer.byteLength(a,"utf8"))}k.subscribers.forEach(b=>{try{b(a)}catch(a){console.error("[TerminalManager] Callback error:",a)}})};return l(`\r
|
|
2
2
|
\x1b[38;2;176;62;34m⌥ omp web\x1b[0m \x1b[90m\xb7 Terminal Ready \xb7\x1b[0m \x1b[36m${c}\x1b[0m\r
|
|
3
3
|
\r
|
|
4
|
-
`),b.onData(a=>{
|
|
4
|
+
`),b.onData(a=>{l(a)}),b.onExit(({exitCode:a})=>{l(`\r
|
|
5
5
|
\x1b[33m[Terminal closed with code ${a??0}]\x1b[0m\r
|
|
6
|
-
`),i.delete(f)}),i.set(f,j),{id:f,cwd:c}}function k(a){return i.get(a)}function l(a,b){let c=i.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function m(a,b){let c=i.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function n(a,b,c){let d=i.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function o(a){let b=i.get(a);if(!b)return!1;try{b.process.kill()}catch{}return i.delete(a),!0}globalThis.__ompTerminalSessions=i},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},82838:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>i,POST:()=>h,dynamic:()=>g});var d=c(23211),e=c(2717),f=c(80547);let g="force-dynamic";async function h(a){try{let b=await a.json().catch(()=>({})),c="string"==typeof b?.cwd?b.cwd:void 0;if(c&&"string"==typeof c){let a=await (0,f.mc)();(0,f.B7)(c,a)||(c=process.cwd())}let{id:g,cwd:h}=(0,e.n_)(c);return d.NextResponse.json({ok:!0,sessionId:g,cwd:h})}catch(b){let a=b instanceof Error?b.message:"Failed to create terminal session";return d.NextResponse.json({error:a},{status:500})}}async function i(a){try{let{searchParams:b}=new URL(a.url),c=b.get("id");if(!c)return d.NextResponse.json({error:"Missing sessionId"},{status:400});let f=(0,e.Hx)(c);return d.NextResponse.json({ok:f})}catch(b){let a=b instanceof Error?b.message:"Failed to close terminal session";return d.NextResponse.json({error:a},{status:500})}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90385:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/session/route",pathname:"/api/terminal/session",filename:"route",bundlePath:"app/api/terminal/session/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/session/route.ts",nextConfigOutput:"standalone",userland:()=>c(82838),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/session/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=90385));module.exports=c})();
|
|
6
|
+
`),j.delete(f)}),j.set(f,k),{id:f,cwd:c}}function l(a){return j.get(a)}function m(a,b){let c=j.get(a);return c?(c.historyBuffer.length>0&&b(c.historyBuffer.join("")),c.subscribers.add(b),()=>{c.subscribers.delete(b)}):()=>{}}function n(a,b){let c=j.get(a);if(!c)return!1;try{return c.lastActivityAt=Date.now(),c.process.write(b),!0}catch(a){return console.error("[TerminalManager] write error:",a),!1}}function o(a,b,c){let d=j.get(a);if(!d)return!1;try{return d.process.resize(b,c),!0}catch(a){return console.error("[TerminalManager] resize error:",a),!1}}function p(a){let b=j.get(a);if(!b)return!1;try{b.process.kill()}catch{}return j.delete(a),!0}globalThis.__ompTerminalSessions=j},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{a.exports=require("os")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{a.exports=require("path")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73667:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(19225),e=c(84006),f=c(8317),g=c(99373),h=c(34775),i=c(24235),j=c(261),k=c(54365),l=c(90771),m=c(73461),n=c(67798),o=c(92280),p=c(62018),q=c(45696),r=c(47929),s=c(86439),t=c(37527);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/terminal/session/route",pathname:"/api/terminal/session",filename:"route",bundlePath:"app/api/terminal/session/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/cc/code/ompweb/app/api/terminal/session/route.ts",nextConfigOutput:"standalone",userland:()=>c(82838),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/terminal/session/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!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(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},74075:a=>{a.exports=require("zlib")},79646:a=>{a.exports=require("child_process")},82838:(a,b,c)=>{c.r(b),c.d(b,{DELETE:()=>i,POST:()=>h,dynamic:()=>g});var d=c(23211),e=c(2717),f=c(80547);let g="force-dynamic";async function h(a){try{let b=await a.json().catch(()=>({})),c="string"==typeof b?.cwd?b.cwd:void 0;if(c&&"string"==typeof c){let a=await (0,f.mc)();(0,f.B7)(c,a)||(c=process.cwd())}let{id:g,cwd:h}=(0,e.n_)(c);return d.NextResponse.json({ok:!0,sessionId:g,cwd:h})}catch(b){let a=b instanceof Error?b.message:"Failed to create terminal session";return d.NextResponse.json({error:a},{status:500})}}async function i(a){try{let{searchParams:b}=new URL(a.url),c=b.get("id");if(!c)return d.NextResponse.json({error:"Missing sessionId"},{status:400});let f=(0,e.Hx)(c);return d.NextResponse.json({ok:f})}catch(b){let a=b instanceof Error?b.message:"Failed to close terminal session";return d.NextResponse.json({error:a},{status:500})}}},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87831:(a,b,c)=>{c.d(b,{Cn:()=>o,cS:()=>q,li:()=>l,qM:()=>p,qt:()=>m});var d=c(79646),e=c(29021),f=c(21820),g=c(33873),h=c(91645),i=c.n(h);let j=(0,g.join)((0,f.homedir)(),".omp","agent","proxy.json"),k=[7890,7897,1087,1080,8118,8888];function l(){try{let a=JSON.parse((0,e.readFileSync)(j,"utf8"));if("auto"===a.mode||"manual"===a.mode||"off"===a.mode)return{mode:a.mode,url:"string"==typeof a.url?a.url:void 0}}catch{}return{mode:"auto"}}function m(a){(0,e.mkdirSync)((0,g.dirname)(j),{recursive:!0});let b=`${j}.tmp-${process.pid}`;(0,e.writeFileSync)(b,JSON.stringify(a,null,2)+"\n"),(0,e.renameSync)(b,j)}function n(a,b="127.0.0.1",c=400){return new Promise(d=>{let e=new(i()).Socket,f=a=>{e.destroy(),d(a)};e.setTimeout(c),e.once("connect",()=>f(!0)),e.once("timeout",()=>f(!1)),e.once("error",()=>f(!1)),e.connect(a,b)})}async function o(){let a=[];for(let b of function(){let a=process.platform;try{if("darwin"===a){let a=(0,d.execFileSync)("scutil",["--proxy"],{encoding:"utf8",timeout:3e3}),b=[],c=/HTTPProxy\s*:\s*(\S+)/.exec(a)?.[1],e=/HTTPPort\s*:\s*(\d+)/.exec(a)?.[1],f=/HTTPSProxy\s*:\s*(\S+)/.exec(a)?.[1],g=/HTTPSPort\s*:\s*(\d+)/.exec(a)?.[1];return c&&e&&b.push({url:`http://${c}:${e}`,source:"system-http"}),f&&g&&b.push({url:`http://${f}:${g}`,source:"system-https"}),b}if("win32"===a){let a=(0,d.execFileSync)("reg",["query","HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"],{encoding:"utf8",timeout:3e3}),b=/ProxyEnable\s+REG_DWORD\s+0x(\d+)/i.exec(a)?.[1];if("1"===b){let b=/ProxyServer\s+REG_SZ\s+(\S+)/i.exec(a)?.[1];if(b)return[{url:/^https?:\/\//i.test(b)?b:`http://${b}`,source:"system-proxy"}]}return[]}if("linux"===a){let a=[];for(let b of["HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy"]){let c=process.env[b];if(c){let b=/^https?:\/\//i.test(c)?c:`http://${c}`;a.some(a=>a.url===b)||a.push({url:b,source:"env"})}}try{let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy","mode"],{encoding:"utf8",timeout:2e3}).trim();if("'manual'"===b){let b=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","host"],{encoding:"utf8",timeout:2e3}).trim().replace(/^'|'$/g,""),c=(0,d.execFileSync)("gsettings",["get","org.gnome.system.proxy.http","port"],{encoding:"utf8",timeout:2e3}).trim();b&&c&&a.push({url:`http://${b}:${c}`,source:"gnome"})}}catch{}return a}}catch{}return[]}())await n(Number(new URL(b.url).port))&&a.push(b);for(let b of k)if(await n(b)){let c=`http://127.0.0.1:${b}`;a.some(a=>a.url===c)||a.push({url:c,source:"local-port"})}let b=l(),c=!1;if("manual"===b.mode&&b.url)try{let a=Number(new URL(b.url).port);c=await n(a,new URL(b.url).hostname)}catch{c=!1}let e=a[0]?.url??(c&&b.url?b.url:null);return{candidates:a,recommended:e,manualReachable:c}}async function p(){let a=l();if("off"===a.mode)return null;if("manual"===a.mode){if(!a.url)return null;try{let b=Number(new URL(a.url).port);return await n(b,new URL(a.url).hostname)?a.url:null}catch{return null}}return(await o()).recommended}function q(a){return a?{HTTP_PROXY:a,HTTPS_PROXY:a,ALL_PROXY:a,http_proxy:a,https_proxy:a,all_proxy:a}:{}}},91645:a=>{a.exports=require("net")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,4509],()=>b(b.s=73667));module.exports=c})();
|