TurnCompletedParams
turn/completed params: the run’s durable terminal record
landed.
Fields and variants
Section titled “Fields and variants”durationMserrorreasonsessionIdsourceRangeterminaltimeToFirstTokenMsturnIdusageviewCursor
Source
schema/msp/experimental/msp.schema.json#/types/TurnCompletedParams
{ "description": "`turn/completed` params: the run's durable terminal record\nlanded.", "properties": { "durationMs": { "description": "Turn duration; absent means unmeasured, never fabricated.", "type": "integer" }, "error": { "$ref": "#/$defs/TurnError", "description": "Present iff `terminal` is `\"failed\"`: mid-turn failures\nreach the client here — never as a JSON-RPC error." }, "reason": { "description": "The runtime's free-text terminal reason, verbatim. Display and\ndiagnostics only; never branch on it.", "type": "string" }, "sessionId": { "description": "The owning session.", "type": "string" }, "sourceRange": { "$ref": "#/$defs/SourceRange", "description": "The durable records this event folded from." }, "terminal": { "$ref": "#/$defs/TurnTerminal", "description": "The turn terminal (open enum)." }, "timeToFirstTokenMs": { "description": "Time to first token, when measured.", "type": "integer" }, "turnId": { "description": "The terminated turn.", "type": "string" }, "usage": { "$ref": "#/$defs/TokenUsage", "description": "The turn's aggregate token usage, summed across the turn's model\ncompletions (same shape as `session/tokenUsage.usage`)." }, "viewCursor": { "description": "Opaque, strictly monotonic view cursor.", "type": "string" } }, "required": [ "sessionId", "sourceRange", "terminal", "turnId", "viewCursor" ], "type": "object"}