# Schemas: contracts/composerContext

> T3 Code · channel `stable` · v0.1.14 @ [`c0eed7328db2`](https://github.com/pingdotgg/t3code/tree/c0eed7328db2609e5a535be704e90638aef1c111) · 2026-12-05 · generated by Everdoc from source (no LLM).

22 entries.

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

## `ComposerContextId`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:53](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L53-L56)
- Shape: `TrimmedNonEmptyString`

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

## `ComposerContextKind`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:65](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L65-L67)
- Shape: `TrimmedNonEmptyString`

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

## `ComposerContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:298](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L298-L301)
- Shape: `UnknownContextRecord`

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

## `ComposerContextReferenceId`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:59](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L59-L62)
- Shape: `TrimmedNonEmptyString`

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

## `ElementContextDetails`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:140](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L140-L149)
- Shape: `{ pageUrl: BoundedString; pageTitle: BoundedString | null; tagName: TrimmedNonEmptyString; selector: BoundedString | null; htmlPreview: BoundedString; componentName: BoundedString | null; source: ElementContextSource | null; styles: BoundedString }`

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

## `ElementContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:152](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L152-L156)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "element" }`

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

## `ElementContextSource`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:132](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L132-L137)
- Shape: `{ functionName: BoundedString | null; fileName: BoundedString | null; lineNumber: NonNegativeInt | null; columnNumber: NonNegativeInt | null }`

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

## `EnvironmentContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:232](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L232-L236)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "environment"; environmentId: makeEntityId }`

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

## `FileContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:114](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L114-L118)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "file"; attachmentId: TrimmedNonEmptyString; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt }`

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

## `GuestMessageAttribution`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:311](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L311-L317)
- Shape: `{ guestMessageId: makeEntityId; name: TrimmedNonEmptyString; text: string; shareId?: makeEntityId }`

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

## `ImageContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:106](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L106-L111)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "image"; attachmentId: TrimmedNonEmptyString; name: TrimmedNonEmptyString; mimeType: TrimmedNonEmptyString; sizeBytes: NonNegativeInt; source?: SnapShotSource }`

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

## `KnownComposerContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:283](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L283-L295)
- Shape: `ImageContextRecord | FileContextRecord | TerminalContextRecord | ElementContextRecord | PreviewAnnotationContextRecord | ReviewCommentContextRecord | MentionContextRecord | SkillContextRecord | ThreadContextRecord | EnvironmentContextRecord | ResponseContextRecord`

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

## `MentionContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:204](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L204-L208)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "mention"; path: string }`

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

## `OrchestrationMessageContext`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:321](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L321-L341)
- Shape: `{ version: 1; guest?: GuestMessageAttribution; records: unknown[] }`

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

## `PreviewAnnotationContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:160](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L160-L185)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "preview-annotation"; annotationId: BoundedString; pageUrl: BoundedString; pageTitle: BoundedString | null; comment: BoundedString; targetSummary: BoundedString; styleChanges: BoundedString[]; elements?: ElementContextDetails[]; elementIds?: BoundedString[]; regionCount?: NonNegativeInt; strokeCount?: NonNegativeInt; styleChangeDetails?: { targetId: BoundedString; selector: … | null; property: BoundedString; previousValue: BoundedString; value: BoundedString }[]; screenshotContextId?: ComposerContextId }`

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

## `PullRequestContextMetadata`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:82](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L82-L90)
- Shape: `{ number: PositiveInt; title: BoundedString; url: BoundedString; headBranch: BoundedString; baseBranch: BoundedString; state: "open" | "closed" | "merged"; isDraft: boolean }`

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

## `ResponseContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:243](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L243-L260)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "response"; citation: AssistantCitation; itemId: makeEntityId; subagents?: { threadId: makeEntityId; title: string; environmentId?: makeEntityId }[] }`

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

## `ReviewCommentContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:188](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L188-L201)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "review-comment"; sectionId: string; sectionTitle: BoundedString; filePath: string; startIndex: NonNegativeInt; endIndex: NonNegativeInt; rangeLabel: BoundedString; text: BoundedString; diff: BoundedString; fenceLanguage?: BoundedString; pullRequest?: PullRequestContextMetadata }`

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

## `SkillContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:211](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L211-L215)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "skill"; name: TrimmedNonEmptyString }`

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

## `TerminalContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:121](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L121-L129)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "terminal"; terminalId: TrimmedNonEmptyString; terminalLabel: TrimmedNonEmptyString; lineStart: NonNegativeInt; lineEnd: NonNegativeInt; text: BoundedString }`

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

## `ThreadContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:218](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L218-L224)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: "thread"; environmentId: makeEntityId; threadId: makeEntityId; title: string }`

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

## `UnknownContextRecord`

- Kind: schema
- Workspace: [@t3tools/contracts](../../architecture/t3tools-contracts.md)
- Source: [packages/contracts/src/composerContext.ts:266](https://github.com/pingdotgg/t3code/blob/c0eed7328db2609e5a535be704e90638aef1c111/packages/contracts/src/composerContext.ts#L266-L280)
- Shape: `{ version: 1; contextId: ComposerContextId; label: string; kind: ComposerContextKind; payload: unknown }`
