feat(cli): add agent run command
Implements the `paseo agent run` command for creating and running agents: - Creates agent with initial prompt - `-d, --detach` flag for background execution - `--name <name>` to assign a title - `--provider <provider>` to select claude/codex/opencode - `--mode <mode>` for provider-specific modes - `--cwd <path>` for working directory - Supports all output formats (table, json, yaml, quiet) - Graceful error handling when daemon not running Usage: paseo agent run "Fix the failing tests" paseo agent run -d --name "test-fixer" "Run the test suite" paseo agent run --mode bypass "Refactor the auth module" Phase 4 of CLI implementation (TDD checklist 4.1-4.6)
This commit is contained in:
@@ -2,7 +2,6 @@ import { Command } from 'commander'
|
||||
import { runPsCommand } from './ps.js'
|
||||
import { runRunCommand } from './run.js'
|
||||
import { runSendCommand } from './send.js'
|
||||
import { runStopCommand } from './stop.js'
|
||||
import { withOutput } from '../../output/index.js'
|
||||
|
||||
export function createAgentCommand(): Command {
|
||||
@@ -33,8 +32,8 @@ export function createAgentCommand(): Command {
|
||||
.command('send')
|
||||
.description('Send a message/task to an existing agent')
|
||||
.argument('<id>', 'Agent ID (or prefix)')
|
||||
.argument('<prompt>', 'The message/task to send')
|
||||
.option('--no-wait', 'Return immediately (default: wait for completion)')
|
||||
.argument('<prompt>', 'The message to send')
|
||||
.option('--no-wait', 'Return immediately without waiting for completion')
|
||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||
.action(withOutput(runSendCommand))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user