pub struct TurnInputPart {
pub part_type: TurnInputPartType,
pub text: Option<String>,
pub media_type: Option<String>,
pub base64_data: Option<String>,
pub width: Option<u64>,
pub height: Option<u64>,
pub selector: Option<String>,
pub arguments: Option<String>,
pub source: Option<SkillInvocationSource>,
pub upload_id: Option<String>,
}Expand description
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::msp::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 protocol spec shape either way; what a flat object cannot express is
“mediaType is required exactly when type is image”.
RULED: the precedent is accepted. A strict union node kind may be funded
later as a follow-up; if it is, it must cover
crate::msp::method::lifecycle::PendingRequestPointer too.
Fields§
§part_type: TurnInputPartTypeThe part type.
text: Option<String>User prompt text, on a text part. Multiple text parts are joined in
order into the turn’s prompt.
media_type: Option<String>Media type, required on an image part.
base64_data: Option<String>Base64 payload, required on an image part. Invalid base64 or an
empty payload is rejected with invalid params.
width: Option<u64>Pixel width; must be provided together with height or not at all.
Published as a dependentRequired pair under a tracked change.
height: Option<u64>Pixel height; must be provided together with width or not at all.
selector: Option<String>The skill to invoke, required on a skill part: a bare or
plugin-qualified shortcut token from skill/list. The HOST resolves and
expands; an unknown selector is the typed -32032 skillNotFound request
error.
arguments: Option<String>Free-text skill arguments, optional on a skill part — the wire twin of
what the TUI accepts after the shortcut token.
source: Option<SkillInvocationSource>The picked copy’s source, optional on a skill part: the catalog-row
source values. When present the host resolves the exact (selector, source) row; when absent the governing rules bare resolution applies
byte-for-byte. Closed: an unknown value is invalidParams, never a
fall-through.
upload_id: Option<String>The upload receipt, required on a video part: the client-minted id
media/upload echoed.