feat: add agent delete command and bulk tab close operations
This commit is contained in:
+12
-1
@@ -13,6 +13,7 @@ import { runDaemonUpdateCommandOrExit } from './commands/daemon/update.js'
|
||||
import { runLsCommand } from './commands/agent/ls.js'
|
||||
import { runRunCommand } from './commands/agent/run.js'
|
||||
import { runLogsCommand } from './commands/agent/logs.js'
|
||||
import { runDeleteCommand } from './commands/agent/delete.js'
|
||||
import { runStopCommand } from './commands/agent/stop.js'
|
||||
import { runSendCommand } from './commands/agent/send.js'
|
||||
import { runInspectCommand } from './commands/agent/inspect.js'
|
||||
@@ -108,7 +109,7 @@ export function createCli(): Command {
|
||||
|
||||
program
|
||||
.command('stop')
|
||||
.description('Stop an agent (cancel if running, then terminate)')
|
||||
.description('Interrupt an agent if it is running (no-op for idle agents)')
|
||||
.argument('[id]', 'Agent ID (or prefix) - optional if --all or --cwd specified')
|
||||
.option('--all', 'Stop all agents')
|
||||
.option('--cwd <path>', 'Stop all agents in directory')
|
||||
@@ -116,6 +117,16 @@ export function createCli(): Command {
|
||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||
.action(withOutput(runStopCommand))
|
||||
|
||||
program
|
||||
.command('delete')
|
||||
.description('Delete an agent (interrupt if running, then hard-delete)')
|
||||
.argument('[id]', 'Agent ID (or prefix) - optional if --all or --cwd specified')
|
||||
.option('--all', 'Delete all agents')
|
||||
.option('--cwd <path>', 'Delete all agents in directory')
|
||||
.option('--json', 'Output in JSON format')
|
||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||
.action(withOutput(runDeleteCommand))
|
||||
|
||||
program
|
||||
.command('send')
|
||||
.description('Send a message/task to an existing agent')
|
||||
|
||||
Reference in New Issue
Block a user