@nexum-hub/browser 0.0.4-next.25 → 1.0.1-next.27

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.
Files changed (50) hide show
  1. package/README.md +1 -1
  2. package/browser-extension/build.mjs +9 -1
  3. package/browser-extension/dist/development/icon-128.png +0 -0
  4. package/browser-extension/dist/development/icon-16.png +0 -0
  5. package/browser-extension/dist/development/icon-32.png +0 -0
  6. package/browser-extension/dist/development/icon-48.png +0 -0
  7. package/browser-extension/dist/development/manifest.json +14 -2
  8. package/browser-extension/dist/development/profile.js +1 -1
  9. package/browser-extension/dist/development/worker.js +4 -0
  10. package/browser-extension/dist/production/icon-128.png +0 -0
  11. package/browser-extension/dist/production/icon-16.png +0 -0
  12. package/browser-extension/dist/production/icon-32.png +0 -0
  13. package/browser-extension/dist/production/icon-48.png +0 -0
  14. package/browser-extension/dist/production/manifest.json +14 -2
  15. package/browser-extension/dist/production/profile.js +1 -1
  16. package/browser-extension/dist/production/worker.js +4 -0
  17. package/browser-extension/icon-128.png +0 -0
  18. package/browser-extension/icon-16.png +0 -0
  19. package/browser-extension/icon-32.png +0 -0
  20. package/browser-extension/icon-48.png +0 -0
  21. package/browser-extension/release-info.json +2 -2
  22. package/browser-extension/worker.js +4 -0
  23. package/dist/client/index.js +0 -4
  24. package/dist/client/routes.js +0 -2
  25. package/dist/client/types.d.ts +0 -5
  26. package/dist/extension/index.js +13 -25
  27. package/dist/extension/service.js +1 -1
  28. package/implementation.json +2 -29
  29. package/instructions/README.md +2 -1
  30. package/package.json +3 -5
  31. package/skills/browser-control/SKILL.md +24 -11
  32. package/skills/browser-control/references/advanced.md +13 -0
  33. package/skills/browser-control/references/api-index.md +179 -0
  34. package/skills/browser-control/references/api-members.md +578 -0
  35. package/{docs → skills/browser-control/references}/api.md +17 -7
  36. package/skills/browser-control/references/bootstrap.md +19 -0
  37. package/skills/browser-control/references/connection.md +11 -0
  38. package/{docs/lifecycle.md → skills/browser-control/references/diagnostics.md} +14 -0
  39. package/skills/browser-control/references/downloads.md +71 -0
  40. package/skills/browser-control/references/errors.md +28 -0
  41. package/skills/browser-control/references/forms.md +45 -0
  42. package/skills/browser-control/references/interaction.md +36 -0
  43. package/skills/browser-control/references/lifecycle.md +11 -0
  44. package/skills/browser-control/references/observation.md +18 -0
  45. package/skills/browser-control/references/scripts.md +17 -0
  46. package/skills/browser-control/references/tabs-and-observation.md +40 -0
  47. package/skills/browser-control/references/takeover.md +11 -0
  48. package/docs/README.md +0 -8
  49. package/docs/connection.md +0 -9
  50. package/docs/usage.md +0 -120
