feat(cli): add agent inspect command
Add the `paseo agent inspect <id>` command that shows detailed information about an agent: - Id, name, provider, model, status, mode, cwd - Creation timestamp - Token usage (input, output, cached, cost) - Capabilities (streaming, persistence, dynamic modes, MCP servers) - Available modes - Pending permissions count - Parent agent ID The default output is YAML-like key-value pairs. Use `--format json` or `--format yaml` for machine-readable output with the full agent snapshot. Supports agent ID prefix matching.
This commit is contained in:
@@ -4,6 +4,7 @@ import { runRunCommand } from './run.js'
|
||||
import { runSendCommand } from './send.js'
|
||||
import { runStopCommand } from './stop.js'
|
||||
import { runModeCommand } from './mode.js'
|
||||
import { runInspectCommand } from './inspect.js'
|
||||
import { withOutput } from '../../output/index.js'
|
||||
|
||||
export function createAgentCommand(): Command {
|
||||
@@ -57,5 +58,12 @@ export function createAgentCommand(): Command {
|
||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||
.action(withOutput(runModeCommand))
|
||||
|
||||
agent
|
||||
.command('inspect')
|
||||
.description('Show detailed information about an agent')
|
||||
.argument('<id>', 'Agent ID (or prefix)')
|
||||
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
|
||||
.action(withOutput(runInspectCommand))
|
||||
|
||||
return agent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user