mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-09-05 20:43:46 +08:00
fix(web-access): 将外部浏览器启动建议标记为仅展示 (#99)
## 中文 - 将 `debug_port_closed` 的模型可见字段从 `launchCommand` 收紧为 `manualLaunchCommand` - 明确 `requiredAction=wait_for_user_to_launch_browser` 与 `commandPolicy=display_only_never_execute` - 中英 Skill 与 CDP 参考文档同步要求结束回合,禁止交给 Bash、PowerShell、终端或脚本执行 ## English - Rename the model-facing closed-port suggestion to `manualLaunchCommand` - Define `requiredAction=wait_for_user_to_launch_browser` and `commandPolicy=display_only_never_execute` - Keep the English/Chinese skill and CDP reference aligned: end the turn and never pass the suggestion to an execution tool ## Validation - i18n validator: pass - translation freshness check: pass - Windows real-device evidence: the previous contract correctly detected `debug_port_closed` but attempted a Bash launch; approval was denied before execution
This commit is contained in:
@@ -308,12 +308,17 @@ print(clean_md)
|
||||
|
||||
Do not guess that the browser is merely closed. Call `BrowserExternalProbe` again:
|
||||
|
||||
- `debug_port_closed` → show its current `launchCommand` and wait for the user
|
||||
- `debug_port_closed` → show its current `launchCommand`, end the turn, and wait for the user;
|
||||
`commandPolicy: display_only_never_execute` forbids passing it to Bash, PowerShell, a terminal,
|
||||
a script, or any other execution tool even when the user previously said “continue”
|
||||
- `browser_mismatch` → report the actual/requested products and ask the user to correct or approve the change
|
||||
- `browser_not_installed` → report that exact installation fact; alternatives require explicit approval
|
||||
- `invalid_cdp_endpoint` → tell the user the port is not a valid CDP endpoint
|
||||
- still `ready` → report the Playwright attach failure separately; do not switch to the built-in browser
|
||||
|
||||
Released 10.0.128 clients can include `launchCommand` on other statuses for compatibility. Never
|
||||
execute it from any status. Only display it for `debug_port_closed`; ignore it for every other status.
|
||||
|
||||
### `browser.contexts[0]` is empty
|
||||
|
||||
The approved external Chromium browser is running but no windows are open. Ask the user to open at least one tab and navigate anywhere.
|
||||
|
||||
Reference in New Issue
Block a user