openwork-docker-chrome-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuick Usage (Already Configured)
快速使用(已配置完成)
1) Start the dev stack (Docker)
1) 启动开发栈(Docker)
Run from the OpenWork repo root:
bash
packaging/docker/dev-up.shThis prints:
- Web UI URL (http://localhost:<WEB_PORT>)
- OpenWork server URL (http://localhost:<OPENWORK_PORT>)
- Token file path () containing
tmp/.dev-env-<id>+OPENWORK_TOKENOPENWORK_HOST_TOKEN - A command that stops this stack
docker compose ... down
在OpenWork仓库根目录下运行:
bash
packaging/docker/dev-up.sh运行后会输出:
- Web UI 地址(http://localhost:<WEB_PORT>)
- OpenWork 服务器地址(http://localhost:<OPENWORK_PORT>)
- 包含和
OPENWORK_TOKEN的令牌文件路径(OPENWORK_HOST_TOKEN)tmp/.dev-env-<id> - 用于停止该栈的命令
docker compose ... down
2) Verify a real UI flow (Chrome MCP)
2) 验证真实UI流程(Chrome MCP)
Minimum gate:
- Open the printed Web UI URL.
- Navigate to the session/chat surface (typically ).
/session - Send a message (example: ).
smoke: hello from chrome mcp - Confirm a response renders in the UI.
Chrome MCP tool recipe (typical):
- (optional: see existing tabs)
chrome-devtools_list_pages - with the Web UI URL (or
chrome-devtools_new_pageif a page is already open)chrome-devtools_navigate_page - to locate the chat input + Send button uids
chrome-devtools_take_snapshot - the chat input uid with your message
chrome-devtools_fill - the Send button uid
chrome-devtools_click - a distinctive piece of response text (or re-snapshot until the response appears)
chrome-devtools_wait_for - (save to
chrome-devtools_take_screenshotwhen possible)/tmp/...png - If debugging:
chrome-devtools_list_console_messages
Evidence:
- Take a Chrome MCP screenshot after the response appears.
- If something fails, capture console logs and (optionally) Docker logs.
基础验证步骤:
- 打开输出的Web UI地址。
- 导航到会话/聊天界面(通常为路径)。
/session - 发送一条消息(示例:)。
smoke: hello from chrome mcp - 确认UI中显示了响应内容。
Chrome MCP工具典型操作流程:
- (可选:查看现有标签页)
chrome-devtools_list_pages - 使用打开Web UI地址(如果已有页面打开,可使用
chrome-devtools_new_page)chrome-devtools_navigate_page - 定位聊天输入框和发送按钮的唯一标识(uid)
chrome-devtools_take_snapshot - 向聊天输入框的uid中填入消息内容
chrome-devtools_fill - 点击发送按钮的uid
chrome-devtools_click - 等待响应文本中出现特征内容(或重新截图直到响应出现)
chrome-devtools_wait_for - (尽可能保存到
chrome-devtools_take_screenshot路径)/tmp/...png - 调试时:
chrome-devtools_list_console_messages
验证证据:
- 响应出现后使用Chrome MCP截取屏幕截图。
- 若出现失败,捕获控制台日志以及(可选)Docker日志。
3) Stop the stack
3) 停止开发栈
Use the exact command printed by .
docker compose -p ... downdev-up.shIf you lost it, you can find the project name via:
bash
docker ps --format '{{.Names}}' | rg '^openwork-dev-'Then stop it (replace ):
<project>bash
docker compose -p <project> -f packaging/docker/docker-compose.dev.yml down使用输出的完整命令。
dev-up.shdocker compose -p ... down如果丢失了该命令,可以通过以下方式查找项目名称:
bash
docker ps --format '{{.Names}}' | rg '^openwork-dev-'然后停止栈(替换为实际项目名):
<project>bash
docker compose -p <project> -f packaging/docker/docker-compose.dev.yml downRequired Gate (Non-Negotiable)
强制要求(不可协商)
- Any user-facing change or change that touches remote behavior must be validated end-to-end in the running UI.
- The change is not "done" until it succeeds via Chrome MCP against the Docker dev stack started by .
packaging/docker/dev-up.sh
- 任何面向用户的变更或涉及远程行为的变更,都必须在运行中的UI中进行端到端验证。
- 只有当变更通过启动的Docker开发栈,并通过Chrome MCP验证成功后,才视为“完成”。
packaging/docker/dev-up.sh
Common Gotchas
常见注意事项
- Docker is required (and the CLI must be available on PATH).
docker - uses random host ports; do not assume
dev-up.sh/5173.8787 - If the UI looks up but is disconnected, confirm you opened the printed URL and that headless is healthy.
- 必须安装Docker(且命令行工具需在系统PATH中可用)。
docker - 使用随机主机端口;请勿默认使用
dev-up.sh/5173端口。8787 - 若UI已加载但处于断开状态,请确认你打开的是输出的地址,且无头服务运行正常。