feat: add official Codex skill and harden task execution

Install and update artemis-use with task diagnostics and plugin guidance. Preserve cross-device file receipts, review canonical reports, guard stage transitions and reduce small history summaries. Improve exploration lifecycle, request recovery and browser live connections.
This commit is contained in:
chenmingxuan committed 2026-10-18 14:18:37 +08:00
1 parent 2328a4df0c
commit e1ea099592
128 files changed
+4944 -700

No files matched your search

+40 -2
View File
@@ -121,10 +121,19 @@ async def _download(
@mcp.tool()
async def mobile_workspace(include_devices: bool = True) -> dict:
async def mobile_workspace(
include_devices: bool = True,
plugin_id: str | None = None,
probe_plugin: bool = False,
profile: str = "default",
include_development: bool = False,
) -> dict:
"""List connected Android devices and the unified running/queued task state.
Select the user's device; if multiple devices exist and none is chosen, ask first.
plugin_id filters the installed plugin list. probe_plugin=true performs a bounded
connection/schema probe of that installed, authorized plugin (starts its runtime,
executes no task action). It never installs or grants permissions.
This does not submit tasks. On connection/device errors use mobile_diagnose.
For computer-only work use include_devices=false to skip ADB discovery entirely.
"""
@@ -132,10 +141,36 @@ async def mobile_workspace(include_devices: bool = True) -> dict:
_request("GET", "/api/status"), _request("GET", "/api/plugins")
)
devices = await _request("GET", "/api/devices") if include_devices else {}
installed = plugins.get("plugins", [])
if plugin_id:
_id(plugin_id)
installed = [
item for item in installed if (item.get("manifest") or item).get("id") == plugin_id
]
if not installed:
raise ValueError("插件未安装,请在网页插件页安装并授权")
development = None
if include_development:
from artemis import __version__
import sys
development = {
"python_executable": sys.executable,
"artemis_version": __version__,
"plugin_schema_version": 2,
"installation_root": str(ROOT_DIR),
}
probe = None
if probe_plugin:
probe = await _request(
"POST", f"/api/plugins/{_id(plugin_id)}/diagnose", json={"profile": profile}
)
return {
"devices": devices.get("devices", []),
"queue": status,
"plugins": plugins.get("plugins", []),
"plugins": installed,
"plugin_probe": probe,
"development": development,
"blocked_resources": plugins.get("blocked_resources", {}),
"execution_targets": ["android", "computer", "mixed"],
}
@@ -298,6 +333,7 @@ async def mobile_search_history(
end: float | None = None,
page: int = 1,
size: int = 30,
batch_id: str = "",
) -> dict:
"""Search ALL persisted terminal tasks by name, prompt, ID or case metadata, with pagination.
@@ -306,6 +342,8 @@ async def mobile_search_history(
Return items,total,page,size; inspect evidence/report before claiming a test passed.
"""
params = {"q": query, "status": status, "page": page, "size": size}
if batch_id:
params["batch_id"] = _id(batch_id)
if start is not None:
params["start"] = start
if end is not None: