openwork-docker-chrome-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Quick Usage (Already Configured)

快速使用(已配置完成)

1) Start the dev stack (Docker)

1) 启动开发栈(Docker)

Run from the OpenWork repo root:
bash
packaging/docker/dev-up.sh
This prints:
  • Web UI URL (http://localhost:<WEB_PORT>)
  • OpenWork server URL (http://localhost:<OPENWORK_PORT>)
  • Token file path (
    tmp/.dev-env-<id>
    ) containing
    OPENWORK_TOKEN
    +
    OPENWORK_HOST_TOKEN
  • A
    docker compose ... down
    command that stops this stack
在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:
  1. Open the printed Web UI URL.
  2. Navigate to the session/chat surface (typically
    /session
    ).
  3. Send a message (example:
    smoke: hello from chrome mcp
    ).
  4. Confirm a response renders in the UI.
Chrome MCP tool recipe (typical):
  • chrome-devtools_list_pages
    (optional: see existing tabs)
  • chrome-devtools_new_page
    with the Web UI URL (or
    chrome-devtools_navigate_page
    if a page is already open)
  • chrome-devtools_take_snapshot
    to locate the chat input + Send button uids
  • chrome-devtools_fill
    the chat input uid with your message
  • chrome-devtools_click
    the Send button uid
  • chrome-devtools_wait_for
    a distinctive piece of response text (or re-snapshot until the response appears)
  • chrome-devtools_take_screenshot
    (save to
    /tmp/...png
    when possible)
  • 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.
基础验证步骤:
  1. 打开输出的Web UI地址。
  2. 导航到会话/聊天界面(通常为
    /session
    路径)。
  3. 发送一条消息(示例:
    smoke: hello from chrome mcp
    )。
  4. 确认UI中显示了响应内容。
Chrome MCP工具典型操作流程:
  • chrome-devtools_list_pages
    (可选:查看现有标签页)
  • 使用
    chrome-devtools_new_page
    打开Web UI地址(如果已有页面打开,可使用
    chrome-devtools_navigate_page
  • chrome-devtools_take_snapshot
    定位聊天输入框和发送按钮的唯一标识(uid)
  • chrome-devtools_fill
    向聊天输入框的uid中填入消息内容
  • chrome-devtools_click
    点击发送按钮的uid
  • 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
docker compose -p ... down
command printed by
dev-up.sh
.
If 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.sh
输出的完整
docker compose -p ... down
命令。
如果丢失了该命令,可以通过以下方式查找项目名称:
bash
docker ps --format '{{.Names}}' | rg '^openwork-dev-'
然后停止栈(替换
<project>
为实际项目名):
bash
docker compose -p <project> -f packaging/docker/docker-compose.dev.yml down

Required 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中进行端到端验证。
  • 只有当变更通过
    packaging/docker/dev-up.sh
    启动的Docker开发栈,并通过Chrome MCP验证成功后,才视为“完成”。

Common Gotchas

常见注意事项

  • Docker is required (and the
    docker
    CLI must be available on PATH).
  • dev-up.sh
    uses random host ports; do not assume
    5173
    /
    8787
    .
  • If the UI looks up but is disconnected, confirm you opened the printed URL and that headless is healthy.
  • 必须安装Docker(且
    docker
    命令行工具需在系统PATH中可用)。
  • dev-up.sh
    使用随机主机端口;请勿默认使用
    5173
    /
    8787
    端口。
  • 若UI已加载但处于断开状态,请确认你打开的是输出的地址,且无头服务运行正常。