# Schemas: contracts/chatAttachment

> T3 Code · channel `nightly` · v0.1.15-nightly.20261205.5786 @ [`be521199aace`](https://github.com/pingdotgg/t3code/tree/be521199aace1a0b446f4db4a1181ef994aaa1e2) · 2026-12-05 · generated by Everdoc from source (no LLM).

14 entries.

<a id="schema-chatattachment"></a>

## `ChatAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:201](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L201-L205)
- Shape: `ChatImageAttachment | ChatFileAttachment | ChatUnknownAttachment`

<a id="schema-chatattachmentid"></a>

## `ChatAttachmentId`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:34](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L34-L37)
- Shape: `TrimmedNonEmptyString`

<a id="schema-chatfileattachment"></a>

## `ChatFileAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:161](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L161-L172)
- Shape: `{ type: "file"; id: ChatAttachmentId; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt; source?: PastedTextAttachmentSource }`

<a id="schema-chatimageattachment"></a>

## `ChatImageAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:148](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L148-L155)
- Shape: `{ type: "image"; id: ChatAttachmentId; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt; source?: SnapShotSource }`

<a id="schema-chatunknownattachment"></a>

## `ChatUnknownAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:176](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L176-L185)
- Shape: `{ type: TrimmedNonEmptyString; id: ChatAttachmentId; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt }`

<a id="schema-pastedtextattachmentsource"></a>

## `PastedTextAttachmentSource`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:158](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L158)
- Shape: `{ _tag: "pasted-text" }`

<a id="schema-persistchatattachmentserror"></a>

## `PersistChatAttachmentsError`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:242](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L242-L248)
- Shape: `{ _tag: "PersistChatAttachmentsError"; message: string; cause?: unknown }`

<a id="schema-persistchatattachmentsinput"></a>

## `PersistChatAttachmentsInput`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:230](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L230-L234)
- Shape: `{ threadId: makeEntityId; messageId: makeEntityId; attachments: UploadChatAttachment[] }`

<a id="schema-persistchatattachmentsresult"></a>

## `PersistChatAttachmentsResult`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:237](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L237-L239)
- Shape: `{ attachments: ChatAttachment[] }`

<a id="schema-snapshotaccessibility"></a>

## `SnapShotAccessibility`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:108](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L108-L126)
- Shape: `{ format: "flat-text"; text: TrimmedNonEmptyString; truncated: boolean } | { format: "element-tree"; coordinateSpace: "captured-image"; imageSize: { width: PositiveInt; height: PositiveInt }; truncated: boolean; root: SnapShotAccessibilityNode }`

<a id="schema-snapshotaccessibilitynode"></a>

## `SnapShotAccessibilityNode`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:74](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L74-L91)
- Shape: `{ role: TrimmedNonEmptyString; name?: TrimmedNonEmptyString; value?: TrimmedNonEmptyString; description?: TrimmedNonEmptyString; bounds: { x: NonNegativeInt; y: NonNegativeInt; width: PositiveInt; height: PositiveInt } | null; state?: { active?: boolean; busy?: boolean; checked?: "on" | "off" | "mixed"; editable?: boolean; enabled?: boolean; expanded?: boolean; focused?: boolean; selected?: boolean; visible?: boolean }; actions?: Schema.mutable; children: Schema.mutable }`

<a id="schema-snapshotsource"></a>

## `SnapShotSource`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:129](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L129-L145)
- Shape: `{ kind: "snap-shot"; capturedAt: string; appName: TrimmedNonEmptyString; windowTitle: TrimmedString; accessibleText?: TrimmedNonEmptyString; accessibility?: SnapShotAccessibility; appIdentifier?: TrimmedNonEmptyString; appIconDataUrl?: TrimmedNonEmptyString }`

<a id="schema-uploadchatattachment"></a>

## `UploadChatAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:227](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L227)
- Shape: `UploadChatImageAttachment`

<a id="schema-uploadchatimageattachment"></a>

## `UploadChatImageAttachment`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/chatAttachment.ts:188](https://github.com/pingdotgg/t3code/blob/be521199aace1a0b446f4db4a1181ef994aaa1e2/packages/contracts/src/chatAttachment.ts#L188-L198)
- Shape: `{ id?: ChatAttachmentId; type: "image"; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt; dataUrl: TrimmedNonEmptyString; source?: SnapShotSource }`
