fix: make Android tasks use extensions automatically and populate marketplace

This commit is contained in:
chenmingxuan committed 2026-10-14 22:32:38 +08:00
1 parent 6663233ab8
commit 9c82a40cbf
32 files changed
+341 -131

No files matched your search

+1
View File
@@ -247,6 +247,7 @@ async def run_task(
print("Running task on agent...")
task_builder = (
agent.new_task(goal=task_desc)
.with_plugins([]) # The standalone fallback cannot dispatch plugin work.
.with_name(f"task_{trace_id}")
.with_trace_recording(enabled=True, path=trace_store.TRACES_DIR)
)
+9 -1
View File
@@ -336,6 +336,7 @@ def mobile_run_task(
execution_target ('android', 'computer', 'mixed') and plugins
([{id, profile}] references to saved authorized configurations; never secrets).
Omitted plugins selects matching enabled defaults; [] disables plugins.
Default Android tasks can use mixed extensions on demand without changing targets.
Computer tasks require an observation plugin, not an Android device.
Query mobile_workspace first; installation/authorization is in the plugin page.
timeout_seconds (total execution, default 1800; excludes queue/pause),
@@ -517,7 +518,14 @@ def mobile_run_task(
}
# 4. Standalone Fallback: Resolve project root, python executable, and background runner module
if execution_target != "android" or (runtime_overrides or {}).get("plugins"):
from artemis.plugins.store import PluginStore
plugin_choices = (runtime_overrides or {}).get("plugins")
if (
execution_target != "android"
or plugin_choices
or (plugin_choices is None and PluginStore().selections("android"))
):
error = "插件及电脑任务需要统一任务服务,请启动 ARTEMIS 网页服务后重试;未启动独立任务。"
trace_store.update_trace_status(trace_id, "failed", error=error)
return {"trace_id": trace_id, "status": "failed", "error": error}