@mearl/client 2.14.0 → 2.15.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/dist/commands.js CHANGED
@@ -93,20 +93,6 @@ export const COMMANDS = [
93
93
  `get_events --payload '{"tabId":12345,"source":"all","limit":20}'`,
94
94
  ],
95
95
  },
96
- {
97
- name: 'get_api_schema',
98
- description: '获取 API 接口 schema(出入参定义)',
99
- params: [
100
- { name: 'api', type: 'string', required: true, description: 'API 名称' },
101
- { name: 'version', type: 'string', description: 'API 版本,用于精确匹配接口定义' },
102
- {
103
- name: 'fields',
104
- type: '("schema" | "hsf")[]',
105
- description: '指定返回内容;不填时返回全部可用内容',
106
- },
107
- ],
108
- examples: [`get_api_schema --payload '{"api":"mtop.trade.order.detail"}'`],
109
- },
110
96
  // ── Mock & 规则 ───────────────────────────────────────────────────────────
111
97
  {
112
98
  name: 'set_mock',
@@ -235,129 +221,55 @@ export const COMMANDS = [
235
221
  `send_mtop_request --payload '{"api":"mtop.trade.order.detail","data":{"orderId":"123"}}'`,
236
222
  ],
237
223
  },
238
- {
239
- name: 'tdbank_account',
240
- description: 'TDBank 账号操作:获取扫码登录二维码、当前账号、账号列表、切换账号、快速借用并切换账号',
241
- params: [
242
- {
243
- name: 'tabId',
244
- type: 'number',
245
- description: 'login 首次不传;后续传上次响应的 tabId;无法恢复待扫码状态时会返回新的 tabId;其他操作在 CDP 模式下用于读取 Cookie',
246
- },
247
- {
248
- name: 'operation',
249
- type: '"current" | "list" | "login" | "switch" | "borrow"',
250
- description: '操作类型,默认 current',
251
- },
252
- { name: 'refresh', type: 'boolean', description: 'list 时是否强制刷新账号列表' },
253
- { name: 'pageIndex', type: 'number', description: 'list 时的页码,默认 1' },
254
- { name: 'accountId', type: 'string | number', description: 'switch 时使用账号列表中的 id' },
255
- {
256
- name: 'havanaId',
257
- type: 'string | number',
258
- description: 'switch 时直接指定 havanaId;TDBank 方式需配合 site,免密方式需配合 ssoKey',
259
- },
260
- { name: 'site', type: 'string | number', description: 'TDBank 方式直接指定 havanaId 时必填' },
261
- {
262
- name: 'ssoKey',
263
- type: 'string',
264
- description: 'switch 免密方式的秘钥;必须同时传 havanaId,site 固定为 taobao',
265
- },
266
- { name: 'query', type: 'string', description: 'borrow 时输入要借用的账号 loginId/关键词' },
267
- {
268
- name: 'identityId',
269
- type: 'string | number',
270
- description: 'login 返回 identity_required 后,传用户明确选择的 identityId',
271
- },
272
- ],
273
- examples: [
274
- `tdbank_account --payload '{"operation":"login"}'`,
275
- `tdbank_account --payload '{"operation":"login","tabId":12345}'`,
276
- `tdbank_account --payload '{"operation":"login","tabId":12345,"identityId":"10001"}'`,
277
- `tdbank_account --payload '{"operation":"current"}'`,
278
- `tdbank_account --payload '{"operation":"list","refresh":true}'`,
279
- `tdbank_account --payload '{"operation":"switch","accountId":12345}'`,
280
- `tdbank_account --payload '{"operation":"switch","havanaId":"1234567890","ssoKey":"<secret>"}'`,
281
- `tdbank_account --payload '{"operation":"borrow","query":"test_account"}'`,
282
- ],
283
- },
284
224
  // ── 浏览器 ────────────────────────────────────────────────────────────────
285
225
  {
286
226
  name: 'browser_list',
287
- description: '列出所有浏览器及其连接状态、类型和托管实例信息;AgentBay 可包含镜像与持久化 Context',
227
+ description: '列出所有浏览器及其连接状态、类型和 Provider 托管实例信息',
288
228
  summary: '列出本地及远端浏览器与连接状态',
289
229
  examples: ['browser_list'],
290
230
  },
291
231
  {
292
232
  name: 'browser_release',
293
- description: 'sessionId 接入的 AgentBay 浏览器用它解除本机 attachment且不关闭云端 Session;其他浏览器仅按用户明确要求释放调试控制和会话级临时效果(含设备/时区模拟),不用于普通任务收尾',
294
- summary: '释放浏览器控制或解除 Session attachment',
233
+ description: '释放当前浏览器的调试控制和会话级临时效果(含设备/时区模拟);不用于普通任务收尾,Provider 实例的行为以 mearl <providerId> 为准',
234
+ summary: '释放浏览器调试控制和会话级临时效果',
295
235
  examples: ['browser_release', 'browser_release --browser chrome-a'],
296
236
  },
