diff --git a/astrbot/core/astr_main_agent_resources.py b/astrbot/core/astr_main_agent_resources.py index 2e0d8b0aa..b8eaf41d7 100644 --- a/astrbot/core/astr_main_agent_resources.py +++ b/astrbot/core/astr_main_agent_resources.py @@ -204,7 +204,7 @@ class SendMessageToUserTool(FunctionTool[AstrAgentContext]): "type": "string", "description": ( "Component type. One of: " - "plain, image, record, file, mention_user" + "plain, image, record, video, file, mention_user. Record is voice message." ), }, "text": { @@ -320,6 +320,19 @@ class SendMessageToUserTool(FunctionTool[AstrAgentContext]): components.append(Comp.Record.fromURL(url=url)) else: return f"error: messages[{idx}] must include path or url for record component." + elif msg_type == "video": + path = msg.get("path") + url = msg.get("url") + if path: + ( + local_path, + file_from_sandbox, + ) = await self._resolve_path_from_sandbox(context, path) + components.append(Comp.Video.fromFileSystem(path=local_path)) + elif url: + components.append(Comp.Video.fromURL(url=url)) + else: + return f"error: messages[{idx}] must include path or url for video component." elif msg_type == "file": path = msg.get("path") url = msg.get("url") diff --git a/astrbot/core/computer/computer_client.py b/astrbot/core/computer/computer_client.py index aa10d125e..6e80ac3ab 100644 --- a/astrbot/core/computer/computer_client.py +++ b/astrbot/core/computer/computer_client.py @@ -422,6 +422,12 @@ async def get_booter( ) -> ComputerBooter: config = context.get_config(umo=session_id) + runtime = config.get("provider_settings", {}).get("computer_use_runtime", "local") + if runtime == "local": + return get_local_booter() + elif runtime == "none": + raise RuntimeError("Sandbox runtime is disabled by configuration.") + sandbox_cfg = config.get("provider_settings", {}).get("sandbox", {}) booter_type = sandbox_cfg.get("booter", "shipyard_neo")