9router 0.3.48 → 0.3.50
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/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +41 -41
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +3 -3
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/locale/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/proxy-pools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/providers/route.js +1 -1
- package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stream/route.js +1 -1
- package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/version/route.js +1 -1
- package/app/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +3 -3
- package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +5 -5
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.html +1 -1
- package/app/.next/server/app/dashboard/mitm.rsc +5 -5
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +5 -5
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.rsc +5 -5
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.html +2 -2
- package/app/.next/server/app/dashboard/quota.rsc +6 -6
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +5 -5
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +5 -5
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +5 -5
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +3 -3
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +3 -3
- package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +4 -4
- package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +41 -41
- package/app/.next/server/chunks/1114.js +1 -1
- package/app/.next/server/chunks/1424.js +1 -1
- package/app/.next/server/chunks/289.js +1 -1
- package/app/.next/server/chunks/318.js +6 -6
- package/app/.next/server/chunks/3832.js +1 -1
- package/app/.next/server/chunks/4292.js +1 -0
- package/app/.next/server/chunks/4989.js +2 -2
- package/app/.next/server/chunks/5297.js +1 -1
- package/app/.next/server/chunks/5833.js +1 -0
- package/app/.next/server/chunks/6182.js +4 -4
- package/app/.next/server/chunks/8590.js +1 -1
- package/app/.next/server/chunks/8895.js +3 -3
- package/app/.next/server/chunks/9201.js +1 -1
- package/app/.next/server/chunks/9609.js +1 -1
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/2652-378fd4fa14847021.js +1 -0
- package/app/.next/static/chunks/{5497-e51ea33e5c739a33.js → 5497-a9786b3cb8e5e696.js} +1 -1
- package/app/.next/static/chunks/{619-4c970716a5102dc3.js → 619-c4c101a6a78feeb4.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-04d1ffb5358d8fb2.js → page-4ebc425afc0a221a.js} +1 -1
- package/app/.next/static/chunks/app/{layout-8f69df46423ca2cf.js → layout-23ec5f07962f68a0.js} +1 -1
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/app/node_modules/better-sqlite3/lib/database.js +90 -0
- package/app/node_modules/better-sqlite3/lib/index.js +3 -0
- package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/app/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/app/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/app/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/app/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/app/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/app/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/app/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/app/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/app/node_modules/better-sqlite3/lib/util.js +12 -0
- package/app/node_modules/better-sqlite3/package.json +59 -0
- package/app/node_modules/bindings/bindings.js +221 -0
- package/app/node_modules/bindings/package.json +28 -0
- package/app/node_modules/file-uri-to-path/index.js +66 -0
- package/app/node_modules/file-uri-to-path/package.json +32 -0
- package/app/package.json +2 -1
- package/app/public/providers/vertex-partner.png +0 -0
- package/app/public/providers/vertex.png +0 -0
- package/app/src/mitm/manager.js +59 -0
- package/app/src/mitm/server.js +1 -1
- package/app/src/mitm/{server copy.js → server2.js} +188 -35
- package/cli.js +97 -56
- package/package.json +1 -1
- package/app/.next/static/chunks/2652-67b8cc047a3efcc9.js +0 -1
- /package/app/.next/static/{eVGIe8IcaLlfBhBZM9a5U → TmbP5kTzKgsDGgHcZeGnv}/_buildManifest.js +0 -0
- /package/app/.next/static/{eVGIe8IcaLlfBhBZM9a5U → TmbP5kTzKgsDGgHcZeGnv}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Module dependencies.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
var sep = require('path').sep || '/';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Module exports.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
module.exports = fileUriToPath;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* File URI to Path function.
|
|
16
|
+
*
|
|
17
|
+
* @param {String} uri
|
|
18
|
+
* @return {String} path
|
|
19
|
+
* @api public
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
function fileUriToPath (uri) {
|
|
23
|
+
if ('string' != typeof uri ||
|
|
24
|
+
uri.length <= 7 ||
|
|
25
|
+
'file://' != uri.substring(0, 7)) {
|
|
26
|
+
throw new TypeError('must pass in a file:// URI to convert to a file path');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var rest = decodeURI(uri.substring(7));
|
|
30
|
+
var firstSlash = rest.indexOf('/');
|
|
31
|
+
var host = rest.substring(0, firstSlash);
|
|
32
|
+
var path = rest.substring(firstSlash + 1);
|
|
33
|
+
|
|
34
|
+
// 2. Scheme Definition
|
|
35
|
+
// As a special case, <host> can be the string "localhost" or the empty
|
|
36
|
+
// string; this is interpreted as "the machine from which the URL is
|
|
37
|
+
// being interpreted".
|
|
38
|
+
if ('localhost' == host) host = '';
|
|
39
|
+
|
|
40
|
+
if (host) {
|
|
41
|
+
host = sep + sep + host;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 3.2 Drives, drive letters, mount points, file system root
|
|
45
|
+
// Drive letters are mapped into the top of a file URI in various ways,
|
|
46
|
+
// depending on the implementation; some applications substitute
|
|
47
|
+
// vertical bar ("|") for the colon after the drive letter, yielding
|
|
48
|
+
// "file:///c|/tmp/test.txt". In some cases, the colon is left
|
|
49
|
+
// unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
|
|
50
|
+
// colon is simply omitted, as in "file:///c/tmp/test.txt".
|
|
51
|
+
path = path.replace(/^(.+)\|/, '$1:');
|
|
52
|
+
|
|
53
|
+
// for Windows, we need to invert the path separators from what a URI uses
|
|
54
|
+
if (sep == '\\') {
|
|
55
|
+
path = path.replace(/\//g, '\\');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (/^.+\:/.test(path)) {
|
|
59
|
+
// has Windows drive at beginning of path
|
|
60
|
+
} else {
|
|
61
|
+
// unix path…
|
|
62
|
+
path = sep + path;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return host + path;
|
|
66
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "file-uri-to-path",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Convert a file: URI to a file path",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"directories": {
|
|
8
|
+
"test": "test"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "mocha --reporter spec"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git://github.com/TooTallNate/file-uri-to-path.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"file",
|
|
19
|
+
"uri",
|
|
20
|
+
"convert",
|
|
21
|
+
"path"
|
|
22
|
+
],
|
|
23
|
+
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/TooTallNate/file-uri-to-path/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/TooTallNate/file-uri-to-path",
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"mocha": "3"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "9router-app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.50",
|
|
4
4
|
"description": "9Router web dashboard",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"@monaco-editor/react": "^4.7.0",
|
|
16
16
|
"@xyflow/react": "^12.10.1",
|
|
17
17
|
"bcryptjs": "^3.0.3",
|
|
18
|
+
"better-sqlite3": "^12.6.2",
|
|
18
19
|
"confbox": "^0.2.4",
|
|
19
20
|
"express": "^5.2.1",
|
|
20
21
|
"fs": "^0.0.1-security",
|
|
Binary file
|
|
Binary file
|
package/app/src/mitm/manager.js
CHANGED
|
@@ -16,6 +16,14 @@ const MITM_PORT = 443;
|
|
|
16
16
|
const MITM_WIN_NODE_PORT = 8443;
|
|
17
17
|
const PID_FILE = path.join(MITM_DIR, ".mitm.pid");
|
|
18
18
|
|
|
19
|
+
const MITM_MAX_RESTARTS = 5;
|
|
20
|
+
const MITM_RESTART_DELAYS_MS = [5000, 10000, 20000, 30000, 60000];
|
|
21
|
+
const MITM_RESTART_RESET_MS = 60000;
|
|
22
|
+
|
|
23
|
+
let mitmRestartCount = 0;
|
|
24
|
+
let mitmLastStartTime = 0;
|
|
25
|
+
let mitmIsRestarting = false;
|
|
26
|
+
|
|
19
27
|
function resolveServerPath() {
|
|
20
28
|
if (process.env.MITM_SERVER_PATH) return process.env.MITM_SERVER_PATH;
|
|
21
29
|
const sibling = path.join(__dirname, "server.js");
|
|
@@ -273,6 +281,50 @@ async function getMitmStatus() {
|
|
|
273
281
|
return { running, pid, certExists, dnsStatus };
|
|
274
282
|
}
|
|
275
283
|
|
|
284
|
+
async function scheduleMitmRestart(apiKey) {
|
|
285
|
+
if (mitmIsRestarting) return;
|
|
286
|
+
|
|
287
|
+
const aliveMs = Date.now() - mitmLastStartTime;
|
|
288
|
+
if (aliveMs >= MITM_RESTART_RESET_MS) mitmRestartCount = 0;
|
|
289
|
+
|
|
290
|
+
if (mitmRestartCount >= MITM_MAX_RESTARTS) {
|
|
291
|
+
console.error("[MITM] Max restart attempts reached. Giving up.");
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const attempt = mitmRestartCount;
|
|
296
|
+
const delay = MITM_RESTART_DELAYS_MS[Math.min(attempt, MITM_RESTART_DELAYS_MS.length - 1)];
|
|
297
|
+
mitmRestartCount++;
|
|
298
|
+
mitmIsRestarting = true;
|
|
299
|
+
|
|
300
|
+
console.log(`[MITM] Restarting in ${delay / 1000}s... (${mitmRestartCount}/${MITM_MAX_RESTARTS})`);
|
|
301
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
302
|
+
|
|
303
|
+
try {
|
|
304
|
+
const settings = _getSettings ? await _getSettings() : null;
|
|
305
|
+
if (settings && !settings.mitmEnabled) {
|
|
306
|
+
console.log("[MITM] MITM disabled, skipping restart");
|
|
307
|
+
mitmIsRestarting = false;
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
const password = getCachedPassword() || await loadEncryptedPassword();
|
|
311
|
+
if (!password && !IS_WIN) {
|
|
312
|
+
console.error("[MITM] No cached password, cannot auto-restart");
|
|
313
|
+
mitmIsRestarting = false;
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
await startServer(apiKey, password);
|
|
317
|
+
console.log("[MITM] Restarted successfully");
|
|
318
|
+
mitmRestartCount = 0;
|
|
319
|
+
mitmIsRestarting = false;
|
|
320
|
+
} catch (err) {
|
|
321
|
+
console.error(`[MITM] Restart attempt ${mitmRestartCount}/${MITM_MAX_RESTARTS} failed:`, err.message);
|
|
322
|
+
mitmIsRestarting = false;
|
|
323
|
+
// Schedule next retry
|
|
324
|
+
scheduleMitmRestart(apiKey);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
276
328
|
/**
|
|
277
329
|
* Start MITM server only (cert + server, no DNS)
|
|
278
330
|
*/
|
|
@@ -378,6 +430,7 @@ async function startServer(apiKey, sudoPassword) {
|
|
|
378
430
|
if (!IS_WIN && serverProcess) {
|
|
379
431
|
serverPid = serverProcess.pid;
|
|
380
432
|
fs.writeFileSync(PID_FILE, String(serverPid));
|
|
433
|
+
mitmLastStartTime = Date.now();
|
|
381
434
|
}
|
|
382
435
|
|
|
383
436
|
let startError = null;
|
|
@@ -397,6 +450,8 @@ async function startServer(apiKey, sudoPassword) {
|
|
|
397
450
|
serverProcess = null;
|
|
398
451
|
serverPid = null;
|
|
399
452
|
try { fs.unlinkSync(PID_FILE); } catch { /* ignore */ }
|
|
453
|
+
// Auto-restart on unexpected exit
|
|
454
|
+
if (code !== 0 && !mitmIsRestarting) scheduleMitmRestart(apiKey);
|
|
400
455
|
});
|
|
401
456
|
}
|
|
402
457
|
|
|
@@ -425,6 +480,9 @@ async function startServer(apiKey, sudoPassword) {
|
|
|
425
480
|
* Stop MITM server — removes ALL tool DNS entries first, then kills server
|
|
426
481
|
*/
|
|
427
482
|
async function stopServer(sudoPassword) {
|
|
483
|
+
// Prevent auto-restart from triggering on intentional stop
|
|
484
|
+
mitmIsRestarting = true;
|
|
485
|
+
mitmRestartCount = 0;
|
|
428
486
|
console.log("[MITM] Stopping server...");
|
|
429
487
|
|
|
430
488
|
// Kill server process
|
|
@@ -476,6 +534,7 @@ async function stopServer(sudoPassword) {
|
|
|
476
534
|
|
|
477
535
|
try { fs.unlinkSync(PID_FILE); } catch { /* ignore */ }
|
|
478
536
|
await saveMitmSettings(false, null);
|
|
537
|
+
mitmIsRestarting = false;
|
|
479
538
|
|
|
480
539
|
return { running: false, pid: null };
|
|
481
540
|
}
|
package/app/src/mitm/server.js
CHANGED
|
@@ -85,7 +85,7 @@ const ANTIGRAVITY_URL_PATTERNS = [":generateContent", ":streamGenerateContent"];
|
|
|
85
85
|
// Copilot: OpenAI-compatible + Anthropic endpoints
|
|
86
86
|
const COPILOT_URL_PATTERNS = ["/chat/completions", "/v1/messages", "/responses"];
|
|
87
87
|
|
|
88
|
-
const LOG_DIR = path.join(
|
|
88
|
+
const LOG_DIR = path.join(DATA_DIR, "logs", "mitm");
|
|
89
89
|
if (ENABLE_FILE_LOG && !fs.existsSync(LOG_DIR)) fs.mkdirSync(LOG_DIR, { recursive: true });
|
|
90
90
|
|
|
91
91
|
function saveRequestLog(url, bodyBuffer) {
|
|
@@ -3,6 +3,50 @@ const fs = require("fs");
|
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const dns = require("dns");
|
|
5
5
|
const { promisify } = require("util");
|
|
6
|
+
const Database = require("better-sqlite3");
|
|
7
|
+
|
|
8
|
+
const CURSOR_GLOBAL_DB = path.join(
|
|
9
|
+
process.env.HOME,
|
|
10
|
+
"Library/Application Support/Cursor/User/globalStorage/state.vscdb"
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
// Read full conversation from Cursor global DB
|
|
14
|
+
function readConversationFromDb(conversationId) {
|
|
15
|
+
try {
|
|
16
|
+
const db = new Database(CURSOR_GLOBAL_DB, { readonly: true, fileMustExist: true });
|
|
17
|
+
const stmt = db.prepare("SELECT value FROM cursorDiskKV WHERE key=?");
|
|
18
|
+
|
|
19
|
+
const row = stmt.get(`composerData:${conversationId}`);
|
|
20
|
+
if (!row) { db.close(); return null; }
|
|
21
|
+
|
|
22
|
+
const composer = JSON.parse(row.value);
|
|
23
|
+
const headers = composer.fullConversationHeadersOnly || [];
|
|
24
|
+
const name = composer.name || "";
|
|
25
|
+
|
|
26
|
+
const messages = [];
|
|
27
|
+
for (const h of headers) {
|
|
28
|
+
const brow = stmt.get(`bubbleId:${conversationId}:${h.bubbleId}`);
|
|
29
|
+
if (!brow) continue;
|
|
30
|
+
const bubble = JSON.parse(brow.value);
|
|
31
|
+
const role = h.type === 1 ? "user" : "assistant";
|
|
32
|
+
const text = (bubble.text || "").trim();
|
|
33
|
+
const ts = bubble.createdAt || null;
|
|
34
|
+
|
|
35
|
+
// Tool call bubble (no text but has toolFormerData)
|
|
36
|
+
const tool = bubble.toolFormerData && bubble.toolFormerData.name
|
|
37
|
+
? { name: bubble.toolFormerData.name, args: bubble.toolFormerData.rawArgs || null, status: bubble.toolFormerData.status || null }
|
|
38
|
+
: null;
|
|
39
|
+
|
|
40
|
+
if (!text && !tool) continue;
|
|
41
|
+
messages.push({ role, text: text || null, tool, ts });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
db.close();
|
|
45
|
+
return { name, totalMessages: headers.length, messages };
|
|
46
|
+
} catch (e) {
|
|
47
|
+
return { error: e.message };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
6
50
|
|
|
7
51
|
const INTERNAL_REQUEST_HEADER = { name: "x-request-source", value: "local" };
|
|
8
52
|
|
|
@@ -27,6 +71,8 @@ const CURSOR_JSONL = path.join(CURSOR_LOG_DIR, "cursor_messages.jsonl");
|
|
|
27
71
|
const CURSOR_ENDPOINTS = [
|
|
28
72
|
"/agent.v1.AgentService/RunPoll",
|
|
29
73
|
"/aiserver.v1.BidiService/BidiAppend",
|
|
74
|
+
"/agent.v1.AgentService/Run",
|
|
75
|
+
"/agent.v1.AgentService/RunSSE",
|
|
30
76
|
];
|
|
31
77
|
|
|
32
78
|
/**
|
|
@@ -265,29 +311,67 @@ function decodeBidiAppend(buf) {
|
|
|
265
311
|
return result;
|
|
266
312
|
}
|
|
267
313
|
|
|
268
|
-
// AgentClientMessage oneof: f1=AgentRunRequest, f4=ConversationAction, f7=ClientHeartbeat
|
|
314
|
+
// AgentClientMessage oneof: f1=AgentRunRequest, f2=ExecClientMessage, f3=KvClientMessage, f4=ConversationAction, f5=ExecClientControlMessage, f6=InteractionResponse, f7=ClientHeartbeat
|
|
269
315
|
function decodeAgentClientMsg(buf) {
|
|
270
316
|
const fields = protoWalkFields(buf);
|
|
271
317
|
for (const f of fields) {
|
|
272
|
-
|
|
273
|
-
if (f.field === 1) return { type: "AgentRunRequest", ...decodeAgentRunRequest(f.data) };
|
|
274
|
-
if (f.field === 4) return { type: "ConversationAction", ...decodeConversationAction(f.data) };
|
|
318
|
+
// f7=ClientHeartbeat: wire-type 2 but empty (len=0), data is Buffer(0)
|
|
275
319
|
if (f.field === 7) return { type: "ClientHeartbeat" };
|
|
276
|
-
if (f.
|
|
320
|
+
if (f.data === undefined || f.data === null) continue;
|
|
321
|
+
if (f.field === 1 && f.data.length > 0) return { type: "AgentRunRequest", ...decodeAgentRunRequest(f.data) };
|
|
322
|
+
if (f.field === 2 && f.data.length > 0) return { type: "ExecClientMessage", ...decodeExecClientMessage(f.data) };
|
|
323
|
+
if (f.field === 3) return { type: "KvClientMessage" };
|
|
324
|
+
if (f.field === 4 && f.data.length > 0) return { type: "ConversationAction", ...decodeConversationAction(f.data) };
|
|
325
|
+
if (f.field === 5) return { type: "ExecClientControlMessage" };
|
|
326
|
+
if (f.field === 6) return { type: "InteractionResponse" };
|
|
277
327
|
}
|
|
278
328
|
return { type: "unknown" };
|
|
279
329
|
}
|
|
280
330
|
|
|
281
|
-
// AgentRunRequest: f1=conversation_state, f2=action, f3=model_details, f5=conversation_id
|
|
331
|
+
// AgentRunRequest: f1=conversation_state, f2=action, f3=model_details, f4=mcp_tools, f5=conversation_id, f6=mcp_file_system_options, f7=skill_options
|
|
282
332
|
function decodeAgentRunRequest(buf) {
|
|
283
333
|
const fields = protoWalkFields(buf);
|
|
284
334
|
const result = {};
|
|
285
335
|
|
|
286
336
|
for (const f of fields) {
|
|
337
|
+
if (f.field === 1 && f.data) result.state = decodeConversationState(f.data);
|
|
338
|
+
if (f.field === 2 && f.data) result.action = decodeConversationAction(f.data);
|
|
287
339
|
if (f.field === 3 && f.data) result.model = decodeModelDetails(f.data);
|
|
340
|
+
if (f.field === 4 && f.data) result.mcpTools = decodeMcpTools(f.data);
|
|
288
341
|
if (f.field === 5 && f.data) result.conversationId = protoStr(f.data);
|
|
289
|
-
|
|
290
|
-
|
|
342
|
+
}
|
|
343
|
+
return result;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// McpTools: f1=repeated McpDescriptor (f1=serverName, f2=repeated tools)
|
|
347
|
+
function decodeMcpTools(buf) {
|
|
348
|
+
const fields = protoWalkFields(buf);
|
|
349
|
+
const descriptors = [];
|
|
350
|
+
for (const f of fields) {
|
|
351
|
+
if (f.field === 1 && f.data) {
|
|
352
|
+
const inner = protoWalkFields(f.data);
|
|
353
|
+
const name = inner.find(x => x.field === 1 && x.data);
|
|
354
|
+
const tools = inner.filter(x => x.field === 2 && x.data).map(t => {
|
|
355
|
+
const tf = protoWalkFields(t.data);
|
|
356
|
+
const tname = tf.find(x => x.field === 1 && x.data);
|
|
357
|
+
return tname ? protoStr(tname.data) : null;
|
|
358
|
+
}).filter(Boolean);
|
|
359
|
+
descriptors.push({ server: name ? protoStr(name.data) : null, tools });
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return descriptors;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// ExecClientMessage: f1=id(uint32), f2=shellResult, f3=writeResult, etc.
|
|
366
|
+
function decodeExecClientMessage(buf) {
|
|
367
|
+
const fields = protoWalkFields(buf);
|
|
368
|
+
const result = { id: null, execId: null, resultType: "unknown" };
|
|
369
|
+
for (const f of fields) {
|
|
370
|
+
if (f.field === 1 && f.value !== undefined) result.id = f.value;
|
|
371
|
+
if (f.field === 15 && f.data) result.execId = protoStr(f.data);
|
|
372
|
+
// Detect result type by field number (oneof)
|
|
373
|
+
const resultTypes = { 2: "shellResult", 3: "writeResult", 4: "deleteResult", 5: "grepResult", 7: "readResult", 8: "lsResult", 9: "diagnosticsResult", 10: "requestContextResult", 11: "mcpResult", 14: "shellStream", 16: "backgroundShellSpawnResult" };
|
|
374
|
+
if (f.data && resultTypes[f.field]) result.resultType = resultTypes[f.field];
|
|
291
375
|
}
|
|
292
376
|
return result;
|
|
293
377
|
}
|
|
@@ -307,15 +391,19 @@ function decodeModelDetails(buf) {
|
|
|
307
391
|
return result;
|
|
308
392
|
}
|
|
309
393
|
|
|
310
|
-
// ConversationAction: f1 → f1
|
|
311
|
-
// f1 → f2 → repeated f2=turns, f7=selected_context, f23=system_prompt
|
|
394
|
+
// ConversationAction: f1=StartChatAction → f1=userMsg{f1=text,f2=uuid,f8=lexical}, f2=history{f2=contextFiles,f7=tools}
|
|
312
395
|
function decodeConversationAction(buf) {
|
|
313
396
|
const result = {};
|
|
314
397
|
const topFields = protoWalkFields(buf);
|
|
315
398
|
|
|
316
|
-
// action.f1 wrapper
|
|
317
|
-
const f1 = topFields.find(f => f.field === 1 && f.data);
|
|
318
|
-
if (!f1)
|
|
399
|
+
// action.f1 = StartChatAction wrapper
|
|
400
|
+
const f1 = topFields.find(f => f.field === 1 && f.data && f.data.length > 0);
|
|
401
|
+
if (!f1) {
|
|
402
|
+
// No StartChatAction — show which fields are present for debugging
|
|
403
|
+
const presentFields = topFields.map(f => `f${f.field}`);
|
|
404
|
+
if (presentFields.length > 0) result._fields = presentFields;
|
|
405
|
+
return result;
|
|
406
|
+
}
|
|
319
407
|
const f1Fields = protoWalkFields(f1.data);
|
|
320
408
|
|
|
321
409
|
// ── User message: action.f1.f1 ──────────────────────────────
|
|
@@ -422,61 +510,126 @@ function protoTreeToObj(buf, depth = 0) {
|
|
|
422
510
|
}
|
|
423
511
|
}
|
|
424
512
|
return result;
|
|
425
|
-
|
|
426
|
-
return result;
|
|
427
513
|
}
|
|
428
514
|
|
|
429
|
-
// ConversationStateStructure: f1=root_prompt_messages_json(bytes
|
|
515
|
+
// ConversationStateStructure: f1=root_prompt_messages_json(encrypted bytes), f3=todos, f8=turns, f10=mode
|
|
430
516
|
function decodeConversationState(buf) {
|
|
431
517
|
const fields = protoWalkFields(buf);
|
|
432
|
-
const
|
|
518
|
+
const turns = [], todos = [];
|
|
519
|
+
let mode = null, messageCount = 0;
|
|
433
520
|
for (const f of fields) {
|
|
521
|
+
if (f.field === 10 && f.value !== undefined) {
|
|
522
|
+
const modes = ["unspecified", "agent", "ask", "plan", "debug", "triage"];
|
|
523
|
+
mode = modes[f.value] || `mode_${f.value}`;
|
|
524
|
+
}
|
|
434
525
|
if (!f.data) continue;
|
|
435
526
|
if (f.field === 1) {
|
|
436
|
-
//
|
|
437
|
-
|
|
438
|
-
if (s) { try { messages.push(JSON.parse(s)); } catch { messages.push(s.substring(0, 500)); } }
|
|
527
|
+
// Encrypted bytes — just count, cannot decode
|
|
528
|
+
messageCount++;
|
|
439
529
|
} else if (f.field === 8) {
|
|
440
|
-
//
|
|
530
|
+
// f8 = repeated bytes (ConversationTurn OR encrypted blob)
|
|
531
|
+
// Encrypted turns: binary blobs that don't parse as valid proto strings
|
|
532
|
+
if (f.data.length === 32) continue; // 32-byte encrypted blob
|
|
441
533
|
const inner = protoWalkFields(f.data);
|
|
442
|
-
const strs = inner.filter(x => x.data
|
|
443
|
-
if (strs.length) turns.push(strs.slice(0,
|
|
534
|
+
const strs = inner.filter(x => x.data).map(x => protoStr(x.data)).filter(s => s && s.length > 3);
|
|
535
|
+
if (strs.length) turns.push(strs.slice(0, 3));
|
|
536
|
+
} else if (f.field === 3) {
|
|
537
|
+
// f3 = repeated bytes (TodoItem OR encrypted blob)
|
|
538
|
+
// Encrypted: 32-byte binary (shows as 64-char hex in protoStr-reject path)
|
|
539
|
+
// TodoItem: f1=id(str), f2=content(str), f3=status(varint)
|
|
540
|
+
if (f.data.length === 32) {
|
|
541
|
+
// 32 bytes = encrypted blob, skip
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
const inner = protoWalkFields(f.data);
|
|
545
|
+
const id = inner.find(x => x.field === 1 && x.data);
|
|
546
|
+
const content = inner.find(x => x.field === 2 && x.data);
|
|
547
|
+
const status = inner.find(x => x.field === 3 && x.value !== undefined);
|
|
548
|
+
const idStr = id ? protoStr(id.data) : null;
|
|
549
|
+
const contentStr = content ? protoStr(content.data) : null;
|
|
550
|
+
// If neither id nor content is readable string, it's encrypted
|
|
551
|
+
if (!idStr && !contentStr) continue;
|
|
552
|
+
const statusMap = ["unspecified", "pending", "in_progress", "completed", "cancelled"];
|
|
553
|
+
todos.push({
|
|
554
|
+
id: idStr,
|
|
555
|
+
content: contentStr,
|
|
556
|
+
status: status ? (statusMap[status.value] || `status_${status.value}`) : null,
|
|
557
|
+
});
|
|
444
558
|
}
|
|
445
559
|
}
|
|
446
|
-
return {
|
|
560
|
+
return { mode, messageCount, turns: turns.slice(0, 5), todos: todos.slice(0, 20) };
|
|
447
561
|
}
|
|
448
562
|
|
|
449
563
|
// ── Save per-chat JSON file ────────────────────────────────────
|
|
450
564
|
function saveCursorLogFull(url, headers, buf) {
|
|
451
565
|
try {
|
|
452
|
-
if (
|
|
566
|
+
if (buf.length < 5) return;
|
|
453
567
|
|
|
454
|
-
const
|
|
568
|
+
const isBidiAppend = url.includes("BidiAppend");
|
|
569
|
+
const isRunPoll = url.includes("RunPoll");
|
|
570
|
+
if (!isBidiAppend && !isRunPoll) return;
|
|
455
571
|
|
|
572
|
+
// Decompress if gzip, otherwise use raw
|
|
573
|
+
let raw;
|
|
574
|
+
const isGzip = buf[0] === 0x1f && buf[1] === 0x8b;
|
|
575
|
+
if (isGzip) {
|
|
576
|
+
raw = zlib.gunzipSync(buf);
|
|
577
|
+
} else {
|
|
578
|
+
// Try strip Connect-RPC envelope if present (flag byte + 4-byte length)
|
|
579
|
+
raw = (buf[0] === 0x00 || buf[0] === 0x01) ? buf.slice(5) : buf;
|
|
580
|
+
}
|
|
456
581
|
|
|
457
|
-
const
|
|
582
|
+
const endpoint = isBidiAppend ? "BidiAppend" : "RunPoll";
|
|
583
|
+
let decoded = {};
|
|
584
|
+
let userMessage = null;
|
|
458
585
|
|
|
459
|
-
|
|
460
|
-
|
|
586
|
+
if (isBidiAppend) {
|
|
587
|
+
decoded = decodeBidiAppend(raw);
|
|
588
|
+
const action = decoded?.agentMsg?.action || {};
|
|
589
|
+
userMessage = action.textFull || action.text || null;
|
|
590
|
+
} else {
|
|
591
|
+
// RunPoll: BidiPollRequest — f1=requestId{f1=uuid}, f2=startRequest
|
|
592
|
+
const fields = protoWalkFields(raw);
|
|
593
|
+
for (const f of fields) {
|
|
594
|
+
if (f.field === 1 && f.data) {
|
|
595
|
+
const inner = protoWalkFields(f.data);
|
|
596
|
+
const id = inner.find(x => x.field === 1 && x.data);
|
|
597
|
+
decoded.requestId = id ? protoStr(id.data) : null;
|
|
598
|
+
}
|
|
599
|
+
if (f.field === 2) decoded.startRequest = f.value === 1;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// Fetch conversation history from local Cursor DB when AgentRunRequest detected
|
|
604
|
+
const conversationId = decoded?.agentMsg?.conversationId || null;
|
|
605
|
+
let conversation = null;
|
|
606
|
+
if (conversationId && decoded?.agentMsg?.type === "AgentRunRequest") {
|
|
607
|
+
conversation = readConversationFromDb(conversationId);
|
|
608
|
+
}
|
|
461
609
|
|
|
462
610
|
const ts = new Date().toISOString().replace(/[:.]/g, "-");
|
|
463
|
-
const base = path.join(CURSOR_LOG_DIR, ts);
|
|
611
|
+
const base = path.join(CURSOR_LOG_DIR, `${ts}_${endpoint}`);
|
|
464
612
|
|
|
465
613
|
// _chat.json — structured decoded
|
|
466
614
|
fs.writeFileSync(`${base}_chat.json`, JSON.stringify({
|
|
467
615
|
ts: new Date().toISOString(),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
616
|
+
endpoint,
|
|
617
|
+
version: headers["x-cursor-client-version"] || null,
|
|
618
|
+
encoding: isGzip ? "gzip" : "raw",
|
|
619
|
+
sizeIn: buf.length,
|
|
620
|
+
sizeRaw: raw.length,
|
|
471
621
|
userMessage,
|
|
472
622
|
decoded,
|
|
623
|
+
conversation,
|
|
473
624
|
}, null, 2));
|
|
474
625
|
|
|
475
626
|
// _decoded.json — full proto tree, no filtering
|
|
476
|
-
const tree = protoTreeToObj(
|
|
627
|
+
const tree = protoTreeToObj(raw);
|
|
477
628
|
fs.writeFileSync(`${base}_decoded.json`, JSON.stringify(tree, null, 2));
|
|
478
629
|
|
|
479
|
-
|
|
630
|
+
const agentType = decoded?.agentMsg?.type || decoded?.requestId || "(none)";
|
|
631
|
+
const convName = conversation?.name ? ` | conv="${conversation.name}" (${conversation.totalMessages} msgs)` : "";
|
|
632
|
+
console.log(`[CURSOR] ${endpoint} | type=${agentType} | msg=${userMessage || "(none)"}${convName} | ${isGzip ? "gzip" : "raw"} ${buf.length}B`);
|
|
480
633
|
} catch (e) {
|
|
481
634
|
console.error(`[CURSOR] decode error: ${e.message}`);
|
|
482
635
|
}
|