Register agent deliverables as file objects so they appear on the Files page

This commit is contained in:
ZacharyZhang-NY committed 2026-05-29 23:31:53 -04:00
1 parent e7fa60d6b6
commit 54ad9d1909
4 files changed
+264 -139

No files matched your search

@@ -94,6 +94,13 @@ describe("autonomous bootstrap run", () => {
expect(existsSync(deliverable)).toBe(true);
expect(readFileSync(deliverable, "utf8")).toContain("OrbitOps Operating Plan");
// The deliverable is registered as a file object owned by the writing agent,
// so it appears on the Files page (previously it only existed on disk).
const ceo = state.agents.find((a) => a.orgId === orgId && a.name === "CEO");
const planFile = state.files.find((f) => f.orgId === orgId && f.name === "operating-plan.md");
expect(planFile).toBeTruthy();
expect(planFile).toMatchObject({ ownerType: "agent", ownerId: ceo?.id, kind: "md", scanState: "approved" });
const run = state.taskRuns.find((r) => r.id === claimed!.id);
expect(run?.state).toBe("completed");