@@ -0,0 +1,578 @@
1
+ # Browser SDK 成员定位
2
+
3
+ 已知方法或属性名称时先**按关键字搜索**本文件的匹配行(而非整篇加载),确认所属类型和行号;只按需要读取 [完整 SDK 类型](api.md) 的相应部分。若成员使用其他入参类型,再从 [类型索引](api-index.md) 补读对应定义。
4
+
5
+ | 所属公开类型 | 方法或属性 | api.md 第几行 |
6
+ | --- | --- | ---: |
7
+ | `BrowserCapabilityCollection` | `get` | 15 |
8
+ | `BrowserCapabilityCollection` | `get` | 16 |
9
+ | `BrowserCapabilityCollection` | `get` | 17 |
10
+ | `BrowserCapabilityCollection` | `get` | 18 |
11
+ | `BrowserCapabilityCollection` | `list` | 19 |
12
+ | `BrowserHistoryOptions` | `from` | 23 |
13
+ | `BrowserHistoryOptions` | `limit` | 24 |
14
+ | `BrowserHistoryOptions` | `queries` | 25 |
15
+ | `BrowserHistoryOptions` | `to` | 26 |
16
+ | `BrowserHistoryEntry` | `dateVisited` | 30 |
17
+ | `BrowserHistoryEntry` | `title` | 31 |
18
+ | `BrowserHistoryEntry` | `url` | 32 |
19
+ | `BrowserDownloadRecord` | `id` | 37 |
20
+ | `BrowserDownloadRecord` | `filename` | 38 |
21
+ | `BrowserDownloadRecord` | `state` | 39 |
22
+ | `BrowserDownloadRecord` | `startTime` | 40 |
23
+ | `BrowserDownloadRecord` | `endTime` | 41 |
24
+ | `BrowserDownloadRecord` | `fileSize` | 42 |
25
+ | `BrowserDownloadRecord` | `totalBytes` | 43 |
26
+ | `BrowserDownloadRecord` | `bytesReceived` | 44 |
27
+ | `BrowserDownloadRecord` | `mime` | 45 |
28
+ | `BrowserDownloadRecord` | `exists` | 46 |
29
+ | `BrowserUserTabInfo` | `id` | 50 |
30
+ | `BrowserUserTabInfo` | `lastOpened` | 51 |
31
+ | `BrowserUserTabInfo` | `providerTabId` | 52 |
32
+ | `BrowserUserTabInfo` | `tabGroup` | 53 |
33
+ | `BrowserUserTabInfo` | `title` | 54 |
34
+ | `BrowserUserTabInfo` | `url` | 55 |
35
+ | `TabsContentOptions` | `contentType` | 86 |
36
+ | `TabsContentOptions` | `timeoutMs` | 87 |
37
+ | `TabsContentOptions` | `urls` | 88 |
38
+ | `TabsContentResult` | `truncated` | 92 |
39
+ | `TabsContentResult` | `content` | 93 |
40
+ | `TabsContentResult` | `title` | 94 |
41
+ | `TabsContentResult` | `url` | 95 |
42
+ | `TabInfo` | `id` | 99 |
43
+ | `TabInfo` | `providerTabId` | 100 |
44
+ | `TabInfo` | `title` | 101 |
45
+ | `TabInfo` | `url` | 102 |
46
+ | `TabCapabilityCollection` | `get` | 106 |
47
+ | `TabCapabilityCollection` | `get` | 107 |
48
+ | `TabCapabilityCollection` | `get` | 108 |
49
+ | `TabCapabilityCollection` | `get` | 109 |
50
+ | `TabCapabilityCollection` | `list` | 110 |
51
+ | `ScreenshotOptions` | `clip` | 117 |
52
+ | `ScreenshotOptions` | `fullPage` | 118 |
53
+ | `ScreenshotOptions` | `quality` | 119 |
54
+ | `ScreenshotOptions` | `maxEdgePx` | 120 |
55
+ | `AXPoint` | `x` | 123 |
56
+ | `AXPoint` | `y` | 123 |
57
+ | `AXClickOptions` | `clickCount` | 126 |
58
+ | `AXClickOptions` | `duration` | 127 |
59
+ | `AXClickOptions` | `key` | 128 |
60
+ | `AXClickOptions` | `mouseButton` | 129 |
61
+ | `AXStateOptions` | `disableDiffing` | 133 |
62
+ | `AXPasteOptions` | `format` | 137 |
63
+ | `AXPressKeyOptions` | `duration` | 141 |
64
+ | `AXSelectTextOptions` | `prefix` | 148 |
65
+ | `AXSelectTextOptions` | `selectionType` | 149 |
66
+ | `AXSelectTextOptions` | `suffix` | 150 |
67
+ | `ClickOptions` | `button` | 154 |
68
+ | `ClickOptions` | `keypress` | 155 |
69
+ | `ClickOptions` | `x` | 156 |
70
+ | `ClickOptions` | `y` | 157 |
71
+ | `DoubleClickOptions` | `keypress` | 161 |
72
+ | `DoubleClickOptions` | `x` | 162 |
73
+ | `DoubleClickOptions` | `y` | 163 |
74
+ | `CuaDownloadMediaOptions` | `timeoutMs` | 167 |
75
+ | `CuaDownloadMediaOptions` | `x` | 168 |
76
+ | `CuaDownloadMediaOptions` | `y` | 169 |
77
+ | `DragOptions` | `keys` | 173 |
78
+ | `DragOptions` | `path` | 174 |
79
+ | `KeypressOptions` | `duration` | 178 |
80
+ | `KeypressOptions` | `keys` | 179 |
81
+ | `MoveOptions` | `keys` | 183 |
82
+ | `MoveOptions` | `x` | 184 |
83
+ | `MoveOptions` | `y` | 185 |
84
+ | `ScrollOptions` | `keypress` | 189 |
85
+ | `ScrollOptions` | `scrollX` | 190 |
86
+ | `ScrollOptions` | `scrollY` | 191 |
87
+ | `ScrollOptions` | `x` | 192 |
88
+ | `ScrollOptions` | `y` | 193 |
89
+ | `TypeOptions` | `text` | 197 |
90
+ | `DomClickOptions` | `node_id` | 201 |
91
+ | `DomDownloadMediaOptions` | `node_id` | 205 |
92
+ | `DomDownloadMediaOptions` | `timeoutMs` | 206 |
93
+ | `DomKeypressOptions` | `keys` | 210 |
94
+ | `DomScrollOptions` | `node_id` | 214 |
95
+ | `DomScrollOptions` | `x` | 215 |
96
+ | `DomScrollOptions` | `y` | 216 |
97
+ | `DomTypeOptions` | `text` | 220 |
98
+ | `ElementInfoOptions` | `includeNonInteractable` | 224 |
99
+ | `ElementInfoOptions` | `x` | 225 |
100
+ | `ElementInfoOptions` | `y` | 226 |
101
+ | `ElementInfo` | `ariaName` | 230 |
102
+ | `ElementInfo` | `boundingBox` | 231 |
103
+ | `ElementInfo` | `nodeId` | 232 |
104
+ | `ElementInfo` | `preview` | 233 |
105
+ | `ElementInfo` | `role` | 234 |
106
+ | `ElementInfo` | `selector` | 235 |
107
+ | `ElementInfo` | `tagName` | 236 |
108
+ | `ElementInfo` | `testId` | 237 |
109
+ | `ElementInfo` | `visibleText` | 238 |
110
+ | `ElementScreenshotOptions` | `includeNonInteractable` | 242 |
111
+ | `ElementScreenshotOptions` | `x` | 243 |
112
+ | `ElementScreenshotOptions` | `y` | 244 |
113
+ | `PlaywrightEvaluateOptions` | `timeoutMs` | 250 |
114
+ | `WaitForEventOptions` | `timeoutMs` | 258 |
115
+ | `PageWaitForLoadStateOptions` | `state` | 262 |
116
+ | `PageWaitForLoadStateOptions` | `timeoutMs` | 263 |
117
+ | `PageWaitForURLOptions` | `timeoutMs` | 267 |
118
+ | `PageWaitForURLOptions` | `waitUntil` | 268 |
119
+ | `LocatorCheckOptions` | `timeoutMs` | 272 |
120
+ | `LocatorClickOptions` | `button` | 276 |
121
+ | `LocatorClickOptions` | `clickCount` | 277 |
122
+ | `LocatorClickOptions` | `position` | 278 |
123
+ | `LocatorClickOptions` | `modifiers` | 279 |
124
+ | `LocatorClickOptions` | `timeoutMs` | 280 |
125
+ | `LocatorClickOptions` | `expect` | 282 |
126
+ | `LocatorDownloadMediaOptions` | `timeoutMs` | 286 |
127
+ | `LocatorFilterOptions` | `has` | 294 |
128
+ | `LocatorFilterOptions` | `hasNot` | 295 |
129
+ | `LocatorFilterOptions` | `hasNotText` | 296 |
130
+ | `LocatorFilterOptions` | `hasText` | 297 |
131
+ | `LocatorFilterOptions` | `visible` | 298 |
132
+ | `LocatorLocatorOptions` | `has` | 302 |
133
+ | `LocatorLocatorOptions` | `hasNot` | 303 |
134
+ | `LocatorLocatorOptions` | `hasNotText` | 304 |
135
+ | `LocatorLocatorOptions` | `hasText` | 305 |
136
+ | `LocatorPressSequentiallyOptions` | `timeoutMs` | 309 |
137
+ | `LocatorWaitForOptions` | `state` | 315 |
138
+ | `LocatorWaitForOptions` | `timeoutMs` | 316 |
139
+ | `TabClipboardItem` | `entries` | 322 |
140
+ | `TabClipboardItem` | `presentationStyle` | 323 |
141
+ | `TabDevLogsOptions` | `filter` | 327 |
142
+ | `TabDevLogsOptions` | `levels` | 328 |
143
+ | `TabDevLogsOptions` | `limit` | 329 |
144
+ | `TabDevLogEntry` | `level` | 333 |
145
+ | `TabDevLogEntry` | `message` | 334 |
146
+ | `TabDevLogEntry` | `timestamp` | 335 |
147
+ | `TabDevLogEntry` | `url` | 336 |
148
+ | `ClipRect` | `height` | 342 |
149
+ | `ClipRect` | `width` | 343 |
150
+ | `ClipRect` | `x` | 344 |
151
+ | `ClipRect` | `y` | 345 |
152
+ | `ElementInfoRect` | `height` | 353 |
153
+ | `ElementInfoRect` | `width` | 354 |
154
+ | `ElementInfoRect` | `x` | 355 |
155
+ | `ElementInfoRect` | `y` | 356 |
156
+ | `ElementInfoSelector` | `candidates` | 360 |
157
+ | `ElementInfoSelector` | `frameSelectors` | 361 |
158
+ | `ElementInfoSelector` | `primary` | 362 |
159
+ | `SelectOptionDescriptor` | `index` | 373 |
160
+ | `SelectOptionDescriptor` | `label` | 374 |
161
+ | `SelectOptionDescriptor` | `value` | 375 |
162
+ | `BrowserTarget` | `browserId` | 385 |
163
+ | `BrowserTarget` | `tabId` | 386 |
164
+ | `BrowserTarget` | `generation` | 387 |
165
+ | `BrowserTarget` | `bootId` | 388 |
166
+ | `BrowserTarget` | `browserSessionId` | 389 |
167
+ | `BrowserTarget` | `controlEpoch` | 391 |
168
+ | `BrowserTarget` | `pageVersion` | 392 |
169
+ | `BrowserTab` | `browserId` | 417 |
170
+ | `BrowserTab` | `tabId` | 418 |
171
+ | `BrowserTab` | `generation` | 419 |
172
+ | `BrowserTab` | `bootId` | 420 |
173
+ | `BrowserTab` | `browserSessionId` | 421 |
174
+ | `BrowserTab` | `title` | 422 |
175
+ | `BrowserTab` | `url` | 423 |
176
+ | `BrowserTab` | `active` | 424 |
177
+ | `BrowserTab` | `windowId` | 425 |
178
+ | `BrowserTab` | `groupId` | 426 |
179
+ | `BrowserTab` | `index` | 427 |
180
+ | `BrowserTab` | `pinned` | 428 |
181
+ | `BrowserTab` | `muted` | 429 |
182
+ | `SnapshotNode` | `ref` | 432 |
183
+ | `SnapshotNode` | `role` | 433 |
184
+ | `SnapshotNode` | `name` | 434 |
185
+ | `SnapshotNode` | `value` | 435 |
186
+ | `SnapshotNode` | `disabled` | 436 |
187
+ | `SnapshotNode` | `checked` | 437 |
188
+ | `SnapshotNode` | `children` | 438 |
189
+ | `PageSnapshot` | `browserId` | 441 |
190
+ | `PageSnapshot` | `tabId` | 442 |
191
+ | `PageSnapshot` | `generation` | 443 |
192
+ | `PageSnapshot` | `bootId` | 444 |
193
+ | `PageSnapshot` | `browserSessionId` | 445 |
194
+ | `PageSnapshot` | `pageVersion` | 446 |
195
+ | `PageSnapshot` | `url` | 447 |
196
+ | `PageSnapshot` | `title` | 448 |
197
+ | `PageSnapshot` | `root` | 449 |
198
+ | `PageSnapshot` | `dialog` | 450 |
199
+ | `PageSnapshot` | `truncated` | 451 |
200
+ | `PageSnapshot` | `artifact` | 452 |
201
+ | `ActionResult` | `ok` | 455 |
202
+ | `ActionResult` | `operationId` | 456 |
203
+ | `ActionResult` | `target` | 457 |
204
+ | `ActionResult` | `changed` | 458 |
205
+ | `CapabilityInfo` | `id` | 461 |
206
+ | `CapabilityInfo` | `name` | 462 |
207
+ | `CapabilityInfo` | `title` | 463 |
208
+ | `CapabilityInfo` | `description` | 464 |
209
+ | `CapabilityInfo` | `supported` | 465 |
210
+ | `CapabilityInfo` | `reason` | 466 |
211
+ | `CapabilityInfo` | `revision` | 467 |
212
+ | `WaitResult` | `matched` | 477 |
213
+ | `WaitResult` | `snapshot` | 478 |
214
+ | `PageObservation` | `tabId` | 482 |
215
+ | `PageObservation` | `title` | 483 |
216
+ | `PageObservation` | `url` | 484 |
217
+ | `PageObservation` | `accessibility` | 485 |
218
+ | `PageObservation` | `mode` | 486 |
219
+ | `NavigationOptions` | `waitUntil` | 489 |
220
+ | `NavigationOptions` | `timeoutMs` | 490 |
221
+ | `BrowserWindow` | `id` | 493 |
222
+ | `BrowserWindow` | `focused` | 494 |
223
+ | `BrowserWindow` | `state` | 495 |
224
+ | `BrowserWindow` | `left` | 496 |
225
+ | `BrowserWindow` | `top` | 497 |
226
+ | `BrowserWindow` | `width` | 498 |
227
+ | `BrowserWindow` | `height` | 499 |
228
+ | `BrowserWindow` | `tabs` | 500 |
229
+ | `BrowserTabGroup` | `id` | 503 |
230
+ | `BrowserTabGroup` | `windowId` | 504 |
231
+ | `BrowserTabGroup` | `title` | 505 |
232
+ | `BrowserTabGroup` | `color` | 506 |
233
+ | `BrowserTabGroup` | `collapsed` | 507 |
234
+ | `BrowserBookmark` | `id` | 510 |
235
+ | `BrowserBookmark` | `parentId` | 511 |
236
+ | `BrowserBookmark` | `index` | 512 |
237
+ | `BrowserBookmark` | `title` | 513 |
238
+ | `BrowserBookmark` | `url` | 514 |
239
+ | `BrowserBookmark` | `children` | 515 |
240
+ | `BrowserArtifact` | `path` | 518 |
241
+ | `BrowserArtifact` | `name` | 519 |
242
+ | `BrowserArtifact` | `mimeType` | 520 |
243
+ | `BrowserArtifact` | `size` | 521 |
244
+ | `BrowserArtifact` | `sha256` | 522 |
245
+ | `BrowserDownload` | `id` | 525 |
246
+ | `BrowserDownload` | `target` | 526 |
247
+ | `BrowserDownload` | `url` | 527 |
248
+ | `BrowserDownload` | `suggestedFilename` | 528 |
249
+ | `BrowserDownload` | `state` | 529 |
250
+ | `BrowserDownload` | `bytesReceived` | 530 |
251
+ | `BrowserDownload` | `totalBytes` | 531 |
252
+ | `BrowserDownload` | `error` | 532 |
253
+ | `ManagementAuditEntry` | `id` | 535 |
254
+ | `ManagementAuditEntry` | `createdAt` | 536 |
255
+ | `ManagementAuditEntry` | `runId` | 537 |
256
+ | `ManagementAuditEntry` | `operationId` | 538 |
257
+ | `ManagementAuditEntry` | `namespace` | 539 |
258
+ | `ManagementAuditEntry` | `method` | 540 |
259
+ | `ManagementAuditEntry` | `before` | 541 |
260
+ | `ManagementAuditEntry` | `changedIds` | 547 |
261
+ | `ManagementAuditEntry` | `outcome` | 548 |
262
+ | `ManagementCapability` | `windows` | 551 |
263
+ | `ManagementCapability` | `tabs` | 574 |
264
+ | `ManagementCapability` | `tabGroups` | 599 |
265
+ | `ManagementCapability` | `bookmarks` | 616 |
266
+ | `ManagementCapability` | `getAuditTrail` | 637 |
267
+ | `PageAsset` | `id` | 649 |
268
+ | `PageAsset` | `kind` | 650 |
269
+ | `PageAsset` | `name` | 651 |
270
+ | `PageAsset` | `url` | 652 |
271
+ | `PageAsset` | `sources` | 653 |
272
+ | `PageAssetInventory` | `id` | 660 |
273
+ | `PageAssetInventory` | `target` | 661 |
274
+ | `PageAssetInventory` | `assets` | 662 |
275
+ | `PageAssetInventory` | `inlineSvgs` | 663 |
276
+ | `PageAssetInventory` | `pageUrl` | 664 |
277
+ | `PageAssetInventory` | `summary` | 665 |
278
+ | `PageAssetBundle` | `directoryPath` | 672 |
279
+ | `PageAssetBundle` | `manifestPath` | 673 |
280
+ | `PageAssetBundle` | `assets` | 674 |
281
+ | `PageAssetBundle` | `failures` | 679 |
282
+ | `PageAssetBundle` | `summary` | 680 |
283
+ | `PageAssetsCapability` | `list` | 688 |
284
+ | `PageAssetsCapability` | `download` | 689 |
285
+ | `PageAssetsCapability` | `bundle` | 693 |
286
+ | `CdpEvent` | `method` | 703 |
287
+ | `CdpEvent` | `params` | 704 |
288
+ | `CdpEvent` | `sequence` | 705 |
289
+ | `CdpEvent` | `source` | 706 |
290
+ | `CdpEventsOptions` | `afterSequence` | 717 |
291
+ | `CdpEventsOptions` | `limit` | 718 |
292
+ | `CdpEventsOptions` | `methods` | 719 |
293
+ | `CdpEventsOptions` | `target` | 720 |
294
+ | `CdpEventsOptions` | `timeoutMs` | 721 |
295
+ | `CdpCapability` | `send` | 724 |
296
+ | `CdpCapability` | `events` | 729 |
297
+ | `CdpCapability` | `cursor` | 735 |
298
+ | `CdpCapability` | `readEvents` | 736 |
299
+ | `WebMcpTool` | `documentRevision` | 744 |
300
+ | `WebMcpTool` | `registrationRevision` | 745 |
301
+ | `WebMcpTool` | `name` | 746 |
302
+ | `WebMcpTool` | `description` | 747 |
303
+ | `WebMcpTool` | `inputSchema` | 748 |
304
+ | `WebMcpTool` | `annotations` | 749 |
305
+ | `WebMcpTools` | `documentRevision` | 752 |
306
+ | `WebMcpTools` | `registrationRevision` | 753 |
307
+ | `WebMcpTools` | `tools` | 754 |
308
+ | `WebMcpTools` | `invokeTool` | 755 |
309
+ | `WebMcpCapability` | `listTools` | 758 |
310
+ | `WebMcpCapability` | `invokeTool` | 759 |
311
+ | `WebMcpCapability` | `fetchTools` | 760 |
312
+ | `VisibilityCapability` | `get` | 763 |
313
+ | `VisibilityCapability` | `set` | 764 |
314
+ | `ViewportCapability` | `set` | 767 |
315
+ | `ViewportCapability` | `reset` | 772 |
316
+ | `Browser` | `name` | 776 |
317
+ | `Browser` | `type` | 777 |
318
+ | `Browser` | `profileName` | 778 |
319
+ | `Browser` | `windows` | 779 |
320
+ | `Browser` | `tabGroups` | 780 |
321
+ | `Browser` | `bookmarks` | 781 |
322
+ | `Browser` | `management` | 782 |
323
+ | `Browser` | `visibility` | 783 |
324
+ | `Browser` | `viewport` | 784 |
325
+ | `Tabs` | `query` | 787 |
326
+ | `Tabs` | `move` | 794 |
327
+ | `Tabs` | `update` | 798 |
328
+ | `Tabs` | `group` | 802 |
329
+ | `Tabs` | `ungroup` | 807 |
330
+ | `Tabs` | `close` | 808 |
331
+ | `Tab` | `snapshot` | 811 |
332
+ | `Tab` | `click` | 816 |
333
+ | `Tab` | `fill` | 826 |
334
+ | `Tab` | `press` | 831 |
335
+ | `Tab` | `selectOption` | 835 |
336
+ | `Tab` | `scroll` | 839 |
337
+ | `Tab` | `hover` | 845 |
338
+ | `Tab` | `focus` | 849 |
339
+ | `Tab` | `waitFor` | 850 |
340
+ | `Tab` | `locator` | 851 |
341
+ | `Tab` | `evaluate` | 852 |
342
+ | `Tab` | `keyboardDown` | 856 |
343
+ | `Tab` | `keyboardUp` | 857 |
344
+ | `Tab` | `frame` | 858 |
345
+ | `Tab` | `dialogAccept` | 859 |
346
+ | `Tab` | `dialogDismiss` | 860 |
347
+ | `Tab` | `contentExport` | 861 |
348
+ | `Tab` | `exportGsuite` | 864 |
349
+ | `Tab` | `exportYouTubeTranscript` | 867 |
350
+ | `Tab` | `clipboardReadText` | 868 |
351
+ | `Tab` | `clipboardWriteText` | 869 |
352
+ | `Tab` | `clipboardRead` | 870 |
353
+ | `Tab` | `clipboardWrite` | 871 |
354
+ | `Tab` | `setFiles` | 872 |
355
+ | `Tab` | `downloads` | 873 |
356
+ | `Tab` | `saveDownload` | 874 |
357
+ | `Tab` | `setViewport` | 875 |
358
+ | `Tab` | `resetViewport` | 876 |
359
+ | `Tab` | `devLogs` | 877 |
360
+ | `Tab` | `assets` | 880 |
361
+ | `Tab` | `exportFile` | 881 |
362
+ | `Tab` | `webmcp` | 884 |
363
+ | `Tab` | `cdp` | 885 |
364
+ | `Frame` | `snapshot` | 888 |
365
+ | `Frame` | `click` | 889 |
366
+ | `Frame` | `fill` | 893 |
367
+ | `Frame` | `locator` | 898 |
368
+ | `Frame` | `frameLocator` | 899 |
369
+ | `Frame` | `getByLabel` | 900 |
370
+ | `Frame` | `getByPlaceholder` | 904 |
371
+ | `Frame` | `getByRole` | 908 |
372
+ | `Frame` | `getByTestId` | 912 |
373
+ | `Frame` | `getByText` | 913 |
374
+ | `Frame` | `waitFor` | 917 |
375
+ | `PlaywrightAPI` | `waitForDownload` | 920 |
376
+ | `PlaywrightAPI` | `waitForFileChooser` | 921 |
377
+ | `AXAPI` | `snapshot` | 926 |
378
+ | `DomCUAAPI` | `fill` | 933 |
379
+ | `BrowserInfo` | `id` | 936 |
380
+ | `BrowserInfo` | `name` | 937 |
381
+ | `BrowserInfo` | `profileName` | 938 |
382
+ | `BrowserInfo` | `family` | 939 |
383
+ | `BrowserInfo` | `type` | 940 |
384
+ | `BrowserInfo` | `status` | 941 |
385
+ | `BrowserInfo` | `generation` | 942 |
386
+ | `BrowserInfo` | `bootId` | 943 |
387
+ | `BrowserInfo` | `browserSessionId` | 944 |
388
+ | `BrowserInfo` | `metadata` | 945 |
389
+ | `LocatorDescription` | `target` | 973 |
390
+ | `LocatorDescription` | `framePath` | 974 |
391
+ | `LocatorDescription` | `query` | 975 |
392
+ | `BrowserWaiterInfo` | `id` | 978 |
393
+ | `BrowserWaiterInfo` | `target` | 979 |
394
+ | `BrowserWaiterInfo` | `expiresAt` | 980 |
395
+ | `BrowserWaiterMethods` | `arm` | 1004 |
396
+ | `BrowserWaiterMethods` | `get` | 1011 |
397
+ | `BrowserWaiterMethods` | `cancel` | 1012 |
398
+ | `VisibleDomTree` | `target` | 1015 |
399
+ | `VisibleDomTree` | `nodes` | 1016 |
400
+ | `VisibleDomTree` | `truncated` | 1023 |
401
+ | `VisibleDomTree` | `artifact` | 1024 |
402
+ | `BrowserClient` | `browsers` | 1028 |
403
+ | `Browsers` | `get` | 1032 |
404
+ | `Browsers` | `getDefault` | 1033 |
405
+ | `Browsers` | `getForUrl` | 1034 |
406
+ | `Browsers` | `list` | 1035 |
407
+ | `Browser` | `browserId` | 1039 |
408
+ | `Browser` | `capabilities` | 1040 |
409
+ | `Browser` | `downloads` | 1041 |
410
+ | `Browser` | `tabs` | 1044 |
411
+ | `Browser` | `user` | 1045 |
412
+ | `Browser` | `history` | 1046 |
413
+ | `Browser` | `nameSession` | 1047 |
414
+ | `BrowserUser` | `claimTab` | 1051 |
415
+ | `BrowserUser` | `getTabContext` | 1052 |
416
+ | `BrowserUser` | `openTabs` | 1055 |
417
+ | `Tabs` | `content` | 1059 |
418
+ | `Tabs` | `get` | 1060 |
419
+ | `Tabs` | `list` | 1061 |
420
+ | `Tabs` | `new` | 1062 |
421
+ | `Tabs` | `select` | 1063 |
422
+ | `Tabs` | `selected` | 1064 |
423
+ | `Tab` | `ax` | 1068 |
424
+ | `Tab` | `capabilities` | 1069 |
425
+ | `Tab` | `clipboard` | 1070 |
426
+ | `Tab` | `content` | 1071 |
427
+ | `Tab` | `cua` | 1072 |
428
+ | `Tab` | `dev` | 1073 |
429
+ | `Tab` | `dom` | 1074 |
430
+ | `Tab` | `id` | 1075 |
431
+ | `Tab` | `playwright` | 1076 |
432
+ | `Tab` | `goBack` | 1077 |
433
+ | `Tab` | `close` | 1078 |
434
+ | `Tab` | `forward` | 1079 |
435
+ | `Tab` | `getJsDialog` | 1080 |
436
+ | `Tab` | `navigate` | 1081 |
437
+ | `Tab` | `markDeliverable` | 1082 |
438
+ | `Tab` | `markHandoff` | 1083 |
439
+ | `Tab` | `reload` | 1084 |
440
+ | `Tab` | `requestUserTakeover` | 1085 |
441
+ | `Tab` | `requestUserTakeover` | 1086 |
442
+ | `Tab` | `screenshot` | 1089 |
443
+ | `Tab` | `observe` | 1090 |
444
+ | `Tab` | `title` | 1091 |
445
+ | `Tab` | `url` | 1092 |
446
+ | `AXAPI` | `click` | 1096 |
447
+ | `AXAPI` | `drag` | 1097 |
448
+ | `AXAPI` | `get` | 1098 |
449
+ | `AXAPI` | `get` | 1099 |
450
+ | `AXAPI` | `get` | 1100 |
451
+ | `AXAPI` | `paste` | 1104 |
452
+ | `AXAPI` | `performSecondaryAction` | 1109 |
453
+ | `AXAPI` | `pressKey` | 1110 |
454
+ | `AXAPI` | `scroll` | 1115 |
455
+ | `AXAPI` | `selectText` | 1120 |
456
+ | `AXAPI` | `setValue` | 1125 |
457
+ | `AXAPI` | `typeText` | 1126 |
458
+ | `AXAPI` | `write` | 1127 |
459
+ | `AXAPI` | `write` | 1128 |
460
+ | `AXAPI` | `write` | 1129 |
461
+ | `ContentAPI` | `export` | 1133 |
462
+ | `ContentAPI` | `exportGsuite` | 1134 |
463
+ | `ContentAPI` | `exportYouTubeTranscript` | 1137 |
464
+ | `CUAAPI` | `click` | 1141 |
465
+ | `CUAAPI` | `doubleClick` | 1142 |
466
+ | `CUAAPI` | `downloadMedia` | 1143 |
467
+ | `CUAAPI` | `drag` | 1144 |
468
+ | `CUAAPI` | `keypress` | 1145 |
469
+ | `CUAAPI` | `move` | 1146 |
470
+ | `CUAAPI` | `scroll` | 1147 |
471
+ | `CUAAPI` | `type` | 1148 |
472
+ | `DomCUAAPI` | `click` | 1152 |
473
+ | `DomCUAAPI` | `doubleClick` | 1153 |
474
+ | `DomCUAAPI` | `downloadMedia` | 1154 |
475
+ | `DomCUAAPI` | `getVisibleTree` | 1155 |
476
+ | `DomCUAAPI` | `keypress` | 1156 |
477
+ | `DomCUAAPI` | `scroll` | 1157 |
478
+ | `DomCUAAPI` | `type` | 1158 |
479
+ | `PlaywrightAPI` | `domSnapshot` | 1162 |
480
+ | `PlaywrightAPI` | `elementInfo` | 1163 |
481
+ | `PlaywrightAPI` | `elementScreenshot` | 1164 |
482
+ | `PlaywrightAPI` | `evaluate` | 1165 |
483
+ | `PlaywrightAPI` | `expectNavigation` | 1170 |
484
+ | `PlaywrightAPI` | `frameLocator` | 1174 |
485
+ | `PlaywrightAPI` | `getByLabel` | 1175 |
486
+ | `PlaywrightAPI` | `getByPlaceholder` | 1179 |
487
+ | `PlaywrightAPI` | `getByRole` | 1183 |
488
+ | `PlaywrightAPI` | `getByTestId` | 1187 |
489
+ | `PlaywrightAPI` | `getByText` | 1188 |
490
+ | `PlaywrightAPI` | `locator` | 1192 |
491
+ | `PlaywrightAPI` | `waitForEvent` | 1193 |
492
+ | `PlaywrightAPI` | `waitForEvent` | 1197 |
493
+ | `PlaywrightAPI` | `waitForLoadState` | 1201 |
494
+ | `PlaywrightAPI` | `waitForTimeout` | 1202 |
495
+ | `PlaywrightAPI` | `waitForURL` | 1203 |
496
+ | `PlaywrightFrameLocator` | `frameLocator` | 1207 |
497
+ | `PlaywrightFrameLocator` | `getByLabel` | 1208 |
498
+ | `PlaywrightFrameLocator` | `getByPlaceholder` | 1212 |
499
+ | `PlaywrightFrameLocator` | `getByRole` | 1216 |
500
+ | `PlaywrightFrameLocator` | `getByTestId` | 1220 |
501
+ | `PlaywrightFrameLocator` | `getByText` | 1221 |
502
+ | `PlaywrightFrameLocator` | `locator` | 1225 |
503
+ | `PlaywrightLocator` | `all` | 1229 |
504
+ | `PlaywrightLocator` | `allTextContents` | 1230 |
505
+ | `PlaywrightLocator` | `and` | 1231 |
506
+ | `PlaywrightLocator` | `check` | 1232 |
507
+ | `PlaywrightLocator` | `click` | 1233 |
508
+ | `PlaywrightLocator` | `click` | 1234 |
509
+ | `PlaywrightLocator` | `count` | 1235 |
510
+ | `PlaywrightLocator` | `dblclick` | 1236 |
511
+ | `PlaywrightLocator` | `dblclick` | 1237 |
512
+ | `PlaywrightLocator` | `downloadMedia` | 1238 |
513
+ | `PlaywrightLocator` | `evaluate` | 1241 |
514
+ | `PlaywrightLocator` | `evaluateAll` | 1246 |
515
+ | `PlaywrightLocator` | `fill` | 1251 |
516
+ | `PlaywrightLocator` | `filter` | 1252 |
517
+ | `PlaywrightLocator` | `first` | 1253 |
518
+ | `PlaywrightLocator` | `getAttribute` | 1254 |
519
+ | `PlaywrightLocator` | `getByLabel` | 1258 |
520
+ | `PlaywrightLocator` | `getByPlaceholder` | 1262 |
521
+ | `PlaywrightLocator` | `getByRole` | 1266 |
522
+ | `PlaywrightLocator` | `getByTestId` | 1270 |
523
+ | `PlaywrightLocator` | `getByText` | 1271 |
524
+ | `PlaywrightLocator` | `innerText` | 1275 |
525
+ | `PlaywrightLocator` | `isEnabled` | 1276 |
526
+ | `PlaywrightLocator` | `isVisible` | 1277 |
527
+ | `PlaywrightLocator` | `last` | 1278 |
528
+ | `PlaywrightLocator` | `locator` | 1279 |
529
+ | `PlaywrightLocator` | `nth` | 1280 |
530
+ | `PlaywrightLocator` | `or` | 1281 |
531
+ | `PlaywrightLocator` | `press` | 1282 |
532
+ | `PlaywrightLocator` | `pressSequentially` | 1286 |
533
+ | `PlaywrightLocator` | `selectOption` | 1290 |
534
+ | `PlaywrightLocator` | `setChecked` | 1294 |
535
+ | `PlaywrightLocator` | `textContent` | 1295 |
536
+ | `PlaywrightLocator` | `type` | 1296 |
537
+ | `PlaywrightLocator` | `uncheck` | 1300 |
538
+ | `PlaywrightLocator` | `waitFor` | 1301 |
539
+ | `PlaywrightDownload` | `path` | 1305 |
540
+ | `PlaywrightFileChooser` | `isMultiple` | 1309 |
541
+ | `PlaywrightFileChooser` | `setFiles` | 1310 |
542
+ | `TabClipboardAPI` | `read` | 1317 |
543
+ | `TabClipboardAPI` | `readText` | 1318 |
544
+ | `TabClipboardAPI` | `write` | 1319 |
545
+ | `TabClipboardAPI` | `writeText` | 1320 |
546
+ | `TabDevAPI` | `logs` | 1324 |
547
+ | `AlertDialog` | `type` | 1328 |
548
+ | `AlertDialog` | `message` | 1329 |
549
+ | `AlertDialog` | `dismiss` | 1330 |
550
+ | `BeforeUnloadDialog` | `type` | 1334 |
551
+ | `BeforeUnloadDialog` | `message` | 1335 |
552
+ | `BeforeUnloadDialog` | `dismiss` | 1336 |
553
+ | `ConfirmDialog` | `type` | 1340 |
554
+ | `ConfirmDialog` | `message` | 1341 |
555
+ | `ConfirmDialog` | `accept` | 1342 |
556
+ | `ConfirmDialog` | `dismiss` | 1343 |
557
+ | `PromptDialog` | `type` | 1348 |
558
+ | `PromptDialog` | `message` | 1349 |
559
+ | `PromptDialog` | `accept` | 1350 |
560
+ | `PromptDialog` | `dismiss` | 1351 |
561
+ | `TabDescriptor` | `target` | 1356 |
562
+ | `DialogDescriptor` | `target` | 1359 |
563
+ | `DialogDescriptor` | `dialogId` | 1360 |
564
+ | `DialogDescriptor` | `pageVersion` | 1361 |
565
+ | `DialogDescriptor` | `type` | 1362 |
566
+ | `DialogDescriptor` | `message` | 1363 |
567
+ | `DownloadDescriptor` | `target` | 1366 |
568
+ | `DownloadDescriptor` | `downloadId` | 1367 |
569
+ | `DownloadDescriptor` | `suggestedFilename` | 1368 |
570
+ | `FileChooserDescriptor` | `target` | 1371 |
571
+ | `FileChooserDescriptor` | `chooserId` | 1372 |
572
+ | `FileChooserDescriptor` | `pageVersion` | 1373 |
573
+ | `FileChooserDescriptor` | `multiple` | 1374 |
574
+ | `FrameDescriptor` | `target` | 1377 |
575
+ | `FrameDescriptor` | `framePath` | 1378 |
576
+ | `WebMcpToolsDescriptor` | `documentRevision` | 1381 |
577
+ | `WebMcpToolsDescriptor` | `registrationRevision` | 1382 |
578
+ | `WebMcpToolsDescriptor` | `tools` | 1383 |
@@ -1,8 +1,10 @@
1
1
  # 公开接口与数据类型
