feat(browser): add managed instance agent capabilities

This commit is contained in:
go0p
2026-09-03 13:31:59 +08:00
parent 8af9bb777e
commit e00746d834
37 changed files with 608 additions and 281 deletions
+6
View File
@@ -57,6 +57,12 @@ describe('Bridge v3 protocol', () => {
expect(() => parseBridgeEnvelope('x'.repeat(BRIDGE_MAX_MESSAGE_BYTES + 1))).toThrow('16 MiB');
});
it('opens only HTTP(S) pages in the attached browser instance', () => {
expect(parseCapabilityParams('browser.tab.open', { url: 'https://www.baidu.com/' }))
.toEqual({ url: 'https://www.baidu.com/' });
expect(() => parseCapabilityParams('browser.tab.open', { url: 'chrome://settings' })).toThrow('HTTP(S)');
});
it('accepts exact Worker boundary handles for remote deep capture', () => {
expect(parseCapabilityParams('browser.deep_capture.start', {
matcher: {