yunti-browser-runtime 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mcp/tools.js CHANGED
@@ -1359,6 +1359,8 @@ export function toolUsageHints(args = {}) {
1359
1359
  "After yunti_new_page, use the returned browserSessionId for follow-up calls on the new tab.",
1360
1360
  "Sessions expire quickly when the extension stops polling; stale-session errors include the reason and recovery hint.",
1361
1361
  "If a tool call fails due to parameters, inspect this hint output and the tool schema before retrying.",
1362
+ "In 0.2.1+, default observe-first page actions avoid automatic Chrome debugger attachment; prefer yunti_observe_page plus fresh-uid yunti_click/yunti_hover/yunti_fill/yunti_select/yunti_scroll/yunti_type_text/yunti_press_key on anti-debug-sensitive pages.",
1363
+ "Chrome debugger banners may still appear for explicit low-level or advanced tools such as yunti_cdp_send_command, raw CDP diagnostics, performance tracing, screenshot fallback paths, drag, upload, emulation, resize, or legacy snapshot compatibility.",
1362
1364
  "Prefer sanitized diagnostics before raw CDP events; screenshots are visible pixels and are not DOM-redacted.",
1363
1365
  ],
1364
1366
  workflows: {
@@ -1397,6 +1399,7 @@ export function toolUsageHints(args = {}) {
1397
1399
  "Call yunti_get_tool_usage_hints when tool usage is uncertain.",
1398
1400
  "Call yunti_list_browser_targets and choose the intended browserSessionId.",
1399
1401
  "Call yunti_observe_page before page actions and use fresh uids whenever possible.",
1402
+ "On anti-debug-sensitive pages, stay on the default observe-first action tools; do not switch to CDP unless explicitly needed.",
1400
1403
  "After every action, verify by observing again or using snapshot, evaluate, screenshot, network, or console tools.",
1401
1404
  "For async rendering, validation, navigation, option loading, or infinite scroll, call yunti_wait_for, then yunti_observe_page, then continue with a fresh uid.",
1402
1405
  "If a result has ok=false, code, recoveryHint, or nextStepHint, follow that guidance before retrying.",
@@ -1420,6 +1423,7 @@ export function toolUsageHints(args = {}) {
1420
1423
  "Ask me before submitting, deleting, approving, purchasing, publishing, uploading sensitive files, or changing production data.",
1421
1424
  "Do not expose raw cookies, passwords, auth headers, tokens, private keys, or other secrets.",
1422
1425
  "Prefer sanitized diagnostics; use raw CDP or screenshots only when needed, and summarize safe findings.",
1426
+ "On anti-debug-sensitive pages, use observe-first page actions because 0.2.1+ avoids automatic Chrome debugger attachment on the default action path.",
1423
1427
  ],
1424
1428
  minimalUseCases: {
1425
1429
  clickByUid: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yunti-browser-runtime",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Local browser runtime and MCP tools for AI agents.",
6
6
  "license": "MIT",
package/scripts/doctor.js CHANGED
@@ -120,7 +120,8 @@ function buildNextSteps(checks) {
120
120
  steps.push("Save the same token in the extension popup.")
121
121
  }
122
122
  if (checks.bridge.ok && !checks.bridge.extensionConnected) {
123
- steps.push("Load the extension, open an http/https page, then refresh the target page.")
123
+ steps.push("Load or reload the extension and open an http/https page; Yunti will auto-register accessible tabs.")
124
+ steps.push("If no page appears after a few seconds, refresh the target page as a fallback.")
124
125
  steps.push(`Open the optional local console for live status: ${checks.bridge.consoleUrl}.`)
125
126
  }
126
127
  if (!checks.mcpServer.ok) {
@@ -92,6 +92,8 @@ Ask the user before submitting, deleting, approving, purchasing, publishing, upl
92
92
 
93
93
  ## CDP Rules
94
94
 
95
+ - In `0.2.1+`, default observe-first page actions avoid automatic Chrome debugger attachment. `yunti_observe_page`, fresh-uid `yunti_click`, `yunti_hover`, `yunti_fill`, `yunti_select`, `yunti_scroll`, `yunti_type_text`, and `yunti_press_key` should be the first choice on anti-debug or anti-bot-sensitive pages.
96
+ - Chrome may still show its debugger banner when using explicit low-level or advanced tools, including `yunti_cdp_send_command`, raw CDP event diagnostics, performance tracing, screenshot fallback paths, drag, upload, emulation, resize, and legacy snapshot compatibility. Use those only when the task truly needs them.
95
97
  - Never run CDP method names in a terminal or shell.
96
98
  - Always call CDP through `yunti_cdp_send_command`.
97
99
  - `yunti_cdp_send_command` requires `method`; `params` is optional but must be an object when provided.
@@ -192,7 +194,7 @@ Ask the user before submitting, deleting, approving, purchasing, publishing, upl
192
194
 
193
195
  ## Recovery
194
196
 
195
- - No connected tab: ask the user to open a page, load the extension, or refresh the page.
197
+ - No connected tab: call `yunti_list_browser_targets` or doctor first so Yunti can auto-register accessible tabs; ask the user to refresh only when the page remains invisible because of browser restrictions or a failed injection.
196
198
  - Stale session: call `yunti_list_browser_targets` and use the latest `browserSessionId`.
197
199
  - Stale or missing page uid: observe again once `yunti_observe_page` is available, or take a fresh snapshot for compatibility workflows.
198
200
  - Wrong tab: use `yunti_list_browser_targets` to find the intended tab, then route CDP with that tab's `tabId` or `targetId`.