Skip to content
Developer Preview

TurnInputPart

One ordered content part of a turn submission. File mentions are text, not a part type: write @relative/path in a text part. A structured mention part is reserved and currently rejected, and an unknown part type is invalidParams — which is what closes [TurnInputPartType].

Modelled as a discriminated flat object rather than a Rust enum, the convention [crate::view::approval::ApprovalSubject] already established for a wire union in this crate: the v1 schema model names no object-variant union shape and fails closed on one. The serialized JSON is the same either way; what a flat object cannot express is “mediaType is required exactly when type is image”.

  • arguments
  • base64Data
  • height
  • mediaType
  • selector
  • source
  • text
  • type
  • uploadId
  • width
Source

schema/msp/experimental/msp.schema.json#/types/TurnInputPart

{
"dependentRequired": {
"height": [
"width"
],
"width": [
"height"
]
},
"description": "One ordered content part of a turn submission. File mentions\nare text, not a part type: write `@relative/path` in a text part. A\nstructured `mention` part is reserved and currently rejected, and an\nunknown part type is `invalidParams` — which is what\ncloses [`TurnInputPartType`].\n\nModelled as a discriminated flat object rather than a Rust `enum`, the\nconvention [`crate::view::approval::ApprovalSubject`] already established\nfor a wire union in this crate: the v1 schema model names no\nobject-variant union shape and fails closed on one. The serialized JSON is\nthe same either way; what a flat object cannot express is \"`mediaType` is\nrequired exactly when `type` is `image`\".",
"properties": {
"arguments": {
"description": "Free-text skill arguments, optional on a `skill` part — the wire twin\nof what the TUI accepts after the shortcut token.",
"type": "string"
},
"base64Data": {
"description": "Base64 payload, required on an `image` part. Invalid base64 or an\nempty payload is rejected with invalid params.",
"type": "string"
},
"height": {
"description": "Pixel height; must be provided together with `width` or not at all.",
"type": "integer"
},
"mediaType": {
"description": "Media type, required on an `image` part.",
"type": "string"
},
"selector": {
"description": "The skill to invoke, required on a `skill` part: a bare or plugin-qualified shortcut token from\n`skill/list`. The HOST resolves and expands; an unknown selector is\nthe typed `-32032 skillNotFound` request error.",
"type": "string"
},
"source": {
"$ref": "#/$defs/SkillInvocationSource",
"description": "The picked copy's source, optional on a `skill` part: one of the catalog\nrows' `source` values. When present the host resolves the exact\n`(selector, source)` row; when absent it resolves the selector, bare or\nplugin-qualified, against the session's skill catalog, as the TUI\nshortcut does. Closed: an unknown value is `invalidParams`, never a\nfall-through."
},
"text": {
"description": "User prompt text, on a `text` part. Multiple text parts are joined in\norder into the turn's prompt.",
"type": "string"
},
"type": {
"$ref": "#/$defs/TurnInputPartType",
"description": "The part type."
},
"uploadId": {
"description": "The upload receipt, required on a `video` part: the client-minted id `media/upload` echoed.",
"type": "string"
},
"width": {
"description": "Pixel width; must be provided together with `height` or not at all.\nPublished as a `dependentRequired` pair.",
"type": "integer"
}
},
"required": [
"type"
],
"type": "object"
}