@kaitranntt/ccs 7.79.1 → 8.0.0-dev.2
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 +29 -11
- package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
- package/dist/bin/ccsxp-runtime.js +8 -0
- package/dist/bin/ccsxp-runtime.js.map +1 -1
- package/dist/bin/codex-runtime-router.d.ts +24 -0
- package/dist/bin/codex-runtime-router.d.ts.map +1 -0
- package/dist/bin/codex-runtime-router.js +117 -0
- package/dist/bin/codex-runtime-router.js.map +1 -0
- package/dist/bin/codex-runtime.d.ts +1 -0
- package/dist/bin/codex-runtime.js +7 -2
- package/dist/bin/codex-runtime.js.map +1 -1
- package/dist/ccs.js +2 -1
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js +2 -2
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js.map +1 -1
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts +2 -2
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js +16 -8
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js.map +1 -1
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts +8 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/model-id-normalizer.js +19 -2
- package/dist/cliproxy/ai-providers/model-id-normalizer.js.map +1 -1
- package/dist/cliproxy/ai-providers/service.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/service.js +39 -12
- package/dist/cliproxy/ai-providers/service.js.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts +13 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +111 -34
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
- package/dist/cliproxy/auth/oauth-trace/redactor.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-trace/redactor.js +9 -1
- package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -1
- package/dist/cliproxy/config/generator.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.js +5 -2
- package/dist/cliproxy/config/generator.js.map +1 -1
- package/dist/cliproxy/config/thinking-config.js +6 -6
- package/dist/cliproxy/config/thinking-config.js.map +1 -1
- package/dist/cliproxy/executor/env-resolver.js +1 -1
- package/dist/cliproxy/executor/env-resolver.js.map +1 -1
- package/dist/cliproxy/executor/session-bridge.d.ts.map +1 -1
- package/dist/cliproxy/executor/session-bridge.js +11 -8
- package/dist/cliproxy/executor/session-bridge.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-claude.js +35 -4
- package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.js +4 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -1
- package/dist/cliproxy/quota/quota-manager.d.ts +1 -0
- package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-manager.js +53 -2
- package/dist/cliproxy/quota/quota-manager.js.map +1 -1
- package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts.map +1 -1
- package/dist/cliproxy/services/oauth-usage-log-transformer.js +5 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.js.map +1 -1
- package/dist/codex-auth/codex-account-identity.d.ts +8 -0
- package/dist/codex-auth/codex-account-identity.d.ts.map +1 -0
- package/dist/codex-auth/codex-account-identity.js +53 -0
- package/dist/codex-auth/codex-account-identity.js.map +1 -0
- package/dist/codex-auth/codex-auth-dashboard-service.d.ts +46 -0
- package/dist/codex-auth/codex-auth-dashboard-service.d.ts.map +1 -0
- package/dist/codex-auth/codex-auth-dashboard-service.js +228 -0
- package/dist/codex-auth/codex-auth-dashboard-service.js.map +1 -0
- package/dist/codex-auth/codex-auth-help.d.ts +7 -0
- package/dist/codex-auth/codex-auth-help.d.ts.map +1 -0
- package/dist/codex-auth/codex-auth-help.js +87 -0
- package/dist/codex-auth/codex-auth-help.js.map +1 -0
- package/dist/codex-auth/codex-auth-router.d.ts +16 -0
- package/dist/codex-auth/codex-auth-router.d.ts.map +1 -0
- package/dist/codex-auth/codex-auth-router.js +77 -0
- package/dist/codex-auth/codex-auth-router.js.map +1 -0
- package/dist/codex-auth/codex-config-symlink.d.ts +14 -0
- package/dist/codex-auth/codex-config-symlink.d.ts.map +1 -0
- package/dist/codex-auth/codex-config-symlink.js +128 -0
- package/dist/codex-auth/codex-config-symlink.js.map +1 -0
- package/dist/codex-auth/codex-profile-paths.d.ts +5 -0
- package/dist/codex-auth/codex-profile-paths.d.ts.map +1 -0
- package/dist/codex-auth/codex-profile-paths.js +58 -0
- package/dist/codex-auth/codex-profile-paths.js.map +1 -0
- package/dist/codex-auth/codex-profile-registry.d.ts +34 -0
- package/dist/codex-auth/codex-profile-registry.d.ts.map +1 -0
- package/dist/codex-auth/codex-profile-registry.js +360 -0
- package/dist/codex-auth/codex-profile-registry.js.map +1 -0
- package/dist/codex-auth/codex-profile-resources.d.ts +6 -0
- package/dist/codex-auth/codex-profile-resources.d.ts.map +1 -0
- package/dist/codex-auth/codex-profile-resources.js +119 -0
- package/dist/codex-auth/codex-profile-resources.js.map +1 -0
- package/dist/codex-auth/commands/create-command.d.ts +9 -0
- package/dist/codex-auth/commands/create-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/create-command.js +203 -0
- package/dist/codex-auth/commands/create-command.js.map +1 -0
- package/dist/codex-auth/commands/import-default-command.d.ts +18 -0
- package/dist/codex-auth/commands/import-default-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/import-default-command.js +385 -0
- package/dist/codex-auth/commands/import-default-command.js.map +1 -0
- package/dist/codex-auth/commands/index.d.ts +13 -0
- package/dist/codex-auth/commands/index.d.ts.map +1 -0
- package/dist/codex-auth/commands/index.js +27 -0
- package/dist/codex-auth/commands/index.js.map +1 -0
- package/dist/codex-auth/commands/login-command.d.ts +9 -0
- package/dist/codex-auth/commands/login-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/login-command.js +152 -0
- package/dist/codex-auth/commands/login-command.js.map +1 -0
- package/dist/codex-auth/commands/remove-command.d.ts +10 -0
- package/dist/codex-auth/commands/remove-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/remove-command.js +230 -0
- package/dist/codex-auth/commands/remove-command.js.map +1 -0
- package/dist/codex-auth/commands/show-command.d.ts +10 -0
- package/dist/codex-auth/commands/show-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/show-command.js +127 -0
- package/dist/codex-auth/commands/show-command.js.map +1 -0
- package/dist/codex-auth/commands/show-detail-view.d.ts +7 -0
- package/dist/codex-auth/commands/show-detail-view.d.ts.map +1 -0
- package/dist/codex-auth/commands/show-detail-view.js +134 -0
- package/dist/codex-auth/commands/show-detail-view.js.map +1 -0
- package/dist/codex-auth/commands/switch-command.d.ts +7 -0
- package/dist/codex-auth/commands/switch-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/switch-command.js +48 -0
- package/dist/codex-auth/commands/switch-command.js.map +1 -0
- package/dist/codex-auth/commands/types.d.ts +45 -0
- package/dist/codex-auth/commands/types.d.ts.map +1 -0
- package/dist/codex-auth/commands/types.js +85 -0
- package/dist/codex-auth/commands/types.js.map +1 -0
- package/dist/codex-auth/commands/use-command.d.ts +16 -0
- package/dist/codex-auth/commands/use-command.d.ts.map +1 -0
- package/dist/codex-auth/commands/use-command.js +86 -0
- package/dist/codex-auth/commands/use-command.js.map +1 -0
- package/dist/codex-auth/decode-id-token.d.ts +12 -0
- package/dist/codex-auth/decode-id-token.d.ts.map +1 -0
- package/dist/codex-auth/decode-id-token.js +83 -0
- package/dist/codex-auth/decode-id-token.js.map +1 -0
- package/dist/codex-auth/index.d.ts +9 -0
- package/dist/codex-auth/index.d.ts.map +1 -0
- package/dist/codex-auth/index.js +22 -0
- package/dist/codex-auth/index.js.map +1 -0
- package/dist/codex-auth/resolve-active-profile.d.ts +13 -0
- package/dist/codex-auth/resolve-active-profile.d.ts.map +1 -0
- package/dist/codex-auth/resolve-active-profile.js +161 -0
- package/dist/codex-auth/resolve-active-profile.js.map +1 -0
- package/dist/codex-auth/shell-detect.d.ts +19 -0
- package/dist/codex-auth/shell-detect.d.ts.map +1 -0
- package/dist/codex-auth/shell-detect.js +91 -0
- package/dist/codex-auth/shell-detect.js.map +1 -0
- package/dist/codex-auth/types.d.ts +26 -0
- package/dist/codex-auth/types.d.ts.map +1 -0
- package/dist/codex-auth/types.js +34 -0
- package/dist/codex-auth/types.js.map +1 -0
- package/dist/commands/cliproxy/variant-subcommand.js +1 -1
- package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
- package/dist/commands/command-catalog.d.ts +1 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +10 -1
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/commands/completion-backend.d.ts.map +1 -1
- package/dist/commands/completion-backend.js +2 -0
- package/dist/commands/completion-backend.js.map +1 -1
- package/dist/commands/config-command.d.ts +2 -0
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/config-command.js +31 -20
- package/dist/commands/config-command.js.map +1 -1
- package/dist/commands/docker/finalize-key-rotation-subcommand.d.ts +2 -0
- package/dist/commands/docker/finalize-key-rotation-subcommand.d.ts.map +1 -0
- package/dist/commands/docker/finalize-key-rotation-subcommand.js +79 -0
- package/dist/commands/docker/finalize-key-rotation-subcommand.js.map +1 -0
- package/dist/commands/docker/help-subcommand.d.ts.map +1 -1
- package/dist/commands/docker/help-subcommand.js +6 -0
- package/dist/commands/docker/help-subcommand.js.map +1 -1
- package/dist/commands/docker/index.d.ts.map +1 -1
- package/dist/commands/docker/index.js +4 -0
- package/dist/commands/docker/index.js.map +1 -1
- package/dist/commands/docker/show-key-subcommand.d.ts +2 -0
- package/dist/commands/docker/show-key-subcommand.d.ts.map +1 -0
- package/dist/commands/docker/show-key-subcommand.js +96 -0
- package/dist/commands/docker/show-key-subcommand.js.map +1 -0
- package/dist/commands/docker/up-subcommand.d.ts.map +1 -1
- package/dist/commands/docker/up-subcommand.js +4 -0
- package/dist/commands/docker/up-subcommand.js.map +1 -1
- package/dist/commands/persist-command.d.ts.map +1 -1
- package/dist/commands/persist-command.js +77 -5
- package/dist/commands/persist-command.js.map +1 -1
- package/dist/dispatcher/cli-argument-parser.d.ts +3 -2
- package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -1
- package/dist/dispatcher/cli-argument-parser.js +37 -7
- package/dist/dispatcher/cli-argument-parser.js.map +1 -1
- package/dist/dispatcher/pre-dispatch.d.ts.map +1 -1
- package/dist/dispatcher/pre-dispatch.js +7 -0
- package/dist/dispatcher/pre-dispatch.js.map +1 -1
- package/dist/dispatcher/target-executor.d.ts +2 -2
- package/dist/dispatcher/target-executor.d.ts.map +1 -1
- package/dist/dispatcher/target-executor.js +5 -5
- package/dist/dispatcher/target-executor.js.map +1 -1
- package/dist/docker/docker-bootstrap.d.ts +1 -1
- package/dist/docker/docker-bootstrap.d.ts.map +1 -1
- package/dist/docker/docker-bootstrap.js +99 -3
- package/dist/docker/docker-bootstrap.js.map +1 -1
- package/dist/docker/docker-executor.d.ts +3 -0
- package/dist/docker/docker-executor.d.ts.map +1 -1
- package/dist/docker/docker-executor.js +53 -0
- package/dist/docker/docker-executor.js.map +1 -1
- package/dist/docker/docker-key-rotation.d.ts +48 -0
- package/dist/docker/docker-key-rotation.d.ts.map +1 -0
- package/dist/docker/docker-key-rotation.js +179 -0
- package/dist/docker/docker-key-rotation.js.map +1 -0
- package/dist/management/checks/config-check.d.ts.map +1 -1
- package/dist/management/checks/config-check.js +10 -1
- package/dist/management/checks/config-check.js.map +1 -1
- package/dist/management/doctor.d.ts +1 -0
- package/dist/management/doctor.d.ts.map +1 -1
- package/dist/management/doctor.js +23 -0
- package/dist/management/doctor.js.map +1 -1
- package/dist/proxy/proxy-daemon.d.ts.map +1 -1
- package/dist/proxy/proxy-daemon.js +15 -3
- package/dist/proxy/proxy-daemon.js.map +1 -1
- package/dist/proxy/server/messages-route.d.ts.map +1 -1
- package/dist/proxy/server/messages-route.js +27 -1
- package/dist/proxy/server/messages-route.js.map +1 -1
- package/dist/shared/claude-extension-setup.d.ts.map +1 -1
- package/dist/shared/claude-extension-setup.js +21 -1
- package/dist/shared/claude-extension-setup.js.map +1 -1
- package/dist/shared/stale-codex-translator-settings.d.ts +4 -0
- package/dist/shared/stale-codex-translator-settings.d.ts.map +1 -0
- package/dist/shared/stale-codex-translator-settings.js +35 -0
- package/dist/shared/stale-codex-translator-settings.js.map +1 -0
- package/dist/targets/codex-adapter.d.ts.map +1 -1
- package/dist/targets/codex-adapter.js +64 -5
- package/dist/targets/codex-adapter.js.map +1 -1
- package/dist/targets/codex-cliproxy-provider-config.d.ts.map +1 -1
- package/dist/targets/codex-cliproxy-provider-config.js +56 -24
- package/dist/targets/codex-cliproxy-provider-config.js.map +1 -1
- package/dist/ui/assets/Trans-DyZQZ3e2.js +1 -0
- package/dist/ui/assets/accounts-BPJltru3.js +1 -0
- package/dist/ui/assets/{alert-dialog-DC1l1GRX.js → alert-dialog-DWHL-dqd.js} +1 -1
- package/dist/ui/assets/api-BxPN-zy4.js +4 -0
- package/dist/ui/assets/auth-section-B4o90dwz.js +1 -0
- package/dist/ui/assets/backups-section-1AsdSIJO.js +1 -0
- package/dist/ui/assets/channels-CU4Zdsc_.js +1 -0
- package/dist/ui/assets/{charts-CeK2xCSo.js → charts-eIPy2oG6.js} +34 -34
- package/dist/ui/assets/{checkbox-Dgd2ucy2.js → checkbox-CbCKGH8I.js} +1 -1
- package/dist/ui/assets/claude-extension-CWpjmIGt.js +1 -0
- package/dist/ui/assets/cliproxy-K6eBb5VO.js +4 -0
- package/dist/ui/assets/{cliproxy-ai-providers-DxoCNEaQ.js → cliproxy-ai-providers-Dr4L5NRY.js} +6 -6
- package/dist/ui/assets/cliproxy-control-panel-Cz5r7kHP.js +1 -0
- package/dist/ui/assets/code-highlight-ClSMkeL5.js +1 -0
- package/dist/ui/assets/codex-0HdbW8NR.js +30 -0
- package/dist/ui/assets/{confirm-dialog-nDFNrH0F.js → confirm-dialog-b5Dahgnk.js} +1 -1
- package/dist/ui/assets/copilot-B1Ojakbt.js +3 -0
- package/dist/ui/assets/cursor-PUtNVPx1.js +1 -0
- package/dist/ui/assets/droid-S2gclncb.js +2 -0
- package/dist/ui/assets/globalenv-section-7wKSmNSG.js +1 -0
- package/dist/ui/assets/health-hMLN_gyw.js +1 -0
- package/dist/ui/assets/index-BMoGhs28.css +1 -0
- package/dist/ui/assets/index-BWboJia4.js +1 -0
- package/dist/ui/assets/index-COt1pbk-.js +1 -0
- package/dist/ui/assets/index-CcGVqYOy.js +56 -0
- package/dist/ui/assets/index-Coc3_ABK.js +1 -0
- package/dist/ui/assets/index-Cx0dmbiQ.js +1 -0
- package/dist/ui/assets/index-CxvNNHgE.js +1 -0
- package/dist/ui/assets/index-DkR2KVhF.js +1 -0
- package/dist/ui/assets/logs-BRFVfyLc.js +1 -0
- package/dist/ui/assets/{masked-input-5TJ4LSuz.js → masked-input-4L9CIZGb.js} +1 -1
- package/dist/ui/assets/proxy-status-widget-s1UWOE23.js +1 -0
- package/dist/ui/assets/{raw-json-settings-editor-panel-Fg4WMiuD.js → raw-json-settings-editor-panel-DXh8c8rA.js} +1 -1
- package/dist/ui/assets/{searchable-select-CPJn5vA1.js → searchable-select-CtvEQrMo.js} +1 -1
- package/dist/ui/assets/{separator-BrQkfpAp.js → separator-E0ISp1SN.js} +1 -1
- package/dist/ui/assets/shared-BeYwHeNS.js +8 -0
- package/dist/ui/assets/{table-DRzNRkpJ.js → table-BBslZvNP.js} +1 -1
- package/dist/ui/assets/updates-CDrm903n.js +1 -0
- package/dist/ui/assets/{use-accounts-B6AXtlfF.js → use-accounts-BdalFsdY.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/claude-subcommand-detector.d.ts +12 -3
- package/dist/utils/claude-subcommand-detector.d.ts.map +1 -1
- package/dist/utils/claude-subcommand-detector.js +59 -12
- package/dist/utils/claude-subcommand-detector.js.map +1 -1
- package/dist/web-server/middleware/auth-middleware.d.ts.map +1 -1
- package/dist/web-server/middleware/auth-middleware.js +25 -1
- package/dist/web-server/middleware/auth-middleware.js.map +1 -1
- package/dist/web-server/models-dev/pricing-resolver.d.ts.map +1 -1
- package/dist/web-server/models-dev/pricing-resolver.js +7 -0
- package/dist/web-server/models-dev/pricing-resolver.js.map +1 -1
- package/dist/web-server/models-dev/registry-cache.d.ts.map +1 -1
- package/dist/web-server/models-dev/registry-cache.js +14 -4
- package/dist/web-server/models-dev/registry-cache.js.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.d.ts.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.js +5 -0
- package/dist/web-server/routes/claude-extension-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +8 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.js +13 -26
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
- package/dist/web-server/routes/codex-routes.d.ts.map +1 -1
- package/dist/web-server/routes/codex-routes.js +14 -0
- package/dist/web-server/routes/codex-routes.js.map +1 -1
- package/dist/web-server/routes/proxy-routes.d.ts.map +1 -1
- package/dist/web-server/routes/proxy-routes.js +1 -1
- package/dist/web-server/routes/proxy-routes.js.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-restart-service.d.ts +21 -0
- package/dist/web-server/services/cliproxy-dashboard-restart-service.d.ts.map +1 -0
- package/dist/web-server/services/cliproxy-dashboard-restart-service.js +49 -0
- package/dist/web-server/services/cliproxy-dashboard-restart-service.js.map +1 -0
- package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
- package/dist/web-server/services/codex-dashboard-service.js +30 -3
- package/dist/web-server/services/codex-dashboard-service.js.map +1 -1
- package/dist/web-server/usage/aggregator.d.ts +13 -7
- package/dist/web-server/usage/aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/aggregator.js +37 -22
- package/dist/web-server/usage/aggregator.js.map +1 -1
- package/dist/web-server/usage/handlers.d.ts +1 -0
- package/dist/web-server/usage/handlers.d.ts.map +1 -1
- package/dist/web-server/usage/handlers.js +16 -8
- package/dist/web-server/usage/handlers.js.map +1 -1
- package/dist/web-server/usage/profile-filter.d.ts +13 -0
- package/dist/web-server/usage/profile-filter.d.ts.map +1 -0
- package/dist/web-server/usage/profile-filter.js +30 -0
- package/dist/web-server/usage/profile-filter.js.map +1 -0
- package/dist/web-server/usage/sqlite-cli.d.ts.map +1 -1
- package/dist/web-server/usage/sqlite-cli.js +22 -1
- package/dist/web-server/usage/sqlite-cli.js.map +1 -1
- package/dist/web-server/usage/types.d.ts +8 -0
- package/dist/web-server/usage/types.d.ts.map +1 -1
- package/lib/hooks/websearch-transformer.cjs +12 -3
- package/lib/mcp/ccs-browser-server.cjs +217 -12
- package/package.json +1 -1
- package/scripts/docker-dashboard-sunset-guard.js +171 -0
- package/scripts/run-test-bucket.js +1 -0
- package/scripts/verify-bundle.js +4 -1
- package/dist/ui/assets/accounts-BQu3Aeey.js +0 -1
- package/dist/ui/assets/api-BTbrbjic.js +0 -4
- package/dist/ui/assets/auth-section-BsSVWOMp.js +0 -1
- package/dist/ui/assets/backups-section-BGHYHASS.js +0 -1
- package/dist/ui/assets/channels-vJ8L4j-z.js +0 -1
- package/dist/ui/assets/claude-extension-B3ern4Ad.js +0 -1
- package/dist/ui/assets/cliproxy-CGljI0Or.js +0 -4
- package/dist/ui/assets/cliproxy-control-panel-BJ3Mliy1.js +0 -1
- package/dist/ui/assets/code-highlight-D4E79GKQ.js +0 -3
- package/dist/ui/assets/codex-DBGHPn0v.js +0 -30
- package/dist/ui/assets/copilot-CE_Z3NB0.js +0 -3
- package/dist/ui/assets/cursor-YzGsSR_d.js +0 -1
- package/dist/ui/assets/droid-C-ItViCi.js +0 -2
- package/dist/ui/assets/globalenv-section-C9gSGyZ8.js +0 -1
- package/dist/ui/assets/health-DEeA97sQ.js +0 -1
- package/dist/ui/assets/index-B71yJlMj.css +0 -1
- package/dist/ui/assets/index-BPVO-QAw.js +0 -1
- package/dist/ui/assets/index-BRZp_Csi.js +0 -72
- package/dist/ui/assets/index-BYUwpOeA.js +0 -1
- package/dist/ui/assets/index-D2r_fAW5.js +0 -1
- package/dist/ui/assets/index-DGiziSVQ.js +0 -1
- package/dist/ui/assets/index-DwG6bbUr.js +0 -1
- package/dist/ui/assets/index-Dwtj4wGT.js +0 -1
- package/dist/ui/assets/logs-Mt2W7M3G.js +0 -1
- package/dist/ui/assets/proxy-status-widget-BQOAlYsb.js +0 -1
- package/dist/ui/assets/shared-BlkDl2HF.js +0 -8
- package/dist/ui/assets/updates-BQNeSzLj.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-nu4wz29m.js";import{r as k}from"./react-vendor-Bjx91N7w.js";import{t as R}from"./notifications-B4_o8bcr.js";import{B as E,
|
|
1
|
+
import{j as e}from"./radix-ui-nu4wz29m.js";import{r as k}from"./react-vendor-Bjx91N7w.js";import{t as R}from"./notifications-B4_o8bcr.js";import{B as E,e as a,c as z,bc as S,X as B}from"./index-CcGVqYOy.js";import{aX as L,L as m,au as P,o as T,R as X}from"./icons-DzKUh8vG.js";function F({title:c,pathLabel:x,loading:t,parseWarning:r,readWarning:i,value:s,dirty:n,readOnly:f=!1,saving:h,saveDisabled:j,onChange:p,onSave:u,onRefresh:b,onDiscard:l,language:v="json",exactText:N=!1,loadingLabel:g="Loading settings.json...",parseWarningLabel:w="Parse warning",ownershipNotice:d}){const[C,o]=k.useState(!1),y=async()=>{s&&(await navigator.clipboard.writeText(s),o(!0),R.success(B.t("commonToast.settingsCopied")),window.setTimeout(()=>o(!1),1500))};return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h2",{className:"font-semibold flex items-center gap-2",children:[e.jsx(L,{className:"h-4 w-4 text-primary"}),c,n&&e.jsx(E,{variant:"secondary",className:"text-[10px]",children:"Unsaved"})]}),e.jsx("p",{className:"text-xs text-muted-foreground font-mono truncate",children:x})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(a,{size:"sm",onClick:u,disabled:j,children:[h?e.jsx(m,{className:"h-4 w-4 mr-1 animate-spin"}):e.jsx(P,{className:"h-4 w-4 mr-1"}),"Save"]}),l?e.jsx(a,{variant:"outline",size:"sm",onClick:l,disabled:!n||t,children:"Discard"}):null,e.jsxs(a,{variant:"outline",size:"sm",onClick:y,disabled:!s,children:[e.jsx(T,{className:"h-4 w-4 mr-1"}),C?"Copied":"Copy"]}),e.jsx(a,{variant:"outline",size:"sm",onClick:b,"aria-label":"Refresh raw config",children:e.jsx(X,{className:z("h-4 w-4",t?"animate-spin":"")})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:t?e.jsxs("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:[e.jsx(m,{className:"h-5 w-5 animate-spin mr-2"}),g]}):e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[d&&e.jsx("div",{className:"mx-4 mt-4",children:d}),r&&e.jsxs("div",{className:"mx-4 mt-4 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:bg-amber-950/20 dark:text-amber-300",children:[w,": ",r]}),i&&e.jsxs("div",{className:"mx-4 mt-4 rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:["Read-only: ",i]}),e.jsx("div",{className:"min-h-0 flex-1 p-4 pt-3",children:e.jsx("div",{className:"h-full rounded-md border overflow-hidden bg-background",children:e.jsx(S,{value:s,onChange:p,language:v,readonly:f,exactText:N,minHeight:"100%",heightMode:"fill-parent"})})})]})})]})}const A=F;export{F as R,A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./radix-ui-nu4wz29m.js";import{r as a}from"./react-vendor-Bjx91N7w.js";import{
|
|
1
|
+
import{j as n}from"./radix-ui-nu4wz29m.js";import{r as a}from"./react-vendor-Bjx91N7w.js";import{f as P,g as Q,e as $,c as w,h as B,I as G}from"./index-CcGVqYOy.js";import{aR as H,av as L,m as V}from"./icons-DzKUh8vG.js";function S(o){return o.trim().toLowerCase()}function M(o,h){return`${o}-option-${h.replace(/[^a-z0-9_-]+/gi,"-")}`}function Z({value:o,onChange:h,options:f,groups:g,placeholder:j,searchPlaceholder:k,emptyText:E,disabled:F,className:R,triggerClassName:q,contentClassName:K}){const[l,T]=a.useState(!1),[y,A]=a.useState(""),[i,c]=a.useState(),m=a.useId(),I=a.useRef(null),N=a.useRef({}),O=a.useMemo(()=>f.find(e=>e.value===o),[f,o]),d=a.useMemo(()=>{const e=S(y);return e?f.filter(t=>[t.searchText,...t.keywords??[]].some(u=>S(u).includes(e))):f},[f,y]),z=a.useMemo(()=>{const e=new Map((g??[]).map(r=>[r.key,r])),t=d.filter(r=>!r.groupKey||!e.has(r.groupKey)),u=(g??[]).map(r=>({...r,options:d.filter(x=>x.groupKey===r.key)})).filter(r=>r.options.length>0);return t.length===0?u:[{key:"__default",options:t},...u]},[d,g]),s=a.useMemo(()=>d.filter(e=>!e.disabled),[d]),D=O?.triggerContent??O?.itemContent,v=e=>{T(e),e||(A(""),c(void 0))},b=()=>I.current?.focus();a.useEffect(()=>{if(l){if(s.length===0){c(void 0);return}c(e=>e&&s.some(t=>t.value===e)?e:s.find(t=>t.value===o)?.value??s[0]?.value)}},[s,l,o]),a.useEffect(()=>{!l||!i||N.current[i]?.scrollIntoView({block:"nearest"})},[i,l]);const p=e=>{if(s.length===0)return;if(e==="first"){c(s[0]?.value);return}if(e==="last"){c(s.at(-1)?.value);return}const t=s.findIndex(_=>_.value===i),u=e==="next"?-1:s.length,r=t>=0?t:u,x=e==="next"?Math.min(r+1,s.length-1):Math.max(r-1,0);c(s[x]?.value)},C=e=>{h(e),v(!1)},U=()=>{if(!i)return;const e=s.find(t=>t.value===i);e&&C(e.value)};return n.jsxs(P,{open:l,onOpenChange:v,children:[n.jsx(Q,{asChild:!0,children:n.jsxs($,{type:"button",variant:"outline","aria-expanded":l,"aria-controls":l?m:void 0,"aria-haspopup":"dialog",disabled:F,onKeyDown:e=>{if(e.key!=="ArrowDown"&&e.key!=="ArrowUp")return;e.preventDefault(),v(!0);const t=()=>{b(),p(e.key==="ArrowDown"?"first":"last")};if(typeof requestAnimationFrame=="function"){requestAnimationFrame(t);return}setTimeout(t,0)},className:w("w-full justify-between font-normal",R,q,!D&&"text-muted-foreground"),children:[n.jsx("div",{className:"min-w-0 flex-1 text-left",children:D??n.jsx("span",{children:j})}),n.jsx(H,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),n.jsxs(B,{align:"start",className:w("w-[var(--radix-popover-trigger-width)] p-0",K),onOpenAutoFocus:e=>{if(e.preventDefault(),typeof requestAnimationFrame=="function"){requestAnimationFrame(b);return}setTimeout(b,0)},children:[n.jsx("div",{className:"border-b p-2",children:n.jsxs("div",{className:"relative",children:[n.jsx(L,{className:"text-muted-foreground absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2"}),n.jsx(G,{ref:I,value:y,onChange:e=>A(e.target.value),role:"combobox","aria-label":k,"aria-autocomplete":"list","aria-expanded":l,"aria-controls":m,"aria-activedescendant":i?M(m,i):void 0,onKeyDown:e=>{if(e.key==="ArrowDown"){e.preventDefault(),p("next");return}if(e.key==="ArrowUp"){e.preventDefault(),p("previous");return}if(e.key==="Home"){e.preventDefault(),p("first");return}if(e.key==="End"){e.preventDefault(),p("last");return}if(e.key==="Enter"){e.preventDefault(),U();return}e.key==="Escape"&&(e.preventDefault(),v(!1))},placeholder:k,className:"pl-8"})]})}),n.jsx("div",{"data-slot":"searchable-select-scroll-container","data-testid":"searchable-select-scroll-container",className:"max-h-72 overflow-y-auto overscroll-contain",children:d.length===0?n.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:E}):n.jsx("div",{id:m,role:"listbox","aria-label":j,className:"p-1",children:z.map(e=>n.jsxs("div",{children:[e.label&&n.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:e.label}),e.options.map(t=>{const u=t.value===i,r=t.value===o;return n.jsxs("button",{id:M(m,t.value),type:"button",role:"option","aria-selected":r,disabled:t.disabled,tabIndex:-1,ref:x=>{N.current[t.value]=x},onMouseMove:()=>{t.disabled||c(t.value)},onFocus:()=>{t.disabled||c(t.value)},onClick:()=>C(t.value),className:w("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none","focus-visible:ring-ring focus-visible:ring-1",u&&"bg-accent text-accent-foreground",r&&"bg-accent text-accent-foreground",t.disabled&&"pointer-events-none opacity-50"),children:[n.jsx("div",{className:"min-w-0 flex-1",children:t.itemContent}),r&&n.jsx(V,{className:"h-4 w-4 shrink-0"})]},t.value)})]},e.key))})})]})]})}export{Z as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,a0 as n}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as e}from"./index-
|
|
1
|
+
import{j as i,a0 as n}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as e}from"./index-CcGVqYOy.js";function m({className:t,orientation:a="horizontal",decorative:o=!0,...r}){return i.jsx(n,{"data-slot":"separator",decorative:o,orientation:a,className:e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}export{m as S};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-nu4wz29m.js";import{r as b}from"./react-vendor-Bjx91N7w.js";import{a as O,bv as fe,bw as je,bx as be,R as Ne,U as ve,V as Pe,B as g,bi as C,bj as $,bk as S,e as L,I as we,t as z,c as q,C as X,b as Y,bc as ye}from"./index-CcGVqYOy.js";import{u as ke}from"./use-accounts-BdalFsdY.js";import{a3 as Ce,aa as $e,b9 as Se,b4 as Le,aE as ee,T as M,R as I,F as Me,av as Ie,w as Ee}from"./icons-DzKUh8vG.js";import"./tanstack-bhJxV1h8.js";import"./notifications-B4_o8bcr.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./charts-eIPy2oG6.js";function Ze(){const{t:s}=O(),[o,r]=b.useState("commands"),[t,n]=b.useState(!1),l={commands:s("sharedPage.commands"),skills:s("sharedPage.skills"),agents:s("sharedPage.agents"),plugins:s("sharedPage.plugins"),settings:s("sharedPage.settings")},[a,m]=b.useState(""),[h,u]=b.useState(null),{data:d,isError:w,error:x,refetch:v}=fe(),{data:N}=ke(),c=d&&!t?Te(d):o,{data:A,isLoading:y,isFetching:te,isError:k,error:ae,refetch:re}=je(c),F=A?.items??[],D=a.trim().toLowerCase(),P=a.trim(),f=b.useMemo(()=>{const i=A?.items??[];return D?i.filter(_=>[_.name,_.description,_.path].some(pe=>pe.toLowerCase().includes(D))):i},[A,D]),p=b.useMemo(()=>f.length===0?null:h?f.find(i=>i.path===h)??f[0]:f[0],[f,h]),ne=c==="settings"&&d?.settings?"settings.json":p?.path??null,{data:j,isLoading:Q,isError:W,error:le,refetch:H}=be(c,ne),ie=[{id:"commands",label:l.commands,icon:Ce,count:d?.commands??0},{id:"skills",label:l.skills,icon:$e,count:d?.skills??0},{id:"agents",label:l.agents,icon:Se,count:d?.agents??0},{id:"plugins",label:l.plugins,icon:Le,count:d?.plugins??0},{id:"settings",label:l.settings,icon:ee,count:d?.settings?1:0}],ce=d?.total??0,K=d?.settings?1:0,B=c==="settings"?K:F.length,R=c==="settings"?K:f.length,Z=c==="settings"||!y&&!k,de=s(c==="plugins"?"sharedPage.registryDetail":c==="settings"?"sharedPage.maskedSettingsDetail":"sharedPage.markdownDetail"),oe=c==="plugins"?s("sharedPage.noPluginsFound"):s("sharedPage.noSharedFound",{tab:c}),me=!y&&!k&&F.length===0,he=!y&&!k&&F.length>0&&f.length===0,ue=N?.accounts.filter(i=>(i.shared_resource_mode||"shared")==="shared")??[],G=N?.accounts.filter(i=>i.shared_resource_mode==="profile-local")??[],xe=V(x,"Shared item totals could not be loaded. Listing still works."),ge=V(ae,`Unable to fetch shared ${c}. Please try again.`),J=V(le,`Unable to load content for ${p?.name??"selected item"}.`);return e.jsxs("div",{className:"h-full overflow-auto lg:overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"p-6 pb-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:s("sharedPage.title")}),e.jsx("p",{className:"text-muted-foreground",children:s("sharedPage.subtitle")})]}),e.jsx(Ne,{value:c,onValueChange:i=>{n(!0),r(i),m(""),u(null)},children:e.jsx(ve,{className:"h-auto flex-wrap justify-start",children:ie.map(i=>e.jsxs(Pe,{value:i.id,className:"flex items-center gap-2",children:[e.jsx(i.icon,{className:"w-4 h-4"}),e.jsx("span",{children:i.label}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",i.count,")"]})]},i.id))})})]}),e.jsxs("div",{className:"flex flex-col gap-2 lg:items-end",children:[e.jsxs("div",{className:"grid w-full gap-2 sm:w-auto sm:min-w-[340px] sm:grid-cols-3",children:[e.jsx(U,{label:s("sharedPage.totalShared"),value:ce}),e.jsx(U,{label:l[c],value:B}),e.jsx(U,{label:s("sharedPage.visible"),value:R})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(g,{variant:"secondary",children:de}),P?e.jsxs(g,{variant:"outline",children:[s("sharedPage.filterPrefix")," ",P]}):null]})]})]}),d&&!d.symlinkStatus.valid&&e.jsxs(C,{variant:"warning",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsx($,{children:s("sharedPage.configurationRequired")}),e.jsxs(S,{children:[d.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),w&&e.jsxs(C,{variant:"info",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsx($,{children:s("sharedPage.countsUnavailable")}),e.jsxs(S,{children:[e.jsx("p",{children:xe}),e.jsx("div",{className:"mt-3",children:e.jsxs(L,{size:"sm",variant:"outline",onClick:()=>{v()},children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),s("sharedPage.retryCounts")]})})]})]}),N?e.jsx(Ae,{sharedCount:ue.length,profileLocalCount:G.length,profileLocalNames:G.map(i=>i.name)}):null]}),e.jsx("div",{className:"px-6 pb-6 lg:flex-1 lg:min-h-0",children:e.jsx("div",{className:"rounded-lg border overflow-hidden bg-background lg:h-full",children:e.jsxs("div",{className:"grid lg:h-full lg:min-h-0 lg:grid-cols-[320px_minmax(0,1fr)]",children:[e.jsxs("div",{className:"border-b lg:border-b-0 lg:border-r flex flex-col bg-muted/30 lg:min-h-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(Me,{className:"w-4 h-4 text-primary shrink-0"}),e.jsx("h2",{className:"font-semibold truncate",children:l[c]})]}),Z&&e.jsxs(g,{variant:"outline",className:"text-[10px] h-5",children:[R,"/",B]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Ie,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(we,{value:a,onChange:i=>m(i.target.value),placeholder:s("sharedPage.filterPlaceholder",{tab:c}),"aria-label":s("sharedPage.filterPlaceholder",{tab:c}),className:"pl-8 h-9"})]}),Z&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s("sharedPage.showing",{visible:R,total:B,tab:c}),P?s("sharedPage.showingQuery",{query:P}):"",te?s("sharedPage.refreshing"):""]})]}),e.jsx(z,{className:"max-h-[360px] lg:max-h-none lg:flex-1 lg:min-h-0",children:c==="settings"?e.jsx("div",{className:"p-2 space-y-1",children:e.jsxs("button",{type:"button",onClick:()=>u("settings.json"),className:q("w-full text-left p-3 rounded-md border transition-colors",d?.settings?"bg-primary/10 border-primary/30":"bg-background hover:bg-muted border-transparent opacity-50"),disabled:!d?.settings,children:[e.jsx("p",{className:"text-sm font-medium truncate",children:"settings.json"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:s("sharedPage.settingsDescription")}),e.jsx(g,{variant:d?.settings?"default":"secondary",className:"mt-2 text-[10px]",children:d?.settings?s("sharedPage.settingsActive"):s("sharedPage.settingsInactive")})]})}):y?e.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:s("sharedPage.loadingShared",{tab:c})}):k?e.jsx("div",{className:"p-4 text-center",children:e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(Ee,{className:"w-10 h-10 mx-auto text-destructive/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:s("sharedPage.failedLoadShared",{tab:c})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:ge})]}),e.jsxs(L,{size:"sm",variant:"outline",onClick:()=>{re()},children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),s("sharedPage.retry")]})]})}):me?e.jsx("div",{className:"p-4 text-sm text-muted-foreground leading-relaxed",children:oe}):he?e.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:s("sharedPage.noMatch",{tab:c,query:P})}):e.jsx("div",{className:"p-2 space-y-1",children:f.map(i=>e.jsxs("button",{type:"button",onClick:()=>u(i.path),className:q("w-full text-left p-3 rounded-md border transition-colors",p?.path===i.path?"bg-primary/10 border-primary/30":"bg-background hover:bg-muted border-transparent"),children:[e.jsx("p",{className:"text-sm font-medium truncate",children:i.name}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:i.description}),e.jsx("p",{className:"text-[11px] text-muted-foreground/90 mt-2 font-mono truncate",children:se(i.path)})]},`${i.type}:${i.path}`))})})]}),e.jsx("div",{className:"min-w-0 min-h-[360px] flex flex-col bg-muted/20 lg:min-h-0",children:!p&&c!=="settings"?e.jsx("div",{className:"min-h-[320px] flex items-center justify-center p-6 text-center text-muted-foreground",children:s("sharedPage.selectOne",{tab:c.slice(0,-1)})}):c==="settings"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-4 py-3 border-b bg-background",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-base font-semibold truncate",children:"settings.json"}),e.jsx(g,{variant:"outline",className:"uppercase text-[10px]",children:s("sharedPage.settings")})]})}),e.jsxs("div",{className:"p-4 space-y-4 min-h-0 flex-1 flex flex-col",children:[e.jsx("div",{className:"rounded-md border bg-muted/35 p-3",children:e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(E,{label:s("sharedPage.settingsTitle"),value:s("sharedPage.settingsDescription")}),j?.contentPath?e.jsx(E,{label:s("sharedPage.resolvedSource"),value:j.contentPath,mono:!0}):null]})}),e.jsx(X,{className:"min-h-0 flex-1",children:e.jsx(Y,{className:"p-0 h-full",children:e.jsx(z,{className:"h-full px-5 py-4",children:d?.settings?Q?e.jsx("p",{className:"text-sm text-muted-foreground",children:s("sharedPage.loadingSettings")}):W?e.jsxs(C,{variant:"destructive",className:"max-w-2xl",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsx($,{children:s("sharedPage.failedLoadContent")}),e.jsxs(S,{children:[e.jsx("p",{children:J}),e.jsx("div",{className:"mt-3",children:e.jsxs(L,{size:"sm",variant:"outline",onClick:()=>{H()},children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),s("sharedPage.retryContent")]})})]})]}):e.jsx(ye,{value:j?.content??"",onChange:()=>{},language:"json",readonly:!0,minHeight:"320px"}):e.jsxs("div",{className:"min-h-[260px] flex flex-col items-center justify-center text-center",children:[e.jsx(ee,{className:"w-12 h-12 text-muted-foreground/40 mb-4"}),e.jsx("h3",{className:"text-lg font-semibold",children:s("sharedPage.settingsTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mt-2",children:s("sharedPage.settingsDescription")}),e.jsx("div",{className:"mt-6 p-3 rounded-md bg-muted/50 border font-mono text-xs",children:s("sharedPage.settingsInactive")})]})})})})]})]}):p?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-4 py-3 border-b bg-background",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-base font-semibold truncate",children:p.name}),e.jsx(g,{variant:"outline",className:"uppercase text-[10px]",children:p.type})]})}),e.jsxs("div",{className:"p-4 space-y-4 min-h-0 flex-1 flex flex-col",children:[e.jsx("div",{className:"rounded-md border bg-muted/35 p-3",children:e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(E,{label:s("sharedPage.pathLabel"),value:se(p.path),mono:!0}),j?.contentPath&&j.contentPath!==p.path&&e.jsx(E,{label:s("sharedPage.resolvedSource"),value:j.contentPath,mono:!0})]})}),e.jsx(X,{className:"min-h-0 flex-1",children:e.jsx(Y,{className:"p-0 h-full",children:e.jsx(z,{className:"h-full px-5 py-4",children:Q?e.jsx("p",{className:"text-sm text-muted-foreground",children:s("sharedPage.loadingMarkdown")}):W?e.jsxs(C,{variant:"destructive",className:"max-w-2xl",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsx($,{children:s("sharedPage.failedLoadContent")}),e.jsxs(S,{children:[e.jsx("p",{children:J}),e.jsx("div",{className:"mt-3",children:e.jsxs(L,{size:"sm",variant:"outline",onClick:()=>{H()},children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),s("sharedPage.retryContent")]})})]})]}):e.jsx(Fe,{content:j?.content??""})})})})]})]}):null})]})})})]})}function Te(s){return s.commands>0?"commands":s.skills>0?"skills":s.agents>0?"agents":s.plugins>0?"plugins":s.settings?"settings":"commands"}function Ae({sharedCount:s,profileLocalCount:o,profileLocalNames:r}){const{t}=O(),n=r.slice(0,4),l=Math.max(r.length-n.length,0);return e.jsx("div",{className:"rounded-md border bg-muted/25 px-4 py-3",children:e.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold",children:t("sharedPage.resourcePolicies")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t("sharedPage.resourcePoliciesDescription")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(g,{variant:"outline",className:"border-emerald-300/60 bg-emerald-50/50 text-emerald-700 dark:border-emerald-900/40 dark:bg-emerald-900/20 dark:text-emerald-300",children:t("sharedPage.sharedAccounts",{count:s})}),e.jsx(g,{variant:"secondary",children:t("sharedPage.profileLocalAccounts",{count:o})}),n.map(a=>e.jsx(g,{variant:"outline",className:"font-mono text-[10px]",children:a},a)),l>0?e.jsx(g,{variant:"outline",className:"text-[10px]",children:t("sharedPage.moreProfileLocalAccounts",{count:l})}):null]})]})})}function U({label:s,value:o}){return e.jsxs("div",{className:"rounded-md border bg-muted/30 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:s}),e.jsx("p",{className:"text-lg font-semibold leading-tight mt-1",children:o})]})}function E({label:s,value:o,mono:r=!1}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:s}),e.jsx("p",{className:q("text-xs mt-1 break-words",r?"font-mono":"text-sm"),children:o})]})}function V(s,o){if(!(s instanceof Error))return o;const r=s.message.toLowerCase();return r.includes("failed to fetch")||r.includes("network")?"Connection to dashboard server lost or restarting. Keep `ccs config` running, then retry.":s.message||o}function se(s){return s.startsWith("plugin-registry:")?"installed_plugins.json":s}function Fe({content:s}){const{t:o}=O(),r=b.useMemo(()=>Be(s),[s]);return r.blocks.length===0&&r.frontmatter.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:o("sharedPage.noMarkdown")}):e.jsxs("div",{className:"space-y-5",children:[r.frontmatter.length>0?e.jsx("div",{className:"rounded-md border bg-muted/35 p-3",children:e.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:r.frontmatter.map(t=>e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:De(t.key)}),e.jsx("p",{className:"text-xs mt-1 break-words",children:t.value})]},`${t.key}:${t.value}`))})}):null,r.blocks.map((t,n)=>{if(t.type==="heading"){const l=t.level<=1?"text-xl font-semibold":t.level===2?"text-lg font-semibold":"text-base font-semibold";return e.jsx("h3",{className:l,children:T(t.text,`heading-${n}`)},`heading-${n}`)}return t.type==="paragraph"?e.jsx("p",{className:"text-sm leading-6 whitespace-pre-wrap",children:T(t.text,`paragraph-${n}`)},`paragraph-${n}`):t.type==="unordered-list"?e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm leading-6",children:t.items.map((l,a)=>e.jsx("li",{children:T(l,`ul-item-${n}-${a}`)},`ul-item-${n}-${a}`))},`ul-${n}`):t.type==="ordered-list"?e.jsx("ol",{className:"list-decimal pl-5 space-y-1 text-sm leading-6",children:t.items.map((l,a)=>e.jsx("li",{children:T(l,`ol-item-${n}-${a}`)},`ol-item-${n}-${a}`))},`ol-${n}`):e.jsxs("div",{className:"rounded-md border bg-muted/60 p-3 font-mono text-xs leading-5 overflow-x-auto",children:[t.language&&e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground mb-2",children:t.language}),e.jsx("pre",{className:"whitespace-pre-wrap break-words m-0",children:t.content})]},`code-${n}`)})]})}function De(s){return s.replace(/[-_]/g," ")}function T(s,o){const r=/(\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*|\[([^\]]+)\]\(([^)]+)\))/g,t=[];let n=0,l=0;for(const a of s.matchAll(r)){const m=a[0],h=a.index??0;if(h>n&&t.push(s.slice(n,h)),a[2])t.push(e.jsx("strong",{className:"font-semibold",children:a[2]},`${o}-strong-${l}`));else if(a[3])t.push(e.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[0.82em]",children:a[3]},`${o}-code-${l}`));else if(a[4])t.push(e.jsx("em",{className:"italic",children:a[4]},`${o}-em-${l}`));else if(a[5]&&a[6]){const u=a[6].trim();/^(https?:\/\/|mailto:)/i.test(u)?t.push(e.jsx("a",{href:u,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2 hover:opacity-90",children:a[5]},`${o}-link-${l}`)):t.push(a[5])}else t.push(m);n=h+m.length,l+=1}return n<s.length&&t.push(s.slice(n)),t.length===0?[s]:t}function Be(s){const o=s.replace(/\r\n/g,`
|
|
2
|
+
`).trim();if(!o)return{blocks:[],frontmatter:[]};let r=o;const t=[];if(r.startsWith(`---
|
|
3
|
+
`)){const n=r.indexOf(`
|
|
4
|
+
---
|
|
5
|
+
`,4);if(n!==-1){const l=r.slice(4,n).trim();for(const a of l.split(`
|
|
6
|
+
`)){const m=a.match(/^([A-Za-z0-9_-]+)\s*:\s*(.+)$/);m&&t.push({key:m[1],value:m[2].trim().replace(/^['"]|['"]$/g,"")})}r=r.slice(n+5).trim()}}return{blocks:Re(r),frontmatter:t}}function Re(s){if(!s.trim())return[];const o=s.split(`
|
|
7
|
+
`),r=[];let t=[],n=[],l=[],a="",m=null;const h=()=>{t.length!==0&&(r.push({type:"paragraph",text:t.join(" ")}),t=[])},u=()=>{n.length!==0&&(r.push({type:"unordered-list",items:n}),n=[])},d=()=>{l.length!==0&&(r.push({type:"ordered-list",items:l}),l=[])},w=()=>{m&&(r.push({type:"code",language:a,content:m.join(`
|
|
8
|
+
`)}),a="",m=null)};for(const x of o){if(m){x.trim().startsWith("```")?w():m.push(x);continue}if(x.trim().startsWith("```")){h(),u(),d(),a=x.trim().replace(/^```/,"").trim(),m=[];continue}if(x.trim().length===0){h(),u(),d();continue}const v=x.match(/^(#{1,6})\s+(.*)$/);if(v){h(),u(),d(),r.push({type:"heading",level:v[1].length,text:v[2].trim()});continue}const N=x.match(/^\s*[-*]\s+(.*)$/);if(N){h(),d(),n.push(N[1].trim());continue}const c=x.match(/^\s*\d+\.\s+(.*)$/);if(c){h(),u(),l.push(c[1].trim());continue}u(),d(),t.push(x.trim())}return h(),u(),d(),w(),r}export{Ze as SharedPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as l}from"./index-
|
|
1
|
+
import{j as t}from"./radix-ui-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as l}from"./index-CcGVqYOy.js";function n({className:a,...e}){return t.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:t.jsx("table",{"data-slot":"table",className:l("w-full caption-bottom text-sm",a),...e})})}function c({className:a,...e}){return t.jsx("thead",{"data-slot":"table-header",className:l("[&_tr]:border-b",a),...e})}function d({className:a,...e}){return t.jsx("tbody",{"data-slot":"table-body",className:l("[&_tr:last-child]:border-0",a),...e})}function b({className:a,...e}){return t.jsx("tr",{"data-slot":"table-row",className:l("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...e})}function i({className:a,...e}){return t.jsx("th",{"data-slot":"table-head",className:l("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}function m({className:a,...e}){return t.jsx("td",{"data-slot":"table-cell",className:l("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e})}export{n as T,c as a,b,i as c,d,m as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-nu4wz29m.js";import{L,r as c}from"./react-vendor-Bjx91N7w.js";import{a as x,B as P,c as S,X as M,e as u,y as U,C,p as v,q as N,$ as w,b as j,t as b,I as B}from"./index-CcGVqYOy.js";import{a1 as F,$ as z,ba as W,x as H,E as Q,Q as G,aa as q,C as K,bb as J,av as V}from"./icons-DzKUh8vG.js";import"./tanstack-bhJxV1h8.js";import"./notifications-B4_o8bcr.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./charts-eIPy2oG6.js";const Y={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function Z({status:t,className:s}){const{t:r}=x(),i={new:r("updates.statusNew"),stable:r("updates.statusStable"),planned:r("updates.statusPlanned")};return e.jsx(P,{variant:"outline",className:S("font-medium",Y[t],s),children:i[t]})}const g={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},X=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for native Codex with the cliproxy provider shortcut.","Use ccs codex --target codex when you want the explicit CCS-managed Codex bridge.","Codex remains runtime-only for saved defaults; use runtime aliases or --target codex at launch time."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run native Codex with cliproxy",description:"Use the native Codex cliproxy shortcut through CCS.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run the managed Codex bridge explicitly",description:"Use the explicit CCS-managed Codex bridge on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open Updates Center when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Center",path:"/updates"}],commands:["ccs config"]}],ee=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Codex is still runtime-only for saved defaults; use --target codex or the runtime aliases at launch time."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want native Codex with the cliproxy shortcut; use ccs codex --target codex for the explicit managed bridge."},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}];function l(t,s,r){return M.t(t,{defaultValue:s,...r})}function te(){return{target:l("supportCatalog.scope.target",g.target),cliproxy:l("supportCatalog.scope.cliproxy",g.cliproxy),"api-profiles":l("supportCatalog.scope.apiProfiles",g["api-profiles"]),websearch:l("supportCatalog.scope.websearch",g.websearch)}}function se(t){return{...t,title:l(`supportCatalog.notice.${t.id}.title`,t.title),summary:l(`supportCatalog.notice.${t.id}.summary`,t.summary),primaryAction:l(`supportCatalog.notice.${t.id}.primaryAction`,t.primaryAction),highlights:t.highlights.map((s,r)=>l(`supportCatalog.notice.${t.id}.highlight.${r}`,s)),actions:t.actions.map(s=>({...s,label:l(`supportCatalog.notice.${t.id}.action.${s.id}.label`,s.label),description:l(`supportCatalog.notice.${t.id}.action.${s.id}.description`,s.description)})),routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.notice.${t.id}.route.${r}.label`,s.label)}))}}function re(t){return{...t,name:l(`supportCatalog.entry.${t.id}.name`,t.name),summary:l(`supportCatalog.entry.${t.id}.summary`,t.summary),pillars:{baseUrl:l(`supportCatalog.entry.${t.id}.pillar.baseUrl`,t.pillars.baseUrl),auth:l(`supportCatalog.entry.${t.id}.pillar.auth`,t.pillars.auth),model:l(`supportCatalog.entry.${t.id}.pillar.model`,t.pillars.model)},routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.entry.${t.id}.route.${r}.label`,s.label)})),notes:t.notes?l(`supportCatalog.entry.${t.id}.notes`,t.notes):t.notes}}function ae(){return X.map(se)}function oe(){return ee.map(re)}function ie(t){const s=new Map(oe().map(r=>[r.id,r]));return t.entryIds.map(r=>s.get(r)).filter(r=>!!r)}function O(t){const s=new Date(`${t}T00:00:00Z`);return Number.isNaN(s.getTime())?t:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(s)}const $="ccs:updates:notice-progress:v1";function de(t){return t==="new"?"new":"seen"}function m(t,s){return s[t.id]??de(t.status)}function A(t){return t!=="done"&&t!=="dismissed"}function le(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem($);if(!t)return{};const s=JSON.parse(t);if(!s||typeof s!="object"||Array.isArray(s))return{};const r={};for(const[i,d]of Object.entries(s))typeof i=="string"&&(d==="new"||d==="seen"||d==="done"||d==="dismissed")&&(r[i]=d);return r}catch{return{}}}function ne(t){typeof window>"u"||window.localStorage.setItem($,JSON.stringify(t))}function D({state:t,className:s}){const{t:r}=x(),i={new:{label:r("updates.progressNeedsAction"),className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:r("updates.progressInReview"),className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:r("updates.progressDone"),className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:r("updates.progressDismissed"),className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}}[t];return e.jsxs(P,{variant:"outline",className:S("gap-1.5 border text-[10px] font-medium",i.className,s),children:[i.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),i.label]})}function ce({action:t}){const{t:s}=x();return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.description})]}),t.type==="route"&&t.path&&e.jsx(u,{size:"sm",asChild:!0,children:e.jsxs(L,{to:t.path,children:[s("updates.open"),e.jsx(F,{className:"h-3.5 w-3.5"})]})})]}),t.type==="command"&&t.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(z,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:t.command}),e.jsx(U,{value:t.command})]})]})}function pe({notice:t,progress:s,relatedEntries:r,onUpdateProgress:i}){const{t:d}=x(),f=te();return t?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{state:s}),e.jsx(Z,{status:t.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(W,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:d("updates.published",{date:O(t.publishedAt)})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(u,{size:"sm",onClick:()=>i("done"),children:[e.jsx(H,{className:"h-4 w-4"}),d("updates.markDone")]}),e.jsxs(u,{size:"sm",variant:"outline",onClick:()=>i("dismissed"),children:[e.jsx(Q,{className:"h-4 w-4"}),d("updates.dismiss")]}),e.jsxs(u,{size:"sm",variant:"ghost",onClick:()=>i("new"),children:[e.jsx(G,{className:"h-4 w-4"}),d("updates.reopen")]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(C,{className:"h-full overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{className:"h-4 w-4 text-primary"}),e.jsx(N,{className:"text-base",children:d("updates.doNext")})]}),e.jsx(w,{children:t.primaryAction})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:t.actions.map(o=>e.jsx(ce,{action:o},`${t.id}-${o.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.impactedIntegrations")}),e.jsx(w,{children:d("updates.impactedDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:r.map(o=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:o.name}),e.jsx(P,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:f[o.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o.routes[0]&&e.jsx(u,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(L,{to:o.routes[0].path,children:o.routes[0].label})}),o.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:o.commands[0]}),e.jsx(U,{value:o.commands[0]})]})]})]},o.id))})})})]}),e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.whyMatters")}),e.jsx(w,{children:d("updates.whyMattersDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:t.highlights.map(o=>e.jsxs("li",{children:["- ",o]},`${t.id}-${o}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:d("updates.noUpdates")})})}function me({notice:t,progress:s,selected:r,onSelect:i}){return e.jsxs("button",{type:"button",onClick:i,className:S("w-full rounded-lg border px-3 py-3 text-left transition-colors",r?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.primaryAction})]}),e.jsx(K,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:O(t.publishedAt)}),e.jsx(D,{state:s})]})]})}function ue(t,s){return s?[t.title,t.summary,t.primaryAction,...t.highlights,...t.commands,...t.actions.map(i=>`${i.label} ${i.description} ${i.command||""}`),...t.routes.map(i=>i.label)].join(" ").toLowerCase().includes(s):!0}function je(){const{t}=x(),s=[...ae()].sort((a,n)=>n.publishedAt.localeCompare(a.publishedAt)),[r,i]=c.useState("inbox"),[d,f]=c.useState(""),[o,k]=c.useState(()=>le()),[I,E]=c.useState(null);c.useEffect(()=>{ne(o)},[o]);const h=c.useMemo(()=>{const a=d.trim().toLowerCase();return s.filter(n=>{const y=m(n,o);return ue(n,a)?r==="done"?y==="done":r==="inbox"?A(y):!0:!1})},[s,o,d,r]),p=c.useMemo(()=>{const a=r==="all"?s:h;return a.find(n=>n.id===I)??a[0]??null},[s,I,r,h]),R=a=>{E(a.id),k(n=>m(a,n)!=="new"?n:{...n,[a.id]:"seen"})},T=c.useMemo(()=>s.filter(a=>A(m(a,o))).length,[s,o]),_=c.useMemo(()=>s.filter(a=>m(a,o)==="done").length,[s,o]);return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:t("updates.inboxTitle")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("updates.inboxSubtitle")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.needsAction")}),e.jsx("p",{className:"text-base font-semibold",children:T})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.doneCount")}),e.jsx("p",{className:"text-base font-semibold",children:_})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(B,{value:d,onChange:a=>f(a.target.value),placeholder:t("updates.searchPlaceholder"),className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[{id:"inbox",label:t("updates.actionRequired")},{id:"done",label:t("updates.done")},{id:"all",label:t("updates.all")}].map(a=>e.jsx(u,{size:"sm",variant:r===a.id?"default":"outline",onClick:()=>i(a.id),children:a.label},a.id))})]}),e.jsx(b,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:h.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:t("updates.noNotices")}):h.map(a=>e.jsx(me,{notice:a,progress:m(a,o),selected:p?.id===a.id,onSelect:()=>R(a)},a.id))})})]}),e.jsx(pe,{notice:p,progress:p?m(p,o):null,relatedEntries:p?ie(p):[],onUpdateProgress:a=>{p&&k(n=>({...n,[p.id]:a}))}})]})}export{je as UpdatesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as _,a as m,b as p}from"./tanstack-bhJxV1h8.js";import{a as y,
|
|
1
|
+
import{u as _,a as m,b as p}from"./tanstack-bhJxV1h8.js";import{a as y,Z as l}from"./index-CcGVqYOy.js";import{t as s}from"./notifications-B4_o8bcr.js";function f(n){return Array.from(n).sort((r,e)=>r.localeCompare(e))}function x(n){const r=new Map;for(const t of n){if(t.context_mode!=="shared")continue;const d=t.context_group||"default",i=r.get(d)??{group:d,sharedCount:0,deeperCount:0,accountNames:[]};i.sharedCount+=1,i.accountNames.push(t.name),t.continuity_mode==="deeper"&&(i.deeperCount+=1),r.set(d,i)}const e=Array.from(r.values()).sort((t,d)=>t.group.localeCompare(d.group)),o=n.map(t=>{if(t.context_mode!=="shared")return{...t,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const d=t.context_group||"default",i=r.get(d),h=Math.max((i?.sharedCount??1)-1,0),g=Math.max((i?.deeperCount??0)-(t.continuity_mode==="deeper"?1:0),0);return{...t,sameGroupPeerCount:h,sameGroupDeeperPeerCount:g}}),u=o.filter(t=>t.context_mode==="shared").length,a=o.filter(t=>t.context_mode==="shared"&&t.continuity_mode==="deeper").length,c=o.filter(t=>t.context_inferred).length,C=o.filter(t=>t.context_mode==="shared"&&t.continuity_mode!=="deeper"&&t.continuity_inferred).length;return{accounts:o,sharedCount:u,sharedStandardCount:Math.max(u-a,0),deeperSharedCount:a,isolatedCount:o.length-u,legacyContextCount:c,legacyContinuityCount:C,sharedAloneCount:o.filter(t=>t.context_mode==="shared"&&t.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(t=>t.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(t=>t.continuity_mode==="deeper"&&t.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:f(e.filter(t=>t.sharedCount>=2).map(t=>t.group)),deeperReadyGroups:f(e.filter(t=>t.deeperCount>=2).map(t=>t.group)),sharedGroups:f(e.map(t=>t.group)),groupSummaries:e}}function G(){return _({queryKey:["accounts"],queryFn:()=>l.accounts.list(),select:n=>{const r=n.accounts.filter(a=>a.type!=="cliproxy"),e=x(r),o=n.accounts.length-r.length,u=e.accounts.some(a=>a.name===n.default)?n.default:null;return{accounts:e.accounts,default:u,cliproxyCount:o,legacyContextCount:e.legacyContextCount,legacyContinuityCount:e.legacyContinuityCount,sharedCount:e.sharedCount,sharedStandardCount:e.sharedStandardCount,deeperSharedCount:e.deeperSharedCount,isolatedCount:e.isolatedCount,sharedAloneCount:e.sharedAloneCount,sharedPeerAccountCount:e.sharedPeerAccountCount,deeperReadyAccountCount:e.deeperReadyAccountCount,sharedPeerGroups:e.sharedPeerGroups,deeperReadyGroups:e.deeperReadyGroups,sharedGroups:e.sharedGroups,groupSummaries:e.groupSummaries,plainCcsLane:n.plain_ccs_lane??null}}})}function q(){const n=m(),{t:r}=y();return p({mutationFn:e=>l.accounts.setDefault(e),onSuccess:(e,o)=>{n.invalidateQueries({queryKey:["accounts"]}),s.success(r("toasts.defaultAccountSet",{name:o}))},onError:e=>{s.error(e.message)}})}function D(){const n=m(),{t:r}=y();return p({mutationFn:()=>l.accounts.resetDefault(),onSuccess:()=>{n.invalidateQueries({queryKey:["accounts"]}),s.success(r("toasts.defaultAccountReset"))},onError:e=>{s.error(e.message)}})}function R(){const n=m(),{t:r}=y();return p({mutationFn:e=>l.accounts.delete(e),onSuccess:(e,o)=>{n.invalidateQueries({queryKey:["accounts"]}),s.success(r("toasts.accountDeleted",{name:o}))},onError:e=>{s.error(e.message)}})}function Q(){const n=m(),{t:r}=y();return p({mutationFn:({name:e,context_mode:o,context_group:u,continuity_mode:a})=>l.accounts.updateContext(e,{context_mode:o,context_group:u,continuity_mode:a}),onSuccess:(e,o)=>{n.invalidateQueries({queryKey:["accounts"]});const u=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),a=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${r("accountsPage.sharedDeeper")} (${u})`:`${r("accountsPage.sharedStandard")} (${u})`:r("accountsPage.isolated");s.success(r("toasts.contextUpdated",{name:o.name,summary:a}))},onError:e=>{s.error(e.message)}})}function F(){const n=m(),{t:r}=y();return p({mutationFn:async e=>{const o=e.filter(c=>c.context_inferred||c.continuity_inferred),a=(await Promise.allSettled(o.map(c=>{const C=c.context_mode==="shared";return l.accounts.updateContext(c.name,{context_mode:C?"shared":"isolated",context_group:C?c.context_group||"default":void 0,continuity_mode:C?c.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(c=>c.status==="rejected").length;return{updatedCount:o.length-a,failedCount:a}},onSuccess:({updatedCount:e,failedCount:o})=>{if(n.invalidateQueries({queryKey:["accounts"]}),o>0&&e>0){s.error(r("toasts.legacyConfirmPartial",{updated:e,failed:o}));return}if(o>0){s.error(r("toasts.legacyConfirmAllFailed",{failed:o}));return}if(e>0){s.success(r("toasts.legacyConfirmSuccess",{count:e}));return}s.info(r("toasts.noLegacyAccounts"))},onError:e=>{n.invalidateQueries({queryKey:["accounts"]}),s.error(e.message)}})}function K(){const n=m(),{t:r}=y();return p({mutationFn:({name:e,shared_resource_mode:o})=>l.accounts.updateSharedResources(e,{shared_resource_mode:o}),onSuccess:(e,o)=>{n.invalidateQueries({queryKey:["accounts"]});const u=o.shared_resource_mode==="shared"?r("accountsPage.resourcesShared"):r("accountsPage.resourcesProfileLocal");s.success(r("toasts.resourcesUpdated",{name:o.name,summary:u}))},onError:e=>{s.error(e.message)}})}export{Q as a,K as b,q as c,R as d,D as e,F as f,G as u};
|
package/dist/ui/index.html
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
|
|
25
25
|
rel="stylesheet"
|
|
26
26
|
/>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-CcGVqYOy.js"></script>
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-Bjx91N7w.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/radix-ui-nu4wz29m.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/tanstack-bhJxV1h8.js">
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/icons-DzKUh8vG.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/utils-CzKF5WmX.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/form-utils-CuHzLhJZ.js">
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
36
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/charts-eIPy2oG6.js">
|
|
36
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BMoGhs28.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
|
39
39
|
<div id="root"></div>
|
|
@@ -25,15 +25,24 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Heuristic:
|
|
27
27
|
* 1. Walk args until the `--` terminator or end.
|
|
28
|
-
* 2.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* 2. If `--print` is present before the first positional token, treat as
|
|
29
|
+
* prompt/headless session mode (never a subcommand launch).
|
|
30
|
+
* 3. Skip known value-taking flags together with their next token.
|
|
31
|
+
* 4. Skip unknown `--flag=value` forms and bare `--flag` / `-x` tokens.
|
|
32
|
+
* 5. The first remaining positional token is the candidate.
|
|
31
33
|
* 5. Match against CLAUDE_SUBCOMMANDS.
|
|
32
34
|
*
|
|
33
35
|
* Anything after the candidate is irrelevant — once a subcommand is in play,
|
|
34
36
|
* the rest of the line belongs to that subcommand.
|
|
35
37
|
*/
|
|
36
38
|
export declare function isClaudeSubcommandInvocation(args: readonly string[]): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the Claude subcommand name when `args` look like a subcommand
|
|
41
|
+
* invocation, otherwise null. Uses the same scan as
|
|
42
|
+
* `isClaudeSubcommandInvocation` so callers can branch on the specific
|
|
43
|
+
* subcommand (e.g. `agents` allows flags that other subcommands reject).
|
|
44
|
+
*/
|
|
45
|
+
export declare function getClaudeSubcommandName(args: readonly string[]): string | null;
|
|
37
46
|
export declare function stripClaudeSubcommandSessionArgs(args: readonly string[]): string[];
|
|
38
47
|
export declare function stripClaudeCodeFeatureBlockingEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
39
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-subcommand-detector.d.ts","sourceRoot":"","sources":["../../src/utils/claude-subcommand-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;
|
|
1
|
+
{"version":3,"file":"claude-subcommand-detector.d.ts","sourceRoot":"","sources":["../../src/utils/claude-subcommand-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAiGH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAuB9E;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CA2ClF;AAQD,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAa3F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAEpF"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* Claude subcommand.
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.stripSubcommandBlockingEnv = exports.stripClaudeCodeFeatureBlockingEnv = exports.stripClaudeSubcommandSessionArgs = exports.isClaudeSubcommandInvocation = void 0;
|
|
23
|
+
exports.stripSubcommandBlockingEnv = exports.stripClaudeCodeFeatureBlockingEnv = exports.stripClaudeSubcommandSessionArgs = exports.getClaudeSubcommandName = exports.isClaudeSubcommandInvocation = void 0;
|
|
24
24
|
/**
|
|
25
25
|
* Known Claude CLI subcommands. Sourced from `claude --help` (v2.1.139).
|
|
26
26
|
* Keep in sync with upstream — additions are safe (over-skipping injection
|
|
@@ -36,6 +36,7 @@ const CLAUDE_SUBCOMMANDS = new Set([
|
|
|
36
36
|
'plugin',
|
|
37
37
|
'plugins',
|
|
38
38
|
'project',
|
|
39
|
+
'remote-control',
|
|
39
40
|
'setup-token',
|
|
40
41
|
'ultrareview',
|
|
41
42
|
'update',
|
|
@@ -92,24 +93,56 @@ const SUBCOMMAND_SESSION_ONLY_VALUE_FLAGS = new Set([
|
|
|
92
93
|
'--permission-mode',
|
|
93
94
|
'--teammate-mode',
|
|
94
95
|
]);
|
|
96
|
+
/**
|
|
97
|
+
* Flags that look session-only but are actually accepted by specific Claude
|
|
98
|
+
* subcommands. Keep these intact instead of stripping. Sourced from
|
|
99
|
+
* `claude <sub> --help` (v2.1.139); add new entries when upstream extends a
|
|
100
|
+
* subcommand parser.
|
|
101
|
+
*
|
|
102
|
+
* - `agents` accepts `--permission-mode`, `--dangerously-skip-permissions`,
|
|
103
|
+
* and `--allow-dangerously-skip-permissions` as defaults for dispatched
|
|
104
|
+
* sessions (see `claude agents --help`). Stripping these breaks
|
|
105
|
+
* `ccs <profile> agents --permission-mode bypassPermissions`.
|
|
106
|
+
*/
|
|
107
|
+
const SUBCOMMAND_ALLOWED_SESSION_FLAGS = {
|
|
108
|
+
agents: new Set([
|
|
109
|
+
'--allow-dangerously-skip-permissions',
|
|
110
|
+
'--dangerously-skip-permissions',
|
|
111
|
+
'--permission-mode',
|
|
112
|
+
]),
|
|
113
|
+
};
|
|
95
114
|
/**
|
|
96
115
|
* Returns true when `args` look like a Claude subcommand invocation.
|
|
97
116
|
*
|
|
98
117
|
* Heuristic:
|
|
99
118
|
* 1. Walk args until the `--` terminator or end.
|
|
100
|
-
* 2.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
119
|
+
* 2. If `--print` is present before the first positional token, treat as
|
|
120
|
+
* prompt/headless session mode (never a subcommand launch).
|
|
121
|
+
* 3. Skip known value-taking flags together with their next token.
|
|
122
|
+
* 4. Skip unknown `--flag=value` forms and bare `--flag` / `-x` tokens.
|
|
123
|
+
* 5. The first remaining positional token is the candidate.
|
|
103
124
|
* 5. Match against CLAUDE_SUBCOMMANDS.
|
|
104
125
|
*
|
|
105
126
|
* Anything after the candidate is irrelevant — once a subcommand is in play,
|
|
106
127
|
* the rest of the line belongs to that subcommand.
|
|
107
128
|
*/
|
|
108
129
|
function isClaudeSubcommandInvocation(args) {
|
|
130
|
+
return getClaudeSubcommandName(args) !== null;
|
|
131
|
+
}
|
|
132
|
+
exports.isClaudeSubcommandInvocation = isClaudeSubcommandInvocation;
|
|
133
|
+
/**
|
|
134
|
+
* Returns the Claude subcommand name when `args` look like a subcommand
|
|
135
|
+
* invocation, otherwise null. Uses the same scan as
|
|
136
|
+
* `isClaudeSubcommandInvocation` so callers can branch on the specific
|
|
137
|
+
* subcommand (e.g. `agents` allows flags that other subcommands reject).
|
|
138
|
+
*/
|
|
139
|
+
function getClaudeSubcommandName(args) {
|
|
109
140
|
for (let i = 0; i < args.length; i += 1) {
|
|
110
141
|
const arg = args[i];
|
|
111
142
|
if (arg === '--')
|
|
112
|
-
return
|
|
143
|
+
return null;
|
|
144
|
+
if (arg === '--print')
|
|
145
|
+
return null;
|
|
113
146
|
if (arg.startsWith('-')) {
|
|
114
147
|
if (VALUE_TAKING_FLAGS.has(arg)) {
|
|
115
148
|
// Skip the next token as the flag's value (when present and not another flag).
|
|
@@ -121,25 +154,39 @@ function isClaudeSubcommandInvocation(args) {
|
|
|
121
154
|
// `--flag=value`, bare boolean flags, and unknown short/long flags fall through.
|
|
122
155
|
continue;
|
|
123
156
|
}
|
|
124
|
-
return CLAUDE_SUBCOMMANDS.has(arg);
|
|
157
|
+
return CLAUDE_SUBCOMMANDS.has(arg) ? arg : null;
|
|
125
158
|
}
|
|
126
|
-
return
|
|
159
|
+
return null;
|
|
127
160
|
}
|
|
128
|
-
exports.
|
|
161
|
+
exports.getClaudeSubcommandName = getClaudeSubcommandName;
|
|
129
162
|
function stripClaudeSubcommandSessionArgs(args) {
|
|
130
|
-
|
|
163
|
+
const subcommand = getClaudeSubcommandName(args);
|
|
164
|
+
if (subcommand === null) {
|
|
131
165
|
return [...args];
|
|
132
166
|
}
|
|
167
|
+
const allowed = SUBCOMMAND_ALLOWED_SESSION_FLAGS[subcommand];
|
|
168
|
+
const isAllowed = (flag) => allowed?.has(flag) === true;
|
|
133
169
|
const out = [];
|
|
134
170
|
for (let i = 0; i < args.length; i += 1) {
|
|
135
171
|
const arg = args[i];
|
|
136
|
-
if (SUBCOMMAND_SESSION_ONLY_FLAGS.has(arg)) {
|
|
172
|
+
if (SUBCOMMAND_SESSION_ONLY_FLAGS.has(arg) && !isAllowed(arg)) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (arg.startsWith('--permission-mode=')) {
|
|
176
|
+
if (isAllowed('--permission-mode')) {
|
|
177
|
+
out.push(arg);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
137
180
|
continue;
|
|
138
181
|
}
|
|
139
|
-
if (arg.startsWith('--
|
|
182
|
+
if (arg.startsWith('--teammate-mode=')) {
|
|
183
|
+
if (isAllowed('--teammate-mode')) {
|
|
184
|
+
out.push(arg);
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
140
187
|
continue;
|
|
141
188
|
}
|
|
142
|
-
if (SUBCOMMAND_SESSION_ONLY_VALUE_FLAGS.has(arg)) {
|
|
189
|
+
if (SUBCOMMAND_SESSION_ONLY_VALUE_FLAGS.has(arg) && !isAllowed(arg)) {
|
|
143
190
|
const next = args[i + 1];
|
|
144
191
|
if (next !== undefined && !next.startsWith('-')) {
|
|
145
192
|
i += 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-subcommand-detector.js","sourceRoot":"","sources":["../../src/utils/claude-subcommand-detector.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAS;IACzC,QAAQ;IACR,MAAM;IACN,WAAW;IACX,QAAQ;IACR,SAAS;IACT,KAAK;IACL,QAAQ;IACR,SAAS;IACT,SAAS;IACT,aAAa;IACb,aAAa;IACb,QAAQ;IACR,SAAS;CACV,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAS;IACzC,WAAW;IACX,SAAS;IACT,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,wBAAwB;IACxB,SAAS;IACT,YAAY;IACZ,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,kBAAkB;IAClB,QAAQ;IACR,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,cAAc;IACd,sCAAsC;IACtC,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAS;IACpD,sCAAsC;IACtC,gCAAgC;CACjC,CAAC,CAAC;AAEH,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAS;IAC1D,mBAAmB;IACnB,iBAAiB;CAClB,CAAC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"claude-subcommand-detector.js","sourceRoot":"","sources":["../../src/utils/claude-subcommand-detector.ts"],"names":[],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AC;AAE7E,SAAgB,iCAAiC,CAAC,GAAsB;IACtE,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,IACE,qCAAqC,CAAC,QAAQ,CAC5C,GAA6D,CAC9D,EACD,CAAC;YACD,SAAS;QACX,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAbD,8EAaC;AAED;;;;GAIG;AACH,SAAgB,0BAA0B,CAAC,GAAsB;IAC/D,OAAO,iCAAiC,CAAC,GAAG,CAAC,CAAC;AAChD,CAAC;AAFD,gEAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-middleware.d.ts","sourceRoot":"","sources":["../../../src/web-server/middleware/auth-middleware.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-middleware.d.ts","sourceRoot":"","sources":["../../../src/web-server/middleware/auth-middleware.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAe/D,OAAO,QAAQ,iBAAiB,CAAC;IAC/B,UAAU,WAAW;QACnB,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;KAClB;CACF;AAkDD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sDAO3B,CAAC;AAEH;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,CACzC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,YAAY,KACf,IAAI,CAeR;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAwBpF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAU1E;AAiCD,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CA6B/E;AAED,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAUhF;AAED,wBAAgB,oCAAoC,CAAC,GAAG,CAAC,EAAE,eAAe,GAAG,GAAG,GAAG,GAAG,CAQrF;AAED,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,KAAK,SAA6E,GACjF,OAAO,CAWT"}
|
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
* Dashboard Authentication Middleware
|
|
4
4
|
* Session-based auth with httpOnly cookies for CCS dashboard.
|
|
5
5
|
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
6
29
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
30
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
31
|
};
|
|
@@ -11,6 +34,7 @@ exports.requireLocalAccessWhenAuthDisabled = exports.getDashboardWebSocketReject
|
|
|
11
34
|
const express_session_1 = __importDefault(require("express-session"));
|
|
12
35
|
const express_rate_limit_1 = __importDefault(require("express-rate-limit"));
|
|
13
36
|
const crypto_1 = __importDefault(require("crypto"));
|
|
37
|
+
const net = __importStar(require("net"));
|
|
14
38
|
const fs_1 = __importDefault(require("fs"));
|
|
15
39
|
const path_1 = __importDefault(require("path"));
|
|
16
40
|
const config_loader_facade_1 = require("../../config/config-loader-facade");
|
|
@@ -134,7 +158,7 @@ function isLoopbackHostname(value) {
|
|
|
134
158
|
.replace(/^\[|\]$/g, '');
|
|
135
159
|
return (normalized === 'localhost' ||
|
|
136
160
|
normalized.endsWith('.localhost') ||
|
|
137
|
-
isLoopbackRemoteAddress(normalized));
|
|
161
|
+
(net.isIP(normalized) !== 0 && isLoopbackRemoteAddress(normalized)));
|
|
138
162
|
}
|
|
139
163
|
function getSingleHeader(value) {
|
|
140
164
|
return Array.isArray(value) ? value[0] : value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-middleware.js","sourceRoot":"","sources":["../../../src/web-server/middleware/auth-middleware.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"auth-middleware.js","sourceRoot":"","s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AE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,uBAAuB,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC;AACf,CAAC;AAfD,gFAeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-resolver.d.ts","sourceRoot":"","sources":["../../../src/web-server/models-dev/pricing-resolver.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"pricing-resolver.d.ts","sourceRoot":"","sources":["../../../src/web-server/models-dev/pricing-resolver.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAwBD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,MAAM,GAAG,SAAS,CAIpB;AA0HD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,6BAAkC,GAC1C,0BAA0B,GAAG,SAAS,CAaxC;AAED,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAYlD"}
|
|
@@ -18,6 +18,9 @@ const PROVIDER_ALIASES = {
|
|
|
18
18
|
function normalizeId(value) {
|
|
19
19
|
return value.trim().toLowerCase();
|
|
20
20
|
}
|
|
21
|
+
function isModelEntry(value) {
|
|
22
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
23
|
+
}
|
|
21
24
|
function normalizeModelsDevProviderId(provider) {
|
|
22
25
|
if (!provider)
|
|
23
26
|
return undefined;
|
|
@@ -66,6 +69,8 @@ function findModel(provider, model) {
|
|
|
66
69
|
return undefined;
|
|
67
70
|
const normalizedEntries = new Map();
|
|
68
71
|
for (const [key, value] of Object.entries(models)) {
|
|
72
|
+
if (!isModelEntry(value))
|
|
73
|
+
continue;
|
|
69
74
|
normalizedEntries.set(normalizeId(key), value);
|
|
70
75
|
if (typeof value.id === 'string')
|
|
71
76
|
normalizedEntries.set(normalizeId(value.id), value);
|
|
@@ -143,6 +148,8 @@ function getKnownModelsDevModels() {
|
|
|
143
148
|
const ids = new Set();
|
|
144
149
|
for (const provider of Object.values(registry)) {
|
|
145
150
|
for (const model of Object.values(provider.models ?? {})) {
|
|
151
|
+
if (!model || typeof model !== 'object')
|
|
152
|
+
continue;
|
|
146
153
|
if (typeof model.id === 'string')
|
|
147
154
|
ids.add(`${provider.id}/${model.id}`);
|
|
148
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-resolver.js","sourceRoot":"","sources":["../../../src/web-server/models-dev/pricing-resolver.ts"],"names":[],"mappings":";;;AAAA,qDAA8D;AAoB9D,MAAM,gB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;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;YACzD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,SAAS;YAClD,IAAI,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ;gBAAE,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAZD,0DAYC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-cache.d.ts","sourceRoot":"","sources":["../../../src/web-server/models-dev/registry-cache.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,EAAyC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGxF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAQhE,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"registry-cache.d.ts","sourceRoot":"","sources":["../../../src/web-server/models-dev/registry-cache.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,EAAyC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGxF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAQhE,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAiDD,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,wBAA6B,GACrC,iBAAiB,GAAG,IAAI,CAc1B;AAED,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,iBAAiB,EAC5B,SAAS,SAAa,GACrB,IAAI,CASN;AAED,wBAAgB,2BAA2B,IAAI,OAAO,CASrD;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA4BnC;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAUnC"}
|
|
@@ -46,10 +46,20 @@ function normalizeRegistryPayload(payload) {
|
|
|
46
46
|
if (!isPlainObject(value))
|
|
47
47
|
continue;
|
|
48
48
|
const id = typeof value.id === 'string' && value.id.trim() ? value.id.trim() : key;
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const modelsPayload = isPlainObject(value.models) ? value.models : undefined;
|
|
50
|
+
if (!modelsPayload)
|
|
51
|
+
continue;
|
|
52
|
+
const models = {};
|
|
53
|
+
for (const [modelKey, modelValue] of Object.entries(modelsPayload)) {
|
|
54
|
+
if (!isPlainObject(modelValue))
|
|
55
|
+
continue;
|
|
56
|
+
const modelId = typeof modelValue.id === 'string' && modelValue.id.trim() ? modelValue.id.trim() : modelKey;
|
|
57
|
+
models[modelKey] = {
|
|
58
|
+
...modelValue,
|
|
59
|
+
id: modelId,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (Object.keys(models).length === 0)
|
|
53
63
|
continue;
|
|
54
64
|
providers[id] = {
|
|
55
65
|
...value,
|