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:
1 parent
2328a4df0c
commit
e1ea099592
128 files changed
+4944
-700
No files matched your search
@@ -132,7 +132,7 @@ command = "leave-alone"
|
||||
assert config["disabled_tools"] == ["mobile_config"]
|
||||
assert config["tool_timeout_sec"] == 900
|
||||
assert config["env"]["OPENAI_API_KEY"] == "test-only-secret"
|
||||
assert config["enabled_tools"] == ["mobile_run_task", "mobile_batch"]
|
||||
assert config["enabled_tools"] == ["mobile_run_task"]
|
||||
assert data["mcp_servers"]["other"]["command"] == "leave-alone"
|
||||
assert not update.refresh_codex(path, root, "new-python", ("mobile_run_task", "mobile_batch"))
|
||||
assert path.with_name(path.name + ".artemis-update.bak").read_text(encoding="utf-8") == original
|
||||
@@ -178,7 +178,7 @@ def test_codex_sync_preserves_tool_policies_verbatim(tmp_path, monkeypatch, poli
|
||||
"PYTHONUNBUFFERED": "1",
|
||||
"ARTEMIS_DESKTOP_NOTIFY": "true",
|
||||
}
|
||||
assert entry["enabled_tools"] == list(mcp_command.ARTEMIS_MCP_TOOLS)
|
||||
assert entry["enabled_tools"] == ["mobile_run_task"]
|
||||
assert entry["disabled_tools"] == ["mobile_config"]
|
||||
assert entry["tools"] == before["mcp_servers"]["artemis"]["tools"]
|
||||
assert policies.split("\n", 1)[1] in refreshed
|
||||
@@ -199,7 +199,10 @@ def test_codex_sync_reports_generated_toml_error_without_blame_or_overwrite(
|
||||
path.write_text(original, encoding="utf-8")
|
||||
monkeypatch.setenv("CODEX_HOME", str(codex_home))
|
||||
monkeypatch.setenv("ARTEMIS_LAUNCH_LANG", "zh-CN")
|
||||
monkeypatch.setattr(update, "_replace_toml_tables", lambda *_: 'tools = {"secret": true}\n')
|
||||
monkeypatch.setattr(
|
||||
"artemis.integrations.codex_mcp._replace_toml_tables",
|
||||
lambda *_: 'tools = {"secret": true}\n',
|
||||
)
|
||||
assert update.refresh_mcp(tmp_path / "project") == 1
|
||||
assert path.read_text(encoding="utf-8") == original
|
||||
assert not path.with_name(path.name + ".artemis-update.bak").exists()
|
||||
@@ -252,7 +255,7 @@ def test_mcp_sync_updates_only_codex_and_preserves_other_clients(tmp_path, monke
|
||||
assert entry["enabled"] is False
|
||||
assert entry["env"]["OPENAI_API_KEY"] == "keep-secret"
|
||||
assert entry["env"]["PYTHONPATH"] == str(root)
|
||||
assert entry["enabled_tools"] == list(mcp_command.ARTEMIS_MCP_TOOLS)
|
||||
assert entry["enabled_tools"] == ["mobile_run_task", "retired_tool"]
|
||||
cursor = json.loads((cursor_home / "mcp.json").read_text(encoding="utf-8"))
|
||||
assert "artemis" not in cursor["mcpServers"]
|
||||
assert cursor["mcpServers"]["other"] == {"command": "keep"}
|
||||
@@ -331,9 +334,9 @@ def test_codex_sync_reports_missing_directory_without_touching_other_clients(
|
||||
assert update.refresh_mcp(tmp_path / "project") == 0
|
||||
output = capsys.readouterr().out
|
||||
assert str(tmp_path / ".codex/config.toml") in output
|
||||
assert "未发现 Codex 配置目录" in output
|
||||
assert "--install codex" in output
|
||||
assert not (tmp_path / ".codex").exists()
|
||||
assert "已安装" in output
|
||||
assert (tmp_path / ".codex/config.toml").is_file()
|
||||
assert (tmp_path / ".agents/skills/artemis-use/SKILL.md").is_file()
|
||||
|
||||
|
||||
def test_custom_codex_command_is_preserved_and_reported(tmp_path, monkeypatch, capsys):
|
||||
|
||||
Reference in new issue
Block a user