| 1 | import { ChatFileAttachment, ChatImageAttachment } from "@t3tools/contracts"; |
| 2 | import * as Schema from "effect/Schema"; |
| 3 | import * as Struct from "effect/Struct"; |
| 4 | |
| 5 | // Screenshot provenance is app-owned. Existing attachments recover it from stored |
| 6 | // metadata; exposing its recursive accessibility tree breaks model tool schemas. |
| 7 | export const McpAttachmentInput = Schema.Union([ |
| 8 | ChatImageAttachment.mapFields(Struct.omit(["source"])), |
| 9 | ChatFileAttachment, |
| 10 | ]); |