# MaelstromResponseMessageSchema
Source: https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/maelstromresponsemessageschema/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> `const` **MaelstromResponseMessageSchema**: `ZodObject`<{ `requestId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `response`: `ZodObject`<{ `executionPlan`: `ZodArray`<`ZodObject`<{ `action`: `ZodPipe`<`ZodString`, `ZodTransform`<[`ActionName`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/actionname/), `string`\>>; `instanceId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`InstanceId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/instanceid/), `string`\>>; `params`: `ZodOptional`<`ZodRecord`<`ZodString`, `ZodUnknown`\>>; }, `$strip`\>>; `layout`: `ZodDiscriminatedUnion`<\[`ZodObject`<{ `positions`: `ZodArray`<`ZodObject`<{ `instanceId`: …; `position`: …; `size`: …; }, `$strip`\>>; `type`: `ZodLiteral`<`"grid"`\>; }, `$strip`\>, `ZodObject`<{ `instances`: `ZodArray`<`ZodObject`<{ `instanceId`: …; `variant`: …; `vesselId`: …; }, `$strip`\>>; `tree`: `ZodArray`<`ZodPipe`<`ZodNullable`<…>, `ZodTransform`<…, …>>>; `type`: `ZodLiteral`<`"tiling"`\>; }, `$strip`\>\], `"type"`\>; `rationale`: `ZodString`; `requestId`: `ZodPipe`<`ZodString`, `ZodTransform`<[`MessageId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/messageid/), `string`\>>; `type`: `ZodLiteral`<`"maelstrom_response"`\>; `userMessage`: `ZodString`; }, `$strip`\>; `sessionId`: `ZodOptional`<`ZodPipe`<`ZodString`, `ZodTransform`<[`SessionId`](https://docs.maelstrom-ai.co/0.2/reference/protocol/type-aliases/sessionid/), `string`\>>>; `type`: `ZodLiteral`<`"engine.maelstrom.response"`\>; }, `$strip`\>

Defined in: packages/protocol/src/lib/envelope.ts:248

Wire-format Zod parser for [MaelstromResponseMessage](https://docs.maelstrom-ai.co/0.2/reference/protocol/variables/maelstromresponsemessage/). Validates the discriminator, the branded `requestId`, the optional `sessionId`, and the inner [MaelstromResponse](https://docs.maelstrom-ai.co/0.2/reference/protocol/interfaces/maelstromresponse/) payload in one pass.
