azclaude-copilot 0.1.6 → 0.1.8

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/bin/cli.js +20 -9
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -79,6 +79,18 @@ function detectCLI() {
79
79
  if (forced) return forced;
80
80
  }
81
81
 
82
+ // 0b. If project already has a .claude/ or .opencode/ etc, prefer that CLI
83
+ const projectDir = path.resolve(process.argv[2] || '.');
84
+ for (const cli of CLI_TABLE) {
85
+ const existingCfg = path.join(projectDir, cli.cfg);
86
+ if (fs.existsSync(existingCfg) && fs.statSync(existingCfg).isDirectory()) {
87
+ // Check it has commands or settings (not just an empty dir)
88
+ const hasContent = fs.existsSync(path.join(existingCfg, 'commands'))
89
+ || fs.existsSync(path.join(existingCfg, 'settings.local.json'));
90
+ if (hasContent) return cli;
91
+ }
92
+ }
93
+
82
94
  // 1. Check executable in PATH
83
95
  for (const cli of CLI_TABLE) {
84
96
  try {
@@ -295,17 +307,16 @@ function installCapabilities(projectDir, cfg, full) {
295
307
  const dst = path.join(projectDir, cfg, 'capabilities');
296
308
 
297
309
  if (fs.existsSync(dst)) {
298
- // If upgrading to --full, install missing dirs
299
- if (full) {
300
- for (const dir of FULL_CAP_DIRS) {
301
- const dstSub = path.join(dst, dir);
302
- if (!fs.existsSync(dstSub)) {
303
- copyDir(path.join(src, dir), dstSub);
304
- ok(`${dir}/ capabilities added (--full)`);
305
- }
310
+ // Always install missing core dirs (e.g. evolution/ added in v0.1.6)
311
+ const dirs = full ? FULL_CAP_DIRS : CORE_CAP_DIRS;
312
+ for (const dir of dirs) {
313
+ const dstSub = path.join(dst, dir);
314
+ if (!fs.existsSync(dstSub)) {
315
+ copyDir(path.join(src, dir), dstSub);
316
+ ok(`${dir}/ capabilities added`);
306
317
  }
307
318
  }
308
- ok('Capabilities already installed checked');
319
+ ok('Capabilities verifiedall dirs present');
309
320
  return;
310
321
  }
311
322
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Autonomous product builder. Describe once, AZCLAUDE builds it across sessions — planning, implementing, testing, evolving, deploying. Zero human input.",
5
5
  "bin": {
6
6
  "azclaude": "./bin/cli.js",