@browserbridge/bbx 1.0.0 → 1.1.0
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/README.md +6 -4
- package/package.json +53 -53
- package/packages/agent-client/src/cli-helpers.js +43 -5
- package/packages/agent-client/src/cli.js +176 -171
- package/packages/agent-client/src/client.js +66 -21
- package/packages/agent-client/src/command-registry.js +104 -69
- package/packages/agent-client/src/detect.js +162 -54
- package/packages/agent-client/src/install.js +34 -28
- package/packages/agent-client/src/mcp-config.js +40 -40
- package/packages/agent-client/src/runtime.js +41 -20
- package/packages/agent-client/src/setup-status.js +23 -30
- package/packages/mcp-server/src/bin.js +57 -5
- package/packages/mcp-server/src/handlers.js +573 -256
- package/packages/mcp-server/src/server.js +568 -257
- package/packages/native-host/bin/bridge-daemon.js +39 -6
- package/packages/native-host/bin/install-manifest.js +26 -4
- package/packages/native-host/bin/postinstall.js +4 -2
- package/packages/native-host/src/config.js +142 -13
- package/packages/native-host/src/daemon-process.js +396 -0
- package/packages/native-host/src/daemon.js +350 -150
- package/packages/native-host/src/framing.js +131 -11
- package/packages/native-host/src/install-manifest.js +194 -29
- package/packages/native-host/src/native-host.js +154 -102
- package/packages/protocol/src/budget.js +3 -7
- package/packages/protocol/src/capabilities.js +6 -3
- package/packages/protocol/src/defaults.js +1 -0
- package/packages/protocol/src/errors.js +15 -11
- package/packages/protocol/src/payload-cost.js +19 -6
- package/packages/protocol/src/protocol.js +242 -73
- package/packages/protocol/src/registry.js +311 -45
- package/packages/protocol/src/summary.js +260 -109
- package/packages/protocol/src/types.js +29 -4
- package/skills/browser-bridge/SKILL.md +3 -2
- package/skills/browser-bridge/agents/openai.yaml +3 -3
- package/skills/browser-bridge/references/interaction.md +34 -11
- package/skills/browser-bridge/references/patch-workflow.md +3 -0
- package/skills/browser-bridge/references/protocol.md +127 -71
- package/skills/browser-bridge/references/tailwind.md +12 -11
- package/skills/browser-bridge/references/token-efficiency.md +23 -22
- package/skills/browser-bridge/references/ui-workflows.md +8 -0
- package/CHANGELOG.md +0 -55
- package/assets/banner.jpg +0 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +0 -65
- package/docs/api-reference.md +0 -157
- package/docs/cli-guide.md +0 -128
- package/docs/index.md +0 -25
- package/docs/manual-setup.md +0 -140
- package/docs/mcp-vs-cli.md +0 -258
- package/docs/publishing.md +0 -114
- package/docs/quickstart.md +0 -104
- package/docs/troubleshooting.md +0 -59
- package/docs/usage-scenarios.md +0 -136
- package/manifest.json +0 -52
- package/packages/extension/assets/icon-128.png +0 -0
- package/packages/extension/assets/icon-16.png +0 -0
- package/packages/extension/assets/icon-32.png +0 -0
- package/packages/extension/assets/icon-48.png +0 -0
- package/packages/extension/src/background-helpers.js +0 -459
- package/packages/extension/src/background-routing.js +0 -91
- package/packages/extension/src/background.js +0 -3227
- package/packages/extension/src/content-script-helpers.js +0 -281
- package/packages/extension/src/content-script.js +0 -1977
- package/packages/extension/src/debugger-coordinator.js +0 -188
- package/packages/extension/src/sidepanel-helpers.js +0 -102
- package/packages/extension/ui/offscreen.html +0 -6
- package/packages/extension/ui/offscreen.js +0 -61
- package/packages/extension/ui/popup.html +0 -35
- package/packages/extension/ui/popup.js +0 -279
- package/packages/extension/ui/sidepanel.html +0 -102
- package/packages/extension/ui/sidepanel.js +0 -1854
- package/packages/extension/ui/ui.css +0 -1159
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
* @type {Readonly<Record<import('./types.js').BridgeMethod, string>>}
|
|
24
24
|
*/
|
|
25
25
|
const BRIDGE_METHOD_DESCRIPTIONS = Object.freeze({
|
|
26
|
-
'access.request':
|
|
26
|
+
'access.request':
|
|
27
|
+
'Request Browser Bridge access for the focused window. Do not repeat while access is already pending.',
|
|
27
28
|
'tabs.list': 'List tabs in the enabled window.',
|
|
28
29
|
'tabs.create': 'Create a new tab in the enabled window.',
|
|
29
30
|
'tabs.close': 'Close a tab in the enabled window.',
|
|
@@ -77,9 +78,10 @@ const BRIDGE_METHOD_DESCRIPTIONS = Object.freeze({
|
|
|
77
78
|
'cdp.get_dom_snapshot': 'Read a CDP DOM snapshot.',
|
|
78
79
|
'cdp.get_box_model': 'Read a CDP box model for a node.',
|
|
79
80
|
'cdp.get_computed_styles_for_node': 'Read CDP computed styles for a node.',
|
|
81
|
+
'cdp.dispatch_key_event': 'Dispatch a key press through Chrome DevTools Protocol input.',
|
|
80
82
|
'performance.get_metrics': 'Read browser performance metrics.',
|
|
81
83
|
'log.tail': 'Tail recent bridge log entries.',
|
|
82
|
-
'health.ping': 'Check daemon, extension, and access-routing health.'
|
|
84
|
+
'health.ping': 'Check daemon, extension, and access-routing health.',
|
|
83
85
|
});
|
|
84
86
|
|
|
85
87
|
/**
|
|
@@ -105,9 +107,21 @@ function createRegistryEntry(method, group, tab, params, complexity = 'low') {
|
|
|
105
107
|
export const BRIDGE_METHOD_REGISTRY = Object.freeze({
|
|
106
108
|
// system — trivial
|
|
107
109
|
'access.request': createRegistryEntry('access.request', 'system', false, [], 'trivial'),
|
|
108
|
-
'skill.get_runtime_context': createRegistryEntry(
|
|
110
|
+
'skill.get_runtime_context': createRegistryEntry(
|
|
111
|
+
'skill.get_runtime_context',
|
|
112
|
+
'system',
|
|
113
|
+
false,
|
|
114
|
+
[],
|
|
115
|
+
'trivial'
|
|
116
|
+
),
|
|
109
117
|
'setup.get_status': createRegistryEntry('setup.get_status', 'system', false, [], 'trivial'),
|
|
110
|
-
'setup.install': createRegistryEntry(
|
|
118
|
+
'setup.install': createRegistryEntry(
|
|
119
|
+
'setup.install',
|
|
120
|
+
'system',
|
|
121
|
+
false,
|
|
122
|
+
['kind', 'target'],
|
|
123
|
+
'trivial'
|
|
124
|
+
),
|
|
111
125
|
'log.tail': createRegistryEntry('log.tail', 'system', false, [], 'trivial'),
|
|
112
126
|
'health.ping': createRegistryEntry('health.ping', 'system', false, [], 'trivial'),
|
|
113
127
|
// tabs — trivial
|
|
@@ -117,66 +131,315 @@ export const BRIDGE_METHOD_REGISTRY = Object.freeze({
|
|
|
117
131
|
// page — low (basic reads), moderate (evaluate, debugger-backed)
|
|
118
132
|
'page.get_state': createRegistryEntry('page.get_state', 'page', true, [], 'low'),
|
|
119
133
|
'page.evaluate': {
|
|
120
|
-
...createRegistryEntry(
|
|
134
|
+
...createRegistryEntry(
|
|
135
|
+
'page.evaluate',
|
|
136
|
+
'page',
|
|
137
|
+
true,
|
|
138
|
+
['expression', 'awaitPromise', 'timeoutMs', 'returnByValue'],
|
|
139
|
+
'moderate'
|
|
140
|
+
),
|
|
121
141
|
},
|
|
122
|
-
'page.get_console': createRegistryEntry(
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
'page.get_console': createRegistryEntry(
|
|
143
|
+
'page.get_console',
|
|
144
|
+
'page',
|
|
145
|
+
true,
|
|
146
|
+
['level', 'clear', 'limit'],
|
|
147
|
+
'low'
|
|
148
|
+
),
|
|
149
|
+
'page.wait_for_load_state': createRegistryEntry(
|
|
150
|
+
'page.wait_for_load_state',
|
|
151
|
+
'wait',
|
|
152
|
+
true,
|
|
153
|
+
['timeoutMs'],
|
|
154
|
+
'low'
|
|
155
|
+
),
|
|
156
|
+
'page.get_storage': createRegistryEntry(
|
|
157
|
+
'page.get_storage',
|
|
158
|
+
'page',
|
|
159
|
+
true,
|
|
160
|
+
['type', 'keys'],
|
|
161
|
+
'low'
|
|
162
|
+
),
|
|
125
163
|
'page.get_text': createRegistryEntry('page.get_text', 'page', true, ['textBudget'], 'low'),
|
|
126
|
-
'page.get_network': createRegistryEntry(
|
|
164
|
+
'page.get_network': createRegistryEntry(
|
|
165
|
+
'page.get_network',
|
|
166
|
+
'page',
|
|
167
|
+
true,
|
|
168
|
+
['clear', 'limit', 'urlPattern'],
|
|
169
|
+
'low'
|
|
170
|
+
),
|
|
127
171
|
// navigation — low
|
|
128
|
-
'navigation.navigate': createRegistryEntry(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
172
|
+
'navigation.navigate': createRegistryEntry(
|
|
173
|
+
'navigation.navigate',
|
|
174
|
+
'navigate',
|
|
175
|
+
true,
|
|
176
|
+
['url', 'waitForLoad', 'timeoutMs'],
|
|
177
|
+
'low'
|
|
178
|
+
),
|
|
179
|
+
'navigation.reload': createRegistryEntry(
|
|
180
|
+
'navigation.reload',
|
|
181
|
+
'navigate',
|
|
182
|
+
true,
|
|
183
|
+
['waitForLoad', 'timeoutMs'],
|
|
184
|
+
'low'
|
|
185
|
+
),
|
|
186
|
+
'navigation.go_back': createRegistryEntry(
|
|
187
|
+
'navigation.go_back',
|
|
188
|
+
'navigate',
|
|
189
|
+
true,
|
|
190
|
+
['waitForLoad', 'timeoutMs'],
|
|
191
|
+
'low'
|
|
192
|
+
),
|
|
193
|
+
'navigation.go_forward': createRegistryEntry(
|
|
194
|
+
'navigation.go_forward',
|
|
195
|
+
'navigate',
|
|
196
|
+
true,
|
|
197
|
+
['waitForLoad', 'timeoutMs'],
|
|
198
|
+
'low'
|
|
199
|
+
),
|
|
132
200
|
// dom — low (reads), moderate (accessibility tree)
|
|
133
201
|
'dom.query': {
|
|
134
|
-
...createRegistryEntry(
|
|
202
|
+
...createRegistryEntry(
|
|
203
|
+
'dom.query',
|
|
204
|
+
'inspect',
|
|
205
|
+
true,
|
|
206
|
+
[
|
|
207
|
+
'selector',
|
|
208
|
+
'withinRef',
|
|
209
|
+
'maxNodes',
|
|
210
|
+
'maxDepth',
|
|
211
|
+
'textBudget',
|
|
212
|
+
'includeBbox',
|
|
213
|
+
'attributeAllowlist',
|
|
214
|
+
],
|
|
215
|
+
'low'
|
|
216
|
+
),
|
|
135
217
|
},
|
|
136
218
|
'dom.describe': createRegistryEntry('dom.describe', 'inspect', true, ['elementRef'], 'low'),
|
|
137
|
-
'dom.get_text': createRegistryEntry(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
219
|
+
'dom.get_text': createRegistryEntry(
|
|
220
|
+
'dom.get_text',
|
|
221
|
+
'inspect',
|
|
222
|
+
true,
|
|
223
|
+
['elementRef', 'textBudget'],
|
|
224
|
+
'low'
|
|
225
|
+
),
|
|
226
|
+
'dom.get_attributes': createRegistryEntry(
|
|
227
|
+
'dom.get_attributes',
|
|
228
|
+
'inspect',
|
|
229
|
+
true,
|
|
230
|
+
['elementRef', 'attributes'],
|
|
231
|
+
'low'
|
|
232
|
+
),
|
|
233
|
+
'dom.wait_for': createRegistryEntry(
|
|
234
|
+
'dom.wait_for',
|
|
235
|
+
'wait',
|
|
236
|
+
true,
|
|
237
|
+
['selector', 'text', 'state', 'timeoutMs'],
|
|
238
|
+
'low'
|
|
239
|
+
),
|
|
240
|
+
'dom.find_by_text': createRegistryEntry(
|
|
241
|
+
'dom.find_by_text',
|
|
242
|
+
'inspect',
|
|
243
|
+
true,
|
|
244
|
+
['text', 'exact', 'selector', 'maxResults'],
|
|
245
|
+
'low'
|
|
246
|
+
),
|
|
247
|
+
'dom.find_by_role': createRegistryEntry(
|
|
248
|
+
'dom.find_by_role',
|
|
249
|
+
'inspect',
|
|
250
|
+
true,
|
|
251
|
+
['role', 'name', 'selector', 'maxResults'],
|
|
252
|
+
'low'
|
|
253
|
+
),
|
|
254
|
+
'dom.get_html': createRegistryEntry(
|
|
255
|
+
'dom.get_html',
|
|
256
|
+
'inspect',
|
|
257
|
+
true,
|
|
258
|
+
['elementRef', 'outer', 'maxLength'],
|
|
259
|
+
'low'
|
|
260
|
+
),
|
|
261
|
+
'dom.get_accessibility_tree': createRegistryEntry(
|
|
262
|
+
'dom.get_accessibility_tree',
|
|
263
|
+
'inspect',
|
|
264
|
+
true,
|
|
265
|
+
['maxNodes', 'maxDepth'],
|
|
266
|
+
'moderate'
|
|
267
|
+
),
|
|
144
268
|
// layout — low
|
|
145
|
-
'layout.get_box_model': createRegistryEntry(
|
|
269
|
+
'layout.get_box_model': createRegistryEntry(
|
|
270
|
+
'layout.get_box_model',
|
|
271
|
+
'inspect',
|
|
272
|
+
true,
|
|
273
|
+
['elementRef'],
|
|
274
|
+
'low'
|
|
275
|
+
),
|
|
146
276
|
'layout.hit_test': createRegistryEntry('layout.hit_test', 'inspect', true, ['x', 'y'], 'low'),
|
|
147
277
|
// styles — low (computed), moderate (matched rules)
|
|
148
|
-
'styles.get_computed': createRegistryEntry(
|
|
149
|
-
|
|
278
|
+
'styles.get_computed': createRegistryEntry(
|
|
279
|
+
'styles.get_computed',
|
|
280
|
+
'inspect',
|
|
281
|
+
true,
|
|
282
|
+
['elementRef', 'properties'],
|
|
283
|
+
'low'
|
|
284
|
+
),
|
|
285
|
+
'styles.get_matched_rules': createRegistryEntry(
|
|
286
|
+
'styles.get_matched_rules',
|
|
287
|
+
'inspect',
|
|
288
|
+
true,
|
|
289
|
+
['elementRef'],
|
|
290
|
+
'moderate'
|
|
291
|
+
),
|
|
150
292
|
// viewport — low (scroll), moderate (resize, debugger-backed)
|
|
151
|
-
'viewport.scroll': createRegistryEntry(
|
|
152
|
-
|
|
293
|
+
'viewport.scroll': createRegistryEntry(
|
|
294
|
+
'viewport.scroll',
|
|
295
|
+
'navigate',
|
|
296
|
+
true,
|
|
297
|
+
['target', 'top', 'left', 'behavior', 'relative'],
|
|
298
|
+
'low'
|
|
299
|
+
),
|
|
300
|
+
'viewport.resize': createRegistryEntry(
|
|
301
|
+
'viewport.resize',
|
|
302
|
+
'navigate',
|
|
303
|
+
true,
|
|
304
|
+
['width', 'height', 'deviceScaleFactor', 'reset'],
|
|
305
|
+
'moderate'
|
|
306
|
+
),
|
|
153
307
|
// input — low (simple), moderate (drag)
|
|
154
|
-
'input.click': createRegistryEntry(
|
|
308
|
+
'input.click': createRegistryEntry(
|
|
309
|
+
'input.click',
|
|
310
|
+
'interact',
|
|
311
|
+
true,
|
|
312
|
+
['target', 'button', 'clickCount', 'modifiers'],
|
|
313
|
+
'low'
|
|
314
|
+
),
|
|
155
315
|
'input.focus': createRegistryEntry('input.focus', 'interact', true, ['target'], 'low'),
|
|
156
|
-
'input.type': createRegistryEntry(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
316
|
+
'input.type': createRegistryEntry(
|
|
317
|
+
'input.type',
|
|
318
|
+
'interact',
|
|
319
|
+
true,
|
|
320
|
+
['target', 'text', 'clear', 'submit', 'modifiers'],
|
|
321
|
+
'low'
|
|
322
|
+
),
|
|
323
|
+
'input.press_key': createRegistryEntry(
|
|
324
|
+
'input.press_key',
|
|
325
|
+
'interact',
|
|
326
|
+
true,
|
|
327
|
+
['target', 'key', 'modifiers'],
|
|
328
|
+
'low'
|
|
329
|
+
),
|
|
330
|
+
'input.set_checked': createRegistryEntry(
|
|
331
|
+
'input.set_checked',
|
|
332
|
+
'interact',
|
|
333
|
+
true,
|
|
334
|
+
['target', 'checked'],
|
|
335
|
+
'low'
|
|
336
|
+
),
|
|
337
|
+
'input.select_option': createRegistryEntry(
|
|
338
|
+
'input.select_option',
|
|
339
|
+
'interact',
|
|
340
|
+
true,
|
|
341
|
+
['target', 'values', 'labels', 'indexes'],
|
|
342
|
+
'low'
|
|
343
|
+
),
|
|
344
|
+
'input.hover': createRegistryEntry(
|
|
345
|
+
'input.hover',
|
|
346
|
+
'interact',
|
|
347
|
+
true,
|
|
348
|
+
['target', 'duration', 'modifiers'],
|
|
349
|
+
'low'
|
|
350
|
+
),
|
|
351
|
+
'input.drag': createRegistryEntry(
|
|
352
|
+
'input.drag',
|
|
353
|
+
'interact',
|
|
354
|
+
true,
|
|
355
|
+
['source', 'destination', 'offsetX', 'offsetY'],
|
|
356
|
+
'moderate'
|
|
357
|
+
),
|
|
358
|
+
'input.scroll_into_view': createRegistryEntry(
|
|
359
|
+
'input.scroll_into_view',
|
|
360
|
+
'interact',
|
|
361
|
+
true,
|
|
362
|
+
['target'],
|
|
363
|
+
'low'
|
|
364
|
+
),
|
|
163
365
|
// capture — high (screenshots, CDP)
|
|
164
|
-
'screenshot.capture_region': createRegistryEntry(
|
|
165
|
-
|
|
166
|
-
|
|
366
|
+
'screenshot.capture_region': createRegistryEntry(
|
|
367
|
+
'screenshot.capture_region',
|
|
368
|
+
'capture',
|
|
369
|
+
true,
|
|
370
|
+
['x', 'y', 'width', 'height'],
|
|
371
|
+
'high'
|
|
372
|
+
),
|
|
373
|
+
'screenshot.capture_element': createRegistryEntry(
|
|
374
|
+
'screenshot.capture_element',
|
|
375
|
+
'capture',
|
|
376
|
+
true,
|
|
377
|
+
['elementRef'],
|
|
378
|
+
'high'
|
|
379
|
+
),
|
|
380
|
+
'screenshot.capture_full_page': createRegistryEntry(
|
|
381
|
+
'screenshot.capture_full_page',
|
|
382
|
+
'capture',
|
|
383
|
+
true,
|
|
384
|
+
[],
|
|
385
|
+
'high'
|
|
386
|
+
),
|
|
167
387
|
// patch — moderate (side effects)
|
|
168
|
-
'patch.apply_styles': createRegistryEntry(
|
|
169
|
-
|
|
388
|
+
'patch.apply_styles': createRegistryEntry(
|
|
389
|
+
'patch.apply_styles',
|
|
390
|
+
'patch',
|
|
391
|
+
true,
|
|
392
|
+
['target', 'declarations', 'important', 'patchId', 'verify'],
|
|
393
|
+
'moderate'
|
|
394
|
+
),
|
|
395
|
+
'patch.apply_dom': createRegistryEntry(
|
|
396
|
+
'patch.apply_dom',
|
|
397
|
+
'patch',
|
|
398
|
+
true,
|
|
399
|
+
['target', 'operation', 'name', 'value', 'patchId', 'verify'],
|
|
400
|
+
'moderate'
|
|
401
|
+
),
|
|
170
402
|
'patch.list': createRegistryEntry('patch.list', 'patch', true, [], 'low'),
|
|
171
403
|
'patch.rollback': createRegistryEntry('patch.rollback', 'patch', true, ['patchId'], 'low'),
|
|
172
|
-
'patch.commit_session_baseline': createRegistryEntry(
|
|
404
|
+
'patch.commit_session_baseline': createRegistryEntry(
|
|
405
|
+
'patch.commit_session_baseline',
|
|
406
|
+
'patch',
|
|
407
|
+
true,
|
|
408
|
+
[],
|
|
409
|
+
'low'
|
|
410
|
+
),
|
|
173
411
|
// cdp — high (raw protocol, large payloads)
|
|
174
412
|
'cdp.get_document': createRegistryEntry('cdp.get_document', 'cdp', true, [], 'high'),
|
|
175
413
|
'cdp.get_dom_snapshot': createRegistryEntry('cdp.get_dom_snapshot', 'cdp', true, [], 'high'),
|
|
176
|
-
'cdp.get_box_model': createRegistryEntry(
|
|
177
|
-
|
|
414
|
+
'cdp.get_box_model': createRegistryEntry(
|
|
415
|
+
'cdp.get_box_model',
|
|
416
|
+
'cdp',
|
|
417
|
+
true,
|
|
418
|
+
['elementRef'],
|
|
419
|
+
'high'
|
|
420
|
+
),
|
|
421
|
+
'cdp.get_computed_styles_for_node': createRegistryEntry(
|
|
422
|
+
'cdp.get_computed_styles_for_node',
|
|
423
|
+
'cdp',
|
|
424
|
+
true,
|
|
425
|
+
['elementRef'],
|
|
426
|
+
'high'
|
|
427
|
+
),
|
|
428
|
+
'cdp.dispatch_key_event': createRegistryEntry(
|
|
429
|
+
'cdp.dispatch_key_event',
|
|
430
|
+
'cdp',
|
|
431
|
+
true,
|
|
432
|
+
['key', 'code', 'modifiers'],
|
|
433
|
+
'moderate'
|
|
434
|
+
),
|
|
178
435
|
// performance — moderate (debugger-backed)
|
|
179
|
-
'performance.get_metrics': createRegistryEntry(
|
|
436
|
+
'performance.get_metrics': createRegistryEntry(
|
|
437
|
+
'performance.get_metrics',
|
|
438
|
+
'performance',
|
|
439
|
+
true,
|
|
440
|
+
[],
|
|
441
|
+
'moderate'
|
|
442
|
+
),
|
|
180
443
|
});
|
|
181
444
|
|
|
182
445
|
/** @type {ReadonlyArray<import('./types.js').BridgeMethod>} */
|
|
@@ -184,6 +447,9 @@ export const BRIDGE_METHODS = Object.freeze(
|
|
|
184
447
|
/** @type {import('./types.js').BridgeMethod[]} */ (Object.keys(BRIDGE_METHOD_REGISTRY))
|
|
185
448
|
);
|
|
186
449
|
|
|
450
|
+
/** @type {ReadonlySet<import('./types.js').BridgeMethod>} */
|
|
451
|
+
export const METHOD_SET = new Set(BRIDGE_METHODS);
|
|
452
|
+
|
|
187
453
|
/**
|
|
188
454
|
* @returns {Record<string, import('./types.js').BridgeMethod[]>}
|
|
189
455
|
*/
|
|
@@ -229,7 +495,7 @@ const COMPLEXITY_LEVELS = ['trivial', 'low', 'moderate', 'high'];
|
|
|
229
495
|
*/
|
|
230
496
|
export function getMethodsByMaxComplexity(maxComplexity) {
|
|
231
497
|
const maxIndex = COMPLEXITY_LEVELS.indexOf(maxComplexity);
|
|
232
|
-
return BRIDGE_METHODS.filter(
|
|
233
|
-
COMPLEXITY_LEVELS.indexOf(BRIDGE_METHOD_REGISTRY[m].complexity) <= maxIndex
|
|
498
|
+
return BRIDGE_METHODS.filter(
|
|
499
|
+
(m) => COMPLEXITY_LEVELS.indexOf(BRIDGE_METHOD_REGISTRY[m].complexity) <= maxIndex
|
|
234
500
|
);
|
|
235
501
|
}
|