From f714a39a46cedec06b7724bea216bef64b71dc57 Mon Sep 17 00:00:00 2001 From: Rohit Ghumare <48523873+rohitg00@users.noreply.github.com> Date: Tue, 7 Apr 2026 12:27:37 +0100 Subject: [PATCH] fix: add deprecation warning when --agents is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit generate.ts and manifest.ts now warn when --agents (deprecated) is used instead of --agent. Message: "Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)" Findings 3 (scan.ts stderr) and 4 (translate.ts stderr) skipped: error() from onboarding goes to stdout via clack — this is the standard pattern across all migrated commands. Changing individual commands would break consistency. --- packages/cli/src/commands/generate.ts | 3 +++ packages/cli/src/commands/manifest.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/cli/src/commands/generate.ts b/packages/cli/src/commands/generate.ts index e9702aa8..a3337dde 100644 --- a/packages/cli/src/commands/generate.ts +++ b/packages/cli/src/commands/generate.ts @@ -536,6 +536,9 @@ ${trustScore.warnings.length > 0 ? `\nWarnings:\n${trustScore.warnings.map((w) = let targetAgents: string[]; if (this.agents) { + if (process.argv.includes('--agents')) { + console.warn('Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)'); + } targetAgents = this.agents.split(',').map((a) => a.trim()); } else { const agentOptions = [ diff --git a/packages/cli/src/commands/manifest.ts b/packages/cli/src/commands/manifest.ts index ab1a4af2..5d9ba071 100644 --- a/packages/cli/src/commands/manifest.ts +++ b/packages/cli/src/commands/manifest.ts @@ -159,6 +159,9 @@ export class ManifestAddCommand extends Command { } if (this.agents) { + if (process.argv.includes('--agents')) { + console.warn('Warning: --agents is deprecated, use --agent instead (--agents will be removed in v2.0)'); + } options.agents = this.agents.split(',').map(s => s.trim()); }