@deepraxis/sdk 0.1.1-dev.441fd40 → 0.1.1-dev.44f27ff

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.
@@ -534,7 +534,7 @@ export type BrowserError = {
534
534
  statusCode: number;
535
535
  error: string;
536
536
  message: string;
537
- code: 'INVALID_PARAMS' | 'PERMISSION_DENIED' | 'NOT_IMPLEMENTED' | 'INTERNAL' | 'UNAUTHENTICATED' | 'CONNECT_SIGNATURE_INVALID' | 'SESSION_NOT_FOUND' | 'SESSION_ENDED' | 'SESSION_INVALID_STATE' | 'CONTEXT_NOT_FOUND' | 'CONTEXT_LOCKED' | 'HANDOFF_NOT_PENDING' | 'CONCURRENCY_LIMIT' | 'RATE_LIMITED' | 'INSUFFICIENT_BALANCE' | 'QUOTA_EXHAUSTED' | 'ACCOUNT_SUSPENDED' | 'PROVIDER_UNSUPPORTED' | 'PROVIDER_CAPACITY' | 'PROVIDER_FAILED' | 'SERVICE_UNAVAILABLE' | 'PARENT_NOT_FOUND' | 'INVALID_FILTER' | 'INVALID_PAGE_TOKEN';
537
+ code: 'INVALID_PARAMS' | 'PERMISSION_DENIED' | 'NOT_IMPLEMENTED' | 'INTERNAL' | 'UNAUTHENTICATED' | 'CONNECT_SIGNATURE_INVALID' | 'SESSION_NOT_FOUND' | 'SESSION_ENDED' | 'SESSION_INVALID_STATE' | 'CONTEXT_NOT_FOUND' | 'CONTEXT_LOCKED' | 'HANDOFF_NOT_PENDING' | 'CONCURRENCY_LIMIT' | 'RATE_LIMITED' | 'INSUFFICIENT_BALANCE' | 'QUOTA_EXHAUSTED' | 'ACCOUNT_SUSPENDED' | 'PROVIDER_UNSUPPORTED' | 'PROVIDER_CAPACITY' | 'PROVIDER_FAILED' | 'SERVICE_UNAVAILABLE' | 'PARENT_NOT_FOUND' | 'INVALID_FILTER' | 'INVALID_PAGE_TOKEN' | 'ACTION_TAB_NOT_FOUND' | 'ACTION_NO_TAB' | 'ACTION_REF_STALE' | 'ACTION_FAILED' | 'ACTION_TIMEOUT' | 'ACTION_RESULT_TOO_LARGE';
538
538
  };
539
539
  export type BrowserSession = {
540
540
  /**
@@ -30362,6 +30362,11 @@ export type StudioDraftSummary = {
30362
30362
  * Draft structure and property revision; pass it as expected_revision when changing the draft itself rather than a unit.
30363
30363
  */
30364
30364
  revision: number;
30365
+ /**
30366
+ * Content revision of the draft; a draft derived from this one is stale once this passes its derivedFrom.revision.
30367
+ */
30368
+ contentRevision: number;
30369
+ derivedFrom?: StudioDraftSource;
30365
30370
  lastRendition?: StudioLastRendition;
30366
30371
  };
30367
30372
  /**
@@ -30396,6 +30401,10 @@ export type StudioWorkSummary = {
30396
30401
  * Work this one was adapted from, or null when it was written from scratch; an adaptation keeps a link back to its source.
30397
30402
  */
30398
30403
  adaptedFrom?: string;
30404
+ /**
30405
+ * Work revision as of the list projection; the list may trail a write by a few seconds, so read the work itself before using it as expected_revision.
30406
+ */
30407
+ revision: number;
30399
30408
  /**
30400
30409
  * Last change time in RFC 3339 UTC, used to order the list newest first.
30401
30410
  */
