@kaitranntt/ccs 8.1.4 → 8.2.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/config/base-kiro.settings.json +4 -4
- package/config/base-qoder.settings.json +10 -0
- package/dist/channels/official-channels-runtime.js +1 -1
- package/dist/channels/official-channels-runtime.js.map +1 -1
- package/dist/cliproxy/accounts/registry.d.ts.map +1 -1
- package/dist/cliproxy/accounts/registry.js +11 -4
- package/dist/cliproxy/accounts/registry.js.map +1 -1
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js +1 -1
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js.map +1 -1
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js +88 -11
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js.map +1 -1
- package/dist/cliproxy/auth/auth-types.d.ts +2 -0
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
- package/dist/cliproxy/auth/auth-types.js +7 -0
- package/dist/cliproxy/auth/auth-types.js.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +19 -10
- 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 +1 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -1
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js +2 -2
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js.map +1 -1
- package/dist/cliproxy/binary/version-checker.d.ts +4 -2
- package/dist/cliproxy/binary/version-checker.d.ts.map +1 -1
- package/dist/cliproxy/binary/version-checker.js +30 -20
- package/dist/cliproxy/binary/version-checker.js.map +1 -1
- package/dist/cliproxy/executor/arg-parser.d.ts +8 -5
- package/dist/cliproxy/executor/arg-parser.d.ts.map +1 -1
- package/dist/cliproxy/executor/arg-parser.js +21 -10
- package/dist/cliproxy/executor/arg-parser.js.map +1 -1
- package/dist/cliproxy/executor/browser-launch-setup.d.ts +1 -0
- package/dist/cliproxy/executor/browser-launch-setup.d.ts.map +1 -1
- package/dist/cliproxy/executor/browser-launch-setup.js +4 -3
- package/dist/cliproxy/executor/browser-launch-setup.js.map +1 -1
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +15 -6
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/executor/proxy-resolver.d.ts +15 -9
- package/dist/cliproxy/executor/proxy-resolver.d.ts.map +1 -1
- package/dist/cliproxy/executor/proxy-resolver.js +14 -5
- package/dist/cliproxy/executor/proxy-resolver.js.map +1 -1
- package/dist/cliproxy/model-catalog.d.ts.map +1 -1
- package/dist/cliproxy/model-catalog.js +79 -2
- package/dist/cliproxy/model-catalog.js.map +1 -1
- package/dist/cliproxy/provider-capabilities.d.ts.map +1 -1
- package/dist/cliproxy/provider-capabilities.js +12 -0
- package/dist/cliproxy/provider-capabilities.js.map +1 -1
- package/dist/cliproxy/proxy/proxy-config-resolver.d.ts.map +1 -1
- package/dist/cliproxy/proxy/proxy-config-resolver.js +11 -1
- package/dist/cliproxy/proxy/proxy-config-resolver.js.map +1 -1
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts.map +1 -1
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js +160 -8
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js.map +1 -1
- package/dist/cliproxy/proxy/upstream-response-timeout.d.ts +14 -0
- package/dist/cliproxy/proxy/upstream-response-timeout.d.ts.map +1 -0
- package/dist/cliproxy/proxy/upstream-response-timeout.js +72 -0
- package/dist/cliproxy/proxy/upstream-response-timeout.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts +9 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-claude.js +53 -16
- package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts +2 -2
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.js +2 -4
- package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher.js +4 -0
- package/dist/cliproxy/quota/quota-fetcher.js.map +1 -1
- package/dist/cliproxy/quota/quota-label-sanitizer.d.ts +10 -0
- package/dist/cliproxy/quota/quota-label-sanitizer.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-label-sanitizer.js +31 -0
- package/dist/cliproxy/quota/quota-label-sanitizer.js.map +1 -0
- package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-manager.js +32 -1
- package/dist/cliproxy/quota/quota-manager.js.map +1 -1
- package/dist/cliproxy/routing/routing-strategy-http.d.ts.map +1 -1
- package/dist/cliproxy/routing/routing-strategy-http.js +35 -26
- package/dist/cliproxy/routing/routing-strategy-http.js.map +1 -1
- package/dist/cliproxy/services/catalog-cache.d.ts.map +1 -1
- package/dist/cliproxy/services/catalog-cache.js +5 -3
- package/dist/cliproxy/services/catalog-cache.js.map +1 -1
- package/dist/cliproxy/services/stats-fetcher.d.ts +13 -0
- package/dist/cliproxy/services/stats-fetcher.d.ts.map +1 -1
- package/dist/cliproxy/services/stats-fetcher.js +25 -1
- package/dist/cliproxy/services/stats-fetcher.js.map +1 -1
- package/dist/cliproxy/types/provider-types.d.ts +1 -1
- package/dist/cliproxy/types/provider-types.d.ts.map +1 -1
- package/dist/cliproxy/types/provider-types.js +1 -0
- package/dist/cliproxy/types/provider-types.js.map +1 -1
- package/dist/codex-auth/codex-config-symlink.js +21 -4
- package/dist/codex-auth/codex-config-symlink.js.map +1 -1
- package/dist/codex-auth/commands/import-default-command.d.ts +1 -1
- package/dist/codex-auth/commands/import-default-command.d.ts.map +1 -1
- package/dist/codex-auth/commands/import-default-command.js +12 -25
- package/dist/codex-auth/commands/import-default-command.js.map +1 -1
- package/dist/commands/api-command/help.js +1 -1
- package/dist/commands/api-command/help.js.map +1 -1
- package/dist/commands/bar/index.d.ts +8 -0
- package/dist/commands/bar/index.d.ts.map +1 -0
- package/dist/commands/bar/index.js +69 -0
- package/dist/commands/bar/index.js.map +1 -0
- package/dist/commands/bar/install-subcommand.d.ts +50 -0
- package/dist/commands/bar/install-subcommand.d.ts.map +1 -0
- package/dist/commands/bar/install-subcommand.js +383 -0
- package/dist/commands/bar/install-subcommand.js.map +1 -0
- package/dist/commands/bar/launch-subcommand.d.ts +38 -0
- package/dist/commands/bar/launch-subcommand.d.ts.map +1 -0
- package/dist/commands/bar/launch-subcommand.js +144 -0
- package/dist/commands/bar/launch-subcommand.js.map +1 -0
- package/dist/commands/bar/uninstall-subcommand.d.ts +13 -0
- package/dist/commands/bar/uninstall-subcommand.d.ts.map +1 -0
- package/dist/commands/bar/uninstall-subcommand.js +78 -0
- package/dist/commands/bar/uninstall-subcommand.js.map +1 -0
- package/dist/commands/bar/version-subcommand.d.ts +8 -0
- package/dist/commands/bar/version-subcommand.d.ts.map +1 -0
- package/dist/commands/bar/version-subcommand.js +62 -0
- package/dist/commands/bar/version-subcommand.js.map +1 -0
- package/dist/commands/cleanup-command.d.ts.map +1 -1
- package/dist/commands/cleanup-command.js +99 -51
- package/dist/commands/cleanup-command.js.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts +10 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.js +15 -6
- package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +7 -0
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/commands/config-channels-command.d.ts +1 -4
- package/dist/commands/config-channels-command.d.ts.map +1 -1
- package/dist/commands/config-channels-command.js +20 -24
- package/dist/commands/config-channels-command.js.map +1 -1
- package/dist/commands/root-command-router.d.ts.map +1 -1
- package/dist/commands/root-command-router.js +7 -0
- package/dist/commands/root-command-router.js.map +1 -1
- package/dist/config/loader/yaml-serializer.d.ts.map +1 -1
- package/dist/config/loader/yaml-serializer.js +13 -0
- package/dist/config/loader/yaml-serializer.js.map +1 -1
- package/dist/config/reserved-names.d.ts +1 -1
- package/dist/config/reserved-names.d.ts.map +1 -1
- package/dist/config/reserved-names.js +1 -0
- package/dist/config/reserved-names.js.map +1 -1
- package/dist/config/schemas/proxy-server.js +1 -1
- package/dist/config/schemas/quota.d.ts +26 -2
- package/dist/config/schemas/quota.d.ts.map +1 -1
- package/dist/config/schemas/quota.js +20 -1
- package/dist/config/schemas/quota.js.map +1 -1
- package/dist/cursor/cursor-daemon-auth.d.ts +2 -0
- package/dist/cursor/cursor-daemon-auth.d.ts.map +1 -0
- package/dist/cursor/cursor-daemon-auth.js +49 -0
- package/dist/cursor/cursor-daemon-auth.js.map +1 -0
- package/dist/cursor/cursor-daemon-entry.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon-entry.js +44 -0
- package/dist/cursor/cursor-daemon-entry.js.map +1 -1
- package/dist/cursor/cursor-daemon.d.ts +2 -1
- package/dist/cursor/cursor-daemon.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon.js +21 -5
- package/dist/cursor/cursor-daemon.js.map +1 -1
- package/dist/cursor/cursor-models.d.ts.map +1 -1
- package/dist/cursor/cursor-models.js +2 -1
- package/dist/cursor/cursor-models.js.map +1 -1
- package/dist/cursor/cursor-profile-executor.d.ts +1 -1
- package/dist/cursor/cursor-profile-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-profile-executor.js +7 -4
- package/dist/cursor/cursor-profile-executor.js.map +1 -1
- package/dist/cursor/cursor-runtime-probe.d.ts.map +1 -1
- package/dist/cursor/cursor-runtime-probe.js +4 -2
- package/dist/cursor/cursor-runtime-probe.js.map +1 -1
- package/dist/cursor/types.d.ts +1 -0
- package/dist/cursor/types.d.ts.map +1 -1
- package/dist/dispatcher/profile-resolver.d.ts +16 -0
- package/dist/dispatcher/profile-resolver.d.ts.map +1 -1
- package/dist/dispatcher/profile-resolver.js +49 -3
- package/dist/dispatcher/profile-resolver.js.map +1 -1
- package/dist/docker/docker-key-rotation.d.ts +2 -0
- package/dist/docker/docker-key-rotation.d.ts.map +1 -1
- package/dist/docker/docker-key-rotation.js +9 -1
- package/dist/docker/docker-key-rotation.js.map +1 -1
- package/dist/glmt/sse-parser.d.ts +1 -0
- package/dist/glmt/sse-parser.d.ts.map +1 -1
- package/dist/glmt/sse-parser.js +13 -1
- package/dist/glmt/sse-parser.js.map +1 -1
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +9 -1
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/proxy/profile-router.d.ts +2 -0
- package/dist/proxy/profile-router.d.ts.map +1 -1
- package/dist/proxy/profile-router.js +6 -2
- package/dist/proxy/profile-router.js.map +1 -1
- package/dist/proxy/proxy-daemon.js +1 -1
- 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 +79 -7
- package/dist/proxy/server/messages-route.js.map +1 -1
- package/dist/proxy/transformers/request-transformer.d.ts.map +1 -1
- package/dist/proxy/transformers/request-transformer.js +9 -2
- package/dist/proxy/transformers/request-transformer.js.map +1 -1
- package/dist/shared/claude-extension-setup.d.ts.map +1 -1
- package/dist/shared/claude-extension-setup.js +2 -1
- package/dist/shared/claude-extension-setup.js.map +1 -1
- package/dist/shared/cliproxy-model-routing.d.ts.map +1 -1
- package/dist/shared/cliproxy-model-routing.js +1 -0
- package/dist/shared/cliproxy-model-routing.js.map +1 -1
- package/dist/shared/stale-codex-translator-settings.d.ts.map +1 -1
- package/dist/shared/stale-codex-translator-settings.js +48 -9
- package/dist/shared/stale-codex-translator-settings.js.map +1 -1
- package/dist/targets/codex-adapter.d.ts.map +1 -1
- package/dist/targets/codex-adapter.js +10 -8
- package/dist/targets/codex-adapter.js.map +1 -1
- package/dist/targets/target-metadata.js +1 -1
- package/dist/targets/target-metadata.js.map +1 -1
- package/dist/ui/assets/{Trans-DyZQZ3e2.js → Trans-BkttMZOY.js} +1 -1
- package/dist/ui/assets/accounts-CMnafyvZ.js +1 -0
- package/dist/ui/assets/{alert-dialog-DWHL-dqd.js → alert-dialog-Dgbg5gJ1.js} +1 -1
- package/dist/ui/assets/api-VhuWZte1.js +4 -0
- package/dist/ui/assets/{auth-section-B4o90dwz.js → auth-section-DV1ImDLn.js} +1 -1
- package/dist/ui/assets/{backups-section-1AsdSIJO.js → backups-section-D7r-Huo_.js} +1 -1
- package/dist/ui/assets/{channels-CU4Zdsc_.js → channels-CKUk3W1L.js} +1 -1
- package/dist/ui/assets/{checkbox-CbCKGH8I.js → checkbox-B6j6PA4N.js} +1 -1
- package/dist/ui/assets/claude-extension-B9phgEGW.js +1 -0
- package/dist/ui/assets/cliproxy-CjZiufaQ.js +4 -0
- package/dist/ui/assets/{cliproxy-ai-providers-Dr4L5NRY.js → cliproxy-ai-providers-J_8Tg44E.js} +6 -6
- package/dist/ui/assets/cliproxy-control-panel-DOxGnabX.js +1 -0
- package/dist/ui/assets/codex-BJuDLXfe.js +30 -0
- package/dist/ui/assets/{confirm-dialog-b5Dahgnk.js → confirm-dialog-CjwyQ3AU.js} +1 -1
- package/dist/ui/assets/{copilot-B1Ojakbt.js → copilot-Nhs4PdOq.js} +2 -2
- package/dist/ui/assets/{cursor-PUtNVPx1.js → cursor-DqFROSqy.js} +1 -1
- package/dist/ui/assets/{droid-S2gclncb.js → droid-CBwAiZcv.js} +1 -1
- package/dist/ui/assets/{globalenv-section-7wKSmNSG.js → globalenv-section-D9WhcK3S.js} +1 -1
- package/dist/ui/assets/{health-hMLN_gyw.js → health-CE3lFqFV.js} +1 -1
- package/dist/ui/assets/icons-gI6odJjU.js +1 -0
- package/dist/ui/assets/{index-Cx0dmbiQ.js → index-Bssd99Pa.js} +1 -1
- package/dist/ui/assets/index-C6D81JHk.js +1 -0
- package/dist/ui/assets/{index-BWboJia4.js → index-D--xE6Kq.js} +1 -1
- package/dist/ui/assets/index-DFYK4jw3.js +56 -0
- package/dist/ui/assets/{index-DkR2KVhF.js → index-DGsfFqiO.js} +1 -1
- package/dist/ui/assets/index-UEdhhar4.css +1 -0
- package/dist/ui/assets/{index-Coc3_ABK.js → index-bJvDY0e2.js} +1 -1
- package/dist/ui/assets/{index-CxvNNHgE.js → index-vK0cF4_0.js} +1 -1
- package/dist/ui/assets/logs-BUA9GCN2.js +1 -0
- package/dist/ui/assets/{masked-input-4L9CIZGb.js → masked-input-BZdCgWmH.js} +1 -1
- package/dist/ui/assets/providers/qoder.svg +1 -0
- package/dist/ui/assets/proxy-status-widget-I35xB9u9.js +1 -0
- package/dist/ui/assets/{raw-json-settings-editor-panel-DXh8c8rA.js → raw-json-settings-editor-panel-DuL_4ncA.js} +1 -1
- package/dist/ui/assets/{searchable-select-CtvEQrMo.js → searchable-select-BleLprBy.js} +1 -1
- package/dist/ui/assets/{separator-E0ISp1SN.js → separator-De5-VTtx.js} +1 -1
- package/dist/ui/assets/{shared-BeYwHeNS.js → shared-Bu81YVUK.js} +2 -2
- package/dist/ui/assets/{table-BBslZvNP.js → table-DsXaM2jg.js} +1 -1
- package/dist/ui/assets/updates-C2bOO3Fo.js +1 -0
- package/dist/ui/assets/{use-accounts-BdalFsdY.js → use-accounts-C2OmaTJU.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/utils/browser/browser-settings.d.ts.map +1 -1
- package/dist/utils/browser/browser-settings.js +13 -3
- package/dist/utils/browser/browser-settings.js.map +1 -1
- package/dist/utils/glmt-deprecation.d.ts.map +1 -1
- package/dist/utils/glmt-deprecation.js +1 -3
- package/dist/utils/glmt-deprecation.js.map +1 -1
- package/dist/utils/retry-strategy.js +1 -1
- package/dist/utils/retry-strategy.js.map +1 -1
- package/dist/web-server/index.d.ts.map +1 -1
- package/dist/web-server/index.js +0 -9
- package/dist/web-server/index.js.map +1 -1
- package/dist/web-server/middleware/auth-middleware.d.ts.map +1 -1
- package/dist/web-server/middleware/auth-middleware.js +26 -4
- package/dist/web-server/middleware/auth-middleware.js.map +1 -1
- package/dist/web-server/model-pricing.d.ts +18 -2
- package/dist/web-server/model-pricing.d.ts.map +1 -1
- package/dist/web-server/model-pricing.js +79 -3
- package/dist/web-server/model-pricing.js.map +1 -1
- package/dist/web-server/models-dev/pricing-resolver.js +14 -14
- package/dist/web-server/models-dev/pricing-resolver.js.map +1 -1
- package/dist/web-server/routes/account-routes.d.ts.map +1 -1
- package/dist/web-server/routes/account-routes.js +116 -0
- package/dist/web-server/routes/account-routes.js.map +1 -1
- package/dist/web-server/routes/bar-routes.d.ts +149 -0
- package/dist/web-server/routes/bar-routes.d.ts.map +1 -0
- package/dist/web-server/routes/bar-routes.js +415 -0
- package/dist/web-server/routes/bar-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts +10 -0
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.js +45 -13
- package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-local-proxy.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-local-proxy.js +25 -8
- package/dist/web-server/routes/cliproxy-local-proxy.js.map +1 -1
- package/dist/web-server/routes/cursor-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cursor-routes.js +6 -1
- package/dist/web-server/routes/cursor-routes.js.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.d.ts.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.js +7 -0
- package/dist/web-server/routes/image-analysis-routes.js.map +1 -1
- package/dist/web-server/routes/index.d.ts.map +1 -1
- package/dist/web-server/routes/index.js +18 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +6 -1
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +10 -1
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/dist/web-server/services/claude-extension-settings-service.d.ts.map +1 -1
- package/dist/web-server/services/claude-extension-settings-service.js +5 -1
- package/dist/web-server/services/claude-extension-settings-service.js.map +1 -1
- package/dist/web-server/usage/bar-analytics.d.ts +101 -0
- package/dist/web-server/usage/bar-analytics.d.ts.map +1 -0
- package/dist/web-server/usage/bar-analytics.js +315 -0
- package/dist/web-server/usage/bar-analytics.js.map +1 -0
- package/dist/web-server/usage/claude-native-credentials.d.ts +56 -0
- package/dist/web-server/usage/claude-native-credentials.d.ts.map +1 -0
- package/dist/web-server/usage/claude-native-credentials.js +140 -0
- package/dist/web-server/usage/claude-native-credentials.js.map +1 -0
- package/dist/web-server/usage/cliproxy-snapshot-reader.d.ts +24 -0
- package/dist/web-server/usage/cliproxy-snapshot-reader.d.ts.map +1 -0
- package/dist/web-server/usage/cliproxy-snapshot-reader.js +82 -0
- package/dist/web-server/usage/cliproxy-snapshot-reader.js.map +1 -0
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts +3 -2
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-syncer.js +46 -13
- package/dist/web-server/usage/cliproxy-usage-syncer.js.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts +9 -3
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.js +133 -19
- package/dist/web-server/usage/cliproxy-usage-transformer.js.map +1 -1
- package/dist/web-server/usage/codex-local-quota-collector.d.ts +74 -0
- package/dist/web-server/usage/codex-local-quota-collector.d.ts.map +1 -0
- package/dist/web-server/usage/codex-local-quota-collector.js +250 -0
- package/dist/web-server/usage/codex-local-quota-collector.js.map +1 -0
- package/dist/web-server/usage/codex-native-usage-collector.d.ts.map +1 -1
- package/dist/web-server/usage/codex-native-usage-collector.js +18 -2
- package/dist/web-server/usage/codex-native-usage-collector.js.map +1 -1
- package/dist/web-server/usage/data-aggregator.d.ts +11 -0
- package/dist/web-server/usage/data-aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/data-aggregator.js +29 -1
- package/dist/web-server/usage/data-aggregator.js.map +1 -1
- package/dist/web-server/usage/native-quota-collector.d.ts +44 -0
- package/dist/web-server/usage/native-quota-collector.d.ts.map +1 -0
- package/dist/web-server/usage/native-quota-collector.js +378 -0
- package/dist/web-server/usage/native-quota-collector.js.map +1 -0
- package/dist/web-server/usage/profile-filter.d.ts +1 -1
- package/dist/web-server/usage/profile-filter.d.ts.map +1 -1
- package/dist/web-server/usage/profile-filter.js +6 -1
- package/dist/web-server/usage/profile-filter.js.map +1 -1
- package/dist/web-server/usage/types.d.ts +2 -0
- package/dist/web-server/usage/types.d.ts.map +1 -1
- package/lib/mcp/ccs-browser-server.cjs +31 -15
- package/package.json +1 -1
- package/scripts/completion/ccs.bash +0 -12
- package/scripts/completion/ccs.fish +0 -11
- package/scripts/completion/ccs.ps1 +0 -10
- package/scripts/completion/ccs.zsh +0 -13
- package/scripts/github/stable-release-issue-cleanup-lib.mjs +115 -0
- package/scripts/github/stable-release-issue-cleanup.mjs +134 -0
- package/dist/ui/assets/accounts-BPJltru3.js +0 -1
- package/dist/ui/assets/api-BxPN-zy4.js +0 -4
- package/dist/ui/assets/claude-extension-CWpjmIGt.js +0 -1
- package/dist/ui/assets/cliproxy-K6eBb5VO.js +0 -4
- package/dist/ui/assets/cliproxy-control-panel-Cz5r7kHP.js +0 -1
- package/dist/ui/assets/codex-0HdbW8NR.js +0 -30
- package/dist/ui/assets/icons-DzKUh8vG.js +0 -1
- package/dist/ui/assets/index-BMoGhs28.css +0 -1
- package/dist/ui/assets/index-COt1pbk-.js +0 -1
- package/dist/ui/assets/index-CcGVqYOy.js +0 -56
- package/dist/ui/assets/logs-BRFVfyLc.js +0 -1
- package/dist/ui/assets/proxy-status-widget-s1UWOE23.js +0 -1
- package/dist/ui/assets/updates-CDrm903n.js +0 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `ccs bar install` — download the CCS Bar app from the floating
|
|
4
|
+
* `ccs-bar-latest` GitHub release tag and install to ~/Applications.
|
|
5
|
+
*
|
|
6
|
+
* Intentionally uses a FLOATING tag (not the exact CLI version) so the
|
|
7
|
+
* Swift app can be rebuilt and published independently. After install the
|
|
8
|
+
* handler calls GET /api/overview to verify version compatibility and warns
|
|
9
|
+
* (but does not hard-fail) on mismatch.
|
|
10
|
+
*
|
|
11
|
+
* Mirrors the download/version-pin pattern in src/cliproxy/binary-manager.ts.
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.handleBarInstall = exports.validateDownloadUrl = void 0;
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const os = __importStar(require("os"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const config_loader_facade_1 = require("../../config/config-loader-facade");
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Constants
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
/** Floating release tag — never pin to exact CLI semver. */
|
|
46
|
+
const BAR_RELEASE_TAG = 'ccs-bar-latest';
|
|
47
|
+
const BAR_APP_NAME = 'CCS Bar.app';
|
|
48
|
+
const BAR_ASSET_NAME = 'CCS-Bar.app.zip';
|
|
49
|
+
const BAR_GITHUB_REPO = 'kaitranntt/ccs';
|
|
50
|
+
/**
|
|
51
|
+
* Allowlist of hostnames from which we will accept asset downloads.
|
|
52
|
+
* GitHub releases redirect from github.com to objects.githubusercontent.com.
|
|
53
|
+
*
|
|
54
|
+
* TODO(checksum-v2): once release assets ship a checksums.txt/.sha256 file,
|
|
55
|
+
* wire SHA-256 verification here. The download URL is already validated for
|
|
56
|
+
* host+HTTPS as a v1 minimum guard. The verifier hook below is the intended
|
|
57
|
+
* extension point.
|
|
58
|
+
*/
|
|
59
|
+
const DOWNLOAD_HOST_ALLOWLIST = [
|
|
60
|
+
'github.com',
|
|
61
|
+
'objects.githubusercontent.com',
|
|
62
|
+
];
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Host allowlist validation (Finding #9)
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
/**
|
|
67
|
+
* Validate that a download URL is https and its hostname is in the allowlist
|
|
68
|
+
* (exact match or *.githubusercontent.com wildcard).
|
|
69
|
+
* Throws a descriptive Error if validation fails.
|
|
70
|
+
*/
|
|
71
|
+
function validateDownloadUrl(url) {
|
|
72
|
+
let parsed;
|
|
73
|
+
try {
|
|
74
|
+
parsed = new URL(url);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
throw new Error(`Download URL is not a valid URL: ${url}`);
|
|
78
|
+
}
|
|
79
|
+
if (parsed.protocol !== 'https:') {
|
|
80
|
+
throw new Error(`Download URL must use HTTPS, got: ${parsed.protocol} for ${url}`);
|
|
81
|
+
}
|
|
82
|
+
const host = parsed.hostname.toLowerCase();
|
|
83
|
+
const allowed = DOWNLOAD_HOST_ALLOWLIST.includes(host) || host.endsWith('.githubusercontent.com');
|
|
84
|
+
if (!allowed) {
|
|
85
|
+
throw new Error(`Download URL hostname "${host}" is not in the trusted allowlist ` +
|
|
86
|
+
`(${DOWNLOAD_HOST_ALLOWLIST.join(', ')}, *.githubusercontent.com). ` +
|
|
87
|
+
`Refusing to download from untrusted host.`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.validateDownloadUrl = validateDownloadUrl;
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
// Production implementation helpers
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
async function defaultFetchReleaseAsset(tag, asset) {
|
|
95
|
+
const { request } = await Promise.resolve().then(() => __importStar(require('undici')));
|
|
96
|
+
const apiUrl = `https://api.github.com/repos/${BAR_GITHUB_REPO}/releases/tags/${tag}`;
|
|
97
|
+
const { statusCode, body } = await request(apiUrl, {
|
|
98
|
+
headers: {
|
|
99
|
+
'User-Agent': 'ccs-cli',
|
|
100
|
+
Accept: 'application/vnd.github+json',
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
if (statusCode !== 200) {
|
|
104
|
+
throw new Error(`GitHub API returned ${statusCode} for tag ${tag}`);
|
|
105
|
+
}
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
+
const release = (await body.json());
|
|
108
|
+
const tagName = release.tag_name ?? tag;
|
|
109
|
+
// Strip leading 'v' for the version pin file.
|
|
110
|
+
const version = tagName.replace(/^v/, '');
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
const found = release.assets.find((a) => a.name === asset);
|
|
113
|
+
if (!found) {
|
|
114
|
+
throw new Error(`Asset "${asset}" not found in release ${tag}`);
|
|
115
|
+
}
|
|
116
|
+
return { downloadUrl: found.browser_download_url, version };
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Download a zip from `url` (following up to 5 GitHub 302 redirects, re-validating
|
|
120
|
+
* each hop's Location hostname) and extract its contents into `dest`.
|
|
121
|
+
*
|
|
122
|
+
* Fixes applied:
|
|
123
|
+
* - Fix #6: maxRedirections:0 + manual redirect following so every hop's Location
|
|
124
|
+
* header is passed through validateDownloadUrl before following it.
|
|
125
|
+
* The previous maxRedirections:5 let undici follow redirects to ANY host unchecked.
|
|
126
|
+
* - Fix #14: list zip entries with `unzip -l` before extracting; reject the archive
|
|
127
|
+
* if any entry path contains ".." or starts with "/" (zip-slip guard).
|
|
128
|
+
* - Finding #11: check `statusCode` and throw a descriptive error before streaming.
|
|
129
|
+
* - Finding #9: validate host+HTTPS before making the first request.
|
|
130
|
+
*/
|
|
131
|
+
async function defaultDownloadAndExtract(url, dest) {
|
|
132
|
+
const { request } = await Promise.resolve().then(() => __importStar(require('undici')));
|
|
133
|
+
const { createWriteStream, mkdirSync } = fs;
|
|
134
|
+
const { promisify } = await Promise.resolve().then(() => __importStar(require('util')));
|
|
135
|
+
const { pipeline } = await Promise.resolve().then(() => __importStar(require('stream')));
|
|
136
|
+
const streamPipeline = promisify(pipeline);
|
|
137
|
+
const { execFile } = await Promise.resolve().then(() => __importStar(require('child_process')));
|
|
138
|
+
const execFileAsync = promisify(execFile);
|
|
139
|
+
// Validate initial URL (Finding #9)
|
|
140
|
+
validateDownloadUrl(url);
|
|
141
|
+
mkdirSync(dest, { recursive: true });
|
|
142
|
+
// Fix #6: follow redirects manually so each hop is re-validated.
|
|
143
|
+
const MAX_REDIRECTS = 5;
|
|
144
|
+
let currentUrl = url;
|
|
145
|
+
let redirectsFollowed = 0;
|
|
146
|
+
while (true) {
|
|
147
|
+
const { statusCode, headers, body } = await request(currentUrl, {
|
|
148
|
+
maxRedirections: 0, // disable undici's auto-follow; we follow manually
|
|
149
|
+
});
|
|
150
|
+
if (statusCode >= 300 && statusCode < 400) {
|
|
151
|
+
const location = Array.isArray(headers['location'])
|
|
152
|
+
? headers['location'][0]
|
|
153
|
+
: headers['location'];
|
|
154
|
+
if (!location) {
|
|
155
|
+
throw new Error(`Redirect (HTTP ${statusCode}) from ${currentUrl} has no Location header`);
|
|
156
|
+
}
|
|
157
|
+
// Resolve relative redirects against the current URL
|
|
158
|
+
const resolved = new URL(location, currentUrl).toString();
|
|
159
|
+
// Re-validate the redirect target — this is the key fix for #6
|
|
160
|
+
validateDownloadUrl(resolved);
|
|
161
|
+
if (redirectsFollowed >= MAX_REDIRECTS) {
|
|
162
|
+
throw new Error(`Too many redirects (>${MAX_REDIRECTS}) while downloading ${url}`);
|
|
163
|
+
}
|
|
164
|
+
// Drain the body to free the socket before following the redirect
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
166
|
+
await body.dump?.();
|
|
167
|
+
currentUrl = resolved;
|
|
168
|
+
redirectsFollowed++;
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
if (statusCode !== 200) {
|
|
172
|
+
throw new Error(`Download failed: HTTP ${statusCode} for ${currentUrl}`);
|
|
173
|
+
}
|
|
174
|
+
const tmpZip = path.join(os.tmpdir(), `ccs-bar-${Date.now()}.zip`);
|
|
175
|
+
// Stream body to tmpZip
|
|
176
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
177
|
+
await streamPipeline(body, createWriteStream(tmpZip));
|
|
178
|
+
// Fix #14: zip-slip guard — inspect entries before extraction.
|
|
179
|
+
// `unzip -l` lists entries in a machine-readable format; we scan for ".." or
|
|
180
|
+
// absolute paths that would escape the destination directory.
|
|
181
|
+
try {
|
|
182
|
+
const { stdout: listing } = await execFileAsync('unzip', ['-l', tmpZip]);
|
|
183
|
+
const lines = listing.split('\n');
|
|
184
|
+
for (const line of lines) {
|
|
185
|
+
// Entry lines look like: " <size> <date> <time> <path>"
|
|
186
|
+
// We extract the path from the last whitespace-delimited field.
|
|
187
|
+
const match = /^\s+\d+\s+[\d-]+\s+[\d:]+\s+(.+)$/.exec(line);
|
|
188
|
+
if (!match || !match[1])
|
|
189
|
+
continue;
|
|
190
|
+
const entryPath = match[1].trim();
|
|
191
|
+
if (!entryPath || entryPath.endsWith('/'))
|
|
192
|
+
continue; // skip directory entries
|
|
193
|
+
// Reject absolute paths and paths with traversal components
|
|
194
|
+
if (path.isAbsolute(entryPath) || entryPath.includes('..')) {
|
|
195
|
+
try {
|
|
196
|
+
fs.unlinkSync(tmpZip);
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
/* ignore */
|
|
200
|
+
}
|
|
201
|
+
throw new Error(`Zip-slip detected: archive entry "${entryPath}" contains a path traversal ` +
|
|
202
|
+
`component. Refusing to extract.`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (err) {
|
|
207
|
+
// If the guard itself throws (e.g. zip-slip detected above), propagate it.
|
|
208
|
+
// If it's a system error (unzip not available), let extraction proceed and
|
|
209
|
+
// surface the issue then.
|
|
210
|
+
if (err.message?.includes('Zip-slip'))
|
|
211
|
+
throw err;
|
|
212
|
+
// Warn but continue — extraction will likely also fail if unzip is missing
|
|
213
|
+
console.error(`[!] Zip entry scan failed (will attempt extraction): ${err.message}`);
|
|
214
|
+
}
|
|
215
|
+
// Extract the zip into dest
|
|
216
|
+
await execFileAsync('unzip', ['-o', tmpZip, '-d', dest]);
|
|
217
|
+
// Clean up the temp archive
|
|
218
|
+
try {
|
|
219
|
+
fs.unlinkSync(tmpZip);
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
/* ignore */
|
|
223
|
+
}
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Call GET {baseUrl}/api/overview and compare server version against the
|
|
229
|
+
* installed bar version. Returns compat=false whenever the comparison cannot
|
|
230
|
+
* be made (server unreachable, version strings unparseable, etc.).
|
|
231
|
+
*
|
|
232
|
+
* Fix for Finding #10: replaces the phantom check that always returned true.
|
|
233
|
+
* Compatible is defined as same semver major (0 vs 0, 1 vs 1, etc.).
|
|
234
|
+
*/
|
|
235
|
+
async function defaultVerifyCompat(baseUrl, installedVersion) {
|
|
236
|
+
try {
|
|
237
|
+
const { request } = await Promise.resolve().then(() => __importStar(require('undici')));
|
|
238
|
+
const { statusCode, body } = await request(`${baseUrl}/api/overview`, {
|
|
239
|
+
headers: { 'User-Agent': 'ccs-cli' },
|
|
240
|
+
});
|
|
241
|
+
if (statusCode !== 200) {
|
|
242
|
+
console.log(`[!] Version compatibility check failed: /api/overview returned HTTP ${statusCode}.`);
|
|
243
|
+
return { version: 'unknown', compatible: false };
|
|
244
|
+
}
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
+
const data = (await body.json());
|
|
247
|
+
const serverVersion = data.version ?? 'unknown';
|
|
248
|
+
if (serverVersion === 'unknown') {
|
|
249
|
+
console.log('[!] Version compatibility: server did not report a version.');
|
|
250
|
+
return { version: serverVersion, compatible: false };
|
|
251
|
+
}
|
|
252
|
+
// Parse installed version major from the pinned version string.
|
|
253
|
+
const installedMajorRaw = installedVersion.split('.')[0];
|
|
254
|
+
const serverMajorRaw = serverVersion.split('.')[0];
|
|
255
|
+
const installedMajor = parseInt(installedMajorRaw ?? '', 10);
|
|
256
|
+
const serverMajor = parseInt(serverMajorRaw ?? '', 10);
|
|
257
|
+
if (isNaN(installedMajor) || isNaN(serverMajor)) {
|
|
258
|
+
console.log(`[!] Version compatibility: cannot parse major versions ` +
|
|
259
|
+
`(installed="${installedVersion}", server="${serverVersion}").`);
|
|
260
|
+
return { version: serverVersion, compatible: false };
|
|
261
|
+
}
|
|
262
|
+
const compatible = installedMajor === serverMajor;
|
|
263
|
+
return { version: serverVersion, compatible };
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
// Server unreachable — warn but do not claim compatible.
|
|
267
|
+
return { version: 'unknown', compatible: false };
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function defaultGetCcsDir() {
|
|
271
|
+
return (0, config_loader_facade_1.getCcsDir)();
|
|
272
|
+
}
|
|
273
|
+
function defaultGetAppsDir() {
|
|
274
|
+
return path.join(os.homedir(), 'Applications');
|
|
275
|
+
}
|
|
276
|
+
// ---------------------------------------------------------------------------
|
|
277
|
+
// Version pin helpers
|
|
278
|
+
// ---------------------------------------------------------------------------
|
|
279
|
+
function getBarVersionFilePath(ccsDir) {
|
|
280
|
+
return path.join(ccsDir, 'bar', '.version');
|
|
281
|
+
}
|
|
282
|
+
function pinBarVersion(ccsDir, version) {
|
|
283
|
+
const versionFile = getBarVersionFilePath(ccsDir);
|
|
284
|
+
fs.mkdirSync(path.dirname(versionFile), { recursive: true });
|
|
285
|
+
fs.writeFileSync(versionFile, version);
|
|
286
|
+
}
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
// Implementation
|
|
289
|
+
// ---------------------------------------------------------------------------
|
|
290
|
+
async function handleBarInstall(_args, deps = {}) {
|
|
291
|
+
const fetchReleaseAsset = deps.fetchReleaseAsset ?? defaultFetchReleaseAsset;
|
|
292
|
+
const downloadAndExtract = deps.downloadAndExtract ?? defaultDownloadAndExtract;
|
|
293
|
+
const verifyCompat = deps.verifyCompat ?? defaultVerifyCompat;
|
|
294
|
+
const ccsDir = (deps.getCcsDir ?? defaultGetCcsDir)();
|
|
295
|
+
const appsDir = (deps.getAppsDir ?? defaultGetAppsDir)();
|
|
296
|
+
console.log('[i] Fetching CCS Bar release info...');
|
|
297
|
+
// 1. Resolve the floating tag → download URL + version.
|
|
298
|
+
let releaseInfo;
|
|
299
|
+
try {
|
|
300
|
+
releaseInfo = await fetchReleaseAsset(BAR_RELEASE_TAG, BAR_ASSET_NAME);
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
304
|
+
console.error(`[X] Failed to fetch release asset: ${msg}`);
|
|
305
|
+
console.error('[i] Check your network connection and try again.');
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
const { downloadUrl, version } = releaseInfo;
|
|
309
|
+
console.log(`[i] Installing CCS Bar v${version} from ${BAR_RELEASE_TAG}...`);
|
|
310
|
+
// 2. Download and extract into ~/Applications.
|
|
311
|
+
try {
|
|
312
|
+
await downloadAndExtract(downloadUrl, appsDir);
|
|
313
|
+
}
|
|
314
|
+
catch (err) {
|
|
315
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
316
|
+
console.error(`[X] Download or extraction failed: ${msg}`);
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
// 3. Finding #12: assert that the expected .app bundle was actually extracted
|
|
320
|
+
// before reporting success.
|
|
321
|
+
const appPath = path.join(appsDir, BAR_APP_NAME);
|
|
322
|
+
if (!fs.existsSync(appPath)) {
|
|
323
|
+
// Report what was actually extracted to help diagnose archive issues.
|
|
324
|
+
let extracted = [];
|
|
325
|
+
try {
|
|
326
|
+
extracted = fs.readdirSync(appsDir);
|
|
327
|
+
}
|
|
328
|
+
catch {
|
|
329
|
+
/* ignore */
|
|
330
|
+
}
|
|
331
|
+
const found = extracted.length > 0 ? extracted.join(', ') : '(none)';
|
|
332
|
+
console.error(`[X] Extraction succeeded but "${BAR_APP_NAME}" was not found in ${appsDir}.`);
|
|
333
|
+
console.error(`[i] Files found in ${appsDir}: ${found}`);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
// 4. Pin the installed version to ~/.ccs/bar/.version.
|
|
337
|
+
try {
|
|
338
|
+
pinBarVersion(ccsDir, version);
|
|
339
|
+
}
|
|
340
|
+
catch (err) {
|
|
341
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
342
|
+
console.error(`[!] Could not write version pin: ${msg}`);
|
|
343
|
+
// Non-fatal — continue.
|
|
344
|
+
}
|
|
345
|
+
console.log(`[OK] CCS Bar v${version} installed to ${appsDir}/${BAR_APP_NAME}`);
|
|
346
|
+
// 5. Version-compat handshake via /api/overview.
|
|
347
|
+
// Read bar.json for baseUrl if present; otherwise fall back to localhost:3000.
|
|
348
|
+
const barJsonPath = path.join(ccsDir, 'bar.json');
|
|
349
|
+
let baseUrl = 'http://127.0.0.1:3000';
|
|
350
|
+
try {
|
|
351
|
+
const raw = fs.readFileSync(barJsonPath, 'utf8');
|
|
352
|
+
const parsed = JSON.parse(raw);
|
|
353
|
+
if (parsed.baseUrl)
|
|
354
|
+
baseUrl = parsed.baseUrl;
|
|
355
|
+
}
|
|
356
|
+
catch {
|
|
357
|
+
/* bar.json absent — use fallback */
|
|
358
|
+
}
|
|
359
|
+
try {
|
|
360
|
+
// Pass the pinned version so verifyCompat can do a real major-version comparison.
|
|
361
|
+
const compat = await verifyCompat(baseUrl, version);
|
|
362
|
+
if (!compat.compatible) {
|
|
363
|
+
console.log(`[!] Version mismatch: CCS server reports v${compat.version}, ` +
|
|
364
|
+
`app is v${version}. Some features may not work until you restart ` +
|
|
365
|
+
'`ccs bar` or update CCS.');
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
console.log(`[OK] Version compatibility confirmed (server: v${compat.version}).`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
catch {
|
|
372
|
+
console.log('[!] Could not verify version compatibility (server may not be running).');
|
|
373
|
+
console.log('[i] Run `ccs bar` to start the server and recheck.');
|
|
374
|
+
}
|
|
375
|
+
// 6. Print Gatekeeper guidance for ad-hoc/unsigned builds.
|
|
376
|
+
console.log('');
|
|
377
|
+
console.log('[i] Gatekeeper note (ad-hoc build):');
|
|
378
|
+
console.log(' If macOS says the app is "damaged" or "unverified", run:');
|
|
379
|
+
console.log(` xattr -dr com.apple.quarantine "${path.join(appsDir, BAR_APP_NAME)}"`);
|
|
380
|
+
console.log(' Or right-click the app and select Open.');
|
|
381
|
+
}
|
|
382
|
+
exports.handleBarInstall = handleBarInstall;
|
|
383
|
+
//# sourceMappingURL=install-subcommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-subcommand.js","sourceRoot":"","sources":["../../../src/commands/bar/install-subcommand.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,4EAA8D;AAE9D,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,4DAA4D;AAC5D,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,YAAY,GAAG,aAAa,CAAC;AACnC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AACzC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,uBAAuB,GAA0B;IACrD,YAAY;IACZ,+BAA+B;CAChC,CAAC;AAwCF,8EAA8E;AAC9E,yCAAyC;AACzC,8EAA8E;AAE9E;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,oCAAoC,GAAG,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,MAAM,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AED,2DAA2D;IAC3D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACnD,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAC1F,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;AAC7D,CAAC;AAlGD,4CAkGC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ccs bar launch` — ensure web-server is up, write ~/.ccs/bar.json, open the app.
|
|
3
|
+
*
|
|
4
|
+
* bar.json shape (v1):
|
|
5
|
+
* { baseUrl: string, port: number, authMode: "loopback" }
|
|
6
|
+
*
|
|
7
|
+
* authMode is always "loopback" for v1 (auth-enabled unsupported until v1.1).
|
|
8
|
+
*/
|
|
9
|
+
export interface BarDiscoveryJson {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
port: number;
|
|
12
|
+
authMode: 'loopback';
|
|
13
|
+
}
|
|
14
|
+
export interface DashboardInfo {
|
|
15
|
+
port: number;
|
|
16
|
+
baseUrl: string;
|
|
17
|
+
}
|
|
18
|
+
export interface LaunchDeps {
|
|
19
|
+
/**
|
|
20
|
+
* Ensure the CCS web-server / dashboard is running.
|
|
21
|
+
* Returns { port, baseUrl } of the running server.
|
|
22
|
+
* Throws if the server cannot be started (degraded path).
|
|
23
|
+
*/
|
|
24
|
+
ensureDashboard: () => Promise<DashboardInfo>;
|
|
25
|
+
/** Open the installed .app bundle. Throws if the app is not found. */
|
|
26
|
+
openApp: (appPath: string) => Promise<void>;
|
|
27
|
+
/** Returns path to ~/.ccs (respects CCS_HOME for test isolation). */
|
|
28
|
+
getCcsDir: () => string;
|
|
29
|
+
/** Full path where the .app should be installed, e.g. ~/Applications/CCS Bar.app */
|
|
30
|
+
appInstallPath: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Read the port recorded in an existing bar.json.
|
|
34
|
+
* Returns null when the file is absent or malformed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveBarPort(ccsDir: string): number | null;
|
|
37
|
+
export declare function handleBarLaunch(_args: string[], deps?: Partial<LaunchDeps>): Promise<void>;
|
|
38
|
+
//# sourceMappingURL=launch-subcommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-subcommand.d.ts","sourceRoot":"","sources":["../../../src/commands/bar/launch-subcommand.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,eAAe,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9C,sEAAsE;IACtE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,qEAAqE;IACrE,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,oFAAoF;IACpF,cAAc,EAAE,MAAM,CAAC;CACxB;AAMD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS5D;AA4CD,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,GAAE,OAAO,CAAC,UAAU,CAAM,GAC7B,OAAO,CAAC,IAAI,CAAC,CAmDf"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `ccs bar launch` — ensure web-server is up, write ~/.ccs/bar.json, open the app.
|
|
4
|
+
*
|
|
5
|
+
* bar.json shape (v1):
|
|
6
|
+
* { baseUrl: string, port: number, authMode: "loopback" }
|
|
7
|
+
*
|
|
8
|
+
* authMode is always "loopback" for v1 (auth-enabled unsupported until v1.1).
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.handleBarLaunch = exports.resolveBarPort = void 0;
|
|
35
|
+
const fs = __importStar(require("fs"));
|
|
36
|
+
const os = __importStar(require("os"));
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const config_loader_facade_1 = require("../../config/config-loader-facade");
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Port discovery helpers (exported for unit tests)
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
/**
|
|
43
|
+
* Read the port recorded in an existing bar.json.
|
|
44
|
+
* Returns null when the file is absent or malformed.
|
|
45
|
+
*/
|
|
46
|
+
function resolveBarPort(ccsDir) {
|
|
47
|
+
const barJsonPath = path.join(ccsDir, 'bar.json');
|
|
48
|
+
try {
|
|
49
|
+
const raw = fs.readFileSync(barJsonPath, 'utf8');
|
|
50
|
+
const parsed = JSON.parse(raw);
|
|
51
|
+
return typeof parsed.port === 'number' ? parsed.port : null;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.resolveBarPort = resolveBarPort;
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Default production dependencies
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
async function defaultEnsureDashboard() {
|
|
62
|
+
// Reuse the same startup path as `ccs config`:
|
|
63
|
+
// find a free port then start the web-server via startServer().
|
|
64
|
+
const getPort = (await Promise.resolve().then(() => __importStar(require('get-port')))).default;
|
|
65
|
+
const { startServer } = await Promise.resolve().then(() => __importStar(require('../../web-server')));
|
|
66
|
+
const port = await getPort({ port: [3000, 3001, 3002, 8000, 8080] });
|
|
67
|
+
// Bind IPv4 loopback explicitly. Without a host, startServer defaults to
|
|
68
|
+
// 'localhost', which on macOS resolves to ::1 (IPv6) — but bar.json's baseUrl
|
|
69
|
+
// (and the Swift app) use 127.0.0.1, so the app could not reach its own server.
|
|
70
|
+
const { server } = await startServer({ port, host: '127.0.0.1' });
|
|
71
|
+
const addr = server.address();
|
|
72
|
+
const resolvedPort = addr && typeof addr === 'object' ? addr.port : port;
|
|
73
|
+
const baseUrl = `http://127.0.0.1:${resolvedPort}`;
|
|
74
|
+
return { port: resolvedPort, baseUrl };
|
|
75
|
+
}
|
|
76
|
+
async function defaultOpenApp(appPath) {
|
|
77
|
+
const { execFile } = await Promise.resolve().then(() => __importStar(require('child_process')));
|
|
78
|
+
const { promisify } = await Promise.resolve().then(() => __importStar(require('util')));
|
|
79
|
+
const execFileAsync = promisify(execFile);
|
|
80
|
+
await execFileAsync('open', ['-a', appPath]);
|
|
81
|
+
}
|
|
82
|
+
function defaultGetCcsDir() {
|
|
83
|
+
return (0, config_loader_facade_1.getCcsDir)();
|
|
84
|
+
}
|
|
85
|
+
// Fix #5: use os.homedir() to match install-subcommand.ts and uninstall-subcommand.ts.
|
|
86
|
+
// process.env.HOME may be unset in restricted environments, and CCS_HOME is the CCS
|
|
87
|
+
// data directory (~/.ccs), not the user's home — neither is a safe fallback here.
|
|
88
|
+
const DEFAULT_APP_INSTALL_PATH = path.join(os.homedir(), 'Applications', 'CCS Bar.app');
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// Implementation
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
async function handleBarLaunch(_args, deps = {}) {
|
|
93
|
+
const ensureDashboard = deps.ensureDashboard ?? defaultEnsureDashboard;
|
|
94
|
+
const openApp = deps.openApp ?? defaultOpenApp;
|
|
95
|
+
const ccsDir = (deps.getCcsDir ?? defaultGetCcsDir)();
|
|
96
|
+
const appInstallPath = deps.appInstallPath ?? DEFAULT_APP_INSTALL_PATH;
|
|
97
|
+
// 1. Ensure the web-server/dashboard is running.
|
|
98
|
+
let dashboardInfo;
|
|
99
|
+
try {
|
|
100
|
+
dashboardInfo = await ensureDashboard();
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
104
|
+
console.error(`[X] Could not start CCS web-server: ${msg}`);
|
|
105
|
+
console.error('[i] Run `ccs config` to start the dashboard manually.');
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
// 2. Write bar.json — this is the single source of discovery for the Swift app.
|
|
109
|
+
const barJson = {
|
|
110
|
+
baseUrl: dashboardInfo.baseUrl,
|
|
111
|
+
port: dashboardInfo.port,
|
|
112
|
+
authMode: 'loopback',
|
|
113
|
+
};
|
|
114
|
+
try {
|
|
115
|
+
fs.mkdirSync(ccsDir, { recursive: true });
|
|
116
|
+
fs.writeFileSync(path.join(ccsDir, 'bar.json'), JSON.stringify(barJson, null, 2));
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
120
|
+
console.error(`[X] Failed to write bar.json: ${msg}`);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
console.log(`[OK] CCS web-server running at ${dashboardInfo.baseUrl}`);
|
|
124
|
+
console.log(`[i] Discovery file written: ${path.join(ccsDir, 'bar.json')}`);
|
|
125
|
+
// 3. Open the app.
|
|
126
|
+
try {
|
|
127
|
+
await openApp(appInstallPath);
|
|
128
|
+
console.log('[OK] CCS Bar launched.');
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
// Degraded path: app not installed or open failed.
|
|
132
|
+
if (!fs.existsSync(appInstallPath)) {
|
|
133
|
+
console.log('[!] CCS Bar app is not installed.');
|
|
134
|
+
console.log('[i] Run `ccs bar install` to install it.');
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
console.log('[!] Could not open CCS Bar. Try right-clicking and selecting Open.');
|
|
138
|
+
console.log('[i] If Gatekeeper blocks the app, run:');
|
|
139
|
+
console.log(` xattr -dr com.apple.quarantine "${appInstallPath}"`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.handleBarLaunch = handleBarLaunch;
|
|
144
|
+
//# sourceMappingURL=launch-subcommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch-subcommand.js","sourceRoot":"","sources":["../../../src/commands/bar/launch-subcommand.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB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,CAAC;IAAC,MAAM,CAAC;QACP,mDAAmD;QACnD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YACnC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;YACjD,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;YAClF,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACtD,OAAO,CAAC,GAAG,CAAC,yCAAyC,cAAc,GAAG,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;AACH,CAAC;AAtDD,0CAsDC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ccs bar uninstall` — remove CCS Bar.app from ~/Applications
|
|
3
|
+
* and clear the version pin at ~/.ccs/bar/.version.
|
|
4
|
+
*
|
|
5
|
+
* No-op (and no error) when neither the app nor the pin exists.
|
|
6
|
+
*/
|
|
7
|
+
export interface UninstallDeps {
|
|
8
|
+
getCcsDir: () => string;
|
|
9
|
+
getAppsDir: () => string;
|
|
10
|
+
appName: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function handleBarUninstall(_args: string[], deps?: Partial<UninstallDeps>): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=uninstall-subcommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall-subcommand.d.ts","sourceRoot":"","sources":["../../../src/commands/bar/uninstall-subcommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,GAAE,OAAO,CAAC,aAAa,CAAM,GAChC,OAAO,CAAC,IAAI,CAAC,CAsCf"}
|