export class TaskService {
    state;
    constructor(state) {
        this.state = state;
    }
    listForRun(runId) {
        return this.state.listTasks(runId);
    }
    summarize(runId) {
        const tasks = this.listForRun(runId);
        if (tasks.length === 0)
            return "no tasks";
        return tasks.map((task) => `${task.status}:${task.agent}`).join(", ");
    }
}
