claude-code-kanban 3.0.0-rc.1 → 3.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.
Files changed (2) hide show
  1. package/install.js +40 -7
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -7,10 +7,12 @@ const readline = require('readline');
7
7
  const { execSync } = require('child_process');
8
8
 
9
9
  const CLAUDE_DIR = path.join(os.homedir(), '.claude');
10
+ const CCK_DIR = path.join(CLAUDE_DIR, '.cck');
10
11
  const HOOKS_DIR = path.join(CLAUDE_DIR, 'hooks');
11
12
  const SETTINGS_PATH = path.join(CLAUDE_DIR, 'settings.json');
12
- const PLUGIN_DIR = path.join(__dirname, 'plugin');
13
- const CTX_SCRIPT_SRC = path.join(PLUGIN_DIR, 'plugins', 'claude-code-kanban', 'scripts', 'context-status.sh');
13
+ const PLUGIN_SRC = path.join(__dirname, 'plugin');
14
+ const PLUGIN_DEST = path.join(CCK_DIR, 'plugin');
15
+ const CTX_SCRIPT_SRC = path.join(PLUGIN_SRC, 'plugins', 'claude-code-kanban', 'scripts', 'context-status.sh');
14
16
  const CTX_SCRIPT_DEST = path.join(HOOKS_DIR, 'context-status.sh');
15
17
 
16
18
  // ANSI helpers
@@ -47,6 +49,20 @@ function copyScript(src, dest) {
47
49
  try { fs.chmodSync(dest, 0o755); } catch {}
48
50
  }
49
51
 
52
+ function copyDirSync(src, dest) {
53
+ fs.mkdirSync(dest, { recursive: true });
54
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
55
+ const srcPath = path.join(src, entry.name);
56
+ const destPath = path.join(dest, entry.name);
57
+ if (entry.isDirectory()) {
58
+ copyDirSync(srcPath, destPath);
59
+ } else {
60
+ fs.copyFileSync(srcPath, destPath);
61
+ try { fs.chmodSync(destPath, 0o755); } catch {}
62
+ }
63
+ }
64
+ }
65
+
50
66
  async function runInstall() {
51
67
  console.log(`\n ${bold('claude-code-kanban')} — Plugin & StatusLine installer\n`);
52
68
 
@@ -69,11 +85,20 @@ async function runInstall() {
69
85
  console.log(yellow('⚠ not found — hook scripts require jq for JSON parsing'));
70
86
  }
71
87
 
72
- // 2. Register marketplace & install plugin via Claude CLI
73
- console.log(`\n Plugin: ${dim(PLUGIN_DIR)}`);
88
+ // 2. Copy plugin to stable location & register marketplace
89
+ console.log(`\n Plugin: ${dim(PLUGIN_DEST)}`);
74
90
  if (await prompt(` Install claude-code-kanban plugin? [Y/n] `)) {
91
+ process.stdout.write(' Copying plugin to ~/.claude/.cck/plugin... ');
92
+ try {
93
+ if (fs.existsSync(PLUGIN_DEST)) fs.rmSync(PLUGIN_DEST, { recursive: true, force: true });
94
+ copyDirSync(PLUGIN_SRC, PLUGIN_DEST);
95
+ console.log(green('✓'));
96
+ } catch (e) {
97
+ console.log(red(`✗ ${e.message}`));
98
+ }
99
+
75
100
  process.stdout.write(' Registering marketplace... ');
76
- const mkt = runCLI(`claude plugin marketplace add "${PLUGIN_DIR}"`, ['already', 'exists']);
101
+ const mkt = runCLI(`claude plugin marketplace add "${PLUGIN_DEST}"`, ['already', 'exists']);
77
102
  if (mkt.ok) {
78
103
  console.log(green(mkt.idempotent ? '✓ already registered' : '✓'));
79
104
  } else {
@@ -181,7 +206,15 @@ async function runUninstall() {
181
206
  console.log(yellow(`⚠ ${rmMkt.error}`));
182
207
  }
183
208
 
184
- // 3. Remove context-status.sh copy
209
+ // 3. Remove plugin copy
210
+ if (fs.existsSync(PLUGIN_DEST)) {
211
+ fs.rmSync(PLUGIN_DEST, { recursive: true, force: true });
212
+ console.log(` Plugin copy: ${green('✓')} Removed`);
213
+ } else {
214
+ console.log(` Plugin copy: ${dim('Not found')}`);
215
+ }
216
+
217
+ // 4. Remove context-status.sh copy
185
218
  if (fs.existsSync(CTX_SCRIPT_DEST)) {
186
219
  fs.unlinkSync(CTX_SCRIPT_DEST);
187
220
  console.log(` Context spy: ${green('✓')} Removed`);
@@ -189,7 +222,7 @@ async function runUninstall() {
189
222
  console.log(` Context spy: ${dim('Not found')}`);
190
223
  }
191
224
 
192
- // 4. Clean up settings.json (statusLine)
225
+ // 5. Clean up settings.json (statusLine)
193
226
  if (fs.existsSync(SETTINGS_PATH)) {
194
227
  try {
195
228
  const settings = JSON.parse(fs.readFileSync(SETTINGS_PATH, 'utf8'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-kanban",
3
- "version": "3.0.0-rc.1",
3
+ "version": "3.0.0",
4
4
  "description": "A web-based Kanban board for viewing Claude Code tasks with agent teams support",
5
5
  "main": "server.js",
6
6
  "bin": {