@@ -83,11 +83,11 @@ def text_block(text: str) -> TextContentBlock:
8383
8484
8585def image_block (data : str , mime_type : str , * , uri : str | None = None ) -> ImageContentBlock :
86- return ImageContentBlock (type = "image" , data = data , mimeType = mime_type , uri = uri )
86+ return ImageContentBlock (type = "image" , data = data , mime_type = mime_type , uri = uri )
8787
8888
8989def audio_block (data : str , mime_type : str ) -> AudioContentBlock :
90- return AudioContentBlock (type = "audio" , data = data , mimeType = mime_type )
90+ return AudioContentBlock (type = "audio" , data = data , mime_type = mime_type )
9191
9292
9393def resource_link_block (
@@ -103,19 +103,19 @@ def resource_link_block(
103103 type = "resource_link" ,
104104 name = name ,
105105 uri = uri ,
106- mimeType = mime_type ,
106+ mime_type = mime_type ,
107107 size = size ,
108108 description = description ,
109109 title = title ,
110110 )
111111
112112
113113def embedded_text_resource (uri : str , text : str , * , mime_type : str | None = None ) -> TextResourceContents :
114- return TextResourceContents (uri = uri , text = text , mimeType = mime_type )
114+ return TextResourceContents (uri = uri , text = text , mime_type = mime_type )
115115
116116
117117def embedded_blob_resource (uri : str , blob : str , * , mime_type : str | None = None ) -> BlobResourceContents :
118- return BlobResourceContents (uri = uri , blob = blob , mimeType = mime_type )
118+ return BlobResourceContents (uri = uri , blob = blob , mime_type = mime_type )
119119
120120
121121def resource_block (
@@ -129,11 +129,11 @@ def tool_content(block: ContentBlock) -> ContentToolCallContent:
129129
130130
131131def tool_diff_content (path : str , new_text : str , old_text : str | None = None ) -> FileEditToolCallContent :
132- return FileEditToolCallContent (type = "diff" , path = path , newText = new_text , oldText = old_text )
132+ return FileEditToolCallContent (type = "diff" , path = path , new_text = new_text , old_text = old_text )
133133
134134
135135def tool_terminal_ref (terminal_id : str ) -> TerminalToolCallContent :
136- return TerminalToolCallContent (type = "terminal" , terminalId = terminal_id )
136+ return TerminalToolCallContent (type = "terminal" , terminal_id = terminal_id )
137137
138138
139139def plan_entry (
@@ -146,27 +146,27 @@ def plan_entry(
146146
147147
148148def update_plan (entries : Iterable [PlanEntry ]) -> AgentPlanUpdate :
149- return AgentPlanUpdate (sessionUpdate = "plan" , entries = list (entries ))
149+ return AgentPlanUpdate (session_update = "plan" , entries = list (entries ))
150150
151151
152152def update_user_message (content : ContentBlock ) -> UserMessageChunk :
153- return UserMessageChunk (sessionUpdate = "user_message_chunk" , content = content )
153+ return UserMessageChunk (session_update = "user_message_chunk" , content = content )
154154
155155
156156def update_user_message_text (text : str ) -> UserMessageChunk :
157157 return update_user_message (text_block (text ))
158158
159159
160160def update_agent_message (content : ContentBlock ) -> AgentMessageChunk :
161- return AgentMessageChunk (sessionUpdate = "agent_message_chunk" , content = content )
161+ return AgentMessageChunk (session_update = "agent_message_chunk" , content = content )
162162
163163
164164def update_agent_message_text (text : str ) -> AgentMessageChunk :
165165 return update_agent_message (text_block (text ))
166166
167167
168168def update_agent_thought (content : ContentBlock ) -> AgentThoughtChunk :
169- return AgentThoughtChunk (sessionUpdate = "agent_thought_chunk" , content = content )
169+ return AgentThoughtChunk (session_update = "agent_thought_chunk" , content = content )
170170
171171
172172def update_agent_thought_text (text : str ) -> AgentThoughtChunk :
@@ -175,17 +175,17 @@ def update_agent_thought_text(text: str) -> AgentThoughtChunk:
175175
176176def update_available_commands (commands : Iterable [AvailableCommand ]) -> AvailableCommandsUpdate :
177177 return AvailableCommandsUpdate (
178- sessionUpdate = "available_commands_update" ,
179- availableCommands = list (commands ),
178+ session_update = "available_commands_update" ,
179+ available_commands = list (commands ),
180180 )
181181
182182
183183def update_current_mode (current_mode_id : str ) -> CurrentModeUpdate :
184- return CurrentModeUpdate (sessionUpdate = "current_mode_update" , currentModeId = current_mode_id )
184+ return CurrentModeUpdate (session_update = "current_mode_update" , current_mode_id = current_mode_id )
185185
186186
187187def session_notification (session_id : str , update : SessionUpdate ) -> SessionNotification :
188- return SessionNotification (sessionId = session_id , update = update )
188+ return SessionNotification (session_id = session_id , update = update )
189189
190190
191191def start_tool_call (
@@ -200,15 +200,15 @@ def start_tool_call(
200200 raw_output : Any | None = None ,
201201) -> ToolCallStart :
202202 return ToolCallStart (
203- sessionUpdate = "tool_call" ,
204- toolCallId = tool_call_id ,
203+ session_update = "tool_call" ,
204+ tool_call_id = tool_call_id ,
205205 title = title ,
206206 kind = kind ,
207207 status = status ,
208208 content = list (content ) if content is not None else None ,
209209 locations = list (locations ) if locations is not None else None ,
210- rawInput = raw_input ,
211- rawOutput = raw_output ,
210+ raw_input = raw_input ,
211+ raw_output = raw_output ,
212212 )
213213
214214
@@ -266,13 +266,13 @@ def update_tool_call(
266266 raw_output : Any | None = None ,
267267) -> ToolCallProgress :
268268 return ToolCallProgress (
269- sessionUpdate = "tool_call_update" ,
270- toolCallId = tool_call_id ,
269+ session_update = "tool_call_update" ,
270+ tool_call_id = tool_call_id ,
271271 title = title ,
272272 kind = kind ,
273273 status = status ,
274274 content = list (content ) if content is not None else None ,
275275 locations = list (locations ) if locations is not None else None ,
276- rawInput = raw_input ,
277- rawOutput = raw_output ,
276+ raw_input = raw_input ,
277+ raw_output = raw_output ,
278278 )
0 commit comments