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
+8
-18
@@ -1,6 +1,6 @@
|
||||
# 🔌 Universal MCP Server for ARTEMIS
|
||||
|
||||
This directory contains the **Model Context Protocol (MCP)** server for **ARTEMIS**. It exposes mobile device automation to clients such as **Antigravity**, **Cursor**, **Claude Code**, **OpenClaw**, and **Windsurf**.
|
||||
This directory contains ARTEMIS's connection-only MCP bridge and the tools hosted by the user-started web service. Official automatic configuration and Skill installation currently support Codex.
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
@@ -12,7 +12,7 @@ mcp_server/
|
||||
├── bridge.py # Connection-only, lightweight stdio -> local HTTP
|
||||
├── shared.py # Tools hosted in the user-started web process
|
||||
├── catalog.json # Offline schemas; regenerate with scripts/generate_mcp_catalog.py
|
||||
├── rules.md # AI Agent Testing Mindset & system prompt rules for IDEs
|
||||
├── rules.md # Compatibility link to the official artemis-use Skill
|
||||
├── background/ # Background process execution
|
||||
│ └── task_runner.py # Subprocess runner for Artemis Agent
|
||||
├── notifiers/ # Multi-environment notification adapters
|
||||
@@ -50,17 +50,9 @@ When you start an asynchronous mobile test via `mobile_run_task`, the user-start
|
||||
| **OpenClaw / Slack / Discord / CI/CD** | **HTTP Webhook (`WebhookNotifier`)** | Sends structured JSON POST payloads to custom endpoints configured via `OPENCLAW_WEBHOOK_URL`, `MCP_NOTIFICATION_WEBHOOK`, or `ARTEMIS_WEBHOOK_URL`. |
|
||||
| **Universal Custom IDE / CLI Hooks** | **Custom Script Hook (`ScriptNotifier`)** | Set `ARTEMIS_NOTIFY_CMD="my-script --title '{title}' --message '{message}' --trace-id '{trace_id}'"` in your environment to execute any custom command or script upon event completion. |
|
||||
|
||||
## 🧠 AI Agent Behavioral Rules (`rules.md`)
|
||||
## Official Codex Skill
|
||||
|
||||
When connecting ARTEMIS to AI coding assistants like **Antigravity**, **Claude Code**, **Cursor**, or **Windsurf**, providing the assistant with domain-specific testing discipline is critical for generating reliable test code.
|
||||
|
||||
The included [`rules.md`](./rules.md) file contains the **Mobile Testing Mindset (ARTEMIS Integration)** guideline. It teaches the AI agent how to properly collaborate with ARTEMIS:
|
||||
|
||||
1. **The Runnable Code Principle & Active Exploration**: Instructs the AI to never guess or hallucinate UI transitions. Instead, it must first explore the live app via ARTEMIS MCP tools (`mobile_run_task`, etc.) to discover and verify real-world interaction paths before writing test scripts.
|
||||
2. **Flash vs. Pro Routing Strategy**: Guides the AI to choose **Flash** for rapid, straightforward UI actions (no step cap by default) and **Pro** for tasks that need a persistent plan, verified checkpoints, polling loops, or ADB / video / log diagnosis.
|
||||
3. **Latency & Timing Compensation**: Clarifies the difference between AI exploratory latency (e.g., model decision intervals) and the deterministic timing requirements of final test code.
|
||||
4. **"Dynamic-First, Coordinate-Fallback" Locator Pattern**: Teaches the AI to prioritize dynamic UI locators (Resource IDs, OCR text, semantics) for layout resilience, while implementing absolute coordinate fallbacks for maximum execution reliability.
|
||||
5. **Environment Self-Diagnosis**: Tells the AI to call `mobile_diagnose` first whenever a tool errors or the user says ARTEMIS is not working, and how to act on the returned fix list (run local commands itself, relay device prompts to the user, never move API keys through the chat, reload the MCP server after config changes).
|
||||
[`artemis-use`](../skills/artemis-use/SKILL.md) explains Flash, Pro and guided exploration, task diagnosis, evidence review, batching and plugin development. Detailed references load only when relevant. Its whole official directory is maintained by ARTEMIS; no global rule block is injected into AGENTS.md.
|
||||
|
||||
### How Global Rules & MCP are Installed
|
||||
Only Codex configuration is installed: `uv run artemis mcp --install codex`. It preserves other clients and services. The user starts the web service with `start.bat`, `start-cn.bat`, or `uv run artemis ui`. The stdio bridge never starts a backend or standalone worker; all tool execution shares the web process. Offline initialization and tools/list still work, while tool calls explain how to start the service. Codex configuration is optional (`required = false`) so failures cannot block unrelated sessions. Reload both the web process and old MCP connections after upgrading.
|
||||
@@ -97,16 +89,14 @@ uv run artemis mcp
|
||||
### IDE Configuration
|
||||
|
||||
#### One-Click Auto Install (Recommended)
|
||||
Run the automated installer to detect and configure your IDE (Antigravity, Cursor, Claude Code/Desktop, OpenClaw):
|
||||
Start ARTEMIS normally to synchronize Codex, or repair the integration explicitly:
|
||||
```bash
|
||||
uv run artemis mcp --install all
|
||||
# Or install specifically for Antigravity:
|
||||
uv run artemis mcp --install antigravity
|
||||
uv run artemis mcp --install codex
|
||||
```
|
||||
|
||||
#### Manual JSON Config Generation
|
||||
Run `uv run artemis mcp --generate-config antigravity` (or `all`) to output ready-to-use configuration JSON with resolved `.venv` Python and project paths.
|
||||
Run `uv run artemis mcp --generate-config codex` to output a configuration template with resolved Python and project paths.
|
||||
|
||||
## 完整 AI 自动化
|
||||
|
||||
新增 `mobile_workspace`、`mobile_config`、`mobile_task_file`、`mobile_batch`、`mobile_search_history`、`mobile_export_report`,与网页共用后台服务。参见 [接入说明](../docs/ai-automation.md) 和 [Skill](../skills/artemis-automation/SKILL.md)。更新已有客户端后重新安装/加载 MCP,以刷新工具白名单。
|
||||
工作区工具与网页共用后台服务,覆盖普通与探索任务、批次、历史、诊断、人工复验及报告导出。参见 [接入说明](../docs/ai-automation.md) 和 [Skill](../skills/artemis-use/SKILL.md)。网页启动时同步官方 Skill 与 MCP 接入;已有审批策略及工具白名单保留。更新后重新加载 MCP 才能使用新版工具定义。
|
||||
Reference in new issue
Block a user