feat(cli): add agent logs command

Add `paseo agent logs <id>` command to view agent activity/timeline.

Features:
- View agent timeline entries (messages, tool calls, errors)
- `-f, --follow` flag for real-time streaming
- `--tail <n>` to limit entries shown
- Proper formatting of different timeline item types
This commit is contained in:
Mohamed Boudra
2026-01-28 23:46:13 +07:00
parent 74fceed9b5
commit 7d4636ecff
3 changed files with 556 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 { runLogsCommand } from './logs.js'
import { runModeCommand } from './mode.js'
import { runInspectCommand } from './inspect.js'
import { withOutput } from '../../output/index.js'
@@ -58,6 +59,15 @@ export function createAgentCommand(): Command {
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
.action(withOutput(runModeCommand))
agent
.command('logs')
.description('View agent activity/timeline')
.argument('<id>', 'Agent ID (or prefix)')
.option('-f, --follow', 'Follow log output (streaming)')
.option('--tail <n>', 'Show last n entries')
.option('--host <host>', 'Daemon host:port (default: localhost:6767)')
.action(withOutput(runLogsCommand))
agent
.command('inspect')
.description('Show detailed information about an agent')