297
237
  {
298
238
  name: 'browser_launch',
299
- description: '启动本地 Chrome、创建/复用 AgentBay 云浏览器,或通过已注册 Provider 创建浏览器实例',
239
+ description: '启动本地 Chrome,或通过已注册 Provider 创建浏览器实例',
300
240
  params: [
301
241
  {
302
242
  name: 'name',
303
243
  type: 'string',
304
- description: '实例名称,创建浏览器时必填;按 sessionId 接入时可省略',
244
+ description: '本地实例名称;使用 local Provider 时必填',
305
245
  },
306
246
  {
307
247
  name: 'provider',
308
248
  type: 'string',
309
- description: '运行环境,默认 local;可传 agentbay 或 mearl --help 中展示的已注册 Provider ID',
249
+ description: '运行环境,默认 local;可传 mearl --help 中展示的已注册 Provider ID',
310
250
  },
311
251
  {
312
252
  name: 'providerOptions',
313
253
  type: 'Record<string, JSON value>',
314
254
  description: '所选 Provider 声明的结构化启动参数;不能与顶层启动字段混用',
315
255
  },
316
- {
317
- name: 'sessionId',
318
- type: 'string',
319
- description: '显式接入现有 AgentBay Session;不会创建、初始化或取得其生命周期所有权',
320
- },
321
- {
322
- name: 'reuse',
323
- type: '"never" | "prefer" | "require"',
324
- description: 'AgentBay 运行实例复用策略:never 默认不复用;prefer 同名运行实例存在则复用、无记录则创建;require 只复用、不创建',
325
- },
326
- {
327
- name: 'imageId',
328
- type: 'string',
329
- description: 'AgentBay 镜像别名或具体镜像 ID;默认使用已验证的 Linux Browser Use 内网镜像',
330
- },
331
256
  {
332
257
  name: 'headless',
333
258
  type: 'boolean',
334
- description: '本地 provider 是否无头运行,默认 true;AgentBay 固定为 false,不支持 true',
259
+ description: '本地 Provider 是否无头运行,默认 true',
335
260
  },
336
261
  {
337
262
  name: 'userAgentMode',
338
263
  type: '"default" | "desktop"',
339
- description: 'UA 模式:default 使用 provider 默认 UA;desktop 本地使用匹配本机版本的 UA,AgentBay 复用控制浏览器的桌面 UA',
264
+ description: '本地 UA 模式:default 使用默认 UA;desktop 使用匹配本机版本的 UA',
340
265
  },
341
266
  {
342
267
  name: 'persistent',
343
268
  type: 'boolean',
344
- description: '关闭后是否保留浏览器状态,默认 false;本地保留 Profile,AgentBay 同名实例复用云端 Context',
269
+ description: '本地实例关闭后是否保留 Profile,默认 false',
345
270
  },
346
271
  { name: 'url', type: 'string', description: '登录完成后打开的初始页面' },
347
272
  { name: 'executablePath', type: 'string', description: '自定义 Chrome 可执行文件路径' },
348
- { name: 'accountId', type: 'string | number', description: '登录账号列表中的 accountId' },
349
- {
350
- name: 'havanaId',
351
- type: 'string | number',
352
- description: '直接登录 havanaId;需要同时传 site',
353
- },
354
- { name: 'site', type: 'string | number', description: 'havanaId 对应的站点' },
355
- { name: 'query', type: 'string', description: '搜索、借用并登录匹配的 TDBank 账号' },
356
- {
357
- name: 'tabId',
358
- type: 'number',
359
- description: 'CDP 控制浏览器中用于读取 TDBank Cookie 的标签页',
360
- },
361
273
  {
362
274
  name: 'copyCookieDomains',
363
275
  type: 'string[] | "mearl-services" | { presets?: ["mearl-services"]; domains?: string[] }',
@@ -366,22 +278,13 @@ export const COMMANDS = [
366
278
  ],
367
279
  examples: [
368
280
  `browser_launch --payload '{"provider":"brow","providerOptions":{}}'`,
369
- `browser_launch --payload '{"name":"cloud-a","provider":"agentbay","userAgentMode":"desktop","url":"https://example.com"}'`,
370
- `browser_launch --payload '{"name":"cloud-public","provider":"agentbay","imageId":"browser_latest","url":"https://example.com"}'`,
371
- `browser_launch --payload '{"name":"cloud-login","provider":"agentbay","persistent":true,"copyCookieDomains":["example.com"],"url":"https://example.com/account"}'`,
372
- `browser_launch --payload '{"name":"cloud-login","provider":"agentbay","reuse":"require","copyCookieDomains":["example.com"]}'`,
373
- `browser_launch --browser '<本地浏览器 browserId>' --payload '{"sessionId":"<AgentBay sessionId>","copyCookieDomains":["example.com"]}'`,
374
- `browser_launch --payload '{"name":"cloud-tools","provider":"agentbay","copyCookieDomains":"mearl-services"}'`,
375
- `browser_launch --payload '{"name":"cloud-tools","provider":"agentbay","copyCookieDomains":{"presets":["mearl-services"],"domains":["figma.com"]}}'`,
376
- `browser_launch --payload '{"name":"account-a","headless":true,"accountId":12345}'`,
377
281
  `browser_launch --payload '{"name":"figma","userAgentMode":"desktop","copyCookieDomains":["figma.com"]}'`,
378
- `browser_launch --payload '{"name":"account-b","query":"test_account","url":"https://www.taobao.com"}'`,
379
282
  `browser_launch --payload '{"name":"with-cookies","copyCookieDomains":["example.com","sub.example.org"]}'`,
380
283
  ],
381
284
  },
382
285
  {
383
286
  name: 'browser_close',
384
- description: '关闭指定托管浏览器并按策略保留或清理本地 Profile / AgentBay Context',
287
+ description: '关闭指定托管浏览器,并按 Provider 策略保留或清理持久化数据',
385
288
  params: [
386
289
  {
387
290
  name: 'browser',
@@ -392,12 +295,11 @@ export const COMMANDS = [
392
295
  {
393
296
  name: 'deleteProfile',
394
297
  type: 'boolean',
395
- description: '强制删除持久化本地 Profile 或 AgentBay Context,默认 false',
298
+ description: '强制删除持久化数据,默认 false',
396
299
  },
397
300
  ],
398
301
  examples: [
399
302
  `browser_close --payload '{"browser":"managed:account-a"}'`,
400
- `browser_close --payload '{"browser":"managed:agentbay:cloud-a"}'`,
401
303
  `browser_close --payload '{"browser":"account-b","deleteProfile":true}'`,
402
304
  ],
403
305
  },
@@ -837,18 +739,6 @@ export const COMMANDS = [
837
739
  ],
838
740
  examples: ['page_selected_element', 'page_selected_element --output ./element.png'],
839
741
  },
840
- {
841
- name: 'get_user_info',
842
- description: '获取当前浏览器登录的阿里员工信息',
843
- params: [
844
- {
845
- name: 'detail',
846
- type: 'boolean',
847
- description: '是否获取完整用户信息,默认 false(只返回工号)',
848
- },
849
- ],
850
- examples: ['get_user_info', `get_user_info --payload '{"detail":true}'`],
851
- },
852
742
  // ── 录制 ──────────────────────────────────────────────────────────────────
853
743
  {
854
744
  name: 'record_start',
@@ -967,7 +857,7 @@ export const COMMANDS = [
967
857
  },
968
858
  {
969
859
  name: 'get_cookie',
970
- description: '读取当前标签页的一个指定非分区 Cookie;拒绝返回 HttpOnly Cookie',
860
+ description: '从目标浏览器读取一个指定非分区 Cookie;拒绝返回 HttpOnly Cookie',
971
861
  params: [
972
862
  { name: 'tabId', type: 'number', required: true, description: '目标标签页 ID' },
973
863
  {
@@ -976,16 +866,22 @@ export const COMMANDS = [
976
866
  required: true,
977
867
  description: '要读取的 Cookie 名称;不支持列举全部 Cookie',
978
868
  },
869
+ {
870
+ name: 'url',
871
+ type: 'string',
872
+ description: '可选 Cookie 查询 URL;省略时使用当前标签页 URL',
873
+ },
979
874
  {
980
875
  name: 'domain',
981
876
  type: 'string',
982
- description: '可选精确域过滤,只允许当前 host 或其父域',
877
+ description: '可选精确域过滤,只允许 Cookie 查询 URL 的 host 或其父域',
983
878
  },
984
879
  { name: 'path', type: 'string', description: '可选精确 path 过滤' },
985
880
  ],
986
881
  examples: [
987
882
  `get_cookie --payload '{"tabId":12345,"name":"feature_flag"}'`,
988
883
  `get_cookie --payload '{"tabId":12345,"name":"edith_switch_br.rx-vehicle-search_home","domain":"taobao.com"}'`,
884
+ `get_cookie --payload '{"tabId":12345,"name":"tracknick","url":"https://www.taobao.com/","domain":"taobao.com","path":"/"}'`,
989
885
  ],
990
886
  },
991
887
  {
@@ -60,11 +60,6 @@ export interface GetMocksParams {
60
60
  tabId?: number;
61
61
  apiName?: string;
62
62
  }
63
- export interface GetApiSchemaParams {
64
- api: string;
65
- version?: string;
66
- fields?: Array<'schema' | 'hsf'>;
67
- }
68
63
  export declare const SEND_REQUEST_MAX_FILES = 20;
69
64
  export declare const SEND_REQUEST_MAX_TOTAL_FILE_BYTES: number;
70
65
  export declare const SEND_REQUEST_MAX_TOTAL_BASE64_FILE_BYTES: number;
@@ -111,18 +106,6 @@ export interface SendMtopRequestParams {
111
106
  headers?: Record<string, string>;
112
107
  ttid?: string;
113
108
  }
114
- export interface TdbankAccountParams {
115
- operation?: 'current' | 'list' | 'login' | 'switch' | 'borrow';
116
- pageIndex?: number;
117
- refresh?: boolean;
118
- query?: string;
119
- accountId?: string | number;
120
- havanaId?: string | number;
121
- site?: string | number;
122
- ssoKey?: string;
123
- tabId?: number;
124
- identityId?: string | number;
125
- }
126
109
  export type BrowserStatus = 'connected' | 'pairing' | 'running_disconnected' | 'stopped';
127
110
  export type BrowserTransport = 'extension' | 'cdp' | 'provider';
128
111
  export interface BrowserPairingInfo {
@@ -154,11 +137,6 @@ export type BrowserDetails = Record<string, BrowserJsonValue> & {
154
137
  headless?: boolean;
155
138
  createdAt?: string;
156
139
  cdpPort?: number;
157
- account?: {
158
- nickname: string;
159
- accountId?: string;
160
- loginId?: string;
161
- };
162
140
  copiedCookies?: {
163
141
  domains: string[];
164
142
  count: number;
@@ -240,11 +218,6 @@ export interface BrowserReleaseResult {
240
218
  hadActiveControl: boolean;
241
219
  transports: BrowserTransport[];
242
220
  affectedTabIds: number[];
243
- /** True when browser_release also removed a sessionId-based local AgentBay attachment. */
244
- detached?: boolean;
245
- /** Attached sessions remain alive in AgentBay after the local attachment is released. */
246
- sessionClosed?: boolean;
247
- agentbaySessionId?: string;
248
221
  failures?: BrowserReleaseFailure[];
249
222
  }
250
223
  export interface CookieCopyScope {
@@ -254,30 +227,19 @@ export interface CookieCopyScope {
254
227
  domains?: string[];
255
228
  }
256
229
  export interface BrowserLaunchParams {
257
- /** Required when creating a browser; optional when attaching by AgentBay sessionId. */
230
+ /** Required by the built-in local Provider. */
258
231
  name?: string;
259
232
  /** Built-in runtime or the id of a registered external Provider. */
260
233
  provider?: string;
261
234
  /** Structured launch parameters declared by the selected Provider. Cannot be mixed with flat options. */
262
235
  providerOptions?: Record<string, BrowserJsonValue>;
263
- /** Attach to an exact live AgentBay session without creating or owning it. */
264
- sessionId?: string;
265
- /** AgentBay running-session reuse policy. Defaults to never. */
266
- reuse?: 'never' | 'prefer' | 'require';
267
- /** AgentBay image alias or concrete image ID. Only supported by the AgentBay provider. */
268
- imageId?: string;
269
- /** Local Chrome defaults to true. AgentBay is fixed to false and rejects true. */
236
+ /** Whether the built-in local Chrome uses headless mode. Defaults to true. */
270
237
  headless?: boolean;
271
- /** Desktop mode uses the local Chrome UA or copies the selected control browser UA to AgentBay. */
238
+ /** Desktop mode uses a user agent matching the local Chrome version. */
272
239
  userAgentMode?: 'default' | 'desktop';
273
240
  persistent?: boolean;
274
241
  executablePath?: string;
275
242
  url?: string;
276
- accountId?: string | number;
277
- havanaId?: string | number;
278
- site?: string | number;
279
- query?: string;
280
- tabId?: number;
281
243
  /** Copy explicit domains, the Mearl-service preset, or a combination of both. */
282
244
  copyCookieDomains?: string[] | 'mearl-services' | CookieCopyScope;
283
245
  }
@@ -289,6 +251,21 @@ interface BrowserProviderSchemaBase {
289
251
  title?: string;
290
252
  description?: string;
291
253
  default?: BrowserJsonValue;
254
+ /** Optional Mearl form component used to edit this schema value. */
255
+ component?: 'cookie-sync' | 'switch';
256
+ /** Presentation-only default used by Mearl forms without changing runtime semantics. */
257
+ formDefault?: BrowserJsonValue;
258
+ /** Excludes an advanced runtime option from generated Mearl forms. */
259
+ formHidden?: boolean;
260
+ /** Places compact fields side by side in generated Mearl forms. */
261
+ formWidth?: 'half' | 'full';
262
+ /** Hides the optional badge without changing schema validation. */
263
+ formHideOptional?: boolean;
264
+ /** Conditionally displays and submits this field based on another form value. */
265
+ formVisibleWhen?: {
266
+ field: string;
267
+ empty: boolean;
268
+ };
292
269
  }
293
270
  export type BrowserProviderInputSchema = (BrowserProviderSchemaBase & {
294
271
  type: 'string';
@@ -601,6 +578,8 @@ export interface SetTimezoneResult {
601
578
  export interface GetCookieParams {
602
579
  tabId?: number;
603
580
  name: string;
581
+ /** Cookie lookup URL; defaults to the current tab URL. */
582
+ url?: string;
604
583
  domain?: string;
605
584
  path?: string;
606
585
  }
@@ -629,9 +608,6 @@ export interface SetCookieResult {
629
608
  path: string;
630
609
  reloaded: boolean;
631
610
  }
632
- export interface GetUserInfoParams {
633
- detail?: boolean;
634
- }
635
611
  export interface RecordParams {
636
612
  tabId?: number;
637
613
  }
@@ -669,10 +645,6 @@ export interface BrowserActionMap {
669
645
  request: GetEventsParams;
670
646
  response: unknown;
671
647
  };
672
- get_api_schema: {
673
- request: GetApiSchemaParams;
674
- response: unknown;
675
- };
676
648
  set_mock: {
677
649
  request: SetMockParams;
678
650
  response: unknown;
@@ -697,10 +669,6 @@ export interface BrowserActionMap {
697
669
  request: SendMtopRequestParams;
698
670
  response: unknown;
699
671
  };
700
- tdbank_account: {
701
- request: TdbankAccountParams;
702
- response: unknown;
703
- };
704
672
  browser_list: {
705
673
  request: undefined;
706
674
  response: BrowserListResult;
@@ -821,10 +789,6 @@ export interface BrowserActionMap {
821
789
  request: RequestDomainPermissionParams;
822
790
  response: unknown;
823
791
  };
824
- get_user_info: {
825
- request: GetUserInfoParams;
826
- response: unknown;
827
- };
828
792
  run_actions: {
829
793
  request: RunActionsParams;
830
794
  response: unknown;
@@ -843,14 +807,12 @@ export declare const BROWSER_ACTIONS: {
843
807
  readonly get_requests: true;
844
808
  readonly get_logs: true;
845
809
  readonly get_events: true;
846
- readonly get_api_schema: true;
847
810
  readonly set_mock: true;
848
811
  readonly get_mocks: true;
849
812
  readonly set_rule: true;
850
813
  readonly get_rules: true;
851
814
  readonly send_request: true;
852
815
  readonly send_mtop_request: true;
853
- readonly tdbank_account: true;
854
816
  readonly browser_list: true;
855
817
  readonly browser_select_browser: true;
856
818
  readonly browser_release: true;
@@ -881,7 +843,6 @@ export declare const BROWSER_ACTIONS: {
881
843
  readonly record_start: true;
882
844
  readonly record_stop: true;
883
845
  readonly request_domain_permission: true;
884
- readonly get_user_info: true;
885
846
  readonly run_actions: true;
886
847
  };
887
848
  export declare const BROWSER_COMMAND_ACTIONS: {
@@ -890,14 +851,12 @@ export declare const BROWSER_COMMAND_ACTIONS: {
890
851
  readonly get_requests: true;
891
852
  readonly get_logs: true;
892
853
  readonly get_events: true;
893
- readonly get_api_schema: true;
894
854
  readonly set_mock: true;
895
855
  readonly get_mocks: true;
896
856
  readonly set_rule: true;
897
857
  readonly get_rules: true;
898
858
  readonly send_request: true;
899
859
  readonly send_mtop_request: true;
900
- readonly tdbank_account: true;
901
860
  readonly browser_list: true;
902
861
  readonly browser_release: true;
903
862
  readonly browser_launch: true;
@@ -927,7 +886,6 @@ export declare const BROWSER_COMMAND_ACTIONS: {
927
886
  readonly record_start: true;
928
887
  readonly record_stop: true;
929
888
  readonly request_domain_permission: true;
930
- readonly get_user_info: true;
931
889
  readonly run_actions: true;
932
890
  };
933
891
  export declare const EXTENSION_BROWSER_ACTIONS: {
@@ -936,14 +894,12 @@ export declare const EXTENSION_BROWSER_ACTIONS: {
936
894
  readonly get_requests: true;
937
895
  readonly get_logs: true;
938
896
  readonly get_events: true;
939
- readonly get_api_schema: true;
940
897
  readonly set_mock: true;
941
898
  readonly get_mocks: true;
942
899
  readonly set_rule: true;
943
900
  readonly get_rules: true;
944
901
  readonly send_request: true;
945
902
  readonly send_mtop_request: true;
946
- readonly tdbank_account: true;
947
903
  readonly browser_release: true;
948
904
  readonly page_screenshot: true;
949
905
  readonly page_selected_element: true;
@@ -970,7 +926,6 @@ export declare const EXTENSION_BROWSER_ACTIONS: {
970
926
  readonly record_start: true;
971
927
  readonly record_stop: true;
972
928
  readonly request_domain_permission: true;
973
- readonly get_user_info: true;
974
929
  readonly run_actions: true;
975
930
  };
976
931
  export declare function isBrowserAction(value: unknown): value is BrowserAction;
@@ -64,14 +64,12 @@ export const BROWSER_ACTIONS = {
64
64
  get_requests: true,
65
65
  get_logs: true,
66
66
  get_events: true,
67
- get_api_schema: true,
68
67
  set_mock: true,
69
68
  get_mocks: true,
70
69
  set_rule: true,
71
70
  get_rules: true,
72
71
  send_request: true,
73
72
  send_mtop_request: true,
74
- tdbank_account: true,
75
73
  browser_list: true,
76
74
  browser_select_browser: true,
77
75
  browser_release: true,
@@ -102,7 +100,6 @@ export const BROWSER_ACTIONS = {
102
100
  record_start: true,
103
101
  record_stop: true,
104
102
  request_domain_permission: true,
105
- get_user_info: true,
106
103
  run_actions: true,
107
104
  };
108
105
  export const BROWSER_COMMAND_ACTIONS = {
@@ -111,14 +108,12 @@ export const BROWSER_COMMAND_ACTIONS = {
111
108
  get_requests: true,
112
109
  get_logs: true,
113
110
  get_events: true,
114
- get_api_schema: true,
115
111
  set_mock: true,
116
112
  get_mocks: true,
117
113
  set_rule: true,
118
114
  get_rules: true,
119
115
  send_request: true,
120
116
  send_mtop_request: true,
121
- tdbank_account: true,
122
117
  browser_list: true,
123
118
  browser_release: true,
124
119
  browser_launch: true,
@@ -148,7 +143,6 @@ export const BROWSER_COMMAND_ACTIONS = {
148
143
  record_start: true,
149
144
  record_stop: true,
150
145
  request_domain_permission: true,
151
- get_user_info: true,
152
146
  run_actions: true,
153
147
  };
154
148
  export const EXTENSION_BROWSER_ACTIONS = {
@@ -157,14 +151,12 @@ export const EXTENSION_BROWSER_ACTIONS = {
157
151
  get_requests: true,
158
152
  get_logs: true,
159
153
  get_events: true,
160
- get_api_schema: true,
161
154
  set_mock: true,
162
155
  get_mocks: true,
163
156
  set_rule: true,
164
157
  get_rules: true,
165
158
  send_request: true,
166
159
  send_mtop_request: true,
167
- tdbank_account: true,
168
160
  browser_release: true,
169
161
  page_screenshot: true,
170
162
  page_selected_element: true,
@@ -191,7 +183,6 @@ export const EXTENSION_BROWSER_ACTIONS = {
191
183
  record_start: true,
192
184
  record_stop: true,
193
185
  request_domain_permission: true,
194
- get_user_info: true,
195
186
  run_actions: true,
196
187
  };
197
188
  export function isBrowserAction(value) {
package/dist/index.d.ts CHANGED
@@ -4,10 +4,11 @@
4
4
  * Discovers browser targets on this machine and every configured cloud connector,
5
5
  * then routes actions using the global browser ids returned by browser_list.
6
6
  */
7
- export { UnifiedClient, UnifiedClient as MearlClient, decodeBrowserTarget, invoke, listCloudConnectors, } from './unified.js';
7
+ export { UnifiedClient, UnifiedClient as MearlClient, decodeBrowserTarget, invoke, invokePlugin, listCloudConnectors, } from './unified.js';
8
8
  export type { UnifiedClientOptions, UnifiedInvokeOptions, UnifiedInvokeOptions as InvokeOptions, } from './unified.js';
9
+ export type { PluginInvocation, PluginInvokeOptions } from './plugin.js';
9
10
  export { APP_PROFILE_NAMES, BROWSER_DEVICE_PRESET_NAMES, BROWSER_ACTIONS, BROWSER_COMMAND_ACTIONS, EXTENSION_BROWSER_ACTIONS, PAGE_ACT_ACTIONS, SEND_REQUEST_MAX_FILES, SEND_REQUEST_MAX_TOTAL_BASE64_FILE_BYTES, SEND_REQUEST_MAX_TOTAL_FILE_BYTES, isBrowserAction, isBrowserCapabilityAction, isBrowserCommandAction, isExtensionBrowserAction, } from './generated-browser-action-protocol.js';
10
- export type { ActionStep, AppProfileName, BrowserAction, BrowserActionMap, BrowserActionRequest, BrowserActionResponse, BrowserCapabilities, BrowserCapabilityAction, BrowserCloseParams, BrowserCommandAction, BrowserInfo, BrowserInfoBase, BrowserJsonValue, BrowserLaunchParams, BrowserProviderOperation, BrowserListResult, BrowserPairingInfo, BrowserReleaseFailure, BrowserReleaseResult, BrowserProviderDefinition, BrowserProviderIdentity, BrowserProviderInputSchema, BrowserProviderListResult, BrowserReference, BrowserDetails, BrowserSource, BrowserStatus, BrowserScreenshotKind, BrowserTransport, CaptureCheckpointParams, CaptureCheckpointResult, BrowserDevicePresetName, BrowserEmulationOptions, ExtensionBrowserAction, GetApiSchemaParams, GetCookieParams, GetCookieResult, GetEventsParams, GetLogsParams, GetMocksParams, GetRequestsParams, GetUserInfoParams, ManagedBrowserInfo, PageClickParams, PageDragEndpoint, PageDragParams, PageDragPoint, PageActAction, PageDiagnosticsOptions, PageDiagnosticsSetting, PageEvalParams, PageFramesParams, PageHoverParams, PageNavigateParams, PageObservationWaitOptions, PagePressParams, PageScreenshotParams, PageScrollParams, PageSelectedElementParams, PageSnapshotParams, PageSnapshotQuery, PageTypeParams, PageUploadParams, PageWaitParams, RecordParams, RegularBrowserInfo, RequestDomainPermissionParams, RulesResult, RunActionName, RunActionsParams, SelectBrowserParams, SelectBrowserResult, SendRequestFile, SendRequestFormValue, SendMtopRequestParams, SendRequestParams, SetAppProfileParams, SetCookieParams, SetCookieResult, SetDeviceEmulationParams, SetMockParams, SetRuleParams, SetTimezoneParams, SetTimezoneResult, TabCloseParams, TabOpenParams, TdbankAccountParams, } from './generated-browser-action-protocol.js';
11
+ export type { ActionStep, AppProfileName, BrowserAction, BrowserActionMap, BrowserActionRequest, BrowserActionResponse, BrowserCapabilities, BrowserCapabilityAction, BrowserCloseParams, BrowserCommandAction, BrowserInfo, BrowserInfoBase, BrowserJsonValue, BrowserLaunchParams, BrowserProviderOperation, BrowserListResult, BrowserPairingInfo, BrowserReleaseFailure, BrowserReleaseResult, BrowserProviderDefinition, BrowserProviderIdentity, BrowserProviderInputSchema, BrowserProviderListResult, BrowserReference, BrowserDetails, BrowserSource, BrowserStatus, BrowserScreenshotKind, BrowserTransport, CaptureCheckpointParams, CaptureCheckpointResult, BrowserDevicePresetName, BrowserEmulationOptions, ExtensionBrowserAction, GetCookieParams, GetCookieResult, GetEventsParams, GetLogsParams, GetMocksParams, GetRequestsParams, ManagedBrowserInfo, PageClickParams, PageDragEndpoint, PageDragParams, PageDragPoint, PageActAction, PageDiagnosticsOptions, PageDiagnosticsSetting, PageEvalParams, PageFramesParams, PageHoverParams, PageNavigateParams, PageObservationWaitOptions, PagePressParams, PageScreenshotParams, PageScrollParams, PageSelectedElementParams, PageSnapshotParams, PageSnapshotQuery, PageTypeParams, PageUploadParams, PageWaitParams, RecordParams, RegularBrowserInfo, RequestDomainPermissionParams, RulesResult, RunActionName, RunActionsParams, SelectBrowserParams, SelectBrowserResult, SendRequestFile, SendRequestFormValue, SendMtopRequestParams, SendRequestParams, SetAppProfileParams, SetCookieParams, SetCookieResult, SetDeviceEmulationParams, SetMockParams, SetRuleParams, SetTimezoneParams, SetTimezoneResult, TabCloseParams, TabOpenParams, } from './generated-browser-action-protocol.js';
11
12
  import { type UnifiedInvokeOptions } from './unified.js';
12
13
  import type * as Protocol from './generated-browser-action-protocol.js';
13
14
  export declare function tabCheckpoint(params?: Protocol.CaptureCheckpointParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'tab_checkpoint'>>;
@@ -18,10 +19,8 @@ export declare function getLogs(params?: Protocol.GetLogsParams, options?: Unifi
18
19
  export declare function getEvents(params?: Protocol.GetEventsParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'get_events'>>;
19
20
  export declare function setMock(params: Protocol.SetMockParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'set_mock'>>;
20
21
  export declare function getMocks(params?: Protocol.GetMocksParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'get_mocks'>>;
21
- export declare function getApiSchema(params: Protocol.GetApiSchemaParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'get_api_schema'>>;
22
22
  export declare function sendRequest(params: Protocol.SendRequestParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'send_request'>>;
23
23
  export declare function sendMtopRequest(params: Protocol.SendMtopRequestParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'send_mtop_request'>>;
24
- export declare function tdbankAccount(params?: Protocol.TdbankAccountParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'tdbank_account'>>;
25
24
  export declare function browserList(options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'browser_list'>>;
26
25
  export declare function selectBrowser(params?: Protocol.SelectBrowserParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'browser_select_browser'>>;
27
26
  export declare function browserRelease(options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'browser_release'>>;
@@ -51,5 +50,4 @@ export declare function setAppProfile(params: Protocol.SetAppProfileParams, opti
51
50
  export declare function setTimezone(params: Protocol.SetTimezoneParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'set_timezone'>>;
52
51
  export declare function getCookie(params: Protocol.GetCookieParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'get_cookie'>>;
53
52
  export declare function setCookie(params: Protocol.SetCookieParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'set_cookie'>>;
54
- export declare function getUserInfo(params?: Protocol.GetUserInfoParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'get_user_info'>>;
55
53
  export declare function runActions(params: Protocol.RunActionsParams, options?: UnifiedInvokeOptions): Promise<Protocol.BrowserActionResponse<'run_actions'>>;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Discovers browser targets on this machine and every configured cloud connector,
5
5
  * then routes actions using the global browser ids returned by browser_list.
6
6
  */
7
- export { UnifiedClient, UnifiedClient as MearlClient, decodeBrowserTarget, invoke, listCloudConnectors, } from './unified.js';
7
+ export { UnifiedClient, UnifiedClient as MearlClient, decodeBrowserTarget, invoke, invokePlugin, listCloudConnectors, } from './unified.js';
8
8
  export { APP_PROFILE_NAMES, BROWSER_DEVICE_PRESET_NAMES, BROWSER_ACTIONS, BROWSER_COMMAND_ACTIONS, EXTENSION_BROWSER_ACTIONS, PAGE_ACT_ACTIONS, SEND_REQUEST_MAX_FILES, SEND_REQUEST_MAX_TOTAL_BASE64_FILE_BYTES, SEND_REQUEST_MAX_TOTAL_FILE_BYTES, isBrowserAction, isBrowserCapabilityAction, isBrowserCommandAction, isExtensionBrowserAction, } from './generated-browser-action-protocol.js';
9
9
  import { invoke } from './unified.js';
10
10
  export function tabCheckpoint(params = {}, options) {
@@ -29,18 +29,12 @@ export function setMock(params, options) {
29
29
  export function getMocks(params = {}, options) {
30
30
  return invoke('get_mocks', params, options);
31
31
  }
32
- export function getApiSchema(params, options) {
33
- return invoke('get_api_schema', params, options);
34
- }
35
32
  export function sendRequest(params, options) {
36
33
  return invoke('send_request', params, options);
37
34
  }
38
35
  export function sendMtopRequest(params, options) {
39
36
  return invoke('send_mtop_request', params, options);
40
37
  }
41
- export function tdbankAccount(params = {}, options) {
42
- return invoke('tdbank_account', params, options);
43
- }
44
38
  export function browserList(options) {
45
39
  return invoke('browser_list', {}, options);
46
40
  }
@@ -128,9 +122,6 @@ export function getCookie(params, options) {
128
122
  export function setCookie(params, options) {
129
123
  return invoke('set_cookie', params, options);
130
124
  }
131
- export function getUserInfo(params = {}, options) {
132
- return invoke('get_user_info', params, options);
133
- }
134
125
  export function runActions(params, options) {
135
126
  return invoke('run_actions', params, options);
136
127
  }