mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 01:10:43 +00:00
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.
23 lines
738 B
TypeScript
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);
|
|
}
|