@georgedong32/ccs 7.67.0 → 8.0.0
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/.claude/commands/opsx/apply.md +152 -0
- package/.claude/commands/opsx/archive.md +157 -0
- package/.claude/commands/opsx/continue.md +114 -0
- package/.claude/commands/opsx/explore.md +173 -0
- package/.claude/commands/opsx/ff.md +97 -0
- package/.claude/commands/opsx/new.md +69 -0
- package/.claude/commands/opsx/propose.md +106 -0
- package/.claude/commands/opsx/sync.md +134 -0
- package/.claude/commands/opsx/verify.md +164 -0
- package/.claude/settings.local.json +51 -1
- package/README.md +49 -4
- package/config/base-claude.settings.json +1 -1
- package/config/base-codebuddy.settings.json +10 -0
- package/config/base-codex.settings.json +4 -4
- package/config/base-cursor.settings.json +10 -0
- package/config/base-gitlab.settings.json +10 -0
- package/config/base-kilo.settings.json +10 -0
- package/dist/api/services/cliproxy-profile-bridge.d.ts.map +1 -1
- package/dist/api/services/cliproxy-profile-bridge.js +9 -10
- package/dist/api/services/cliproxy-profile-bridge.js.map +1 -1
- package/dist/api/services/index.d.ts +1 -0
- package/dist/api/services/index.d.ts.map +1 -1
- package/dist/api/services/index.js +3 -1
- package/dist/api/services/index.js.map +1 -1
- package/dist/api/services/local-runtime-readiness.d.ts +14 -0
- package/dist/api/services/local-runtime-readiness.d.ts.map +1 -0
- package/dist/api/services/local-runtime-readiness.js +89 -0
- package/dist/api/services/local-runtime-readiness.js.map +1 -0
- package/dist/api/services/openrouter-catalog.js +2 -2
- package/dist/api/services/openrouter-catalog.js.map +1 -1
- package/dist/api/services/profile-lifecycle-service.d.ts.map +1 -1
- package/dist/api/services/profile-lifecycle-service.js +6 -6
- package/dist/api/services/profile-lifecycle-service.js.map +1 -1
- package/dist/api/services/profile-lifecycle-validation.js +1 -1
- package/dist/api/services/profile-lifecycle-validation.js.map +1 -1
- package/dist/api/services/profile-reader.d.ts.map +1 -1
- package/dist/api/services/profile-reader.js +14 -15
- package/dist/api/services/profile-reader.js.map +1 -1
- package/dist/api/services/profile-writer.d.ts +1 -1
- package/dist/api/services/profile-writer.d.ts.map +1 -1
- package/dist/api/services/profile-writer.js +25 -19
- package/dist/api/services/profile-writer.js.map +1 -1
- package/dist/auth/account-profile-diagnostics.d.ts +21 -0
- package/dist/auth/account-profile-diagnostics.d.ts.map +1 -0
- package/dist/auth/account-profile-diagnostics.js +130 -0
- package/dist/auth/account-profile-diagnostics.js.map +1 -0
- package/dist/auth/auth-commands.d.ts +2 -1
- package/dist/auth/auth-commands.d.ts.map +1 -1
- package/dist/auth/auth-commands.js +30 -12
- package/dist/auth/auth-commands.js.map +1 -1
- package/dist/auth/commands/backup-command.d.ts.map +1 -1
- package/dist/auth/commands/backup-command.js +7 -2
- package/dist/auth/commands/backup-command.js.map +1 -1
- package/dist/auth/commands/create-command-env.d.ts +1 -0
- package/dist/auth/commands/create-command-env.d.ts.map +1 -1
- package/dist/auth/commands/create-command.d.ts.map +1 -1
- package/dist/auth/commands/create-command.js +23 -19
- package/dist/auth/commands/create-command.js.map +1 -1
- package/dist/auth/commands/default-command.d.ts +1 -1
- package/dist/auth/commands/default-command.d.ts.map +1 -1
- package/dist/auth/commands/default-command.js +13 -5
- package/dist/auth/commands/default-command.js.map +1 -1
- package/dist/auth/commands/index.d.ts +1 -0
- package/dist/auth/commands/index.d.ts.map +1 -1
- package/dist/auth/commands/index.js +3 -1
- package/dist/auth/commands/index.js.map +1 -1
- package/dist/auth/commands/list-command.d.ts.map +1 -1
- package/dist/auth/commands/list-command.js +16 -3
- package/dist/auth/commands/list-command.js.map +1 -1
- package/dist/auth/commands/remove-command.d.ts.map +1 -1
- package/dist/auth/commands/remove-command.js +7 -3
- package/dist/auth/commands/remove-command.js.map +1 -1
- package/dist/auth/commands/resources-command.d.ts +3 -0
- package/dist/auth/commands/resources-command.d.ts.map +1 -0
- package/dist/auth/commands/resources-command.js +115 -0
- package/dist/auth/commands/resources-command.js.map +1 -0
- package/dist/auth/commands/show-command.d.ts.map +1 -1
- package/dist/auth/commands/show-command.js +54 -3
- package/dist/auth/commands/show-command.js.map +1 -1
- package/dist/auth/commands/types.d.ts +31 -1
- package/dist/auth/commands/types.d.ts.map +1 -1
- package/dist/auth/commands/types.js +41 -2
- package/dist/auth/commands/types.js.map +1 -1
- package/dist/auth/profile-continuity-inheritance.d.ts.map +1 -1
- package/dist/auth/profile-continuity-inheritance.js +6 -5
- package/dist/auth/profile-continuity-inheritance.js.map +1 -1
- package/dist/auth/profile-detector.d.ts +2 -3
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +25 -25
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/auth/profile-registry.d.ts +2 -0
- package/dist/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +29 -17
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/auth/resume-lane-diagnostics.d.ts.map +1 -1
- package/dist/auth/resume-lane-diagnostics.js +2 -2
- package/dist/auth/resume-lane-diagnostics.js.map +1 -1
- package/dist/auth/shared-resource-policy.d.ts +20 -0
- package/dist/auth/shared-resource-policy.d.ts.map +1 -0
- package/dist/auth/shared-resource-policy.js +69 -0
- package/dist/auth/shared-resource-policy.js.map +1 -0
- package/dist/bin/ccsxp-runtime.d.ts +9 -0
- package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
- package/dist/bin/ccsxp-runtime.js +62 -3
- package/dist/bin/ccsxp-runtime.js.map +1 -1
- package/dist/ccs.js +65 -1024
- package/dist/ccs.js.map +1 -1
- package/dist/channels/official-channels-ids.d.ts +21 -0
- package/dist/channels/official-channels-ids.d.ts.map +1 -0
- package/dist/channels/official-channels-ids.js +46 -0
- package/dist/channels/official-channels-ids.js.map +1 -0
- package/dist/channels/official-channels-runtime.d.ts +3 -5
- package/dist/channels/official-channels-runtime.d.ts.map +1 -1
- package/dist/channels/official-channels-runtime.js +25 -29
- package/dist/channels/official-channels-runtime.js.map +1 -1
- package/dist/channels/official-channels-store.d.ts +1 -0
- package/dist/channels/official-channels-store.d.ts.map +1 -1
- package/dist/channels/official-channels-store.js +5 -6
- package/dist/channels/official-channels-store.js.map +1 -1
- package/dist/cliproxy/accounts/account-manager.d.ts +16 -0
- package/dist/cliproxy/accounts/account-manager.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-manager.js +51 -0
- package/dist/cliproxy/accounts/account-manager.js.map +1 -0
- package/dist/cliproxy/accounts/account-safety.d.ts +103 -0
- package/dist/cliproxy/accounts/account-safety.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-safety.js +614 -0
- package/dist/cliproxy/accounts/account-safety.js.map +1 -0
- package/dist/cliproxy/accounts/account-stats-key.d.ts.map +1 -0
- package/dist/cliproxy/accounts/account-stats-key.js.map +1 -0
- package/dist/cliproxy/accounts/email-account-identity.d.ts.map +1 -1
- package/dist/cliproxy/accounts/email-account-identity.js +22 -2
- package/dist/cliproxy/accounts/email-account-identity.js.map +1 -1
- package/dist/cliproxy/accounts/registry.js +1 -1
- package/dist/cliproxy/accounts/registry.js.map +1 -1
- package/dist/cliproxy/accounts/token-file-ops.js +1 -1
- package/dist/cliproxy/accounts/token-file-ops.js.map +1 -1
- package/dist/cliproxy/accounts/types.d.ts +1 -1
- package/dist/cliproxy/accounts/types.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.d.ts +38 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js +131 -0
- package/dist/cliproxy/ai-providers/codex-plan-compatibility.js.map +1 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts +71 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js +565 -0
- package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js.map +1 -0
- package/dist/cliproxy/ai-providers/config-store.js +3 -3
- package/dist/cliproxy/ai-providers/config-store.js.map +1 -1
- package/dist/cliproxy/ai-providers/managed-model-prefixes.d.ts +7 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.js +116 -0
- package/dist/cliproxy/ai-providers/managed-model-prefixes.js.map +1 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts +108 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.js +293 -0
- package/dist/cliproxy/ai-providers/model-id-normalizer.js.map +1 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.js +203 -0
- package/dist/cliproxy/ai-providers/openai-compat-manager.js.map +1 -0
- package/dist/cliproxy/ai-providers/schema-sanitizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/schema-sanitizer.js.map +1 -0
- package/dist/cliproxy/ai-providers/service.d.ts.map +1 -1
- package/dist/cliproxy/ai-providers/service.js +10 -3
- package/dist/cliproxy/ai-providers/service.js.map +1 -1
- package/dist/cliproxy/ai-providers/tool-name-mapper.d.ts +108 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.js +163 -0
- package/dist/cliproxy/ai-providers/tool-name-mapper.js.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.d.ts +66 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.d.ts.map +1 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.js +138 -0
- package/dist/cliproxy/ai-providers/tool-name-sanitizer.js.map +1 -0
- package/dist/cliproxy/auth/antigravity-responsibility.d.ts.map +1 -0
- package/dist/cliproxy/auth/antigravity-responsibility.js +171 -0
- package/dist/cliproxy/auth/antigravity-responsibility.js.map +1 -0
- package/dist/cliproxy/auth/auth-handler.d.ts +31 -0
- package/dist/cliproxy/auth/auth-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-handler.js +60 -0
- package/dist/cliproxy/auth/auth-handler.js.map +1 -0
- package/dist/cliproxy/auth/auth-session-manager.d.ts +51 -0
- package/dist/cliproxy/auth/auth-session-manager.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-session-manager.js +141 -0
- package/dist/cliproxy/auth/auth-session-manager.js.map +1 -0
- package/dist/cliproxy/auth/auth-token-manager.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-token-manager.js +184 -0
- package/dist/cliproxy/auth/auth-token-manager.js.map +1 -0
- package/dist/cliproxy/auth/auth-types.d.ts +40 -7
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
- package/dist/cliproxy/auth/auth-types.js +90 -10
- package/dist/cliproxy/auth/auth-types.js.map +1 -1
- package/dist/cliproxy/auth/auth-utils.d.ts +17 -0
- package/dist/cliproxy/auth/auth-utils.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-utils.js +58 -0
- package/dist/cliproxy/auth/auth-utils.js.map +1 -0
- package/dist/cliproxy/auth/device-code-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/device-code-handler.js.map +1 -0
- package/dist/cliproxy/auth/gitlab-pat-response.d.ts +9 -0
- package/dist/cliproxy/auth/gitlab-pat-response.d.ts.map +1 -0
- package/dist/cliproxy/auth/gitlab-pat-response.js +64 -0
- package/dist/cliproxy/auth/gitlab-pat-response.js.map +1 -0
- package/dist/cliproxy/auth/kiro-import.js +2 -2
- package/dist/cliproxy/auth/kiro-import.js.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts +50 -4
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +443 -51
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
- package/dist/cliproxy/auth/oauth-process.d.ts +27 -2
- package/dist/cliproxy/auth/oauth-process.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-process.js +409 -53
- package/dist/cliproxy/auth/oauth-process.js.map +1 -1
- package/dist/cliproxy/auth/oauth-start-failure-guidance.d.ts +22 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.js +82 -0
- package/dist/cliproxy/auth/oauth-start-failure-guidance.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts +24 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js +159 -0
- package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/index.d.ts +4 -0
- package/dist/cliproxy/auth/oauth-trace/index.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/index.js +14 -0
- package/dist/cliproxy/auth/oauth-trace/index.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.d.ts +22 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.js +120 -0
- package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts +18 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.js +90 -0
- package/dist/cliproxy/auth/oauth-trace/sink-file.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts +13 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.js +31 -0
- package/dist/cliproxy/auth/oauth-trace/sink-memory.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts +11 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js +47 -0
- package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts +51 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.js +44 -0
- package/dist/cliproxy/auth/oauth-trace/trace-events.js.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts +34 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js +83 -0
- package/dist/cliproxy/auth/oauth-trace/trace-recorder.js.map +1 -0
- package/dist/cliproxy/auth/project-selection-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/project-selection-handler.js.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.d.ts +17 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.d.ts.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.js +55 -0
- package/dist/cliproxy/auth/provider-entitlement-evidence.js.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-types.d.ts +16 -0
- package/dist/cliproxy/auth/provider-entitlement-types.d.ts.map +1 -0
- package/dist/cliproxy/auth/provider-entitlement-types.js +3 -0
- package/dist/cliproxy/auth/provider-entitlement-types.js.map +1 -0
- package/dist/cliproxy/auth/provider-refreshers/index.d.ts +1 -2
- package/dist/cliproxy/auth/provider-refreshers/index.d.ts.map +1 -1
- package/dist/cliproxy/auth/provider-refreshers/index.js +7 -26
- package/dist/cliproxy/auth/provider-refreshers/index.js.map +1 -1
- package/dist/cliproxy/auth/token-expiry-checker.js +1 -1
- package/dist/cliproxy/auth/token-expiry-checker.js.map +1 -1
- package/dist/cliproxy/auth/token-manager.d.ts +11 -2
- package/dist/cliproxy/auth/token-manager.d.ts.map +1 -1
- package/dist/cliproxy/auth/token-manager.js +117 -68
- package/dist/cliproxy/auth/token-manager.js.map +1 -1
- package/dist/cliproxy/auth/token-refresh-config.d.ts.map +1 -1
- package/dist/cliproxy/auth/token-refresh-config.js +2 -2
- package/dist/cliproxy/auth/token-refresh-config.js.map +1 -1
- package/dist/cliproxy/binary/extractor.js +1 -1
- package/dist/cliproxy/binary/extractor.js.map +1 -1
- package/dist/cliproxy/binary/installer.d.ts +1 -1
- package/dist/cliproxy/binary/installer.d.ts.map +1 -1
- package/dist/cliproxy/binary/installer.js +1 -1
- package/dist/cliproxy/binary/installer.js.map +1 -1
- package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -1
- package/dist/cliproxy/binary/lifecycle.js +18 -6
- package/dist/cliproxy/binary/lifecycle.js.map +1 -1
- package/dist/cliproxy/binary/platform-detector.d.ts +106 -0
- package/dist/cliproxy/binary/platform-detector.d.ts.map +1 -0
- package/dist/cliproxy/binary/platform-detector.js +191 -0
- package/dist/cliproxy/binary/platform-detector.js.map +1 -0
- package/dist/cliproxy/binary/tar-extractor.d.ts.map +1 -1
- package/dist/cliproxy/binary/tar-extractor.js +1 -1
- package/dist/cliproxy/binary/tar-extractor.js.map +1 -1
- package/dist/cliproxy/binary/types.d.ts +3 -3
- package/dist/cliproxy/binary/types.d.ts.map +1 -1
- package/dist/cliproxy/binary/types.js +3 -3
- package/dist/cliproxy/binary/types.js.map +1 -1
- package/dist/cliproxy/binary/version-cache.d.ts +10 -0
- package/dist/cliproxy/binary/version-cache.d.ts.map +1 -1
- package/dist/cliproxy/binary/version-cache.js +31 -9
- package/dist/cliproxy/binary/version-cache.js.map +1 -1
- package/dist/cliproxy/binary/version-checker.d.ts +14 -3
- package/dist/cliproxy/binary/version-checker.d.ts.map +1 -1
- package/dist/cliproxy/binary/version-checker.js +66 -37
- package/dist/cliproxy/binary/version-checker.js.map +1 -1
- package/dist/cliproxy/binary/zip-extractor.d.ts.map +1 -1
- package/dist/cliproxy/binary/zip-extractor.js +1 -1
- package/dist/cliproxy/binary/zip-extractor.js.map +1 -1
- package/dist/cliproxy/binary-manager.d.ts +22 -1
- package/dist/cliproxy/binary-manager.d.ts.map +1 -1
- package/dist/cliproxy/binary-manager.js +126 -19
- package/dist/cliproxy/binary-manager.js.map +1 -1
- package/dist/cliproxy/config/base-config-loader.d.ts +43 -0
- package/dist/cliproxy/config/base-config-loader.d.ts.map +1 -0
- package/dist/cliproxy/config/base-config-loader.js +123 -0
- package/dist/cliproxy/config/base-config-loader.js.map +1 -0
- package/dist/cliproxy/config/composite-validator.d.ts.map +1 -0
- package/dist/cliproxy/config/composite-validator.js +94 -0
- package/dist/cliproxy/config/composite-validator.js.map +1 -0
- package/dist/cliproxy/config/config-generator.d.ts +15 -0
- package/dist/cliproxy/config/config-generator.d.ts.map +1 -0
- package/dist/cliproxy/config/config-generator.js +32 -0
- package/dist/cliproxy/config/config-generator.js.map +1 -0
- package/dist/cliproxy/config/env-builder.d.ts +6 -0
- package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
- package/dist/cliproxy/config/env-builder.js +60 -65
- package/dist/cliproxy/config/env-builder.js.map +1 -1
- package/dist/cliproxy/config/extended-context-config.d.ts +1 -0
- package/dist/cliproxy/config/extended-context-config.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.d.ts +14 -3
- package/dist/cliproxy/config/generator.d.ts.map +1 -1
- package/dist/cliproxy/config/generator.js +96 -19
- package/dist/cliproxy/config/generator.js.map +1 -1
- package/dist/cliproxy/config/model-config.d.ts +31 -0
- package/dist/cliproxy/config/model-config.d.ts.map +1 -0
- package/dist/cliproxy/config/model-config.js +264 -0
- package/dist/cliproxy/config/model-config.js.map +1 -0
- package/dist/cliproxy/config/path-resolver.d.ts +21 -0
- package/dist/cliproxy/config/path-resolver.d.ts.map +1 -1
- package/dist/cliproxy/config/path-resolver.js +45 -5
- package/dist/cliproxy/config/path-resolver.js.map +1 -1
- package/dist/cliproxy/config/port-manager.d.ts +6 -0
- package/dist/cliproxy/config/port-manager.d.ts.map +1 -1
- package/dist/cliproxy/config/port-manager.js +19 -1
- package/dist/cliproxy/config/port-manager.js.map +1 -1
- package/dist/cliproxy/config/thinking-config.d.ts +1 -0
- package/dist/cliproxy/config/thinking-config.d.ts.map +1 -1
- package/dist/cliproxy/config/thinking-config.js +21 -12
- package/dist/cliproxy/config/thinking-config.js.map +1 -1
- package/dist/cliproxy/executor/account-resolution.d.ts +52 -0
- package/dist/cliproxy/executor/account-resolution.d.ts.map +1 -0
- package/dist/cliproxy/executor/account-resolution.js +154 -0
- package/dist/cliproxy/executor/account-resolution.js.map +1 -0
- package/dist/cliproxy/executor/arg-parser.d.ts +96 -0
- package/dist/cliproxy/executor/arg-parser.d.ts.map +1 -0
- package/dist/cliproxy/executor/arg-parser.js +529 -0
- package/dist/cliproxy/executor/arg-parser.js.map +1 -0
- package/dist/cliproxy/executor/auth-coordinator.d.ts +96 -0
- package/dist/cliproxy/executor/auth-coordinator.d.ts.map +1 -0
- package/dist/cliproxy/executor/auth-coordinator.js +342 -0
- package/dist/cliproxy/executor/auth-coordinator.js.map +1 -0
- package/dist/cliproxy/executor/browser-launch-setup.d.ts +36 -0
- package/dist/cliproxy/executor/browser-launch-setup.d.ts.map +1 -0
- package/dist/cliproxy/executor/browser-launch-setup.js +80 -0
- package/dist/cliproxy/executor/browser-launch-setup.js.map +1 -0
- package/dist/cliproxy/executor/claude-launcher.d.ts +55 -0
- package/dist/cliproxy/executor/claude-launcher.d.ts.map +1 -0
- package/dist/cliproxy/executor/claude-launcher.js +125 -0
- package/dist/cliproxy/executor/claude-launcher.js.map +1 -0
- package/dist/cliproxy/executor/cliproxy-executor.d.ts +16 -0
- package/dist/cliproxy/executor/cliproxy-executor.d.ts.map +1 -0
- package/dist/cliproxy/executor/cliproxy-executor.js +27 -0
- package/dist/cliproxy/executor/cliproxy-executor.js.map +1 -0
- package/dist/cliproxy/executor/env-resolver.d.ts +7 -5
- package/dist/cliproxy/executor/env-resolver.d.ts.map +1 -1
- package/dist/cliproxy/executor/env-resolver.js +7 -6
- package/dist/cliproxy/executor/env-resolver.js.map +1 -1
- package/dist/cliproxy/executor/https-tunnel-policy.d.ts +17 -0
- package/dist/cliproxy/executor/https-tunnel-policy.d.ts.map +1 -0
- package/dist/cliproxy/executor/https-tunnel-policy.js +20 -0
- package/dist/cliproxy/executor/https-tunnel-policy.js.map +1 -0
- package/dist/cliproxy/executor/index.d.ts +6 -0
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +144 -693
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.js +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.js.map +1 -1
- package/dist/cliproxy/executor/model-warnings.d.ts +22 -0
- package/dist/cliproxy/executor/model-warnings.d.ts.map +1 -0
- package/dist/cliproxy/executor/model-warnings.js +67 -0
- package/dist/cliproxy/executor/model-warnings.js.map +1 -0
- package/dist/cliproxy/executor/proxy-chain-builder.d.ts +71 -0
- package/dist/cliproxy/executor/proxy-chain-builder.d.ts.map +1 -0
- package/dist/cliproxy/executor/proxy-chain-builder.js +143 -0
- package/dist/cliproxy/executor/proxy-chain-builder.js.map +1 -0
- package/dist/cliproxy/executor/proxy-resolver.d.ts +44 -0
- package/dist/cliproxy/executor/proxy-resolver.d.ts.map +1 -0
- package/dist/cliproxy/executor/proxy-resolver.js +173 -0
- package/dist/cliproxy/executor/proxy-resolver.js.map +1 -0
- package/dist/cliproxy/executor/retry-handler.js +4 -4
- package/dist/cliproxy/executor/retry-handler.js.map +1 -1
- package/dist/cliproxy/executor/session-bridge.d.ts +16 -1
- package/dist/cliproxy/executor/session-bridge.d.ts.map +1 -1
- package/dist/cliproxy/executor/session-bridge.js +92 -57
- package/dist/cliproxy/executor/session-bridge.js.map +1 -1
- package/dist/cliproxy/index.d.ts +32 -32
- package/dist/cliproxy/index.d.ts.map +1 -1
- package/dist/cliproxy/index.js +20 -20
- package/dist/cliproxy/index.js.map +1 -1
- package/dist/cliproxy/management/management-api-client.d.ts +90 -0
- package/dist/cliproxy/management/management-api-client.d.ts.map +1 -0
- package/dist/cliproxy/management/management-api-client.js +396 -0
- package/dist/cliproxy/management/management-api-client.js.map +1 -0
- package/dist/cliproxy/management/management-api-types.d.ts.map +1 -0
- package/dist/cliproxy/management/management-api-types.js.map +1 -0
- package/dist/cliproxy/management/remote-token-uploader.d.ts.map +1 -0
- package/dist/cliproxy/management/remote-token-uploader.js +178 -0
- package/dist/cliproxy/management/remote-token-uploader.js.map +1 -0
- package/dist/cliproxy/model-catalog.d.ts +3 -1
- package/dist/cliproxy/model-catalog.d.ts.map +1 -1
- package/dist/cliproxy/model-catalog.js +60 -59
- package/dist/cliproxy/model-catalog.js.map +1 -1
- package/dist/cliproxy/provider-capabilities.d.ts +3 -0
- package/dist/cliproxy/provider-capabilities.d.ts.map +1 -1
- package/dist/cliproxy/provider-capabilities.js +63 -3
- package/dist/cliproxy/provider-capabilities.js.map +1 -1
- package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts.map +1 -0
- package/dist/cliproxy/proxy/https-tunnel-proxy.js +229 -0
- package/dist/cliproxy/proxy/https-tunnel-proxy.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.d.ts +87 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.js +254 -0
- package/dist/cliproxy/proxy/proxy-config-resolver.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-detector.d.ts +72 -0
- package/dist/cliproxy/proxy/proxy-detector.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-detector.js +200 -0
- package/dist/cliproxy/proxy/proxy-detector.js.map +1 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.d.ts.map +1 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.js +108 -0
- package/dist/cliproxy/proxy/proxy-target-resolver.js.map +1 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts +82 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts.map +1 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js +668 -0
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js.map +1 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.js +122 -0
- package/dist/cliproxy/quota/gemini-cli-quota-normalizer.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.d.ts +14 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.js +322 -0
- package/dist/cliproxy/quota/quota-fetcher-claude-normalizer.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts +21 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.js +292 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts +84 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.js +651 -0
- package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js +828 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js +218 -0
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher.d.ts +117 -0
- package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher.js +771 -0
- package/dist/cliproxy/quota/quota-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-manager.d.ts +109 -0
- package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-manager.js +672 -0
- package/dist/cliproxy/quota/quota-manager.js.map +1 -0
- package/dist/cliproxy/quota/quota-response-cache.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-response-cache.js.map +1 -0
- package/dist/cliproxy/quota/quota-types.d.ts +262 -0
- package/dist/cliproxy/quota/quota-types.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-types.js.map +1 -0
- package/dist/cliproxy/routing/routing-strategy-http.d.ts +8 -0
- package/dist/cliproxy/routing/routing-strategy-http.d.ts.map +1 -0
- package/dist/cliproxy/routing/routing-strategy-http.js +120 -0
- package/dist/cliproxy/routing/routing-strategy-http.js.map +1 -0
- package/dist/cliproxy/routing/routing-strategy.d.ts +41 -0
- package/dist/cliproxy/routing/routing-strategy.d.ts.map +1 -0
- package/dist/cliproxy/routing/routing-strategy.js +272 -0
- package/dist/cliproxy/routing/routing-strategy.js.map +1 -0
- package/dist/cliproxy/service-manager.d.ts +17 -1
- package/dist/cliproxy/service-manager.d.ts.map +1 -1
- package/dist/cliproxy/service-manager.js +19 -11
- package/dist/cliproxy/service-manager.js.map +1 -1
- package/dist/cliproxy/services/binary-service.d.ts.map +1 -1
- package/dist/cliproxy/services/binary-service.js +16 -9
- package/dist/cliproxy/services/binary-service.js.map +1 -1
- package/dist/cliproxy/services/catalog-cache.d.ts +47 -0
- package/dist/cliproxy/services/catalog-cache.d.ts.map +1 -0
- package/dist/cliproxy/services/catalog-cache.js +347 -0
- package/dist/cliproxy/services/catalog-cache.js.map +1 -0
- package/dist/cliproxy/services/catalog-routing.d.ts +12 -0
- package/dist/cliproxy/services/catalog-routing.d.ts.map +1 -0
- package/dist/cliproxy/services/catalog-routing.js +19 -0
- package/dist/cliproxy/services/catalog-routing.js.map +1 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts +4 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.js +162 -0
- package/dist/cliproxy/services/oauth-usage-log-transformer.js.map +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts.map +1 -1
- package/dist/cliproxy/services/proxy-lifecycle-service.js +6 -6
- package/dist/cliproxy/services/proxy-lifecycle-service.js.map +1 -1
- package/dist/cliproxy/services/remote-auth-fetcher.d.ts +30 -0
- package/dist/cliproxy/services/remote-auth-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/services/remote-auth-fetcher.js +177 -0
- package/dist/cliproxy/services/remote-auth-fetcher.js.map +1 -0
- package/dist/cliproxy/services/remote-proxy-client.d.ts.map +1 -0
- package/dist/cliproxy/services/remote-proxy-client.js +281 -0
- package/dist/cliproxy/services/remote-proxy-client.js.map +1 -0
- package/dist/cliproxy/services/startup-lock.d.ts.map +1 -0
- package/dist/cliproxy/services/startup-lock.js +220 -0
- package/dist/cliproxy/services/startup-lock.js.map +1 -0
- package/dist/cliproxy/services/stats-fetcher.d.ts +162 -0
- package/dist/cliproxy/services/stats-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/services/stats-fetcher.js +354 -0
- package/dist/cliproxy/services/stats-fetcher.js.map +1 -0
- package/dist/cliproxy/services/stats-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/stats-transformer.js +224 -0
- package/dist/cliproxy/services/stats-transformer.js.map +1 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.d.ts +12 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.d.ts.map +1 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.js +458 -0
- package/dist/cliproxy/services/usage-compatibility-transformer.js.map +1 -0
- package/dist/cliproxy/services/variant-config-adapter.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-config-adapter.js +11 -11
- package/dist/cliproxy/services/variant-config-adapter.js.map +1 -1
- package/dist/cliproxy/services/variant-service.d.ts +2 -1
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-service.js +21 -24
- package/dist/cliproxy/services/variant-service.js.map +1 -1
- package/dist/cliproxy/services/variant-settings.d.ts.map +1 -1
- package/dist/cliproxy/services/variant-settings.js +53 -42
- package/dist/cliproxy/services/variant-settings.js.map +1 -1
- package/dist/cliproxy/session-tracker.js +2 -2
- package/dist/cliproxy/session-tracker.js.map +1 -1
- package/dist/cliproxy/sync/auto-sync-watcher.js +3 -4
- package/dist/cliproxy/sync/auto-sync-watcher.js.map +1 -1
- package/dist/cliproxy/sync/local-config-sync.js +1 -1
- package/dist/cliproxy/sync/local-config-sync.js.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts +1 -1
- package/dist/cliproxy/sync/profile-mapper.d.ts.map +1 -1
- package/dist/cliproxy/sync/profile-mapper.js +23 -2
- package/dist/cliproxy/sync/profile-mapper.js.map +1 -1
- package/dist/cliproxy/thinking-validator.d.ts +6 -1
- package/dist/cliproxy/thinking-validator.d.ts.map +1 -1
- package/dist/cliproxy/thinking-validator.js +22 -2
- package/dist/cliproxy/thinking-validator.js.map +1 -1
- package/dist/cliproxy/types/binary-types.d.ts +48 -0
- package/dist/cliproxy/types/binary-types.d.ts.map +1 -0
- package/dist/cliproxy/types/binary-types.js +6 -0
- package/dist/cliproxy/types/binary-types.js.map +1 -0
- package/dist/cliproxy/types/config-types.d.ts +89 -0
- package/dist/cliproxy/types/config-types.d.ts.map +1 -0
- package/dist/cliproxy/types/config-types.js +6 -0
- package/dist/cliproxy/types/config-types.js.map +1 -0
- package/dist/cliproxy/types/index.d.ts +5 -0
- package/dist/cliproxy/types/index.d.ts.map +1 -0
- package/dist/cliproxy/types/index.js +21 -0
- package/dist/cliproxy/types/index.js.map +1 -0
- package/dist/cliproxy/types/platform-types.d.ts +17 -0
- package/dist/cliproxy/types/platform-types.d.ts.map +1 -0
- package/dist/cliproxy/types/platform-types.js +6 -0
- package/dist/cliproxy/types/platform-types.js.map +1 -0
- package/dist/cliproxy/types/provider-types.d.ts +27 -0
- package/dist/cliproxy/types/provider-types.d.ts.map +1 -0
- package/dist/cliproxy/types/provider-types.js +16 -0
- package/dist/cliproxy/types/provider-types.js.map +1 -0
- package/dist/cliproxy/types.d.ts +4 -255
- package/dist/cliproxy/types.d.ts.map +1 -1
- package/dist/cliproxy/types.js +18 -7
- package/dist/cliproxy/types.js.map +1 -1
- package/dist/commands/api-command/create-command.d.ts +3 -0
- package/dist/commands/api-command/create-command.d.ts.map +1 -1
- package/dist/commands/api-command/create-command.js +24 -7
- package/dist/commands/api-command/create-command.js.map +1 -1
- package/dist/commands/api-command/help.d.ts.map +1 -1
- package/dist/commands/api-command/help.js +5 -0
- package/dist/commands/api-command/help.js.map +1 -1
- package/dist/commands/api-command/shared.d.ts +2 -1
- package/dist/commands/api-command/shared.d.ts.map +1 -1
- package/dist/commands/api-command/shared.js +9 -0
- package/dist/commands/api-command/shared.js.map +1 -1
- package/dist/commands/browser-command.d.ts +5 -0
- package/dist/commands/browser-command.d.ts.map +1 -0
- package/dist/commands/browser-command.js +349 -0
- package/dist/commands/browser-command.js.map +1 -0
- package/dist/commands/cleanup-command.d.ts +1 -1
- package/dist/commands/cleanup-command.d.ts.map +1 -1
- package/dist/commands/cleanup-command.js +58 -35
- package/dist/commands/cleanup-command.js.map +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js +1 -1
- package/dist/commands/cliproxy/auth-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/catalog-subcommand.d.ts +6 -0
- package/dist/commands/cliproxy/catalog-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/catalog-subcommand.js +112 -46
- package/dist/commands/cliproxy/catalog-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/help-subcommand.js +15 -4
- package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/index.d.ts.map +1 -1
- package/dist/commands/cliproxy/index.js +35 -7
- package/dist/commands/cliproxy/index.js.map +1 -1
- package/dist/commands/cliproxy/install-subcommand.js +2 -2
- package/dist/commands/cliproxy/install-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js +6 -6
- package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts +3 -1
- package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.js +95 -32
- package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
- package/dist/commands/cliproxy/routing-subcommand.d.ts +7 -0
- package/dist/commands/cliproxy/routing-subcommand.d.ts.map +1 -0
- package/dist/commands/cliproxy/routing-subcommand.js +193 -0
- package/dist/commands/cliproxy/routing-subcommand.js.map +1 -0
- package/dist/commands/cliproxy/variant-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/variant-subcommand.js +86 -13
- package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
- package/dist/commands/command-catalog.d.ts +6 -5
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +45 -8
- 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 +62 -1
- package/dist/commands/completion-backend.js.map +1 -1
- package/dist/commands/config-auth/disable-command.d.ts.map +1 -1
- package/dist/commands/config-auth/disable-command.js +3 -3
- package/dist/commands/config-auth/disable-command.js.map +1 -1
- package/dist/commands/config-auth/setup-command.d.ts.map +1 -1
- package/dist/commands/config-auth/setup-command.js +2 -2
- package/dist/commands/config-auth/setup-command.js.map +1 -1
- package/dist/commands/config-auth/show-command.js +2 -2
- package/dist/commands/config-auth/show-command.js.map +1 -1
- package/dist/commands/config-channels-command.d.ts.map +1 -1
- package/dist/commands/config-channels-command.js +4 -4
- package/dist/commands/config-channels-command.js.map +1 -1
- package/dist/commands/config-command-options.d.ts.map +1 -1
- package/dist/commands/config-command-options.js +4 -2
- package/dist/commands/config-command-options.js.map +1 -1
- package/dist/commands/config-command.d.ts +1 -1
- package/dist/commands/config-command.d.ts.map +1 -1
- package/dist/commands/config-command.js +28 -5
- package/dist/commands/config-command.js.map +1 -1
- package/dist/commands/config-dashboard-host.d.ts +1 -0
- package/dist/commands/config-dashboard-host.d.ts.map +1 -1
- package/dist/commands/config-dashboard-host.js +16 -3
- package/dist/commands/config-dashboard-host.js.map +1 -1
- package/dist/commands/config-image-analysis-command.d.ts.map +1 -1
- package/dist/commands/config-image-analysis-command.js +4 -4
- package/dist/commands/config-image-analysis-command.js.map +1 -1
- package/dist/commands/config-thinking-command.d.ts.map +1 -1
- package/dist/commands/config-thinking-command.js +5 -5
- package/dist/commands/config-thinking-command.js.map +1 -1
- package/dist/commands/copilot-command.d.ts.map +1 -1
- package/dist/commands/copilot-command.js +7 -5
- package/dist/commands/copilot-command.js.map +1 -1
- package/dist/commands/cursor-command-display.d.ts +2 -0
- package/dist/commands/cursor-command-display.d.ts.map +1 -1
- package/dist/commands/cursor-command-display.js +63 -29
- package/dist/commands/cursor-command-display.js.map +1 -1
- package/dist/commands/cursor-command.d.ts.map +1 -1
- package/dist/commands/cursor-command.js +67 -20
- package/dist/commands/cursor-command.js.map +1 -1
- package/dist/commands/cursor-usage-display.d.ts +29 -0
- package/dist/commands/cursor-usage-display.d.ts.map +1 -0
- package/dist/commands/cursor-usage-display.js +107 -0
- package/dist/commands/cursor-usage-display.js.map +1 -0
- package/dist/commands/docker/up-subcommand.js +1 -1
- package/dist/commands/docker/up-subcommand.js.map +1 -1
- package/dist/commands/doctor-command.d.ts.map +1 -1
- package/dist/commands/doctor-command.js +9 -0
- package/dist/commands/doctor-command.js.map +1 -1
- package/dist/commands/env-command.d.ts.map +1 -1
- package/dist/commands/env-command.js +2 -2
- package/dist/commands/env-command.js.map +1 -1
- package/dist/commands/help-command.d.ts +2 -0
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +126 -5
- package/dist/commands/help-command.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/migrate-command.d.ts.map +1 -1
- package/dist/commands/migrate-command.js +2 -2
- package/dist/commands/migrate-command.js.map +1 -1
- package/dist/commands/proxy-command.d.ts +3 -0
- package/dist/commands/proxy-command.d.ts.map +1 -0
- package/dist/commands/proxy-command.js +237 -0
- package/dist/commands/proxy-command.js.map +1 -0
- package/dist/commands/root-command-router.d.ts.map +1 -1
- package/dist/commands/root-command-router.js +14 -0
- package/dist/commands/root-command-router.js.map +1 -1
- package/dist/commands/setup-command.d.ts.map +1 -1
- package/dist/commands/setup-command.js +6 -7
- package/dist/commands/setup-command.js.map +1 -1
- package/dist/commands/sync-command.d.ts.map +1 -1
- package/dist/commands/sync-command.js +3 -2
- package/dist/commands/sync-command.js.map +1 -1
- package/dist/commands/tokens-command.d.ts.map +1 -1
- package/dist/commands/tokens-command.js +27 -38
- package/dist/commands/tokens-command.js.map +1 -1
- package/dist/commands/update-command.d.ts +22 -5
- package/dist/commands/update-command.d.ts.map +1 -1
- package/dist/commands/update-command.js +211 -159
- package/dist/commands/update-command.js.map +1 -1
- package/dist/commands/version-command.d.ts.map +1 -1
- package/dist/commands/version-command.js +2 -1
- package/dist/commands/version-command.js.map +1 -1
- package/dist/config/config-loader-facade.d.ts +57 -0
- package/dist/config/config-loader-facade.d.ts.map +1 -0
- package/dist/config/config-loader-facade.js +131 -0
- package/dist/config/config-loader-facade.js.map +1 -0
- package/dist/config/loader/config-getters.d.ts +121 -0
- package/dist/config/loader/config-getters.d.ts.map +1 -0
- package/dist/config/loader/config-getters.js +260 -0
- package/dist/config/loader/config-getters.js.map +1 -0
- package/dist/config/loader/defaults-merger.d.ts +21 -0
- package/dist/config/loader/defaults-merger.d.ts.map +1 -0
- package/dist/config/loader/defaults-merger.js +278 -0
- package/dist/config/loader/defaults-merger.js.map +1 -0
- package/dist/config/loader/io-locks.d.ts +76 -0
- package/dist/config/loader/io-locks.d.ts.map +1 -0
- package/dist/config/loader/io-locks.js +297 -0
- package/dist/config/loader/io-locks.js.map +1 -0
- package/dist/config/loader/normalizers.d.ts +40 -0
- package/dist/config/loader/normalizers.d.ts.map +1 -0
- package/dist/config/loader/normalizers.js +172 -0
- package/dist/config/loader/normalizers.js.map +1 -0
- package/dist/config/loader/yaml-serializer.d.ts +19 -0
- package/dist/config/loader/yaml-serializer.d.ts.map +1 -0
- package/dist/config/loader/yaml-serializer.js +301 -0
- package/dist/config/loader/yaml-serializer.js.map +1 -0
- package/dist/config/migration-manager.d.ts.map +1 -1
- package/dist/config/migration-manager.js +14 -1
- package/dist/config/migration-manager.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 +10 -0
- package/dist/config/reserved-names.js.map +1 -1
- package/dist/config/schemas/auth.d.ts +99 -0
- package/dist/config/schemas/auth.d.ts.map +1 -0
- package/dist/config/schemas/auth.js +25 -0
- package/dist/config/schemas/auth.js.map +1 -0
- package/dist/config/schemas/browser.d.ts +53 -0
- package/dist/config/schemas/browser.d.ts.map +1 -0
- package/dist/config/schemas/browser.js +27 -0
- package/dist/config/schemas/browser.js.map +1 -0
- package/dist/config/schemas/channels.d.ts +27 -0
- package/dist/config/schemas/channels.d.ts.map +1 -0
- package/dist/config/schemas/channels.js +19 -0
- package/dist/config/schemas/channels.js.map +1 -0
- package/dist/config/schemas/cliproxy.d.ts +142 -0
- package/dist/config/schemas/cliproxy.d.ts.map +1 -0
- package/dist/config/schemas/cliproxy.js +18 -0
- package/dist/config/schemas/cliproxy.js.map +1 -0
- package/dist/config/schemas/copilot-cursor.d.ts +75 -0
- package/dist/config/schemas/copilot-cursor.d.ts.map +1 -0
- package/dist/config/schemas/copilot-cursor.js +36 -0
- package/dist/config/schemas/copilot-cursor.js.map +1 -0
- package/dist/config/schemas/index.d.ts +28 -0
- package/dist/config/schemas/index.d.ts.map +1 -0
- package/dist/config/schemas/index.js +51 -0
- package/dist/config/schemas/index.js.map +1 -0
- package/dist/config/schemas/logging.d.ts +43 -0
- package/dist/config/schemas/logging.d.ts.map +1 -0
- package/dist/config/schemas/logging.js +23 -0
- package/dist/config/schemas/logging.js.map +1 -0
- package/dist/config/schemas/providers.d.ts +14 -0
- package/dist/config/schemas/providers.d.ts.map +1 -0
- package/dist/config/schemas/providers.js +21 -0
- package/dist/config/schemas/providers.js.map +1 -0
- package/dist/config/schemas/proxy-server.d.ts +141 -0
- package/dist/config/schemas/proxy-server.d.ts.map +1 -0
- package/dist/config/schemas/proxy-server.js +71 -0
- package/dist/config/schemas/proxy-server.js.map +1 -0
- package/dist/config/schemas/quota.d.ts +88 -0
- package/dist/config/schemas/quota.d.ts.map +1 -0
- package/dist/config/schemas/quota.js +47 -0
- package/dist/config/schemas/quota.js.map +1 -0
- package/dist/config/schemas/thinking.d.ts +50 -0
- package/dist/config/schemas/thinking.d.ts.map +1 -0
- package/dist/config/schemas/thinking.js +26 -0
- package/dist/config/schemas/thinking.js.map +1 -0
- package/dist/config/schemas/unified-config.d.ts +74 -0
- package/dist/config/schemas/unified-config.d.ts.map +1 -0
- package/dist/config/schemas/unified-config.js +131 -0
- package/dist/config/schemas/unified-config.js.map +1 -0
- package/dist/config/schemas/version.d.ts +23 -0
- package/dist/config/schemas/version.d.ts.map +1 -0
- package/dist/config/schemas/version.js +26 -0
- package/dist/config/schemas/version.js.map +1 -0
- package/dist/config/schemas/websearch.d.ts +138 -0
- package/dist/config/schemas/websearch.d.ts.map +1 -0
- package/dist/config/schemas/websearch.js +12 -0
- package/dist/config/schemas/websearch.js.map +1 -0
- package/dist/config/unified-config-loader.d.ts +21 -113
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +104 -935
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +3 -723
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +19 -268
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/copilot/copilot-auth.d.ts.map +1 -1
- package/dist/copilot/copilot-auth.js +22 -0
- package/dist/copilot/copilot-auth.js.map +1 -1
- package/dist/copilot/copilot-daemon.d.ts.map +1 -1
- package/dist/copilot/copilot-daemon.js +28 -2
- package/dist/copilot/copilot-daemon.js.map +1 -1
- package/dist/copilot/copilot-executor.d.ts +1 -1
- package/dist/copilot/copilot-executor.d.ts.map +1 -1
- package/dist/copilot/copilot-executor.js +31 -12
- package/dist/copilot/copilot-executor.js.map +1 -1
- package/dist/copilot/copilot-package-manager.js +2 -2
- package/dist/copilot/copilot-package-manager.js.map +1 -1
- package/dist/cursor/constants.d.ts +4 -1
- package/dist/cursor/constants.d.ts.map +1 -1
- package/dist/cursor/constants.js +28 -1
- package/dist/cursor/constants.js.map +1 -1
- package/dist/cursor/cursor-anthropic-response.d.ts +1 -5
- package/dist/cursor/cursor-anthropic-response.d.ts.map +1 -1
- package/dist/cursor/cursor-anthropic-response.js +3 -186
- package/dist/cursor/cursor-anthropic-response.js.map +1 -1
- package/dist/cursor/cursor-anthropic-translator.d.ts.map +1 -1
- package/dist/cursor/cursor-anthropic-translator.js +17 -3
- package/dist/cursor/cursor-anthropic-translator.js.map +1 -1
- package/dist/cursor/cursor-anthropic-types.d.ts +3 -0
- package/dist/cursor/cursor-anthropic-types.d.ts.map +1 -1
- package/dist/cursor/cursor-auth.d.ts +1 -0
- package/dist/cursor/cursor-auth.d.ts.map +1 -1
- package/dist/cursor/cursor-auth.js +156 -34
- package/dist/cursor/cursor-auth.js.map +1 -1
- package/dist/cursor/cursor-daemon-entry.js +2 -2
- package/dist/cursor/cursor-daemon-entry.js.map +1 -1
- package/dist/cursor/cursor-daemon-pid.js +2 -2
- package/dist/cursor/cursor-daemon-pid.js.map +1 -1
- package/dist/cursor/cursor-daemon.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon.js +28 -1
- package/dist/cursor/cursor-daemon.js.map +1 -1
- package/dist/cursor/cursor-default-models.d.ts +1 -1
- package/dist/cursor/cursor-default-models.d.ts.map +1 -1
- package/dist/cursor/cursor-default-models.js +11 -1
- package/dist/cursor/cursor-default-models.js.map +1 -1
- package/dist/cursor/cursor-executor.d.ts +2 -1
- package/dist/cursor/cursor-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-executor.js +312 -161
- package/dist/cursor/cursor-executor.js.map +1 -1
- package/dist/cursor/cursor-models.d.ts.map +1 -1
- package/dist/cursor/cursor-models.js +26 -4
- package/dist/cursor/cursor-models.js.map +1 -1
- package/dist/cursor/cursor-profile-executor.d.ts +10 -1
- package/dist/cursor/cursor-profile-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-profile-executor.js +14 -10
- package/dist/cursor/cursor-profile-executor.js.map +1 -1
- package/dist/cursor/cursor-protobuf-decoder.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf-decoder.js +1 -3
- package/dist/cursor/cursor-protobuf-decoder.js.map +1 -1
- package/dist/cursor/cursor-protobuf-schema.d.ts +12 -3
- package/dist/cursor/cursor-protobuf-schema.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf-schema.js +23 -5
- package/dist/cursor/cursor-protobuf-schema.js.map +1 -1
- package/dist/cursor/cursor-protobuf.d.ts +1 -1
- package/dist/cursor/cursor-protobuf.d.ts.map +1 -1
- package/dist/cursor/cursor-protobuf.js +2 -4
- package/dist/cursor/cursor-protobuf.js.map +1 -1
- package/dist/cursor/cursor-runtime-probe.d.ts +12 -0
- package/dist/cursor/cursor-runtime-probe.d.ts.map +1 -0
- package/dist/cursor/cursor-runtime-probe.js +220 -0
- package/dist/cursor/cursor-runtime-probe.js.map +1 -0
- package/dist/cursor/cursor-stream-parser.d.ts +10 -0
- package/dist/cursor/cursor-stream-parser.d.ts.map +1 -1
- package/dist/cursor/cursor-stream-parser.js +106 -10
- package/dist/cursor/cursor-stream-parser.js.map +1 -1
- package/dist/cursor/index.d.ts +1 -0
- package/dist/cursor/index.d.ts.map +1 -1
- package/dist/cursor/index.js +3 -1
- package/dist/cursor/index.js.map +1 -1
- package/dist/cursor/types.d.ts +6 -0
- package/dist/cursor/types.d.ts.map +1 -1
- package/dist/delegation/delegation-handler.d.ts.map +1 -1
- package/dist/delegation/delegation-handler.js +113 -36
- package/dist/delegation/delegation-handler.js.map +1 -1
- package/dist/delegation/headless-executor.d.ts.map +1 -1
- package/dist/delegation/headless-executor.js +67 -22
- package/dist/delegation/headless-executor.js.map +1 -1
- package/dist/delegation/session-manager.js +2 -2
- package/dist/delegation/session-manager.js.map +1 -1
- package/dist/dispatcher/cli-argument-parser.d.ts +70 -0
- package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -0
- package/dist/dispatcher/cli-argument-parser.js +285 -0
- package/dist/dispatcher/cli-argument-parser.js.map +1 -0
- package/dist/dispatcher/dispatcher-context.d.ts +24 -0
- package/dist/dispatcher/dispatcher-context.d.ts.map +1 -0
- package/dist/dispatcher/dispatcher-context.js +11 -0
- package/dist/dispatcher/dispatcher-context.js.map +1 -0
- package/dist/dispatcher/environment-builder.d.ts +20 -0
- package/dist/dispatcher/environment-builder.d.ts.map +1 -0
- package/dist/dispatcher/environment-builder.js +95 -0
- package/dist/dispatcher/environment-builder.js.map +1 -0
- package/dist/dispatcher/flows/account-flow.d.ts +9 -0
- package/dist/dispatcher/flows/account-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/account-flow.js +50 -0
- package/dist/dispatcher/flows/account-flow.js.map +1 -0
- package/dist/dispatcher/flows/cliproxy-flow.d.ts +8 -0
- package/dist/dispatcher/flows/cliproxy-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/cliproxy-flow.js +165 -0
- package/dist/dispatcher/flows/cliproxy-flow.js.map +1 -0
- package/dist/dispatcher/flows/copilot-flow.d.ts +8 -0
- package/dist/dispatcher/flows/copilot-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/copilot-flow.js +72 -0
- package/dist/dispatcher/flows/copilot-flow.js.map +1 -0
- package/dist/dispatcher/flows/cursor-flow.d.ts +8 -0
- package/dist/dispatcher/flows/cursor-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/cursor-flow.js +62 -0
- package/dist/dispatcher/flows/cursor-flow.js.map +1 -0
- package/dist/dispatcher/flows/default-flow.d.ts +10 -0
- package/dist/dispatcher/flows/default-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/default-flow.js +99 -0
- package/dist/dispatcher/flows/default-flow.js.map +1 -0
- package/dist/dispatcher/flows/settings-flow.d.ts +9 -0
- package/dist/dispatcher/flows/settings-flow.d.ts.map +1 -0
- package/dist/dispatcher/flows/settings-flow.js +329 -0
- package/dist/dispatcher/flows/settings-flow.js.map +1 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.d.ts +28 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.d.ts.map +1 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.js +81 -0
- package/dist/dispatcher/flows/settings-image-analysis-prep.js.map +1 -0
- package/dist/dispatcher/pre-dispatch.d.ts +23 -0
- package/dist/dispatcher/pre-dispatch.d.ts.map +1 -0
- package/dist/dispatcher/pre-dispatch.js +156 -0
- package/dist/dispatcher/pre-dispatch.js.map +1 -0
- package/dist/dispatcher/profile-resolver.d.ts +65 -0
- package/dist/dispatcher/profile-resolver.d.ts.map +1 -0
- package/dist/dispatcher/profile-resolver.js +303 -0
- package/dist/dispatcher/profile-resolver.js.map +1 -0
- package/dist/dispatcher/target-executor.d.ts +26 -0
- package/dist/dispatcher/target-executor.d.ts.map +1 -0
- package/dist/dispatcher/target-executor.js +81 -0
- package/dist/dispatcher/target-executor.js.map +1 -0
- package/dist/docker/docker-assets.d.ts.map +1 -1
- package/dist/docker/docker-assets.js +2 -2
- package/dist/docker/docker-assets.js.map +1 -1
- package/dist/docker/docker-bootstrap.js +1 -1
- package/dist/docker/docker-bootstrap.js.map +1 -1
- package/dist/docker/docker-executor.d.ts +1 -0
- package/dist/docker/docker-executor.d.ts.map +1 -1
- package/dist/docker/supervisord-lifecycle.d.ts +17 -0
- package/dist/docker/supervisord-lifecycle.d.ts.map +1 -0
- package/dist/docker/supervisord-lifecycle.js +58 -0
- package/dist/docker/supervisord-lifecycle.js.map +1 -0
- package/dist/errors/error-handler.d.ts.map +1 -1
- package/dist/errors/error-handler.js +13 -0
- package/dist/errors/error-handler.js.map +1 -1
- package/dist/errors/error-types.d.ts +9 -0
- package/dist/errors/error-types.d.ts.map +1 -1
- package/dist/errors/error-types.js +15 -1
- package/dist/errors/error-types.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +3 -1
- package/dist/errors/index.js.map +1 -1
- package/dist/glmt/delta-accumulator.d.ts +4 -0
- package/dist/glmt/delta-accumulator.d.ts.map +1 -1
- package/dist/glmt/delta-accumulator.js +17 -5
- package/dist/glmt/delta-accumulator.js.map +1 -1
- package/dist/glmt/glmt-proxy.d.ts.map +1 -1
- package/dist/glmt/glmt-proxy.js +7 -0
- package/dist/glmt/glmt-proxy.js.map +1 -1
- package/dist/glmt/glmt-transformer.d.ts +1 -0
- package/dist/glmt/glmt-transformer.d.ts.map +1 -1
- package/dist/glmt/glmt-transformer.js +9 -2
- package/dist/glmt/glmt-transformer.js.map +1 -1
- package/dist/glmt/pipeline/stream-parser.d.ts +0 -3
- package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -1
- package/dist/glmt/pipeline/stream-parser.js +20 -27
- package/dist/glmt/pipeline/stream-parser.js.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.d.ts +0 -7
- package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.js +15 -24
- package/dist/glmt/pipeline/tool-call-handler.js.map +1 -1
- package/dist/glmt/sse-parser.d.ts.map +1 -1
- package/dist/glmt/sse-parser.js +46 -41
- package/dist/glmt/sse-parser.js.map +1 -1
- package/dist/management/checks/config-check.d.ts.map +1 -1
- package/dist/management/checks/config-check.js +2 -2
- package/dist/management/checks/config-check.js.map +1 -1
- package/dist/management/checks/env-check.d.ts.map +1 -1
- package/dist/management/checks/env-check.js +2 -1
- package/dist/management/checks/env-check.js.map +1 -1
- package/dist/management/checks/image-analysis-check.d.ts.map +1 -1
- package/dist/management/checks/image-analysis-check.js +25 -7
- package/dist/management/checks/image-analysis-check.js.map +1 -1
- package/dist/management/checks/profile-check.d.ts.map +1 -1
- package/dist/management/checks/profile-check.js +6 -7
- package/dist/management/checks/profile-check.js.map +1 -1
- package/dist/management/checks/symlink-check.d.ts.map +1 -1
- package/dist/management/checks/symlink-check.js +4 -5
- package/dist/management/checks/symlink-check.js.map +1 -1
- package/dist/management/checks/system-check.d.ts.map +1 -1
- package/dist/management/checks/system-check.js +3 -3
- package/dist/management/checks/system-check.js.map +1 -1
- package/dist/management/instance-directory.d.ts +4 -0
- package/dist/management/instance-directory.d.ts.map +1 -0
- package/dist/management/instance-directory.js +54 -0
- package/dist/management/instance-directory.js.map +1 -0
- package/dist/management/instance-manager.d.ts.map +1 -1
- package/dist/management/instance-manager.js +18 -13
- package/dist/management/instance-manager.js.map +1 -1
- package/dist/management/plugin-path-normalizer.d.ts +7 -0
- package/dist/management/plugin-path-normalizer.d.ts.map +1 -0
- package/dist/management/plugin-path-normalizer.js +82 -0
- package/dist/management/plugin-path-normalizer.js.map +1 -0
- package/dist/management/recovery-manager.d.ts +6 -0
- package/dist/management/recovery-manager.d.ts.map +1 -1
- package/dist/management/recovery-manager.js +77 -7
- package/dist/management/recovery-manager.js.map +1 -1
- package/dist/management/repair/auto-repair.d.ts.map +1 -1
- package/dist/management/repair/auto-repair.js +2 -2
- package/dist/management/repair/auto-repair.js.map +1 -1
- package/dist/management/shared-manager.d.ts +3 -2
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +41 -84
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/proxy/index.d.ts +9 -0
- package/dist/proxy/index.d.ts.map +1 -0
- package/dist/proxy/index.js +25 -0
- package/dist/proxy/index.js.map +1 -0
- package/dist/proxy/profile-router.d.ts +28 -0
- package/dist/proxy/profile-router.d.ts.map +1 -0
- package/dist/proxy/profile-router.js +43 -0
- package/dist/proxy/profile-router.js.map +1 -0
- package/dist/proxy/proxy-daemon-entry.d.ts +2 -0
- package/dist/proxy/proxy-daemon-entry.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-entry.js +112 -0
- package/dist/proxy/proxy-daemon-entry.js.map +1 -0
- package/dist/proxy/proxy-daemon-paths.d.ts +12 -0
- package/dist/proxy/proxy-daemon-paths.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-paths.js +58 -0
- package/dist/proxy/proxy-daemon-paths.js.map +1 -0
- package/dist/proxy/proxy-daemon-state.d.ts +25 -0
- package/dist/proxy/proxy-daemon-state.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon-state.js +199 -0
- package/dist/proxy/proxy-daemon-state.js.map +1 -0
- package/dist/proxy/proxy-daemon.d.ts +27 -0
- package/dist/proxy/proxy-daemon.d.ts.map +1 -0
- package/dist/proxy/proxy-daemon.js +614 -0
- package/dist/proxy/proxy-daemon.js.map +1 -0
- package/dist/proxy/proxy-env.d.ts +3 -0
- package/dist/proxy/proxy-env.d.ts.map +1 -0
- package/dist/proxy/proxy-env.js +26 -0
- package/dist/proxy/proxy-env.js.map +1 -0
- package/dist/proxy/proxy-port-resolver.d.ts +9 -0
- package/dist/proxy/proxy-port-resolver.d.ts.map +1 -0
- package/dist/proxy/proxy-port-resolver.js +62 -0
- package/dist/proxy/proxy-port-resolver.js.map +1 -0
- package/dist/proxy/request-router.d.ts +12 -0
- package/dist/proxy/request-router.d.ts.map +1 -0
- package/dist/proxy/request-router.js +163 -0
- package/dist/proxy/request-router.js.map +1 -0
- package/dist/proxy/routing-config.d.ts +10 -0
- package/dist/proxy/routing-config.d.ts.map +1 -0
- package/dist/proxy/routing-config.js +79 -0
- package/dist/proxy/routing-config.js.map +1 -0
- package/dist/proxy/server/http-helpers.d.ts +8 -0
- package/dist/proxy/server/http-helpers.d.ts.map +1 -0
- package/dist/proxy/server/http-helpers.js +73 -0
- package/dist/proxy/server/http-helpers.js.map +1 -0
- package/dist/proxy/server/messages-route.d.ts +12 -0
- package/dist/proxy/server/messages-route.d.ts.map +1 -0
- package/dist/proxy/server/messages-route.js +244 -0
- package/dist/proxy/server/messages-route.js.map +1 -0
- package/dist/proxy/server/proxy-server.d.ts +12 -0
- package/dist/proxy/server/proxy-server.d.ts.map +1 -0
- package/dist/proxy/server/proxy-server.js +140 -0
- package/dist/proxy/server/proxy-server.js.map +1 -0
- package/dist/proxy/transformers/request-transformer.d.ts +60 -0
- package/dist/proxy/transformers/request-transformer.d.ts.map +1 -0
- package/dist/proxy/transformers/request-transformer.js +452 -0
- package/dist/proxy/transformers/request-transformer.js.map +1 -0
- package/dist/proxy/transformers/sse-stream-transformer.d.ts +11 -0
- package/dist/proxy/transformers/sse-stream-transformer.d.ts.map +1 -0
- package/dist/proxy/transformers/sse-stream-transformer.js +200 -0
- package/dist/proxy/transformers/sse-stream-transformer.js.map +1 -0
- package/dist/proxy/upstream-url.d.ts +3 -0
- package/dist/proxy/upstream-url.d.ts.map +1 -0
- package/dist/proxy/upstream-url.js +43 -0
- package/dist/proxy/upstream-url.js.map +1 -0
- package/dist/services/logging/index.d.ts +12 -0
- package/dist/services/logging/index.d.ts.map +1 -0
- package/dist/services/logging/index.js +37 -0
- package/dist/services/logging/index.js.map +1 -0
- package/dist/services/logging/log-buffer.d.ts +5 -0
- package/dist/services/logging/log-buffer.d.ts.map +1 -0
- package/dist/services/logging/log-buffer.js +20 -0
- package/dist/services/logging/log-buffer.js.map +1 -0
- package/dist/services/logging/log-config.d.ts +4 -0
- package/dist/services/logging/log-config.d.ts.map +1 -0
- package/dist/services/logging/log-config.js +68 -0
- package/dist/services/logging/log-config.js.map +1 -0
- package/dist/services/logging/log-context.d.ts +41 -0
- package/dist/services/logging/log-context.d.ts.map +1 -0
- package/dist/services/logging/log-context.js +51 -0
- package/dist/services/logging/log-context.js.map +1 -0
- package/dist/services/logging/log-paths.d.ts +8 -0
- package/dist/services/logging/log-paths.d.ts.map +1 -0
- package/dist/services/logging/log-paths.js +66 -0
- package/dist/services/logging/log-paths.js.map +1 -0
- package/dist/services/logging/log-reader.d.ts +5 -0
- package/dist/services/logging/log-reader.d.ts.map +1 -0
- package/dist/services/logging/log-reader.js +124 -0
- package/dist/services/logging/log-reader.js.map +1 -0
- package/dist/services/logging/log-redaction.d.ts +10 -0
- package/dist/services/logging/log-redaction.d.ts.map +1 -0
- package/dist/services/logging/log-redaction.js +90 -0
- package/dist/services/logging/log-redaction.js.map +1 -0
- package/dist/services/logging/log-storage.d.ts +4 -0
- package/dist/services/logging/log-storage.d.ts.map +1 -0
- package/dist/services/logging/log-storage.js +109 -0
- package/dist/services/logging/log-storage.js.map +1 -0
- package/dist/services/logging/log-types.d.ts +60 -0
- package/dist/services/logging/log-types.d.ts.map +1 -0
- package/dist/services/logging/log-types.js +33 -0
- package/dist/services/logging/log-types.js.map +1 -0
- package/dist/services/logging/logger.d.ts +26 -0
- package/dist/services/logging/logger.d.ts.map +1 -0
- package/dist/services/logging/logger.js +65 -0
- package/dist/services/logging/logger.js.map +1 -0
- package/dist/shared/agy-gemini-pro-compatibility.d.ts +15 -0
- package/dist/shared/agy-gemini-pro-compatibility.d.ts.map +1 -0
- package/dist/shared/agy-gemini-pro-compatibility.js +18 -0
- package/dist/shared/agy-gemini-pro-compatibility.js.map +1 -0
- package/dist/shared/claude-extension-setup.d.ts.map +1 -1
- package/dist/shared/claude-extension-setup.js +7 -3
- package/dist/shared/claude-extension-setup.js.map +1 -1
- package/dist/shared/cliproxy-model-routing.d.ts +45 -0
- package/dist/shared/cliproxy-model-routing.d.ts.map +1 -0
- package/dist/shared/cliproxy-model-routing.js +144 -0
- package/dist/shared/cliproxy-model-routing.js.map +1 -0
- package/dist/shared/provider-preset-catalog.d.ts +4 -2
- package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
- package/dist/shared/provider-preset-catalog.js +17 -1
- package/dist/shared/provider-preset-catalog.js.map +1 -1
- package/dist/shared/toml-object.d.ts.map +1 -1
- package/dist/shared/toml-object.js +6 -2
- package/dist/shared/toml-object.js.map +1 -1
- package/dist/targets/claude-adapter.d.ts +6 -1
- package/dist/targets/claude-adapter.d.ts.map +1 -1
- package/dist/targets/claude-adapter.js +20 -5
- package/dist/targets/claude-adapter.js.map +1 -1
- package/dist/targets/codex-adapter.d.ts +2 -0
- package/dist/targets/codex-adapter.d.ts.map +1 -1
- package/dist/targets/codex-adapter.js +43 -11
- package/dist/targets/codex-adapter.js.map +1 -1
- package/dist/targets/codex-cliproxy-provider-config.d.ts +16 -0
- package/dist/targets/codex-cliproxy-provider-config.d.ts.map +1 -0
- package/dist/targets/codex-cliproxy-provider-config.js +156 -0
- package/dist/targets/codex-cliproxy-provider-config.js.map +1 -0
- package/dist/targets/codex-detector.d.ts.map +1 -1
- package/dist/targets/codex-detector.js +20 -9
- package/dist/targets/codex-detector.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts +3 -2
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +15 -10
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/targets/droid-config-manager.d.ts.map +1 -1
- package/dist/targets/droid-config-manager.js +40 -0
- package/dist/targets/droid-config-manager.js.map +1 -1
- package/dist/targets/droid-provider.d.ts.map +1 -1
- package/dist/targets/droid-provider.js +10 -5
- package/dist/targets/droid-provider.js.map +1 -1
- package/dist/targets/target-adapter.d.ts +5 -0
- package/dist/targets/target-adapter.d.ts.map +1 -1
- package/dist/targets/target-metadata.js +1 -1
- package/dist/targets/target-metadata.js.map +1 -1
- package/dist/targets/target-resolver.d.ts.map +1 -1
- package/dist/targets/target-resolver.js +15 -0
- package/dist/targets/target-resolver.js.map +1 -1
- package/dist/targets/target-runtime-compatibility.js +1 -1
- package/dist/targets/target-runtime-compatibility.js.map +1 -1
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/config.d.ts +15 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/ui/assets/accounts-biinrjBy.js +1 -0
- package/dist/ui/assets/alert-dialog-B9kuXS_B.js +1 -0
- package/dist/ui/assets/api-BYTesAyV.js +4 -0
- package/dist/ui/assets/auth-section-BH7Y0zzE.js +1 -0
- package/dist/ui/assets/backups-section-JTiku4fB.js +1 -0
- package/dist/ui/assets/channels-BweRUtu-.js +1 -0
- package/dist/ui/assets/charts-eIPy2oG6.js +64 -0
- package/dist/ui/assets/checkbox-CsTXDim7.js +1 -0
- package/dist/ui/assets/claude-extension-BE4B2NkS.js +1 -0
- package/dist/ui/assets/cliproxy-Fl6HWxZ0.js +4 -0
- package/dist/ui/assets/cliproxy-ai-providers-NMOopK4K.js +15 -0
- package/dist/ui/assets/cliproxy-control-panel-BgiBcyzb.js +1 -0
- package/dist/ui/assets/code-highlight-ClSMkeL5.js +1 -0
- package/dist/ui/assets/codex-BsxF_eKF.js +30 -0
- package/dist/ui/assets/confirm-dialog-iyu6jSnb.js +1 -0
- package/dist/ui/assets/copilot-BSCdzbOk.js +3 -0
- package/dist/ui/assets/cursor-CjGT-EsR.js +1 -0
- package/dist/ui/assets/droid-MR-k0fbU.js +2 -0
- package/dist/ui/assets/form-utils-CuHzLhJZ.js +20 -0
- package/dist/ui/assets/globalenv-section-BGPR-lJN.js +1 -0
- package/dist/ui/assets/health-C7wQUXVn.js +1 -0
- package/dist/ui/assets/icons-bxdfpJdB.js +1 -0
- package/dist/ui/assets/index-7dfuc3Cf.js +56 -0
- package/dist/ui/assets/index-7rknm4m0.js +1 -0
- package/dist/ui/assets/index-BeLNgVQ9.js +1 -0
- package/dist/ui/assets/index-BvMWFZiH.js +1 -0
- package/dist/ui/assets/index-DrEPnpI3.css +1 -0
- package/dist/ui/assets/index-MAUysHQF.js +1 -0
- package/dist/ui/assets/index-nzImYtUK.js +1 -0
- package/dist/ui/assets/index-w9DZ42zc.js +1 -0
- package/dist/ui/assets/logs-Qr4G0AdK.js +1 -0
- package/dist/ui/assets/masked-input-Bl5OoUEZ.js +1 -0
- package/dist/ui/assets/notifications-B4_o8bcr.js +1 -0
- package/dist/ui/assets/providers/codebuddy.png +0 -0
- package/dist/ui/assets/providers/cursor.svg +5 -0
- package/dist/ui/assets/providers/gitlab.svg +22 -0
- package/dist/ui/assets/providers/kilo.png +0 -0
- package/dist/ui/assets/proxy-Br5aAkn0.js +9 -0
- package/dist/ui/assets/proxy-status-widget-703_vH2t.js +1 -0
- package/dist/ui/assets/radix-ui-DvRtHWGI.js +51 -0
- package/dist/ui/assets/raw-json-settings-editor-panel-DWTJY3og.js +1 -0
- package/dist/ui/assets/react-vendor-Bjx91N7w.js +3 -0
- package/dist/ui/assets/searchable-select-C8BA2Q6i.js +1 -0
- package/dist/ui/assets/separator-avUMnKG4.js +1 -0
- package/dist/ui/assets/shared-DsOKYLqq.js +8 -0
- package/dist/ui/assets/table-C6r_OOul.js +1 -0
- package/dist/ui/assets/tanstack-Dg84L5cM.js +4 -0
- package/dist/ui/assets/updates-K6jy3VXq.js +1 -0
- package/dist/ui/assets/use-accounts-ZouK2A2J.js +1 -0
- package/dist/ui/index.html +9 -9
- package/dist/utils/browser/browser-policy.d.ts +22 -0
- package/dist/utils/browser/browser-policy.d.ts.map +1 -0
- package/dist/utils/browser/browser-policy.js +65 -0
- package/dist/utils/browser/browser-policy.js.map +1 -0
- package/dist/utils/browser/browser-settings.d.ts +52 -0
- package/dist/utils/browser/browser-settings.d.ts.map +1 -0
- package/dist/utils/browser/browser-settings.js +257 -0
- package/dist/utils/browser/browser-settings.js.map +1 -0
- package/dist/utils/browser/browser-setup.d.ts +21 -0
- package/dist/utils/browser/browser-setup.d.ts.map +1 -0
- package/dist/utils/browser/browser-setup.js +68 -0
- package/dist/utils/browser/browser-setup.js.map +1 -0
- package/dist/utils/browser/browser-status.d.ts +42 -0
- package/dist/utils/browser/browser-status.d.ts.map +1 -0
- package/dist/utils/browser/browser-status.js +251 -0
- package/dist/utils/browser/browser-status.js.map +1 -0
- package/dist/utils/browser/chrome-reuse.d.ts +18 -0
- package/dist/utils/browser/chrome-reuse.d.ts.map +1 -0
- package/dist/utils/browser/chrome-reuse.js +194 -0
- package/dist/utils/browser/chrome-reuse.js.map +1 -0
- package/dist/utils/browser/claude-tool-args.d.ts +2 -0
- package/dist/utils/browser/claude-tool-args.d.ts.map +1 -0
- package/dist/utils/browser/claude-tool-args.js +22 -0
- package/dist/utils/browser/claude-tool-args.js.map +1 -0
- package/dist/utils/browser/index.d.ts +16 -0
- package/dist/utils/browser/index.d.ts.map +1 -0
- package/dist/utils/browser/index.js +45 -0
- package/dist/utils/browser/index.js.map +1 -0
- package/dist/utils/browser/mcp-installer.d.ts +14 -0
- package/dist/utils/browser/mcp-installer.d.ts.map +1 -0
- package/dist/utils/browser/mcp-installer.js +356 -0
- package/dist/utils/browser/mcp-installer.js.map +1 -0
- package/dist/utils/browser/platform.d.ts +4 -0
- package/dist/utils/browser/platform.d.ts.map +1 -0
- package/dist/utils/browser/platform.js +12 -0
- package/dist/utils/browser/platform.js.map +1 -0
- package/dist/utils/browser-codex-overrides.d.ts +3 -0
- package/dist/utils/browser-codex-overrides.d.ts.map +1 -0
- package/dist/utils/browser-codex-overrides.js +29 -0
- package/dist/utils/browser-codex-overrides.js.map +1 -0
- package/dist/utils/claude-detector.d.ts +1 -0
- package/dist/utils/claude-detector.d.ts.map +1 -1
- package/dist/utils/claude-detector.js +2 -1
- package/dist/utils/claude-detector.js.map +1 -1
- package/dist/utils/claude-spawner.d.ts +1 -0
- package/dist/utils/claude-spawner.d.ts.map +1 -1
- package/dist/utils/claude-spawner.js +1 -1
- package/dist/utils/claude-spawner.js.map +1 -1
- package/dist/utils/claude-subcommand-detector.d.ts +45 -0
- package/dist/utils/claude-subcommand-detector.d.ts.map +1 -0
- package/dist/utils/claude-subcommand-detector.js +179 -0
- package/dist/utils/claude-subcommand-detector.js.map +1 -0
- package/dist/utils/claude-tool-args.d.ts +7 -0
- package/dist/utils/claude-tool-args.d.ts.map +1 -0
- package/dist/utils/claude-tool-args.js +43 -0
- package/dist/utils/claude-tool-args.js.map +1 -0
- package/dist/utils/config-manager.d.ts +5 -0
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/config-manager.js +16 -3
- package/dist/utils/config-manager.js.map +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.d.ts.map +1 -1
- package/dist/utils/hooks/get-image-analysis-hook-env.js +11 -7
- package/dist/utils/hooks/get-image-analysis-hook-env.js.map +1 -1
- package/dist/utils/hooks/image-analysis-backend-resolver.js +2 -2
- package/dist/utils/hooks/image-analysis-backend-resolver.js.map +1 -1
- package/dist/utils/hooks/image-analysis-runtime-status.d.ts +4 -4
- package/dist/utils/hooks/image-analysis-runtime-status.d.ts.map +1 -1
- package/dist/utils/hooks/image-analysis-runtime-status.js +15 -11
- package/dist/utils/hooks/image-analysis-runtime-status.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-configuration.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-configuration.js +2 -2
- package/dist/utils/hooks/image-analyzer-hook-configuration.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-installer.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-installer.js +2 -2
- package/dist/utils/hooks/image-analyzer-hook-installer.js.map +1 -1
- package/dist/utils/hooks/image-analyzer-hook-utils.d.ts +21 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.d.ts.map +1 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.js +81 -0
- package/dist/utils/hooks/image-analyzer-hook-utils.js.map +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts +1 -0
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.d.ts.map +1 -1
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js +35 -14
- package/dist/utils/hooks/image-analyzer-profile-hook-injector.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +1 -0
- package/dist/utils/hooks/index.d.ts.map +1 -1
- package/dist/utils/hooks/index.js +3 -1
- package/dist/utils/hooks/index.js.map +1 -1
- package/dist/utils/image-analysis/claude-tool-args.d.ts +3 -0
- package/dist/utils/image-analysis/claude-tool-args.d.ts.map +1 -1
- package/dist/utils/image-analysis/claude-tool-args.js +25 -47
- package/dist/utils/image-analysis/claude-tool-args.js.map +1 -1
- package/dist/utils/image-analysis/index.d.ts +1 -0
- package/dist/utils/image-analysis/index.d.ts.map +1 -1
- package/dist/utils/image-analysis/index.js +6 -1
- package/dist/utils/image-analysis/index.js.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.d.ts.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.js +5 -5
- package/dist/utils/image-analysis/mcp-installer.js.map +1 -1
- package/dist/utils/image-analysis/repair.d.ts +12 -0
- package/dist/utils/image-analysis/repair.d.ts.map +1 -0
- package/dist/utils/image-analysis/repair.js +105 -0
- package/dist/utils/image-analysis/repair.js.map +1 -0
- package/dist/utils/openai-compat-launch-settings.d.ts +7 -0
- package/dist/utils/openai-compat-launch-settings.d.ts.map +1 -0
- package/dist/utils/openai-compat-launch-settings.js +61 -0
- package/dist/utils/openai-compat-launch-settings.js.map +1 -0
- package/dist/utils/package-manager-detector.d.ts +31 -4
- package/dist/utils/package-manager-detector.d.ts.map +1 -1
- package/dist/utils/package-manager-detector.js +249 -60
- package/dist/utils/package-manager-detector.js.map +1 -1
- package/dist/utils/prompt-injection-strategy.d.ts +54 -0
- package/dist/utils/prompt-injection-strategy.d.ts.map +1 -0
- package/dist/utils/prompt-injection-strategy.js +128 -0
- package/dist/utils/prompt-injection-strategy.js.map +1 -0
- package/dist/utils/retry-strategy.d.ts +37 -0
- package/dist/utils/retry-strategy.d.ts.map +1 -0
- package/dist/utils/retry-strategy.js +99 -0
- package/dist/utils/retry-strategy.js.map +1 -0
- package/dist/utils/shell-executor.d.ts +32 -1
- package/dist/utils/shell-executor.d.ts.map +1 -1
- package/dist/utils/shell-executor.js +193 -30
- package/dist/utils/shell-executor.js.map +1 -1
- package/dist/utils/update-checker.d.ts +1 -1
- package/dist/utils/update-checker.d.ts.map +1 -1
- package/dist/utils/websearch/claude-tool-args.d.ts +7 -0
- package/dist/utils/websearch/claude-tool-args.d.ts.map +1 -1
- package/dist/utils/websearch/claude-tool-args.js +32 -50
- package/dist/utils/websearch/claude-tool-args.js.map +1 -1
- package/dist/utils/websearch/hook-config.d.ts.map +1 -1
- package/dist/utils/websearch/hook-config.js +3 -3
- package/dist/utils/websearch/hook-config.js.map +1 -1
- package/dist/utils/websearch/hook-env.d.ts.map +1 -1
- package/dist/utils/websearch/hook-env.js +21 -3
- package/dist/utils/websearch/hook-env.js.map +1 -1
- package/dist/utils/websearch/hook-installer.d.ts.map +1 -1
- package/dist/utils/websearch/hook-installer.js +2 -2
- package/dist/utils/websearch/hook-installer.js.map +1 -1
- package/dist/utils/websearch/mcp-installer.d.ts.map +1 -1
- package/dist/utils/websearch/mcp-installer.js +5 -5
- package/dist/utils/websearch/mcp-installer.js.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.d.ts.map +1 -1
- package/dist/utils/websearch/profile-hook-injector.js +3 -3
- package/dist/utils/websearch/profile-hook-injector.js.map +1 -1
- package/dist/utils/websearch/provider-secrets.js +2 -2
- package/dist/utils/websearch/provider-secrets.js.map +1 -1
- package/dist/utils/websearch/status.d.ts +1 -1
- package/dist/utils/websearch/status.d.ts.map +1 -1
- package/dist/utils/websearch/status.js +37 -16
- package/dist/utils/websearch/status.js.map +1 -1
- package/dist/utils/websearch/trace.d.ts +1 -0
- package/dist/utils/websearch/trace.d.ts.map +1 -1
- package/dist/utils/websearch/trace.js +27 -5
- package/dist/utils/websearch/trace.js.map +1 -1
- package/dist/utils/websearch/types.d.ts +12 -2
- package/dist/utils/websearch/types.d.ts.map +1 -1
- package/dist/utils/websearch/types.js +38 -0
- package/dist/utils/websearch/types.js.map +1 -1
- package/dist/web-server/file-watcher.js +2 -2
- package/dist/web-server/file-watcher.js.map +1 -1
- package/dist/web-server/health/cliproxy-checks.js +2 -2
- package/dist/web-server/health/cliproxy-checks.js.map +1 -1
- package/dist/web-server/health/config-checks.d.ts.map +1 -1
- package/dist/web-server/health/config-checks.js +3 -3
- package/dist/web-server/health/config-checks.js.map +1 -1
- package/dist/web-server/health/profile-checks.d.ts.map +1 -1
- package/dist/web-server/health/profile-checks.js +5 -6
- package/dist/web-server/health/profile-checks.js.map +1 -1
- package/dist/web-server/health/symlink-checks.d.ts.map +1 -1
- package/dist/web-server/health/symlink-checks.js +2 -3
- package/dist/web-server/health/symlink-checks.js.map +1 -1
- package/dist/web-server/health/websearch-checks.js +1 -1
- package/dist/web-server/health/websearch-checks.js.map +1 -1
- package/dist/web-server/health-service.d.ts.map +1 -1
- package/dist/web-server/health-service.js +7 -6
- package/dist/web-server/health-service.js.map +1 -1
- package/dist/web-server/index.d.ts.map +1 -1
- package/dist/web-server/index.js +102 -18
- package/dist/web-server/index.js.map +1 -1
- package/dist/web-server/jsonl-parser.d.ts.map +1 -1
- package/dist/web-server/jsonl-parser.js +22 -4
- package/dist/web-server/jsonl-parser.js.map +1 -1
- package/dist/web-server/middleware/auth-middleware.d.ts +7 -3
- package/dist/web-server/middleware/auth-middleware.d.ts.map +1 -1
- package/dist/web-server/middleware/auth-middleware.js +103 -8
- package/dist/web-server/middleware/auth-middleware.js.map +1 -1
- package/dist/web-server/middleware/request-logging-middleware.d.ts +3 -0
- package/dist/web-server/middleware/request-logging-middleware.d.ts.map +1 -0
- package/dist/web-server/middleware/request-logging-middleware.js +30 -0
- package/dist/web-server/middleware/request-logging-middleware.js.map +1 -0
- package/dist/web-server/model-pricing.d.ts +8 -6
- package/dist/web-server/model-pricing.d.ts.map +1 -1
- package/dist/web-server/model-pricing.js +202 -54
- package/dist/web-server/model-pricing.js.map +1 -1
- package/dist/web-server/models-dev/pricing-resolver.d.ts +18 -0
- package/dist/web-server/models-dev/pricing-resolver.d.ts.map +1 -0
- package/dist/web-server/models-dev/pricing-resolver.js +160 -0
- package/dist/web-server/models-dev/pricing-resolver.js.map +1 -0
- package/dist/web-server/models-dev/registry-cache.d.ts +19 -0
- package/dist/web-server/models-dev/registry-cache.d.ts.map +1 -0
- package/dist/web-server/models-dev/registry-cache.js +165 -0
- package/dist/web-server/models-dev/registry-cache.js.map +1 -0
- package/dist/web-server/models-dev/types.d.ts +39 -0
- package/dist/web-server/models-dev/types.d.ts.map +1 -0
- package/dist/web-server/models-dev/types.js +3 -0
- package/dist/web-server/models-dev/types.js.map +1 -0
- package/dist/web-server/overview-routes.d.ts.map +1 -1
- package/dist/web-server/overview-routes.js +3 -3
- package/dist/web-server/overview-routes.js.map +1 -1
- package/dist/web-server/routes/account-route-helpers.d.ts +3 -0
- package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/account-route-helpers.js.map +1 -1
- package/dist/web-server/routes/account-routes.d.ts.map +1 -1
- package/dist/web-server/routes/account-routes.js +105 -12
- package/dist/web-server/routes/account-routes.js.map +1 -1
- package/dist/web-server/routes/auth-routes.d.ts +10 -0
- package/dist/web-server/routes/auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/auth-routes.js +37 -10
- package/dist/web-server/routes/auth-routes.js.map +1 -1
- package/dist/web-server/routes/browser-routes.d.ts +3 -0
- package/dist/web-server/routes/browser-routes.d.ts.map +1 -0
- package/dist/web-server/routes/browser-routes.js +182 -0
- package/dist/web-server/routes/browser-routes.js.map +1 -0
- package/dist/web-server/routes/catalog-routes.d.ts.map +1 -1
- package/dist/web-server/routes/catalog-routes.js +9 -8
- package/dist/web-server/routes/catalog-routes.js.map +1 -1
- package/dist/web-server/routes/channels-routes.d.ts.map +1 -1
- package/dist/web-server/routes/channels-routes.js +4 -4
- package/dist/web-server/routes/channels-routes.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-auth-routes.d.ts +8 -0
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.js +281 -89
- 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 +27 -17
- package/dist/web-server/routes/cliproxy-local-proxy.js.map +1 -1
- package/dist/web-server/routes/cliproxy-routing-routes.d.ts +3 -0
- package/dist/web-server/routes/cliproxy-routing-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-routing-routes.js +69 -0
- package/dist/web-server/routes/cliproxy-routing-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +35 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.js +86 -42
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.js +2 -2
- package/dist/web-server/routes/cliproxy-sync-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 +7 -0
- package/dist/web-server/routes/codex-routes.js.map +1 -1
- package/dist/web-server/routes/config-routes.d.ts.map +1 -1
- package/dist/web-server/routes/config-routes.js +9 -6
- package/dist/web-server/routes/config-routes.js.map +1 -1
- package/dist/web-server/routes/copilot-routes.d.ts.map +1 -1
- package/dist/web-server/routes/copilot-routes.js +3 -3
- package/dist/web-server/routes/copilot-routes.js.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.js +6 -7
- package/dist/web-server/routes/copilot-settings-routes.js.map +1 -1
- package/dist/web-server/routes/cursor-routes.d.ts +2 -0
- package/dist/web-server/routes/cursor-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cursor-routes.js +48 -6
- package/dist/web-server/routes/cursor-routes.js.map +1 -1
- package/dist/web-server/routes/cursor-settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cursor-settings-routes.js +8 -9
- package/dist/web-server/routes/cursor-settings-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 -17
- 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 +25 -0
- package/dist/web-server/routes/index.js.map +1 -1
- package/dist/web-server/routes/logs-routes.d.ts +3 -0
- package/dist/web-server/routes/logs-routes.d.ts.map +1 -0
- package/dist/web-server/routes/logs-routes.js +75 -0
- package/dist/web-server/routes/logs-routes.js.map +1 -0
- package/dist/web-server/routes/misc-routes.d.ts.map +1 -1
- package/dist/web-server/routes/misc-routes.js +10 -11
- package/dist/web-server/routes/misc-routes.js.map +1 -1
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
- package/dist/web-server/routes/profile-routes.js +21 -3
- package/dist/web-server/routes/profile-routes.js.map +1 -1
- package/dist/web-server/routes/provider-routes.js +1 -1
- package/dist/web-server/routes/provider-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 +42 -12
- package/dist/web-server/routes/proxy-routes.js.map +1 -1
- package/dist/web-server/routes/route-helpers.d.ts +1 -0
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/route-helpers.js +19 -7
- package/dist/web-server/routes/route-helpers.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +110 -23
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/dist/web-server/routes/variant-routes.js +1 -1
- package/dist/web-server/routes/variant-routes.js.map +1 -1
- package/dist/web-server/routes/websearch-routes.d.ts.map +1 -1
- package/dist/web-server/routes/websearch-routes.js +41 -4
- package/dist/web-server/routes/websearch-routes.js.map +1 -1
- package/dist/web-server/services/claude-extension-binding-service.js +2 -2
- package/dist/web-server/services/claude-extension-binding-service.js.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.d.ts.map +1 -1
- package/dist/web-server/services/cliproxy-dashboard-install-service.js +22 -6
- package/dist/web-server/services/cliproxy-dashboard-install-service.js.map +1 -1
- package/dist/web-server/services/codex-dashboard-service.d.ts +1 -0
- package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.d.ts.map +1 -1
- package/dist/web-server/services/compatible-cli-docs-registry.js +1 -0
- package/dist/web-server/services/compatible-cli-docs-registry.js.map +1 -1
- package/dist/web-server/services/droid-dashboard-service.d.ts +1 -0
- package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -1
- package/dist/web-server/services/logs-dashboard-service.d.ts +7 -0
- package/dist/web-server/services/logs-dashboard-service.d.ts.map +1 -0
- package/dist/web-server/services/logs-dashboard-service.js +33 -0
- package/dist/web-server/services/logs-dashboard-service.js.map +1 -0
- package/dist/web-server/shared-routes-collections.d.ts +13 -0
- package/dist/web-server/shared-routes-collections.d.ts.map +1 -0
- package/dist/web-server/shared-routes-collections.js +170 -0
- package/dist/web-server/shared-routes-collections.js.map +1 -0
- package/dist/web-server/shared-routes-content.d.ts +16 -0
- package/dist/web-server/shared-routes-content.d.ts.map +1 -0
- package/dist/web-server/shared-routes-content.js +152 -0
- package/dist/web-server/shared-routes-content.js.map +1 -0
- package/dist/web-server/shared-routes-markdown-walker.d.ts +12 -0
- package/dist/web-server/shared-routes-markdown-walker.d.ts.map +1 -0
- package/dist/web-server/shared-routes-markdown-walker.js +97 -0
- package/dist/web-server/shared-routes-markdown-walker.js.map +1 -0
- package/dist/web-server/shared-routes-markdown.d.ts +18 -0
- package/dist/web-server/shared-routes-markdown.d.ts.map +1 -0
- package/dist/web-server/shared-routes-markdown.js +167 -0
- package/dist/web-server/shared-routes-markdown.js.map +1 -0
- package/dist/web-server/shared-routes-path-guards.d.ts +16 -0
- package/dist/web-server/shared-routes-path-guards.d.ts.map +1 -0
- package/dist/web-server/shared-routes-path-guards.js +93 -0
- package/dist/web-server/shared-routes-path-guards.js.map +1 -0
- package/dist/web-server/shared-routes-plugin-registry-content.d.ts +12 -0
- package/dist/web-server/shared-routes-plugin-registry-content.d.ts.map +1 -0
- package/dist/web-server/shared-routes-plugin-registry-content.js +93 -0
- package/dist/web-server/shared-routes-plugin-registry-content.js.map +1 -0
- package/dist/web-server/shared-routes-plugins.d.ts +21 -0
- package/dist/web-server/shared-routes-plugins.d.ts.map +1 -0
- package/dist/web-server/shared-routes-plugins.js +197 -0
- package/dist/web-server/shared-routes-plugins.js.map +1 -0
- package/dist/web-server/shared-routes-symlink-status.d.ts +27 -0
- package/dist/web-server/shared-routes-symlink-status.d.ts.map +1 -0
- package/dist/web-server/shared-routes-symlink-status.js +135 -0
- package/dist/web-server/shared-routes-symlink-status.js.map +1 -0
- package/dist/web-server/shared-routes-types.d.ts +23 -0
- package/dist/web-server/shared-routes-types.d.ts.map +1 -0
- package/dist/web-server/shared-routes-types.js +15 -0
- package/dist/web-server/shared-routes-types.js.map +1 -0
- package/dist/web-server/shared-routes.d.ts +2 -1
- package/dist/web-server/shared-routes.d.ts.map +1 -1
- package/dist/web-server/shared-routes.js +50 -456
- package/dist/web-server/shared-routes.js.map +1 -1
- package/dist/web-server/usage/aggregator.d.ts +14 -7
- package/dist/web-server/usage/aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/aggregator.js +254 -47
- package/dist/web-server/usage/aggregator.js.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts +1 -16
- package/dist/web-server/usage/cliproxy-usage-syncer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-syncer.js +186 -61
- package/dist/web-server/usage/cliproxy-usage-syncer.js.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts +22 -7
- package/dist/web-server/usage/cliproxy-usage-transformer.d.ts.map +1 -1
- package/dist/web-server/usage/cliproxy-usage-transformer.js +278 -28
- package/dist/web-server/usage/cliproxy-usage-transformer.js.map +1 -1
- package/dist/web-server/usage/codex-native-usage-collector.d.ts +13 -0
- package/dist/web-server/usage/codex-native-usage-collector.d.ts.map +1 -0
- package/dist/web-server/usage/codex-native-usage-collector.js +291 -0
- package/dist/web-server/usage/codex-native-usage-collector.js.map +1 -0
- package/dist/web-server/usage/cursor-csv-parser.d.ts +68 -0
- package/dist/web-server/usage/cursor-csv-parser.d.ts.map +1 -0
- package/dist/web-server/usage/cursor-csv-parser.js +238 -0
- package/dist/web-server/usage/cursor-csv-parser.js.map +1 -0
- package/dist/web-server/usage/cursor-data-store.d.ts +55 -0
- package/dist/web-server/usage/cursor-data-store.d.ts.map +1 -0
- package/dist/web-server/usage/cursor-data-store.js +240 -0
- package/dist/web-server/usage/cursor-data-store.js.map +1 -0
- package/dist/web-server/usage/data-aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/data-aggregator.js +45 -46
- package/dist/web-server/usage/data-aggregator.js.map +1 -1
- package/dist/web-server/usage/disk-cache.js +2 -2
- package/dist/web-server/usage/disk-cache.js.map +1 -1
- package/dist/web-server/usage/droid-native-usage-collector.d.ts +14 -0
- package/dist/web-server/usage/droid-native-usage-collector.d.ts.map +1 -0
- package/dist/web-server/usage/droid-native-usage-collector.js +201 -0
- package/dist/web-server/usage/droid-native-usage-collector.js.map +1 -0
- package/dist/web-server/usage/handlers.d.ts +16 -0
- package/dist/web-server/usage/handlers.d.ts.map +1 -1
- package/dist/web-server/usage/handlers.js +291 -64
- package/dist/web-server/usage/handlers.js.map +1 -1
- package/dist/web-server/usage/model-identity.d.ts +16 -0
- package/dist/web-server/usage/model-identity.d.ts.map +1 -0
- package/dist/web-server/usage/model-identity.js +70 -0
- package/dist/web-server/usage/model-identity.js.map +1 -0
- 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 +35 -0
- package/dist/web-server/usage/profile-filter.js.map +1 -0
- package/dist/web-server/usage/routes.d.ts.map +1 -1
- package/dist/web-server/usage/routes.js +26 -0
- package/dist/web-server/usage/routes.js.map +1 -1
- package/dist/web-server/usage/sqlite-cli.d.ts +27 -0
- package/dist/web-server/usage/sqlite-cli.d.ts.map +1 -0
- package/dist/web-server/usage/sqlite-cli.js +186 -0
- package/dist/web-server/usage/sqlite-cli.js.map +1 -0
- package/dist/web-server/usage/types.d.ts +14 -0
- package/dist/web-server/usage/types.d.ts.map +1 -1
- package/dist/web-server/websocket.d.ts.map +1 -1
- package/dist/web-server/websocket.js +25 -16
- package/dist/web-server/websocket.js.map +1 -1
- package/lib/hooks/image-analyzer-transformer.cjs +54 -3
- package/lib/hooks/websearch-transformer.cjs +136 -0
- package/lib/mcp/ccs-browser-server.cjs +6769 -0
- package/lib/mcp/ccs-websearch-server.cjs +1 -1
- package/package.json +8 -6
- package/scripts/ci-parity-gate.sh +22 -3
- package/scripts/dev-release.sh +4 -2
- package/scripts/ensure-deps.sh +18 -0
- package/scripts/run-test-bucket.js +188 -0
- package/scripts/verify-bundle.js +4 -1
- package/dist/cliproxy/account-manager.d.ts +0 -16
- package/dist/cliproxy/account-manager.d.ts.map +0 -1
- package/dist/cliproxy/account-manager.js +0 -51
- package/dist/cliproxy/account-manager.js.map +0 -1
- package/dist/cliproxy/account-safety.d.ts +0 -92
- package/dist/cliproxy/account-safety.d.ts.map +0 -1
- package/dist/cliproxy/account-safety.js +0 -496
- package/dist/cliproxy/account-safety.js.map +0 -1
- package/dist/cliproxy/account-stats-key.d.ts.map +0 -1
- package/dist/cliproxy/account-stats-key.js.map +0 -1
- package/dist/cliproxy/antigravity-responsibility.d.ts.map +0 -1
- package/dist/cliproxy/antigravity-responsibility.js +0 -171
- package/dist/cliproxy/antigravity-responsibility.js.map +0 -1
- package/dist/cliproxy/auth/gemini-token-refresh.d.ts +0 -40
- package/dist/cliproxy/auth/gemini-token-refresh.d.ts.map +0 -1
- package/dist/cliproxy/auth/gemini-token-refresh.js +0 -371
- package/dist/cliproxy/auth/gemini-token-refresh.js.map +0 -1
- package/dist/cliproxy/auth-handler.d.ts +0 -31
- package/dist/cliproxy/auth-handler.d.ts.map +0 -1
- package/dist/cliproxy/auth-handler.js +0 -60
- package/dist/cliproxy/auth-handler.js.map +0 -1
- package/dist/cliproxy/auth-session-manager.d.ts +0 -51
- package/dist/cliproxy/auth-session-manager.d.ts.map +0 -1
- package/dist/cliproxy/auth-session-manager.js +0 -134
- package/dist/cliproxy/auth-session-manager.js.map +0 -1
- package/dist/cliproxy/auth-token-manager.d.ts.map +0 -1
- package/dist/cliproxy/auth-token-manager.js +0 -184
- package/dist/cliproxy/auth-token-manager.js.map +0 -1
- package/dist/cliproxy/auth-utils.d.ts +0 -16
- package/dist/cliproxy/auth-utils.d.ts.map +0 -1
- package/dist/cliproxy/auth-utils.js +0 -33
- package/dist/cliproxy/auth-utils.js.map +0 -1
- package/dist/cliproxy/base-config-loader.d.ts +0 -42
- package/dist/cliproxy/base-config-loader.d.ts.map +0 -1
- package/dist/cliproxy/base-config-loader.js +0 -123
- package/dist/cliproxy/base-config-loader.js.map +0 -1
- package/dist/cliproxy/catalog-cache.d.ts +0 -39
- package/dist/cliproxy/catalog-cache.d.ts.map +0 -1
- package/dist/cliproxy/catalog-cache.js +0 -254
- package/dist/cliproxy/catalog-cache.js.map +0 -1
- package/dist/cliproxy/cliproxy-executor.d.ts +0 -16
- package/dist/cliproxy/cliproxy-executor.d.ts.map +0 -1
- package/dist/cliproxy/cliproxy-executor.js +0 -27
- package/dist/cliproxy/cliproxy-executor.js.map +0 -1
- package/dist/cliproxy/codex-plan-compatibility.d.ts +0 -39
- package/dist/cliproxy/codex-plan-compatibility.d.ts.map +0 -1
- package/dist/cliproxy/codex-plan-compatibility.js +0 -134
- package/dist/cliproxy/codex-plan-compatibility.js.map +0 -1
- package/dist/cliproxy/codex-reasoning-proxy.d.ts +0 -61
- package/dist/cliproxy/codex-reasoning-proxy.d.ts.map +0 -1
- package/dist/cliproxy/codex-reasoning-proxy.js +0 -495
- package/dist/cliproxy/codex-reasoning-proxy.js.map +0 -1
- package/dist/cliproxy/composite-validator.d.ts.map +0 -1
- package/dist/cliproxy/composite-validator.js +0 -94
- package/dist/cliproxy/composite-validator.js.map +0 -1
- package/dist/cliproxy/config-generator.d.ts +0 -15
- package/dist/cliproxy/config-generator.d.ts.map +0 -1
- package/dist/cliproxy/config-generator.js +0 -32
- package/dist/cliproxy/config-generator.js.map +0 -1
- package/dist/cliproxy/device-code-handler.d.ts.map +0 -1
- package/dist/cliproxy/device-code-handler.js.map +0 -1
- package/dist/cliproxy/gemini-cli-quota-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/gemini-cli-quota-normalizer.js +0 -122
- package/dist/cliproxy/gemini-cli-quota-normalizer.js.map +0 -1
- package/dist/cliproxy/https-tunnel-proxy.d.ts.map +0 -1
- package/dist/cliproxy/https-tunnel-proxy.js +0 -224
- package/dist/cliproxy/https-tunnel-proxy.js.map +0 -1
- package/dist/cliproxy/management-api-client.d.ts +0 -81
- package/dist/cliproxy/management-api-client.d.ts.map +0 -1
- package/dist/cliproxy/management-api-client.js +0 -381
- package/dist/cliproxy/management-api-client.js.map +0 -1
- package/dist/cliproxy/management-api-types.d.ts.map +0 -1
- package/dist/cliproxy/management-api-types.js.map +0 -1
- package/dist/cliproxy/model-config.d.ts +0 -31
- package/dist/cliproxy/model-config.d.ts.map +0 -1
- package/dist/cliproxy/model-config.js +0 -271
- package/dist/cliproxy/model-config.js.map +0 -1
- package/dist/cliproxy/model-id-normalizer.d.ts +0 -105
- package/dist/cliproxy/model-id-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/model-id-normalizer.js +0 -241
- package/dist/cliproxy/model-id-normalizer.js.map +0 -1
- package/dist/cliproxy/openai-compat-manager.d.ts.map +0 -1
- package/dist/cliproxy/openai-compat-manager.js +0 -191
- package/dist/cliproxy/openai-compat-manager.js.map +0 -1
- package/dist/cliproxy/platform-detector.d.ts +0 -99
- package/dist/cliproxy/platform-detector.d.ts.map +0 -1
- package/dist/cliproxy/platform-detector.js +0 -174
- package/dist/cliproxy/platform-detector.js.map +0 -1
- package/dist/cliproxy/project-selection-handler.d.ts.map +0 -1
- package/dist/cliproxy/project-selection-handler.js.map +0 -1
- package/dist/cliproxy/proxy-config-resolver.d.ts +0 -87
- package/dist/cliproxy/proxy-config-resolver.d.ts.map +0 -1
- package/dist/cliproxy/proxy-config-resolver.js +0 -254
- package/dist/cliproxy/proxy-config-resolver.js.map +0 -1
- package/dist/cliproxy/proxy-detector.d.ts +0 -72
- package/dist/cliproxy/proxy-detector.d.ts.map +0 -1
- package/dist/cliproxy/proxy-detector.js +0 -196
- package/dist/cliproxy/proxy-detector.js.map +0 -1
- package/dist/cliproxy/proxy-target-resolver.d.ts.map +0 -1
- package/dist/cliproxy/proxy-target-resolver.js +0 -108
- package/dist/cliproxy/proxy-target-resolver.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude-normalizer.d.ts +0 -18
- package/dist/cliproxy/quota-fetcher-claude-normalizer.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude-normalizer.js +0 -291
- package/dist/cliproxy/quota-fetcher-claude-normalizer.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude.d.ts +0 -21
- package/dist/cliproxy/quota-fetcher-claude.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-claude.js +0 -306
- package/dist/cliproxy/quota-fetcher-claude.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-codex.d.ts +0 -69
- package/dist/cliproxy/quota-fetcher-codex.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-codex.js +0 -599
- package/dist/cliproxy/quota-fetcher-codex.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-gemini-cli.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-gemini-cli.js +0 -661
- package/dist/cliproxy/quota-fetcher-gemini-cli.js.map +0 -1
- package/dist/cliproxy/quota-fetcher-ghcp.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher-ghcp.js +0 -207
- package/dist/cliproxy/quota-fetcher-ghcp.js.map +0 -1
- package/dist/cliproxy/quota-fetcher.d.ts +0 -107
- package/dist/cliproxy/quota-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/quota-fetcher.js +0 -657
- package/dist/cliproxy/quota-fetcher.js.map +0 -1
- package/dist/cliproxy/quota-manager.d.ts +0 -105
- package/dist/cliproxy/quota-manager.d.ts.map +0 -1
- package/dist/cliproxy/quota-manager.js +0 -485
- package/dist/cliproxy/quota-manager.js.map +0 -1
- package/dist/cliproxy/quota-response-cache.d.ts.map +0 -1
- package/dist/cliproxy/quota-response-cache.js.map +0 -1
- package/dist/cliproxy/quota-types.d.ts +0 -245
- package/dist/cliproxy/quota-types.d.ts.map +0 -1
- package/dist/cliproxy/quota-types.js.map +0 -1
- package/dist/cliproxy/remote-auth-fetcher.d.ts +0 -30
- package/dist/cliproxy/remote-auth-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/remote-auth-fetcher.js +0 -177
- package/dist/cliproxy/remote-auth-fetcher.js.map +0 -1
- package/dist/cliproxy/remote-proxy-client.d.ts.map +0 -1
- package/dist/cliproxy/remote-proxy-client.js +0 -281
- package/dist/cliproxy/remote-proxy-client.js.map +0 -1
- package/dist/cliproxy/remote-token-uploader.d.ts.map +0 -1
- package/dist/cliproxy/remote-token-uploader.js +0 -178
- package/dist/cliproxy/remote-token-uploader.js.map +0 -1
- package/dist/cliproxy/schema-sanitizer.d.ts.map +0 -1
- package/dist/cliproxy/schema-sanitizer.js.map +0 -1
- package/dist/cliproxy/startup-lock.d.ts.map +0 -1
- package/dist/cliproxy/startup-lock.js +0 -216
- package/dist/cliproxy/startup-lock.js.map +0 -1
- package/dist/cliproxy/stats-fetcher.d.ts +0 -158
- package/dist/cliproxy/stats-fetcher.d.ts.map +0 -1
- package/dist/cliproxy/stats-fetcher.js +0 -246
- package/dist/cliproxy/stats-fetcher.js.map +0 -1
- package/dist/cliproxy/stats-transformer.d.ts.map +0 -1
- package/dist/cliproxy/stats-transformer.js +0 -152
- package/dist/cliproxy/stats-transformer.js.map +0 -1
- package/dist/cliproxy/tool-name-mapper.d.ts +0 -103
- package/dist/cliproxy/tool-name-mapper.d.ts.map +0 -1
- package/dist/cliproxy/tool-name-mapper.js +0 -149
- package/dist/cliproxy/tool-name-mapper.js.map +0 -1
- package/dist/cliproxy/tool-name-sanitizer.d.ts +0 -65
- package/dist/cliproxy/tool-name-sanitizer.d.ts.map +0 -1
- package/dist/cliproxy/tool-name-sanitizer.js +0 -118
- package/dist/cliproxy/tool-name-sanitizer.js.map +0 -1
- package/dist/cliproxy/tool-sanitization-proxy.d.ts +0 -77
- package/dist/cliproxy/tool-sanitization-proxy.d.ts.map +0 -1
- package/dist/cliproxy/tool-sanitization-proxy.js +0 -643
- package/dist/cliproxy/tool-sanitization-proxy.js.map +0 -1
- package/dist/commands/cliproxy/resolve-lifecycle-port.d.ts +0 -9
- package/dist/commands/cliproxy/resolve-lifecycle-port.d.ts.map +0 -1
- package/dist/commands/cliproxy/resolve-lifecycle-port.js +0 -14
- package/dist/commands/cliproxy/resolve-lifecycle-port.js.map +0 -1
- package/dist/ui/assets/accounts-Cvu7FuLd.js +0 -1
- package/dist/ui/assets/alert-dialog-DudTubF8.js +0 -1
- package/dist/ui/assets/api-B_SQnrmH.js +0 -4
- package/dist/ui/assets/auth-section-CHSm0Pb6.js +0 -1
- package/dist/ui/assets/backups-section-wajt9dzX.js +0 -1
- package/dist/ui/assets/channels-CHran6QE.js +0 -1
- package/dist/ui/assets/charts-BBPXh0Ar.js +0 -64
- package/dist/ui/assets/checkbox-DvR--eRI.js +0 -1
- package/dist/ui/assets/claude-extension-EUfubgK-.js +0 -1
- package/dist/ui/assets/cliproxy-CMcQRlMQ.js +0 -3
- package/dist/ui/assets/cliproxy-ai-providers-CjKicdzR.js +0 -21
- package/dist/ui/assets/cliproxy-control-panel-Dw9Q1OoX.js +0 -1
- package/dist/ui/assets/code-highlight-BRUf_pqB.js +0 -3
- package/dist/ui/assets/codex-D3mdE9ZJ.js +0 -27
- package/dist/ui/assets/confirm-dialog-C5COcZYh.js +0 -1
- package/dist/ui/assets/copilot-C_bkjtNE.js +0 -3
- package/dist/ui/assets/cursor-CwFdpjUZ.js +0 -1
- package/dist/ui/assets/droid-BRV6w--c.js +0 -2
- package/dist/ui/assets/form-utils-Bcoyqxpq.js +0 -20
- package/dist/ui/assets/globalenv-section-D3NP1kLr.js +0 -1
- package/dist/ui/assets/health-D9LnJ4lp.js +0 -1
- package/dist/ui/assets/icons-DhBsHU-U.js +0 -1
- package/dist/ui/assets/index-A9ZK234F.js +0 -1
- package/dist/ui/assets/index-B8R9vAE9.js +0 -1
- package/dist/ui/assets/index-BCpf7__M.js +0 -1
- package/dist/ui/assets/index-BYrPCHr6.js +0 -1
- package/dist/ui/assets/index-Bb2CPQik.css +0 -1
- package/dist/ui/assets/index-CKNvmYLR.js +0 -69
- package/dist/ui/assets/index-DtD1WuHr.js +0 -1
- package/dist/ui/assets/masked-input-CcbDAxug.js +0 -1
- package/dist/ui/assets/notifications-B2HqRBj7.js +0 -1
- package/dist/ui/assets/proxy-status-widget-DhIJtL48.js +0 -1
- package/dist/ui/assets/radix-ui-Zb8sVEtn.js +0 -51
- package/dist/ui/assets/raw-json-settings-editor-panel-BJetiLxV.js +0 -1
- package/dist/ui/assets/react-vendor-CNOkPC89.js +0 -3
- package/dist/ui/assets/searchable-select-DNmazsgI.js +0 -1
- package/dist/ui/assets/separator-vdIGU0ab.js +0 -1
- package/dist/ui/assets/shared-IFLNQqyt.js +0 -8
- package/dist/ui/assets/table-C8wlucHc.js +0 -1
- package/dist/ui/assets/tanstack-DWm6aJ-G.js +0 -4
- package/dist/ui/assets/updates-BtnxoQcx.js +0 -1
- package/scripts/github/build-ai-review-packet.mjs +0 -242
- package/scripts/github/normalize-ai-review-output.mjs +0 -934
- package/scripts/github/prepare-ai-review-scope.mjs +0 -324
- package/scripts/github/run-ai-review-direct.mjs +0 -349
- /package/dist/cliproxy/{account-stats-key.d.ts → accounts/account-stats-key.d.ts} +0 -0
- /package/dist/cliproxy/{account-stats-key.js → accounts/account-stats-key.js} +0 -0
- /package/dist/cliproxy/{openai-compat-manager.d.ts → ai-providers/openai-compat-manager.d.ts} +0 -0
- /package/dist/cliproxy/{schema-sanitizer.d.ts → ai-providers/schema-sanitizer.d.ts} +0 -0
- /package/dist/cliproxy/{schema-sanitizer.js → ai-providers/schema-sanitizer.js} +0 -0
- /package/dist/cliproxy/{antigravity-responsibility.d.ts → auth/antigravity-responsibility.d.ts} +0 -0
- /package/dist/cliproxy/{auth-token-manager.d.ts → auth/auth-token-manager.d.ts} +0 -0
- /package/dist/cliproxy/{device-code-handler.d.ts → auth/device-code-handler.d.ts} +0 -0
- /package/dist/cliproxy/{device-code-handler.js → auth/device-code-handler.js} +0 -0
- /package/dist/cliproxy/{project-selection-handler.d.ts → auth/project-selection-handler.d.ts} +0 -0
- /package/dist/cliproxy/{project-selection-handler.js → auth/project-selection-handler.js} +0 -0
- /package/dist/cliproxy/{composite-validator.d.ts → config/composite-validator.d.ts} +0 -0
- /package/dist/cliproxy/{management-api-types.d.ts → management/management-api-types.d.ts} +0 -0
- /package/dist/cliproxy/{management-api-types.js → management/management-api-types.js} +0 -0
- /package/dist/cliproxy/{remote-token-uploader.d.ts → management/remote-token-uploader.d.ts} +0 -0
- /package/dist/cliproxy/{https-tunnel-proxy.d.ts → proxy/https-tunnel-proxy.d.ts} +0 -0
- /package/dist/cliproxy/{proxy-target-resolver.d.ts → proxy/proxy-target-resolver.d.ts} +0 -0
- /package/dist/cliproxy/{gemini-cli-quota-normalizer.d.ts → quota/gemini-cli-quota-normalizer.d.ts} +0 -0
- /package/dist/cliproxy/{quota-fetcher-gemini-cli.d.ts → quota/quota-fetcher-gemini-cli.d.ts} +0 -0
- /package/dist/cliproxy/{quota-fetcher-ghcp.d.ts → quota/quota-fetcher-ghcp.d.ts} +0 -0
- /package/dist/cliproxy/{quota-response-cache.d.ts → quota/quota-response-cache.d.ts} +0 -0
- /package/dist/cliproxy/{quota-response-cache.js → quota/quota-response-cache.js} +0 -0
- /package/dist/cliproxy/{quota-types.js → quota/quota-types.js} +0 -0
- /package/dist/cliproxy/{remote-proxy-client.d.ts → services/remote-proxy-client.d.ts} +0 -0
- /package/dist/cliproxy/{startup-lock.d.ts → services/startup-lock.d.ts} +0 -0
- /package/dist/cliproxy/{stats-transformer.d.ts → services/stats-transformer.d.ts} +0 -0
package/dist/ccs.js
CHANGED
|
@@ -25,352 +25,46 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
require("./utils/fetch-proxy-setup");
|
|
28
|
-
const fs = __importStar(require("fs"));
|
|
29
|
-
const claude_detector_1 = require("./utils/claude-detector");
|
|
30
|
-
const config_manager_1 = require("./utils/config-manager");
|
|
31
|
-
const helpers_1 = require("./utils/helpers");
|
|
32
|
-
const api_key_validator_1 = require("./utils/api-key-validator");
|
|
33
28
|
const error_manager_1 = require("./utils/error-manager");
|
|
34
|
-
const cliproxy_1 = require("./cliproxy");
|
|
35
|
-
const env_builder_1 = require("./cliproxy/config/env-builder");
|
|
36
|
-
const port_manager_1 = require("./cliproxy/config/port-manager");
|
|
37
|
-
const websearch_manager_1 = require("./utils/websearch-manager");
|
|
38
|
-
const image_analysis_1 = require("./utils/image-analysis");
|
|
39
|
-
const unified_config_loader_1 = require("./config/unified-config-loader");
|
|
40
|
-
const image_analyzer_profile_hook_injector_1 = require("./utils/hooks/image-analyzer-profile-hook-injector");
|
|
41
|
-
const hooks_1 = require("./utils/hooks");
|
|
42
29
|
const ui_1 = require("./utils/ui");
|
|
43
|
-
const constants_1 = require("./copilot/constants");
|
|
44
|
-
const official_channels_runtime_1 = require("./channels/official-channels-runtime");
|
|
45
|
-
const official_channels_store_1 = require("./channels/official-channels-store");
|
|
46
|
-
const constants_2 = require("./cursor/constants");
|
|
47
30
|
// Import centralized error handling
|
|
48
31
|
const errors_1 = require("./errors");
|
|
49
|
-
const
|
|
50
|
-
// Import extracted utility functions
|
|
51
|
-
const shell_executor_1 = require("./utils/shell-executor");
|
|
52
|
-
const glmt_deprecation_1 = require("./utils/glmt-deprecation");
|
|
53
|
-
const resume_lane_warning_1 = require("./auth/resume-lane-warning");
|
|
32
|
+
const logging_1 = require("./services/logging");
|
|
54
33
|
// Import target adapter system
|
|
55
34
|
const targets_1 = require("./targets");
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const update_checker_1 = require("./utils/update-checker");
|
|
63
|
-
const CODEX_RUNTIME_REASONING_LEVELS = new Set(['minimal', 'low', 'medium', 'high', 'xhigh']);
|
|
64
|
-
const CODEX_NATIVE_PASSTHROUGH_FLAGS = new Set(['--help', '-h', '--version', '-v']);
|
|
65
|
-
/**
|
|
66
|
-
* Smart profile detection
|
|
67
|
-
*/
|
|
68
|
-
function detectProfile(args) {
|
|
69
|
-
if (args.length === 0 || args[0].startsWith('-')) {
|
|
70
|
-
// No args or first arg is a flag → use default profile
|
|
71
|
-
return { profile: 'default', remainingArgs: args };
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
// First arg doesn't start with '-' → treat as profile name
|
|
75
|
-
return { profile: args[0], remainingArgs: args.slice(1) };
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function resolveRuntimeReasoningFlags(args, envThinkingValue) {
|
|
79
|
-
const runtime = (0, droid_reasoning_runtime_1.resolveDroidReasoningRuntime)(args, envThinkingValue);
|
|
80
|
-
if (runtime.duplicateDisplays.length > 0) {
|
|
81
|
-
console.error((0, ui_1.warn)(`[!] Multiple reasoning flags detected. Using first occurrence: ${runtime.sourceDisplay || '<first-flag>'}`));
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
argsWithoutReasoningFlags: runtime.argsWithoutReasoningFlags,
|
|
85
|
-
reasoningOverride: runtime.reasoningOverride,
|
|
86
|
-
reasoningSource: runtime.sourceFlag
|
|
87
|
-
? 'flag'
|
|
88
|
-
: runtime.reasoningOverride !== undefined
|
|
89
|
-
? 'env'
|
|
90
|
-
: undefined,
|
|
91
|
-
sourceDisplay: runtime.sourceDisplay,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function normalizeCodexRuntimeReasoningOverride(value) {
|
|
95
|
-
return typeof value === 'string' && CODEX_RUNTIME_REASONING_LEVELS.has(value) ? value : undefined;
|
|
96
|
-
}
|
|
97
|
-
function exitWithRuntimeReasoningFlagError(message, options) {
|
|
98
|
-
console.error((0, ui_1.fail)(message));
|
|
99
|
-
console.error(' Examples: --thinking low, --thinking 8192, --thinking off');
|
|
100
|
-
console.error(` Codex alias: --effort ${options.codexAliasLevels}`);
|
|
101
|
-
if (options.includeDroidExecExample) {
|
|
102
|
-
console.error(' Droid exec: --reasoning-effort high');
|
|
103
|
-
}
|
|
104
|
-
process.exit(1);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Perform background update check (refreshes cache, no notification)
|
|
108
|
-
*/
|
|
109
|
-
async function refreshUpdateCache() {
|
|
110
|
-
try {
|
|
111
|
-
const currentVersion = (0, version_1.getVersion)();
|
|
112
|
-
// npm is now the only supported installation method
|
|
113
|
-
await (0, update_checker_1.checkForUpdates)(currentVersion, true, 'npm');
|
|
114
|
-
}
|
|
115
|
-
catch (_e) {
|
|
116
|
-
// Silently fail - update check shouldn't crash main CLI
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Show update notification if cached result indicates update available
|
|
121
|
-
* Returns true if notification was shown
|
|
122
|
-
*/
|
|
123
|
-
async function showCachedUpdateNotification() {
|
|
124
|
-
try {
|
|
125
|
-
const currentVersion = (0, version_1.getVersion)();
|
|
126
|
-
const updateInfo = (0, update_checker_1.checkCachedUpdate)(currentVersion);
|
|
127
|
-
if (updateInfo) {
|
|
128
|
-
await (0, update_checker_1.showUpdateNotification)(updateInfo);
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
catch (_e) {
|
|
133
|
-
// Silently fail
|
|
134
|
-
}
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
function resolveNativeClaudeLaunchArgs(args, profileType, targetConfigDir) {
|
|
138
|
-
const config = (0, unified_config_loader_1.getOfficialChannelsConfig)();
|
|
139
|
-
const environment = (0, official_channels_runtime_1.getOfficialChannelsEnvironmentStatus)(targetConfigDir ? { CLAUDE_CONFIG_DIR: targetConfigDir } : undefined);
|
|
140
|
-
const channelReadiness = {
|
|
141
|
-
telegram: (0, official_channels_store_1.getOfficialChannelReadiness)('telegram'),
|
|
142
|
-
discord: (0, official_channels_store_1.getOfficialChannelReadiness)('discord'),
|
|
143
|
-
imessage: !(0, official_channels_runtime_1.officialChannelRequiresMacOS)('imessage') || process.platform === 'darwin',
|
|
144
|
-
};
|
|
145
|
-
const plan = (0, official_channels_runtime_1.resolveOfficialChannelsLaunchPlan)({
|
|
146
|
-
args,
|
|
147
|
-
config,
|
|
148
|
-
target: 'claude',
|
|
149
|
-
profileType,
|
|
150
|
-
environment,
|
|
151
|
-
channelReadiness,
|
|
152
|
-
});
|
|
153
|
-
for (const message of plan.skippedMessages) {
|
|
154
|
-
console.error((0, ui_1.warn)(message));
|
|
155
|
-
}
|
|
156
|
-
if (config.selected.length > 0 &&
|
|
157
|
-
environment.auth.state === 'eligible' &&
|
|
158
|
-
environment.auth.orgRequirementMessage) {
|
|
159
|
-
console.error((0, ui_1.warn)(environment.auth.orgRequirementMessage));
|
|
160
|
-
}
|
|
161
|
-
if (!plan.applied) {
|
|
162
|
-
return args;
|
|
163
|
-
}
|
|
164
|
-
return (0, official_channels_runtime_1.buildOfficialChannelsArgs)(args, plan.appliedChannels, plan.wantsPermissionBypass);
|
|
165
|
-
}
|
|
166
|
-
function shouldPassthroughNativeCodexFlagCommand(args) {
|
|
167
|
-
return getNativeCodexPassthroughArgs(args) !== null;
|
|
168
|
-
}
|
|
169
|
-
function getNativeCodexPassthroughArgs(args) {
|
|
170
|
-
const targetArgs = (0, target_resolver_1.stripTargetFlag)(args);
|
|
171
|
-
if ((0, target_resolver_1.resolveTargetType)(args) !== 'codex' || targetArgs.length === 0) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
const firstArg = targetArgs[0] || '';
|
|
175
|
-
if (CODEX_NATIVE_PASSTHROUGH_FLAGS.has(firstArg)) {
|
|
176
|
-
return targetArgs;
|
|
177
|
-
}
|
|
178
|
-
const secondArg = targetArgs[1] || '';
|
|
179
|
-
if (firstArg === 'codex' && CODEX_NATIVE_PASSTHROUGH_FLAGS.has(secondArg)) {
|
|
180
|
-
return targetArgs.slice(1);
|
|
181
|
-
}
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
function execNativeCodexFlagCommand(args) {
|
|
185
|
-
const adapter = (0, targets_1.getTarget)('codex');
|
|
186
|
-
if (!adapter) {
|
|
187
|
-
console.error((0, ui_1.fail)('Target adapter not found for "codex"'));
|
|
188
|
-
process.exit(1);
|
|
189
|
-
}
|
|
190
|
-
const binaryInfo = adapter.detectBinary();
|
|
191
|
-
if (!binaryInfo) {
|
|
192
|
-
console.error((0, ui_1.fail)('Codex CLI not found.'));
|
|
193
|
-
console.error((0, ui_1.info)('Install a recent @openai/codex build, then retry.'));
|
|
194
|
-
process.exit(1);
|
|
195
|
-
}
|
|
196
|
-
const targetArgs = getNativeCodexPassthroughArgs(args);
|
|
197
|
-
if (!targetArgs) {
|
|
198
|
-
console.error((0, ui_1.fail)('Native Codex passthrough args could not be resolved.'));
|
|
199
|
-
process.exit(1);
|
|
200
|
-
}
|
|
201
|
-
const creds = {
|
|
202
|
-
profile: 'default',
|
|
203
|
-
baseUrl: '',
|
|
204
|
-
apiKey: '',
|
|
205
|
-
};
|
|
206
|
-
const builtArgs = adapter.buildArgs('default', targetArgs, {
|
|
207
|
-
creds,
|
|
208
|
-
profileType: 'default',
|
|
209
|
-
binaryInfo,
|
|
210
|
-
});
|
|
211
|
-
const targetEnv = adapter.buildEnv(creds, 'default');
|
|
212
|
-
adapter.exec(builtArgs, targetEnv, { binaryInfo });
|
|
213
|
-
}
|
|
35
|
+
// Import extracted dispatcher modules
|
|
36
|
+
const cli_argument_parser_1 = require("./dispatcher/cli-argument-parser");
|
|
37
|
+
const target_executor_1 = require("./dispatcher/target-executor");
|
|
38
|
+
const pre_dispatch_1 = require("./dispatcher/pre-dispatch");
|
|
39
|
+
const profile_resolver_1 = require("./dispatcher/profile-resolver");
|
|
40
|
+
// ========== Main Execution ==========
|
|
214
41
|
async function main() {
|
|
215
|
-
// Register target adapters
|
|
42
|
+
// Register target adapters (singleton wiring — stays in main)
|
|
216
43
|
(0, targets_1.registerTarget)(new targets_1.ClaudeAdapter());
|
|
217
44
|
(0, targets_1.registerTarget)(new targets_1.DroidAdapter());
|
|
218
45
|
(0, targets_1.registerTarget)(new targets_1.CodexAdapter());
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (!isCompletionCommand && process.stdout.isTTY && !process.env['CI']) {
|
|
224
|
-
const { initUI } = await Promise.resolve().then(() => __importStar(require('./utils/ui')));
|
|
225
|
-
await initUI();
|
|
226
|
-
}
|
|
227
|
-
// Parse --config-dir flag (must happen before any config loading)
|
|
228
|
-
const configDirIdx = args.findIndex((a) => a === '--config-dir' || a.startsWith('--config-dir='));
|
|
229
|
-
if (configDirIdx !== -1) {
|
|
230
|
-
const arg = args[configDirIdx];
|
|
231
|
-
let configDirValue;
|
|
232
|
-
let spliceCount = 1;
|
|
233
|
-
if (arg.startsWith('--config-dir=')) {
|
|
234
|
-
configDirValue = arg.split('=').slice(1).join('=');
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
configDirValue = args[configDirIdx + 1];
|
|
238
|
-
spliceCount = 2;
|
|
239
|
-
}
|
|
240
|
-
if (!configDirValue || configDirValue.startsWith('-')) {
|
|
241
|
-
console.error((0, ui_1.fail)('--config-dir requires a path argument'));
|
|
242
|
-
process.exit(1);
|
|
243
|
-
}
|
|
244
|
-
try {
|
|
245
|
-
const stat = fs.statSync(configDirValue);
|
|
246
|
-
if (!stat.isDirectory()) {
|
|
247
|
-
console.error((0, ui_1.fail)(`Not a directory: ${configDirValue}`));
|
|
248
|
-
process.exit(1);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
catch {
|
|
252
|
-
console.error((0, ui_1.fail)(`Config directory not found: ${configDirValue}`));
|
|
253
|
-
console.error((0, ui_1.info)('Create the directory first, then copy your config files into it.'));
|
|
254
|
-
process.exit(1);
|
|
255
|
-
}
|
|
256
|
-
(0, config_manager_1.setGlobalConfigDir)(configDirValue);
|
|
257
|
-
// Security warning: cloud sync paths expose OAuth tokens
|
|
258
|
-
const cloudService = (0, config_manager_1.detectCloudSyncPath)(configDirValue);
|
|
259
|
-
if (!isCompletionCommand && cloudService) {
|
|
260
|
-
console.error((0, ui_1.warn)(`CCS directory is under ${cloudService}.`));
|
|
261
|
-
console.error(' OAuth tokens in cliproxy/auth/ will be synced to cloud.');
|
|
262
|
-
console.error(' Consider: CCS_DIR=/path/outside/cloud ccs ...');
|
|
263
|
-
}
|
|
264
|
-
// Remove consumed args so they don't leak to Claude CLI
|
|
265
|
-
args.splice(configDirIdx, spliceCount);
|
|
266
|
-
}
|
|
267
|
-
else if (process.env.CCS_DIR) {
|
|
268
|
-
// Also warn for CCS_DIR env var pointing to cloud sync
|
|
269
|
-
const cloudService = (0, config_manager_1.detectCloudSyncPath)(process.env.CCS_DIR);
|
|
270
|
-
if (!isCompletionCommand && cloudService) {
|
|
271
|
-
console.error((0, ui_1.warn)(`CCS directory is under ${cloudService}.`));
|
|
272
|
-
console.error(' OAuth tokens in cliproxy/auth/ will be synced to cloud.');
|
|
273
|
-
console.error(' Consider: CCS_DIR=/path/outside/cloud ccs ...');
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
else if (process.env.CCS_HOME) {
|
|
277
|
-
// Also warn for CCS_HOME env var pointing to cloud sync
|
|
278
|
-
const cloudService = (0, config_manager_1.detectCloudSyncPath)(process.env.CCS_HOME);
|
|
279
|
-
if (!isCompletionCommand && cloudService) {
|
|
280
|
-
console.error((0, ui_1.warn)(`CCS directory is under ${cloudService}.`));
|
|
281
|
-
console.error(' OAuth tokens in cliproxy/auth/ will be synced to cloud.');
|
|
282
|
-
console.error(' Consider: CCS_DIR=/path/outside/cloud ccs ...');
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
if (isCompletionCommand) {
|
|
286
|
-
await (0, root_command_router_1.tryHandleRootCommand)(args);
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (shouldPassthroughNativeCodexFlagCommand(args)) {
|
|
290
|
-
execNativeCodexFlagCommand(args);
|
|
46
|
+
const cliLogger = (0, logging_1.createLogger)('cli');
|
|
47
|
+
// Phase A: bootstrap + early arg pre-parse
|
|
48
|
+
const bootstrap = await (0, cli_argument_parser_1.bootstrapAndParseEarlyCli)(process.argv.slice(2));
|
|
49
|
+
if (bootstrap.exitNow) {
|
|
291
50
|
return;
|
|
292
51
|
}
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
'
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
'update',
|
|
304
|
-
'--update',
|
|
305
|
-
];
|
|
306
|
-
if (process.stdout.isTTY && !process.env['CI'] && !skipUpdateCheck.includes(firstArg)) {
|
|
307
|
-
// 1. Show cached update notification (async for proper UI)
|
|
308
|
-
await showCachedUpdateNotification();
|
|
309
|
-
// 2. Refresh cache in background if stale (non-blocking)
|
|
310
|
-
if ((0, update_checker_1.isCacheStale)()) {
|
|
311
|
-
refreshUpdateCache();
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
// Auto-migrate to unified config format (silent if already migrated)
|
|
315
|
-
// Skip if user is explicitly running migrate command
|
|
316
|
-
if (firstArg !== 'migrate') {
|
|
317
|
-
const { autoMigrate } = await Promise.resolve().then(() => __importStar(require('./config/migration-manager')));
|
|
318
|
-
await autoMigrate();
|
|
319
|
-
}
|
|
320
|
-
// Auto-recovery for missing configuration (BEFORE any early-exit commands)
|
|
321
|
-
// This ensures ALL commands benefit from auto-recovery, not just profile-switching flow
|
|
322
|
-
// Recovery is safe to run early - it only creates missing files with safe defaults
|
|
323
|
-
// Wrapped in try-catch to prevent blocking --version/--help on permission errors
|
|
324
|
-
try {
|
|
325
|
-
const RecoveryManagerModule = await Promise.resolve().then(() => __importStar(require('./management/recovery-manager')));
|
|
326
|
-
const RecoveryManager = RecoveryManagerModule.default;
|
|
327
|
-
const recovery = new RecoveryManager();
|
|
328
|
-
const recovered = recovery.recoverAll();
|
|
329
|
-
if (recovered) {
|
|
330
|
-
recovery.showRecoveryHints();
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
catch (err) {
|
|
334
|
-
// Recovery is best-effort - don't block basic CLI functionality
|
|
335
|
-
console.warn('[!] Recovery failed:', err.message);
|
|
336
|
-
}
|
|
337
|
-
if (await (0, root_command_router_1.tryHandleRootCommand)(args)) {
|
|
52
|
+
const args = bootstrap.args;
|
|
53
|
+
const browserLaunchOverride = bootstrap.browserLaunchOverride;
|
|
54
|
+
cliLogger.info('command.start', 'CLI invocation started', {
|
|
55
|
+
command: args[0] || 'default',
|
|
56
|
+
argCount: args.length,
|
|
57
|
+
flags: args.filter((arg) => arg.startsWith('-')).slice(0, 20),
|
|
58
|
+
});
|
|
59
|
+
// Phase B: pre-dispatch side-effects (update check, migrate, recovery, root commands, routing)
|
|
60
|
+
const preDispatchConsumed = await (0, pre_dispatch_1.runPreDispatchHandlers)({ args, cliLogger });
|
|
61
|
+
if (preDispatchConsumed) {
|
|
338
62
|
return;
|
|
339
63
|
}
|
|
340
|
-
//
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const shouldRouteToCopilotCommand = (0, constants_1.isCopilotSubcommandToken)(copilotToken);
|
|
345
|
-
if (shouldRouteToCopilotCommand) {
|
|
346
|
-
const { handleCopilotCommand } = await Promise.resolve().then(() => __importStar(require('./commands/copilot-command')));
|
|
347
|
-
const exitCode = await handleCopilotCommand(args.slice(1));
|
|
348
|
-
process.exit(exitCode);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
// Special case: cursor command (Cursor local proxy integration)
|
|
352
|
-
// Route known admin subcommands to the command handler, keep all other args as profile passthrough.
|
|
353
|
-
if (firstArg === 'cursor' && args.length > 1) {
|
|
354
|
-
const { handleCursorCommand } = await Promise.resolve().then(() => __importStar(require('./commands/cursor-command')));
|
|
355
|
-
const cursorToken = args[1];
|
|
356
|
-
if ((0, constants_2.isCursorSubcommandToken)(cursorToken)) {
|
|
357
|
-
const exitCode = await handleCursorCommand(args.slice(1));
|
|
358
|
-
process.exit(exitCode);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
// First-time install: offer setup wizard for interactive users
|
|
362
|
-
// Check independently of recovery status (user may have empty config.yaml)
|
|
363
|
-
// Skip if headless, CI, or non-TTY environment
|
|
364
|
-
const { isFirstTimeInstall } = await Promise.resolve().then(() => __importStar(require('./commands/setup-command')));
|
|
365
|
-
if (process.stdout.isTTY && !process.env['CI'] && isFirstTimeInstall()) {
|
|
366
|
-
console.log('');
|
|
367
|
-
console.log((0, ui_1.info)('First-time install detected. Run `ccs setup` for guided configuration.'));
|
|
368
|
-
console.log(' Or use `ccs config` for the web dashboard.');
|
|
369
|
-
console.log('');
|
|
370
|
-
}
|
|
371
|
-
// Use ProfileDetector to determine profile type
|
|
372
|
-
const ProfileDetectorModule = await Promise.resolve().then(() => __importStar(require('./auth/profile-detector')));
|
|
373
|
-
const ProfileDetector = ProfileDetectorModule.default;
|
|
64
|
+
// Phase C: profile + target detection (extracted to dispatcher/profile-resolver.ts)
|
|
65
|
+
const resolvedProfile = await (0, profile_resolver_1.resolveProfileAndTarget)({ args, browserLaunchOverride, cliLogger });
|
|
66
|
+
const { profile, profileInfo, resolvedTarget, nativeClaudeRemainingArgs } = resolvedProfile;
|
|
67
|
+
// Dynamic imports needed by Phase E flows — preserve original load ordering.
|
|
374
68
|
const InstanceManagerModule = await Promise.resolve().then(() => __importStar(require('./management/instance-manager')));
|
|
375
69
|
const InstanceManager = InstanceManagerModule.default;
|
|
376
70
|
const ProfileRegistryModule = await Promise.resolve().then(() => __importStar(require('./auth/profile-registry')));
|
|
@@ -379,706 +73,30 @@ async function main() {
|
|
|
379
73
|
const { resolveAccountContextPolicy, isAccountContextMetadata } = AccountContextModule;
|
|
380
74
|
const ProfileContinuityModule = await Promise.resolve().then(() => __importStar(require('./auth/profile-continuity-inheritance')));
|
|
381
75
|
const { resolveProfileContinuityInheritance } = ProfileContinuityModule;
|
|
382
|
-
|
|
76
|
+
// Build full dispatch context (Phase E)
|
|
77
|
+
const dispatchCtx = {
|
|
78
|
+
...resolvedProfile,
|
|
79
|
+
InstanceManager,
|
|
80
|
+
ProfileRegistry,
|
|
81
|
+
resolveAccountContextPolicy,
|
|
82
|
+
isAccountContextMetadata,
|
|
83
|
+
resolveProfileContinuityInheritance,
|
|
84
|
+
};
|
|
383
85
|
try {
|
|
384
|
-
// Detect profile (strip --target flags before profile detection)
|
|
385
|
-
const cleanArgs = (0, target_resolver_1.stripTargetFlag)(args);
|
|
386
|
-
const { profile, remainingArgs } = detectProfile(cleanArgs);
|
|
387
|
-
const profileInfo = detector.detectProfileType(profile);
|
|
388
|
-
let resolvedTarget;
|
|
389
|
-
try {
|
|
390
|
-
resolvedTarget = (0, target_resolver_1.resolveTargetType)(args, profileInfo.target ? { target: profileInfo.target } : undefined);
|
|
391
|
-
}
|
|
392
|
-
catch (error) {
|
|
393
|
-
console.error((0, ui_1.fail)(error.message));
|
|
394
|
-
process.exit(1);
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
// Detect Claude CLI (needed for claude target and all CLIProxy-derived flows)
|
|
398
|
-
const claudeCliRaw = (0, claude_detector_1.detectClaudeCli)();
|
|
399
|
-
if (resolvedTarget === 'claude' && !claudeCliRaw) {
|
|
400
|
-
await error_manager_1.ErrorManager.showClaudeNotFound();
|
|
401
|
-
process.exit(1);
|
|
402
|
-
}
|
|
403
|
-
const claudeCli = claudeCliRaw || '';
|
|
404
|
-
// Resolve non-claude target adapter once.
|
|
405
|
-
const targetAdapter = resolvedTarget !== 'claude' ? (0, targets_1.getTarget)(resolvedTarget) : null;
|
|
406
|
-
let resolvedSettingsPath;
|
|
407
|
-
let resolvedSettings;
|
|
408
|
-
let resolvedCliproxyBridge;
|
|
409
|
-
// Preflight unsupported profile/target combinations BEFORE binary detection,
|
|
410
|
-
// so users get the most actionable error even when the target CLI is not installed.
|
|
411
|
-
if (resolvedTarget !== 'claude') {
|
|
412
|
-
if (!targetAdapter) {
|
|
413
|
-
console.error((0, ui_1.fail)(`Target adapter not found for "${resolvedTarget}"`));
|
|
414
|
-
process.exit(1);
|
|
415
|
-
}
|
|
416
|
-
if (profileInfo.type === 'settings') {
|
|
417
|
-
resolvedSettingsPath = profileInfo.settingsPath
|
|
418
|
-
? (0, helpers_1.expandPath)(profileInfo.settingsPath)
|
|
419
|
-
: (0, config_manager_1.getSettingsPath)(profileInfo.name);
|
|
420
|
-
resolvedSettings = (0, config_manager_1.loadSettings)(resolvedSettingsPath);
|
|
421
|
-
resolvedCliproxyBridge = (0, cliproxy_profile_bridge_1.resolveCliproxyBridgeMetadata)(resolvedSettings);
|
|
422
|
-
const compatibility = (0, targets_1.evaluateTargetRuntimeCompatibility)({
|
|
423
|
-
target: resolvedTarget,
|
|
424
|
-
profileType: profileInfo.type,
|
|
425
|
-
cliproxyBridgeProvider: resolvedCliproxyBridge?.provider ?? null,
|
|
426
|
-
});
|
|
427
|
-
if (!compatibility.supported) {
|
|
428
|
-
console.error((0, ui_1.fail)(compatibility.reason || `${targetAdapter.displayName} does not support this profile.`));
|
|
429
|
-
if (compatibility.suggestion) {
|
|
430
|
-
console.error((0, ui_1.info)(compatibility.suggestion));
|
|
431
|
-
}
|
|
432
|
-
process.exit(1);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
else {
|
|
436
|
-
const compatibility = (0, targets_1.evaluateTargetRuntimeCompatibility)({
|
|
437
|
-
target: resolvedTarget,
|
|
438
|
-
profileType: profileInfo.type,
|
|
439
|
-
cliproxyProvider: profileInfo.type === 'cliproxy' ? profileInfo.provider : undefined,
|
|
440
|
-
isComposite: profileInfo.type === 'cliproxy' ? Boolean(profileInfo.isComposite) : undefined,
|
|
441
|
-
});
|
|
442
|
-
if (!compatibility.supported) {
|
|
443
|
-
console.error((0, ui_1.fail)(compatibility.reason || `${targetAdapter.displayName} does not support this profile.`));
|
|
444
|
-
if (compatibility.suggestion) {
|
|
445
|
-
console.error((0, ui_1.info)(compatibility.suggestion));
|
|
446
|
-
}
|
|
447
|
-
process.exit(1);
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
if (profileInfo.type === 'default') {
|
|
451
|
-
if (!targetAdapter.supportsProfileType('default')) {
|
|
452
|
-
console.error((0, ui_1.fail)(`${targetAdapter.displayName} does not support default profile mode`));
|
|
453
|
-
process.exit(1);
|
|
454
|
-
}
|
|
455
|
-
// For default mode, Droid requires explicit credentials from environment.
|
|
456
|
-
if (resolvedTarget === 'droid') {
|
|
457
|
-
const baseUrl = process.env['ANTHROPIC_BASE_URL'] || '';
|
|
458
|
-
const apiKey = process.env['ANTHROPIC_AUTH_TOKEN'] || '';
|
|
459
|
-
if (!baseUrl.trim() || !apiKey.trim()) {
|
|
460
|
-
console.error((0, ui_1.fail)(`${targetAdapter.displayName} default mode requires ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN`));
|
|
461
|
-
console.error((0, ui_1.info)('Use a settings-based profile instead: ccs glm --target droid'));
|
|
462
|
-
process.exit(1);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
// For non-claude targets, verify target binary exists once and pass it through.
|
|
468
|
-
const targetBinaryInfo = targetAdapter?.detectBinary() ?? null;
|
|
469
|
-
if (resolvedTarget !== 'claude' && !targetBinaryInfo) {
|
|
470
|
-
const displayName = targetAdapter?.displayName || resolvedTarget;
|
|
471
|
-
console.error((0, ui_1.fail)(`${displayName} CLI not found.`));
|
|
472
|
-
if (resolvedTarget === 'droid') {
|
|
473
|
-
console.error((0, ui_1.info)('Install: npm i -g @factory/cli'));
|
|
474
|
-
}
|
|
475
|
-
else if (resolvedTarget === 'codex') {
|
|
476
|
-
console.error((0, ui_1.info)('Install a recent @openai/codex build, then retry.'));
|
|
477
|
-
}
|
|
478
|
-
process.exit(1);
|
|
479
|
-
}
|
|
480
|
-
// Best-effort: prune stale Droid model entries at runtime so settings.json stays clean.
|
|
481
|
-
if (resolvedTarget === 'droid') {
|
|
482
|
-
try {
|
|
483
|
-
const allProfiles = detector.getAllProfiles();
|
|
484
|
-
const activeProfiles = allProfiles.settings.filter((name) => /^[a-zA-Z0-9._-]+$/.test(name));
|
|
485
|
-
await (0, targets_1.pruneOrphanedModels)(activeProfiles);
|
|
486
|
-
}
|
|
487
|
-
catch (error) {
|
|
488
|
-
console.error((0, ui_1.warn)(`[!] Droid prune skipped: ${error.message}`));
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
let targetRemainingArgs = remainingArgs;
|
|
492
|
-
let runtimeReasoningOverride;
|
|
493
|
-
if (resolvedTarget === 'droid') {
|
|
494
|
-
try {
|
|
495
|
-
const droidRoute = (0, droid_command_router_1.routeDroidCommandArgs)(remainingArgs);
|
|
496
|
-
targetRemainingArgs = droidRoute.argsForDroid;
|
|
497
|
-
if (droidRoute.mode === 'interactive') {
|
|
498
|
-
const runtime = resolveRuntimeReasoningFlags(remainingArgs, process.env.CCS_THINKING);
|
|
499
|
-
targetRemainingArgs = runtime.argsWithoutReasoningFlags;
|
|
500
|
-
runtimeReasoningOverride = runtime.reasoningOverride;
|
|
501
|
-
}
|
|
502
|
-
else {
|
|
503
|
-
if (droidRoute.duplicateReasoningDisplays.length > 0) {
|
|
504
|
-
console.error((0, ui_1.warn)(`[!] Multiple reasoning flags detected. Using first occurrence: ${droidRoute.reasoningSourceDisplay || '<first-flag>'}`));
|
|
505
|
-
}
|
|
506
|
-
if (droidRoute.autoPrependedExec && process.stdout.isTTY) {
|
|
507
|
-
console.error((0, ui_1.info)('Detected Droid exec-only flags. Routing as: droid exec <flags> [prompt]'));
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
catch (error) {
|
|
512
|
-
if (error instanceof droid_reasoning_runtime_1.DroidReasoningFlagError || error instanceof droid_command_router_1.DroidCommandRouterError) {
|
|
513
|
-
exitWithRuntimeReasoningFlagError(error.message, {
|
|
514
|
-
codexAliasLevels: 'minimal|low|medium|high|xhigh',
|
|
515
|
-
includeDroidExecExample: true,
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
throw error;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
else if (resolvedTarget === 'codex') {
|
|
522
|
-
try {
|
|
523
|
-
const runtime = resolveRuntimeReasoningFlags(remainingArgs, process.env.CCS_THINKING);
|
|
524
|
-
targetRemainingArgs = runtime.argsWithoutReasoningFlags;
|
|
525
|
-
const normalizedReasoning = normalizeCodexRuntimeReasoningOverride(runtime.reasoningOverride);
|
|
526
|
-
if (runtime.reasoningOverride !== undefined && !normalizedReasoning) {
|
|
527
|
-
if (runtime.reasoningSource === 'flag') {
|
|
528
|
-
throw new droid_reasoning_runtime_1.DroidReasoningFlagError('Codex target supports reasoning levels only: minimal, low, medium, high, xhigh.', '--effort');
|
|
529
|
-
}
|
|
530
|
-
runtimeReasoningOverride = undefined;
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
runtimeReasoningOverride = normalizedReasoning;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
catch (error) {
|
|
537
|
-
if (error instanceof droid_reasoning_runtime_1.DroidReasoningFlagError) {
|
|
538
|
-
exitWithRuntimeReasoningFlagError(error.message, {
|
|
539
|
-
codexAliasLevels: 'minimal|low|medium|high|xhigh',
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
throw error;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
86
|
// Special case: headless delegation (-p/--prompt)
|
|
546
87
|
// Keep existing behavior for Claude targets only; non-claude targets must continue
|
|
547
88
|
// through normal adapter dispatch logic.
|
|
548
|
-
if (args.
|
|
549
|
-
const shouldUseDelegation = resolvedTarget === 'claude' && profileInfo.type
|
|
89
|
+
if (args.some((arg) => arg === '-p' || arg === '--prompt' || arg.startsWith('--prompt='))) {
|
|
90
|
+
const shouldUseDelegation = resolvedTarget === 'claude' && profileInfo.type === 'settings';
|
|
550
91
|
if (shouldUseDelegation) {
|
|
551
92
|
const { DelegationHandler } = await Promise.resolve().then(() => __importStar(require('./delegation/delegation-handler')));
|
|
552
93
|
const handler = new DelegationHandler();
|
|
553
|
-
await handler.route(
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
if (profileInfo.type === 'cliproxy') {
|
|
558
|
-
// CLIPROXY FLOW: OAuth-based profiles (gemini, codex, agy, qwen) or user-defined variants
|
|
559
|
-
if (resolvedTarget === 'claude') {
|
|
560
|
-
(0, websearch_manager_1.ensureWebSearchMcpOrThrow)();
|
|
561
|
-
(0, image_analysis_1.ensureImageAnalysisMcpOrThrow)();
|
|
562
|
-
}
|
|
563
|
-
const imageAnalysisFallbackHookReady = resolvedTarget === 'claude' ? (0, hooks_1.prepareImageAnalysisFallbackHook)() : false;
|
|
564
|
-
const provider = profileInfo.provider || profileInfo.name;
|
|
565
|
-
// Inject Image Analyzer hook into profile settings before launch
|
|
566
|
-
(0, image_analyzer_profile_hook_injector_1.ensureProfileHooks)({
|
|
567
|
-
profileName: profileInfo.name,
|
|
568
|
-
profileType: profileInfo.type,
|
|
569
|
-
cliproxyProvider: provider,
|
|
570
|
-
isComposite: profileInfo.isComposite,
|
|
571
|
-
settingsPath: profileInfo.settingsPath ? (0, helpers_1.expandPath)(profileInfo.settingsPath) : undefined,
|
|
572
|
-
sharedHookInstalled: imageAnalysisFallbackHookReady,
|
|
573
|
-
});
|
|
574
|
-
const customSettingsPath = profileInfo.settingsPath; // undefined for hardcoded profiles
|
|
575
|
-
const variantPort = profileInfo.port; // variant-specific port for isolation
|
|
576
|
-
const cliproxyPort = variantPort || port_manager_1.CLIPROXY_DEFAULT_PORT;
|
|
577
|
-
if (resolvedTarget !== 'claude') {
|
|
578
|
-
const adapter = targetAdapter;
|
|
579
|
-
if (!adapter) {
|
|
580
|
-
console.error((0, ui_1.fail)(`Target adapter not found for "${resolvedTarget}"`));
|
|
581
|
-
process.exitCode = 1;
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (!adapter.supportsProfileType('cliproxy')) {
|
|
585
|
-
console.error((0, ui_1.fail)(`${adapter.displayName} does not support CLIProxy profiles`));
|
|
586
|
-
process.exitCode = 1;
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
// Keep CLIProxy management/auth flags on Claude flow only.
|
|
590
|
-
const unsupportedCliproxyFlags = [
|
|
591
|
-
'--auth',
|
|
592
|
-
'--logout',
|
|
593
|
-
'--accounts',
|
|
594
|
-
'--add',
|
|
595
|
-
'--use',
|
|
596
|
-
'--config',
|
|
597
|
-
'--headless',
|
|
598
|
-
'--paste-callback',
|
|
599
|
-
'--port-forward',
|
|
600
|
-
'--nickname',
|
|
601
|
-
'--kiro-auth-method',
|
|
602
|
-
'--backend',
|
|
603
|
-
'--proxy-host',
|
|
604
|
-
'--proxy-port',
|
|
605
|
-
'--proxy-protocol',
|
|
606
|
-
'--proxy-auth-token',
|
|
607
|
-
'--proxy-timeout',
|
|
608
|
-
'--local-proxy',
|
|
609
|
-
'--remote-only',
|
|
610
|
-
'--no-fallback',
|
|
611
|
-
'--allow-self-signed',
|
|
612
|
-
'--1m',
|
|
613
|
-
'--no-1m',
|
|
614
|
-
];
|
|
615
|
-
const providedUnsupportedFlag = unsupportedCliproxyFlags.find((flag) => targetRemainingArgs.includes(flag) ||
|
|
616
|
-
targetRemainingArgs.some((arg) => arg.startsWith(`${flag}=`)));
|
|
617
|
-
if (providedUnsupportedFlag) {
|
|
618
|
-
console.error((0, ui_1.fail)(`${providedUnsupportedFlag} is only supported when running CLIProxy profiles on Claude target`));
|
|
619
|
-
console.error((0, ui_1.info)(`Run with Claude target: ccs ${profileInfo.name} --target claude ...`));
|
|
620
|
-
process.exitCode = 1;
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
// For Droid execution path, require existing OAuth auth and running local proxy.
|
|
624
|
-
if (profileInfo.isComposite && profileInfo.compositeTiers) {
|
|
625
|
-
const compositeProviders = [
|
|
626
|
-
...new Set(Object.values(profileInfo.compositeTiers).map((tier) => tier.provider)),
|
|
627
|
-
];
|
|
628
|
-
const missingProvider = compositeProviders.find((p) => !(0, cliproxy_1.isAuthenticated)(p));
|
|
629
|
-
if (missingProvider) {
|
|
630
|
-
console.error((0, ui_1.fail)(`Missing OAuth auth for composite tier provider: ${missingProvider}`));
|
|
631
|
-
console.error((0, ui_1.info)(`Authenticate first: ccs ${missingProvider} --auth`));
|
|
632
|
-
process.exitCode = 1;
|
|
633
|
-
return;
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
else if (!(0, cliproxy_1.isAuthenticated)(provider)) {
|
|
637
|
-
console.error((0, ui_1.fail)(`No OAuth authentication found for provider: ${provider}`));
|
|
638
|
-
console.error((0, ui_1.info)(`Authenticate first: ccs ${provider} --auth`));
|
|
639
|
-
process.exitCode = 1;
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
const ensureServiceResult = await (0, cliproxy_1.ensureCliproxyService)(cliproxyPort, targetRemainingArgs.includes('--verbose') || targetRemainingArgs.includes('-v'));
|
|
643
|
-
if (!ensureServiceResult.started) {
|
|
644
|
-
console.error((0, ui_1.fail)(ensureServiceResult.error || 'Failed to start local CLIProxy service'));
|
|
645
|
-
process.exitCode = 1;
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
const envVars = profileInfo.isComposite && profileInfo.compositeTiers && profileInfo.compositeDefaultTier
|
|
649
|
-
? (0, env_builder_1.getCompositeEnvVars)(profileInfo.compositeTiers, profileInfo.compositeDefaultTier, cliproxyPort, customSettingsPath)
|
|
650
|
-
: (0, env_builder_1.getEffectiveEnvVars)(provider, cliproxyPort, customSettingsPath);
|
|
651
|
-
const creds = {
|
|
652
|
-
profile: profileInfo.name,
|
|
653
|
-
baseUrl: envVars['ANTHROPIC_BASE_URL'] || '',
|
|
654
|
-
apiKey: envVars['ANTHROPIC_AUTH_TOKEN'] || '',
|
|
655
|
-
model: envVars['ANTHROPIC_MODEL'] || undefined,
|
|
656
|
-
provider: (0, targets_1.resolveDroidProvider)({
|
|
657
|
-
provider: envVars['CCS_DROID_PROVIDER'] || envVars['DROID_PROVIDER'],
|
|
658
|
-
baseUrl: envVars['ANTHROPIC_BASE_URL'],
|
|
659
|
-
model: envVars['ANTHROPIC_MODEL'],
|
|
660
|
-
}),
|
|
661
|
-
reasoningOverride: runtimeReasoningOverride,
|
|
662
|
-
envVars,
|
|
663
|
-
};
|
|
664
|
-
if (!creds.baseUrl || !creds.apiKey) {
|
|
665
|
-
console.error((0, ui_1.fail)(`Missing CLIProxy runtime credentials for ${profileInfo.name} (ANTHROPIC_BASE_URL/AUTH_TOKEN)`));
|
|
666
|
-
console.error((0, ui_1.info)('Reconfigure with: ccs config > CLIProxy, or run ccs <provider> --config'));
|
|
667
|
-
process.exitCode = 1;
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
await adapter.prepareCredentials(creds);
|
|
671
|
-
const targetArgs = adapter.buildArgs(profileInfo.name, targetRemainingArgs, {
|
|
672
|
-
creds,
|
|
673
|
-
profileType: profileInfo.type,
|
|
674
|
-
binaryInfo: targetBinaryInfo || undefined,
|
|
675
|
-
});
|
|
676
|
-
const targetEnv = adapter.buildEnv(creds, profileInfo.type);
|
|
677
|
-
adapter.exec(targetArgs, targetEnv, { binaryInfo: targetBinaryInfo || undefined });
|
|
94
|
+
await handler.route([profile, ...nativeClaudeRemainingArgs]);
|
|
678
95
|
return;
|
|
679
96
|
}
|
|
680
|
-
await (0, cliproxy_1.execClaudeWithCLIProxy)(claudeCli, provider, remainingArgs, {
|
|
681
|
-
customSettingsPath,
|
|
682
|
-
port: cliproxyPort,
|
|
683
|
-
isComposite: profileInfo.isComposite,
|
|
684
|
-
compositeTiers: profileInfo.compositeTiers,
|
|
685
|
-
compositeDefaultTier: profileInfo.compositeDefaultTier,
|
|
686
|
-
profileName: profileInfo.name,
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
else if (profileInfo.type === 'copilot') {
|
|
690
|
-
// COPILOT FLOW: GitHub Copilot subscription via copilot-api proxy
|
|
691
|
-
(0, websearch_manager_1.ensureWebSearchMcpOrThrow)();
|
|
692
|
-
(0, image_analysis_1.ensureImageAnalysisMcpOrThrow)();
|
|
693
|
-
const imageAnalysisFallbackHookReady = resolvedTarget === 'claude' ? (0, hooks_1.prepareImageAnalysisFallbackHook)() : false;
|
|
694
|
-
// Inject Image Analyzer hook into profile settings before launch
|
|
695
|
-
(0, image_analyzer_profile_hook_injector_1.ensureProfileHooks)({
|
|
696
|
-
profileName: profileInfo.name,
|
|
697
|
-
profileType: profileInfo.type,
|
|
698
|
-
sharedHookInstalled: imageAnalysisFallbackHookReady,
|
|
699
|
-
});
|
|
700
|
-
const { executeCopilotProfile } = await Promise.resolve().then(() => __importStar(require('./copilot')));
|
|
701
|
-
const copilotConfig = profileInfo.copilotConfig;
|
|
702
|
-
if (!copilotConfig) {
|
|
703
|
-
console.error((0, ui_1.fail)('Copilot configuration not found'));
|
|
704
|
-
process.exit(1);
|
|
705
|
-
}
|
|
706
|
-
const continuityInheritance = await resolveProfileContinuityInheritance({
|
|
707
|
-
profileName: profileInfo.name,
|
|
708
|
-
profileType: profileInfo.type,
|
|
709
|
-
target: resolvedTarget,
|
|
710
|
-
});
|
|
711
|
-
if (continuityInheritance.sourceAccount && process.env.CCS_DEBUG) {
|
|
712
|
-
console.error((0, ui_1.info)(`Continuity inheritance active: profile "${profileInfo.name}" -> account "${continuityInheritance.sourceAccount}"`));
|
|
713
|
-
}
|
|
714
|
-
const exitCode = await executeCopilotProfile(copilotConfig, remainingArgs, continuityInheritance.claudeConfigDir, claudeCli);
|
|
715
|
-
process.exit(exitCode);
|
|
716
|
-
}
|
|
717
|
-
else if (profileInfo.type === 'cursor') {
|
|
718
|
-
// CURSOR FLOW: local Cursor daemon profile
|
|
719
|
-
(0, websearch_manager_1.ensureWebSearchMcpOrThrow)();
|
|
720
|
-
(0, hooks_1.installImageAnalyzerHook)();
|
|
721
|
-
(0, image_analyzer_profile_hook_injector_1.ensureProfileHooks)({
|
|
722
|
-
profileName: profileInfo.name,
|
|
723
|
-
profileType: profileInfo.type,
|
|
724
|
-
});
|
|
725
|
-
const { executeCursorProfile } = await Promise.resolve().then(() => __importStar(require('./cursor')));
|
|
726
|
-
const cursorConfig = profileInfo.cursorConfig;
|
|
727
|
-
if (!cursorConfig) {
|
|
728
|
-
console.error((0, ui_1.fail)('Cursor configuration not found'));
|
|
729
|
-
process.exit(1);
|
|
730
|
-
}
|
|
731
|
-
const continuityInheritance = await resolveProfileContinuityInheritance({
|
|
732
|
-
profileName: profileInfo.name,
|
|
733
|
-
profileType: profileInfo.type,
|
|
734
|
-
target: resolvedTarget,
|
|
735
|
-
});
|
|
736
|
-
if (continuityInheritance.sourceAccount && process.env.CCS_DEBUG) {
|
|
737
|
-
console.error((0, ui_1.info)(`Continuity inheritance active: profile "${profileInfo.name}" -> account "${continuityInheritance.sourceAccount}"`));
|
|
738
|
-
}
|
|
739
|
-
const exitCode = await executeCursorProfile(cursorConfig, remainingArgs, continuityInheritance.claudeConfigDir, claudeCli);
|
|
740
|
-
process.exit(exitCode);
|
|
741
|
-
}
|
|
742
|
-
else if (profileInfo.type === 'settings') {
|
|
743
|
-
// Settings-based profiles (glm, glmt) are third-party providers
|
|
744
|
-
const imageAnalysisMcpReady = resolvedTarget === 'claude' ? (0, image_analysis_1.ensureImageAnalysisMcpOrThrow)() : true;
|
|
745
|
-
if (resolvedTarget === 'claude') {
|
|
746
|
-
(0, websearch_manager_1.ensureWebSearchMcpOrThrow)();
|
|
747
|
-
}
|
|
748
|
-
// Display WebSearch status (single line, equilibrium UX)
|
|
749
|
-
(0, websearch_manager_1.displayWebSearchStatus)();
|
|
750
|
-
const continuityInheritance = resolvedTarget === 'claude'
|
|
751
|
-
? await resolveProfileContinuityInheritance({
|
|
752
|
-
profileName: profileInfo.name,
|
|
753
|
-
profileType: profileInfo.type,
|
|
754
|
-
target: resolvedTarget,
|
|
755
|
-
})
|
|
756
|
-
: {};
|
|
757
|
-
if (continuityInheritance.sourceAccount && process.env.CCS_DEBUG) {
|
|
758
|
-
console.error((0, ui_1.info)(`Continuity inheritance active: profile "${profileInfo.name}" -> account "${continuityInheritance.sourceAccount}"`));
|
|
759
|
-
}
|
|
760
|
-
const inheritedClaudeConfigDir = continuityInheritance.claudeConfigDir;
|
|
761
|
-
(0, websearch_manager_1.syncWebSearchMcpToConfigDir)(inheritedClaudeConfigDir);
|
|
762
|
-
(0, image_analysis_1.syncImageAnalysisMcpToConfigDir)(inheritedClaudeConfigDir);
|
|
763
|
-
const imageAnalysisFallbackHookReady = resolvedTarget === 'claude' ? (0, hooks_1.prepareImageAnalysisFallbackHook)() : false;
|
|
764
|
-
const expandedSettingsPath = resolvedSettingsPath ??
|
|
765
|
-
(profileInfo.settingsPath
|
|
766
|
-
? (0, helpers_1.expandPath)(profileInfo.settingsPath)
|
|
767
|
-
: (0, config_manager_1.getSettingsPath)(profileInfo.name));
|
|
768
|
-
const settings = resolvedSettings ?? (0, config_manager_1.loadSettings)(expandedSettingsPath);
|
|
769
|
-
const cliproxyBridge = resolvedCliproxyBridge ?? (0, cliproxy_profile_bridge_1.resolveCliproxyBridgeMetadata)(settings);
|
|
770
|
-
(0, image_analyzer_profile_hook_injector_1.ensureProfileHooks)({
|
|
771
|
-
profileName: profileInfo.name,
|
|
772
|
-
profileType: profileInfo.type,
|
|
773
|
-
settingsPath: expandedSettingsPath,
|
|
774
|
-
settings,
|
|
775
|
-
cliproxyBridge,
|
|
776
|
-
sharedHookInstalled: imageAnalysisFallbackHookReady,
|
|
777
|
-
});
|
|
778
|
-
if (resolvedTarget !== 'claude') {
|
|
779
|
-
const compatibility = (0, targets_1.evaluateTargetRuntimeCompatibility)({
|
|
780
|
-
target: resolvedTarget,
|
|
781
|
-
profileType: profileInfo.type,
|
|
782
|
-
cliproxyBridgeProvider: cliproxyBridge?.provider ?? null,
|
|
783
|
-
});
|
|
784
|
-
if (!compatibility.supported) {
|
|
785
|
-
console.error((0, ui_1.fail)(compatibility.reason ||
|
|
786
|
-
`${targetAdapter?.displayName || resolvedTarget} does not support this profile.`));
|
|
787
|
-
if (compatibility.suggestion) {
|
|
788
|
-
console.error((0, ui_1.info)(compatibility.suggestion));
|
|
789
|
-
}
|
|
790
|
-
process.exit(1);
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
const rawSettingsEnv = profileInfo.env ?? settings.env ?? {};
|
|
794
|
-
const isDeprecatedGlmtProfile = (0, glmt_deprecation_1.isDeprecatedGlmtProfileName)(profileInfo.name);
|
|
795
|
-
const glmtNormalization = isDeprecatedGlmtProfile
|
|
796
|
-
? (0, glmt_deprecation_1.normalizeDeprecatedGlmtEnv)(rawSettingsEnv)
|
|
797
|
-
: null;
|
|
798
|
-
const settingsEnv = glmtNormalization?.env ?? rawSettingsEnv;
|
|
799
|
-
if (glmtNormalization) {
|
|
800
|
-
for (const message of glmtNormalization.warnings) {
|
|
801
|
-
console.error((0, ui_1.warn)(message));
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
// Pre-flight validation for Z.AI-compatible profiles.
|
|
805
|
-
if (profileInfo.name === 'glm' || isDeprecatedGlmtProfile) {
|
|
806
|
-
const apiKey = settingsEnv['ANTHROPIC_AUTH_TOKEN'];
|
|
807
|
-
if (apiKey) {
|
|
808
|
-
const validation = await (0, api_key_validator_1.validateGlmKey)(apiKey, settingsEnv['ANTHROPIC_BASE_URL']);
|
|
809
|
-
if (!validation.valid) {
|
|
810
|
-
console.error('');
|
|
811
|
-
console.error((0, ui_1.fail)(validation.error || 'API key validation failed'));
|
|
812
|
-
if (validation.suggestion) {
|
|
813
|
-
console.error('');
|
|
814
|
-
console.error(validation.suggestion);
|
|
815
|
-
}
|
|
816
|
-
console.error('');
|
|
817
|
-
console.error((0, ui_1.info)('To skip validation: CCS_SKIP_PREFLIGHT=1 ccs glm "prompt"'));
|
|
818
|
-
process.exit(1);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (profileInfo.name === 'mm') {
|
|
823
|
-
const apiKey = settingsEnv['ANTHROPIC_AUTH_TOKEN'];
|
|
824
|
-
if (apiKey) {
|
|
825
|
-
const validation = await (0, api_key_validator_1.validateMiniMaxKey)(apiKey, settingsEnv['ANTHROPIC_BASE_URL']);
|
|
826
|
-
if (!validation.valid) {
|
|
827
|
-
console.error('');
|
|
828
|
-
console.error((0, ui_1.fail)(validation.error || 'API key validation failed'));
|
|
829
|
-
if (validation.suggestion) {
|
|
830
|
-
console.error('');
|
|
831
|
-
console.error(validation.suggestion);
|
|
832
|
-
}
|
|
833
|
-
console.error('');
|
|
834
|
-
console.error((0, ui_1.info)('To skip validation: CCS_SKIP_PREFLIGHT=1 ccs mm "prompt"'));
|
|
835
|
-
process.exit(1);
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
// Pre-flight validation for Anthropic direct profiles (ANTHROPIC_API_KEY + no BASE_URL)
|
|
840
|
-
{
|
|
841
|
-
const anthropicApiKey = settingsEnv['ANTHROPIC_API_KEY'];
|
|
842
|
-
const hasBaseUrl = !!settingsEnv['ANTHROPIC_BASE_URL'];
|
|
843
|
-
if (anthropicApiKey && !hasBaseUrl) {
|
|
844
|
-
const validation = await (0, api_key_validator_1.validateAnthropicKey)(anthropicApiKey);
|
|
845
|
-
if (!validation.valid) {
|
|
846
|
-
console.error('');
|
|
847
|
-
console.error((0, ui_1.fail)(validation.error || 'API key validation failed'));
|
|
848
|
-
if (validation.suggestion) {
|
|
849
|
-
console.error('');
|
|
850
|
-
console.error(validation.suggestion);
|
|
851
|
-
}
|
|
852
|
-
console.error('');
|
|
853
|
-
console.error((0, ui_1.info)(`To skip validation: CCS_SKIP_PREFLIGHT=1 ccs ${profileInfo.name} "prompt"`));
|
|
854
|
-
process.exit(1);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
const webSearchEnv = (0, websearch_manager_1.getWebSearchHookEnv)();
|
|
859
|
-
const imageAnalysisStatus = await (0, hooks_1.resolveImageAnalysisRuntimeStatus)({
|
|
860
|
-
profileName: profileInfo.name,
|
|
861
|
-
profileType: profileInfo.type,
|
|
862
|
-
settings,
|
|
863
|
-
cliproxyBridge,
|
|
864
|
-
sharedHookInstalled: imageAnalysisFallbackHookReady,
|
|
865
|
-
});
|
|
866
|
-
const runtimeConnection = (0, hooks_1.resolveImageAnalysisRuntimeConnection)();
|
|
867
|
-
let imageAnalysisEnv = (0, hooks_1.getImageAnalysisHookEnv)({
|
|
868
|
-
profileName: profileInfo.name,
|
|
869
|
-
profileType: profileInfo.type,
|
|
870
|
-
settings,
|
|
871
|
-
cliproxyBridge,
|
|
872
|
-
});
|
|
873
|
-
imageAnalysisEnv = (0, hooks_1.applyImageAnalysisRuntimeOverrides)(imageAnalysisEnv, {
|
|
874
|
-
backendId: imageAnalysisStatus.backendId,
|
|
875
|
-
model: imageAnalysisStatus.model,
|
|
876
|
-
runtimePath: imageAnalysisStatus.runtimePath,
|
|
877
|
-
baseUrl: runtimeConnection.baseUrl,
|
|
878
|
-
apiKey: runtimeConnection.apiKey,
|
|
879
|
-
allowSelfSigned: runtimeConnection.allowSelfSigned,
|
|
880
|
-
});
|
|
881
|
-
if (!imageAnalysisMcpReady) {
|
|
882
|
-
imageAnalysisEnv = {
|
|
883
|
-
...imageAnalysisEnv,
|
|
884
|
-
CCS_CURRENT_PROVIDER: '',
|
|
885
|
-
CCS_IMAGE_ANALYSIS_SKIP: '1',
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
const imageAnalysisProvider = imageAnalysisEnv['CCS_CURRENT_PROVIDER'];
|
|
889
|
-
if (resolvedTarget === 'claude' &&
|
|
890
|
-
imageAnalysisEnv['CCS_IMAGE_ANALYSIS_SKIP'] !== '1' &&
|
|
891
|
-
imageAnalysisProvider) {
|
|
892
|
-
const verboseProxyLaunch = remainingArgs.includes('--verbose') ||
|
|
893
|
-
remainingArgs.includes('-v') ||
|
|
894
|
-
targetRemainingArgs.includes('--verbose') ||
|
|
895
|
-
targetRemainingArgs.includes('-v');
|
|
896
|
-
if (imageAnalysisStatus.effectiveRuntimeMode === 'native-read') {
|
|
897
|
-
console.error((0, ui_1.info)(`${imageAnalysisStatus.effectiveRuntimeReason || `Image analysis via ${imageAnalysisProvider} is unavailable.`} This session will use native Read.`));
|
|
898
|
-
imageAnalysisEnv = {
|
|
899
|
-
...imageAnalysisEnv,
|
|
900
|
-
CCS_CURRENT_PROVIDER: '',
|
|
901
|
-
CCS_IMAGE_ANALYSIS_SKIP: '1',
|
|
902
|
-
};
|
|
903
|
-
}
|
|
904
|
-
else if (imageAnalysisStatus.proxyReadiness === 'stopped') {
|
|
905
|
-
const ensureServiceResult = await (0, cliproxy_1.ensureCliproxyService)(port_manager_1.CLIPROXY_DEFAULT_PORT, verboseProxyLaunch);
|
|
906
|
-
if (!ensureServiceResult.started) {
|
|
907
|
-
console.error((0, ui_1.warn)(`Image analysis via ${imageAnalysisProvider} is unavailable because CCS could not start the local CLIProxy service. This session will use native Read.`));
|
|
908
|
-
imageAnalysisEnv = {
|
|
909
|
-
...imageAnalysisEnv,
|
|
910
|
-
CCS_CURRENT_PROVIDER: '',
|
|
911
|
-
CCS_IMAGE_ANALYSIS_SKIP: '1',
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
// Get global env vars (DISABLE_TELEMETRY, etc.) for third-party profiles
|
|
917
|
-
const globalEnvConfig = (0, unified_config_loader_1.getGlobalEnvConfig)();
|
|
918
|
-
const globalEnv = globalEnvConfig.enabled ? globalEnvConfig.env : {};
|
|
919
|
-
// Log global env injection for visibility (debug mode only)
|
|
920
|
-
if (globalEnvConfig.enabled && Object.keys(globalEnv).length > 0 && process.env.CCS_DEBUG) {
|
|
921
|
-
const envNames = Object.keys(globalEnv).join(', ');
|
|
922
|
-
console.error((0, ui_1.info)(`Global env: ${envNames}`));
|
|
923
|
-
}
|
|
924
|
-
// Explicitly inject effective settings env vars so stale ANTHROPIC_*
|
|
925
|
-
// values from prior sessions cannot leak into the active profile.
|
|
926
|
-
const envVars = {
|
|
927
|
-
...globalEnv,
|
|
928
|
-
...settingsEnv,
|
|
929
|
-
...(inheritedClaudeConfigDir ? { CLAUDE_CONFIG_DIR: inheritedClaudeConfigDir } : {}),
|
|
930
|
-
...webSearchEnv,
|
|
931
|
-
...imageAnalysisEnv,
|
|
932
|
-
CCS_PROFILE_TYPE: 'settings',
|
|
933
|
-
};
|
|
934
|
-
// Dispatch through target adapter for non-claude targets
|
|
935
|
-
if (resolvedTarget !== 'claude') {
|
|
936
|
-
const adapter = targetAdapter;
|
|
937
|
-
if (!adapter) {
|
|
938
|
-
console.error((0, ui_1.fail)(`Target adapter not found for "${resolvedTarget}"`));
|
|
939
|
-
process.exit(1);
|
|
940
|
-
}
|
|
941
|
-
const directAnthropicBaseUrl = settingsEnv['ANTHROPIC_BASE_URL'] ||
|
|
942
|
-
(settingsEnv['ANTHROPIC_API_KEY'] ? 'https://api.anthropic.com' : '');
|
|
943
|
-
const creds = {
|
|
944
|
-
profile: profileInfo.name,
|
|
945
|
-
baseUrl: directAnthropicBaseUrl,
|
|
946
|
-
apiKey: settingsEnv['ANTHROPIC_AUTH_TOKEN'] || settingsEnv['ANTHROPIC_API_KEY'] || '',
|
|
947
|
-
model: settingsEnv['ANTHROPIC_MODEL'],
|
|
948
|
-
provider: (0, targets_1.resolveDroidProvider)({
|
|
949
|
-
provider: settingsEnv['CCS_DROID_PROVIDER'] || settingsEnv['DROID_PROVIDER'],
|
|
950
|
-
baseUrl: directAnthropicBaseUrl,
|
|
951
|
-
model: settingsEnv['ANTHROPIC_MODEL'],
|
|
952
|
-
}),
|
|
953
|
-
reasoningOverride: runtimeReasoningOverride,
|
|
954
|
-
envVars,
|
|
955
|
-
};
|
|
956
|
-
await adapter.prepareCredentials(creds);
|
|
957
|
-
const targetArgs = adapter.buildArgs(profileInfo.name, targetRemainingArgs, {
|
|
958
|
-
creds,
|
|
959
|
-
profileType: profileInfo.type,
|
|
960
|
-
binaryInfo: targetBinaryInfo || undefined,
|
|
961
|
-
});
|
|
962
|
-
const targetEnv = adapter.buildEnv(creds, profileInfo.type);
|
|
963
|
-
adapter.exec(targetArgs, targetEnv, { binaryInfo: targetBinaryInfo || undefined });
|
|
964
|
-
return;
|
|
965
|
-
}
|
|
966
|
-
const imageAnalysisArgs = imageAnalysisMcpReady
|
|
967
|
-
? (0, image_analysis_1.appendThirdPartyImageAnalysisToolArgs)(remainingArgs)
|
|
968
|
-
: remainingArgs;
|
|
969
|
-
const launchArgs = [
|
|
970
|
-
'--settings',
|
|
971
|
-
expandedSettingsPath,
|
|
972
|
-
...(0, websearch_manager_1.appendThirdPartyWebSearchToolArgs)(imageAnalysisArgs),
|
|
973
|
-
];
|
|
974
|
-
const traceEnv = (0, websearch_manager_1.createWebSearchTraceContext)({
|
|
975
|
-
launcher: 'ccs.settings-profile',
|
|
976
|
-
args: launchArgs,
|
|
977
|
-
profile: profileInfo.name,
|
|
978
|
-
profileType: profileInfo.type,
|
|
979
|
-
settingsPath: expandedSettingsPath,
|
|
980
|
-
});
|
|
981
|
-
(0, shell_executor_1.execClaude)(claudeCli, launchArgs, { ...envVars, ...traceEnv });
|
|
982
|
-
}
|
|
983
|
-
else if (profileInfo.type === 'account') {
|
|
984
|
-
// NEW FLOW: Account-based profile (work, personal)
|
|
985
|
-
// All platforms: Use instance isolation with CLAUDE_CONFIG_DIR
|
|
986
|
-
const registry = new ProfileRegistry();
|
|
987
|
-
const instanceMgr = new InstanceManager();
|
|
988
|
-
const accountMetadata = isAccountContextMetadata(profileInfo.profile)
|
|
989
|
-
? profileInfo.profile
|
|
990
|
-
: undefined;
|
|
991
|
-
const isBareProfile = typeof profileInfo.profile === 'object' &&
|
|
992
|
-
profileInfo.profile !== null &&
|
|
993
|
-
profileInfo.profile.bare === true;
|
|
994
|
-
const contextPolicy = resolveAccountContextPolicy(accountMetadata);
|
|
995
|
-
// Ensure instance exists (lazy init if needed)
|
|
996
|
-
const instancePath = await instanceMgr.ensureInstance(profileInfo.name, contextPolicy, {
|
|
997
|
-
bare: isBareProfile,
|
|
998
|
-
});
|
|
999
|
-
// Update last_used timestamp (check unified config first, fallback to legacy)
|
|
1000
|
-
if (registry.hasAccountUnified(profileInfo.name)) {
|
|
1001
|
-
registry.touchAccountUnified(profileInfo.name);
|
|
1002
|
-
}
|
|
1003
|
-
else {
|
|
1004
|
-
registry.touchProfile(profileInfo.name);
|
|
1005
|
-
}
|
|
1006
|
-
// Execute Claude with instance isolation
|
|
1007
|
-
// Skip WebSearch hook - account profiles use native server-side WebSearch
|
|
1008
|
-
// Skip Image Analyzer hook - account profiles have native vision support
|
|
1009
|
-
const envVars = {
|
|
1010
|
-
CLAUDE_CONFIG_DIR: instancePath,
|
|
1011
|
-
CCS_PROFILE_TYPE: 'account',
|
|
1012
|
-
CCS_WEBSEARCH_SKIP: '1',
|
|
1013
|
-
CCS_IMAGE_ANALYSIS_SKIP: '1',
|
|
1014
|
-
};
|
|
1015
|
-
await (0, resume_lane_warning_1.maybeWarnAboutResumeLaneMismatch)(profileInfo.name, instancePath, remainingArgs);
|
|
1016
|
-
const launchArgs = resolveNativeClaudeLaunchArgs(remainingArgs, 'account', instancePath);
|
|
1017
|
-
(0, shell_executor_1.execClaude)(claudeCli, launchArgs, envVars);
|
|
1018
|
-
}
|
|
1019
|
-
else {
|
|
1020
|
-
// DEFAULT: No profile configured, use Claude's own defaults
|
|
1021
|
-
// Skip WebSearch hook - native Claude has server-side WebSearch
|
|
1022
|
-
// Skip Image Analyzer hook - native Claude has native vision support
|
|
1023
|
-
const envVars = {
|
|
1024
|
-
CCS_PROFILE_TYPE: 'default',
|
|
1025
|
-
CCS_WEBSEARCH_SKIP: '1',
|
|
1026
|
-
CCS_IMAGE_ANALYSIS_SKIP: '1',
|
|
1027
|
-
};
|
|
1028
|
-
if (resolvedTarget === 'claude') {
|
|
1029
|
-
const defaultContinuityInheritance = await resolveProfileContinuityInheritance({
|
|
1030
|
-
profileName: profileInfo.name,
|
|
1031
|
-
profileType: profileInfo.type,
|
|
1032
|
-
target: resolvedTarget,
|
|
1033
|
-
});
|
|
1034
|
-
if (defaultContinuityInheritance.sourceAccount && process.env.CCS_DEBUG) {
|
|
1035
|
-
console.error((0, ui_1.info)(`Continuity inheritance active: profile "${profileInfo.name}" -> account "${defaultContinuityInheritance.sourceAccount}"`));
|
|
1036
|
-
}
|
|
1037
|
-
if (defaultContinuityInheritance.claudeConfigDir) {
|
|
1038
|
-
envVars.CLAUDE_CONFIG_DIR = defaultContinuityInheritance.claudeConfigDir;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
// Dispatch through target adapter for non-claude targets
|
|
1042
|
-
if (resolvedTarget !== 'claude') {
|
|
1043
|
-
const adapter = targetAdapter;
|
|
1044
|
-
if (!adapter) {
|
|
1045
|
-
console.error((0, ui_1.fail)(`Target adapter not found for "${resolvedTarget}"`));
|
|
1046
|
-
process.exit(1);
|
|
1047
|
-
}
|
|
1048
|
-
if (!adapter.supportsProfileType('default')) {
|
|
1049
|
-
console.error((0, ui_1.fail)(`${adapter.displayName} does not support default profile mode`));
|
|
1050
|
-
process.exit(1);
|
|
1051
|
-
}
|
|
1052
|
-
const creds = {
|
|
1053
|
-
profile: 'default',
|
|
1054
|
-
baseUrl: process.env['ANTHROPIC_BASE_URL'] || '',
|
|
1055
|
-
apiKey: process.env['ANTHROPIC_AUTH_TOKEN'] || '',
|
|
1056
|
-
model: process.env['ANTHROPIC_MODEL'],
|
|
1057
|
-
provider: (0, targets_1.resolveDroidProvider)({
|
|
1058
|
-
provider: process.env['CCS_DROID_PROVIDER'] || process.env['DROID_PROVIDER'],
|
|
1059
|
-
baseUrl: process.env['ANTHROPIC_BASE_URL'],
|
|
1060
|
-
model: process.env['ANTHROPIC_MODEL'],
|
|
1061
|
-
}),
|
|
1062
|
-
reasoningOverride: runtimeReasoningOverride,
|
|
1063
|
-
};
|
|
1064
|
-
if (resolvedTarget === 'droid' && (!creds.baseUrl || !creds.apiKey)) {
|
|
1065
|
-
console.error((0, ui_1.fail)(`${adapter.displayName} default mode requires ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN`));
|
|
1066
|
-
console.error((0, ui_1.info)('Use a settings-based profile instead: ccs glm --target droid'));
|
|
1067
|
-
process.exit(1);
|
|
1068
|
-
}
|
|
1069
|
-
await adapter.prepareCredentials(creds);
|
|
1070
|
-
const targetArgs = adapter.buildArgs('default', targetRemainingArgs, {
|
|
1071
|
-
creds,
|
|
1072
|
-
profileType: 'default',
|
|
1073
|
-
binaryInfo: targetBinaryInfo || undefined,
|
|
1074
|
-
});
|
|
1075
|
-
const targetEnv = adapter.buildEnv(creds, 'default');
|
|
1076
|
-
adapter.exec(targetArgs, targetEnv, { binaryInfo: targetBinaryInfo || undefined });
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
const launchArgs = resolveNativeClaudeLaunchArgs(remainingArgs, 'default', envVars.CLAUDE_CONFIG_DIR);
|
|
1080
|
-
(0, shell_executor_1.execClaude)(claudeCli, launchArgs, envVars);
|
|
1081
97
|
}
|
|
98
|
+
// Phase E: dispatch to per-profile-type flow (all 6 branches now live in flows/)
|
|
99
|
+
await (0, target_executor_1.dispatchProfile)(dispatchCtx);
|
|
1082
100
|
}
|
|
1083
101
|
catch (error) {
|
|
1084
102
|
const err = error;
|
|
@@ -1128,6 +146,29 @@ process.on('SIGINT', () => {
|
|
|
1128
146
|
process.exit(130); // 128 + SIGINT(2)
|
|
1129
147
|
}
|
|
1130
148
|
});
|
|
1131
|
-
// Run main
|
|
1132
|
-
|
|
149
|
+
// Run main inside a per-invocation request context so all backend logging
|
|
150
|
+
// emitted during this CLI run shares a single requestId. CLI text output
|
|
151
|
+
// (stdout/stderr) is unaffected — the requestId lives in logs only.
|
|
152
|
+
const cliEntryStartedAt = Date.now();
|
|
153
|
+
const cliEntryLogger = (0, logging_1.createLogger)('cli:entry');
|
|
154
|
+
(0, logging_1.runWithRequestId)(() => {
|
|
155
|
+
cliEntryLogger.stage('intake', 'cli.command.start', 'CLI invocation started', {
|
|
156
|
+
argv: process.argv.slice(2),
|
|
157
|
+
});
|
|
158
|
+
return main()
|
|
159
|
+
.then(() => {
|
|
160
|
+
cliEntryLogger.stage('respond', 'cli.command.complete', 'CLI invocation completed', { exitCode: process.exitCode ?? 0 }, { latencyMs: Date.now() - cliEntryStartedAt });
|
|
161
|
+
})
|
|
162
|
+
.catch((err) => {
|
|
163
|
+
const error = err instanceof Error
|
|
164
|
+
? { name: err.name, message: err.message, stack: err.stack }
|
|
165
|
+
: { name: 'Error', message: String(err) };
|
|
166
|
+
cliEntryLogger.stage('cleanup', 'cli.command.failed', 'CLI invocation failed', undefined, {
|
|
167
|
+
level: 'error',
|
|
168
|
+
latencyMs: Date.now() - cliEntryStartedAt,
|
|
169
|
+
error,
|
|
170
|
+
});
|
|
171
|
+
(0, errors_1.handleError)(err);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
1133
174
|
//# sourceMappingURL=ccs.js.map
|