Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit ffe73ad

Browse files
authored
fix(artifacts): mark uploaded deliverables as agent output
Generated-By: PostHog Code Task-Id: 45da9f78-5b15-4cfe-a8a5-9afcbd6b4755
1 parent 7889dfe commit ffe73ad

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/agent/src/adapters/local-tools/tools/upload-artifact.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ describe("uploadArtifactTool", () => {
6767

6868
expect(result.isError).toBeUndefined();
6969
expect(prepareTaskArtifactUploads).toHaveBeenCalledWith("task-1", "run-1", [
70-
{ name: "report.csv", type: "output", size: 7, content_type: "text/csv" },
70+
{
71+
name: "report.csv",
72+
type: "output",
73+
source: "agent_output",
74+
size: 7,
75+
content_type: "text/csv",
76+
},
7177
]);
7278
expect(fetch).toHaveBeenCalledWith(
7379
"https://storage.example/upload",
@@ -80,6 +86,7 @@ describe("uploadArtifactTool", () => {
8086
expect.objectContaining({
8187
id: "artifact-1",
8288
type: "output",
89+
source: "agent_output",
8390
storage_path: "tasks/artifacts/report.csv",
8491
}),
8592
],

packages/agent/src/adapters/local-tools/tools/upload-artifact.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const uploadArtifactTool = defineLocalTool({
7474
{
7575
name,
7676
type: "output",
77+
source: "agent_output",
7778
size: fileStat.size,
7879
content_type: contentType,
7980
},
@@ -111,6 +112,7 @@ export const uploadArtifactTool = defineLocalTool({
111112
id: upload.id,
112113
name,
113114
type: "output",
115+
source: "agent_output",
114116
storage_path: upload.storage_path,
115117
content_type: contentType,
116118
},

0 commit comments

Comments
 (0)