File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,35 @@ def bot_info(ctx: Context, bot_name: str) -> BotInfo:
139
139
return bot
140
140
141
141
142
+ @server .tool ()
143
+ def update_bot (
144
+ ctx : Context ,
145
+ bot_name : str ,
146
+ new_name : str | None = None ,
147
+ new_image : str | None = None ,
148
+ new_ecosystem : str | None = None ,
149
+ new_network : str | None = None ,
150
+ new_provider : str | None = None ,
151
+ new_account : str | None = "<no-change>" ,
152
+ new_environment : list [str ] | None = None ,
153
+ ) -> BotInfo :
154
+ """Remove a particular bot from the Cluster"""
155
+ cluster : ClusterClient = ctx .request_context .lifespan_context
156
+
157
+ if not (bot := cluster .bots .get (bot_name )):
158
+ raise RuntimeError ("Unknown bot" )
159
+
160
+ return bot .update (
161
+ name = new_name ,
162
+ image = new_image ,
163
+ ecosystem = new_ecosystem ,
164
+ network = new_network ,
165
+ provider = new_provider ,
166
+ account = new_account ,
167
+ environment = new_environment ,
168
+ )
169
+
170
+
142
171
@server .tool ()
143
172
def remove_bot (ctx : Context , bot_name : str ):
144
173
"""Remove a particular bot from the Cluster"""
You can’t perform that action at this time.
0 commit comments