@kaitranntt/ccs 6.7.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -23
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +24 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/services/index.d.ts +10 -0
- package/dist/api/services/index.d.ts.map +1 -0
- package/dist/api/services/index.js +26 -0
- package/dist/api/services/index.js.map +1 -0
- package/dist/api/services/profile-reader.d.ts +28 -0
- package/dist/api/services/profile-reader.d.ts.map +1 -0
- package/dist/api/services/profile-reader.js +148 -0
- package/dist/api/services/profile-reader.js.map +1 -0
- package/dist/api/services/profile-types.d.ts +42 -0
- package/dist/api/services/profile-types.d.ts.map +1 -0
- package/dist/api/services/profile-types.js +8 -0
- package/dist/api/services/profile-types.js.map +1 -0
- package/dist/api/services/profile-writer.d.ts +6 -0
- package/dist/api/services/profile-writer.d.ts.map +1 -0
- package/dist/api/services/profile-writer.js +176 -0
- package/dist/api/services/profile-writer.js.map +1 -0
- package/dist/api/services/validation-service.d.ts +26 -0
- package/dist/api/services/validation-service.d.ts.map +1 -0
- package/dist/api/services/validation-service.js +77 -0
- package/dist/api/services/validation-service.js.map +1 -0
- package/dist/auth/auth-commands.d.ts +16 -22
- package/dist/auth/auth-commands.d.ts.map +1 -1
- package/dist/auth/auth-commands.js +29 -467
- package/dist/auth/auth-commands.js.map +1 -1
- package/dist/auth/commands/create-command.d.ts +11 -0
- package/dist/auth/commands/create-command.d.ts.map +1 -0
- package/dist/auth/commands/create-command.js +137 -0
- package/dist/auth/commands/create-command.js.map +1 -0
- package/dist/auth/commands/default-command.d.ts +15 -0
- package/dist/auth/commands/default-command.d.ts.map +1 -0
- package/dist/auth/commands/default-command.js +71 -0
- package/dist/auth/commands/default-command.js.map +1 -0
- package/dist/auth/commands/index.d.ts +12 -0
- package/dist/auth/commands/index.d.ts.map +1 -0
- package/dist/auth/commands/index.js +25 -0
- package/dist/auth/commands/index.js.map +1 -0
- package/dist/auth/commands/list-command.d.ts +11 -0
- package/dist/auth/commands/list-command.d.ts.map +1 -0
- package/dist/auth/commands/list-command.js +124 -0
- package/dist/auth/commands/list-command.js.map +1 -0
- package/dist/auth/commands/remove-command.d.ts +11 -0
- package/dist/auth/commands/remove-command.d.ts.map +1 -0
- package/dist/auth/commands/remove-command.js +102 -0
- package/dist/auth/commands/remove-command.js.map +1 -0
- package/dist/auth/commands/show-command.d.ts +11 -0
- package/dist/auth/commands/show-command.d.ts.map +1 -0
- package/dist/auth/commands/show-command.js +103 -0
- package/dist/auth/commands/show-command.js.map +1 -0
- package/dist/auth/commands/types.d.ts +50 -0
- package/dist/auth/commands/types.d.ts.map +1 -0
- package/dist/auth/commands/types.js +26 -0
- package/dist/auth/commands/types.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +16 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/profile-detector.d.ts +0 -5
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +1 -9
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/auth/profile-registry.d.ts +0 -4
- package/dist/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +3 -10
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/ccs.js +21 -4
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/auth/auth-types.d.ts +85 -0
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -0
- package/dist/cliproxy/auth/auth-types.js +100 -0
- package/dist/cliproxy/auth/auth-types.js.map +1 -0
- package/dist/cliproxy/auth/environment-detector.d.ts +30 -0
- package/dist/cliproxy/auth/environment-detector.d.ts.map +1 -0
- package/dist/cliproxy/auth/environment-detector.js +124 -0
- package/dist/cliproxy/auth/environment-detector.js.map +1 -0
- package/dist/cliproxy/auth/index.d.ts +11 -0
- package/dist/cliproxy/auth/index.d.ts.map +1 -0
- package/dist/cliproxy/auth/index.js +35 -0
- package/dist/cliproxy/auth/index.js.map +1 -0
- package/dist/cliproxy/auth/oauth-handler.d.ts +29 -0
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-handler.js +205 -0
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -0
- package/dist/cliproxy/auth/oauth-process.d.ts +27 -0
- package/dist/cliproxy/auth/oauth-process.d.ts.map +1 -0
- package/dist/cliproxy/auth/oauth-process.js +209 -0
- package/dist/cliproxy/auth/oauth-process.js.map +1 -0
- package/dist/cliproxy/auth/token-manager.d.ts +53 -0
- package/dist/cliproxy/auth/token-manager.d.ts.map +1 -0
- package/dist/cliproxy/auth/token-manager.js +250 -0
- package/dist/cliproxy/auth/token-manager.js.map +1 -0
- package/dist/cliproxy/auth-handler.d.ts +13 -103
- package/dist/cliproxy/auth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth-handler.js +35 -766
- package/dist/cliproxy/auth-handler.js.map +1 -1
- package/dist/cliproxy/binary/downloader.d.ts +29 -0
- package/dist/cliproxy/binary/downloader.d.ts.map +1 -0
- package/dist/cliproxy/binary/downloader.js +218 -0
- package/dist/cliproxy/binary/downloader.js.map +1 -0
- package/dist/cliproxy/binary/extractor.d.ts +12 -0
- package/dist/cliproxy/binary/extractor.d.ts.map +1 -0
- package/dist/cliproxy/binary/extractor.js +27 -0
- package/dist/cliproxy/binary/extractor.js.map +1 -0
- package/dist/cliproxy/binary/index.d.ts +13 -0
- package/dist/cliproxy/binary/index.d.ts.map +1 -0
- package/dist/cliproxy/binary/index.js +53 -0
- package/dist/cliproxy/binary/index.js.map +1 -0
- package/dist/cliproxy/binary/installer.d.ts +24 -0
- package/dist/cliproxy/binary/installer.d.ts.map +1 -0
- package/dist/cliproxy/binary/installer.js +117 -0
- package/dist/cliproxy/binary/installer.js.map +1 -0
- package/dist/cliproxy/binary/lifecycle.d.ts +11 -0
- package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -0
- package/dist/cliproxy/binary/lifecycle.js +106 -0
- package/dist/cliproxy/binary/lifecycle.js.map +1 -0
- package/dist/cliproxy/binary/tar-extractor.d.ts +9 -0
- package/dist/cliproxy/binary/tar-extractor.d.ts.map +1 -0
- package/dist/cliproxy/binary/tar-extractor.js +118 -0
- package/dist/cliproxy/binary/tar-extractor.js.map +1 -0
- package/dist/cliproxy/binary/types.d.ts +24 -0
- package/dist/cliproxy/binary/types.d.ts.map +1 -0
- package/dist/cliproxy/binary/types.js +14 -0
- package/dist/cliproxy/binary/types.js.map +1 -0
- package/dist/cliproxy/binary/updater.d.ts +7 -0
- package/dist/cliproxy/binary/updater.d.ts.map +1 -0
- package/dist/cliproxy/binary/updater.js +18 -0
- package/dist/cliproxy/binary/updater.js.map +1 -0
- package/dist/cliproxy/binary/verifier.d.ts +18 -0
- package/dist/cliproxy/binary/verifier.d.ts.map +1 -0
- package/dist/cliproxy/binary/verifier.js +82 -0
- package/dist/cliproxy/binary/verifier.js.map +1 -0
- package/dist/cliproxy/binary/version-cache.d.ts +46 -0
- package/dist/cliproxy/binary/version-cache.d.ts.map +1 -0
- package/dist/cliproxy/binary/version-cache.js +171 -0
- package/dist/cliproxy/binary/version-cache.js.map +1 -0
- package/dist/cliproxy/binary/version-checker.d.ts +19 -0
- package/dist/cliproxy/binary/version-checker.d.ts.map +1 -0
- package/dist/cliproxy/binary/version-checker.js +77 -0
- package/dist/cliproxy/binary/version-checker.js.map +1 -0
- package/dist/cliproxy/binary/zip-extractor.d.ts +9 -0
- package/dist/cliproxy/binary/zip-extractor.d.ts.map +1 -0
- package/dist/cliproxy/binary/zip-extractor.js +110 -0
- package/dist/cliproxy/binary/zip-extractor.js.map +1 -0
- package/dist/cliproxy/binary-manager.d.ts +16 -170
- package/dist/cliproxy/binary-manager.d.ts.map +1 -1
- package/dist/cliproxy/binary-manager.js +38 -865
- package/dist/cliproxy/binary-manager.js.map +1 -1
- package/dist/cliproxy/services/binary-service.d.ts +65 -0
- package/dist/cliproxy/services/binary-service.d.ts.map +1 -0
- package/dist/cliproxy/services/binary-service.js +140 -0
- package/dist/cliproxy/services/binary-service.js.map +1 -0
- package/dist/cliproxy/services/index.d.ts +8 -0
- package/dist/cliproxy/services/index.d.ts.map +1 -0
- package/dist/cliproxy/services/index.js +31 -0
- package/dist/cliproxy/services/index.js.map +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts +38 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.d.ts.map +1 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.js +41 -0
- package/dist/cliproxy/services/proxy-lifecycle-service.js.map +1 -0
- package/dist/cliproxy/services/variant-config-adapter.d.ts +38 -0
- package/dist/cliproxy/services/variant-config-adapter.d.ts.map +1 -0
- package/dist/cliproxy/services/variant-config-adapter.js +172 -0
- package/dist/cliproxy/services/variant-config-adapter.js.map +1 -0
- package/dist/cliproxy/services/variant-service.d.ts +37 -0
- package/dist/cliproxy/services/variant-service.d.ts.map +1 -0
- package/dist/cliproxy/services/variant-service.js +128 -0
- package/dist/cliproxy/services/variant-service.js.map +1 -0
- package/dist/cliproxy/services/variant-settings.d.ts +32 -0
- package/dist/cliproxy/services/variant-settings.d.ts.map +1 -0
- package/dist/cliproxy/services/variant-settings.js +128 -0
- package/dist/cliproxy/services/variant-settings.js.map +1 -0
- package/dist/commands/api-command.d.ts +3 -6
- package/dist/commands/api-command.d.ts.map +1 -1
- package/dist/commands/api-command.js +84 -445
- package/dist/commands/api-command.js.map +1 -1
- package/dist/commands/cliproxy-command.d.ts +0 -3
- package/dist/commands/cliproxy-command.d.ts.map +1 -1
- package/dist/commands/cliproxy-command.js +182 -621
- package/dist/commands/cliproxy-command.js.map +1 -1
- package/dist/commands/index.d.ts +17 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +33 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/config/unified-config-loader.d.ts +7 -0
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +11 -1
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/delegation/executor/index.d.ts +7 -0
- package/dist/delegation/executor/index.d.ts.map +1 -0
- package/dist/delegation/executor/index.js +28 -0
- package/dist/delegation/executor/index.js.map +1 -0
- package/dist/delegation/executor/result-aggregator.d.ts +30 -0
- package/dist/delegation/executor/result-aggregator.d.ts.map +1 -0
- package/dist/delegation/executor/result-aggregator.js +66 -0
- package/dist/delegation/executor/result-aggregator.js.map +1 -0
- package/dist/delegation/executor/stream-parser.d.ts +28 -0
- package/dist/delegation/executor/stream-parser.d.ts.map +1 -0
- package/dist/delegation/executor/stream-parser.js +140 -0
- package/dist/delegation/executor/stream-parser.js.map +1 -0
- package/dist/delegation/executor/types.d.ts +121 -0
- package/dist/delegation/executor/types.d.ts.map +1 -0
- package/dist/delegation/executor/types.js +6 -0
- package/dist/delegation/executor/types.js.map +1 -0
- package/dist/delegation/headless-executor.d.ts +13 -91
- package/dist/delegation/headless-executor.d.ts.map +1 -1
- package/dist/delegation/headless-executor.js +84 -291
- package/dist/delegation/headless-executor.js.map +1 -1
- package/dist/delegation/index.d.ts +11 -0
- package/dist/delegation/index.d.ts.map +1 -0
- package/dist/delegation/index.js +33 -0
- package/dist/delegation/index.js.map +1 -0
- package/dist/delegation/result-formatter.d.ts +1 -30
- package/dist/delegation/result-formatter.d.ts.map +1 -1
- package/dist/delegation/result-formatter.js.map +1 -1
- package/dist/errors/cleanup-registry.d.ts +64 -0
- package/dist/errors/cleanup-registry.d.ts.map +1 -0
- package/dist/errors/cleanup-registry.js +141 -0
- package/dist/errors/cleanup-registry.js.map +1 -0
- package/dist/errors/error-handler.d.ts +45 -0
- package/dist/errors/error-handler.d.ts.map +1 -0
- package/dist/errors/error-handler.js +150 -0
- package/dist/errors/error-handler.js.map +1 -0
- package/dist/errors/error-types.d.ts +102 -0
- package/dist/errors/error-types.d.ts.map +1 -0
- package/dist/errors/error-types.js +158 -0
- package/dist/errors/error-types.js.map +1 -0
- package/dist/errors/exit-codes.d.ts +49 -0
- package/dist/errors/exit-codes.d.ts.map +1 -0
- package/dist/errors/exit-codes.js +72 -0
- package/dist/errors/exit-codes.js.map +1 -0
- package/dist/errors/index.d.ts +29 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +62 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/glmt/glmt-transformer.d.ts +29 -248
- package/dist/glmt/glmt-transformer.d.ts.map +1 -1
- package/dist/glmt/glmt-transformer.js +63 -718
- package/dist/glmt/glmt-transformer.js.map +1 -1
- package/dist/glmt/index.d.ts +14 -0
- package/dist/glmt/index.d.ts.map +1 -0
- package/dist/glmt/index.js +41 -0
- package/dist/glmt/index.js.map +1 -0
- package/dist/glmt/pipeline/content-transformer.d.ts +39 -0
- package/dist/glmt/pipeline/content-transformer.d.ts.map +1 -0
- package/dist/glmt/pipeline/content-transformer.js +162 -0
- package/dist/glmt/pipeline/content-transformer.js.map +1 -0
- package/dist/glmt/pipeline/index.d.ts +12 -0
- package/dist/glmt/pipeline/index.d.ts.map +1 -0
- package/dist/glmt/pipeline/index.js +20 -0
- package/dist/glmt/pipeline/index.js.map +1 -0
- package/dist/glmt/pipeline/request-transformer.d.ts +31 -0
- package/dist/glmt/pipeline/request-transformer.d.ts.map +1 -0
- package/dist/glmt/pipeline/request-transformer.js +116 -0
- package/dist/glmt/pipeline/request-transformer.js.map +1 -0
- package/dist/glmt/pipeline/response-builder.d.ts +52 -0
- package/dist/glmt/pipeline/response-builder.d.ts.map +1 -0
- package/dist/glmt/pipeline/response-builder.js +205 -0
- package/dist/glmt/pipeline/response-builder.js.map +1 -0
- package/dist/glmt/pipeline/stream-parser.d.ts +59 -0
- package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -0
- package/dist/glmt/pipeline/stream-parser.js +241 -0
- package/dist/glmt/pipeline/stream-parser.js.map +1 -0
- package/dist/glmt/pipeline/tool-call-handler.d.ts +22 -0
- package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -0
- package/dist/glmt/pipeline/tool-call-handler.js +87 -0
- package/dist/glmt/pipeline/tool-call-handler.js.map +1 -0
- package/dist/glmt/pipeline/types.d.ts +159 -0
- package/dist/glmt/pipeline/types.d.ts.map +1 -0
- package/dist/glmt/pipeline/types.js +6 -0
- package/dist/glmt/pipeline/types.js.map +1 -0
- package/dist/management/checks/cliproxy-check.d.ts +37 -0
- package/dist/management/checks/cliproxy-check.d.ts.map +1 -0
- package/dist/management/checks/cliproxy-check.js +187 -0
- package/dist/management/checks/cliproxy-check.js.map +1 -0
- package/dist/management/checks/config-check.d.ts +27 -0
- package/dist/management/checks/config-check.d.ts.map +1 -0
- package/dist/management/checks/config-check.js +158 -0
- package/dist/management/checks/config-check.js.map +1 -0
- package/dist/management/checks/env-check.d.ts +17 -0
- package/dist/management/checks/env-check.d.ts.map +1 -0
- package/dist/management/checks/env-check.js +71 -0
- package/dist/management/checks/env-check.js.map +1 -0
- package/dist/management/checks/index.d.ts +12 -0
- package/dist/management/checks/index.d.ts.map +1 -0
- package/dist/management/checks/index.js +48 -0
- package/dist/management/checks/index.js.map +1 -0
- package/dist/management/checks/oauth-check.d.ts +16 -0
- package/dist/management/checks/oauth-check.d.ts.map +1 -0
- package/dist/management/checks/oauth-check.js +68 -0
- package/dist/management/checks/oauth-check.js.map +1 -0
- package/dist/management/checks/profile-check.d.ts +36 -0
- package/dist/management/checks/profile-check.d.ts.map +1 -0
- package/dist/management/checks/profile-check.js +165 -0
- package/dist/management/checks/profile-check.js.map +1 -0
- package/dist/management/checks/symlink-check.d.ts +30 -0
- package/dist/management/checks/symlink-check.d.ts.map +1 -0
- package/dist/management/checks/symlink-check.js +204 -0
- package/dist/management/checks/symlink-check.js.map +1 -0
- package/dist/management/checks/system-check.d.ts +25 -0
- package/dist/management/checks/system-check.d.ts.map +1 -0
- package/dist/management/checks/system-check.js +136 -0
- package/dist/management/checks/system-check.js.map +1 -0
- package/dist/management/checks/types.d.ts +64 -0
- package/dist/management/checks/types.d.ts.map +1 -0
- package/dist/management/checks/types.js +63 -0
- package/dist/management/checks/types.js.map +1 -0
- package/dist/management/doctor.d.ts +3 -92
- package/dist/management/doctor.d.ts.map +1 -1
- package/dist/management/doctor.js +15 -831
- package/dist/management/doctor.js.map +1 -1
- package/dist/management/index.d.ts +15 -0
- package/dist/management/index.d.ts.map +1 -0
- package/dist/management/index.js +56 -0
- package/dist/management/index.js.map +1 -0
- package/dist/management/repair/auto-repair.d.ts +13 -0
- package/dist/management/repair/auto-repair.d.ts.map +1 -0
- package/dist/management/repair/auto-repair.js +170 -0
- package/dist/management/repair/auto-repair.js.map +1 -0
- package/dist/management/repair/index.d.ts +5 -0
- package/dist/management/repair/index.d.ts.map +1 -0
- package/dist/management/repair/index.js +9 -0
- package/dist/management/repair/index.js.map +1 -0
- package/dist/types/delegation.d.ts +1 -13
- package/dist/types/delegation.d.ts.map +1 -1
- package/dist/types/utils.d.ts +27 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/ui/assets/{accounts-p1_nf0Jy.js → accounts-BqDNXZu4.js} +1 -1
- package/dist/ui/assets/analytics-DQMyOsqI.js +1 -0
- package/dist/ui/assets/api-Bzyq4XP7.js +1 -0
- package/dist/ui/assets/{card-CCDc-Mx9.js → card-CIN0KDsX.js} +1 -1
- package/dist/ui/assets/cliproxy-5iKdPrEG.js +3 -0
- package/dist/ui/assets/cliproxy-control-panel-CJ2CfYod.js +1 -0
- package/dist/ui/assets/{code-editor-Br9x-r-E.js → code-editor-CDmNFLQ6.js} +1 -1
- package/dist/ui/assets/confirm-dialog-CaiDQikc.js +1 -0
- package/dist/ui/assets/copilot-nS6iAyk2.js +4 -0
- package/dist/ui/assets/form-utils-DP6ILe7Z.js +20 -0
- package/dist/ui/assets/health-DYOQfC7u.js +1 -0
- package/dist/ui/assets/{icons-BOsxPbiD.js → icons-ZmwVoUeR.js} +1 -1
- package/dist/ui/assets/index-C6Dah-xh.js +46 -0
- package/dist/ui/assets/index-It66SkKf.css +1 -0
- package/dist/ui/assets/{radix-ui-DFHQr9A5.js → radix-ui-CV3R9pD6.js} +3 -3
- package/dist/ui/assets/settings-DABC9b5G.js +1 -0
- package/dist/ui/assets/{shared-BfYhSN4-.js → shared-BwU4OKQc.js} +1 -1
- package/dist/ui/assets/{switch-CMk95lwf.js → switch-BQ6sBBUv.js} +1 -1
- package/dist/ui/assets/{tanstack-C4gT2P7V.js → tanstack-Df9bCj5R.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/dist/utils/claude-spawner.d.ts +54 -0
- package/dist/utils/claude-spawner.d.ts.map +1 -0
- package/dist/utils/claude-spawner.js +118 -0
- package/dist/utils/claude-spawner.js.map +1 -0
- package/dist/utils/delegation-validator.d.ts +8 -4
- package/dist/utils/delegation-validator.d.ts.map +1 -1
- package/dist/utils/delegation-validator.js.map +1 -1
- package/dist/utils/helpers.d.ts +0 -11
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +1 -57
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +50 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/time.d.ts +10 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +27 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/ui/boxes.d.ts +24 -0
- package/dist/utils/ui/boxes.d.ts.map +1 -0
- package/dist/utils/ui/boxes.js +108 -0
- package/dist/utils/ui/boxes.js.map +1 -0
- package/dist/utils/ui/colors.d.ts +25 -0
- package/dist/utils/ui/colors.d.ts.map +1 -0
- package/dist/utils/ui/colors.js +70 -0
- package/dist/utils/ui/colors.js.map +1 -0
- package/dist/utils/ui/index.d.ts +51 -0
- package/dist/utils/ui/index.d.ts.map +1 -0
- package/dist/utils/ui/index.js +96 -0
- package/dist/utils/ui/index.js.map +1 -0
- package/dist/utils/ui/indicators.d.ts +23 -0
- package/dist/utils/ui/indicators.d.ts.map +1 -0
- package/dist/utils/ui/indicators.js +39 -0
- package/dist/utils/ui/indicators.js.map +1 -0
- package/dist/utils/ui/init.d.ts +30 -0
- package/dist/utils/ui/init.d.ts.map +1 -0
- package/dist/utils/ui/init.js +102 -0
- package/dist/utils/ui/init.js.map +1 -0
- package/dist/utils/ui/spinner.d.ts +13 -0
- package/dist/utils/ui/spinner.d.ts.map +1 -0
- package/dist/utils/ui/spinner.js +89 -0
- package/dist/utils/ui/spinner.js.map +1 -0
- package/dist/utils/ui/tables.d.ts +12 -0
- package/dist/utils/ui/tables.d.ts.map +1 -0
- package/dist/utils/ui/tables.js +69 -0
- package/dist/utils/ui/tables.js.map +1 -0
- package/dist/utils/ui/tasks.d.ts +26 -0
- package/dist/utils/ui/tasks.d.ts.map +1 -0
- package/dist/utils/ui/tasks.js +102 -0
- package/dist/utils/ui/tasks.js.map +1 -0
- package/dist/utils/ui/text.d.ts +24 -0
- package/dist/utils/ui/text.d.ts.map +1 -0
- package/dist/utils/ui/text.js +60 -0
- package/dist/utils/ui/text.js.map +1 -0
- package/dist/utils/ui/types.d.ts +36 -0
- package/dist/utils/ui/types.d.ts.map +1 -0
- package/dist/utils/ui/types.js +33 -0
- package/dist/utils/ui/types.js.map +1 -0
- package/dist/utils/ui.d.ts +3 -138
- package/dist/utils/ui.d.ts.map +1 -1
- package/dist/utils/ui.js +40 -567
- package/dist/utils/ui.js.map +1 -1
- package/dist/utils/websearch/gemini-cli.d.ts +36 -0
- package/dist/utils/websearch/gemini-cli.d.ts.map +1 -0
- package/dist/utils/websearch/gemini-cli.js +132 -0
- package/dist/utils/websearch/gemini-cli.js.map +1 -0
- package/dist/utils/websearch/grok-cli.d.ts +26 -0
- package/dist/utils/websearch/grok-cli.d.ts.map +1 -0
- package/dist/utils/websearch/grok-cli.js +81 -0
- package/dist/utils/websearch/grok-cli.js.map +1 -0
- package/dist/utils/websearch/hook-config.d.ts +21 -0
- package/dist/utils/websearch/hook-config.d.ts.map +1 -0
- package/dist/utils/websearch/hook-config.js +183 -0
- package/dist/utils/websearch/hook-config.js.map +1 -0
- package/dist/utils/websearch/hook-env.d.ts +16 -0
- package/dist/utils/websearch/hook-env.d.ts.map +1 -0
- package/dist/utils/websearch/hook-env.js +62 -0
- package/dist/utils/websearch/hook-env.js.map +1 -0
- package/dist/utils/websearch/hook-installer.d.ts +27 -0
- package/dist/utils/websearch/hook-installer.d.ts.map +1 -0
- package/dist/utils/websearch/hook-installer.js +141 -0
- package/dist/utils/websearch/hook-installer.js.map +1 -0
- package/dist/utils/websearch/index.d.ts +15 -0
- package/dist/utils/websearch/index.d.ts.map +1 -0
- package/dist/utils/websearch/index.js +44 -0
- package/dist/utils/websearch/index.js.map +1 -0
- package/dist/utils/websearch/opencode-cli.d.ts +26 -0
- package/dist/utils/websearch/opencode-cli.d.ts.map +1 -0
- package/dist/utils/websearch/opencode-cli.js +81 -0
- package/dist/utils/websearch/opencode-cli.js.map +1 -0
- package/dist/utils/websearch/status.d.ts +35 -0
- package/dist/utils/websearch/status.d.ts.map +1 -0
- package/dist/utils/websearch/status.js +185 -0
- package/dist/utils/websearch/status.js.map +1 -0
- package/dist/utils/websearch/types.d.ts +85 -0
- package/dist/utils/websearch/types.d.ts.map +1 -0
- package/dist/utils/websearch/types.js +10 -0
- package/dist/utils/websearch/types.js.map +1 -0
- package/dist/utils/websearch-manager.d.ts +7 -186
- package/dist/utils/websearch-manager.d.ts.map +1 -1
- package/dist/utils/websearch-manager.js +37 -710
- package/dist/utils/websearch-manager.js.map +1 -1
- package/dist/web-server/data-aggregator.d.ts +3 -51
- package/dist/web-server/data-aggregator.d.ts.map +1 -1
- package/dist/web-server/data-aggregator.js +18 -386
- package/dist/web-server/data-aggregator.js.map +1 -1
- package/dist/web-server/health/cliproxy-checks.d.ts +23 -0
- package/dist/web-server/health/cliproxy-checks.d.ts.map +1 -0
- package/dist/web-server/health/cliproxy-checks.js +145 -0
- package/dist/web-server/health/cliproxy-checks.js.map +1 -0
- package/dist/web-server/health/config-checks.d.ts +19 -0
- package/dist/web-server/health/config-checks.d.ts.map +1 -0
- package/dist/web-server/health/config-checks.js +174 -0
- package/dist/web-server/health/config-checks.js.map +1 -0
- package/dist/web-server/health/environment-checks.d.ts +11 -0
- package/dist/web-server/health/environment-checks.d.ts.map +1 -0
- package/dist/web-server/health/environment-checks.js +40 -0
- package/dist/web-server/health/environment-checks.js.map +1 -0
- package/dist/web-server/health/index.d.ts +13 -0
- package/dist/web-server/health/index.d.ts.map +1 -0
- package/dist/web-server/health/index.js +41 -0
- package/dist/web-server/health/index.js.map +1 -0
- package/dist/web-server/health/oauth-checks.d.ts +11 -0
- package/dist/web-server/health/oauth-checks.d.ts.map +1 -0
- package/dist/web-server/health/oauth-checks.js +34 -0
- package/dist/web-server/health/oauth-checks.js.map +1 -0
- package/dist/web-server/health/profile-checks.d.ts +19 -0
- package/dist/web-server/health/profile-checks.d.ts.map +1 -0
- package/dist/web-server/health/profile-checks.js +152 -0
- package/dist/web-server/health/profile-checks.js.map +1 -0
- package/dist/web-server/health/symlink-checks.d.ts +15 -0
- package/dist/web-server/health/symlink-checks.d.ts.map +1 -0
- package/dist/web-server/health/symlink-checks.js +173 -0
- package/dist/web-server/health/symlink-checks.js.map +1 -0
- package/dist/web-server/health/system-checks.d.ts +19 -0
- package/dist/web-server/health/system-checks.d.ts.map +1 -0
- package/dist/web-server/health/system-checks.js +127 -0
- package/dist/web-server/health/system-checks.js.map +1 -0
- package/dist/web-server/health/types.d.ts +34 -0
- package/dist/web-server/health/types.d.ts.map +1 -0
- package/dist/web-server/health/types.js +8 -0
- package/dist/web-server/health/types.js.map +1 -0
- package/dist/web-server/health/websearch-checks.d.ts +11 -0
- package/dist/web-server/health/websearch-checks.d.ts.map +1 -0
- package/dist/web-server/health/websearch-checks.js +53 -0
- package/dist/web-server/health/websearch-checks.js.map +1 -0
- package/dist/web-server/health-service.d.ts +4 -30
- package/dist/web-server/health-service.d.ts.map +1 -1
- package/dist/web-server/health-service.js +28 -695
- 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 +2 -5
- package/dist/web-server/index.js.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts +6 -0
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-auth-routes.js +202 -0
- package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +6 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes.js +253 -0
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -0
- package/dist/web-server/routes/config-routes.d.ts +6 -0
- package/dist/web-server/routes/config-routes.d.ts.map +1 -0
- package/dist/web-server/routes/config-routes.js +145 -0
- package/dist/web-server/routes/config-routes.js.map +1 -0
- package/dist/web-server/routes/copilot-routes.d.ts +6 -0
- package/dist/web-server/routes/copilot-routes.d.ts.map +1 -0
- package/dist/web-server/routes/copilot-routes.js +195 -0
- package/dist/web-server/routes/copilot-routes.js.map +1 -0
- package/dist/web-server/routes/copilot-settings-routes.d.ts +6 -0
- package/dist/web-server/routes/copilot-settings-routes.d.ts.map +1 -0
- package/dist/web-server/routes/copilot-settings-routes.js +122 -0
- package/dist/web-server/routes/copilot-settings-routes.js.map +1 -0
- package/dist/web-server/routes/health-routes.d.ts +6 -0
- package/dist/web-server/routes/health-routes.d.ts.map +1 -0
- package/dist/web-server/routes/health-routes.js +30 -0
- package/dist/web-server/routes/health-routes.js.map +1 -0
- package/dist/web-server/routes/index.d.ts +8 -0
- package/dist/web-server/routes/index.d.ts.map +1 -0
- package/dist/web-server/routes/index.js +54 -0
- package/dist/web-server/routes/index.js.map +1 -0
- package/dist/web-server/routes/misc-routes.d.ts +6 -0
- package/dist/web-server/routes/misc-routes.d.ts.map +1 -0
- package/dist/web-server/routes/misc-routes.js +219 -0
- package/dist/web-server/routes/misc-routes.js.map +1 -0
- package/dist/web-server/routes/profile-routes.d.ts +6 -0
- package/dist/web-server/routes/profile-routes.d.ts.map +1 -0
- package/dist/web-server/routes/profile-routes.js +164 -0
- package/dist/web-server/routes/profile-routes.js.map +1 -0
- package/dist/web-server/routes/provider-routes.d.ts +6 -0
- package/dist/web-server/routes/provider-routes.d.ts.map +1 -0
- package/dist/web-server/routes/provider-routes.js +146 -0
- package/dist/web-server/routes/provider-routes.js.map +1 -0
- package/dist/web-server/routes/route-helpers.d.ts +55 -0
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -0
- package/dist/web-server/routes/route-helpers.js +201 -0
- package/dist/web-server/routes/route-helpers.js.map +1 -0
- package/dist/web-server/routes/settings-routes.d.ts +6 -0
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -0
- package/dist/web-server/routes/settings-routes.js +207 -0
- package/dist/web-server/routes/settings-routes.js.map +1 -0
- package/dist/web-server/routes/variant-routes.d.ts +6 -0
- package/dist/web-server/routes/variant-routes.d.ts.map +1 -0
- package/dist/web-server/routes/variant-routes.js +158 -0
- package/dist/web-server/routes/variant-routes.js.map +1 -0
- package/dist/web-server/routes/websearch-routes.d.ts +6 -0
- package/dist/web-server/routes/websearch-routes.d.ts.map +1 -0
- package/dist/web-server/routes/websearch-routes.js +130 -0
- package/dist/web-server/routes/websearch-routes.js.map +1 -0
- package/dist/web-server/services/index.d.ts +7 -0
- package/dist/web-server/services/index.d.ts.map +1 -0
- package/dist/web-server/services/index.js +21 -0
- package/dist/web-server/services/index.js.map +1 -0
- package/dist/web-server/services/usage-aggregator.d.ts +7 -0
- package/dist/web-server/services/usage-aggregator.d.ts.map +1 -0
- package/dist/web-server/services/usage-aggregator.js +23 -0
- package/dist/web-server/services/usage-aggregator.js.map +1 -0
- package/dist/web-server/usage/aggregator.d.ts +54 -0
- package/dist/web-server/usage/aggregator.d.ts.map +1 -0
- package/dist/web-server/usage/aggregator.js +470 -0
- package/dist/web-server/usage/aggregator.js.map +1 -0
- package/dist/web-server/usage/data-aggregator.d.ts +55 -0
- package/dist/web-server/usage/data-aggregator.d.ts.map +1 -0
- package/dist/web-server/usage/data-aggregator.js +391 -0
- package/dist/web-server/usage/data-aggregator.js.map +1 -0
- package/dist/web-server/usage/disk-cache.d.ts +46 -0
- package/dist/web-server/usage/disk-cache.d.ts.map +1 -0
- package/dist/web-server/usage/disk-cache.js +162 -0
- package/dist/web-server/usage/disk-cache.js.map +1 -0
- package/dist/web-server/usage/handlers.d.ts +50 -0
- package/dist/web-server/usage/handlers.d.ts.map +1 -0
- package/dist/web-server/usage/handlers.js +524 -0
- package/dist/web-server/usage/handlers.js.map +1 -0
- package/dist/web-server/usage/index.d.ts +12 -0
- package/dist/web-server/usage/index.d.ts.map +1 -0
- package/dist/web-server/usage/index.js +54 -0
- package/dist/web-server/usage/index.js.map +1 -0
- package/dist/web-server/usage/routes.d.ts +11 -0
- package/dist/web-server/usage/routes.d.ts.map +1 -0
- package/dist/web-server/usage/routes.js +37 -0
- package/dist/web-server/usage/routes.js.map +1 -0
- package/dist/web-server/usage/types.d.ts +119 -0
- package/dist/web-server/usage/types.d.ts.map +1 -0
- package/dist/web-server/usage/types.js +9 -0
- package/dist/web-server/usage/types.js.map +1 -0
- package/dist/web-server/usage-disk-cache.d.ts +3 -42
- package/dist/web-server/usage-disk-cache.d.ts.map +1 -1
- package/dist/web-server/usage-disk-cache.js +5 -144
- package/dist/web-server/usage-disk-cache.js.map +1 -1
- package/dist/web-server/usage-routes.d.ts +3 -31
- package/dist/web-server/usage-routes.d.ts.map +1 -1
- package/dist/web-server/usage-routes.js +8 -1139
- package/dist/web-server/usage-routes.js.map +1 -1
- package/dist/web-server/usage-types.d.ts +3 -115
- package/dist/web-server/usage-types.d.ts.map +1 -1
- package/dist/web-server/usage-types.js +17 -3
- package/dist/web-server/usage-types.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/analytics-D1k2nYcF.js +0 -1
- package/dist/ui/assets/api-D9VVmZ1j.js +0 -1
- package/dist/ui/assets/cliproxy-CTt_Nsft.js +0 -1
- package/dist/ui/assets/cliproxy-control-panel-DKMAi4_4.js +0 -1
- package/dist/ui/assets/copilot-C6F8PT_L.js +0 -4
- package/dist/ui/assets/form-utils-BuXDJb0w.js +0 -20
- package/dist/ui/assets/health-DiAvJaSn.js +0 -1
- package/dist/ui/assets/index-Brq6EBKZ.css +0 -1
- package/dist/ui/assets/index-ByU8ZhED.js +0 -48
- package/dist/ui/assets/settings-CEomZLGl.js +0 -1
- package/dist/web-server/routes.d.ts +0 -7
- package/dist/web-server/routes.d.ts.map +0 -1
- package/dist/web-server/routes.js +0 -1891
- package/dist/web-server/routes.js.map +0 -1
|
@@ -1,106 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* CCS Health Check and Diagnostics
|
|
3
|
+
* CCS Health Check and Diagnostics - Main Orchestrator
|
|
4
4
|
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
5
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
7
|
};
|
|
31
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
const fs = __importStar(require("fs"));
|
|
33
|
-
const path = __importStar(require("path"));
|
|
34
|
-
const os = __importStar(require("os"));
|
|
35
|
-
const child_process_1 = require("child_process");
|
|
36
|
-
const claude_detector_1 = require("../utils/claude-detector");
|
|
37
|
-
const shell_executor_1 = require("../utils/shell-executor");
|
|
38
9
|
const ui_1 = require("../utils/ui");
|
|
39
10
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const environment_diagnostics_1 = require("./environment-diagnostics");
|
|
43
|
-
const oauth_port_diagnostics_1 = require("./oauth-port-diagnostics");
|
|
44
|
-
const platform_commands_1 = require("../utils/platform-commands");
|
|
45
|
-
let ora;
|
|
46
|
-
try {
|
|
47
|
-
const oraModule = require('ora');
|
|
48
|
-
ora = oraModule.default || oraModule;
|
|
49
|
-
}
|
|
50
|
-
catch (_e) {
|
|
51
|
-
// ora not available, create fallback spinner that uses console.log
|
|
52
|
-
ora = function (text) {
|
|
53
|
-
return {
|
|
54
|
-
start: () => ({
|
|
55
|
-
succeed: (msg) => console.log(msg || `[OK] ${text}`),
|
|
56
|
-
fail: (msg) => console.log(msg || `[X] ${text}`),
|
|
57
|
-
warn: (msg) => console.log(msg || `[!] ${text}`),
|
|
58
|
-
info: (msg) => console.log(msg || `[i] ${text}`),
|
|
59
|
-
text: '',
|
|
60
|
-
}),
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Health check results
|
|
66
|
-
*/
|
|
67
|
-
class HealthCheck {
|
|
68
|
-
constructor() {
|
|
69
|
-
this.checks = [];
|
|
70
|
-
this.warnings = [];
|
|
71
|
-
this.errors = [];
|
|
72
|
-
this.details = {};
|
|
73
|
-
}
|
|
74
|
-
addCheck(name, status, message = '', fix = undefined, details = undefined) {
|
|
75
|
-
this.checks.push({ name, status, message, fix });
|
|
76
|
-
if (status === 'error')
|
|
77
|
-
this.errors.push({ name, message, fix });
|
|
78
|
-
if (status === 'warning')
|
|
79
|
-
this.warnings.push({ name, message, fix });
|
|
80
|
-
// Store details for summary table
|
|
81
|
-
if (details) {
|
|
82
|
-
this.details[name] = details;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
hasErrors() {
|
|
86
|
-
return this.errors.length > 0;
|
|
87
|
-
}
|
|
88
|
-
hasWarnings() {
|
|
89
|
-
return this.warnings.length > 0;
|
|
90
|
-
}
|
|
91
|
-
isHealthy() {
|
|
92
|
-
return !this.hasErrors();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
11
|
+
const checks_1 = require("./checks");
|
|
12
|
+
const repair_1 = require("./repair");
|
|
95
13
|
/**
|
|
96
|
-
* Doctor Class
|
|
14
|
+
* Doctor Class - Orchestrates health checks
|
|
97
15
|
*/
|
|
98
16
|
class Doctor {
|
|
99
17
|
constructor() {
|
|
100
|
-
this.
|
|
101
|
-
this.ccsDir = path.join(this.homedir, '.ccs');
|
|
102
|
-
this.claudeDir = path.join(this.homedir, '.claude');
|
|
103
|
-
this.results = new HealthCheck();
|
|
18
|
+
this.results = new checks_1.HealthCheck();
|
|
104
19
|
this.ccsVersion = package_json_1.default.version;
|
|
105
20
|
}
|
|
106
21
|
/**
|
|
@@ -115,643 +30,35 @@ class Doctor {
|
|
|
115
30
|
this.results.details['CCS Version'] = { status: 'OK', info: `v${this.ccsVersion}` };
|
|
116
31
|
// Group 1: System
|
|
117
32
|
console.log((0, ui_1.header)('SYSTEM'));
|
|
118
|
-
await this.
|
|
119
|
-
this.checkCcsDirectory();
|
|
33
|
+
await (0, checks_1.runSystemChecks)(this.results);
|
|
120
34
|
console.log('');
|
|
121
|
-
// Group 2: Environment (
|
|
35
|
+
// Group 2: Environment (OAuth readiness diagnostics)
|
|
122
36
|
console.log((0, ui_1.header)('ENVIRONMENT'));
|
|
123
|
-
this.
|
|
37
|
+
(0, checks_1.runEnvironmentCheck)(this.results);
|
|
124
38
|
console.log('');
|
|
125
39
|
// Group 3: Configuration
|
|
126
40
|
console.log((0, ui_1.header)('CONFIGURATION'));
|
|
127
|
-
this.
|
|
128
|
-
this.checkClaudeSettings();
|
|
41
|
+
(0, checks_1.runConfigChecks)(this.results);
|
|
129
42
|
console.log('');
|
|
130
43
|
// Group 4: Profiles & Delegation
|
|
131
44
|
console.log((0, ui_1.header)('PROFILES & DELEGATION'));
|
|
132
|
-
this.
|
|
133
|
-
this.checkInstances();
|
|
134
|
-
this.checkDelegation();
|
|
45
|
+
(0, checks_1.runProfileChecks)(this.results);
|
|
135
46
|
console.log('');
|
|
136
47
|
// Group 5: System Health
|
|
137
48
|
console.log((0, ui_1.header)('SYSTEM HEALTH'));
|
|
138
|
-
this.
|
|
139
|
-
this.checkCcsSymlinks();
|
|
140
|
-
this.checkSettingsSymlinks();
|
|
49
|
+
(0, checks_1.runSymlinkChecks)(this.results);
|
|
141
50
|
console.log('');
|
|
142
51
|
// Group 6: CLIProxy (OAuth profiles)
|
|
143
52
|
console.log((0, ui_1.header)('CLIPROXY (OAUTH PROFILES)'));
|
|
144
|
-
await this.
|
|
53
|
+
await (0, checks_1.runCLIProxyChecks)(this.results);
|
|
145
54
|
console.log('');
|
|
146
|
-
// Group 7: OAuth Readiness (
|
|
55
|
+
// Group 7: OAuth Readiness (port availability)
|
|
147
56
|
console.log((0, ui_1.header)('OAUTH READINESS'));
|
|
148
|
-
await this.
|
|
57
|
+
await (0, checks_1.runOAuthChecks)(this.results);
|
|
149
58
|
console.log('');
|
|
150
59
|
this.showReport();
|
|
151
60
|
return this.results;
|
|
152
61
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Check 1: Claude CLI availability
|
|
155
|
-
*/
|
|
156
|
-
async checkClaudeCli() {
|
|
157
|
-
const spinner = ora('Checking Claude CLI').start();
|
|
158
|
-
const cliInfo = (0, claude_detector_1.getClaudeCliInfo)();
|
|
159
|
-
if (!cliInfo) {
|
|
160
|
-
spinner.fail();
|
|
161
|
-
console.log(` ${(0, ui_1.fail)('Claude CLI'.padEnd(22))} Not found in PATH`);
|
|
162
|
-
this.results.addCheck('Claude CLI', 'error', 'Claude CLI not found in PATH', 'Install from: https://docs.claude.com/en/docs/claude-code/installation', { status: 'ERROR', info: 'Not installed' });
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
const { path: claudeCli, needsShell } = cliInfo;
|
|
166
|
-
// Try to execute claude --version
|
|
167
|
-
try {
|
|
168
|
-
const result = await new Promise((resolve, reject) => {
|
|
169
|
-
// When shell is needed (Windows .cmd/.bat files), concatenate into string
|
|
170
|
-
// to avoid DEP0190 warning about passing args with shell: true
|
|
171
|
-
const child = needsShell
|
|
172
|
-
? (0, child_process_1.spawn)([claudeCli, '--version'].map(shell_executor_1.escapeShellArg).join(' '), {
|
|
173
|
-
stdio: 'pipe',
|
|
174
|
-
timeout: 5000,
|
|
175
|
-
shell: true,
|
|
176
|
-
})
|
|
177
|
-
: (0, child_process_1.spawn)(claudeCli, ['--version'], {
|
|
178
|
-
stdio: 'pipe',
|
|
179
|
-
timeout: 5000,
|
|
180
|
-
});
|
|
181
|
-
let output = '';
|
|
182
|
-
child.stdout?.on('data', (data) => (output += data));
|
|
183
|
-
child.stderr?.on('data', (data) => (output += data));
|
|
184
|
-
child.on('close', (code) => {
|
|
185
|
-
if (code === 0)
|
|
186
|
-
resolve(output);
|
|
187
|
-
else
|
|
188
|
-
reject(new Error('Exit code ' + code));
|
|
189
|
-
});
|
|
190
|
-
child.on('error', reject);
|
|
191
|
-
});
|
|
192
|
-
// Extract version from output
|
|
193
|
-
const versionMatch = result.match(/(\d+\.\d+\.\d+)/);
|
|
194
|
-
const version = versionMatch ? versionMatch[1] : 'unknown';
|
|
195
|
-
spinner.succeed();
|
|
196
|
-
console.log(` ${(0, ui_1.ok)('Claude CLI'.padEnd(22))} v${version} (${claudeCli})`);
|
|
197
|
-
this.results.addCheck('Claude CLI', 'success', `Found: ${claudeCli}`, undefined, {
|
|
198
|
-
status: 'OK',
|
|
199
|
-
info: `v${version} (${claudeCli})`,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
catch (_err) {
|
|
203
|
-
spinner.fail();
|
|
204
|
-
console.log(` ${(0, ui_1.fail)('Claude CLI'.padEnd(22))} Not found or not working`);
|
|
205
|
-
this.results.addCheck('Claude CLI', 'error', 'Claude CLI not found or not working', 'Install from: https://docs.claude.com/en/docs/claude-code/installation', { status: 'ERROR', info: 'Not installed' });
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Check 2: ~/.ccs/ directory
|
|
210
|
-
*/
|
|
211
|
-
checkCcsDirectory() {
|
|
212
|
-
const spinner = ora('Checking ~/.ccs/ directory').start();
|
|
213
|
-
if (fs.existsSync(this.ccsDir)) {
|
|
214
|
-
spinner.succeed();
|
|
215
|
-
console.log(` ${(0, ui_1.ok)('CCS Directory'.padEnd(22))} ~/.ccs/`);
|
|
216
|
-
this.results.addCheck('CCS Directory', 'success', undefined, undefined, {
|
|
217
|
-
status: 'OK',
|
|
218
|
-
info: '~/.ccs/',
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
222
|
-
spinner.fail();
|
|
223
|
-
console.log(` ${(0, ui_1.fail)('CCS Directory'.padEnd(22))} Not found`);
|
|
224
|
-
this.results.addCheck('CCS Directory', 'error', '~/.ccs/ directory not found', 'Run: npm install -g @kaitranntt/ccs --force', { status: 'ERROR', info: 'Not found' });
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Check 3: Config files
|
|
229
|
-
*/
|
|
230
|
-
checkConfigFiles() {
|
|
231
|
-
const files = [
|
|
232
|
-
{ path: path.join(this.ccsDir, 'config.json'), name: 'config.json', key: 'config.json' },
|
|
233
|
-
{
|
|
234
|
-
path: path.join(this.ccsDir, 'glm.settings.json'),
|
|
235
|
-
name: 'glm.settings.json',
|
|
236
|
-
key: 'GLM Settings',
|
|
237
|
-
profile: 'glm',
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
path: path.join(this.ccsDir, 'kimi.settings.json'),
|
|
241
|
-
name: 'kimi.settings.json',
|
|
242
|
-
key: 'Kimi Settings',
|
|
243
|
-
profile: 'kimi',
|
|
244
|
-
},
|
|
245
|
-
];
|
|
246
|
-
const { DelegationValidator } = require('../utils/delegation-validator');
|
|
247
|
-
for (const file of files) {
|
|
248
|
-
const spinner = ora(`Checking ${file.name}`).start();
|
|
249
|
-
if (!fs.existsSync(file.path)) {
|
|
250
|
-
spinner.fail();
|
|
251
|
-
console.log(` ${(0, ui_1.fail)(file.name.padEnd(22))} Not found`);
|
|
252
|
-
this.results.addCheck(file.name, 'error', `${file.name} not found`, 'Run: npm install -g @kaitranntt/ccs --force', { status: 'ERROR', info: 'Not found' });
|
|
253
|
-
continue;
|
|
254
|
-
}
|
|
255
|
-
// Validate JSON
|
|
256
|
-
try {
|
|
257
|
-
const content = fs.readFileSync(file.path, 'utf8');
|
|
258
|
-
JSON.parse(content);
|
|
259
|
-
// Extract useful info based on file type
|
|
260
|
-
let fileInfo = 'Valid';
|
|
261
|
-
let status = 'OK';
|
|
262
|
-
if (file.profile) {
|
|
263
|
-
// For settings files, check if API key is configured
|
|
264
|
-
const validation = DelegationValidator.validate(file.profile);
|
|
265
|
-
if (validation.valid) {
|
|
266
|
-
fileInfo = 'Key configured';
|
|
267
|
-
status = 'OK';
|
|
268
|
-
}
|
|
269
|
-
else if (validation.error && validation.error.includes('placeholder')) {
|
|
270
|
-
fileInfo = 'Placeholder key';
|
|
271
|
-
status = 'WARN';
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
fileInfo = 'Valid JSON';
|
|
275
|
-
status = 'OK';
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (status === 'WARN') {
|
|
279
|
-
spinner.warn();
|
|
280
|
-
console.log(` ${(0, ui_1.warn)(file.name.padEnd(22))} ${fileInfo}`);
|
|
281
|
-
}
|
|
282
|
-
else {
|
|
283
|
-
spinner.succeed();
|
|
284
|
-
console.log(` ${(0, ui_1.ok)(file.name.padEnd(22))} ${fileInfo}`);
|
|
285
|
-
}
|
|
286
|
-
this.results.addCheck(file.name, status === 'OK' ? 'success' : 'warning', undefined, undefined, {
|
|
287
|
-
status: status,
|
|
288
|
-
info: fileInfo,
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
catch (e) {
|
|
292
|
-
spinner.fail();
|
|
293
|
-
console.log(` ${(0, ui_1.fail)(file.name.padEnd(22))} Invalid JSON`);
|
|
294
|
-
this.results.addCheck(file.name, 'error', `Invalid JSON: ${e.message}`, `Backup and recreate: mv ${file.path} ${file.path}.backup && npm install -g @kaitranntt/ccs --force`, { status: 'ERROR', info: 'Invalid JSON' });
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Check 4: Claude settings
|
|
300
|
-
*/
|
|
301
|
-
checkClaudeSettings() {
|
|
302
|
-
const spinner = ora('Checking ~/.claude/settings.json').start();
|
|
303
|
-
const settingsPath = path.join(this.claudeDir, 'settings.json');
|
|
304
|
-
const settingsName = '~/.claude/settings.json';
|
|
305
|
-
if (!fs.existsSync(settingsPath)) {
|
|
306
|
-
spinner.warn();
|
|
307
|
-
console.log(` ${(0, ui_1.warn)(settingsName.padEnd(22))} Not found`);
|
|
308
|
-
this.results.addCheck('Claude Settings', 'warning', '~/.claude/settings.json not found', 'Run: claude /login');
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
// Validate JSON
|
|
312
|
-
try {
|
|
313
|
-
const content = fs.readFileSync(settingsPath, 'utf8');
|
|
314
|
-
JSON.parse(content);
|
|
315
|
-
spinner.succeed();
|
|
316
|
-
console.log(` ${(0, ui_1.ok)(settingsName.padEnd(22))} Valid`);
|
|
317
|
-
this.results.addCheck('Claude Settings', 'success');
|
|
318
|
-
}
|
|
319
|
-
catch (e) {
|
|
320
|
-
spinner.warn();
|
|
321
|
-
console.log(` ${(0, ui_1.warn)(settingsName.padEnd(22))} Invalid JSON`);
|
|
322
|
-
this.results.addCheck('Claude Settings', 'warning', `Invalid JSON: ${e.message}`, 'Run: claude /login');
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Check 5: Profile configurations
|
|
327
|
-
*/
|
|
328
|
-
checkProfiles() {
|
|
329
|
-
const spinner = ora('Checking profiles').start();
|
|
330
|
-
const configPath = path.join(this.ccsDir, 'config.json');
|
|
331
|
-
if (!fs.existsSync(configPath)) {
|
|
332
|
-
spinner.info();
|
|
333
|
-
console.log(` ${(0, ui_1.info)('Profiles'.padEnd(22))} config.json not found`);
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
try {
|
|
337
|
-
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
338
|
-
if (!config.profiles || typeof config.profiles !== 'object') {
|
|
339
|
-
spinner.fail();
|
|
340
|
-
console.log(` ${(0, ui_1.fail)('Profiles'.padEnd(22))} Missing profiles object`);
|
|
341
|
-
this.results.addCheck('Profiles', 'error', 'config.json missing profiles object', 'Run: npm install -g @kaitranntt/ccs --force', { status: 'ERROR', info: 'Missing profiles object' });
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
const profileCount = Object.keys(config.profiles).length;
|
|
345
|
-
const profileNames = Object.keys(config.profiles).join(', ');
|
|
346
|
-
spinner.succeed();
|
|
347
|
-
console.log(` ${(0, ui_1.ok)('Profiles'.padEnd(22))} ${profileCount} configured (${profileNames})`);
|
|
348
|
-
this.results.addCheck('Profiles', 'success', `${profileCount} profiles configured`, undefined, {
|
|
349
|
-
status: 'OK',
|
|
350
|
-
info: `${profileCount} configured (${profileNames.length > 30 ? profileNames.substring(0, 27) + '...' : profileNames})`,
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
catch (e) {
|
|
354
|
-
spinner.fail();
|
|
355
|
-
console.log(` ${(0, ui_1.fail)('Profiles'.padEnd(22))} ${e.message}`);
|
|
356
|
-
this.results.addCheck('Profiles', 'error', e.message, undefined, {
|
|
357
|
-
status: 'ERROR',
|
|
358
|
-
info: e.message,
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Check 6: Instance directories (account-based profiles)
|
|
364
|
-
*/
|
|
365
|
-
checkInstances() {
|
|
366
|
-
const spinner = ora('Checking instances').start();
|
|
367
|
-
const instancesDir = path.join(this.ccsDir, 'instances');
|
|
368
|
-
if (!fs.existsSync(instancesDir)) {
|
|
369
|
-
spinner.info();
|
|
370
|
-
console.log(` ${(0, ui_1.info)('Instances'.padEnd(22))} No account profiles`);
|
|
371
|
-
this.results.addCheck('Instances', 'success', 'No account profiles configured');
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
const instances = fs.readdirSync(instancesDir).filter((name) => {
|
|
375
|
-
return fs.statSync(path.join(instancesDir, name)).isDirectory();
|
|
376
|
-
});
|
|
377
|
-
if (instances.length === 0) {
|
|
378
|
-
spinner.info();
|
|
379
|
-
console.log(` ${(0, ui_1.info)('Instances'.padEnd(22))} No account profiles`);
|
|
380
|
-
this.results.addCheck('Instances', 'success', 'No account profiles');
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
spinner.succeed();
|
|
384
|
-
console.log(` ${(0, ui_1.ok)('Instances'.padEnd(22))} ${instances.length} account profiles`);
|
|
385
|
-
this.results.addCheck('Instances', 'success', `${instances.length} account profiles`);
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Check 7: Delegation system
|
|
389
|
-
*/
|
|
390
|
-
checkDelegation() {
|
|
391
|
-
const spinner = ora('Checking delegation').start();
|
|
392
|
-
// Check if delegation commands exist in ~/.ccs/.claude/commands/
|
|
393
|
-
const ccsClaudeCommandsDir = path.join(this.ccsDir, '.claude', 'commands');
|
|
394
|
-
const hasCcsCommand = fs.existsSync(path.join(ccsClaudeCommandsDir, 'ccs.md'));
|
|
395
|
-
const hasContinueCommand = fs.existsSync(path.join(ccsClaudeCommandsDir, 'ccs', 'continue.md'));
|
|
396
|
-
if (!hasCcsCommand || !hasContinueCommand) {
|
|
397
|
-
spinner.warn();
|
|
398
|
-
console.log(` ${(0, ui_1.warn)('Delegation'.padEnd(22))} Not installed`);
|
|
399
|
-
this.results.addCheck('Delegation', 'warning', 'Delegation commands not found', 'Install with: npm install -g @kaitranntt/ccs --force', { status: 'WARN', info: 'Not installed' });
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
// Check profile validity using DelegationValidator
|
|
403
|
-
const { DelegationValidator } = require('../utils/delegation-validator');
|
|
404
|
-
const readyProfiles = [];
|
|
405
|
-
for (const profile of ['glm', 'kimi']) {
|
|
406
|
-
const validation = DelegationValidator.validate(profile);
|
|
407
|
-
if (validation.valid) {
|
|
408
|
-
readyProfiles.push(profile);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
if (readyProfiles.length === 0) {
|
|
412
|
-
spinner.warn();
|
|
413
|
-
console.log(` ${(0, ui_1.warn)('Delegation'.padEnd(22))} No profiles ready`);
|
|
414
|
-
this.results.addCheck('Delegation', 'warning', 'Delegation installed but no profiles configured', 'Configure profiles with valid API keys (not placeholders)', { status: 'WARN', info: 'No profiles ready' });
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
spinner.succeed();
|
|
418
|
-
console.log(` ${(0, ui_1.ok)('Delegation'.padEnd(22))} ${readyProfiles.length} profiles ready (${readyProfiles.join(', ')})`);
|
|
419
|
-
this.results.addCheck('Delegation', 'success', `${readyProfiles.length} profile(s) ready: ${readyProfiles.join(', ')}`, undefined, { status: 'OK', info: `${readyProfiles.length} profiles ready` });
|
|
420
|
-
}
|
|
421
|
-
/**
|
|
422
|
-
* Check 8: File permissions
|
|
423
|
-
*/
|
|
424
|
-
checkPermissions() {
|
|
425
|
-
const spinner = ora('Checking permissions').start();
|
|
426
|
-
const testFile = path.join(this.ccsDir, '.permission-test');
|
|
427
|
-
try {
|
|
428
|
-
fs.writeFileSync(testFile, 'test', 'utf8');
|
|
429
|
-
fs.unlinkSync(testFile);
|
|
430
|
-
spinner.succeed();
|
|
431
|
-
console.log(` ${(0, ui_1.ok)('Permissions'.padEnd(22))} Write access verified`);
|
|
432
|
-
this.results.addCheck('Permissions', 'success', undefined, undefined, {
|
|
433
|
-
status: 'OK',
|
|
434
|
-
info: 'Write access verified',
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
catch (_e) {
|
|
438
|
-
spinner.fail();
|
|
439
|
-
console.log(` ${(0, ui_1.fail)('Permissions'.padEnd(22))} Cannot write to ~/.ccs/`);
|
|
440
|
-
this.results.addCheck('Permissions', 'error', 'Cannot write to ~/.ccs/', 'Fix: sudo chown -R $USER ~/.ccs ~/.claude && chmod 755 ~/.ccs ~/.claude', { status: 'ERROR', info: 'Cannot write to ~/.ccs/' });
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Check 9: CCS symlinks to ~/.claude/
|
|
445
|
-
*/
|
|
446
|
-
checkCcsSymlinks() {
|
|
447
|
-
const spinner = ora('Checking CCS symlinks').start();
|
|
448
|
-
try {
|
|
449
|
-
const { ClaudeSymlinkManager } = require('../utils/claude-symlink-manager');
|
|
450
|
-
const manager = new ClaudeSymlinkManager();
|
|
451
|
-
const health = manager.checkHealth();
|
|
452
|
-
if (health.healthy) {
|
|
453
|
-
const itemCount = manager.ccsItems.length;
|
|
454
|
-
spinner.succeed();
|
|
455
|
-
console.log(` ${(0, ui_1.ok)('CCS Symlinks'.padEnd(22))} ${itemCount}/${itemCount} items linked`);
|
|
456
|
-
this.results.addCheck('CCS Symlinks', 'success', 'All CCS items properly symlinked', undefined, {
|
|
457
|
-
status: 'OK',
|
|
458
|
-
info: `${itemCount}/${itemCount} items synced`,
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
else {
|
|
462
|
-
spinner.warn();
|
|
463
|
-
console.log(` ${(0, ui_1.warn)('CCS Symlinks'.padEnd(22))} ${health.issues.length} issues found`);
|
|
464
|
-
this.results.addCheck('CCS Symlinks', 'warning', health.issues.join(', '), 'Run: ccs sync', { status: 'WARN', info: `${health.issues.length} issues` });
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
catch (e) {
|
|
468
|
-
spinner.warn();
|
|
469
|
-
console.log(` ${(0, ui_1.warn)('CCS Symlinks'.padEnd(22))} Could not check`);
|
|
470
|
-
this.results.addCheck('CCS Symlinks', 'warning', 'Could not check CCS symlinks: ' + e.message, 'Run: ccs sync', { status: 'WARN', info: 'Could not check' });
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Check 10: settings.json symlinks
|
|
475
|
-
*/
|
|
476
|
-
checkSettingsSymlinks() {
|
|
477
|
-
const spinner = ora('Checking settings.json symlinks').start();
|
|
478
|
-
const settingsLabel = 'settings.json';
|
|
479
|
-
try {
|
|
480
|
-
const sharedDir = path.join(this.homedir, '.ccs', 'shared');
|
|
481
|
-
const sharedSettings = path.join(sharedDir, 'settings.json');
|
|
482
|
-
const claudeSettings = path.join(this.claudeDir, 'settings.json');
|
|
483
|
-
// Check shared settings exists and points to ~/.claude/
|
|
484
|
-
if (!fs.existsSync(sharedSettings)) {
|
|
485
|
-
spinner.warn();
|
|
486
|
-
console.log(` ${(0, ui_1.warn)(settingsLabel.padEnd(22))} Not found (shared)`);
|
|
487
|
-
this.results.addCheck('Settings Symlinks', 'warning', 'Shared settings.json not found', 'Run: ccs sync');
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
const sharedStats = fs.lstatSync(sharedSettings);
|
|
491
|
-
if (!sharedStats.isSymbolicLink()) {
|
|
492
|
-
spinner.warn();
|
|
493
|
-
console.log(` ${(0, ui_1.warn)(settingsLabel.padEnd(22))} Not a symlink (shared)`);
|
|
494
|
-
this.results.addCheck('Settings Symlinks', 'warning', 'Shared settings.json is not a symlink', 'Run: ccs sync');
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
const sharedTarget = fs.readlinkSync(sharedSettings);
|
|
498
|
-
const resolvedShared = path.resolve(path.dirname(sharedSettings), sharedTarget);
|
|
499
|
-
if (resolvedShared !== claudeSettings) {
|
|
500
|
-
spinner.warn();
|
|
501
|
-
console.log(` ${(0, ui_1.warn)(settingsLabel.padEnd(22))} Wrong target (shared)`);
|
|
502
|
-
this.results.addCheck('Settings Symlinks', 'warning', `Points to ${resolvedShared} instead of ${claudeSettings}`, 'Run: ccs sync');
|
|
503
|
-
return;
|
|
504
|
-
}
|
|
505
|
-
// Check each instance
|
|
506
|
-
const instancesDir = path.join(this.ccsDir, 'instances');
|
|
507
|
-
if (!fs.existsSync(instancesDir)) {
|
|
508
|
-
spinner.succeed();
|
|
509
|
-
console.log(` ${(0, ui_1.ok)(settingsLabel.padEnd(22))} Shared symlink valid`);
|
|
510
|
-
this.results.addCheck('Settings Symlinks', 'success', 'Shared symlink valid', undefined, {
|
|
511
|
-
status: 'OK',
|
|
512
|
-
info: 'Shared symlink valid',
|
|
513
|
-
});
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
const instances = fs.readdirSync(instancesDir).filter((name) => {
|
|
517
|
-
return fs.statSync(path.join(instancesDir, name)).isDirectory();
|
|
518
|
-
});
|
|
519
|
-
let broken = 0;
|
|
520
|
-
for (const instance of instances) {
|
|
521
|
-
const instancePath = path.join(instancesDir, instance);
|
|
522
|
-
const instanceSettings = path.join(instancePath, 'settings.json');
|
|
523
|
-
if (!fs.existsSync(instanceSettings)) {
|
|
524
|
-
broken++;
|
|
525
|
-
continue;
|
|
526
|
-
}
|
|
527
|
-
try {
|
|
528
|
-
const stats = fs.lstatSync(instanceSettings);
|
|
529
|
-
if (!stats.isSymbolicLink()) {
|
|
530
|
-
broken++;
|
|
531
|
-
continue;
|
|
532
|
-
}
|
|
533
|
-
const target = fs.readlinkSync(instanceSettings);
|
|
534
|
-
const resolved = path.resolve(path.dirname(instanceSettings), target);
|
|
535
|
-
if (resolved !== sharedSettings) {
|
|
536
|
-
broken++;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
catch (_err) {
|
|
540
|
-
broken++;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
if (broken > 0) {
|
|
544
|
-
spinner.warn();
|
|
545
|
-
console.log(` ${(0, ui_1.warn)(settingsLabel.padEnd(22))} ${broken} broken instance(s)`);
|
|
546
|
-
this.results.addCheck('Settings Symlinks', 'warning', `${broken} instance(s) have broken symlinks`, 'Run: ccs sync', { status: 'WARN', info: `${broken} broken instance(s)` });
|
|
547
|
-
}
|
|
548
|
-
else {
|
|
549
|
-
spinner.succeed();
|
|
550
|
-
console.log(` ${(0, ui_1.ok)(settingsLabel.padEnd(22))} ${instances.length} instance(s) valid`);
|
|
551
|
-
this.results.addCheck('Settings Symlinks', 'success', 'All instance symlinks valid', undefined, {
|
|
552
|
-
status: 'OK',
|
|
553
|
-
info: `${instances.length} instance(s) valid`,
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
catch (err) {
|
|
558
|
-
spinner.warn();
|
|
559
|
-
console.log(` ${(0, ui_1.warn)(settingsLabel.padEnd(22))} Check failed`);
|
|
560
|
-
this.results.addCheck('Settings Symlinks', 'warning', `Failed to check: ${err.message}`, 'Run: ccs sync', { status: 'WARN', info: 'Check failed' });
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Check 10.1: Environment detection (OAuth readiness)
|
|
565
|
-
* Helps diagnose Windows headless false positives
|
|
566
|
-
*/
|
|
567
|
-
checkEnvironment() {
|
|
568
|
-
const spinner = ora('Checking environment').start();
|
|
569
|
-
const diag = (0, environment_diagnostics_1.getEnvironmentDiagnostics)();
|
|
570
|
-
// Determine overall environment health
|
|
571
|
-
let envStatus = 'OK';
|
|
572
|
-
let envMessage = 'Browser available';
|
|
573
|
-
// Check for potential issues
|
|
574
|
-
if (diag.detectedHeadless) {
|
|
575
|
-
if (diag.platform === 'win32' && diag.ttyStatus === 'undefined') {
|
|
576
|
-
// Windows false positive - this is actually a warning
|
|
577
|
-
envStatus = 'WARN';
|
|
578
|
-
envMessage = 'Headless detected (may be false positive on Windows)';
|
|
579
|
-
}
|
|
580
|
-
else if (diag.sshSession) {
|
|
581
|
-
envMessage = 'SSH session (headless mode)';
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
envMessage = 'Headless environment';
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
if (envStatus === 'WARN') {
|
|
588
|
-
spinner.warn();
|
|
589
|
-
console.log(` ${(0, ui_1.warn)('Environment'.padEnd(22))} ${envMessage}`);
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
spinner.succeed();
|
|
593
|
-
console.log(` ${(0, ui_1.ok)('Environment'.padEnd(22))} ${envMessage}`);
|
|
594
|
-
}
|
|
595
|
-
// Show key environment details
|
|
596
|
-
console.log(` ${''.padEnd(24)} Platform: ${diag.platformName}`);
|
|
597
|
-
if (diag.sshSession) {
|
|
598
|
-
console.log(` ${''.padEnd(24)} SSH: Yes (${diag.sshReason})`);
|
|
599
|
-
}
|
|
600
|
-
if (diag.ttyStatus === 'undefined') {
|
|
601
|
-
console.log(` ${''.padEnd(24)} TTY: undefined [!]`);
|
|
602
|
-
}
|
|
603
|
-
console.log(` ${''.padEnd(24)} Browser: ${diag.browserReason}`);
|
|
604
|
-
this.results.addCheck('Environment', envStatus === 'OK' ? 'success' : 'warning', envMessage, envStatus === 'WARN' ? 'If browser opens correctly, this warning can be ignored' : undefined, {
|
|
605
|
-
status: envStatus,
|
|
606
|
-
info: envMessage,
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* Check 10.2: OAuth callback ports availability
|
|
611
|
-
* Pre-flight check for OAuth authentication
|
|
612
|
-
*/
|
|
613
|
-
async checkOAuthPorts() {
|
|
614
|
-
const spinner = ora('Checking OAuth callback ports').start();
|
|
615
|
-
const portDiagnostics = await (0, oauth_port_diagnostics_1.checkAuthCodePorts)();
|
|
616
|
-
// Count issues
|
|
617
|
-
const conflicts = portDiagnostics.filter((d) => d.status === 'occupied');
|
|
618
|
-
if (conflicts.length === 0) {
|
|
619
|
-
spinner.succeed();
|
|
620
|
-
console.log(` ${(0, ui_1.ok)('OAuth Ports'.padEnd(22))} All callback ports available`);
|
|
621
|
-
this.results.addCheck('OAuth Ports', 'success', undefined, undefined, {
|
|
622
|
-
status: 'OK',
|
|
623
|
-
info: 'All callback ports available',
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
else {
|
|
627
|
-
spinner.warn();
|
|
628
|
-
console.log(` ${(0, ui_1.warn)('OAuth Ports'.padEnd(22))} ${conflicts.length} port conflict(s)`);
|
|
629
|
-
this.results.addCheck('OAuth Ports', 'warning', `${conflicts.length} port conflict(s)`, 'Close conflicting applications before OAuth', { status: 'WARN', info: `${conflicts.length} conflict(s)` });
|
|
630
|
-
}
|
|
631
|
-
// Show individual port status
|
|
632
|
-
for (const diag of portDiagnostics) {
|
|
633
|
-
const providerName = diag.provider.charAt(0).toUpperCase() + diag.provider.slice(1);
|
|
634
|
-
const portStr = diag.port !== null ? `(${diag.port})` : '';
|
|
635
|
-
let statusIcon;
|
|
636
|
-
switch (diag.status) {
|
|
637
|
-
case 'free':
|
|
638
|
-
case 'cliproxy':
|
|
639
|
-
statusIcon = (0, ui_1.ok)(`${providerName} ${portStr}`.padEnd(20));
|
|
640
|
-
break;
|
|
641
|
-
case 'occupied':
|
|
642
|
-
statusIcon = (0, ui_1.warn)(`${providerName} ${portStr}`.padEnd(20));
|
|
643
|
-
break;
|
|
644
|
-
default:
|
|
645
|
-
statusIcon = (0, ui_1.info)(`${providerName} ${portStr}`.padEnd(20));
|
|
646
|
-
}
|
|
647
|
-
console.log(` ${statusIcon} ${diag.message}`);
|
|
648
|
-
if (diag.recommendation && diag.status === 'occupied') {
|
|
649
|
-
console.log(` ${''.padEnd(24)} Fix: ${diag.recommendation}`);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Check 11: CLIProxy health (OAuth profiles: gemini, codex, agy, qwen)
|
|
655
|
-
*/
|
|
656
|
-
async checkCLIProxy() {
|
|
657
|
-
// 1. Binary installed?
|
|
658
|
-
const binarySpinner = ora('Checking CLIProxy binary').start();
|
|
659
|
-
if ((0, cliproxy_1.isCLIProxyInstalled)()) {
|
|
660
|
-
const binaryPath = (0, cliproxy_1.getCLIProxyPath)();
|
|
661
|
-
const installedVersion = (0, cliproxy_1.getInstalledCliproxyVersion)();
|
|
662
|
-
binarySpinner.succeed();
|
|
663
|
-
console.log(` ${(0, ui_1.ok)('CLIProxy Binary'.padEnd(22))} v${installedVersion}`);
|
|
664
|
-
this.results.addCheck('CLIProxy Binary', 'success', undefined, undefined, {
|
|
665
|
-
status: 'OK',
|
|
666
|
-
info: `v${installedVersion} (${binaryPath})`,
|
|
667
|
-
});
|
|
668
|
-
}
|
|
669
|
-
else {
|
|
670
|
-
binarySpinner.info();
|
|
671
|
-
console.log(` ${(0, ui_1.info)('CLIProxy Binary'.padEnd(22))} Not installed (downloads on first use)`);
|
|
672
|
-
this.results.addCheck('CLIProxy Binary', 'success', 'Not installed yet', 'Run: ccs gemini "test" (will download automatically)', { status: 'OK', info: 'Not installed (downloads on first use)' });
|
|
673
|
-
}
|
|
674
|
-
// 2. Config file exists and is up-to-date?
|
|
675
|
-
const configSpinner = ora('Checking CLIProxy config').start();
|
|
676
|
-
const configPath = (0, cliproxy_1.getConfigPath)();
|
|
677
|
-
if (fs.existsSync(configPath)) {
|
|
678
|
-
// Check if config needs regeneration (version mismatch or missing features)
|
|
679
|
-
if ((0, cliproxy_1.configNeedsRegeneration)()) {
|
|
680
|
-
configSpinner.warn();
|
|
681
|
-
console.log(` ${(0, ui_1.warn)('CLIProxy Config'.padEnd(22))} Outdated config, upgrading to v${cliproxy_1.CLIPROXY_CONFIG_VERSION}...`);
|
|
682
|
-
// Regenerate config with new features
|
|
683
|
-
(0, cliproxy_1.regenerateConfig)();
|
|
684
|
-
console.log(` ${(0, ui_1.ok)('CLIProxy Config'.padEnd(22))} Upgraded to v${cliproxy_1.CLIPROXY_CONFIG_VERSION}`);
|
|
685
|
-
this.results.addCheck('CLIProxy Config', 'success', undefined, undefined, {
|
|
686
|
-
status: 'OK',
|
|
687
|
-
info: `Upgraded to v${cliproxy_1.CLIPROXY_CONFIG_VERSION}`,
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
else {
|
|
691
|
-
configSpinner.succeed();
|
|
692
|
-
console.log(` ${(0, ui_1.ok)('CLIProxy Config'.padEnd(22))} cliproxy/config.yaml (v${cliproxy_1.CLIPROXY_CONFIG_VERSION})`);
|
|
693
|
-
this.results.addCheck('CLIProxy Config', 'success', undefined, undefined, {
|
|
694
|
-
status: 'OK',
|
|
695
|
-
info: `cliproxy/config.yaml (v${cliproxy_1.CLIPROXY_CONFIG_VERSION})`,
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
else {
|
|
700
|
-
configSpinner.info();
|
|
701
|
-
console.log(` ${(0, ui_1.info)('CLIProxy Config'.padEnd(22))} Not created (on first use)`);
|
|
702
|
-
this.results.addCheck('CLIProxy Config', 'success', 'Not created yet', undefined, {
|
|
703
|
-
status: 'OK',
|
|
704
|
-
info: 'Generated on first use',
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
// 3. OAuth status for each provider
|
|
708
|
-
const authStatuses = (0, cliproxy_1.getAllAuthStatus)();
|
|
709
|
-
for (const status of authStatuses) {
|
|
710
|
-
const authSpinner = ora(`Checking ${status.provider} auth`).start();
|
|
711
|
-
const providerName = status.provider.charAt(0).toUpperCase() + status.provider.slice(1);
|
|
712
|
-
if (status.authenticated) {
|
|
713
|
-
const lastAuth = status.lastAuth ? ` (${status.lastAuth.toLocaleDateString()})` : '';
|
|
714
|
-
authSpinner.succeed();
|
|
715
|
-
console.log(` ${(0, ui_1.ok)(`${providerName} Auth`.padEnd(22))} Authenticated${lastAuth}`);
|
|
716
|
-
this.results.addCheck(`${providerName} Auth`, 'success', undefined, undefined, {
|
|
717
|
-
status: 'OK',
|
|
718
|
-
info: `Authenticated${lastAuth}`,
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
else {
|
|
722
|
-
authSpinner.info();
|
|
723
|
-
console.log(` ${(0, ui_1.info)(`${providerName} Auth`.padEnd(22))} Not authenticated`);
|
|
724
|
-
this.results.addCheck(`${providerName} Auth`, 'success', 'Not authenticated', `Run: ccs ${status.provider} --auth`, { status: 'OK', info: 'Not authenticated (run ccs <profile> to login)' });
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
// 4. Port status (check if CLIProxy or other process)
|
|
728
|
-
const portSpinner = ora(`Checking port ${cliproxy_1.CLIPROXY_DEFAULT_PORT}`).start();
|
|
729
|
-
const portProcess = await (0, port_utils_1.getPortProcess)(cliproxy_1.CLIPROXY_DEFAULT_PORT);
|
|
730
|
-
if (!portProcess) {
|
|
731
|
-
// Port is free
|
|
732
|
-
portSpinner.info();
|
|
733
|
-
console.log(` ${(0, ui_1.info)('CLIProxy Port'.padEnd(22))} ${cliproxy_1.CLIPROXY_DEFAULT_PORT} free (proxy not running)`);
|
|
734
|
-
this.results.addCheck('CLIProxy Port', 'success', undefined, undefined, {
|
|
735
|
-
status: 'OK',
|
|
736
|
-
info: `Port ${cliproxy_1.CLIPROXY_DEFAULT_PORT} free`,
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
else if ((0, port_utils_1.isCLIProxyProcess)(portProcess)) {
|
|
740
|
-
// CLIProxy is running (expected)
|
|
741
|
-
portSpinner.succeed();
|
|
742
|
-
console.log(` ${(0, ui_1.ok)('CLIProxy Port'.padEnd(22))} CLIProxy running (PID ${portProcess.pid})`);
|
|
743
|
-
this.results.addCheck('CLIProxy Port', 'success', undefined, undefined, {
|
|
744
|
-
status: 'OK',
|
|
745
|
-
info: `CLIProxy running (PID ${portProcess.pid})`,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
else {
|
|
749
|
-
// Port conflict - different process
|
|
750
|
-
portSpinner.warn();
|
|
751
|
-
console.log(` ${(0, ui_1.warn)('CLIProxy Port'.padEnd(22))} ${cliproxy_1.CLIPROXY_DEFAULT_PORT} occupied by ${portProcess.processName}`);
|
|
752
|
-
this.results.addCheck('CLIProxy Port', 'warning', `Port ${cliproxy_1.CLIPROXY_DEFAULT_PORT} occupied by ${portProcess.processName} (PID ${portProcess.pid})`, `Kill process: kill ${portProcess.pid} (or restart conflicting application)`, { status: 'WARN', info: `Occupied by ${portProcess.processName}` });
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
62
|
/**
|
|
756
63
|
* Show health check report
|
|
757
64
|
*/
|
|
@@ -824,132 +131,9 @@ class Doctor {
|
|
|
824
131
|
}
|
|
825
132
|
/**
|
|
826
133
|
* Fix detected issues (--fix flag)
|
|
827
|
-
* Fixes:
|
|
828
|
-
* 1. Zombie CLIProxy processes blocking ports
|
|
829
|
-
* 2. Outdated CLIProxy config files
|
|
830
|
-
* 3. Shared symlinks broken by Claude CLI's atomic writes
|
|
831
|
-
* 4. OAuth callback ports blocked by CLIProxy
|
|
832
134
|
*/
|
|
833
135
|
async fixIssues() {
|
|
834
|
-
|
|
835
|
-
console.log((0, ui_1.header)('AUTO-FIX MODE'));
|
|
836
|
-
console.log('');
|
|
837
|
-
console.log((0, ui_1.info)(`Platform: ${(0, platform_commands_1.getPlatformName)()}`));
|
|
838
|
-
console.log('');
|
|
839
|
-
let fixed = 0;
|
|
840
|
-
// Fix 1: Kill zombie CLIProxy processes
|
|
841
|
-
const zombieSpinner = ora('Checking for zombie CLIProxy processes').start();
|
|
842
|
-
try {
|
|
843
|
-
// Check main CLIProxy port
|
|
844
|
-
const portProcess = await (0, port_utils_1.getPortProcess)(cliproxy_1.CLIPROXY_DEFAULT_PORT);
|
|
845
|
-
if (portProcess && (0, port_utils_1.isCLIProxyProcess)(portProcess)) {
|
|
846
|
-
zombieSpinner.text = 'Killing zombie CLIProxy process...';
|
|
847
|
-
const killed = (0, platform_commands_1.killProcessOnPort)(cliproxy_1.CLIPROXY_DEFAULT_PORT, true);
|
|
848
|
-
if (killed) {
|
|
849
|
-
zombieSpinner.succeed(`${(0, ui_1.ok)('Fixed')} Killed zombie CLIProxy on port ${cliproxy_1.CLIPROXY_DEFAULT_PORT}`);
|
|
850
|
-
fixed++;
|
|
851
|
-
}
|
|
852
|
-
else {
|
|
853
|
-
zombieSpinner.warn(`${(0, ui_1.warn)('Partial')} CLIProxy detected but could not kill`);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
else if (portProcess) {
|
|
857
|
-
zombieSpinner.info(`${(0, ui_1.info)('Info')} Port ${cliproxy_1.CLIPROXY_DEFAULT_PORT} used by ${portProcess.processName} (not CLIProxy)`);
|
|
858
|
-
}
|
|
859
|
-
else {
|
|
860
|
-
zombieSpinner.succeed(`${(0, ui_1.ok)('OK')} No zombie CLIProxy processes found`);
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
catch (err) {
|
|
864
|
-
zombieSpinner.fail(`${(0, ui_1.fail)('Error')} Could not check processes: ${err.message}`);
|
|
865
|
-
}
|
|
866
|
-
// Fix 2: Kill CLIProxy processes on OAuth callback ports
|
|
867
|
-
const oauthPorts = [8085, 1455, 51121]; // Gemini, Codex, Agy
|
|
868
|
-
for (const port of oauthPorts) {
|
|
869
|
-
const oauthSpinner = ora(`Checking OAuth port ${port}`).start();
|
|
870
|
-
try {
|
|
871
|
-
const portProcess = await (0, port_utils_1.getPortProcess)(port);
|
|
872
|
-
if (portProcess && (0, port_utils_1.isCLIProxyProcess)(portProcess)) {
|
|
873
|
-
oauthSpinner.text = `Freeing OAuth port ${port}...`;
|
|
874
|
-
const killed = (0, platform_commands_1.killProcessOnPort)(port, true);
|
|
875
|
-
if (killed) {
|
|
876
|
-
oauthSpinner.succeed(`${(0, ui_1.ok)('Fixed')} Freed OAuth port ${port}`);
|
|
877
|
-
fixed++;
|
|
878
|
-
}
|
|
879
|
-
else {
|
|
880
|
-
oauthSpinner.warn(`${(0, ui_1.warn)('Partial')} CLIProxy on port ${port} but could not kill`);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
else if (portProcess) {
|
|
884
|
-
oauthSpinner.info(`${(0, ui_1.info)('Info')} Port ${port} used by ${portProcess.processName} - please close manually`);
|
|
885
|
-
}
|
|
886
|
-
else {
|
|
887
|
-
oauthSpinner.succeed(`${(0, ui_1.ok)('OK')} OAuth port ${port} is free`);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
catch (_err) {
|
|
891
|
-
oauthSpinner.succeed(`${(0, ui_1.ok)('OK')} OAuth port ${port} check passed`);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
// Fix 3: Regenerate outdated CLIProxy config
|
|
895
|
-
const configSpinner = ora('Checking CLIProxy config version').start();
|
|
896
|
-
try {
|
|
897
|
-
if ((0, cliproxy_1.configNeedsRegeneration)()) {
|
|
898
|
-
configSpinner.text = 'Upgrading CLIProxy config...';
|
|
899
|
-
(0, cliproxy_1.regenerateConfig)();
|
|
900
|
-
configSpinner.succeed(`${(0, ui_1.ok)('Fixed')} Upgraded CLIProxy config to v${cliproxy_1.CLIPROXY_CONFIG_VERSION}`);
|
|
901
|
-
fixed++;
|
|
902
|
-
}
|
|
903
|
-
else {
|
|
904
|
-
configSpinner.succeed(`${(0, ui_1.ok)('OK')} CLIProxy config is up to date`);
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
catch (err) {
|
|
908
|
-
configSpinner.fail(`${(0, ui_1.fail)('Error')} Could not upgrade config: ${err.message}`);
|
|
909
|
-
}
|
|
910
|
-
// Fix 4: Fix shared symlinks (settings.json broken by Claude CLI toggle thinking, etc.)
|
|
911
|
-
const symlinkSpinner = ora('Checking shared settings.json symlink').start();
|
|
912
|
-
const sharedSettings = path.join(this.homedir, '.ccs', 'shared', 'settings.json');
|
|
913
|
-
try {
|
|
914
|
-
if (fs.existsSync(sharedSettings)) {
|
|
915
|
-
const stats = fs.lstatSync(sharedSettings);
|
|
916
|
-
if (!stats.isSymbolicLink()) {
|
|
917
|
-
symlinkSpinner.text = 'Restoring shared settings.json symlink...';
|
|
918
|
-
const SharedManagerModule = await Promise.resolve().then(() => __importStar(require('./shared-manager')));
|
|
919
|
-
const SharedManager = SharedManagerModule.default;
|
|
920
|
-
const sharedManager = new SharedManager();
|
|
921
|
-
sharedManager.ensureSharedDirectories();
|
|
922
|
-
symlinkSpinner.succeed(`${(0, ui_1.ok)('Fixed')} Restored shared settings.json symlink`);
|
|
923
|
-
fixed++;
|
|
924
|
-
}
|
|
925
|
-
else {
|
|
926
|
-
symlinkSpinner.succeed(`${(0, ui_1.ok)('OK')} Shared settings.json symlink is valid`);
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
else {
|
|
930
|
-
symlinkSpinner.succeed(`${(0, ui_1.ok)('OK')} Shared settings.json not yet created`);
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
catch (err) {
|
|
934
|
-
symlinkSpinner.fail(`${(0, ui_1.fail)('Error')} Could not fix symlink: ${err.message}`);
|
|
935
|
-
}
|
|
936
|
-
// Summary
|
|
937
|
-
console.log('');
|
|
938
|
-
if (fixed > 0) {
|
|
939
|
-
console.log((0, ui_1.ok)(`Auto-fix complete: ${fixed} issue(s) resolved`));
|
|
940
|
-
console.log('');
|
|
941
|
-
console.log((0, ui_1.info)('Try your command again. If issues persist, run:'));
|
|
942
|
-
console.log(` ${(0, ui_1.color)('ccs doctor', 'command')} - for full diagnostics`);
|
|
943
|
-
}
|
|
944
|
-
else {
|
|
945
|
-
console.log((0, ui_1.ok)('No issues found that needed fixing'));
|
|
946
|
-
console.log('');
|
|
947
|
-
console.log((0, ui_1.info)('If you still have issues:'));
|
|
948
|
-
console.log(` 1. Run ${(0, ui_1.color)('ccs doctor', 'command')} for diagnostics`);
|
|
949
|
-
console.log(` 2. Try ${(0, ui_1.color)('ccs <provider> --auth --verbose', 'command')} for detailed logs`);
|
|
950
|
-
console.log(` 3. Restart your terminal/computer`);
|
|
951
|
-
}
|
|
952
|
-
console.log('');
|
|
136
|
+
await (0, repair_1.runAutoRepair)();
|
|
953
137
|
}
|
|
954
138
|
/**
|
|
955
139
|
* Check if the health check results are healthy
|