azclaude-copilot 0.3.1 → 0.3.3
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 +3 -3
- package/bin/cli.js +30 -4
- package/bin/copilot.js +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -430,7 +430,7 @@ azclaude-copilot/
|
|
|
430
430
|
├── DOCS.md <- full user guide
|
|
431
431
|
├── SECURITY.md <- security policy + architecture
|
|
432
432
|
├── tests/
|
|
433
|
-
│ └── test-features.sh ←
|
|
433
|
+
│ └── test-features.sh ← 1058 tests
|
|
434
434
|
```
|
|
435
435
|
|
|
436
436
|
---
|
|
@@ -456,11 +456,11 @@ The runner is stateless. These files ARE the state.
|
|
|
456
456
|
|
|
457
457
|
## Verified
|
|
458
458
|
|
|
459
|
-
|
|
459
|
+
1058 tests. Every template, command, capability, agent, and CLI feature verified.
|
|
460
460
|
|
|
461
461
|
```bash
|
|
462
462
|
bash tests/test-features.sh
|
|
463
|
-
# Results:
|
|
463
|
+
# Results: 1058 passed, 0 failed, 1058 total
|
|
464
464
|
```
|
|
465
465
|
|
|
466
466
|
---
|
package/bin/cli.js
CHANGED
|
@@ -341,11 +341,20 @@ function installCommands(projectDir, cfg) {
|
|
|
341
341
|
for (const cmd of COMMANDS) {
|
|
342
342
|
const src = path.join(TEMPLATE_DIR, 'commands', `${cmd}.md`);
|
|
343
343
|
const dst = path.join(commandsDir, `${cmd}.md`);
|
|
344
|
-
if (!fs.existsSync(
|
|
344
|
+
if (!fs.existsSync(src)) continue;
|
|
345
|
+
if (!fs.existsSync(dst)) {
|
|
345
346
|
fs.copyFileSync(src, dst);
|
|
346
347
|
ok(`/${cmd} installed`);
|
|
347
|
-
} else if (
|
|
348
|
-
|
|
348
|
+
} else if (forceUpdate) {
|
|
349
|
+
// --update: overwrite with latest template
|
|
350
|
+
const srcContent = fs.readFileSync(src, 'utf8');
|
|
351
|
+
const dstContent = fs.readFileSync(dst, 'utf8');
|
|
352
|
+
if (srcContent !== dstContent) {
|
|
353
|
+
fs.copyFileSync(src, dst);
|
|
354
|
+
ok(`/${cmd} updated (--update)`);
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
info(`/${cmd} already exists — skipping (use --update to refresh)`);
|
|
349
358
|
}
|
|
350
359
|
}
|
|
351
360
|
}
|
|
@@ -374,6 +383,13 @@ function installSkills(projectDir, cfg) {
|
|
|
374
383
|
if (fs.existsSync(subSrc)) copyDir(subSrc, path.join(dstDir, sub));
|
|
375
384
|
}
|
|
376
385
|
ok(`${skill} skill installed (auto-invoked by model)`);
|
|
386
|
+
} else if (forceUpdate && fs.existsSync(src)) {
|
|
387
|
+
const srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
|
|
388
|
+
const dstContent = fs.readFileSync(dst, 'utf8');
|
|
389
|
+
if (srcContent !== dstContent) {
|
|
390
|
+
fs.writeFileSync(dst, srcContent);
|
|
391
|
+
ok(`${skill} skill updated (--update)`);
|
|
392
|
+
}
|
|
377
393
|
} else if (fs.existsSync(dst)) {
|
|
378
394
|
info(`${skill} skill already exists — skipping`);
|
|
379
395
|
}
|
|
@@ -409,10 +425,18 @@ function installAgents(projectDir, cfg) {
|
|
|
409
425
|
for (const agent of AGENTS) {
|
|
410
426
|
const src = path.join(TEMPLATE_DIR, 'agents', `${agent}.md`);
|
|
411
427
|
const dst = path.join(agentsDir, `${agent}.md`);
|
|
412
|
-
if (!fs.existsSync(
|
|
428
|
+
if (!fs.existsSync(src)) continue;
|
|
429
|
+
if (!fs.existsSync(dst)) {
|
|
413
430
|
const content = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
|
|
414
431
|
fs.writeFileSync(dst, content);
|
|
415
432
|
ok(`${agent} agent installed`);
|
|
433
|
+
} else if (forceUpdate) {
|
|
434
|
+
const srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
|
|
435
|
+
const dstContent = fs.readFileSync(dst, 'utf8');
|
|
436
|
+
if (srcContent !== dstContent) {
|
|
437
|
+
fs.writeFileSync(dst, srcContent);
|
|
438
|
+
ok(`${agent} agent updated (--update)`);
|
|
439
|
+
}
|
|
416
440
|
}
|
|
417
441
|
}
|
|
418
442
|
}
|
|
@@ -1018,12 +1042,14 @@ if (process.argv[2] === 'copilot') {
|
|
|
1018
1042
|
}
|
|
1019
1043
|
|
|
1020
1044
|
const fullInstall = process.argv.includes('--full');
|
|
1045
|
+
const forceUpdate = process.argv.includes('--update');
|
|
1021
1046
|
const projectDir = process.cwd();
|
|
1022
1047
|
const cli = detectCLI();
|
|
1023
1048
|
|
|
1024
1049
|
console.log('\n════════════════════════════════════════════════');
|
|
1025
1050
|
console.log(' AZCLAUDE — AI Coding Environment');
|
|
1026
1051
|
console.log(` CLI: ${cli.name} → installing to ${cli.cfg}/`);
|
|
1052
|
+
if (forceUpdate) console.log(' Mode: --update (refreshing all templates)');
|
|
1027
1053
|
console.log('════════════════════════════════════════════════\n');
|
|
1028
1054
|
|
|
1029
1055
|
// ── Detect conflicting installations ─────────────────────────────────────────
|
package/bin/copilot.js
CHANGED
|
@@ -25,13 +25,16 @@ const args = process.argv.slice(2);
|
|
|
25
25
|
// ── Subcommand routing ──────────────────────────────────────────────────────
|
|
26
26
|
// Catch `npx azclaude-copilot setup` and similar — run the installer instead
|
|
27
27
|
const SUBCOMMANDS = ['setup', 'init', 'install', 'doctor'];
|
|
28
|
+
const CLI_FLAGS = ['--update', '--full', '--audit'];
|
|
28
29
|
if (args[0] && SUBCOMMANDS.includes(args[0].toLowerCase())) {
|
|
29
|
-
const
|
|
30
|
-
|
|
30
|
+
const subFlags = args.filter(a => CLI_FLAGS.includes(a));
|
|
31
|
+
const subPositional = args.slice(1).filter(a => !CLI_FLAGS.includes(a));
|
|
32
|
+
const subDir = path.resolve(subPositional[0] || '.');
|
|
33
|
+
console.log(`\n Running AZCLAUDE installer on ${subDir}...${subFlags.length ? ' (' + subFlags.join(' ') + ')' : ''}\n`);
|
|
31
34
|
const cliPath = path.join(__dirname, 'cli.js');
|
|
32
35
|
const subArgs = args[0].toLowerCase() === 'doctor'
|
|
33
|
-
? [cliPath, subDir, '--doctor']
|
|
34
|
-
: [cliPath, subDir];
|
|
36
|
+
? [cliPath, subDir, '--doctor', ...subFlags]
|
|
37
|
+
: [cliPath, subDir, ...subFlags];
|
|
35
38
|
const r = spawnSync('node', subArgs, { cwd: subDir, stdio: 'inherit' });
|
|
36
39
|
process.exit(r.status || 0);
|
|
37
40
|
}
|
package/package.json
CHANGED