feat(cli): add agent mode command

Add the `paseo agent mode` command for changing and listing agent
operational modes. Supports setting a mode or listing available modes
with the --list flag.

Usage:
  paseo agent mode <id> <mode>     # Set mode
  paseo agent mode --list <id>     # List available modes
This commit is contained in:
Mohamed Boudra
2026-01-28 23:41:14 +07:00
parent d78c7d5e07
commit f96a4ee3df
3 changed files with 305 additions and 0 deletions
+10
View File
@@ -3,6 +3,7 @@ import { runPsCommand } from './ps.js'
import { runRunCommand } from './run.js'
import { runSendCommand } from './send.js'
import { runStopCommand } from './stop.js'
import { runModeCommand } from './mode.js'
import { withOutput } from '../../output/index.js'
export function createAgentCommand(): Command {
@@ -47,5 +48,14 @@ export function createAgentCommand(): Command {
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
.action(withOutput(runStopCommand))
agent
.command('mode')
.description("Change an agent's operational mode")
.argument('<id>', 'Agent ID (or prefix)')
.argument('[mode]', 'Mode to set (required unless --list)')
.option('--list', 'List available modes for this agent')
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
.action(withOutput(runModeCommand))
return agent
}