(
sessionDir: string,
params: {
childTaskId: string;
updatedAtMs: number;
parentWorkspaceId?: string;
workflowOwnedAncestorWorkspaceIds?: string[];
title?: string;
}
)
| 13 | const WORKSPACE_ID = "workspace-reports-test"; |
| 14 | |
| 15 | async function writeTaskReport( |
| 16 | sessionDir: string, |
| 17 | params: { |
| 18 | childTaskId: string; |
| 19 | updatedAtMs: number; |
| 20 | parentWorkspaceId?: string; |
| 21 | workflowOwnedAncestorWorkspaceIds?: string[]; |
| 22 | title?: string; |
| 23 | } |
| 24 | ): Promise<void> { |
| 25 | await upsertSubagentReportArtifact({ |
| 26 | workspaceId: WORKSPACE_ID, |
| 27 | workspaceSessionDir: sessionDir, |
| 28 | childTaskId: params.childTaskId, |
| 29 | parentWorkspaceId: params.parentWorkspaceId ?? WORKSPACE_ID, |
| 30 | ancestorWorkspaceIds: [params.parentWorkspaceId ?? WORKSPACE_ID], |
| 31 | reportMarkdown: "# Report\n\nSome findings.", |
| 32 | ...(params.workflowOwnedAncestorWorkspaceIds |
| 33 | ? { workflowOwnedAncestorWorkspaceIds: params.workflowOwnedAncestorWorkspaceIds } |
| 34 | : {}), |
| 35 | ...(params.title !== undefined ? { title: params.title } : {}), |
| 36 | nowMs: params.updatedAtMs, |
| 37 | }); |
| 38 | } |
| 39 | |
| 40 | async function writeWorkflowRun( |
| 41 | sessionDir: string, |
no test coverage detected