@kaitranntt/ccs 4.3.6 → 4.3.7
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/VERSION +1 -1
- package/bin/utils/claude-dir-installer.js +10 -2
- package/bin/utils/claude-symlink-manager.js +10 -2
- package/lib/ccs +9 -5
- package/lib/ccs.ps1 +11 -5
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.3.
|
|
1
|
+
4.3.7
|
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const os = require('os');
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
// Make ora optional (might not be available during npm install postinstall)
|
|
9
|
+
let ora = null;
|
|
10
|
+
try {
|
|
11
|
+
ora = require('ora');
|
|
12
|
+
} catch (e) {
|
|
13
|
+
// ora not available, will use console.log instead
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
const { colored } = require('./helpers');
|
|
9
17
|
|
|
10
18
|
/**
|
|
@@ -23,7 +31,7 @@ class ClaudeDirInstaller {
|
|
|
23
31
|
* @param {boolean} silent - Suppress spinner output
|
|
24
32
|
*/
|
|
25
33
|
install(packageDir, silent = false) {
|
|
26
|
-
const spinner = silent ? null : ora('Copying .claude/ items to ~/.ccs/.claude/').start();
|
|
34
|
+
const spinner = (silent || !ora) ? null : ora('Copying .claude/ items to ~/.ccs/.claude/').start();
|
|
27
35
|
|
|
28
36
|
try {
|
|
29
37
|
// Auto-detect package directory if not provided
|
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
// Make ora optional (might not be available during npm install postinstall)
|
|
8
|
+
let ora = null;
|
|
9
|
+
try {
|
|
10
|
+
ora = require('ora');
|
|
11
|
+
} catch (e) {
|
|
12
|
+
// ora not available, will use console.log instead
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
const { colored } = require('./helpers');
|
|
8
16
|
|
|
9
17
|
/**
|
|
@@ -37,7 +45,7 @@ class ClaudeSymlinkManager {
|
|
|
37
45
|
* Safe: backs up existing files before creating symlinks
|
|
38
46
|
*/
|
|
39
47
|
install(silent = false) {
|
|
40
|
-
const spinner = silent ? null : ora('Installing CCS items to ~/.claude/').start();
|
|
48
|
+
const spinner = (silent || !ora) ? null : ora('Installing CCS items to ~/.claude/').start();
|
|
41
49
|
|
|
42
50
|
// Ensure ~/.ccs/.claude/ exists (should be shipped with package)
|
|
43
51
|
if (!fs.existsSync(this.ccsClaudeDir)) {
|
package/lib/ccs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
# Version (updated by scripts/bump-version.sh)
|
|
5
|
-
CCS_VERSION="4.3.
|
|
5
|
+
CCS_VERSION="4.3.7"
|
|
6
6
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
7
|
readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}"
|
|
8
8
|
readonly PROFILES_JSON="$HOME/.ccs/profiles.json"
|
|
@@ -981,10 +981,10 @@ link_shared_directories() {
|
|
|
981
981
|
local shared_dir="$HOME/.ccs/shared"
|
|
982
982
|
|
|
983
983
|
# Ensure shared directories exist
|
|
984
|
-
mkdir -p "$shared_dir"/{commands,skills,agents}
|
|
984
|
+
mkdir -p "$shared_dir"/{commands,skills,agents,plugins}
|
|
985
985
|
|
|
986
986
|
# Create symlinks (remove existing first if present)
|
|
987
|
-
for dir in commands skills agents; do
|
|
987
|
+
for dir in commands skills agents plugins; do
|
|
988
988
|
local link_path="$instance_path/$dir"
|
|
989
989
|
local target_path="$shared_dir/$dir"
|
|
990
990
|
|
|
@@ -1003,7 +1003,7 @@ migrate_to_shared_structure() {
|
|
|
1003
1003
|
# Check if migration is needed (shared dirs exist but are empty)
|
|
1004
1004
|
if [[ -d "$shared_dir" ]]; then
|
|
1005
1005
|
local needs_migration=false
|
|
1006
|
-
for dir in commands skills agents; do
|
|
1006
|
+
for dir in commands skills agents plugins; do
|
|
1007
1007
|
if [[ ! -d "$shared_dir/$dir" ]] || [[ -z "$(ls -A "$shared_dir/$dir" 2>/dev/null)" ]]; then
|
|
1008
1008
|
needs_migration=true
|
|
1009
1009
|
break
|
|
@@ -1014,7 +1014,7 @@ migrate_to_shared_structure() {
|
|
|
1014
1014
|
fi
|
|
1015
1015
|
|
|
1016
1016
|
# Create shared directory
|
|
1017
|
-
mkdir -p "$shared_dir"/{commands,skills,agents}
|
|
1017
|
+
mkdir -p "$shared_dir"/{commands,skills,agents,plugins}
|
|
1018
1018
|
|
|
1019
1019
|
# Copy from ~/.claude/ (actual Claude CLI directory)
|
|
1020
1020
|
local claude_dir="$HOME/.claude"
|
|
@@ -1031,6 +1031,10 @@ migrate_to_shared_structure() {
|
|
|
1031
1031
|
# Copy agents to shared (if exists)
|
|
1032
1032
|
[[ -d "$claude_dir/agents" ]] && \
|
|
1033
1033
|
cp -r "$claude_dir/agents"/* "$shared_dir/agents/" 2>/dev/null || true
|
|
1034
|
+
|
|
1035
|
+
# Copy plugins to shared (if exists)
|
|
1036
|
+
[[ -d "$claude_dir/plugins" ]] && \
|
|
1037
|
+
cp -r "$claude_dir/plugins"/* "$shared_dir/plugins/" 2>/dev/null || true
|
|
1034
1038
|
fi
|
|
1035
1039
|
|
|
1036
1040
|
# Update all instances to use symlinks
|
package/lib/ccs.ps1
CHANGED
|
@@ -12,7 +12,7 @@ param(
|
|
|
12
12
|
$ErrorActionPreference = "Stop"
|
|
13
13
|
|
|
14
14
|
# Version (updated by scripts/bump-version.sh)
|
|
15
|
-
$CcsVersion = "4.3.
|
|
15
|
+
$CcsVersion = "4.3.7"
|
|
16
16
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
17
17
|
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
|
|
18
18
|
$ProfilesJson = "$env:USERPROFILE\.ccs\profiles.json"
|
|
@@ -659,7 +659,7 @@ function Link-SharedDirectories {
|
|
|
659
659
|
$SharedDir = "$env:USERPROFILE\.ccs\shared"
|
|
660
660
|
|
|
661
661
|
# Ensure shared directories exist
|
|
662
|
-
@('commands', 'skills', 'agents') | ForEach-Object {
|
|
662
|
+
@('commands', 'skills', 'agents', 'plugins') | ForEach-Object {
|
|
663
663
|
$Dir = Join-Path $SharedDir $_
|
|
664
664
|
if (-not (Test-Path $Dir)) {
|
|
665
665
|
New-Item -ItemType Directory -Path $Dir -Force | Out-Null
|
|
@@ -667,7 +667,7 @@ function Link-SharedDirectories {
|
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
# Create symlinks (requires Windows Developer Mode or admin)
|
|
670
|
-
@('commands', 'skills', 'agents') | ForEach-Object {
|
|
670
|
+
@('commands', 'skills', 'agents', 'plugins') | ForEach-Object {
|
|
671
671
|
$LinkPath = Join-Path $InstancePath $_
|
|
672
672
|
$TargetPath = Join-Path $SharedDir $_
|
|
673
673
|
|
|
@@ -693,7 +693,7 @@ function Migrate-SharedStructure {
|
|
|
693
693
|
# Check if migration is needed (shared dirs exist but are empty)
|
|
694
694
|
if (Test-Path $SharedDir) {
|
|
695
695
|
$NeedsMigration = $false
|
|
696
|
-
foreach ($Dir in @('commands', 'skills', 'agents')) {
|
|
696
|
+
foreach ($Dir in @('commands', 'skills', 'agents', 'plugins')) {
|
|
697
697
|
$DirPath = Join-Path $SharedDir $Dir
|
|
698
698
|
if (-not (Test-Path $DirPath) -or (Get-ChildItem $DirPath -ErrorAction SilentlyContinue).Count -eq 0) {
|
|
699
699
|
$NeedsMigration = $true
|
|
@@ -705,7 +705,7 @@ function Migrate-SharedStructure {
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
# Create shared directory
|
|
708
|
-
@('commands', 'skills', 'agents') | ForEach-Object {
|
|
708
|
+
@('commands', 'skills', 'agents', 'plugins') | ForEach-Object {
|
|
709
709
|
$Dir = Join-Path $SharedDir $_
|
|
710
710
|
New-Item -ItemType Directory -Path $Dir -Force | Out-Null
|
|
711
711
|
}
|
|
@@ -731,6 +731,12 @@ function Migrate-SharedStructure {
|
|
|
731
731
|
if (Test-Path $AgentsPath) {
|
|
732
732
|
Copy-Item "$AgentsPath\*" -Destination "$SharedDir\agents\" -Recurse -ErrorAction SilentlyContinue
|
|
733
733
|
}
|
|
734
|
+
|
|
735
|
+
# Copy plugins to shared (if exists)
|
|
736
|
+
$PluginsPath = Join-Path $ClaudeDir "plugins"
|
|
737
|
+
if (Test-Path $PluginsPath) {
|
|
738
|
+
Copy-Item "$PluginsPath\*" -Destination "$SharedDir\plugins\" -Recurse -ErrorAction SilentlyContinue
|
|
739
|
+
}
|
|
734
740
|
}
|
|
735
741
|
|
|
736
742
|
# Update all instances to use symlinks
|