azclaude-copilot 0.7.8 → 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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +12 -11
  3. 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
- 1998 tests. Every template, command, capability, agent, hook, and CLI feature verified.
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: 1998 passed, 0 failed, 1998 total
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 command frontmatter for non-Claude CLIs.
139
+ // Adapt frontmatter for non-Claude CLIs.
140
140
  // Claude Code: keeps all fields as-is.
141
- // OpenCode: keeps description, strips Claude-specific fields (allowed-tools, disable-model-invocation, argument-hint).
141
+ // OpenCode: keeps description + mode, strips Claude-specific fields.
142
142
  // Codex CLI: keeps description, strips Claude-specific fields.
143
- // Gemini CLI: converts to TOML format (handled separately in installCommandsGemini).
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\w|\n---|\s*$)/);
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 = adaptCommandContent(content, cliName || 'Claude Code');
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
- const content = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
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
- const srcContent = substitutePaths(fs.readFileSync(src, 'utf8'), cfg);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azclaude-copilot",
3
- "version": "0.7.8",
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",