[**zonegaze-flow**](../../../../README.md)

***

[zonegaze-flow](../../../../README.md) / [flow/contracts/src](../README.md) / runtimeStateStreamMessageSchema

# Variable: runtimeStateStreamMessageSchema

> `const` **runtimeStateStreamMessageSchema**: `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `clineSessionContextVersion`: `ZodNumber`; `currentProjectId`: `ZodNullable`\<`ZodString`\>; `projects`: `ZodArray`\<`ZodObject`\<\{ `id`: `ZodString`; `name`: `ZodString`; `path`: `ZodString`; `taskCounts`: `ZodObject`\<\{ `backlog`: `ZodNumber`; `in_progress`: `ZodNumber`; `next_up`: `ZodNumber`; `review`: `ZodNumber`; `trash`: `ZodNumber`; \}, `$strip`\>; \}, `$strip`\>\>; `type`: `ZodLiteral`\<`"snapshot"`\>; `workspaceMetadata`: `ZodNullable`\<`ZodObject`\<\{ `homeGitStateVersion`: `ZodNumber`; `homeGitSummary`: `ZodNullable`\<`ZodObject`\<\{ `additions`: `ZodNumber`; `aheadCount`: `ZodNumber`; `behindCount`: `ZodNumber`; `changedFiles`: `ZodNumber`; `currentBranch`: `ZodNullable`\<...\>; `deletions`: `ZodNumber`; `upstreamBranch`: `ZodNullable`\<...\>; \}, `$strip`\>\>; `taskWorkspaces`: `ZodArray`\<`ZodObject`\<\{ `additions`: `ZodNullable`\<...\>; `baseRef`: `ZodString`; `branch`: `ZodNullable`\<...\>; `changedFiles`: `ZodNullable`\<...\>; `deletions`: `ZodNullable`\<...\>; `exists`: `ZodBoolean`; `headCommit`: `ZodNullable`\<...\>; `isDetached`: `ZodBoolean`; `path`: `ZodString`; `stateVersion`: `ZodNumber`; `taskId`: `ZodString`; `workspaceTaskId`: `ZodOptional`\<...\>; \}, `$strip`\>\>; \}, `$strip`\>\>; `workspaceState`: `ZodNullable`\<`ZodObject`\<\{ `board`: `ZodPipe`\<`ZodObject`\<\{ `columns`: `ZodArray`\<...\>; `dependencies`: `ZodDefault`\<...\>; `workTypeRegistry`: `ZodPipe`\<..., ...\>; \}, `$strip`\>, `ZodTransform`\<\{ `columns`: ...[]; `dependencies`: ...[]; `workTypeRegistry`: `RuntimeWorkTypeRegistry`; \}, \{ `columns`: ...[]; `dependencies`: ...[]; `workTypeRegistry`: `RuntimeWorkTypeRegistry`; \}\>\>; `git`: `ZodObject`\<\{ `branches`: `ZodArray`\<`ZodString`\>; `currentBranch`: `ZodNullable`\<`ZodString`\>; `defaultBranch`: `ZodNullable`\<`ZodString`\>; \}, `$strip`\>; `repoPath`: `ZodString`; `revision`: `ZodNumber`; `sessions`: `ZodRecord`\<`ZodString`, `ZodObject`\<\{ `agentId`: `ZodNullable`\<...\>; `exitCode`: `ZodNullable`\<...\>; `lastHookAt`: `ZodDefault`\<...\>; `lastOutputAt`: `ZodNullable`\<...\>; `latestHookActivity`: `ZodDefault`\<...\>; `latestPromptSentAt`: `ZodOptional`\<...\>; `latestPromptTokenUsageBaseline`: `ZodOptional`\<...\>; `latestTurnCheckpoint`: `ZodOptional`\<...\>; `mode`: `ZodOptional`\<...\>; `pid`: `ZodNullable`\<...\>; `previousTurnCheckpoint`: `ZodOptional`\<...\>; `reviewReason`: `ZodNullable`\<...\>; `startedAt`: `ZodNullable`\<...\>; `state`: `ZodEnum`\<...\>; `taskId`: `ZodString`; `tokenUsage`: `ZodOptional`\<...\>; `updatedAt`: `ZodNumber`; `warningMessage`: `ZodOptional`\<...\>; `workspacePath`: `ZodNullable`\<...\>; \}, `$strip`\>\>; `statePath`: `ZodString`; \}, `$strip`\>\>; \}, `$strip`\>, `ZodObject`\<\{ `type`: `ZodLiteral`\<`"workspace_state_updated"`\>; `workspaceId`: `ZodString`; `workspaceState`: `ZodObject`\<\{ `board`: `ZodPipe`\<`ZodObject`\<\{ `columns`: `ZodArray`\<`ZodPipe`\<..., ...\>\>; `dependencies`: `ZodDefault`\<`ZodArray`\<...\>\>; `workTypeRegistry`: `ZodPipe`\<`ZodDefault`\<...\>, `ZodTransform`\<..., ...\>\>; \}, `$strip`\>, `ZodTransform`\<\{ `columns`: `object`[]; `dependencies`: `object`[]; `workTypeRegistry`: `RuntimeWorkTypeRegistry`; \}, \{ `columns`: `object`[]; `dependencies`: `object`[]; `workTypeRegistry`: `RuntimeWorkTypeRegistry`; \}\>\>; `git`: `ZodObject`\<\{ `branches`: `ZodArray`\<`ZodString`\>; `currentBranch`: `ZodNullable`\<`ZodString`\>; `defaultBranch`: `ZodNullable`\<`ZodString`\>; \}, `$strip`\>; `repoPath`: `ZodString`; `revision`: `ZodNumber`; `sessions`: `ZodRecord`\<`ZodString`, `ZodObject`\<\{ `agentId`: `ZodNullable`\<`ZodEnum`\<...\>\>; `exitCode`: `ZodNullable`\<`ZodNumber`\>; `lastHookAt`: `ZodDefault`\<`ZodNullable`\<...\>\>; `lastOutputAt`: `ZodNullable`\<`ZodNumber`\>; `latestHookActivity`: `ZodDefault`\<`ZodNullable`\<...\>\>; `latestPromptSentAt`: `ZodOptional`\<`ZodNullable`\<...\>\>; `latestPromptTokenUsageBaseline`: `ZodOptional`\<`ZodNullable`\<...\>\>; `latestTurnCheckpoint`: `ZodOptional`\<`ZodNullable`\<...\>\>; `mode`: `ZodOptional`\<`ZodNullable`\<...\>\>; `pid`: `ZodNullable`\<`ZodNumber`\>; `previousTurnCheckpoint`: `ZodOptional`\<`ZodNullable`\<...\>\>; `reviewReason`: `ZodNullable`\<`ZodEnum`\<...\>\>; `startedAt`: `ZodNullable`\<`ZodNumber`\>; `state`: `ZodEnum`\<\{ `awaiting_review`: ...; `failed`: ...; `idle`: ...; `interrupted`: ...; `running`: ...; \}\>; `taskId`: `ZodString`; `tokenUsage`: `ZodOptional`\<`ZodNullable`\<...\>\>; `updatedAt`: `ZodNumber`; `warningMessage`: `ZodOptional`\<`ZodNullable`\<...\>\>; `workspacePath`: `ZodNullable`\<`ZodString`\>; \}, `$strip`\>\>; `statePath`: `ZodString`; \}, `$strip`\>; \}, `$strip`\>, `ZodObject`\<\{ `summaries`: `ZodArray`\<`ZodObject`\<\{ `agentId`: `ZodNullable`\<`ZodEnum`\<\{ `claude`: `"claude"`; `cline`: `"cline"`; `codex`: `"codex"`; `droid`: `"droid"`; `gemini`: `"gemini"`; `kiro`: `"kiro"`; `opencode`: `"opencode"`; \}\>\>; `exitCode`: `ZodNullable`\<`ZodNumber`\>; `lastHookAt`: `ZodDefault`\<`ZodNullable`\<`ZodNumber`\>\>; `lastOutputAt`: `ZodNullable`\<`ZodNumber`\>; `latestHookActivity`: `ZodDefault`\<`ZodNullable`\<`ZodObject`\<\{ `activityText`: ...; `finalMessage`: ...; `hookEventName`: ...; `notificationType`: ...; `source`: ...; `toolInputSummary`: ...; `toolName`: ...; \}, `$strip`\>\>\>; `latestPromptSentAt`: `ZodOptional`\<`ZodNullable`\<`ZodNumber`\>\>; `latestPromptTokenUsageBaseline`: `ZodOptional`\<`ZodNullable`\<`ZodObject`\<\{ `cacheReadTokens`: ...; `cacheWriteTokens`: ...; `inputTokens`: ...; `outputTokens`: ...; `totalCost`: ...; `updatedAt`: ...; \}, `$strip`\>\>\>; `latestTurnCheckpoint`: `ZodOptional`\<`ZodNullable`\<`ZodObject`\<\{ `commit`: ...; `createdAt`: ...; `ref`: ...; `turn`: ...; \}, `$strip`\>\>\>; `mode`: `ZodOptional`\<`ZodNullable`\<`ZodEnum`\<\{ `act`: ...; `plan`: ...; \}\>\>\>; `pid`: `ZodNullable`\<`ZodNumber`\>; `previousTurnCheckpoint`: `ZodOptional`\<`ZodNullable`\<`ZodObject`\<\{ `commit`: ...; `createdAt`: ...; `ref`: ...; `turn`: ...; \}, `$strip`\>\>\>; `reviewReason`: `ZodNullable`\<`ZodEnum`\<\{ `attention`: `"attention"`; `error`: `"error"`; `exit`: `"exit"`; `hook`: `"hook"`; `interrupted`: `"interrupted"`; \}\>\>; `startedAt`: `ZodNullable`\<`ZodNumber`\>; `state`: `ZodEnum`\<\{ `awaiting_review`: `"awaiting_review"`; `failed`: `"failed"`; `idle`: `"idle"`; `interrupted`: `"interrupted"`; `running`: `"running"`; \}\>; `taskId`: `ZodString`; `tokenUsage`: `ZodOptional`\<`ZodNullable`\<`ZodObject`\<\{ `cacheReadTokens`: ...; `cacheWriteTokens`: ...; `inputTokens`: ...; `outputTokens`: ...; `totalCost`: ...; `updatedAt`: ...; \}, `$strip`\>\>\>; `updatedAt`: `ZodNumber`; `warningMessage`: `ZodOptional`\<`ZodNullable`\<`ZodString`\>\>; `workspacePath`: `ZodNullable`\<`ZodString`\>; \}, `$strip`\>\>; `type`: `ZodLiteral`\<`"task_sessions_updated"`\>; `workspaceId`: `ZodString`; \}, `$strip`\>\], `"type"`\>

Defined in: [flow/contracts/src/api-contract.ts:667](https://github.com/neuralpilot08/zonegaze-flow/blob/ee47e8308e50071e712017a7f8b0db560a4746ee/flow/contracts/src/api-contract.ts#L667)

Runtime push channel payloads consumed by `useRuntimeStateStream` in the web app.
