ContractSpec docs

OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

AiTurnState — LLM turn discriminated union

Discriminated union for every LLM conversation turn: system | user | assistant | tool-call | tool-result.

field.key.label
AiTurnState — LLM turn discriminated union
field.version.label
field.type.label
field.title.label
AiTurnState — LLM turn discriminated union
field.description.label

Discriminated union for every LLM conversation turn: system | user | assistant | tool-call | tool-result.

field.tags.label
automation,agent,execution,graph,ai,conversation,m5
field.owners.label
platform.ai
field.stability.label
public

Discriminated union covering all LLM conversation turn types. Discriminant: `role`.

Variants

| role | purpose | |------|---------| | `system` | System-level instruction (persona, capability context) | | `user` | User message text | | `assistant` | LLM response, optionally carrying `toolCalls` | | `tool-call` | Tool invocation request from the LLM | | `tool-result` | Result returned by the tool handler |

Correlation

`tool-call` and `tool-result` turns are linked by `toolCallId`.