@@ -30442,6 +30451,10 @@ export type StudioTodo = {
30442
30451
  * The item in words, written to be shown to a person as is.
30443
30452
  */
30444
30453
  text: string;
30454
+ /**
30455
+ * For a check_failed item, the key of the failing check, so a program can act on it without parsing the text; a unit that already has an item for it gets no separate check item.
30456
+ */
30457
+ check?: string;
30445
30458
  /**
30446
30459
  * Suggested next call for this item, offered as guidance rather than a fixed script.
30447
30460
  */
@@ -35546,6 +35559,23 @@ export type StudioBriefPoint = {
35546
35559
  */
35547
35560
  text: string;
35548
35561
  };
35562
+ /**
35563
+ * What a draft was derived from, kept with the revision it was built on so staleness can be decided without guessing.
35564
+ */
35565
+ export type StudioDraftSource = {
35566
+ /**
35567
+ * What the draft was derived from: the goal message of the work, or another draft of the same work.
35568
+ */
35569
+ kind: 'message' | 'draft';
35570
+ /**
35571
+ * Identifier of the source draft, present only when the kind is draft.
35572
+ */
35573
+ draft?: string;
35574
+ /**
35575
+ * Source revision this draft was built on; when the source moves past it, stale becomes true until a rebase confirms the catch-up.
35576
+ */
35577
+ revision: number;
35578
+ };
35549
35579
  /**
35550
35580
  * The most recent rendition of a draft, so a list can say at a glance that a piece was already published somewhere.
35551
35581
  */
@@ -35651,23 +35681,6 @@ export type StudioBlock = {
35651
35681
  */
35652
35682
  level?: number;
35653
35683
  };
35654
- /**
35655
- * What a draft was derived from, kept with the revision it was built on so staleness can be decided without guessing.
35656
- */
35657
- export type StudioDraftSource = {
35658
- /**
35659
- * What the draft was derived from: the goal message of the work, or another draft of the same work.
35660
- */
35661
- kind: 'message' | 'draft';
35662
- /**
35663
- * Identifier of the source draft, present only when the kind is draft.
35664
- */
35665
- draft?: string;
35666
- /**
35667
- * Source revision this draft was built on; when the source moves past it, stale becomes true until a rebase confirms the catch-up.
35668
- */
35669
- revision: number;
35670
- };
35671
35684
  /**
35672
35685
  * One reference entry to tie to a unit, with the role it plays in this genre.
35673
35686
  */
@@ -47752,13 +47765,17 @@ export type BrowserListSessionsErrors = {
47752
47765
  */
47753
47766
  403: BrowserError;
47754
47767
  /**
47755
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
47768
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
47756
47769
  */
47757
47770
  404: BrowserError;
47758
47771
  /**
47759
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
47772
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
47760
47773
  */
47761
47774
  409: BrowserError;
47775
+ /**
47776
+ * ACTION_RESULT_TOO_LARGE
47777
+ */
47778
+ 413: BrowserError;
47762
47779
  /**
47763
47780
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
47764
47781
  */
@@ -47779,6 +47796,10 @@ export type BrowserListSessionsErrors = {
47779
47796
  * SERVICE_UNAVAILABLE
47780
47797
  */
47781
47798
  503: BrowserError;
47799
+ /**
47800
+ * ACTION_TIMEOUT
47801
+ */
47802
+ 504: BrowserError;
47782
47803
  };
47783
47804
  export type BrowserListSessionsError = BrowserListSessionsErrors[keyof BrowserListSessionsErrors];
47784
47805
  export type BrowserListSessionsResponses = {
@@ -47821,13 +47842,17 @@ export type BrowserCreateSessionErrors = {
47821
47842
  */
47822
47843
  403: BrowserError;
47823
47844
  /**
47824
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
47845
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
47825
47846
  */
47826
47847
  404: BrowserError;
47827
47848
  /**
47828
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
47849
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
47829
47850
  */
47830
47851
  409: BrowserError;
47852
+ /**
47853
+ * ACTION_RESULT_TOO_LARGE
47854
+ */
47855
+ 413: BrowserError;
47831
47856
  /**
47832
47857
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
47833
47858
  */
@@ -47848,6 +47873,10 @@ export type BrowserCreateSessionErrors = {
47848
47873
  * SERVICE_UNAVAILABLE
47849
47874
  */
47850
47875
  503: BrowserError;
47876
+ /**
47877
+ * ACTION_TIMEOUT
47878
+ */
47879
+ 504: BrowserError;
47851
47880
  };
47852
47881
  export type BrowserCreateSessionError = BrowserCreateSessionErrors[keyof BrowserCreateSessionErrors];
47853
47882
  export type BrowserCreateSessionResponses = {
@@ -47891,13 +47920,17 @@ export type BrowserGetSessionErrors = {
47891
47920
  */
47892
47921
  403: BrowserError;
47893
47922
  /**
47894
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
47923
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
47895
47924
  */
47896
47925
  404: BrowserError;
47897
47926
  /**
47898
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
47927
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
47899
47928
  */
47900
47929
  409: BrowserError;
47930
+ /**
47931
+ * ACTION_RESULT_TOO_LARGE
47932
+ */
47933
+ 413: BrowserError;
47901
47934
  /**
47902
47935
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
47903
47936
  */
@@ -47918,6 +47951,10 @@ export type BrowserGetSessionErrors = {
47918
47951
  * SERVICE_UNAVAILABLE
47919
47952
  */
47920
47953
  503: BrowserError;
47954
+ /**
47955
+ * ACTION_TIMEOUT
47956
+ */
47957
+ 504: BrowserError;
47921
47958
  };
47922
47959
  export type BrowserGetSessionError = BrowserGetSessionErrors[keyof BrowserGetSessionErrors];
47923
47960
  export type BrowserGetSessionResponses = {
@@ -47961,13 +47998,17 @@ export type BrowserCloseSessionErrors = {
47961
47998
  */
47962
47999
  403: BrowserError;
47963
48000
  /**
47964
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48001
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
47965
48002
  */
47966
48003
  404: BrowserError;
47967
48004
  /**
47968
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48005
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
47969
48006
  */
47970
48007
  409: BrowserError;
48008
+ /**
48009
+ * ACTION_RESULT_TOO_LARGE
48010
+ */
48011
+ 413: BrowserError;
47971
48012
  /**
47972
48013
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
47973
48014
  */
@@ -47988,6 +48029,10 @@ export type BrowserCloseSessionErrors = {
47988
48029
  * SERVICE_UNAVAILABLE
47989
48030
  */
47990
48031
  503: BrowserError;
48032
+ /**
48033
+ * ACTION_TIMEOUT
48034
+ */
48035
+ 504: BrowserError;
47991
48036
  };
47992
48037
  export type BrowserCloseSessionError = BrowserCloseSessionErrors[keyof BrowserCloseSessionErrors];
47993
48038
  export type BrowserCloseSessionResponses = {
@@ -48026,13 +48071,17 @@ export type BrowserGetDebugErrors = {
48026
48071
  */
48027
48072
  403: BrowserError;
48028
48073
  /**
48029
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48074
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48030
48075
  */
48031
48076
  404: BrowserError;
48032
48077
  /**
48033
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48078
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48034
48079
  */
48035
48080
  409: BrowserError;
48081
+ /**
48082
+ * ACTION_RESULT_TOO_LARGE
48083
+ */
48084
+ 413: BrowserError;
48036
48085
  /**
48037
48086
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48038
48087
  */
@@ -48053,6 +48102,10 @@ export type BrowserGetDebugErrors = {
48053
48102
  * SERVICE_UNAVAILABLE
48054
48103
  */
48055
48104
  503: BrowserError;
48105
+ /**
48106
+ * ACTION_TIMEOUT
48107
+ */
48108
+ 504: BrowserError;
48056
48109
  };
48057
48110
  export type BrowserGetDebugError = BrowserGetDebugErrors[keyof BrowserGetDebugErrors];
48058
48111
  export type BrowserGetDebugResponses = {
@@ -48104,13 +48157,17 @@ export type BrowserListEventsErrors = {
48104
48157
  */
48105
48158
  403: BrowserError;
48106
48159
  /**
48107
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48160
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48108
48161
  */
48109
48162
  404: BrowserError;
48110
48163
  /**
48111
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48164
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48112
48165
  */
48113
48166
  409: BrowserError;
48167
+ /**
48168
+ * ACTION_RESULT_TOO_LARGE
48169
+ */
48170
+ 413: BrowserError;
48114
48171
  /**
48115
48172
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48116
48173
  */
@@ -48131,6 +48188,10 @@ export type BrowserListEventsErrors = {
48131
48188
  * SERVICE_UNAVAILABLE
48132
48189
  */
48133
48190
  503: BrowserError;
48191
+ /**
48192
+ * ACTION_TIMEOUT
48193
+ */
48194
+ 504: BrowserError;
48134
48195
  };
48135
48196
  export type BrowserListEventsError = BrowserListEventsErrors[keyof BrowserListEventsErrors];
48136
48197
  export type BrowserListEventsResponses = {
@@ -48149,6 +48210,311 @@ export type BrowserListEventsResponses = {
48149
48210
  };
48150
48211
  };
48151
48212
  export type BrowserListEventsResponse = BrowserListEventsResponses[keyof BrowserListEventsResponses];
48213
+ export type BrowserRunPageActionData = {
48214
+ body: {
48215
+ /**
48216
+ * 动作类型,固定为 open。
48217
+ */
48218
+ type: 'open';
48219
+ /**
48220
+ * 要打开的 http 或 https 地址,最多 2048 个字符。
48221
+ */
48222
+ url: string;
48223
+ /**
48224
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48225
+ */
48226
+ tab?: string;
48227
+ /**
48228
+ * 为 true 时在新标签页打开,否则在当前标签页打开。
48229
+ */
48230
+ newTab?: boolean;
48231
+ } | {
48232
+ /**
48233
+ * 动作类型,固定为 tabs.list。
48234
+ */
48235
+ type: 'tabs.list';
48236
+ } | {
48237
+ /**
48238
+ * 动作类型,固定为 snapshot。
48239
+ */
48240
+ type: 'snapshot';
48241
+ /**
48242
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48243
+ */
48244
+ tab?: string;
48245
+ } | {
48246
+ /**
48247
+ * 动作类型,固定为 click。
48248
+ */
48249
+ type: 'click';
48250
+ /**
48251
+ * 最近一次快照里要点击的元素的 ref,形如 e12;页面跳转后失效。
48252
+ */
48253
+ ref: string;
48254
+ /**
48255
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48256
+ */
48257
+ tab?: string;
48258
+ } | {
48259
+ /**
48260
+ * 动作类型,固定为 fill。
48261
+ */
48262
+ type: 'fill';
48263
+ /**
48264
+ * 最近一次快照里要填写的输入元素的 ref,形如 e12;页面跳转后失效。
48265
+ */
48266
+ ref: string;
48267
+ /**
48268
+ * 要填入的文本,会替换输入框原有内容;最多 100000 个字符,可为空字符串。
48269
+ */
48270
+ text: string;
48271
+ /**
48272
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48273
+ */
48274
+ tab?: string;
48275
+ } | {
48276
+ /**
48277
+ * 动作类型,固定为 press。
48278
+ */
48279
+ type: 'press';
48280
+ /**
48281
+ * 要按下的键:Enter、Tab、Escape、Backspace、Delete、方向键、Home、End、PageUp、PageDown、Space 或单个可打印字符。
48282
+ */
48283
+ key: string;
48284
+ /**
48285
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48286
+ */
48287
+ tab?: string;
48288
+ } | {
48289
+ /**
48290
+ * 动作类型,固定为 scroll。
48291
+ */
48292
+ type: 'scroll';
48293
+ /**
48294
+ * 滚动方向:up 向上,down 向下。
48295
+ */
48296
+ direction: 'up' | 'down';
48297
+ /**
48298
+ * 滚动的像素数,默认 800,最多 10000。
48299
+ */
48300
+ pixels?: number;
48301
+ /**
48302
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48303
+ */
48304
+ tab?: string;
48305
+ } | {
48306
+ /**
48307
+ * 动作类型,固定为 screenshot。
48308
+ */
48309
+ type: 'screenshot';
48310
+ /**
48311
+ * 为 true 时截取整页,否则只截当前视口。
48312
+ */
48313
+ fullPage?: boolean;
48314
+ /**
48315
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48316
+ */
48317
+ tab?: string;
48318
+ } | {
48319
+ /**
48320
+ * 动作类型,固定为 evaluate。
48321
+ */
48322
+ type: 'evaluate';
48323
+ /**
48324
+ * 在页面里执行的 JavaScript 表达式,结果按 JSON 返回;最多 20000 个字符。
48325
+ */
48326
+ expression: string;
48327
+ /**
48328
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48329
+ */
48330
+ tab?: string;
48331
+ } | {
48332
+ /**
48333
+ * 动作类型:后退、前进或刷新当前页。
48334
+ */
48335
+ type: 'back' | 'forward' | 'reload';
48336
+ /**
48337
+ * 标签页 ID,来自 tabs.list 或上一个动作的结果;省略时作用于当前标签页。
48338
+ */
48339
+ tab?: string;
48340
+ };
48341
+ path: {
48342
+ /**
48343
+ * 浏览器会话 ID;使用创建或列出会话返回的 id,以 bss_ 开头。
48344
+ */
48345
+ sessionId: string;
48346
+ };
48347
+ query?: never;
48348
+ url: '/browser/v1/sessions/{sessionId}/actions';
48349
+ };
48350
+ export type BrowserRunPageActionErrors = {
48351
+ /**
48352
+ * INVALID_PARAMS / INVALID_FILTER / INVALID_PAGE_TOKEN
48353
+ */
48354
+ 400: BrowserError;
48355
+ /**
48356
+ * UNAUTHENTICATED / CONNECT_SIGNATURE_INVALID
48357
+ */
48358
+ 401: BrowserError;
48359
+ /**
48360
+ * INSUFFICIENT_BALANCE / QUOTA_EXHAUSTED
48361
+ */
48362
+ 402: BrowserError;
48363
+ /**
48364
+ * PERMISSION_DENIED / ACCOUNT_SUSPENDED
48365
+ */
48366
+ 403: BrowserError;
48367
+ /**
48368
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48369
+ */
48370
+ 404: BrowserError;
48371
+ /**
48372
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48373
+ */
48374
+ 409: BrowserError;
48375
+ /**
48376
+ * ACTION_RESULT_TOO_LARGE
48377
+ */
48378
+ 413: BrowserError;
48379
+ /**
48380
+ * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48381
+ */
48382
+ 429: BrowserError;
48383
+ /**
48384
+ * INTERNAL
48385
+ */
48386
+ 500: BrowserError;
48387
+ /**
48388
+ * NOT_IMPLEMENTED / PROVIDER_UNSUPPORTED
48389
+ */
48390
+ 501: BrowserError;
48391
+ /**
48392
+ * PROVIDER_FAILED
48393
+ */
48394
+ 502: BrowserError;
48395
+ /**
48396
+ * SERVICE_UNAVAILABLE
48397
+ */
48398
+ 503: BrowserError;
48399
+ /**
48400
+ * ACTION_TIMEOUT
48401
+ */
48402
+ 504: BrowserError;
48403
+ };
48404
+ export type BrowserRunPageActionError = BrowserRunPageActionErrors[keyof BrowserRunPageActionErrors];
48405
+ export type BrowserRunPageActionResponses = {
48406
+ /**
48407
+ * 请求成功。
48408
+ */
48409
+ 200: {
48410
+ /**
48411
+ * 这次执行的动作类型,与请求的 type 相同。
48412
+ */
48413
+ type: 'open' | 'click' | 'fill' | 'press' | 'scroll' | 'back' | 'forward' | 'reload';
48414
+ /**
48415
+ * 动作作用的标签页 ID,可在后续动作的 tab 里使用。
48416
+ */
48417
+ tab: string;
48418
+ /**
48419
+ * 动作完成后该标签页的地址。
48420
+ */
48421
+ url: string;
48422
+ /**
48423
+ * 动作完成后该标签页的标题,页面没有标题时为空字符串。
48424
+ */
48425
+ title: string;
48426
+ } | {
48427
+ /**
48428
+ * 动作类型,固定为 tabs.list。
48429
+ */
48430
+ type: 'tabs.list';
48431
+ /**
48432
+ * 会话里所有打开的标签页。
48433
+ */
48434
+ tabs: Array<{
48435
+ /**
48436
+ * 标签页 ID,可在动作的 tab 里使用。
48437
+ */
48438
+ id: string;
48439
+ /**
48440
+ * 标签页当前地址。
48441
+ */
48442
+ url: string;
48443
+ /**
48444
+ * 标签页当前标题。
48445
+ */
48446
+ title: string;
48447
+ /**
48448
+ * 是否为当前标签页,省略 tab 的动作作用于它。
48449
+ */
48450
+ active: boolean;
48451
+ }>;
48452
+ } | {
48453
+ /**
48454
+ * 动作类型,固定为 snapshot。
48455
+ */
48456
+ type: 'snapshot';
48457
+ /**
48458
+ * 动作作用的标签页 ID,可在后续动作的 tab 里使用。
48459
+ */
48460
+ tab: string;
48461
+ /**
48462
+ * 动作完成后该标签页的地址。
48463
+ */
48464
+ url: string;
48465
+ /**
48466
+ * 动作完成后该标签页的标题,页面没有标题时为空字符串。
48467
+ */
48468
+ title: string;
48469
+ /**
48470
+ * 页面的 ARIA 快照文本,每行一个元素,可操作的元素带 [ref=eN]。
48471
+ */
48472
+ snapshot: string;
48473
+ /**
48474
+ * 这份快照里分配出去的 ref 个数。
48475
+ */
48476
+ refs: number;
48477
+ /**
48478
+ * 快照超过 200000 个字符被截断时为 true。
48479
+ */
48480
+ truncated: boolean;
48481
+ } | {
48482
+ /**
48483
+ * 动作类型,固定为 screenshot。
48484
+ */
48485
+ type: 'screenshot';
48486
+ /**
48487
+ * 动作作用的标签页 ID,可在后续动作的 tab 里使用。
48488
+ */
48489
+ tab: string;
48490
+ /**
48491
+ * 图片格式,固定为 image/png。
48492
+ */
48493
+ mediaType: 'image/png';
48494
+ /**
48495
+ * PNG 图片的 base64 编码;解码后最多 5 MiB。
48496
+ */
48497
+ data: string;
48498
+ /**
48499
+ * 图片 base64 解码后的字节数。
48500
+ */
48501
+ bytes: number;
48502
+ } | {
48503
+ /**
48504
+ * 动作类型,固定为 evaluate。
48505
+ */
48506
+ type: 'evaluate';
48507
+ /**
48508
+ * 动作作用的标签页 ID,可在后续动作的 tab 里使用。
48509
+ */
48510
+ tab: string;
48511
+ /**
48512
+ * 表达式的结果,按 JSON 返回;序列化后最多 64000 个字符。
48513
+ */
48514
+ value: unknown;
48515
+ };
48516
+ };
48517
+ export type BrowserRunPageActionResponse = BrowserRunPageActionResponses[keyof BrowserRunPageActionResponses];
48152
48518
  export type BrowserRequestHandoffData = {
48153
48519
  body: {
48154
48520
  /**
@@ -48187,13 +48553,17 @@ export type BrowserRequestHandoffErrors = {
48187
48553
  */
48188
48554
  403: BrowserError;
48189
48555
  /**
48190
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48556
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48191
48557
  */
48192
48558
  404: BrowserError;
48193
48559
  /**
48194
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48560
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48195
48561
  */
48196
48562
  409: BrowserError;
48563
+ /**
48564
+ * ACTION_RESULT_TOO_LARGE
48565
+ */
48566
+ 413: BrowserError;
48197
48567
  /**
48198
48568
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48199
48569
  */
@@ -48214,6 +48584,10 @@ export type BrowserRequestHandoffErrors = {
48214
48584
  * SERVICE_UNAVAILABLE
48215
48585
  */
48216
48586
  503: BrowserError;
48587
+ /**
48588
+ * ACTION_TIMEOUT
48589
+ */
48590
+ 504: BrowserError;
48217
48591
  };
48218
48592
  export type BrowserRequestHandoffError = BrowserRequestHandoffErrors[keyof BrowserRequestHandoffErrors];
48219
48593
  export type BrowserRequestHandoffResponses = {
@@ -48252,13 +48626,17 @@ export type BrowserCompleteHandoffErrors = {
48252
48626
  */
48253
48627
  403: BrowserError;
48254
48628
  /**
48255
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48629
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48256
48630
  */
48257
48631
  404: BrowserError;
48258
48632
  /**
48259
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48633
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48260
48634
  */
48261
48635
  409: BrowserError;
48636
+ /**
48637
+ * ACTION_RESULT_TOO_LARGE
48638
+ */
48639
+ 413: BrowserError;
48262
48640
  /**
48263
48641
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48264
48642
  */
@@ -48279,6 +48657,10 @@ export type BrowserCompleteHandoffErrors = {
48279
48657
  * SERVICE_UNAVAILABLE
48280
48658
  */
48281
48659
  503: BrowserError;
48660
+ /**
48661
+ * ACTION_TIMEOUT
48662
+ */
48663
+ 504: BrowserError;
48282
48664
  };
48283
48665
  export type BrowserCompleteHandoffError = BrowserCompleteHandoffErrors[keyof BrowserCompleteHandoffErrors];
48284
48666
  export type BrowserCompleteHandoffResponses = {
@@ -48322,13 +48704,17 @@ export type BrowserViewerHeartbeatErrors = {
48322
48704
  */
48323
48705
  403: BrowserError;
48324
48706
  /**
48325
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48707
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48326
48708
  */
48327
48709
  404: BrowserError;
48328
48710
  /**
48329
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48711
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48330
48712
  */
48331
48713
  409: BrowserError;
48714
+ /**
48715
+ * ACTION_RESULT_TOO_LARGE
48716
+ */
48717
+ 413: BrowserError;
48332
48718
  /**
48333
48719
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48334
48720
  */
@@ -48349,6 +48735,10 @@ export type BrowserViewerHeartbeatErrors = {
48349
48735
  * SERVICE_UNAVAILABLE
48350
48736
  */
48351
48737
  503: BrowserError;
48738
+ /**
48739
+ * ACTION_TIMEOUT
48740
+ */
48741
+ 504: BrowserError;
48352
48742
  };
48353
48743
  export type BrowserViewerHeartbeatError = BrowserViewerHeartbeatErrors[keyof BrowserViewerHeartbeatErrors];
48354
48744
  export type BrowserViewerHeartbeatResponses = {
@@ -48400,13 +48790,17 @@ export type BrowserListContextsErrors = {
48400
48790
  */
48401
48791
  403: BrowserError;
48402
48792
  /**
48403
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48793
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48404
48794
  */
48405
48795
  404: BrowserError;
48406
48796
  /**
48407
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48797
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48408
48798
  */
48409
48799
  409: BrowserError;
48800
+ /**
48801
+ * ACTION_RESULT_TOO_LARGE
48802
+ */
48803
+ 413: BrowserError;
48410
48804
  /**
48411
48805
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48412
48806
  */
@@ -48427,6 +48821,10 @@ export type BrowserListContextsErrors = {
48427
48821
  * SERVICE_UNAVAILABLE
48428
48822
  */
48429
48823
  503: BrowserError;
48824
+ /**
48825
+ * ACTION_TIMEOUT
48826
+ */
48827
+ 504: BrowserError;
48430
48828
  };
48431
48829
  export type BrowserListContextsError = BrowserListContextsErrors[keyof BrowserListContextsErrors];
48432
48830
  export type BrowserListContextsResponses = {
@@ -48484,13 +48882,17 @@ export type BrowserCreateContextErrors = {
48484
48882
  */
48485
48883
  403: BrowserError;
48486
48884
  /**
48487
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48885
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48488
48886
  */
48489
48887
  404: BrowserError;
48490
48888
  /**
48491
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48889
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48492
48890
  */
48493
48891
  409: BrowserError;
48892
+ /**
48893
+ * ACTION_RESULT_TOO_LARGE
48894
+ */
48895
+ 413: BrowserError;
48494
48896
  /**
48495
48897
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48496
48898
  */
@@ -48511,6 +48913,10 @@ export type BrowserCreateContextErrors = {
48511
48913
  * SERVICE_UNAVAILABLE
48512
48914
  */
48513
48915
  503: BrowserError;
48916
+ /**
48917
+ * ACTION_TIMEOUT
48918
+ */
48919
+ 504: BrowserError;
48514
48920
  };
48515
48921
  export type BrowserCreateContextError = BrowserCreateContextErrors[keyof BrowserCreateContextErrors];
48516
48922
  export type BrowserCreateContextResponses = {
@@ -48549,13 +48955,17 @@ export type BrowserDeleteContextErrors = {
48549
48955
  */
48550
48956
  403: BrowserError;
48551
48957
  /**
48552
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
48958
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48553
48959
  */
48554
48960
  404: BrowserError;
48555
48961
  /**
48556
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
48962
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48557
48963
  */
48558
48964
  409: BrowserError;
48965
+ /**
48966
+ * ACTION_RESULT_TOO_LARGE
48967
+ */
48968
+ 413: BrowserError;
48559
48969
  /**
48560
48970
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48561
48971
  */
@@ -48576,6 +48986,10 @@ export type BrowserDeleteContextErrors = {
48576
48986
  * SERVICE_UNAVAILABLE
48577
48987
  */
48578
48988
  503: BrowserError;
48989
+ /**
48990
+ * ACTION_TIMEOUT
48991
+ */
48992
+ 504: BrowserError;
48579
48993
  };
48580
48994
  export type BrowserDeleteContextError = BrowserDeleteContextErrors[keyof BrowserDeleteContextErrors];
48581
48995
  export type BrowserDeleteContextResponses = {
@@ -48619,13 +49033,17 @@ export type BrowserGetContextErrors = {
48619
49033
  */
48620
49034
  403: BrowserError;
48621
49035
  /**
48622
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
49036
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48623
49037
  */
48624
49038
  404: BrowserError;
48625
49039
  /**
48626
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
49040
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48627
49041
  */
48628
49042
  409: BrowserError;
49043
+ /**
49044
+ * ACTION_RESULT_TOO_LARGE
49045
+ */
49046
+ 413: BrowserError;
48629
49047
  /**
48630
49048
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48631
49049
  */
@@ -48646,6 +49064,10 @@ export type BrowserGetContextErrors = {
48646
49064
  * SERVICE_UNAVAILABLE
48647
49065
  */
48648
49066
  503: BrowserError;
49067
+ /**
49068
+ * ACTION_TIMEOUT
49069
+ */
49070
+ 504: BrowserError;
48649
49071
  };
48650
49072
  export type BrowserGetContextError = BrowserGetContextErrors[keyof BrowserGetContextErrors];
48651
49073
  export type BrowserGetContextResponses = {
@@ -48695,13 +49117,17 @@ export type BrowserUpdateContextErrors = {
48695
49117
  */
48696
49118
  403: BrowserError;
48697
49119
  /**
48698
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
49120
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48699
49121
  */
48700
49122
  404: BrowserError;
48701
49123
  /**
48702
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
49124
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48703
49125
  */
48704
49126
  409: BrowserError;
49127
+ /**
49128
+ * ACTION_RESULT_TOO_LARGE
49129
+ */
49130
+ 413: BrowserError;
48705
49131
  /**
48706
49132
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48707
49133
  */
@@ -48722,6 +49148,10 @@ export type BrowserUpdateContextErrors = {
48722
49148
  * SERVICE_UNAVAILABLE
48723
49149
  */
48724
49150
  503: BrowserError;
49151
+ /**
49152
+ * ACTION_TIMEOUT
49153
+ */
49154
+ 504: BrowserError;
48725
49155
  };
48726
49156
  export type BrowserUpdateContextError = BrowserUpdateContextErrors[keyof BrowserUpdateContextErrors];
48727
49157
  export type BrowserUpdateContextResponses = {
@@ -48792,13 +49222,17 @@ export type BrowserConnectErrors = {
48792
49222
  */
48793
49223
  403: BrowserError;
48794
49224
  /**
48795
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
49225
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48796
49226
  */
48797
49227
  404: BrowserError;
48798
49228
  /**
48799
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
49229
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48800
49230
  */
48801
49231
  409: BrowserError;
49232
+ /**
49233
+ * ACTION_RESULT_TOO_LARGE
49234
+ */
49235
+ 413: BrowserError;
48802
49236
  /**
48803
49237
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48804
49238
  */
@@ -48819,6 +49253,10 @@ export type BrowserConnectErrors = {
48819
49253
  * SERVICE_UNAVAILABLE
48820
49254
  */
48821
49255
  503: BrowserError;
49256
+ /**
49257
+ * ACTION_TIMEOUT
49258
+ */
49259
+ 504: BrowserError;
48822
49260
  };
48823
49261
  export type BrowserConnectError = BrowserConnectErrors[keyof BrowserConnectErrors];
48824
49262
  export type BrowserLiveViewData = {
@@ -48859,13 +49297,17 @@ export type BrowserLiveViewErrors = {
48859
49297
  */
48860
49298
  403: BrowserError;
48861
49299
  /**
48862
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
49300
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48863
49301
  */
48864
49302
  404: BrowserError;
48865
49303
  /**
48866
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
49304
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48867
49305
  */
48868
49306
  409: BrowserError;
49307
+ /**
49308
+ * ACTION_RESULT_TOO_LARGE
49309
+ */
49310
+ 413: BrowserError;
48869
49311
  /**
48870
49312
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48871
49313
  */
@@ -48886,6 +49328,10 @@ export type BrowserLiveViewErrors = {
48886
49328
  * SERVICE_UNAVAILABLE
48887
49329
  */
48888
49330
  503: BrowserError;
49331
+ /**
49332
+ * ACTION_TIMEOUT
49333
+ */
49334
+ 504: BrowserError;
48889
49335
  };
48890
49336
  export type BrowserLiveViewError = BrowserLiveViewErrors[keyof BrowserLiveViewErrors];
48891
49337
  export type BrowserStreamSessionData = {
@@ -48917,13 +49363,17 @@ export type BrowserStreamSessionErrors = {
48917
49363
  */
48918
49364
  403: BrowserError;
48919
49365
  /**
48920
- * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND
49366
+ * SESSION_NOT_FOUND / CONTEXT_NOT_FOUND / PARENT_NOT_FOUND / ACTION_TAB_NOT_FOUND
48921
49367
  */
48922
49368
  404: BrowserError;
48923
49369
  /**
48924
- * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING
49370
+ * SESSION_ENDED / SESSION_INVALID_STATE / CONTEXT_LOCKED / HANDOFF_NOT_PENDING / ACTION_NO_TAB / ACTION_REF_STALE / ACTION_FAILED
48925
49371
  */
48926
49372
  409: BrowserError;
49373
+ /**
49374
+ * ACTION_RESULT_TOO_LARGE
49375
+ */
49376
+ 413: BrowserError;
48927
49377
  /**
48928
49378
  * CONCURRENCY_LIMIT / RATE_LIMITED / PROVIDER_CAPACITY
48929
49379
  */
@@ -48944,6 +49394,10 @@ export type BrowserStreamSessionErrors = {
48944
49394
  * SERVICE_UNAVAILABLE
48945
49395
  */
48946
49396
  503: BrowserError;
49397
+ /**
49398
+ * ACTION_TIMEOUT
49399
+ */
49400
+ 504: BrowserError;
48947
49401
  };
48948
49402
  export type BrowserStreamSessionError = BrowserStreamSessionErrors[keyof BrowserStreamSessionErrors];
48949
49403
  export type BrowserStreamSessionResponses = {