@@ -13,41 +13,6 @@ use crate::types::SessionId;
1313/// JSON Schema object used for canvas inputs and canvas-scoped tools.
1414pub type CanvasJsonSchema = serde_json:: Map < String , Value > ;
1515
16- /// Tool definition exposed to a canvas instance.
17- #[ derive( Debug , Clone , Serialize , Deserialize , PartialEq ) ]
18- #[ serde( rename_all = "camelCase" ) ]
19- pub struct CanvasToolDefinition {
20- /// Tool name.
21- pub name : String ,
22- /// Tool description.
23- pub description : String ,
24- /// Human-readable tool title.
25- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
26- pub title : Option < String > ,
27- /// JSON Schema parameters for the tool.
28- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
29- pub parameters : Option < Value > ,
30- /// Whether this tool overrides a built-in tool.
31- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
32- pub overrides_built_in_tool : Option < bool > ,
33- /// Whether this tool skips permission prompts.
34- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
35- pub skip_permission : Option < bool > ,
36- /// Tool deferral behavior.
37- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
38- pub defer : Option < CanvasToolDefinitionDefer > ,
39- }
40-
41- /// Tool deferral behavior for canvas-scoped tools.
42- #[ derive( Debug , Clone , Copy , Serialize , Deserialize , PartialEq , Eq ) ]
43- #[ serde( rename_all = "kebab-case" ) ]
44- pub enum CanvasToolDefinitionDefer {
45- /// The tool may be deferred by the runtime.
46- Auto ,
47- /// The tool is always included in the initial tool list.
48- Never ,
49- }
50-
5116/// Runtime-controlled routing state for an open canvas instance.
5217#[ derive( Debug , Clone , Copy , Serialize , Deserialize , PartialEq , Eq ) ]
5318#[ serde( rename_all = "lowercase" ) ]
@@ -130,9 +95,6 @@ pub struct CanvasOpenResponse {
13095 /// Provider-supplied status text shown in host chrome.
13196 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
13297 pub status : Option < String > ,
133- /// Tools available to the canvas instance.
134- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
135- pub tools : Option < Vec < CanvasToolDefinition > > ,
13698}
13799
138100/// Open canvas instance returned by `session.canvas.open`,
@@ -159,9 +121,6 @@ pub struct OpenCanvasInstance {
159121 /// URL for web-rendered canvases.
160122 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
161123 pub url : Option < String > ,
162- /// Tools available to the canvas instance.
163- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
164- pub tools : Option < Vec < CanvasToolDefinition > > ,
165124 /// Input supplied when the instance was opened.
166125 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
167126 pub input : Option < Value > ,
@@ -186,7 +145,6 @@ impl OpenCanvasInstance {
186145 title : None ,
187146 status : None ,
188147 url : None ,
189- tools : None ,
190148 input : None ,
191149 reopen : false ,
192150 availability : CanvasInstanceAvailability :: Stale ,
@@ -652,7 +610,6 @@ mod tests {
652610 url : Some ( format ! ( "https://example.test/{}" , ctx. canvas_id) ) ,
653611 title : Some ( "Echo" . to_string ( ) ) ,
654612 status : Some ( "ready" . to_string ( ) ) ,
655- tools : None ,
656613 } )
657614 }
658615
0 commit comments