mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-05 07:54:38 +00:00
* Add metrics collection and terminal performance tests * feat: add loop, schedule, and chat commands with slash-namespaced RPC Introduce three new server-side features with CLI command groups: - `paseo loop` — iterative agent execution with verify-check/verify-prompt - `paseo schedule` — recurring tasks on interval or cron cadence - `paseo chat` — chat rooms for agent-to-agent coordination All features use new slash-namespaced RPC methods (e.g. `loop/run`, `schedule/create`, `chat/post`) instead of flat message types, backed by file-based persistence and wired through the existing WebSocket session dispatch. * test: stabilize loop schedule chat rollout
28 lines
929 B
TypeScript
28 lines
929 B
TypeScript
import type { Command } from "commander";
|
|
import type { ListResult } from "../../output/index.js";
|
|
import { scheduleLogSchema, toScheduleLogRow, type ScheduleLogRow } from "./schema.js";
|
|
import { connectScheduleClient, toScheduleCommandError, type ScheduleCommandOptions } from "./shared.js";
|
|
|
|
export async function runLogsCommand(
|
|
id: string,
|
|
options: ScheduleCommandOptions,
|
|
_command: Command,
|
|
): Promise<ListResult<ScheduleLogRow>> {
|
|
const { client } = await connectScheduleClient(options.host);
|
|
try {
|
|
const payload = await client.scheduleLogs({ id });
|
|
if (payload.error) {
|
|
throw new Error(payload.error);
|
|
}
|
|
return {
|
|
type: "list",
|
|
data: payload.runs.map(toScheduleLogRow),
|
|
schema: scheduleLogSchema,
|
|
};
|
|
} catch (error) {
|
|
throw toScheduleCommandError("SCHEDULE_LOGS_FAILED", "read schedule logs", error);
|
|
} finally {
|
|
await client.close().catch(() => {});
|
|
}
|
|
}
|