Files
ratatoskr/docs/conversation-api-sse-events.schema.json
T
vh b798068932 pin: re-pin to Worldtree's FROZEN v1 surface (OpenAPI 2.2.0 + SSE schema)
v1 coverage-audit remediation P-1: vendor the authoritative machine-
readable artifacts and pin them for drift-checking, advancing the spec
pin from v0.35.16 (f1b59f8) to v1.0.0b2 (5810a26).

- Vendor docs/conversation-api-openapi.json (OpenAPI 2.2.0, 40 path-
  groups) + docs/conversation-api-sse-events.schema.json (11 events).
- Pin all three Conversation-API artifacts in .corviduo-canonicals.toml:
  OpenAPI + SSE schema as strict drift gates (canonical_drift.py), the
  prose markdown as tolerate_drift reference. Drift check green (10/10).
- pyproject: worldtree-spec-rev -> 5810a26, worldtree-version -> v1.0.0b2
  (was stale at v0.29.0), pinned-on -> 2026-06-30.
- SPEC-PIN.md: current-pin table + history row + vendored-artifacts list.
- coverage-map.md: P-1 marked remediated; the map now audits a frozen,
  diffable target.

The prose markdown is byte-identical to v0.35.16 (last WT edit
2026-05-31); the b2 surface lives only in the OpenAPI. No client-
facing code change (the b2 409/503 + unified error envelope were
already consumed in v0.18.3/.4) -> pin-only, no version bump.
2026-06-30 15:28:52 -07:00

266 lines
5.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Server-Sent Events emitted on POST /sessions/{id}/messages. Each event is an object discriminated on `type`; all carry `turn_id`.",
"discriminator": {
"propertyName": "type"
},
"oneOf": [
{
"additionalProperties": true,
"properties": {
"phase": {
"enum": [
"BuildingPrompt",
"CallingLLM",
"ProcessingTools",
"Streaming",
"Finishing"
],
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "worker_phase"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "awaiting_llm_first_token"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"content": {
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "thinking"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"content": {
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "text"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "text_boundary"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"name": {
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "tool_start"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"name": {
"type": "string"
},
"result": {},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "tool_result"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "affect_update"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "done"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"phase": {
"type": "string"
},
"reason": {
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "cancelled"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
},
{
"additionalProperties": true,
"properties": {
"error_code": {
"type": "string"
},
"message": {
"type": "string"
},
"turn_id": {
"description": "The turn this event belongs to.",
"type": [
"integer",
"string"
]
},
"type": {
"const": "error"
}
},
"required": [
"type",
"turn_id"
],
"type": "object"
}
],
"title": "Worldtree Conversation API — SSE turn-stream events"
}