clavix 5.7.1 → 5.8.1

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.
@@ -11,7 +11,6 @@ export default class Init extends Command {
11
11
  private generateConfig;
12
12
  private generateInstructions;
13
13
  private generateSlashCommands;
14
- private handleLegacyCommands;
15
14
  private injectDocumentation;
16
15
  private extractClavixBlock;
17
16
  private generateQuickstart;
@@ -17,7 +17,6 @@ import { DEFAULT_CONFIG } from '../../types/config.js';
17
17
  import { GeminiAdapter } from '../../core/adapters/gemini-adapter.js';
18
18
  import { QwenAdapter } from '../../core/adapters/qwen-adapter.js';
19
19
  import { loadCommandTemplates } from '../../utils/template-loader.js';
20
- import { collectLegacyCommandFiles } from '../../utils/legacy-command-cleanup.js';
21
20
  import { CLAVIX_BLOCK_START, CLAVIX_BLOCK_END } from '../../constants.js';
22
21
  import { validateUserConfig } from '../../utils/schemas.js';
23
22
  export default class Init extends Command {
@@ -274,7 +273,6 @@ export default class Init extends Command {
274
273
  }
275
274
  // Generate slash commands
276
275
  const generatedTemplates = await this.generateSlashCommands(adapter);
277
- await this.handleLegacyCommands(adapter, generatedTemplates);
278
276
  if (adapter.name === 'gemini' || adapter.name === 'qwen') {
279
277
  const commandPath = adapter.getCommandPath();
280
278
  const isNamespaced = commandPath.endsWith(path.join('commands', 'clavix'));
@@ -379,16 +377,7 @@ export default class Init extends Command {
379
377
  this.log(chalk.gray(` Removed ${removed} existing command(s)`));
380
378
  }
381
379
  // Generate slash commands
382
- const templates = await this.generateSlashCommands(adapter);
383
- // Handle legacy command cleanup (silent in update mode)
384
- const commandNames = templates.map((template) => template.name);
385
- const legacyFiles = await collectLegacyCommandFiles(adapter, commandNames);
386
- if (legacyFiles.length > 0) {
387
- for (const file of legacyFiles) {
388
- await FileSystem.remove(file);
389
- }
390
- this.log(chalk.gray(` Cleaned ${legacyFiles.length} legacy file(s)`));
391
- }
380
+ await this.generateSlashCommands(adapter);
392
381
  // Re-inject documentation blocks (Claude Code only)
393
382
  if (integrationName === 'claude-code') {
394
383
  this.log(chalk.gray(' ✓ Updating CLAUDE.md documentation...'));
@@ -543,36 +532,6 @@ To reconfigure integrations, run \`clavix init\` again.
543
532
  await adapter.generateCommands(templates);
544
533
  return templates;
545
534
  }
546
- async handleLegacyCommands(adapter, templates) {
547
- const commandNames = templates.map((template) => template.name);
548
- const legacyFiles = await collectLegacyCommandFiles(adapter, commandNames);
549
- if (legacyFiles.length === 0) {
550
- return;
551
- }
552
- const relativePaths = legacyFiles
553
- .map((file) => path.relative(process.cwd(), file))
554
- .sort((a, b) => a.localeCompare(b));
555
- this.log(chalk.gray(` ⚠ Found ${relativePaths.length} deprecated command file(s):`));
556
- for (const file of relativePaths) {
557
- this.log(chalk.gray(` • ${file}`));
558
- }
559
- const { removeLegacy } = await inquirer.prompt([
560
- {
561
- type: 'confirm',
562
- name: 'removeLegacy',
563
- message: `Remove deprecated files for ${adapter.displayName}? Functionality is unchanged; filenames are being standardized.`,
564
- default: true,
565
- },
566
- ]);
567
- if (!removeLegacy) {
568
- this.log(chalk.gray(' ⊗ Kept legacy files (deprecated naming retained)'));
569
- return;
570
- }
571
- for (const file of legacyFiles) {
572
- await FileSystem.remove(file);
573
- this.log(chalk.gray(` ✓ Removed ${path.relative(process.cwd(), file)}`));
574
- }
575
- }
576
535
  async injectDocumentation(adapter) {
577
536
  // Inject AGENTS.md
578
537
  const agentsContent = DocInjector.getDefaultAgentsContent();
@@ -10,7 +10,6 @@ export default class Update extends Command {
10
10
  run(): Promise<void>;
11
11
  private updateDocumentation;
12
12
  private updateCommands;
13
- private handleLegacyCommands;
14
13
  private getAgentsContent;
15
14
  private getClaudeContent;
16
15
  private hasUpToDateBlock;
@@ -1,6 +1,5 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
2
  import chalk from 'chalk';
3
- import inquirer from 'inquirer';
4
3
  import fs from 'fs-extra';
5
4
  import * as path from 'path';
6
5
  import { DocInjector } from '../../core/doc-injector.js';
@@ -9,7 +8,6 @@ import { AgentsMdGenerator } from '../../core/adapters/agents-md-generator.js';
9
8
  import { OctoMdGenerator } from '../../core/adapters/octo-md-generator.js';
10
9
  import { WarpMdGenerator } from '../../core/adapters/warp-md-generator.js';
11
10
  import { InstructionsGenerator } from '../../core/adapters/instructions-generator.js';
12
- import { collectLegacyCommandFiles } from '../../utils/legacy-command-cleanup.js';
13
11
  import { CLAVIX_BLOCK_START, CLAVIX_BLOCK_END } from '../../constants.js';
14
12
  import { validateUserConfig, formatZodErrors } from '../../utils/schemas.js';
15
13
  export default class Update extends Command {
@@ -187,7 +185,7 @@ export default class Update extends Command {
187
185
  }
188
186
  return updated;
189
187
  }
190
- async updateCommands(adapter, force) {
188
+ async updateCommands(adapter, _force) {
191
189
  this.log(chalk.cyan(`\n🔧 Updating slash commands for ${adapter.displayName}...`));
192
190
  // Remove all existing commands first (force regeneration)
193
191
  const removed = await adapter.removeAllCommands();
@@ -204,47 +202,7 @@ export default class Update extends Command {
204
202
  // Generate fresh commands from templates
205
203
  await adapter.generateCommands(templates);
206
204
  this.log(chalk.gray(` ✓ Generated ${templates.length} command(s)`));
207
- // Handle legacy commands (cleanup old naming patterns)
208
- const commandNames = templates.map((t) => t.name);
209
- const legacyRemoved = await this.handleLegacyCommands(adapter, commandNames, force);
210
- return removed + templates.length + legacyRemoved;
211
- }
212
- async handleLegacyCommands(adapter, commandNames, force) {
213
- if (commandNames.length === 0) {
214
- return 0;
215
- }
216
- const legacyFiles = await collectLegacyCommandFiles(adapter, commandNames);
217
- if (legacyFiles.length === 0) {
218
- return 0;
219
- }
220
- const relativePaths = legacyFiles
221
- .map((file) => path.relative(process.cwd(), file))
222
- .sort((a, b) => a.localeCompare(b));
223
- this.log(chalk.gray(` ⚠ Found ${relativePaths.length} deprecated command file(s):`));
224
- for (const file of relativePaths) {
225
- this.log(chalk.gray(` • ${file}`));
226
- }
227
- if (!force) {
228
- const { removeLegacy } = await inquirer.prompt([
229
- {
230
- type: 'confirm',
231
- name: 'removeLegacy',
232
- message: `Remove deprecated files for ${adapter.displayName}? Functionality is unchanged; filenames are being standardized.`,
233
- default: true,
234
- },
235
- ]);
236
- if (!removeLegacy) {
237
- this.log(chalk.gray(' ⊗ Kept legacy files (deprecated naming retained)'));
238
- return 0;
239
- }
240
- }
241
- let removed = 0;
242
- for (const file of legacyFiles) {
243
- await fs.remove(file);
244
- this.log(chalk.gray(` ✓ Removed ${path.relative(process.cwd(), file)}`));
245
- removed++;
246
- }
247
- return removed;
205
+ return removed + templates.length;
248
206
  }
249
207
  getAgentsContent() {
250
208
  return `## Clavix Integration
@@ -7,17 +7,4 @@ import type { AgentAdapter, CommandTemplate } from '../../../types/agent.js';
7
7
  * Returns the generated templates
8
8
  */
9
9
  export declare function generateSlashCommands(adapter: AgentAdapter): Promise<CommandTemplate[]>;
10
- /**
11
- * Collect and optionally remove legacy command files
12
- * Returns paths of legacy files found
13
- */
14
- export declare function collectLegacyFiles(adapter: AgentAdapter, templates: CommandTemplate[]): Promise<string[]>;
15
- /**
16
- * Remove legacy command files
17
- */
18
- export declare function removeLegacyFiles(files: string[]): Promise<void>;
19
- /**
20
- * Get relative paths for legacy files (for display)
21
- */
22
- export declare function getLegacyRelativePaths(files: string[]): string[];
23
10
  //# sourceMappingURL=commands.d.ts.map
@@ -1,10 +1,7 @@
1
1
  /**
2
2
  * Slash command generation for Clavix initialization
3
3
  */
4
- import * as path from 'path';
5
- import { FileSystem } from '../../../utils/file-system.js';
6
4
  import { loadCommandTemplates } from '../../../utils/template-loader.js';
7
- import { collectLegacyCommandFiles } from '../../../utils/legacy-command-cleanup.js';
8
5
  /**
9
6
  * Generate slash commands for an adapter
10
7
  * Returns the generated templates
@@ -14,26 +11,4 @@ export async function generateSlashCommands(adapter) {
14
11
  await adapter.generateCommands(templates);
15
12
  return templates;
16
13
  }
17
- /**
18
- * Collect and optionally remove legacy command files
19
- * Returns paths of legacy files found
20
- */
21
- export async function collectLegacyFiles(adapter, templates) {
22
- const commandNames = templates.map((template) => template.name);
23
- return collectLegacyCommandFiles(adapter, commandNames);
24
- }
25
- /**
26
- * Remove legacy command files
27
- */
28
- export async function removeLegacyFiles(files) {
29
- for (const file of files) {
30
- await FileSystem.remove(file);
31
- }
32
- }
33
- /**
34
- * Get relative paths for legacy files (for display)
35
- */
36
- export function getLegacyRelativePaths(files) {
37
- return files.map((file) => path.relative(process.cwd(), file)).sort((a, b) => a.localeCompare(b));
38
- }
39
14
  //# sourceMappingURL=commands.js.map
@@ -274,11 +274,14 @@ Result: Project permanently deleted
274
274
 
275
275
  ---
276
276
 
277
- ## Agent Transparency (v5.7.1)
277
+ ## Agent Transparency (v5.8.1)
278
278
 
279
279
  ### Agent Manual (Universal Protocols)
280
280
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
281
281
 
282
+ ### Workflow State Detection
283
+ {{INCLUDE:agent-protocols/state-awareness.md}}
284
+
282
285
  ### CLI Reference
283
286
  {{INCLUDE:agent-protocols/cli-reference.md}}
284
287
 
@@ -524,7 +524,7 @@ I'll explain what's wrong and what you might need to do:
524
524
 
525
525
  ---
526
526
 
527
- ## Agent Transparency (v5.7.1)
527
+ ## Agent Transparency (v5.8.1)
528
528
 
529
529
  ### Agent Manual (Universal Protocols)
530
530
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -522,7 +522,7 @@ Wait for the user to decide what to do next.
522
522
 
523
523
  ---
524
524
 
525
- ## Agent Transparency (v5.7.1)
525
+ ## Agent Transparency (v5.8.1)
526
526
 
527
527
  ### Agent Manual (Universal Protocols)
528
528
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}