azclaude-copilot 0.7.7 → 0.7.9
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 +2 -2
- package/bin/cli.js +12 -11
- package/bin/copilot.js +6 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -637,11 +637,11 @@ AZCLAUDE is a lazy-loaded environment of 48 capability modules. It only loads wh
|
|
|
637
637
|
|
|
638
638
|
## Verified
|
|
639
639
|
|
|
640
|
-
|
|
640
|
+
1999 tests. Every template, command, capability, agent, hook, and CLI feature verified.
|
|
641
641
|
|
|
642
642
|
```bash
|
|
643
643
|
bash tests/test-features.sh
|
|
644
|
-
# Results:
|
|
644
|
+
# Results: 1999 passed, 0 failed, 1999 total
|
|
645
645
|
```
|
|
646
646
|
|
|
647
647
|
---
|
package/bin/cli.js
CHANGED
|
@@ -136,12 +136,11 @@ function substitutePaths(content, cfg) {
|
|
|
136
136
|
return content.replace(/\.claude\//g, `${cfg}/`);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
// Adapt
|
|
139
|
+
// Adapt frontmatter for non-Claude CLIs.
|
|
140
140
|
// Claude Code: keeps all fields as-is.
|
|
141
|
-
// OpenCode: keeps description, strips Claude-specific fields
|
|
141
|
+
// OpenCode: keeps description + mode, strips Claude-specific fields.
|
|
142
142
|
// Codex CLI: keeps description, strips Claude-specific fields.
|
|
143
|
-
|
|
144
|
-
function adaptCommandContent(content, cliName) {
|
|
143
|
+
function adaptFrontmatter(content, cliName) {
|
|
145
144
|
if (cliName === 'Claude Code') return content;
|
|
146
145
|
|
|
147
146
|
// Parse frontmatter
|
|
@@ -152,7 +151,7 @@ function adaptCommandContent(content, cliName) {
|
|
|
152
151
|
const body = fmMatch[2];
|
|
153
152
|
|
|
154
153
|
// Extract description (may be multi-line with >)
|
|
155
|
-
const descMatch = fmBlock.match(/description:\s*>?\s*\n?([\s\S]*?)(?=\n
|
|
154
|
+
const descMatch = fmBlock.match(/description:\s*>?\s*\n?([\s\S]*?)(?=\n[a-z]|\n---|\s*$)/);
|
|
156
155
|
const descSimple = fmBlock.match(/description:\s*"?([^"\n]+)"?\s*$/m);
|
|
157
156
|
let description = '';
|
|
158
157
|
if (descMatch) {
|
|
@@ -161,7 +160,7 @@ function adaptCommandContent(content, cliName) {
|
|
|
161
160
|
description = descSimple[1].trim();
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
// For OpenCode / Codex: rebuild frontmatter with only supported fields
|
|
163
|
+
// For OpenCode / Codex: rebuild frontmatter with only universally supported fields
|
|
165
164
|
const newFm = description ? `---\ndescription: ${description}\n---` : '---\n---';
|
|
166
165
|
return `${newFm}\n${body}`;
|
|
167
166
|
}
|
|
@@ -426,7 +425,7 @@ function installCommands(projectDir, cfg, cliName) {
|
|
|
426
425
|
if (!fs.existsSync(dst)) {
|
|
427
426
|
let content = fs.readFileSync(src, 'utf8');
|
|
428
427
|
content = substitutePaths(content, cfg);
|
|
429
|
-
content =
|
|
428
|
+
content = adaptFrontmatter(content, cliName || 'Claude Code');
|
|
430
429
|
fs.writeFileSync(dst, content);
|
|
431
430
|
ok(`/${cmd} installed`);
|
|
432
431
|
} else if (forceUpdate) {
|
|
@@ -563,7 +562,7 @@ function installStatusline(projectDir, cfg) {
|
|
|
563
562
|
|
|
564
563
|
const AGENTS = ['orchestrator-init', 'code-reviewer', 'test-writer', 'loop-controller', 'cc-template-author', 'cc-cli-integrator', 'cc-test-maintainer', 'orchestrator', 'problem-architect', 'milestone-builder', 'security-auditor', 'spec-reviewer', 'constitution-guard', 'devops-engineer', 'qa-engineer'];
|
|
565
564
|
|
|
566
|
-
function installAgents(projectDir, cfg) {
|
|
565
|
+
function installAgents(projectDir, cfg, cliName) {
|
|
567
566
|
const agentsDir = path.join(projectDir, cfg, 'agents');
|
|
568
567
|
fs.mkdirSync(agentsDir, { recursive: true });
|
|
569
568
|
|
|
@@ -572,11 +571,13 @@ function installAgents(projectDir, cfg) {
|
|
|
572
571
|
const dst = path.join(agentsDir, `${agent}.md`);
|
|
573
572
|
if (!fs.existsSync(src)) continue;
|
|
574
573
|
if (!fs.existsSync(dst)) {
|
|
575
|
-
|
|
574
|
+
let content = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
|
|
575
|
+
content = adaptFrontmatter(content, cliName || 'Claude Code');
|
|
576
576
|
fs.writeFileSync(dst, content);
|
|
577
577
|
ok(`${agent} agent installed`);
|
|
578
578
|
} else if (forceUpdate) {
|
|
579
|
-
|
|
579
|
+
let srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
|
|
580
|
+
srcContent = adaptFrontmatter(srcContent, cliName || 'Claude Code');
|
|
580
581
|
const dstContent = fs.readFileSync(dst, 'utf8');
|
|
581
582
|
if (srcContent !== dstContent) {
|
|
582
583
|
fs.writeFileSync(dst, srcContent);
|
|
@@ -1333,7 +1334,7 @@ installSkills(projectDir, cli.cfg);
|
|
|
1333
1334
|
installScripts(projectDir, cli.cfg);
|
|
1334
1335
|
installVisualizer(projectDir, cli.cfg);
|
|
1335
1336
|
installStatusline(projectDir, cli.cfg);
|
|
1336
|
-
installAgents(projectDir, cli.cfg);
|
|
1337
|
+
installAgents(projectDir, cli.cfg, cli.name);
|
|
1337
1338
|
installRulesFile(projectDir, cli.cfg, cli.rulesFile);
|
|
1338
1339
|
createDirectories(projectDir, cli.cfg);
|
|
1339
1340
|
ensureSharedSkillsDir();
|
package/bin/copilot.js
CHANGED
|
@@ -27,19 +27,14 @@ const args = process.argv.slice(2);
|
|
|
27
27
|
// Catch `npx azclaude-copilot setup` and similar — run the installer instead
|
|
28
28
|
// Also: no arguments at all → run installer (auto-detect install vs upgrade)
|
|
29
29
|
const SUBCOMMANDS = ['setup', 'init', 'install', 'doctor', 'upgrade'];
|
|
30
|
-
const CLI_FLAGS = ['--update', '--full', '--audit'];
|
|
30
|
+
const CLI_FLAGS = ['--update', '--full', '--audit', '--cli'];
|
|
31
31
|
const noArgs = args.length === 0 || (args.length === 1 && CLI_FLAGS.includes(args[0]));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const subDir = path.resolve(subPositional[0] || '.');
|
|
36
|
-
if (!noArgs) console.log(`\n Running AZCLAUDE installer on ${subDir}...${subFlags.length ? ' (' + subFlags.join(' ') + ')' : ''}\n`);
|
|
32
|
+
// --cli <value> means "install for this CLI" — route to installer
|
|
33
|
+
const hasCliFlag = args.includes('--cli');
|
|
34
|
+
if (noArgs || hasCliFlag || (args[0] && SUBCOMMANDS.includes(args[0].toLowerCase()))) {
|
|
37
35
|
const cliPath = path.join(__dirname, 'cli.js');
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
? [cliPath, subDir, '--doctor', ...subFlags]
|
|
41
|
-
: [cliPath, subDir, ...subFlags];
|
|
42
|
-
const r = spawnSync('node', subArgs, { cwd: subDir, stdio: 'inherit' });
|
|
36
|
+
// Pass all args through to cli.js — it handles --cli stripping internally
|
|
37
|
+
const r = spawnSync('node', [cliPath, ...args], { cwd: process.cwd(), stdio: 'inherit' });
|
|
43
38
|
process.exit(r.status || 0);
|
|
44
39
|
}
|
|
45
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azclaude-copilot",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "AI coding environment — 40 commands, 10 skills, 15 agents, real-time visualizer, memory, reflexes, evolution. Install: npx azclaude-copilot@latest, then open Claude Code.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"azclaude": "bin/cli.js",
|