miawrouter 1.2.3 → 1.2.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/README.md +7 -0
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +9 -9
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/activity/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/activity/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-endpoints/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-endpoints/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/batch/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/batch/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cache/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cache/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cloud-agents/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cloud-agents/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/discovery/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/discovery/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/free-provider-rankings/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/free-provider-rankings/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/free-tiers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/free-tiers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/guardrails/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/guardrails/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/memory/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/memory/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/privacy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-stats/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-stats/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/runtime/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/runtime/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/feature-flags/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/feature-flags/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skill-discovery/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skill-discovery/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/webhooks/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/webhooks/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/.well-known/agent.json/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/a2a/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/a2a/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agents/[id]/actions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/agents/[id]/actions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/agents/route.js +1 -1
- package/app/.next-cli-build/server/app/api/agents/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batch/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/[id]/errors/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/[id]/results/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/[id]/retry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/batches/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cache/clear/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/catalog/opencode/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/oh-my-pi-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/oh-my-pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/subagents/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/subagents/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cloud-agents/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cloud-agents/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/discovery/endpoints/route.js +1 -1
- package/app/.next-cli-build/server/app/api/discovery/endpoints/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/discovery/route.js +1 -1
- package/app/.next-cli-build/server/app/api/discovery/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/discovery/skills/route.js +1 -1
- package/app/.next-cli-build/server/app/api/discovery/skills/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/events/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/hermes/autonomy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/memory/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/memory/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/memory/reindex/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/memory/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/memory/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onboard/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onboard/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/saver/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skill-discovery/[id]/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skill-discovery/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skill-discovery/[id]/uninstall/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skill-discovery/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/skill-discovery/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/local-snapshot/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/local-snapshot/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/webhooks/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/webhooks/events/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/webhooks/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/a2a.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/a2a.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/a2a.segments/!KGRhc2hib2FyZCk/dashboard/a2a/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/a2a.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/a2a.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/activity.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/activity.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/activity.segments/!KGRhc2hib2FyZCk/dashboard/activity/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/activity.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/activity.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/agent-skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/agent-skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/agent-skills.segments/!KGRhc2hib2FyZCk/dashboard/agent-skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/agent-skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/agent-skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/api-endpoints.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-endpoints.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-endpoints.segments/!KGRhc2hib2FyZCk/dashboard/api-endpoints/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-endpoints.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/api-endpoints.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/batch.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/batch.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/batch.segments/!KGRhc2hib2FyZCk/dashboard/batch/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/batch.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/batch.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cache.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cache.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cache.segments/!KGRhc2hib2FyZCk/dashboard/cache/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cache.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cache.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cloud-agents.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cloud-agents.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cloud-agents.segments/!KGRhc2hib2FyZCk/dashboard/cloud-agents/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cloud-agents.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cloud-agents.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/costs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/costs.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/costs.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/costs.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/discovery.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/discovery.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/discovery.segments/!KGRhc2hib2FyZCk/dashboard/discovery/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/discovery.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/discovery.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/free-provider-rankings.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/free-provider-rankings.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-provider-rankings.segments/!KGRhc2hib2FyZCk/dashboard/free-provider-rankings/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-provider-rankings.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-provider-rankings.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/free-tiers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/free-tiers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-tiers.segments/!KGRhc2hib2FyZCk/dashboard/free-tiers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-tiers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/free-tiers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/guardrails.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/guardrails.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/guardrails.segments/!KGRhc2hib2FyZCk/dashboard/guardrails/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/guardrails.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/guardrails.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/health.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/health.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/health.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/logs.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mcp.segments/!KGRhc2hib2FyZCk/dashboard/mcp/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mcp.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mcp.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/memory.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/memory.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/memory.segments/!KGRhc2hib2FyZCk/dashboard/memory/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/memory.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/memory.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/privacy.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/privacy.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/privacy.segments/!KGRhc2hib2FyZCk/dashboard/privacy/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/privacy.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/privacy.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/provider-stats.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-stats.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/provider-stats.segments/!KGRhc2hib2FyZCk/dashboard/provider-stats/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/provider-stats.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/provider-stats.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/runtime.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/runtime.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/runtime.segments/!KGRhc2hib2FyZCk/dashboard/runtime/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/runtime.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/runtime.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/feature-flags.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/feature-flags.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/feature-flags.segments/!KGRhc2hib2FyZCk/dashboard/settings/feature-flags/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/feature-flags.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/feature-flags.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skill-discovery.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skill-discovery.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skill-discovery.segments/!KGRhc2hib2FyZCk/dashboard/skill-discovery/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skill-discovery.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skill-discovery.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/webhooks.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/webhooks.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/webhooks.segments/!KGRhc2hib2FyZCk/dashboard/webhooks/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/webhooks.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/webhooks.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +9 -9
- package/app/.next-cli-build/server/chunks/112.js +1 -1
- package/app/.next-cli-build/server/chunks/2638.js +1 -1
- package/app/.next-cli-build/server/chunks/2813.js +1 -1
- package/app/.next-cli-build/server/chunks/2974.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +1 -1
- package/app/.next-cli-build/server/chunks/3755.js +1 -1
- package/app/.next-cli-build/server/chunks/4037.js +1 -1
- package/app/.next-cli-build/server/chunks/4303.js +1 -1
- package/app/.next-cli-build/server/chunks/5243.js +1 -1
- package/app/.next-cli-build/server/chunks/5731.js +1 -1
- package/app/.next-cli-build/server/chunks/6270.js +1 -1
- package/app/.next-cli-build/server/chunks/6664.js +1 -1
- package/app/.next-cli-build/server/chunks/7403.js +1 -1
- package/app/.next-cli-build/server/chunks/772.js +1 -1
- package/app/.next-cli-build/server/chunks/{4018.js → 7937.js} +5 -5
- package/app/.next-cli-build/server/chunks/8499.js +1 -1
- package/app/.next-cli-build/server/chunks/8537.js +1 -1
- package/app/.next-cli-build/server/chunks/862.js +1 -1
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8750.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/{1321-b974e2c6d758f2eb.js → 1321-6b997794bb843da8.js} +1 -1
- package/app/.next-cli-build/static/chunks/{7780-8fef40eb7ea5a323.js → 7780-f3508723257e47c1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-8f34a6d3a99ebd37.js → page-f7cbd07558c7b42e.js} +1 -1
- package/app/.next-cli-build/static/css/01b1ec05918332c3.css +1 -0
- package/app/package.json +79 -78
- package/app/src/mitm/server.js +40 -42
- package/cli.js +10 -0
- package/hooks/opencodeBridgeRuntime.js +77 -0
- package/hooks/sqliteRuntime.js +156 -156
- package/hooks/trayRuntime.js +107 -107
- package/package.json +49 -49
- package/vendor/opencode-free-bridge/LICENSE +21 -0
- package/vendor/opencode-free-bridge/README.md +762 -0
- package/vendor/opencode-free-bridge/THIRD_PARTY_NOTICES.md +33 -0
- package/vendor/opencode-free-bridge/UPSTREAM_COMMIT +1 -0
- package/vendor/opencode-free-bridge/identity.js +2624 -0
- package/vendor/opencode-free-bridge/package.json +54 -0
- package/vendor/opencode-free-bridge/panel.js +515 -0
- package/vendor/opencode-free-bridge/proxy.js +980 -0
- package/vendor/opencode-free-bridge/server.js +3357 -0
- package/vendor/opencode-free-bridge/token-budget.js +107 -0
- package/vendor/opencode-free-bridge/transport-baseline.json +39 -0
- package/app/.next-cli-build/static/css/8ba5c8dbc4e30aa0.css +0 -1
- /package/app/.next-cli-build/static/{X4uxXfKI78mMCnlqFsTAr → DryEkcB2pIbzN1YYgNcUS}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{X4uxXfKI78mMCnlqFsTAr → DryEkcB2pIbzN1YYgNcUS}/_ssgManifest.js +0 -0
package/cli.js
CHANGED
|
@@ -676,12 +676,22 @@ function startServer(updatePromise) {
|
|
|
676
676
|
}
|
|
677
677
|
|
|
678
678
|
let server = spawnServer();
|
|
679
|
+
const bridgeRuntime = require("./hooks/opencodeBridgeRuntime");
|
|
680
|
+
const bridge = bridgeRuntime.startOpenCodeBridge();
|
|
681
|
+
if (bridge) Promise.all([waitServerReady(port), waitServerReady(20129)]).then(async ([routerReady, bridgeReady]) => {
|
|
682
|
+
if (!routerReady || !bridgeReady) return;
|
|
683
|
+
for (let attempt = 0; attempt < 10 && bridge.exitCode === null && !bridge.killed; attempt++) {
|
|
684
|
+
if (bridgeRuntime.registerOpenCodeBridge()) return;
|
|
685
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
686
|
+
}
|
|
687
|
+
});
|
|
679
688
|
|
|
680
689
|
// Cleanup function - force kill server process
|
|
681
690
|
let isCleaningUp = false;
|
|
682
691
|
function cleanup() {
|
|
683
692
|
if (isCleaningUp) return;
|
|
684
693
|
isCleaningUp = true;
|
|
694
|
+
if (bridge && !bridge.killed) bridge.kill();
|
|
685
695
|
try {
|
|
686
696
|
// Kill tray if running
|
|
687
697
|
try {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const os = require("os");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { spawn, spawnSync } = require("child_process");
|
|
5
|
+
const crypto = require("crypto");
|
|
6
|
+
|
|
7
|
+
function registerOpenCodeBridge() {
|
|
8
|
+
const dataDir = process.env.DATA_DIR || (process.platform === "win32"
|
|
9
|
+
? path.join(process.env.APPDATA || os.homedir(), "miawrouter")
|
|
10
|
+
: path.join(os.homedir(), ".miawrouter"));
|
|
11
|
+
const dbPath = path.join(dataDir, "db", "data.sqlite");
|
|
12
|
+
if (!fs.existsSync(dbPath)) return false;
|
|
13
|
+
let db;
|
|
14
|
+
try {
|
|
15
|
+
try {
|
|
16
|
+
const { DatabaseSync } = require("node:sqlite");
|
|
17
|
+
db = new DatabaseSync(dbPath);
|
|
18
|
+
} catch {
|
|
19
|
+
const BetterSqlite = require(path.join(dataDir, "runtime", "node_modules", "better-sqlite3"));
|
|
20
|
+
db = new BetterSqlite(dbPath);
|
|
21
|
+
}
|
|
22
|
+
db.exec("PRAGMA busy_timeout=5000; BEGIN IMMEDIATE");
|
|
23
|
+
const nodes = db.prepare("SELECT data FROM providerNodes").all();
|
|
24
|
+
if (nodes.some((row) => { try { return JSON.parse(row.data).prefix === "ocbridge"; } catch { return false; } })) {
|
|
25
|
+
db.exec("COMMIT");
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
const now = new Date().toISOString();
|
|
29
|
+
const id = `openai-compatible-chat-${crypto.randomUUID()}`;
|
|
30
|
+
const config = { prefix: "ocbridge", apiType: "chat", baseUrl: "http://127.0.0.1:20129/v1" };
|
|
31
|
+
db.prepare("INSERT INTO providerNodes(id,type,name,data,createdAt,updatedAt) VALUES(?,?,?,?,?,?)")
|
|
32
|
+
.run(id, "openai-compatible", "OpenCode Free Bridge", JSON.stringify(config), now, now);
|
|
33
|
+
const data = { apiKey: "public", testStatus: "unknown", providerSpecificData: { ...config, nodeName: "OpenCode Free Bridge", connectionProxyEnabled: false, connectionProxyUrl: "", connectionNoProxy: "" } };
|
|
34
|
+
db.prepare("INSERT INTO providerConnections(id,provider,authType,name,priority,isActive,data,createdAt,updatedAt) VALUES(?,?,?,?,?,?,?,?,?)")
|
|
35
|
+
.run(crypto.randomUUID(), id, "apikey", "OpenCode Free Bridge", 1, 1, JSON.stringify(data), now, now);
|
|
36
|
+
db.exec("COMMIT");
|
|
37
|
+
return true;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
try { db?.exec("ROLLBACK"); } catch {}
|
|
40
|
+
console.warn(`OpenCode Free Bridge setup failed: ${error.message}`);
|
|
41
|
+
return false;
|
|
42
|
+
} finally {
|
|
43
|
+
db?.close();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function startOpenCodeBridge({ log = console } = {}) {
|
|
48
|
+
if (process.env.MIAW_OPENCODE_BRIDGE === "0") return null;
|
|
49
|
+
const sourceDir = path.join(__dirname, "..", "vendor", "opencode-free-bridge");
|
|
50
|
+
const script = path.join(sourceDir, "server.js");
|
|
51
|
+
if (!fs.existsSync(script)) {
|
|
52
|
+
log.warn("OpenCode Free Bridge is missing from this installation.");
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
const homeBun = path.join(os.homedir(), ".bun", "bin", process.platform === "win32" ? "bun.exe" : "bun");
|
|
56
|
+
const bun = fs.existsSync(homeBun) ? homeBun : "bun";
|
|
57
|
+
const check = spawnSync(bun, ["--version"], { stdio: "ignore", windowsHide: true, timeout: 5000 });
|
|
58
|
+
if (check.status !== 0) {
|
|
59
|
+
log.warn("OpenCode Free Bridge needs Bun. Install Bun and restart Miawrouter.");
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Pass only runtime environment; the third-party process does not need router secrets.
|
|
64
|
+
const env = {};
|
|
65
|
+
for (const key of ["PATH", "Path", "HOME", "USERPROFILE", "APPDATA", "LOCALAPPDATA", "SYSTEMROOT", "SystemRoot", "TEMP", "TMP", "TMPDIR"]) {
|
|
66
|
+
if (process.env[key] !== undefined) env[key] = process.env[key];
|
|
67
|
+
}
|
|
68
|
+
Object.assign(env, { HOST: "127.0.0.1", PORT: "20129", AUTO_UPDATE: "0" });
|
|
69
|
+
const child = spawn(bun, [script], { cwd: sourceDir, env, stdio: ["ignore", "ignore", "pipe"], windowsHide: true });
|
|
70
|
+
child.on("error", (error) => log.warn(`OpenCode Free Bridge failed to start: ${error.message}`));
|
|
71
|
+
child.stderr.on("data", (data) => {
|
|
72
|
+
if (String(data).includes("EADDRINUSE")) log.warn("OpenCode Free Bridge port 20129 is already in use.");
|
|
73
|
+
});
|
|
74
|
+
return child;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
module.exports = { startOpenCodeBridge, registerOpenCodeBridge };
|
package/hooks/sqliteRuntime.js
CHANGED
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
// Ensure better-sqlite3 is installed in USER_DATA_DIR/runtime/node_modules
|
|
2
|
-
// (user-writable, avoids Windows EBUSY locks during npm i -g updates).
|
|
3
|
-
// sql.js is bundled in bin/app already; node:sqlite / bun:sqlite are built-in.
|
|
4
|
-
const { execSync, spawnSync } = require("child_process");
|
|
5
|
-
const fs = require("fs");
|
|
6
|
-
const os = require("os");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
|
|
9
|
-
const BETTER_SQLITE3_VERSION = "12.6.2";
|
|
10
|
-
const SQL_JS_VERSION = "1.14.1";
|
|
11
|
-
|
|
12
|
-
function getDataDir() {
|
|
13
|
-
if (process.env.DATA_DIR) return process.env.DATA_DIR;
|
|
14
|
-
return process.platform === "win32"
|
|
15
|
-
? path.join(process.env.APPDATA || os.homedir(), "miawrouter")
|
|
16
|
-
: path.join(os.homedir(), ".miawrouter");
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function getRuntimeDir() {
|
|
20
|
-
return path.join(getDataDir(), "runtime");
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function getRuntimeNodeModules() {
|
|
24
|
-
return path.join(getRuntimeDir(), "node_modules");
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function ensureRuntimeDir() {
|
|
28
|
-
const dir = getRuntimeDir();
|
|
29
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
30
|
-
|
|
31
|
-
// Minimal package.json so npm treats it as a project root
|
|
32
|
-
const pkgPath = path.join(dir, "package.json");
|
|
33
|
-
if (!fs.existsSync(pkgPath)) {
|
|
34
|
-
fs.writeFileSync(pkgPath, JSON.stringify({
|
|
35
|
-
name: "miawrouter-runtime",
|
|
36
|
-
version: "1.2.
|
|
37
|
-
private: true,
|
|
38
|
-
description: "User-writable runtime deps for miawrouter (better-sqlite3 native binary)",
|
|
39
|
-
}, null, 2));
|
|
40
|
-
}
|
|
41
|
-
return dir;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function hasModule(name) {
|
|
45
|
-
return fs.existsSync(path.join(getRuntimeNodeModules(), name, "package.json"));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function isBetterSqliteBinaryValid() {
|
|
49
|
-
const binary = path.join(getRuntimeNodeModules(), "better-sqlite3", "build", "Release", "better_sqlite3.node");
|
|
50
|
-
if (!fs.existsSync(binary)) return false;
|
|
51
|
-
try {
|
|
52
|
-
const fd = fs.openSync(binary, "r");
|
|
53
|
-
const buf = Buffer.alloc(4);
|
|
54
|
-
fs.readSync(fd, buf, 0, 4, 0);
|
|
55
|
-
fs.closeSync(fd);
|
|
56
|
-
const magic = buf.toString("hex");
|
|
57
|
-
if (process.platform === "linux") return magic.startsWith("7f454c46");
|
|
58
|
-
if (process.platform === "darwin") return magic.startsWith("cffaedfe") || magic.startsWith("cefaedfe");
|
|
59
|
-
if (process.platform === "win32") return magic.startsWith("4d5a");
|
|
60
|
-
return true;
|
|
61
|
-
} catch { return false; }
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Extract a short, user-friendly reason from npm stderr.
|
|
65
|
-
function summarizeNpmError(stderr = "") {
|
|
66
|
-
const text = String(stderr);
|
|
67
|
-
if (/ENOTFOUND|ETIMEDOUT|EAI_AGAIN|network|getaddrinfo/i.test(text)) return "No internet connection or registry unreachable";
|
|
68
|
-
if (/EACCES|EPERM|permission denied/i.test(text)) return "Permission denied (check folder permissions)";
|
|
69
|
-
if (/ENOSPC|no space/i.test(text)) return "Not enough disk space";
|
|
70
|
-
if (/node-gyp|gyp ERR|python|MSBuild|Visual Studio|Xcode/i.test(text)) return "Missing build tools (Xcode CLT / Python / VS Build Tools)";
|
|
71
|
-
if (/ETARGET|version.*not found/i.test(text)) return "Package version not found on registry";
|
|
72
|
-
const m = text.match(/npm ERR! (.+)/);
|
|
73
|
-
if (m) return m[1].slice(0, 200);
|
|
74
|
-
const lastLine = text.trim().split(/\r?\n/).filter(Boolean).pop();
|
|
75
|
-
return lastLine ? lastLine.slice(0, 200) : "Unknown error";
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function runNpmInstall({ cwd, pkgs, extraArgs = [], timeout = 180000 }) {
|
|
79
|
-
const args = ["install", ...pkgs, "--no-audit", "--no-fund", "--prefer-online", ...extraArgs];
|
|
80
|
-
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
81
|
-
const res = spawnSync(npmCmd, args, {
|
|
82
|
-
cwd,
|
|
83
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
84
|
-
timeout,
|
|
85
|
-
shell: process.platform === "win32",
|
|
86
|
-
encoding: "utf8",
|
|
87
|
-
});
|
|
88
|
-
return { ok: res.status === 0, code: res.status, stderr: res.stderr || "", stdout: res.stdout || "" };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function npmInstall(pkgs, opts = {}) {
|
|
92
|
-
const cwd = ensureRuntimeDir();
|
|
93
|
-
const extra = opts.optional ? ["--no-save"] : [];
|
|
94
|
-
if (!opts.silent) console.log("⏳ Installing SQLite engine (first run)...");
|
|
95
|
-
const res = runNpmInstall({ cwd, pkgs, extraArgs: extra, timeout: opts.timeout || 180000 });
|
|
96
|
-
if (!res.ok && !opts.silent) {
|
|
97
|
-
const reason = summarizeNpmError(res.stderr);
|
|
98
|
-
console.warn("⚠️ SQLite engine install failed — using fallback");
|
|
99
|
-
console.warn(` Reason: ${reason}`);
|
|
100
|
-
console.warn(` Retry: cd "${cwd}" && npm install ${pkgs.join(" ")}`);
|
|
101
|
-
}
|
|
102
|
-
return res.ok;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Public: ensure better-sqlite3 native module is installed in user-writable
|
|
106
|
-
// runtime dir. sql.js may be bundled in bin/app, but npm publish strips .wasm
|
|
107
|
-
// from nested node_modules — verify and reinstall if missing. node:sqlite is
|
|
108
|
-
// built-in. This is purely a *speed optimization* — app works without
|
|
109
|
-
// better-sqlite3 via fallbacks.
|
|
110
|
-
function isSqlJsWasmValid() {
|
|
111
|
-
const bundledWasm = path.join(__dirname, "..", "app", "node_modules", "sql.js", "dist", "sql-wasm.wasm");
|
|
112
|
-
if (fs.existsSync(bundledWasm)) return true;
|
|
113
|
-
const runtimeWasm = path.join(getRuntimeNodeModules(), "sql.js", "dist", "sql-wasm.wasm");
|
|
114
|
-
return fs.existsSync(runtimeWasm);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function ensureSqliteRuntime({ silent = false } = {}) {
|
|
118
|
-
ensureRuntimeDir();
|
|
119
|
-
|
|
120
|
-
let sqlJsOk = isSqlJsWasmValid();
|
|
121
|
-
if (!sqlJsOk) {
|
|
122
|
-
sqlJsOk = npmInstall([`sql.js@${SQL_JS_VERSION}`], { silent });
|
|
123
|
-
if (sqlJsOk) sqlJsOk = isSqlJsWasmValid();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const needBetterSqlite = !hasModule("better-sqlite3") || !isBetterSqliteBinaryValid();
|
|
127
|
-
if (!needBetterSqlite) {
|
|
128
|
-
if (!silent) console.log("✅ SQLite engine ready");
|
|
129
|
-
return { betterSqlite: true, sqlJs: sqlJsOk };
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const ok = npmInstall([`better-sqlite3@${BETTER_SQLITE3_VERSION}`], { optional: true, silent });
|
|
133
|
-
return {
|
|
134
|
-
betterSqlite: ok && hasModule("better-sqlite3") && isBetterSqliteBinaryValid(),
|
|
135
|
-
sqlJs: sqlJsOk,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Inject runtime + bundled node_modules into NODE_PATH so child Node processes
|
|
140
|
-
// resolve sql.js (bundled in bin/app/node_modules) and better-sqlite3 (runtime).
|
|
141
|
-
function buildEnvWithRuntime(baseEnv = process.env) {
|
|
142
|
-
const runtimeNm = getRuntimeNodeModules();
|
|
143
|
-
const bundledNm = path.join(__dirname, "..", "app", "node_modules");
|
|
144
|
-
const existing = baseEnv.NODE_PATH || "";
|
|
145
|
-
const NODE_PATH = [runtimeNm, bundledNm, existing].filter(Boolean).join(path.delimiter);
|
|
146
|
-
return { ...baseEnv, NODE_PATH };
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
module.exports = {
|
|
150
|
-
ensureSqliteRuntime,
|
|
151
|
-
buildEnvWithRuntime,
|
|
152
|
-
getRuntimeDir,
|
|
153
|
-
getRuntimeNodeModules,
|
|
154
|
-
runNpmInstall,
|
|
155
|
-
summarizeNpmError,
|
|
156
|
-
};
|
|
1
|
+
// Ensure better-sqlite3 is installed in USER_DATA_DIR/runtime/node_modules
|
|
2
|
+
// (user-writable, avoids Windows EBUSY locks during npm i -g updates).
|
|
3
|
+
// sql.js is bundled in bin/app already; node:sqlite / bun:sqlite are built-in.
|
|
4
|
+
const { execSync, spawnSync } = require("child_process");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const os = require("os");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
|
|
9
|
+
const BETTER_SQLITE3_VERSION = "12.6.2";
|
|
10
|
+
const SQL_JS_VERSION = "1.14.1";
|
|
11
|
+
|
|
12
|
+
function getDataDir() {
|
|
13
|
+
if (process.env.DATA_DIR) return process.env.DATA_DIR;
|
|
14
|
+
return process.platform === "win32"
|
|
15
|
+
? path.join(process.env.APPDATA || os.homedir(), "miawrouter")
|
|
16
|
+
: path.join(os.homedir(), ".miawrouter");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getRuntimeDir() {
|
|
20
|
+
return path.join(getDataDir(), "runtime");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getRuntimeNodeModules() {
|
|
24
|
+
return path.join(getRuntimeDir(), "node_modules");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function ensureRuntimeDir() {
|
|
28
|
+
const dir = getRuntimeDir();
|
|
29
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
30
|
+
|
|
31
|
+
// Minimal package.json so npm treats it as a project root
|
|
32
|
+
const pkgPath = path.join(dir, "package.json");
|
|
33
|
+
if (!fs.existsSync(pkgPath)) {
|
|
34
|
+
fs.writeFileSync(pkgPath, JSON.stringify({
|
|
35
|
+
name: "miawrouter-runtime",
|
|
36
|
+
version: "1.2.4",
|
|
37
|
+
private: true,
|
|
38
|
+
description: "User-writable runtime deps for miawrouter (better-sqlite3 native binary)",
|
|
39
|
+
}, null, 2));
|
|
40
|
+
}
|
|
41
|
+
return dir;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function hasModule(name) {
|
|
45
|
+
return fs.existsSync(path.join(getRuntimeNodeModules(), name, "package.json"));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isBetterSqliteBinaryValid() {
|
|
49
|
+
const binary = path.join(getRuntimeNodeModules(), "better-sqlite3", "build", "Release", "better_sqlite3.node");
|
|
50
|
+
if (!fs.existsSync(binary)) return false;
|
|
51
|
+
try {
|
|
52
|
+
const fd = fs.openSync(binary, "r");
|
|
53
|
+
const buf = Buffer.alloc(4);
|
|
54
|
+
fs.readSync(fd, buf, 0, 4, 0);
|
|
55
|
+
fs.closeSync(fd);
|
|
56
|
+
const magic = buf.toString("hex");
|
|
57
|
+
if (process.platform === "linux") return magic.startsWith("7f454c46");
|
|
58
|
+
if (process.platform === "darwin") return magic.startsWith("cffaedfe") || magic.startsWith("cefaedfe");
|
|
59
|
+
if (process.platform === "win32") return magic.startsWith("4d5a");
|
|
60
|
+
return true;
|
|
61
|
+
} catch { return false; }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Extract a short, user-friendly reason from npm stderr.
|
|
65
|
+
function summarizeNpmError(stderr = "") {
|
|
66
|
+
const text = String(stderr);
|
|
67
|
+
if (/ENOTFOUND|ETIMEDOUT|EAI_AGAIN|network|getaddrinfo/i.test(text)) return "No internet connection or registry unreachable";
|
|
68
|
+
if (/EACCES|EPERM|permission denied/i.test(text)) return "Permission denied (check folder permissions)";
|
|
69
|
+
if (/ENOSPC|no space/i.test(text)) return "Not enough disk space";
|
|
70
|
+
if (/node-gyp|gyp ERR|python|MSBuild|Visual Studio|Xcode/i.test(text)) return "Missing build tools (Xcode CLT / Python / VS Build Tools)";
|
|
71
|
+
if (/ETARGET|version.*not found/i.test(text)) return "Package version not found on registry";
|
|
72
|
+
const m = text.match(/npm ERR! (.+)/);
|
|
73
|
+
if (m) return m[1].slice(0, 200);
|
|
74
|
+
const lastLine = text.trim().split(/\r?\n/).filter(Boolean).pop();
|
|
75
|
+
return lastLine ? lastLine.slice(0, 200) : "Unknown error";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function runNpmInstall({ cwd, pkgs, extraArgs = [], timeout = 180000 }) {
|
|
79
|
+
const args = ["install", ...pkgs, "--no-audit", "--no-fund", "--prefer-online", ...extraArgs];
|
|
80
|
+
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
81
|
+
const res = spawnSync(npmCmd, args, {
|
|
82
|
+
cwd,
|
|
83
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
84
|
+
timeout,
|
|
85
|
+
shell: process.platform === "win32",
|
|
86
|
+
encoding: "utf8",
|
|
87
|
+
});
|
|
88
|
+
return { ok: res.status === 0, code: res.status, stderr: res.stderr || "", stdout: res.stdout || "" };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function npmInstall(pkgs, opts = {}) {
|
|
92
|
+
const cwd = ensureRuntimeDir();
|
|
93
|
+
const extra = opts.optional ? ["--no-save"] : [];
|
|
94
|
+
if (!opts.silent) console.log("⏳ Installing SQLite engine (first run)...");
|
|
95
|
+
const res = runNpmInstall({ cwd, pkgs, extraArgs: extra, timeout: opts.timeout || 180000 });
|
|
96
|
+
if (!res.ok && !opts.silent) {
|
|
97
|
+
const reason = summarizeNpmError(res.stderr);
|
|
98
|
+
console.warn("⚠️ SQLite engine install failed — using fallback");
|
|
99
|
+
console.warn(` Reason: ${reason}`);
|
|
100
|
+
console.warn(` Retry: cd "${cwd}" && npm install ${pkgs.join(" ")}`);
|
|
101
|
+
}
|
|
102
|
+
return res.ok;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Public: ensure better-sqlite3 native module is installed in user-writable
|
|
106
|
+
// runtime dir. sql.js may be bundled in bin/app, but npm publish strips .wasm
|
|
107
|
+
// from nested node_modules — verify and reinstall if missing. node:sqlite is
|
|
108
|
+
// built-in. This is purely a *speed optimization* — app works without
|
|
109
|
+
// better-sqlite3 via fallbacks.
|
|
110
|
+
function isSqlJsWasmValid() {
|
|
111
|
+
const bundledWasm = path.join(__dirname, "..", "app", "node_modules", "sql.js", "dist", "sql-wasm.wasm");
|
|
112
|
+
if (fs.existsSync(bundledWasm)) return true;
|
|
113
|
+
const runtimeWasm = path.join(getRuntimeNodeModules(), "sql.js", "dist", "sql-wasm.wasm");
|
|
114
|
+
return fs.existsSync(runtimeWasm);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function ensureSqliteRuntime({ silent = false } = {}) {
|
|
118
|
+
ensureRuntimeDir();
|
|
119
|
+
|
|
120
|
+
let sqlJsOk = isSqlJsWasmValid();
|
|
121
|
+
if (!sqlJsOk) {
|
|
122
|
+
sqlJsOk = npmInstall([`sql.js@${SQL_JS_VERSION}`], { silent });
|
|
123
|
+
if (sqlJsOk) sqlJsOk = isSqlJsWasmValid();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const needBetterSqlite = !hasModule("better-sqlite3") || !isBetterSqliteBinaryValid();
|
|
127
|
+
if (!needBetterSqlite) {
|
|
128
|
+
if (!silent) console.log("✅ SQLite engine ready");
|
|
129
|
+
return { betterSqlite: true, sqlJs: sqlJsOk };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const ok = npmInstall([`better-sqlite3@${BETTER_SQLITE3_VERSION}`], { optional: true, silent });
|
|
133
|
+
return {
|
|
134
|
+
betterSqlite: ok && hasModule("better-sqlite3") && isBetterSqliteBinaryValid(),
|
|
135
|
+
sqlJs: sqlJsOk,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Inject runtime + bundled node_modules into NODE_PATH so child Node processes
|
|
140
|
+
// resolve sql.js (bundled in bin/app/node_modules) and better-sqlite3 (runtime).
|
|
141
|
+
function buildEnvWithRuntime(baseEnv = process.env) {
|
|
142
|
+
const runtimeNm = getRuntimeNodeModules();
|
|
143
|
+
const bundledNm = path.join(__dirname, "..", "app", "node_modules");
|
|
144
|
+
const existing = baseEnv.NODE_PATH || "";
|
|
145
|
+
const NODE_PATH = [runtimeNm, bundledNm, existing].filter(Boolean).join(path.delimiter);
|
|
146
|
+
return { ...baseEnv, NODE_PATH };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
module.exports = {
|
|
150
|
+
ensureSqliteRuntime,
|
|
151
|
+
buildEnvWithRuntime,
|
|
152
|
+
getRuntimeDir,
|
|
153
|
+
getRuntimeNodeModules,
|
|
154
|
+
runNpmInstall,
|
|
155
|
+
summarizeNpmError,
|
|
156
|
+
};
|
package/hooks/trayRuntime.js
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
// Lazy install systray2 for macOS/Linux into USER_DATA_DIR/runtime/node_modules.
|
|
2
|
-
// Windows uses PowerShell NotifyIcon (no binary) → no systray needed.
|
|
3
|
-
// This keeps the published npm tarball free of unsigned Go binaries that
|
|
4
|
-
// trigger antivirus false positives (e.g. Kaspersky flagging tray_windows.exe).
|
|
5
|
-
//
|
|
6
|
-
// We use the maintained `systray2` fork. The original `systray@1.0.5` package
|
|
7
|
-
// bundles a 2017 x86_64 Go binary whose Mach-O headers are rejected by modern
|
|
8
|
-
// dyld (macOS 14+), so the tray silently fails to register on Apple Silicon.
|
|
9
|
-
const { spawnSync } = require("child_process");
|
|
10
|
-
const fs = require("fs");
|
|
11
|
-
const path = require("path");
|
|
12
|
-
const { getRuntimeDir, getRuntimeNodeModules, runNpmInstall, summarizeNpmError } = require("./sqliteRuntime");
|
|
13
|
-
|
|
14
|
-
const SYSTRAY_PKG = "systray2";
|
|
15
|
-
const SYSTRAY_VERSION = "2.1.4";
|
|
16
|
-
const LEGACY_SYSTRAY_PKG = "systray";
|
|
17
|
-
|
|
18
|
-
function hasSystray() {
|
|
19
|
-
return fs.existsSync(path.join(getRuntimeNodeModules(), SYSTRAY_PKG, "package.json"));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Remove the legacy `systray` package from all known locations.
|
|
23
|
-
// On Windows it was an AV false-positive risk; on macOS/Linux its bundled
|
|
24
|
-
// binary is broken on modern OS versions.
|
|
25
|
-
function cleanupLegacySystray({ silent = false } = {}) {
|
|
26
|
-
// 1) Runtime dir: ~/.miawrouter/runtime/node_modules/systray (or %APPDATA% on Win)
|
|
27
|
-
// 2) npm global nested: <npm_prefix>/node_modules/miawrouter/node_modules/systray
|
|
28
|
-
// __dirname here = <pkg root>/hooks → up 1 = pkg root
|
|
29
|
-
const targets = [
|
|
30
|
-
path.join(getRuntimeNodeModules(), LEGACY_SYSTRAY_PKG),
|
|
31
|
-
path.join(__dirname, "..", "node_modules", LEGACY_SYSTRAY_PKG)
|
|
32
|
-
];
|
|
33
|
-
for (const dir of targets) {
|
|
34
|
-
if (fs.existsSync(dir)) {
|
|
35
|
-
try {
|
|
36
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
37
|
-
if (!silent) console.log(`[miawrouter][runtime] removed legacy systray: ${dir}`);
|
|
38
|
-
} catch (e) {
|
|
39
|
-
if (!silent) console.warn(`[miawrouter][runtime] failed to remove ${dir}: ${e.message}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// systray2's npm tarball sometimes ships the bundled Go binary without the
|
|
46
|
-
// executable bit set on macOS, causing spawn() to fail with EACCES. Set +x
|
|
47
|
-
// best-effort so the tray actually starts.
|
|
48
|
-
function chmodSystrayBin({ silent = false } = {}) {
|
|
49
|
-
if (process.platform === "win32") return;
|
|
50
|
-
const binName = process.platform === "darwin" ? "tray_darwin_release" : "tray_linux_release";
|
|
51
|
-
const binPath = path.join(getRuntimeNodeModules(), SYSTRAY_PKG, "traybin", binName);
|
|
52
|
-
if (!fs.existsSync(binPath)) return;
|
|
53
|
-
try {
|
|
54
|
-
fs.chmodSync(binPath, 0o755);
|
|
55
|
-
} catch (e) {
|
|
56
|
-
if (!silent) console.warn(`[miawrouter][runtime] chmod tray bin failed: ${e.message}`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function ensureRuntimeDir() {
|
|
61
|
-
const dir = getRuntimeDir();
|
|
62
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
63
|
-
const pkgPath = path.join(dir, "package.json");
|
|
64
|
-
if (!fs.existsSync(pkgPath)) {
|
|
65
|
-
fs.writeFileSync(pkgPath, JSON.stringify({
|
|
66
|
-
name: "miawrouter-runtime",
|
|
67
|
-
version: "1.2.
|
|
68
|
-
private: true
|
|
69
|
-
}, null, 2));
|
|
70
|
-
}
|
|
71
|
-
return dir;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function npmInstall(pkgs, { silent = false } = {}) {
|
|
75
|
-
const cwd = ensureRuntimeDir();
|
|
76
|
-
if (!silent) console.log("⏳ Installing system tray (first run)...");
|
|
77
|
-
const res = runNpmInstall({ cwd, pkgs, extraArgs: ["--no-save"], timeout: 120000 });
|
|
78
|
-
if (!res.ok && !silent) {
|
|
79
|
-
const reason = summarizeNpmError(res.stderr);
|
|
80
|
-
console.warn("⚠️ System tray install failed — tray disabled");
|
|
81
|
-
console.warn(` Reason: ${reason}`);
|
|
82
|
-
console.warn(` Retry: cd "${cwd}" && npm install ${pkgs.join(" ")}`);
|
|
83
|
-
}
|
|
84
|
-
return res.ok;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Public: ensure systray2 is installed on macOS/Linux only.
|
|
88
|
-
// Windows skips entirely (uses PowerShell tray).
|
|
89
|
-
function ensureTrayRuntime({ silent = false } = {}) {
|
|
90
|
-
// Always evict the legacy `systray` package — its binary is broken on
|
|
91
|
-
// modern macOS and an AV false-positive on Windows.
|
|
92
|
-
cleanupLegacySystray({ silent });
|
|
93
|
-
|
|
94
|
-
if (process.platform === "win32") {
|
|
95
|
-
return { systray: false, skipped: true };
|
|
96
|
-
}
|
|
97
|
-
if (hasSystray()) {
|
|
98
|
-
chmodSystrayBin({ silent });
|
|
99
|
-
if (!silent) console.log("✅ System tray ready");
|
|
100
|
-
return { systray: true };
|
|
101
|
-
}
|
|
102
|
-
const ok = npmInstall([`${SYSTRAY_PKG}@${SYSTRAY_VERSION}`], { silent });
|
|
103
|
-
if (ok) chmodSystrayBin({ silent });
|
|
104
|
-
return { systray: ok && hasSystray() };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
module.exports = { ensureTrayRuntime };
|
|
1
|
+
// Lazy install systray2 for macOS/Linux into USER_DATA_DIR/runtime/node_modules.
|
|
2
|
+
// Windows uses PowerShell NotifyIcon (no binary) → no systray needed.
|
|
3
|
+
// This keeps the published npm tarball free of unsigned Go binaries that
|
|
4
|
+
// trigger antivirus false positives (e.g. Kaspersky flagging tray_windows.exe).
|
|
5
|
+
//
|
|
6
|
+
// We use the maintained `systray2` fork. The original `systray@1.0.5` package
|
|
7
|
+
// bundles a 2017 x86_64 Go binary whose Mach-O headers are rejected by modern
|
|
8
|
+
// dyld (macOS 14+), so the tray silently fails to register on Apple Silicon.
|
|
9
|
+
const { spawnSync } = require("child_process");
|
|
10
|
+
const fs = require("fs");
|
|
11
|
+
const path = require("path");
|
|
12
|
+
const { getRuntimeDir, getRuntimeNodeModules, runNpmInstall, summarizeNpmError } = require("./sqliteRuntime");
|
|
13
|
+
|
|
14
|
+
const SYSTRAY_PKG = "systray2";
|
|
15
|
+
const SYSTRAY_VERSION = "2.1.4";
|
|
16
|
+
const LEGACY_SYSTRAY_PKG = "systray";
|
|
17
|
+
|
|
18
|
+
function hasSystray() {
|
|
19
|
+
return fs.existsSync(path.join(getRuntimeNodeModules(), SYSTRAY_PKG, "package.json"));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Remove the legacy `systray` package from all known locations.
|
|
23
|
+
// On Windows it was an AV false-positive risk; on macOS/Linux its bundled
|
|
24
|
+
// binary is broken on modern OS versions.
|
|
25
|
+
function cleanupLegacySystray({ silent = false } = {}) {
|
|
26
|
+
// 1) Runtime dir: ~/.miawrouter/runtime/node_modules/systray (or %APPDATA% on Win)
|
|
27
|
+
// 2) npm global nested: <npm_prefix>/node_modules/miawrouter/node_modules/systray
|
|
28
|
+
// __dirname here = <pkg root>/hooks → up 1 = pkg root
|
|
29
|
+
const targets = [
|
|
30
|
+
path.join(getRuntimeNodeModules(), LEGACY_SYSTRAY_PKG),
|
|
31
|
+
path.join(__dirname, "..", "node_modules", LEGACY_SYSTRAY_PKG)
|
|
32
|
+
];
|
|
33
|
+
for (const dir of targets) {
|
|
34
|
+
if (fs.existsSync(dir)) {
|
|
35
|
+
try {
|
|
36
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
37
|
+
if (!silent) console.log(`[miawrouter][runtime] removed legacy systray: ${dir}`);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
if (!silent) console.warn(`[miawrouter][runtime] failed to remove ${dir}: ${e.message}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// systray2's npm tarball sometimes ships the bundled Go binary without the
|
|
46
|
+
// executable bit set on macOS, causing spawn() to fail with EACCES. Set +x
|
|
47
|
+
// best-effort so the tray actually starts.
|
|
48
|
+
function chmodSystrayBin({ silent = false } = {}) {
|
|
49
|
+
if (process.platform === "win32") return;
|
|
50
|
+
const binName = process.platform === "darwin" ? "tray_darwin_release" : "tray_linux_release";
|
|
51
|
+
const binPath = path.join(getRuntimeNodeModules(), SYSTRAY_PKG, "traybin", binName);
|
|
52
|
+
if (!fs.existsSync(binPath)) return;
|
|
53
|
+
try {
|
|
54
|
+
fs.chmodSync(binPath, 0o755);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
if (!silent) console.warn(`[miawrouter][runtime] chmod tray bin failed: ${e.message}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function ensureRuntimeDir() {
|
|
61
|
+
const dir = getRuntimeDir();
|
|
62
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
63
|
+
const pkgPath = path.join(dir, "package.json");
|
|
64
|
+
if (!fs.existsSync(pkgPath)) {
|
|
65
|
+
fs.writeFileSync(pkgPath, JSON.stringify({
|
|
66
|
+
name: "miawrouter-runtime",
|
|
67
|
+
version: "1.2.4",
|
|
68
|
+
private: true
|
|
69
|
+
}, null, 2));
|
|
70
|
+
}
|
|
71
|
+
return dir;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function npmInstall(pkgs, { silent = false } = {}) {
|
|
75
|
+
const cwd = ensureRuntimeDir();
|
|
76
|
+
if (!silent) console.log("⏳ Installing system tray (first run)...");
|
|
77
|
+
const res = runNpmInstall({ cwd, pkgs, extraArgs: ["--no-save"], timeout: 120000 });
|
|
78
|
+
if (!res.ok && !silent) {
|
|
79
|
+
const reason = summarizeNpmError(res.stderr);
|
|
80
|
+
console.warn("⚠️ System tray install failed — tray disabled");
|
|
81
|
+
console.warn(` Reason: ${reason}`);
|
|
82
|
+
console.warn(` Retry: cd "${cwd}" && npm install ${pkgs.join(" ")}`);
|
|
83
|
+
}
|
|
84
|
+
return res.ok;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Public: ensure systray2 is installed on macOS/Linux only.
|
|
88
|
+
// Windows skips entirely (uses PowerShell tray).
|
|
89
|
+
function ensureTrayRuntime({ silent = false } = {}) {
|
|
90
|
+
// Always evict the legacy `systray` package — its binary is broken on
|
|
91
|
+
// modern macOS and an AV false-positive on Windows.
|
|
92
|
+
cleanupLegacySystray({ silent });
|
|
93
|
+
|
|
94
|
+
if (process.platform === "win32") {
|
|
95
|
+
return { systray: false, skipped: true };
|
|
96
|
+
}
|
|
97
|
+
if (hasSystray()) {
|
|
98
|
+
chmodSystrayBin({ silent });
|
|
99
|
+
if (!silent) console.log("✅ System tray ready");
|
|
100
|
+
return { systray: true };
|
|
101
|
+
}
|
|
102
|
+
const ok = npmInstall([`${SYSTRAY_PKG}@${SYSTRAY_VERSION}`], { silent });
|
|
103
|
+
if (ok) chmodSystrayBin({ silent });
|
|
104
|
+
return { systray: ok && hasSystray() };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
module.exports = { ensureTrayRuntime };
|