From bdcdd6acc4068a63c006fff411e5d21a64c62f31 Mon Sep 17 00:00:00 2001 From: "Kai (Tam Nhu) Tran" <61256810+kaitranntt@users.noreply.github.com> Date: Sun, 16 Nov 2025 20:31:53 -0500 Subject: [PATCH] fix(doctor): resolve delegation check false positive (v4.1.3) (#9) The 'ccs doctor' command was incorrectly checking for delegation commands in ~/.ccs/shared/commands/ccs/ instead of ~/.ccs/.claude/commands/ccs/, causing false "not installed" warnings even after successful installation. Changes: - Fix delegation check to look in correct directory (~/.ccs/.claude/) - Remove check for non-existent create.md file - Bump version to 4.1.3 --- VERSION | 2 +- bin/management/doctor.js | 15 +++++---------- installers/install.ps1 | 2 +- installers/install.sh | 2 +- lib/ccs | 2 +- lib/ccs.ps1 | 2 +- package.json | 2 +- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/VERSION b/VERSION index 4d0dcda0..de197cc3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.2 +4.1.3 diff --git a/bin/management/doctor.js b/bin/management/doctor.js index 4d8a949e..60af017b 100644 --- a/bin/management/doctor.js +++ b/bin/management/doctor.js @@ -276,17 +276,12 @@ class Doctor { checkDelegation() { process.stdout.write('[?] Checking delegation... '); - // Check if delegation-rules.json exists - const delegationRulesPath = path.join(this.ccsDir, 'delegation-rules.json'); - const hasDelegationRules = fs.existsSync(delegationRulesPath); + // Check if delegation commands exist in ~/.ccs/.claude/commands/ccs/ + const ccsClaudeCommandsDir = path.join(this.ccsDir, '.claude', 'commands', 'ccs'); + const hasGlmCommand = fs.existsSync(path.join(ccsClaudeCommandsDir, 'glm.md')); + const hasKimiCommand = fs.existsSync(path.join(ccsClaudeCommandsDir, 'kimi.md')); - // Check if delegation commands exist - const sharedCommandsDir = path.join(this.ccsDir, 'shared', 'commands', 'ccs'); - const hasGlmCommand = fs.existsSync(path.join(sharedCommandsDir, 'glm.md')); - const hasKimiCommand = fs.existsSync(path.join(sharedCommandsDir, 'kimi.md')); - const hasCreateCommand = fs.existsSync(path.join(sharedCommandsDir, 'create.md')); - - if (!hasGlmCommand || !hasKimiCommand || !hasCreateCommand) { + if (!hasGlmCommand || !hasKimiCommand) { console.log(colored('[!]', 'yellow'), '(not installed)'); this.results.addCheck( 'Delegation', diff --git a/installers/install.ps1 b/installers/install.ps1 index febcdd05..9e306584 100644 --- a/installers/install.ps1 +++ b/installers/install.ps1 @@ -31,7 +31,7 @@ $InstallMethod = if ($ScriptDir -and ((Test-Path "$ScriptDir\lib\ccs.ps1") -or ( # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (irm | iex) # For git installations, VERSION file is read if available -$CcsVersion = "4.1.2" +$CcsVersion = "4.1.3" # Try to read VERSION file for git installations if ($ScriptDir) { diff --git a/installers/install.sh b/installers/install.sh index f4d5c961..3c79d054 100755 --- a/installers/install.sh +++ b/installers/install.sh @@ -32,7 +32,7 @@ fi # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (curl | bash) # For git installations, VERSION file is read if available -CCS_VERSION="4.1.2" +CCS_VERSION="4.1.3" # Try to read VERSION file for git installations if [[ -f "$SCRIPT_DIR/VERSION" ]]; then diff --git a/lib/ccs b/lib/ccs index eed3999f..8114fa15 100755 --- a/lib/ccs +++ b/lib/ccs @@ -2,7 +2,7 @@ set -euo pipefail # Version (updated by scripts/bump-version.sh) -CCS_VERSION="4.1.2" +CCS_VERSION="4.1.3" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}" readonly PROFILES_JSON="$HOME/.ccs/profiles.json" diff --git a/lib/ccs.ps1 b/lib/ccs.ps1 index 725a254d..2ba84c95 100644 --- a/lib/ccs.ps1 +++ b/lib/ccs.ps1 @@ -12,7 +12,7 @@ param( $ErrorActionPreference = "Stop" # Version (updated by scripts/bump-version.sh) -$CcsVersion = "4.1.2" +$CcsVersion = "4.1.3" $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" } $ProfilesJson = "$env:USERPROFILE\.ccs\profiles.json" diff --git a/package.json b/package.json index 20dc3b33..dcc61b66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kaitranntt/ccs", - "version": "4.1.2", + "version": "4.1.3", "description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6", "keywords": [ "cli",