TS optionality for MCP elicitation event fields

This commit is contained in:
canvrno-oai
2026-02-23 14:39:03 -08:00
parent 48fe731e68
commit a763aff107
4 changed files with 24 additions and 21 deletions
@@ -1757,6 +1757,12 @@
},
{
"properties": {
"elicitation_id": {
"type": [
"string",
"null"
]
},
"id": {
"$ref": "#/definitions/RequestId"
},
@@ -1779,12 +1785,6 @@
"string",
"null"
]
},
"elicitation_id": {
"type": [
"string",
"null"
]
}
},
"required": [
@@ -7015,6 +7015,12 @@
},
{
"properties": {
"elicitation_id": {
"type": [
"string",
"null"
]
},
"id": {
"$ref": "#/definitions/RequestId"
},
@@ -7037,12 +7043,6 @@
"string",
"null"
]
},
"elicitation_id": {
"type": [
"string",
"null"
]
}
},
"required": [
@@ -8445,4 +8445,4 @@
}
],
"title": "EventMsg"
}
}
@@ -2818,6 +2818,12 @@
},
{
"properties": {
"elicitation_id": {
"type": [
"string",
"null"
]
},
"id": {
"$ref": "#/definitions/RequestId"
},
@@ -2840,12 +2846,6 @@
"string",
"null"
]
},
"elicitation_id": {
"type": [
"string",
"null"
]
}
},
"required": [
@@ -13945,4 +13945,4 @@
},
"title": "CodexAppServerProtocol",
"type": "object"
}
}
@@ -3,4 +3,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { JsonValue } from "./serde_json/JsonValue";
export type ElicitationRequestEvent = { server_name: string, id: string | number, message: string, requested_schema: JsonValue | null, url: string | null, elicitation_id: string | null, };
export type ElicitationRequestEvent = { server_name: string, id: string | number, message: string, requested_schema?: JsonValue, url?: string, elicitation_id?: string, };
+3
View File
@@ -104,10 +104,13 @@ pub struct ElicitationRequestEvent {
pub id: RequestId,
pub message: String,
#[serde(skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub requested_schema: Option<Value>,
#[serde(skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
#[ts(optional)]
pub elicitation_id: Option<String>,
}