2
2
 
3
- 此页由本包公开 TypeScript 声明生成,用于查询调用合同;调用是否已注册及实际验证范围见包内 `implementation.json`。未注册的方法明确失败,类型存在不代表当前插件已经支持。
3
+ 此引用由本包的 `src/client/types.ts` 自动生成;仅当需要精确签名时按 [类型索引](api-index.md) 和 [成员索引](api-members.md) 找到对应行号,再读取本文件所需范围。
4
4
 
5
- 入口为 `import { createBrowserClient } from "@nexum-hub/browser"`。`createBrowserClient(browser)` 接收当前运行注入的方法容器,返回 `BrowserClient`。所有 I/O 都经过当前受管调用,客户端对象不传入 MCP 结果。
5
+ 类型存在不代表当前 Agent 已注册对应方法。实际可调用方法和输入 Schema 仍以本次 `agent.open` / SDK 注册能力为准。
6
+
7
+ 入口:`import { createBrowserClient } from "@nexum-hub/browser"`;`createBrowserClient(browser)` 使用当前 Run 注入的 `browser` 方法容器。不要把控制对象当成 MCP 结果输出。
6
8
 
7
9
  ```typescript
8
10
  /** Public browser SDK data and facade contracts. Runtime control objects never cross managed calls. */
@@ -276,6 +278,8 @@ export type LocatorClickOptions = {
276
278
  position?: { x: number; y: number };
277
279
  modifiers?: Array<KeyboardModifier>;
278
280
  timeoutMs?: number;
281
+ /** Optional observable completion condition. Never replay input on timeout. */
282
+ expect?: WaitCondition;
279
283
  };
280
284
 
281
285
  export type LocatorDownloadMediaOptions = {
@@ -473,6 +477,14 @@ export interface WaitResult {
473
477
  matched: true;
474
478
  snapshot: PageSnapshot;
475
479
  }
480
+ /** One bounded AI-oriented observation; AX text keeps its existing full/diff semantics. */
481
+ export interface PageObservation {
482
+ tabId: string;
483
+ title?: string;
484
+ url?: string;
485
+ accessibility: string;
486
+ mode: "full" | "diff";
487
+ }
476
488
  export interface NavigationOptions {
477
489
  waitUntil?: WaitUntil;
478
490
  timeoutMs?: number;
@@ -1014,7 +1026,6 @@ export interface VisibleDomTree {
1014
1026
 
1015
1027
  export interface BrowserClient {
1016
1028
  browsers: Browsers;
1017
- documentation: Documentation;
1018
1029
  }
1019
1030
 
1020
1031
  export interface Browsers {
@@ -1032,7 +1043,6 @@ export interface Browser {
1032
1043
  };
1033
1044
  tabs: Tabs;
1034
1045
  user: BrowserUser;
1035
- documentation(): Promise<string>;
1036
1046
  history(options?: BrowserHistoryOptions): Promise<Array<BrowserHistoryEntry>>;
1037
1047
  nameSession(name: string): Promise<void>;
1038
1048
  }
@@ -1077,6 +1087,7 @@ export interface Tab {
1077
1087
  reason?: "authentication" | "captcha" | "user_requested" | "other",
1078
1088
  ): Promise<void>;
1079
1089
  screenshot(options?: ScreenshotOptions): Promise<Uint8Array>;
1090
+ observe(options?: { timeoutMs?: number; full?: boolean }): Promise<PageObservation>;
1080
1091
  title(): Promise<undefined | string>;
1081
1092
  url(): Promise<undefined | string>;
1082
1093
  }
@@ -1219,8 +1230,10 @@ export interface PlaywrightLocator {
1219
1230
  allTextContents(options?: { timeoutMs?: number }): Promise<Array<string>>;
1220
1231
  and(locator: PlaywrightLocator): PlaywrightLocator;
1221
1232
  check(options?: LocatorCheckOptions): Promise<void>;
1233
+ click(options: LocatorClickOptions & { expect: WaitCondition }): Promise<WaitResult>;
1222
1234
  click(options?: LocatorClickOptions): Promise<void>;
1223
1235
  count(): Promise<number>;
1236
+ dblclick(options: LocatorClickOptions & { expect: WaitCondition }): Promise<WaitResult>;
1224
1237
  dblclick(options?: LocatorClickOptions): Promise<void>;
1225
1238
  downloadMedia(
1226
1239
  options?: LocatorDownloadMediaOptions,
@@ -1330,9 +1343,6 @@ export interface ConfirmDialog {
1330
1343
  dismiss(): Promise<void>;
1331
1344
  }
1332
1345
 
1333
- export interface Documentation {
1334
- get(name: string): Promise<string>;
1335
- }
1336
1346
 
1337
1347
  export interface PromptDialog {
1338
1348
  type: "prompt";
@@ -0,0 +1,19 @@
1
+ # 初始化与浏览器发现
2
+
3
+ ## 选择浏览器和标签
4
+
5
+ 在当前脚本中导入 `createBrowserClient`,将当前运行的 `browser` 方法容器交给它。先 `client.browsers.list()`,再按实际 browserId 获取 Browser;从 `selected.tabs.list()` 的真实 tabId 获取 Tab。`getDefault()` 按当前在线默认或稳定顺序选择,`getForUrl(url)` 优先复用已存在的 URL/origin;选择不会自动导航。
6
+
7
+ 下面是可作为 `agent.run.start.script` 的只读入口。首次不传 ID 时返回浏览器列表,提供本次发现的 `input.browserId` 后返回标签列表,再提供 `input.tabId` 才观察页面;不要按名称或旧截图猜测 ID:
8
+
9
+ ```javascript
10
+ const { createBrowserClient } = await import("@nexum-hub/browser");
11
+ const client = createBrowserClient(browser);
12
+ const browsers = await client.browsers.list();
13
+ if (!context.input?.browserId) return { browsers };
14
+ const selected = await client.browsers.get(context.input.browserId);
15
+ const tabs = await selected.tabs.list();
16
+ if (!context.input?.tabId) return { tabs };
17
+ const tab = await selected.tabs.get(context.input.tabId);
18
+ return await tab.observe({ full: true });
19
+ ```
@@ -0,0 +1,11 @@
1
+ # 浏览器连接问题:AI 操作步骤
2
+
3
+ 仅在浏览器不可用、扩展离线、端口冲突、权限拒绝或明确断连时读取本文件。普通页面定位失败不是连接失败。
4
+
5
+ 1. 从本次 `agent.open` 核对目标 Agent、已启用的 `browser` 方法与实际授权;已注册的 `browser/discover.js` 存在时可按实际输入 Schema 获取浏览器及标签,否则通过 [初始化与发现](bootstrap.md) 读取 `client.browsers.list()`。空结果只表示本次没有发现可用浏览器,不证明远端服务故障。
6
+ 2. 如果提示 `EXTENSION_OFFLINE`,报告当前 Agent/浏览器和连接状态。检查已提供的扩展在线信息;必要时提示用户检查该 Agent 所在机器的 Chrome/Edge 扩展是否已安装、启用并有对应站点权限。插件包已安装不等于浏览器扩展已连接。
7
+ 3. 如果提示 `PORT_IN_USE`,说明本地 Browser 监听端口不可用;保持已有服务与用户浏览器原状,不抢占其他监听者,也不跨 development / production profile 猜测替代端口。
8
+ 4. 如果提示权限、企业策略、受保护页面或 debugger 冲突,准确报告受阻操作和需由用户/管理员处理的权限。不要绕过系统策略或改用未获授权的浏览器控制方式。
9
+ 5. 只有确认连接被重建时,才重新发现 browserId、tabId 和当前页面;旧控制代次、ref、Dialog、Chooser 不自动有效。连接恢复不能证明之前的点击、提交或下载没有发生,先只读核对业务状态。
10
+
11
+ 无法诊断时返回实际错误码、已核对的连接信息、未执行步骤及需要的恢复条件。需要端口、握手、profile、lease 的工程排查证据时按需读取 [内部诊断依据](diagnostics.md)。