feat!: add MRTR model types (SEP-2322) (#915)
* feat!: add SEP-2322 MRTR model types * feat!: remove URLElicitationRequiredError (SEP-2322)
This commit is contained in:
parent
519577601d
commit
f4ff56b81d
4 changed files with 969 additions and 255 deletions
|
|
@ -66,10 +66,6 @@ impl<H: ClientHandler> Service<RoleClient> for H {
|
|||
ServerNotification::PromptListChangedNotification(_notification_no_param) => {
|
||||
self.on_prompt_list_changed(context).await
|
||||
}
|
||||
ServerNotification::ElicitationCompleteNotification(notification) => {
|
||||
self.on_url_elicitation_notification_complete(notification.params, context)
|
||||
.await
|
||||
}
|
||||
ServerNotification::TaskStatusNotification(notification) => {
|
||||
self.on_task_status(notification.params, context).await
|
||||
}
|
||||
|
|
@ -242,13 +238,6 @@ pub trait ClientHandler: Sized + Send + Sync + 'static {
|
|||
std::future::ready(())
|
||||
}
|
||||
|
||||
fn on_url_elicitation_notification_complete(
|
||||
&self,
|
||||
params: ElicitationResponseNotificationParam,
|
||||
context: NotificationContext<RoleClient>,
|
||||
) -> impl Future<Output = ()> + MaybeSendFuture + '_ {
|
||||
std::future::ready(())
|
||||
}
|
||||
fn on_task_status(
|
||||
&self,
|
||||
params: TaskStatusNotificationParam,
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ impl IntoGetPromptResult for GetPromptResult {
|
|||
impl IntoGetPromptResult for Vec<PromptMessage> {
|
||||
fn into_get_prompt_result(self) -> Result<GetPromptResult, crate::ErrorData> {
|
||||
Ok(GetPromptResult {
|
||||
result_type: Default::default(),
|
||||
description: None,
|
||||
messages: self,
|
||||
meta: None,
|
||||
|
|
|
|||
|
|
@ -669,6 +669,8 @@ mod tests {
|
|||
name: Cow::Borrowed("requires_params"),
|
||||
arguments: Some(Default::default()),
|
||||
task: None,
|
||||
input_responses: None,
|
||||
request_state: None,
|
||||
},
|
||||
RequestContext::new(NumberOrString::Number(1), peer),
|
||||
);
|
||||
|
|
@ -708,6 +710,8 @@ mod tests {
|
|||
name: Cow::Borrowed("test_tool"),
|
||||
arguments: None,
|
||||
task: None,
|
||||
input_responses: None,
|
||||
request_state: None,
|
||||
},
|
||||
RequestContext::new(NumberOrString::Number(1), peer),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ impl<'s, S> ToolCallContext<'s, S> {
|
|||
name,
|
||||
arguments,
|
||||
task,
|
||||
..
|
||||
}: CallToolRequestParams,
|
||||
request_context: RequestContext<RoleServer>,
|
||||
) -> Self {
|
||||
|
|
|
|||
Loading…
Reference in a new issue