Support video issue attachments

This commit is contained in:
Dotta
2026-05-30 18:01:22 +00:00
parent 911a1e8b0d
commit 75f88c588c
12 changed files with 262 additions and 11 deletions
@@ -0,0 +1,19 @@
import { describe, expect, it } from "vitest";
import { attachmentArtifactWorkProductMetadataSchema } from "./work-product.js";
describe("attachmentArtifactWorkProductMetadataSchema", () => {
it("accepts the attachment-backed artifact metadata contract", () => {
const parsed = attachmentArtifactWorkProductMetadataSchema.parse({
attachmentId: "11111111-1111-4111-8111-111111111111",
contentType: "video/mp4",
byteSize: 1234,
contentPath: "/api/attachments/11111111-1111-4111-8111-111111111111/content",
openPath: "/api/attachments/11111111-1111-4111-8111-111111111111/content",
downloadPath: "/api/attachments/11111111-1111-4111-8111-111111111111/content?download=1",
originalFilename: "demo.mp4",
});
expect(parsed.contentType).toBe("video/mp4");
expect(parsed.downloadPath).toContain("download=1");
});
});