Project the final GetPromptResult to the negotiated protocol version so version-gated message content (audio/resource_link/tool_use/tool_result plus content-level _meta/lastModified) is not emitted to peers that do not understand it. Mirrors ToolResponse.forVersion: an InputRequiredResult is draft-only (MRTR) and carries no version-gated content, so it is returned unchanged.
The handler is done; r is the final prompt result.
The handler needs input; the client must gather it and resubmit with the matching inputResponses.
As inputRequired, but also attaches an opaque requestState (SEP-2322): a stateless draft server encodes whatever context it needs to resume the call into this blob, which the client echoes verbatim on the retry and the handler reads back via RequestContext.requestState.
Whether this outcome asks the client for more input.
The MRTR inputRequests this outcome carries (empty unless needsInput). Read by the dispatch path so it can drop requests whose kind the client never declared.
The opaque MRTR requestState this outcome carries (empty unless set).
Return a copy of this input-required outcome with its inputRequests replaced by reqs (preserving requestState). Used by the dispatch path after filtering out unsupported request kinds.
The JSON-RPC result payload (the final result, or an InputRequiredResult).
The outcome of a prompts/get call: either the final GetPromptResult, or — on a stateless (MRTR) draft request — a set of InputRequests the client must satisfy and resubmit. This mirrors ToolResponse for the prompts path: the draft schema types GetPromptResultResponse.result as GetPromptResult | InputRequiredResult, so a prompt handler that needs more input ends the request with inputRequired(...) and the client opens a fresh prompts/get carrying the matching inputResponses (and any requestState).