import { Command } from "commander"; import { connectToDaemon } from "../../utils/client.js"; import { waitForStop } from "../../utils/wait-for-stop.js"; import type { CommandError, CommandOptions } from "../../output/index.js"; import { fetchProjectedTimelineItems, LIVE_HISTORY_FETCH_TIMEOUT_MS, } from "../../utils/timeline.js"; import type { DaemonClient } from "@getpaseo/client/internal/daemon-client"; import type { AgentTimelineItem } from "@getpaseo/protocol/agent-types"; import { curateAgentActivity } from "@getpaseo/server/agent-activity"; export function addLogsOptions(cmd: Command): Command { return cmd .description("View agent activity/timeline") .argument("", "Agent ID (or prefix)") .option("-f, --follow", "Follow log output (streaming)") .option("--tail ", "Show last n entries") .option("--filter ", "Filter by event type (tools, text, errors, permissions)") .option("--since