import { Command } from 'commander' import { runPsCommand } from './ps.js' import { withOutput } from '../../output/index.js' export function createAgentCommand(): Command { const agent = new Command('agent').description('Manage agents') agent .command('ps') .description('List agents') .option('-a, --all', 'include archived agents') .option('--status ', 'filter by status (running, idle, error)') .option('--cwd ', 'filter by working directory') .option('--host ', 'Daemon host:port (default: localhost:6767)') .action(withOutput(runPsCommand)) return agent }