Files
openclaw/src/tasks/task-status-access.ts
Val Alexander a102f4dede fix(gateway): harden artifact RPCs
Add Gateway artifact RPCs and SDK helpers for list/get/download, with transcript provenance checks, safer download source handling, task/run/session coverage, generated protocol models, docs, and the refreshed generated config schema baseline.

Closes #74706.
Refs #74898, #74769, #74804, #74786.
2026-04-30 19:35:48 -05:00

23 lines
738 B
TypeScript

import { getTaskById, listTasksForAgentId, listTasksForSessionKey } from "./task-registry.js";
import type { TaskRecord } from "./task-registry.types.js";
export function getTaskSessionLookupByIdForStatus(
taskId: string,
): Pick<TaskRecord, "requesterSessionKey" | "runId"> | undefined {
const task = getTaskById(taskId);
return task
? {
requesterSessionKey: task.requesterSessionKey,
...(task.runId ? { runId: task.runId } : {}),
}
: undefined;
}
export function listTasksForSessionKeyForStatus(sessionKey: string): TaskRecord[] {
return listTasksForSessionKey(sessionKey);
}
export function listTasksForAgentIdForStatus(agentId: string): TaskRecord[] {
return listTasksForAgentId(agentId);
}