browserscale-ts 1.4.0 → 1.7.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.
@@ -2129,6 +2129,276 @@ export type ModifyRequestResponse = Message<"browserscale.v1.ModifyRequestRespon
2129
2129
  * Use `create(ModifyRequestResponseSchema)` to create a new message.
2130
2130
  */
2131
2131
  export declare const ModifyRequestResponseSchema: GenMessage<ModifyRequestResponse>;
2132
+ /**
2133
+ * @generated from message browserscale.v1.StartNetworkCaptureRequest
2134
+ */
2135
+ export type StartNetworkCaptureRequest = Message<"browserscale.v1.StartNetworkCaptureRequest"> & {
2136
+ /**
2137
+ * @generated from field: string session_id = 1;
2138
+ */
2139
+ sessionId: string;
2140
+ /**
2141
+ * @generated from field: string api_key = 2;
2142
+ */
2143
+ apiKey: string;
2144
+ /**
2145
+ * URL wildcards to capture; empty captures everything in the session.
2146
+ * Prefix an entry with "!" to exclude it.
2147
+ *
2148
+ * @generated from field: repeated string patterns = 3;
2149
+ */
2150
+ patterns: string[];
2151
+ /**
2152
+ * Response body capture: "none" (default), "text" or "all".
2153
+ *
2154
+ * @generated from field: string bodies = 4;
2155
+ */
2156
+ bodies: string;
2157
+ /**
2158
+ * Narrows body capture further; empty applies `bodies` to every captured
2159
+ * exchange.
2160
+ *
2161
+ * @generated from field: repeated string body_patterns = 5;
2162
+ */
2163
+ bodyPatterns: string[];
2164
+ };
2165
+ /**
2166
+ * Describes the message browserscale.v1.StartNetworkCaptureRequest.
2167
+ * Use `create(StartNetworkCaptureRequestSchema)` to create a new message.
2168
+ */
2169
+ export declare const StartNetworkCaptureRequestSchema: GenMessage<StartNetworkCaptureRequest>;
2170
+ /**
2171
+ * @generated from message browserscale.v1.StopNetworkCaptureRequest
2172
+ */
2173
+ export type StopNetworkCaptureRequest = Message<"browserscale.v1.StopNetworkCaptureRequest"> & {
2174
+ /**
2175
+ * @generated from field: string session_id = 1;
2176
+ */
2177
+ sessionId: string;
2178
+ /**
2179
+ * @generated from field: string api_key = 2;
2180
+ */
2181
+ apiKey: string;
2182
+ };
2183
+ /**
2184
+ * Describes the message browserscale.v1.StopNetworkCaptureRequest.
2185
+ * Use `create(StopNetworkCaptureRequestSchema)` to create a new message.
2186
+ */
2187
+ export declare const StopNetworkCaptureRequestSchema: GenMessage<StopNetworkCaptureRequest>;
2188
+ /**
2189
+ * @generated from message browserscale.v1.StopNetworkCaptureResponse
2190
+ */
2191
+ export type StopNetworkCaptureResponse = Message<"browserscale.v1.StopNetworkCaptureResponse"> & {
2192
+ /**
2193
+ * False if no capture was running for this session.
2194
+ *
2195
+ * @generated from field: bool stopped = 1;
2196
+ */
2197
+ stopped: boolean;
2198
+ };
2199
+ /**
2200
+ * Describes the message browserscale.v1.StopNetworkCaptureResponse.
2201
+ * Use `create(StopNetworkCaptureResponseSchema)` to create a new message.
2202
+ */
2203
+ export declare const StopNetworkCaptureResponseSchema: GenMessage<StopNetworkCaptureResponse>;
2204
+ /**
2205
+ * @generated from message browserscale.v1.StreamNetworkExchangesRequest
2206
+ */
2207
+ export type StreamNetworkExchangesRequest = Message<"browserscale.v1.StreamNetworkExchangesRequest"> & {
2208
+ /**
2209
+ * @generated from field: string session_id = 1;
2210
+ */
2211
+ sessionId: string;
2212
+ /**
2213
+ * @generated from field: string api_key = 2;
2214
+ */
2215
+ apiKey: string;
2216
+ };
2217
+ /**
2218
+ * Describes the message browserscale.v1.StreamNetworkExchangesRequest.
2219
+ * Use `create(StreamNetworkExchangesRequestSchema)` to create a new message.
2220
+ */
2221
+ export declare const StreamNetworkExchangesRequestSchema: GenMessage<StreamNetworkExchangesRequest>;
2222
+ /**
2223
+ * @generated from message browserscale.v1.NetworkExchangeEvent
2224
+ */
2225
+ export type NetworkExchangeEvent = Message<"browserscale.v1.NetworkExchangeEvent"> & {
2226
+ /**
2227
+ * @generated from field: browserscale.v1.NetworkExchange exchange = 1;
2228
+ */
2229
+ exchange?: NetworkExchange;
2230
+ /**
2231
+ * Cumulative exchanges dropped for this subscriber because it read slower
2232
+ * than the page produced them. Non-zero means the log has holes.
2233
+ *
2234
+ * @generated from field: uint64 dropped = 2;
2235
+ */
2236
+ dropped: bigint;
2237
+ };
2238
+ /**
2239
+ * Describes the message browserscale.v1.NetworkExchangeEvent.
2240
+ * Use `create(NetworkExchangeEventSchema)` to create a new message.
2241
+ */
2242
+ export declare const NetworkExchangeEventSchema: GenMessage<NetworkExchangeEvent>;
2243
+ /**
2244
+ * One request together with the response it received.
2245
+ *
2246
+ * A redirect is not a special case: every hop is reported as its own exchange,
2247
+ * sharing chain_id with its siblings and counting up redirect_index.
2248
+ *
2249
+ * @generated from message browserscale.v1.NetworkExchange
2250
+ */
2251
+ export type NetworkExchange = Message<"browserscale.v1.NetworkExchange"> & {
2252
+ /**
2253
+ * Unique per hop.
2254
+ *
2255
+ * @generated from field: string request_id = 1;
2256
+ */
2257
+ requestId: string;
2258
+ /**
2259
+ * Shared by every hop of one redirect chain.
2260
+ *
2261
+ * @generated from field: string chain_id = 2;
2262
+ */
2263
+ chainId: string;
2264
+ /**
2265
+ * 0 for the original request, incremented once per redirect followed.
2266
+ *
2267
+ * @generated from field: int32 redirect_index = 3;
2268
+ */
2269
+ redirectIndex: number;
2270
+ /**
2271
+ * DevTools frame token of the originating frame; empty for workers.
2272
+ *
2273
+ * @generated from field: string frame_id = 4;
2274
+ */
2275
+ frameId: string;
2276
+ /**
2277
+ * Whether that frame runs in its own process.
2278
+ *
2279
+ * @generated from field: bool is_oopif = 5;
2280
+ */
2281
+ isOopif: boolean;
2282
+ /**
2283
+ * "document" | "subframe" | "script" | "stylesheet" | "image" | "font" |
2284
+ * "media" | "fetch" | "worker" | "manifest" | "object" | "csp-report" |
2285
+ * "other". fetch(), XMLHttpRequest and EventSource all report "fetch" —
2286
+ * they are indistinguishable in the browser process.
2287
+ *
2288
+ * @generated from field: string resource_type = 6;
2289
+ */
2290
+ resourceType: string;
2291
+ /**
2292
+ * @generated from field: string method = 7;
2293
+ */
2294
+ method: string;
2295
+ /**
2296
+ * @generated from field: string url = 8;
2297
+ */
2298
+ url: string;
2299
+ /**
2300
+ * Origin that initiated the request; empty if browser-initiated.
2301
+ *
2302
+ * @generated from field: string initiator_url = 9;
2303
+ */
2304
+ initiatorUrl: string;
2305
+ /**
2306
+ * @generated from field: repeated browserscale.v1.Header request_headers = 10;
2307
+ */
2308
+ requestHeaders: Header[];
2309
+ /**
2310
+ * True when request_headers are the bytes actually put on the wire —
2311
+ * Cookie, User-Agent, Sec-* and encoding included. False means they are what
2312
+ * the renderer asked for, before the network service filled in the rest.
2313
+ *
2314
+ * @generated from field: bool request_headers_are_wire = 11;
2315
+ */
2316
+ requestHeadersAreWire: boolean;
2317
+ /**
2318
+ * Inline request body, capped by the browser. File and streamed uploads are
2319
+ * not included; request_body_truncated is set when anything was left out.
2320
+ *
2321
+ * @generated from field: bytes request_body = 12;
2322
+ */
2323
+ requestBody: Uint8Array;
2324
+ /**
2325
+ * @generated from field: bool request_body_truncated = 13;
2326
+ */
2327
+ requestBodyTruncated: boolean;
2328
+ /**
2329
+ * False when the request failed before any response arrived.
2330
+ *
2331
+ * @generated from field: bool has_response = 14;
2332
+ */
2333
+ hasResponse: boolean;
2334
+ /**
2335
+ * @generated from field: int32 status_code = 15;
2336
+ */
2337
+ statusCode: number;
2338
+ /**
2339
+ * @generated from field: string status_text = 16;
2340
+ */
2341
+ statusText: string;
2342
+ /**
2343
+ * @generated from field: string mime_type = 17;
2344
+ */
2345
+ mimeType: string;
2346
+ /**
2347
+ * Negotiated ALPN protocol, e.g. "h2" or "http/1.1".
2348
+ *
2349
+ * @generated from field: string protocol = 18;
2350
+ */
2351
+ protocol: string;
2352
+ /**
2353
+ * @generated from field: string remote_address = 19;
2354
+ */
2355
+ remoteAddress: string;
2356
+ /**
2357
+ * "network" | "cache" | "serviceWorker" | "wrcStaticCache" | "wrcSynthetic"
2358
+ *
2359
+ * @generated from field: string served_from = 20;
2360
+ */
2361
+ servedFrom: string;
2362
+ /**
2363
+ * @generated from field: repeated browserscale.v1.Header response_headers = 21;
2364
+ */
2365
+ responseHeaders: Header[];
2366
+ /**
2367
+ * @generated from field: bool response_headers_are_wire = 22;
2368
+ */
2369
+ responseHeadersAreWire: boolean;
2370
+ /**
2371
+ * Populated only when body capture was requested and applied. Bodies cross
2372
+ * the browser boundary as text, so binary content (bodies="all" on an image)
2373
+ * does not arrive intact.
2374
+ *
2375
+ * @generated from field: bytes response_body = 23;
2376
+ */
2377
+ responseBody: Uint8Array;
2378
+ /**
2379
+ * @generated from field: bool response_body_truncated = 24;
2380
+ */
2381
+ responseBodyTruncated: boolean;
2382
+ /**
2383
+ * @generated from field: bool response_body_captured = 25;
2384
+ */
2385
+ responseBodyCaptured: boolean;
2386
+ /**
2387
+ * @generated from field: int64 encoded_data_length = 26;
2388
+ */
2389
+ encodedDataLength: bigint;
2390
+ /**
2391
+ * Net error name (e.g. "net::ERR_ABORTED"); empty on success.
2392
+ *
2393
+ * @generated from field: string error = 27;
2394
+ */
2395
+ error: string;
2396
+ };
2397
+ /**
2398
+ * Describes the message browserscale.v1.NetworkExchange.
2399
+ * Use `create(NetworkExchangeSchema)` to create a new message.
2400
+ */
2401
+ export declare const NetworkExchangeSchema: GenMessage<NetworkExchange>;
2132
2402
  /**
2133
2403
  * @generated from message browserscale.v1.GetCookiesRequest
2134
2404
  */
@@ -2341,6 +2611,146 @@ export type ClearStorageRequest = Message<"browserscale.v1.ClearStorageRequest">
2341
2611
  * Use `create(ClearStorageRequestSchema)` to create a new message.
2342
2612
  */
2343
2613
  export declare const ClearStorageRequestSchema: GenMessage<ClearStorageRequest>;
2614
+ /**
2615
+ * One Device Bound Session Credentials entry (WRC.DbscSession).
2616
+ *
2617
+ * @generated from message browserscale.v1.DbscSession
2618
+ */
2619
+ export type DbscSession = Message<"browserscale.v1.DbscSession"> & {
2620
+ /**
2621
+ * Serialized net::SchemefulSite (eTLD+1 site key), e.g. "https://google.com".
2622
+ *
2623
+ * @generated from field: string site = 1;
2624
+ */
2625
+ site: string;
2626
+ /**
2627
+ * Base64 of the serialized net.device_bound_sessions.proto.Session
2628
+ * (includes the wrapped binding key; portable under WRC's software
2629
+ * UnexportableKeyProvider).
2630
+ *
2631
+ * @generated from field: string session = 2;
2632
+ */
2633
+ session: string;
2634
+ };
2635
+ /**
2636
+ * Describes the message browserscale.v1.DbscSession.
2637
+ * Use `create(DbscSessionSchema)` to create a new message.
2638
+ */
2639
+ export declare const DbscSessionSchema: GenMessage<DbscSession>;
2640
+ /**
2641
+ * Portable snapshot of a context's signed-in Google account and/or DBSC
2642
+ * sessions (WRC.AuthSession). All fields optional so partial state round-trips.
2643
+ *
2644
+ * @generated from message browserscale.v1.AuthSession
2645
+ */
2646
+ export type AuthSession = Message<"browserscale.v1.AuthSession"> & {
2647
+ /**
2648
+ * Gaia obfuscated account id.
2649
+ *
2650
+ * @generated from field: optional string gaia_id = 1;
2651
+ */
2652
+ gaiaId?: string;
2653
+ /**
2654
+ * Account email.
2655
+ *
2656
+ * @generated from field: optional string email = 2;
2657
+ */
2658
+ email?: string;
2659
+ /**
2660
+ * OAuth refresh token (persistent).
2661
+ *
2662
+ * @generated from field: optional string refresh_token = 3;
2663
+ */
2664
+ refreshToken?: string;
2665
+ /**
2666
+ * Base64 of the wrapped device-binding key for the refresh token.
2667
+ * Empty/absent = unbound token.
2668
+ *
2669
+ * @generated from field: optional string wrapped_binding_key = 4;
2670
+ */
2671
+ wrappedBindingKey?: string;
2672
+ /**
2673
+ * Signin-scoped device id; must travel with the token.
2674
+ *
2675
+ * @generated from field: optional string signin_scoped_device_id = 5;
2676
+ */
2677
+ signinScopedDeviceId?: string;
2678
+ /**
2679
+ * True if the account should be restored at Sync consent.
2680
+ *
2681
+ * @generated from field: optional bool sync_consent = 6;
2682
+ */
2683
+ syncConsent?: boolean;
2684
+ /**
2685
+ * Device Bound Session Credentials for this context (all bound sites).
2686
+ *
2687
+ * @generated from field: repeated browserscale.v1.DbscSession dbsc_sessions = 7;
2688
+ */
2689
+ dbscSessions: DbscSession[];
2690
+ };
2691
+ /**
2692
+ * Describes the message browserscale.v1.AuthSession.
2693
+ * Use `create(AuthSessionSchema)` to create a new message.
2694
+ */
2695
+ export declare const AuthSessionSchema: GenMessage<AuthSession>;
2696
+ /**
2697
+ * @generated from message browserscale.v1.GetAuthSessionRequest
2698
+ */
2699
+ export type GetAuthSessionRequest = Message<"browserscale.v1.GetAuthSessionRequest"> & {
2700
+ /**
2701
+ * @generated from field: string session_id = 1;
2702
+ */
2703
+ sessionId: string;
2704
+ /**
2705
+ * @generated from field: string api_key = 2;
2706
+ */
2707
+ apiKey: string;
2708
+ };
2709
+ /**
2710
+ * Describes the message browserscale.v1.GetAuthSessionRequest.
2711
+ * Use `create(GetAuthSessionRequestSchema)` to create a new message.
2712
+ */
2713
+ export declare const GetAuthSessionRequestSchema: GenMessage<GetAuthSessionRequest>;
2714
+ /**
2715
+ * @generated from message browserscale.v1.GetAuthSessionResponse
2716
+ */
2717
+ export type GetAuthSessionResponse = Message<"browserscale.v1.GetAuthSessionResponse"> & {
2718
+ /**
2719
+ * Present only if the context has exportable auth/DBSC state.
2720
+ *
2721
+ * @generated from field: optional browserscale.v1.AuthSession session = 1;
2722
+ */
2723
+ session?: AuthSession;
2724
+ };
2725
+ /**
2726
+ * Describes the message browserscale.v1.GetAuthSessionResponse.
2727
+ * Use `create(GetAuthSessionResponseSchema)` to create a new message.
2728
+ */
2729
+ export declare const GetAuthSessionResponseSchema: GenMessage<GetAuthSessionResponse>;
2730
+ /**
2731
+ * @generated from message browserscale.v1.SetAuthSessionRequest
2732
+ */
2733
+ export type SetAuthSessionRequest = Message<"browserscale.v1.SetAuthSessionRequest"> & {
2734
+ /**
2735
+ * @generated from field: string session_id = 1;
2736
+ */
2737
+ sessionId: string;
2738
+ /**
2739
+ * @generated from field: string api_key = 2;
2740
+ */
2741
+ apiKey: string;
2742
+ /**
2743
+ * Session to import (as returned by GetAuthSession).
2744
+ *
2745
+ * @generated from field: browserscale.v1.AuthSession session = 3;
2746
+ */
2747
+ session?: AuthSession;
2748
+ };
2749
+ /**
2750
+ * Describes the message browserscale.v1.SetAuthSessionRequest.
2751
+ * Use `create(SetAuthSessionRequestSchema)` to create a new message.
2752
+ */
2753
+ export declare const SetAuthSessionRequestSchema: GenMessage<SetAuthSessionRequest>;
2344
2754
  /**
2345
2755
  * @generated from message browserscale.v1.GetDOMRequest
2346
2756
  */
@@ -2540,9 +2950,9 @@ export type GetDOMHashResponse = Message<"browserscale.v1.GetDOMHashResponse"> &
2540
2950
  */
2541
2951
  export declare const GetDOMHashResponseSchema: GenMessage<GetDOMHashResponse>;
2542
2952
  /**
2543
- * @generated from message browserscale.v1.InspectAtPositionRequest
2953
+ * @generated from message browserscale.v1.StartDomMirrorRequest
2544
2954
  */
2545
- export type InspectAtPositionRequest = Message<"browserscale.v1.InspectAtPositionRequest"> & {
2955
+ export type StartDomMirrorRequest = Message<"browserscale.v1.StartDomMirrorRequest"> & {
2546
2956
  /**
2547
2957
  * @generated from field: string session_id = 1;
2548
2958
  */
@@ -2552,49 +2962,428 @@ export type InspectAtPositionRequest = Message<"browserscale.v1.InspectAtPositio
2552
2962
  */
2553
2963
  apiKey: string;
2554
2964
  /**
2555
- * @generated from field: string page_id = 3;
2556
- */
2557
- pageId: string;
2558
- /**
2559
- * Viewport-relative CSS pixels.
2965
+ * Levels to serialize up front. Default 2 (#document -> <html> ->
2966
+ * <head>/<body>) — enough to draw a collapsed tree. -1 walks everything and
2967
+ * defeats the point of the mirror.
2560
2968
  *
2561
- * @generated from field: double x = 4;
2969
+ * @generated from field: optional int32 depth = 4;
2562
2970
  */
2563
- x: number;
2971
+ depth?: number;
2564
2972
  /**
2565
- * @generated from field: double y = 5;
2973
+ * Descend into author shadow roots. Fixed for the life of the mirror.
2974
+ *
2975
+ * @generated from field: optional bool pierce = 5;
2566
2976
  */
2567
- y: number;
2977
+ pierce?: boolean;
2568
2978
  };
2569
2979
  /**
2570
- * Describes the message browserscale.v1.InspectAtPositionRequest.
2571
- * Use `create(InspectAtPositionRequestSchema)` to create a new message.
2980
+ * Describes the message browserscale.v1.StartDomMirrorRequest.
2981
+ * Use `create(StartDomMirrorRequestSchema)` to create a new message.
2572
2982
  */
2573
- export declare const InspectAtPositionRequestSchema: GenMessage<InspectAtPositionRequest>;
2983
+ export declare const StartDomMirrorRequestSchema: GenMessage<StartDomMirrorRequest>;
2574
2984
  /**
2575
- * @generated from message browserscale.v1.InspectAtPositionResponse
2985
+ * @generated from message browserscale.v1.StartDomMirrorResponse
2576
2986
  */
2577
- export type InspectAtPositionResponse = Message<"browserscale.v1.InspectAtPositionResponse"> & {
2987
+ export type StartDomMirrorResponse = Message<"browserscale.v1.StartDomMirrorResponse"> & {
2578
2988
  /**
2579
- * 0 if nothing was found at (x, y).
2989
+ * The MAIN frame's document, CDP DOM.Node-shaped JSON, the same format
2990
+ * GetDOM returns.
2580
2991
  *
2581
- * @generated from field: int32 backend_node_id = 1;
2992
+ * An <iframe> in it reports child_node_count 1 without carrying that child:
2993
+ * the document it hosts is fetched with GetDomChildren like any other child
2994
+ * list, and asking is also what starts mirroring that frame.
2995
+ *
2996
+ * @generated from field: string root = 1;
2582
2997
  */
2583
- backendNodeId: number;
2998
+ root: string;
2584
2999
  /**
3000
+ * The page's main frame.
3001
+ *
2585
3002
  * @generated from field: string frame_id = 2;
2586
3003
  */
2587
3004
  frameId: string;
2588
3005
  /**
2589
- * @generated from field: string tag_name = 3;
2590
- */
2591
- tagName: string;
2592
- /**
2593
- * Trimmed text content (max ~200 chars, server-imposed).
3006
+ * The page sequence this snapshot is the baseline for. Every DomUpdate after
3007
+ * it carries a higher one.
2594
3008
  *
2595
- * @generated from field: string text_content = 4;
3009
+ * @generated from field: uint64 seq = 3;
2596
3010
  */
2597
- textContent: string;
3011
+ seq: bigint;
3012
+ };
3013
+ /**
3014
+ * Describes the message browserscale.v1.StartDomMirrorResponse.
3015
+ * Use `create(StartDomMirrorResponseSchema)` to create a new message.
3016
+ */
3017
+ export declare const StartDomMirrorResponseSchema: GenMessage<StartDomMirrorResponse>;
3018
+ /**
3019
+ * @generated from message browserscale.v1.StopDomMirrorRequest
3020
+ */
3021
+ export type StopDomMirrorRequest = Message<"browserscale.v1.StopDomMirrorRequest"> & {
3022
+ /**
3023
+ * @generated from field: string session_id = 1;
3024
+ */
3025
+ sessionId: string;
3026
+ /**
3027
+ * @generated from field: string api_key = 2;
3028
+ */
3029
+ apiKey: string;
3030
+ };
3031
+ /**
3032
+ * Describes the message browserscale.v1.StopDomMirrorRequest.
3033
+ * Use `create(StopDomMirrorRequestSchema)` to create a new message.
3034
+ */
3035
+ export declare const StopDomMirrorRequestSchema: GenMessage<StopDomMirrorRequest>;
3036
+ /**
3037
+ * @generated from message browserscale.v1.GetDomChildrenRequest
3038
+ */
3039
+ export type GetDomChildrenRequest = Message<"browserscale.v1.GetDomChildrenRequest"> & {
3040
+ /**
3041
+ * @generated from field: string session_id = 1;
3042
+ */
3043
+ sessionId: string;
3044
+ /**
3045
+ * @generated from field: string api_key = 2;
3046
+ */
3047
+ apiKey: string;
3048
+ /**
3049
+ * @generated from field: int32 backend_node_id = 3;
3050
+ */
3051
+ backendNodeId: number;
3052
+ /**
3053
+ * @generated from field: optional string frame_id = 4;
3054
+ */
3055
+ frameId?: string;
3056
+ /**
3057
+ * Levels below the node. Default 1.
3058
+ *
3059
+ * @generated from field: optional int32 depth = 5;
3060
+ */
3061
+ depth?: number;
3062
+ };
3063
+ /**
3064
+ * Describes the message browserscale.v1.GetDomChildrenRequest.
3065
+ * Use `create(GetDomChildrenRequestSchema)` to create a new message.
3066
+ */
3067
+ export declare const GetDomChildrenRequestSchema: GenMessage<GetDomChildrenRequest>;
3068
+ /**
3069
+ * @generated from message browserscale.v1.GetDomChildrenResponse
3070
+ */
3071
+ export type GetDomChildrenResponse = Message<"browserscale.v1.GetDomChildrenResponse"> & {
3072
+ /**
3073
+ * JSON array of DOM.Node. Empty for an id this mirror never handed out,
3074
+ * which is also what a stale id from before a resync looks like.
3075
+ *
3076
+ * On an <iframe>/<frame>/<object> the one child is the document it hosts,
3077
+ * and this call is what starts mirroring that frame.
3078
+ *
3079
+ * @generated from field: string children = 1;
3080
+ */
3081
+ children: string;
3082
+ /**
3083
+ * Page sequence this payload is valid as of.
3084
+ *
3085
+ * @generated from field: uint64 seq = 2;
3086
+ */
3087
+ seq: bigint;
3088
+ };
3089
+ /**
3090
+ * Describes the message browserscale.v1.GetDomChildrenResponse.
3091
+ * Use `create(GetDomChildrenResponseSchema)` to create a new message.
3092
+ */
3093
+ export declare const GetDomChildrenResponseSchema: GenMessage<GetDomChildrenResponse>;
3094
+ /**
3095
+ * @generated from message browserscale.v1.ReleaseDomSubtreeRequest
3096
+ */
3097
+ export type ReleaseDomSubtreeRequest = Message<"browserscale.v1.ReleaseDomSubtreeRequest"> & {
3098
+ /**
3099
+ * @generated from field: string session_id = 1;
3100
+ */
3101
+ sessionId: string;
3102
+ /**
3103
+ * @generated from field: string api_key = 2;
3104
+ */
3105
+ apiKey: string;
3106
+ /**
3107
+ * @generated from field: int32 backend_node_id = 3;
3108
+ */
3109
+ backendNodeId: number;
3110
+ /**
3111
+ * @generated from field: optional string frame_id = 4;
3112
+ */
3113
+ frameId?: string;
3114
+ };
3115
+ /**
3116
+ * Describes the message browserscale.v1.ReleaseDomSubtreeRequest.
3117
+ * Use `create(ReleaseDomSubtreeRequestSchema)` to create a new message.
3118
+ */
3119
+ export declare const ReleaseDomSubtreeRequestSchema: GenMessage<ReleaseDomSubtreeRequest>;
3120
+ /**
3121
+ * @generated from message browserscale.v1.RevealDomNodeRequest
3122
+ */
3123
+ export type RevealDomNodeRequest = Message<"browserscale.v1.RevealDomNodeRequest"> & {
3124
+ /**
3125
+ * @generated from field: string session_id = 1;
3126
+ */
3127
+ sessionId: string;
3128
+ /**
3129
+ * @generated from field: string api_key = 2;
3130
+ */
3131
+ apiKey: string;
3132
+ /**
3133
+ * @generated from field: int32 backend_node_id = 3;
3134
+ */
3135
+ backendNodeId: number;
3136
+ /**
3137
+ * @generated from field: optional string frame_id = 4;
3138
+ */
3139
+ frameId?: string;
3140
+ };
3141
+ /**
3142
+ * Describes the message browserscale.v1.RevealDomNodeRequest.
3143
+ * Use `create(RevealDomNodeRequestSchema)` to create a new message.
3144
+ */
3145
+ export declare const RevealDomNodeRequestSchema: GenMessage<RevealDomNodeRequest>;
3146
+ /**
3147
+ * @generated from message browserscale.v1.RevealDomNodeResponse
3148
+ */
3149
+ export type RevealDomNodeResponse = Message<"browserscale.v1.RevealDomNodeResponse"> & {
3150
+ /**
3151
+ * JSON array of DOM.Node, the MAIN document first, each carrying one level
3152
+ * of children, crossing into frames at the document nodes along it. A
3153
+ * document's frame_id is the id space its own backend_node_id and everything
3154
+ * after it counts in. Empty if the node is not on the page.
3155
+ *
3156
+ * @generated from field: string path = 1;
3157
+ */
3158
+ path: string;
3159
+ /**
3160
+ * Page sequence this payload is valid as of.
3161
+ *
3162
+ * @generated from field: uint64 seq = 2;
3163
+ */
3164
+ seq: bigint;
3165
+ };
3166
+ /**
3167
+ * Describes the message browserscale.v1.RevealDomNodeResponse.
3168
+ * Use `create(RevealDomNodeResponseSchema)` to create a new message.
3169
+ */
3170
+ export declare const RevealDomNodeResponseSchema: GenMessage<RevealDomNodeResponse>;
3171
+ /**
3172
+ * @generated from message browserscale.v1.GetDomRevisionRequest
3173
+ */
3174
+ export type GetDomRevisionRequest = Message<"browserscale.v1.GetDomRevisionRequest"> & {
3175
+ /**
3176
+ * @generated from field: string session_id = 1;
3177
+ */
3178
+ sessionId: string;
3179
+ /**
3180
+ * @generated from field: string api_key = 2;
3181
+ */
3182
+ apiKey: string;
3183
+ /**
3184
+ * @generated from field: optional string frame_id = 3;
3185
+ */
3186
+ frameId?: string;
3187
+ };
3188
+ /**
3189
+ * Describes the message browserscale.v1.GetDomRevisionRequest.
3190
+ * Use `create(GetDomRevisionRequestSchema)` to create a new message.
3191
+ */
3192
+ export declare const GetDomRevisionRequestSchema: GenMessage<GetDomRevisionRequest>;
3193
+ /**
3194
+ * @generated from message browserscale.v1.GetDomRevisionResponse
3195
+ */
3196
+ export type GetDomRevisionResponse = Message<"browserscale.v1.GetDomRevisionResponse"> & {
3197
+ /**
3198
+ * Monotonic counter, meaningful only within the current document.
3199
+ *
3200
+ * @generated from field: uint64 revision = 1;
3201
+ */
3202
+ revision: bigint;
3203
+ };
3204
+ /**
3205
+ * Describes the message browserscale.v1.GetDomRevisionResponse.
3206
+ * Use `create(GetDomRevisionResponseSchema)` to create a new message.
3207
+ */
3208
+ export declare const GetDomRevisionResponseSchema: GenMessage<GetDomRevisionResponse>;
3209
+ /**
3210
+ * @generated from message browserscale.v1.StreamDomEventsRequest
3211
+ */
3212
+ export type StreamDomEventsRequest = Message<"browserscale.v1.StreamDomEventsRequest"> & {
3213
+ /**
3214
+ * @generated from field: string session_id = 1;
3215
+ */
3216
+ sessionId: string;
3217
+ /**
3218
+ * @generated from field: string api_key = 2;
3219
+ */
3220
+ apiKey: string;
3221
+ };
3222
+ /**
3223
+ * Describes the message browserscale.v1.StreamDomEventsRequest.
3224
+ * Use `create(StreamDomEventsRequestSchema)` to create a new message.
3225
+ */
3226
+ export declare const StreamDomEventsRequestSchema: GenMessage<StreamDomEventsRequest>;
3227
+ /**
3228
+ * One batch of edits to the revealed part of the page's DOM.
3229
+ *
3230
+ * @generated from message browserscale.v1.DomUpdate
3231
+ */
3232
+ export type DomUpdate = Message<"browserscale.v1.DomUpdate"> & {
3233
+ /**
3234
+ * The id space these entries' node ids live in. Node ids restart per frame,
3235
+ * so this is half of every address in the batch.
3236
+ *
3237
+ * @generated from field: string frame_id = 1;
3238
+ */
3239
+ frameId: string;
3240
+ /**
3241
+ * Page sequence AFTER applying this batch. One clock for the whole page: an
3242
+ * edit in an OOPIF and one in the main document are ordered against each
3243
+ * other because both passed through the browser in the order it saw them.
3244
+ *
3245
+ * @generated from field: uint64 seq = 2;
3246
+ */
3247
+ seq: bigint;
3248
+ /**
3249
+ * JSON array of entries, ordered, to be applied in order. See the domUpdate
3250
+ * event in WRC.pdl for the entry shapes.
3251
+ *
3252
+ * A frame's document arriving or being replaced is an edit like any other: a
3253
+ * childNodeInserted or childNodeRemoved on the <iframe> that hosts it, both
3254
+ * in the same batch when it is a replacement.
3255
+ *
3256
+ * @generated from field: string edits = 3;
3257
+ */
3258
+ edits: string;
3259
+ };
3260
+ /**
3261
+ * Describes the message browserscale.v1.DomUpdate.
3262
+ * Use `create(DomUpdateSchema)` to create a new message.
3263
+ */
3264
+ export declare const DomUpdateSchema: GenMessage<DomUpdate>;
3265
+ /**
3266
+ * The client's copy of the page is void and must be rebuilt by calling
3267
+ * StartDomMirror again.
3268
+ *
3269
+ * Page-wide, because only the MAIN frame can void everything. A child frame
3270
+ * losing its document is a childNodeRemoved plus a childNodeInserted on its
3271
+ * owner, which costs that subtree rather than the page. Worth the distinction
3272
+ * on any page carrying ad frames, where the page-wide version would otherwise
3273
+ * fire continuously.
3274
+ *
3275
+ * @generated from message browserscale.v1.DomResync
3276
+ */
3277
+ export type DomResync = Message<"browserscale.v1.DomResync"> & {
3278
+ /**
3279
+ * "documentReplaced", "overflow", "rendererGone" from the browser, or
3280
+ * "slowReader" when this relay could not hold the backlog.
3281
+ *
3282
+ * @generated from field: string reason = 2;
3283
+ */
3284
+ reason: string;
3285
+ };
3286
+ /**
3287
+ * Describes the message browserscale.v1.DomResync.
3288
+ * Use `create(DomResyncSchema)` to create a new message.
3289
+ */
3290
+ export declare const DomResyncSchema: GenMessage<DomResync>;
3291
+ /**
3292
+ * Updates and resyncs share one stream because they are only meaningful
3293
+ * relative to each other. On two streams a client could apply a batch that the
3294
+ * resync it has not read yet already invalidated, and no amount of sequence
3295
+ * bookkeeping recovers that ordering after the fact.
3296
+ *
3297
+ * There is deliberately no dropped-message counter, which the network exchange
3298
+ * stream does have. A dropped exchange leaves a log with a hole in it; a
3299
+ * dropped edit leaves a TREE THAT IS WRONG, and a client cannot tell the
3300
+ * difference by looking at it. So a backlog this relay cannot hold is
3301
+ * converted into a resync instead of being counted.
3302
+ *
3303
+ * @generated from message browserscale.v1.DomEvent
3304
+ */
3305
+ export type DomEvent = Message<"browserscale.v1.DomEvent"> & {
3306
+ /**
3307
+ * @generated from oneof browserscale.v1.DomEvent.event
3308
+ */
3309
+ event: {
3310
+ /**
3311
+ * @generated from field: browserscale.v1.DomUpdate update = 1;
3312
+ */
3313
+ value: DomUpdate;
3314
+ case: "update";
3315
+ } | {
3316
+ /**
3317
+ * @generated from field: browserscale.v1.DomResync resync = 2;
3318
+ */
3319
+ value: DomResync;
3320
+ case: "resync";
3321
+ } | {
3322
+ case: undefined;
3323
+ value?: undefined;
3324
+ };
3325
+ };
3326
+ /**
3327
+ * Describes the message browserscale.v1.DomEvent.
3328
+ * Use `create(DomEventSchema)` to create a new message.
3329
+ */
3330
+ export declare const DomEventSchema: GenMessage<DomEvent>;
3331
+ /**
3332
+ * @generated from message browserscale.v1.InspectAtPositionRequest
3333
+ */
3334
+ export type InspectAtPositionRequest = Message<"browserscale.v1.InspectAtPositionRequest"> & {
3335
+ /**
3336
+ * @generated from field: string session_id = 1;
3337
+ */
3338
+ sessionId: string;
3339
+ /**
3340
+ * @generated from field: string api_key = 2;
3341
+ */
3342
+ apiKey: string;
3343
+ /**
3344
+ * @generated from field: string page_id = 3;
3345
+ */
3346
+ pageId: string;
3347
+ /**
3348
+ * Viewport-relative CSS pixels.
3349
+ *
3350
+ * @generated from field: double x = 4;
3351
+ */
3352
+ x: number;
3353
+ /**
3354
+ * @generated from field: double y = 5;
3355
+ */
3356
+ y: number;
3357
+ };
3358
+ /**
3359
+ * Describes the message browserscale.v1.InspectAtPositionRequest.
3360
+ * Use `create(InspectAtPositionRequestSchema)` to create a new message.
3361
+ */
3362
+ export declare const InspectAtPositionRequestSchema: GenMessage<InspectAtPositionRequest>;
3363
+ /**
3364
+ * @generated from message browserscale.v1.InspectAtPositionResponse
3365
+ */
3366
+ export type InspectAtPositionResponse = Message<"browserscale.v1.InspectAtPositionResponse"> & {
3367
+ /**
3368
+ * 0 if nothing was found at (x, y).
3369
+ *
3370
+ * @generated from field: int32 backend_node_id = 1;
3371
+ */
3372
+ backendNodeId: number;
3373
+ /**
3374
+ * @generated from field: string frame_id = 2;
3375
+ */
3376
+ frameId: string;
3377
+ /**
3378
+ * @generated from field: string tag_name = 3;
3379
+ */
3380
+ tagName: string;
3381
+ /**
3382
+ * Trimmed text content (max ~200 chars, server-imposed).
3383
+ *
3384
+ * @generated from field: string text_content = 4;
3385
+ */
3386
+ textContent: string;
2598
3387
  /**
2599
3388
  * @generated from field: bool is_visible = 5;
2600
3389
  */
@@ -2902,11 +3691,10 @@ export type ScreenshotResponse = Message<"browserscale.v1.ScreenshotResponse"> &
2902
3691
  */
2903
3692
  export declare const ScreenshotResponseSchema: GenMessage<ScreenshotResponse>;
2904
3693
  /**
2905
- * ReadCanvas reads the pixels of a single <canvas> element directly in the
2906
- * renderer, bypassing the origin-clean (tainted) security check and without
2907
- * executing page JavaScript — so cross-origin/tainted canvases (common in
2908
- * captchas) can be read. The element is addressed like any other action
2909
- * target: by selector, js_expression, or backend_node_id.
3694
+ * ReadCanvas reads the pixels of a <canvas> directly in the renderer, bypassing
3695
+ * the origin-clean (tainted) security check and without executing page JS.
3696
+ * Cross-origin/tainted canvases read fine. Targeted like click: by
3697
+ * backendNodeId (preferred), CSS selector, or JS expression.
2910
3698
  *
2911
3699
  * @generated from message browserscale.v1.ReadCanvasRequest
2912
3700
  */
@@ -2936,105 +3724,395 @@ export type ReadCanvasRequest = Message<"browserscale.v1.ReadCanvasRequest"> & {
2936
3724
  */
2937
3725
  jsExpression?: string;
2938
3726
  /**
2939
- * Specific frameId, empty/omitted for main frame, or "ALL_FRAMES".
2940
- *
2941
3727
  * @generated from field: optional string frame_id = 7;
2942
3728
  */
2943
3729
  frameId?: string;
2944
3730
  /**
2945
- * Output encoding: "png" (default), "jpeg", "webp", or "rgba" for the raw
2946
- * unpremultiplied RGBA pixel buffer.
3731
+ * Output format: "png" (default), "jpeg", "webp", or "rgba" for the raw
3732
+ * unencoded RGBA pixel buffer.
3733
+ *
3734
+ * @generated from field: optional string format = 8;
3735
+ */
3736
+ format?: string;
3737
+ /**
3738
+ * Encode quality 0-100 for "jpeg"/"webp" (ignored otherwise). Default 90.
3739
+ *
3740
+ * @generated from field: optional int32 quality = 9;
3741
+ */
3742
+ quality?: number;
3743
+ /**
3744
+ * Optional sub-rectangle in canvas pixels (mirrors getImageData(sx,sy,sw,sh)).
3745
+ * Omit sw/sh (or set <= 0) to read the full canvas.
3746
+ *
3747
+ * @generated from field: optional int32 sx = 10;
3748
+ */
3749
+ sx?: number;
3750
+ /**
3751
+ * @generated from field: optional int32 sy = 11;
3752
+ */
3753
+ sy?: number;
3754
+ /**
3755
+ * @generated from field: optional int32 sw = 12;
3756
+ */
3757
+ sw?: number;
3758
+ /**
3759
+ * @generated from field: optional int32 sh = 13;
3760
+ */
3761
+ sh?: number;
3762
+ };
3763
+ /**
3764
+ * Describes the message browserscale.v1.ReadCanvasRequest.
3765
+ * Use `create(ReadCanvasRequestSchema)` to create a new message.
3766
+ */
3767
+ export declare const ReadCanvasRequestSchema: GenMessage<ReadCanvasRequest>;
3768
+ /**
3769
+ * @generated from message browserscale.v1.ReadCanvasResponse
3770
+ */
3771
+ export type ReadCanvasResponse = Message<"browserscale.v1.ReadCanvasResponse"> & {
3772
+ /**
3773
+ * Whether a <canvas> was found and read.
3774
+ *
3775
+ * @generated from field: bool success = 1;
3776
+ */
3777
+ success: boolean;
3778
+ /**
3779
+ * The frameId that contained the canvas.
3780
+ *
3781
+ * @generated from field: string frame_id = 2;
3782
+ */
3783
+ frameId: string;
3784
+ /**
3785
+ * Backend node ID of the canvas that was read.
3786
+ *
3787
+ * @generated from field: int32 backend_node_id = 3;
3788
+ */
3789
+ backendNodeId: number;
3790
+ /**
3791
+ * Encoded image bytes as base64 (png/jpeg/webp), or the raw RGBA buffer as
3792
+ * base64 when format is "rgba".
3793
+ *
3794
+ * @generated from field: string data_base64 = 4;
3795
+ */
3796
+ dataBase64: string;
3797
+ /**
3798
+ * Pixel width of the returned image (canvas width, or sw if clipped).
3799
+ *
3800
+ * @generated from field: int32 width = 5;
3801
+ */
3802
+ width: number;
3803
+ /**
3804
+ * Pixel height of the returned image (canvas height, or sh if clipped).
3805
+ *
3806
+ * @generated from field: int32 height = 6;
3807
+ */
3808
+ height: number;
3809
+ /**
3810
+ * Whether the canvas was actually origin-clean. Informational only.
3811
+ *
3812
+ * @generated from field: bool origin_clean = 7;
3813
+ */
3814
+ originClean: boolean;
3815
+ };
3816
+ /**
3817
+ * Describes the message browserscale.v1.ReadCanvasResponse.
3818
+ * Use `create(ReadCanvasResponseSchema)` to create a new message.
3819
+ */
3820
+ export declare const ReadCanvasResponseSchema: GenMessage<ReadCanvasResponse>;
3821
+ /**
3822
+ * @generated from message browserscale.v1.SolveCaptchaRequest
3823
+ */
3824
+ export type SolveCaptchaRequest = Message<"browserscale.v1.SolveCaptchaRequest"> & {
3825
+ /**
3826
+ * @generated from field: string session_id = 1;
3827
+ */
3828
+ sessionId: string;
3829
+ /**
3830
+ * @generated from field: string api_key = 2;
3831
+ */
3832
+ apiKey: string;
3833
+ /**
3834
+ * Total time budget in ms. 0 = server default (60s).
3835
+ *
3836
+ * @generated from field: int32 timeout_ms = 3;
3837
+ */
3838
+ timeoutMs: number;
3839
+ /**
3840
+ * Retry the solve flow this many times before giving up.
3841
+ *
3842
+ * @generated from field: int32 retry_amount = 4;
3843
+ */
3844
+ retryAmount: number;
3845
+ };
3846
+ /**
3847
+ * Describes the message browserscale.v1.SolveCaptchaRequest.
3848
+ * Use `create(SolveCaptchaRequestSchema)` to create a new message.
3849
+ */
3850
+ export declare const SolveCaptchaRequestSchema: GenMessage<SolveCaptchaRequest>;
3851
+ /**
3852
+ * @generated from message browserscale.v1.SolveCaptchaResponse
3853
+ */
3854
+ export type SolveCaptchaResponse = Message<"browserscale.v1.SolveCaptchaResponse"> & {
3855
+ /**
3856
+ * Solution token returned by the underlying challenge, when applicable.
3857
+ * Empty on success — most challenges are completed in-page server-side
3858
+ * and require no further action from the caller. Empty on failure too.
3859
+ *
3860
+ * @generated from field: string result = 1;
3861
+ */
3862
+ result: string;
3863
+ };
3864
+ /**
3865
+ * Describes the message browserscale.v1.SolveCaptchaResponse.
3866
+ * Use `create(SolveCaptchaResponseSchema)` to create a new message.
3867
+ */
3868
+ export declare const SolveCaptchaResponseSchema: GenMessage<SolveCaptchaResponse>;
3869
+ /**
3870
+ * IceServer is one entry for an RTCPeerConnection's iceServers config: a TURN
3871
+ * (or STUN) URL plus the short-lived REST credentials to authenticate with it.
3872
+ *
3873
+ * @generated from message browserscale.v1.IceServer
3874
+ */
3875
+ export type IceServer = Message<"browserscale.v1.IceServer"> & {
3876
+ /**
3877
+ * @generated from field: repeated string urls = 1;
3878
+ */
3879
+ urls: string[];
3880
+ /**
3881
+ * @generated from field: optional string username = 2;
3882
+ */
3883
+ username?: string;
3884
+ /**
3885
+ * @generated from field: optional string credential = 3;
3886
+ */
3887
+ credential?: string;
3888
+ };
3889
+ /**
3890
+ * Describes the message browserscale.v1.IceServer.
3891
+ * Use `create(IceServerSchema)` to create a new message.
3892
+ */
3893
+ export declare const IceServerSchema: GenMessage<IceServer>;
3894
+ /**
3895
+ * @generated from message browserscale.v1.GetStreamConfigRequest
3896
+ */
3897
+ export type GetStreamConfigRequest = Message<"browserscale.v1.GetStreamConfigRequest"> & {
3898
+ /**
3899
+ * @generated from field: string session_id = 1;
3900
+ */
3901
+ sessionId: string;
3902
+ /**
3903
+ * @generated from field: string api_key = 2;
3904
+ */
3905
+ apiKey: string;
3906
+ };
3907
+ /**
3908
+ * Describes the message browserscale.v1.GetStreamConfigRequest.
3909
+ * Use `create(GetStreamConfigRequestSchema)` to create a new message.
3910
+ */
3911
+ export declare const GetStreamConfigRequestSchema: GenMessage<GetStreamConfigRequest>;
3912
+ /**
3913
+ * @generated from message browserscale.v1.GetStreamConfigResponse
3914
+ */
3915
+ export type GetStreamConfigResponse = Message<"browserscale.v1.GetStreamConfigResponse"> & {
3916
+ /**
3917
+ * TURN/STUN servers with short-lived credentials. Put these in the client's
3918
+ * RTCPeerConnection config BEFORE creating the offer, so it can gather relay
3919
+ * candidates.
3920
+ *
3921
+ * @generated from field: repeated browserscale.v1.IceServer ice_servers = 1;
3922
+ */
3923
+ iceServers: IceServer[];
3924
+ };
3925
+ /**
3926
+ * Describes the message browserscale.v1.GetStreamConfigResponse.
3927
+ * Use `create(GetStreamConfigResponseSchema)` to create a new message.
3928
+ */
3929
+ export declare const GetStreamConfigResponseSchema: GenMessage<GetStreamConfigResponse>;
3930
+ /**
3931
+ * @generated from message browserscale.v1.StartStreamRequest
3932
+ */
3933
+ export type StartStreamRequest = Message<"browserscale.v1.StartStreamRequest"> & {
3934
+ /**
3935
+ * @generated from field: string session_id = 1;
3936
+ */
3937
+ sessionId: string;
3938
+ /**
3939
+ * @generated from field: string api_key = 2;
3940
+ */
3941
+ apiKey: string;
3942
+ /**
3943
+ * The client's SDP offer. The browser sets it as the remote description and
3944
+ * returns its answer. Relay policy, frame rate and bitrate are decided by the
3945
+ * server — the client only offers.
3946
+ *
3947
+ * @generated from field: string offer_sdp = 3;
3948
+ */
3949
+ offerSdp: string;
3950
+ };
3951
+ /**
3952
+ * Describes the message browserscale.v1.StartStreamRequest.
3953
+ * Use `create(StartStreamRequestSchema)` to create a new message.
3954
+ */
3955
+ export declare const StartStreamRequestSchema: GenMessage<StartStreamRequest>;
3956
+ /**
3957
+ * @generated from message browserscale.v1.StartStreamResponse
3958
+ */
3959
+ export type StartStreamResponse = Message<"browserscale.v1.StartStreamResponse"> & {
3960
+ /**
3961
+ * The browser's SDP answer to set as the client's remote description.
3962
+ *
3963
+ * @generated from field: string answer_sdp = 1;
3964
+ */
3965
+ answerSdp: string;
3966
+ /**
3967
+ * Root-viewport size in CSS pixels — the coordinate space the input data
3968
+ * channels expect. Delivered with the answer so the client can map pointer
3969
+ * coordinates from the first frame on, without a getPages() round trip that
3970
+ * races the stream. x/y are always 0. Later changes arrive as
3971
+ * {"type":"viewport","width":W,"height":H} on the reliable "input" channel.
3972
+ *
3973
+ * @generated from field: browserscale.v1.Rect viewport = 2;
3974
+ */
3975
+ viewport?: Rect;
3976
+ };
3977
+ /**
3978
+ * Describes the message browserscale.v1.StartStreamResponse.
3979
+ * Use `create(StartStreamResponseSchema)` to create a new message.
3980
+ */
3981
+ export declare const StartStreamResponseSchema: GenMessage<StartStreamResponse>;
3982
+ /**
3983
+ * @generated from message browserscale.v1.StopStreamRequest
3984
+ */
3985
+ export type StopStreamRequest = Message<"browserscale.v1.StopStreamRequest"> & {
3986
+ /**
3987
+ * @generated from field: string session_id = 1;
3988
+ */
3989
+ sessionId: string;
3990
+ /**
3991
+ * @generated from field: string api_key = 2;
3992
+ */
3993
+ apiKey: string;
3994
+ };
3995
+ /**
3996
+ * Describes the message browserscale.v1.StopStreamRequest.
3997
+ * Use `create(StopStreamRequestSchema)` to create a new message.
3998
+ */
3999
+ export declare const StopStreamRequestSchema: GenMessage<StopStreamRequest>;
4000
+ /**
4001
+ * @generated from message browserscale.v1.StopStreamResponse
4002
+ */
4003
+ export type StopStreamResponse = Message<"browserscale.v1.StopStreamResponse"> & {};
4004
+ /**
4005
+ * Describes the message browserscale.v1.StopStreamResponse.
4006
+ * Use `create(StopStreamResponseSchema)` to create a new message.
4007
+ */
4008
+ export declare const StopStreamResponseSchema: GenMessage<StopStreamResponse>;
4009
+ /**
4010
+ * One console line a script printed.
4011
+ *
4012
+ * @generated from message browserscale.v1.ScriptLogEntry
4013
+ */
4014
+ export type ScriptLogEntry = Message<"browserscale.v1.ScriptLogEntry"> & {
4015
+ /**
4016
+ * "info", "warning" or "error", from console.log / .warn / .error.
2947
4017
  *
2948
- * @generated from field: optional string format = 8;
4018
+ * @generated from field: string level = 1;
2949
4019
  */
2950
- format?: string;
4020
+ level: string;
2951
4021
  /**
2952
- * Encode quality 0-100 for "jpeg"/"webp" (ignored otherwise). Default 90.
4022
+ * The arguments, already stringified the way console does it.
2953
4023
  *
2954
- * @generated from field: optional int32 quality = 9;
4024
+ * @generated from field: string message = 2;
2955
4025
  */
2956
- quality?: number;
4026
+ message: string;
2957
4027
  /**
2958
- * Optional sub-rectangle in canvas pixels (mirrors getImageData). The full
2959
- * canvas is read when sw/sh are omitted or <= 0.
4028
+ * Unix milliseconds, stamped where the script printed rather than where the
4029
+ * line was received, so the log stays ordered across a reconnect.
2960
4030
  *
2961
- * @generated from field: optional int32 sx = 10;
4031
+ * @generated from field: int64 timestamp = 3;
2962
4032
  */
2963
- sx?: number;
4033
+ timestamp: bigint;
4034
+ };
4035
+ /**
4036
+ * Describes the message browserscale.v1.ScriptLogEntry.
4037
+ * Use `create(ScriptLogEntrySchema)` to create a new message.
4038
+ */
4039
+ export declare const ScriptLogEntrySchema: GenMessage<ScriptLogEntry>;
4040
+ /**
4041
+ * @generated from message browserscale.v1.RunScriptRequest
4042
+ */
4043
+ export type RunScriptRequest = Message<"browserscale.v1.RunScriptRequest"> & {
2964
4044
  /**
2965
- * @generated from field: optional int32 sy = 11;
4045
+ * @generated from field: string session_id = 1;
2966
4046
  */
2967
- sy?: number;
4047
+ sessionId: string;
2968
4048
  /**
2969
- * @generated from field: optional int32 sw = 12;
4049
+ * @generated from field: string api_key = 2;
2970
4050
  */
2971
- sw?: number;
4051
+ apiKey: string;
2972
4052
  /**
2973
- * @generated from field: optional int32 sh = 13;
4053
+ * JavaScript source. Runs with `browser` bound to the session, so the script
4054
+ * needs no setup of its own.
4055
+ *
4056
+ * @generated from field: string source = 3;
2974
4057
  */
2975
- sh?: number;
4058
+ source: string;
2976
4059
  };
2977
4060
  /**
2978
- * Describes the message browserscale.v1.ReadCanvasRequest.
2979
- * Use `create(ReadCanvasRequestSchema)` to create a new message.
4061
+ * Describes the message browserscale.v1.RunScriptRequest.
4062
+ * Use `create(RunScriptRequestSchema)` to create a new message.
2980
4063
  */
2981
- export declare const ReadCanvasRequestSchema: GenMessage<ReadCanvasRequest>;
4064
+ export declare const RunScriptRequestSchema: GenMessage<RunScriptRequest>;
2982
4065
  /**
2983
- * @generated from message browserscale.v1.ReadCanvasResponse
4066
+ * There is deliberately no timeout on RunScript. A deadline is only useful if
4067
+ * it can cancel, and cancelling needs the run id — which this call does not
4068
+ * learn until the reply it is waiting for. A caller who needs a bound uses
4069
+ * StartScript, which hands the id over first, and StopScripts when the bound is
4070
+ * hit. A caller who just wants out can StopScripts with no id.
4071
+ *
4072
+ * @generated from message browserscale.v1.RunScriptResponse
2984
4073
  */
2985
- export type ReadCanvasResponse = Message<"browserscale.v1.ReadCanvasResponse"> & {
4074
+ export type RunScriptResponse = Message<"browserscale.v1.RunScriptResponse"> & {
2986
4075
  /**
2987
4076
  * @generated from field: bool success = 1;
2988
4077
  */
2989
4078
  success: boolean;
2990
4079
  /**
2991
- * Frame the canvas was resolved in.
2992
- *
2993
- * @generated from field: string frame_id = 2;
2994
- */
2995
- frameId: string;
2996
- /**
2997
- * Resolved DevTools backendNodeId of the canvas.
2998
- *
2999
- * @generated from field: int32 backend_node_id = 3;
3000
- */
3001
- backendNodeId: number;
3002
- /**
3003
- * Encoded image bytes as base64 (PNG by default), or the raw RGBA buffer
3004
- * when format == "rgba".
4080
+ * The script's return value as JSON, "undefined" when it returned nothing,
4081
+ * or the error message when success is false.
3005
4082
  *
3006
- * @generated from field: string data_base64 = 4;
4083
+ * @generated from field: string result = 2;
3007
4084
  */
3008
- dataBase64: string;
4085
+ result: string;
3009
4086
  /**
3010
- * Canvas width in pixels.
4087
+ * The run's id. Arrives too late to follow the run, but names it for a caller
4088
+ * that wants to match up log lines it already saw on the stream.
3011
4089
  *
3012
- * @generated from field: int32 width = 5;
4090
+ * @generated from field: string run_id = 3;
3013
4091
  */
3014
- width: number;
4092
+ runId: string;
3015
4093
  /**
3016
- * Canvas height in pixels.
4094
+ * Everything the script logged, in order — whether or not anyone subscribed.
3017
4095
  *
3018
- * @generated from field: int32 height = 6;
4096
+ * @generated from field: repeated browserscale.v1.ScriptLogEntry log = 4;
3019
4097
  */
3020
- height: number;
4098
+ log: ScriptLogEntry[];
3021
4099
  /**
3022
- * Whether the canvas was origin-clean (untainted). Informational only —
3023
- * the read succeeds regardless.
4100
+ * True when the script printed more than the reply holds, in which case log
4101
+ * is the tail of the output rather than all of it.
3024
4102
  *
3025
- * @generated from field: bool origin_clean = 7;
4103
+ * @generated from field: bool truncated = 5;
3026
4104
  */
3027
- originClean: boolean;
4105
+ truncated: boolean;
3028
4106
  };
3029
4107
  /**
3030
- * Describes the message browserscale.v1.ReadCanvasResponse.
3031
- * Use `create(ReadCanvasResponseSchema)` to create a new message.
4108
+ * Describes the message browserscale.v1.RunScriptResponse.
4109
+ * Use `create(RunScriptResponseSchema)` to create a new message.
3032
4110
  */
3033
- export declare const ReadCanvasResponseSchema: GenMessage<ReadCanvasResponse>;
4111
+ export declare const RunScriptResponseSchema: GenMessage<RunScriptResponse>;
3034
4112
  /**
3035
- * @generated from message browserscale.v1.SolveCaptchaRequest
4113
+ * @generated from message browserscale.v1.StartScriptRequest
3036
4114
  */
3037
- export type SolveCaptchaRequest = Message<"browserscale.v1.SolveCaptchaRequest"> & {
4115
+ export type StartScriptRequest = Message<"browserscale.v1.StartScriptRequest"> & {
3038
4116
  /**
3039
4117
  * @generated from field: string session_id = 1;
3040
4118
  */
@@ -3044,70 +4122,96 @@ export type SolveCaptchaRequest = Message<"browserscale.v1.SolveCaptchaRequest">
3044
4122
  */
3045
4123
  apiKey: string;
3046
4124
  /**
3047
- * Total time budget in ms. 0 = server default (60s).
3048
- *
3049
- * @generated from field: int32 timeout_ms = 3;
4125
+ * @generated from field: string source = 3;
3050
4126
  */
3051
- timeoutMs: number;
4127
+ source: string;
4128
+ };
4129
+ /**
4130
+ * Describes the message browserscale.v1.StartScriptRequest.
4131
+ * Use `create(StartScriptRequestSchema)` to create a new message.
4132
+ */
4133
+ export declare const StartScriptRequestSchema: GenMessage<StartScriptRequest>;
4134
+ /**
4135
+ * @generated from message browserscale.v1.StartScriptResponse
4136
+ */
4137
+ export type StartScriptResponse = Message<"browserscale.v1.StartScriptResponse"> & {
3052
4138
  /**
3053
- * Retry the solve flow this many times before giving up.
4139
+ * Identifies the run for StopScripts, ListScriptRuns and the event stream.
3054
4140
  *
3055
- * @generated from field: int32 retry_amount = 4;
4141
+ * @generated from field: string run_id = 1;
3056
4142
  */
3057
- retryAmount: number;
4143
+ runId: string;
3058
4144
  };
3059
4145
  /**
3060
- * Describes the message browserscale.v1.SolveCaptchaRequest.
3061
- * Use `create(SolveCaptchaRequestSchema)` to create a new message.
4146
+ * Describes the message browserscale.v1.StartScriptResponse.
4147
+ * Use `create(StartScriptResponseSchema)` to create a new message.
3062
4148
  */
3063
- export declare const SolveCaptchaRequestSchema: GenMessage<SolveCaptchaRequest>;
4149
+ export declare const StartScriptResponseSchema: GenMessage<StartScriptResponse>;
3064
4150
  /**
3065
- * @generated from message browserscale.v1.SolveCaptchaResponse
4151
+ * @generated from message browserscale.v1.StopScriptsRequest
3066
4152
  */
3067
- export type SolveCaptchaResponse = Message<"browserscale.v1.SolveCaptchaResponse"> & {
4153
+ export type StopScriptsRequest = Message<"browserscale.v1.StopScriptsRequest"> & {
3068
4154
  /**
3069
- * Solution token returned by the underlying challenge, when applicable.
3070
- * Empty on success — most challenges are completed in-page server-side
3071
- * and require no further action from the caller. Empty on failure too.
4155
+ * @generated from field: string session_id = 1;
4156
+ */
4157
+ sessionId: string;
4158
+ /**
4159
+ * @generated from field: string api_key = 2;
4160
+ */
4161
+ apiKey: string;
4162
+ /**
4163
+ * The run to cancel. Empty cancels every run in this session — the
4164
+ * distinction is deliberately explicit, because there is no undo for either.
3072
4165
  *
3073
- * @generated from field: string result = 1;
4166
+ * @generated from field: string run_id = 3;
3074
4167
  */
3075
- result: string;
4168
+ runId: string;
3076
4169
  };
3077
4170
  /**
3078
- * Describes the message browserscale.v1.SolveCaptchaResponse.
3079
- * Use `create(SolveCaptchaResponseSchema)` to create a new message.
4171
+ * Describes the message browserscale.v1.StopScriptsRequest.
4172
+ * Use `create(StopScriptsRequestSchema)` to create a new message.
3080
4173
  */
3081
- export declare const SolveCaptchaResponseSchema: GenMessage<SolveCaptchaResponse>;
4174
+ export declare const StopScriptsRequestSchema: GenMessage<StopScriptsRequest>;
3082
4175
  /**
3083
- * IceServer is one entry for an RTCPeerConnection's iceServers config: a TURN
3084
- * (or STUN) URL plus the short-lived REST credentials to authenticate with it.
3085
- *
3086
- * @generated from message browserscale.v1.IceServer
4176
+ * @generated from message browserscale.v1.StopScriptsResponse
3087
4177
  */
3088
- export type IceServer = Message<"browserscale.v1.IceServer"> & {
4178
+ export type StopScriptsResponse = Message<"browserscale.v1.StopScriptsResponse"> & {
3089
4179
  /**
3090
- * @generated from field: repeated string urls = 1;
4180
+ * @generated from field: int32 stopped = 1;
3091
4181
  */
3092
- urls: string[];
4182
+ stopped: number;
4183
+ };
4184
+ /**
4185
+ * Describes the message browserscale.v1.StopScriptsResponse.
4186
+ * Use `create(StopScriptsResponseSchema)` to create a new message.
4187
+ */
4188
+ export declare const StopScriptsResponseSchema: GenMessage<StopScriptsResponse>;
4189
+ /**
4190
+ * @generated from message browserscale.v1.ScriptRun
4191
+ */
4192
+ export type ScriptRun = Message<"browserscale.v1.ScriptRun"> & {
3093
4193
  /**
3094
- * @generated from field: optional string username = 2;
4194
+ * @generated from field: string run_id = 1;
3095
4195
  */
3096
- username?: string;
4196
+ runId: string;
3097
4197
  /**
3098
- * @generated from field: optional string credential = 3;
4198
+ * How long the run has been going, in ms. Reported as an age rather than a
4199
+ * start time because that is what the browser knows — it counts from when the
4200
+ * run was accepted, with no clock shared with the caller.
4201
+ *
4202
+ * @generated from field: int64 running_ms = 2;
3099
4203
  */
3100
- credential?: string;
4204
+ runningMs: bigint;
3101
4205
  };
3102
4206
  /**
3103
- * Describes the message browserscale.v1.IceServer.
3104
- * Use `create(IceServerSchema)` to create a new message.
4207
+ * Describes the message browserscale.v1.ScriptRun.
4208
+ * Use `create(ScriptRunSchema)` to create a new message.
3105
4209
  */
3106
- export declare const IceServerSchema: GenMessage<IceServer>;
4210
+ export declare const ScriptRunSchema: GenMessage<ScriptRun>;
3107
4211
  /**
3108
- * @generated from message browserscale.v1.GetStreamConfigRequest
4212
+ * @generated from message browserscale.v1.ListScriptRunsRequest
3109
4213
  */
3110
- export type GetStreamConfigRequest = Message<"browserscale.v1.GetStreamConfigRequest"> & {
4214
+ export type ListScriptRunsRequest = Message<"browserscale.v1.ListScriptRunsRequest"> & {
3111
4215
  /**
3112
4216
  * @generated from field: string session_id = 1;
3113
4217
  */
@@ -3118,32 +4222,31 @@ export type GetStreamConfigRequest = Message<"browserscale.v1.GetStreamConfigReq
3118
4222
  apiKey: string;
3119
4223
  };
3120
4224
  /**
3121
- * Describes the message browserscale.v1.GetStreamConfigRequest.
3122
- * Use `create(GetStreamConfigRequestSchema)` to create a new message.
4225
+ * Describes the message browserscale.v1.ListScriptRunsRequest.
4226
+ * Use `create(ListScriptRunsRequestSchema)` to create a new message.
3123
4227
  */
3124
- export declare const GetStreamConfigRequestSchema: GenMessage<GetStreamConfigRequest>;
4228
+ export declare const ListScriptRunsRequestSchema: GenMessage<ListScriptRunsRequest>;
3125
4229
  /**
3126
- * @generated from message browserscale.v1.GetStreamConfigResponse
4230
+ * @generated from message browserscale.v1.ListScriptRunsResponse
3127
4231
  */
3128
- export type GetStreamConfigResponse = Message<"browserscale.v1.GetStreamConfigResponse"> & {
4232
+ export type ListScriptRunsResponse = Message<"browserscale.v1.ListScriptRunsResponse"> & {
3129
4233
  /**
3130
- * TURN/STUN servers with short-lived credentials. Put these in the client's
3131
- * RTCPeerConnection config BEFORE creating the offer, so it can gather relay
3132
- * candidates.
4234
+ * Only runs still executing. A finished run is reported once on the event
4235
+ * stream and then forgotten; this is not a history.
3133
4236
  *
3134
- * @generated from field: repeated browserscale.v1.IceServer ice_servers = 1;
4237
+ * @generated from field: repeated browserscale.v1.ScriptRun runs = 1;
3135
4238
  */
3136
- iceServers: IceServer[];
4239
+ runs: ScriptRun[];
3137
4240
  };
3138
4241
  /**
3139
- * Describes the message browserscale.v1.GetStreamConfigResponse.
3140
- * Use `create(GetStreamConfigResponseSchema)` to create a new message.
4242
+ * Describes the message browserscale.v1.ListScriptRunsResponse.
4243
+ * Use `create(ListScriptRunsResponseSchema)` to create a new message.
3141
4244
  */
3142
- export declare const GetStreamConfigResponseSchema: GenMessage<GetStreamConfigResponse>;
4245
+ export declare const ListScriptRunsResponseSchema: GenMessage<ListScriptRunsResponse>;
3143
4246
  /**
3144
- * @generated from message browserscale.v1.StartStreamRequest
4247
+ * @generated from message browserscale.v1.StreamScriptEventsRequest
3145
4248
  */
3146
- export type StartStreamRequest = Message<"browserscale.v1.StartStreamRequest"> & {
4249
+ export type StreamScriptEventsRequest = Message<"browserscale.v1.StreamScriptEventsRequest"> & {
3147
4250
  /**
3148
4251
  * @generated from field: string session_id = 1;
3149
4252
  */
@@ -3153,62 +4256,104 @@ export type StartStreamRequest = Message<"browserscale.v1.StartStreamRequest"> &
3153
4256
  */
3154
4257
  apiKey: string;
3155
4258
  /**
3156
- * The client's SDP offer. The browser sets it as the remote description and
3157
- * returns its answer. Relay policy, frame rate and bitrate are decided by the
3158
- * server — the client only offers.
4259
+ * Report only this run. Empty reports every run in the session, which is what
4260
+ * a dashboard wants and what a single follower does not.
3159
4261
  *
3160
- * @generated from field: string offer_sdp = 3;
4262
+ * @generated from field: string run_id = 3;
3161
4263
  */
3162
- offerSdp: string;
4264
+ runId: string;
3163
4265
  };
3164
4266
  /**
3165
- * Describes the message browserscale.v1.StartStreamRequest.
3166
- * Use `create(StartStreamRequestSchema)` to create a new message.
4267
+ * Describes the message browserscale.v1.StreamScriptEventsRequest.
4268
+ * Use `create(StreamScriptEventsRequestSchema)` to create a new message.
3167
4269
  */
3168
- export declare const StartStreamRequestSchema: GenMessage<StartStreamRequest>;
4270
+ export declare const StreamScriptEventsRequestSchema: GenMessage<StreamScriptEventsRequest>;
3169
4271
  /**
3170
- * @generated from message browserscale.v1.StartStreamResponse
4272
+ * @generated from message browserscale.v1.ScriptLog
3171
4273
  */
3172
- export type StartStreamResponse = Message<"browserscale.v1.StartStreamResponse"> & {
4274
+ export type ScriptLog = Message<"browserscale.v1.ScriptLog"> & {
3173
4275
  /**
3174
- * The browser's SDP answer to set as the client's remote description.
3175
- *
3176
- * @generated from field: string answer_sdp = 1;
4276
+ * @generated from field: string run_id = 1;
3177
4277
  */
3178
- answerSdp: string;
4278
+ runId: string;
4279
+ /**
4280
+ * @generated from field: browserscale.v1.ScriptLogEntry line = 2;
4281
+ */
4282
+ line?: ScriptLogEntry;
3179
4283
  };
3180
4284
  /**
3181
- * Describes the message browserscale.v1.StartStreamResponse.
3182
- * Use `create(StartStreamResponseSchema)` to create a new message.
4285
+ * Describes the message browserscale.v1.ScriptLog.
4286
+ * Use `create(ScriptLogSchema)` to create a new message.
3183
4287
  */
3184
- export declare const StartStreamResponseSchema: GenMessage<StartStreamResponse>;
4288
+ export declare const ScriptLogSchema: GenMessage<ScriptLog>;
3185
4289
  /**
3186
- * @generated from message browserscale.v1.StopStreamRequest
4290
+ * @generated from message browserscale.v1.ScriptFinished
3187
4291
  */
3188
- export type StopStreamRequest = Message<"browserscale.v1.StopStreamRequest"> & {
4292
+ export type ScriptFinished = Message<"browserscale.v1.ScriptFinished"> & {
3189
4293
  /**
3190
- * @generated from field: string session_id = 1;
4294
+ * @generated from field: string run_id = 1;
3191
4295
  */
3192
- sessionId: string;
4296
+ runId: string;
3193
4297
  /**
3194
- * @generated from field: string api_key = 2;
4298
+ * @generated from field: bool success = 2;
3195
4299
  */
3196
- apiKey: string;
4300
+ success: boolean;
4301
+ /**
4302
+ * The return value as JSON, or the error message when success is false — the
4303
+ * same one field as in RunScriptResponse.
4304
+ *
4305
+ * @generated from field: string result = 3;
4306
+ */
4307
+ result: string;
4308
+ /**
4309
+ * True when the run ended because StopScripts cancelled it, or because the VM
4310
+ * was torn down under it, rather than on its own.
4311
+ *
4312
+ * @generated from field: bool stopped = 4;
4313
+ */
4314
+ stopped: boolean;
3197
4315
  };
3198
4316
  /**
3199
- * Describes the message browserscale.v1.StopStreamRequest.
3200
- * Use `create(StopStreamRequestSchema)` to create a new message.
4317
+ * Describes the message browserscale.v1.ScriptFinished.
4318
+ * Use `create(ScriptFinishedSchema)` to create a new message.
3201
4319
  */
3202
- export declare const StopStreamRequestSchema: GenMessage<StopStreamRequest>;
4320
+ export declare const ScriptFinishedSchema: GenMessage<ScriptFinished>;
3203
4321
  /**
3204
- * @generated from message browserscale.v1.StopStreamResponse
4322
+ * @generated from message browserscale.v1.ScriptEvent
3205
4323
  */
3206
- export type StopStreamResponse = Message<"browserscale.v1.StopStreamResponse"> & {};
4324
+ export type ScriptEvent = Message<"browserscale.v1.ScriptEvent"> & {
4325
+ /**
4326
+ * @generated from oneof browserscale.v1.ScriptEvent.event
4327
+ */
4328
+ event: {
4329
+ /**
4330
+ * @generated from field: browserscale.v1.ScriptLog log = 1;
4331
+ */
4332
+ value: ScriptLog;
4333
+ case: "log";
4334
+ } | {
4335
+ /**
4336
+ * @generated from field: browserscale.v1.ScriptFinished finished = 2;
4337
+ */
4338
+ value: ScriptFinished;
4339
+ case: "finished";
4340
+ } | {
4341
+ case: undefined;
4342
+ value?: undefined;
4343
+ };
4344
+ /**
4345
+ * Cumulative events dropped for this subscriber because it read slower than
4346
+ * the scripts produced them. Non-zero means the log has holes.
4347
+ *
4348
+ * @generated from field: uint64 dropped = 3;
4349
+ */
4350
+ dropped: bigint;
4351
+ };
3207
4352
  /**
3208
- * Describes the message browserscale.v1.StopStreamResponse.
3209
- * Use `create(StopStreamResponseSchema)` to create a new message.
4353
+ * Describes the message browserscale.v1.ScriptEvent.
4354
+ * Use `create(ScriptEventSchema)` to create a new message.
3210
4355
  */
3211
- export declare const StopStreamResponseSchema: GenMessage<StopStreamResponse>;
4356
+ export declare const ScriptEventSchema: GenMessage<ScriptEvent>;
3212
4357
  /**
3213
4358
  * @generated from service browserscale.v1.Browser
3214
4359
  */
@@ -3397,6 +4542,35 @@ export declare const Browser: GenService<{
3397
4542
  input: typeof ModifyRequestRequestSchema;
3398
4543
  output: typeof ModifyRequestResponseSchema;
3399
4544
  };
4545
+ /**
4546
+ * Network capture — every matching request in the session, reported as it
4547
+ * completes. Start/Stop are session state; the stream is a separate
4548
+ * subscription, so a capture survives a reader reconnect and two readers
4549
+ * can watch one capture.
4550
+ *
4551
+ * @generated from rpc browserscale.v1.Browser.StartNetworkCapture
4552
+ */
4553
+ startNetworkCapture: {
4554
+ methodKind: "unary";
4555
+ input: typeof StartNetworkCaptureRequestSchema;
4556
+ output: typeof EmptySchema;
4557
+ };
4558
+ /**
4559
+ * @generated from rpc browserscale.v1.Browser.StopNetworkCapture
4560
+ */
4561
+ stopNetworkCapture: {
4562
+ methodKind: "unary";
4563
+ input: typeof StopNetworkCaptureRequestSchema;
4564
+ output: typeof StopNetworkCaptureResponseSchema;
4565
+ };
4566
+ /**
4567
+ * @generated from rpc browserscale.v1.Browser.StreamNetworkExchanges
4568
+ */
4569
+ streamNetworkExchanges: {
4570
+ methodKind: "server_streaming";
4571
+ input: typeof StreamNetworkExchangesRequestSchema;
4572
+ output: typeof NetworkExchangeEventSchema;
4573
+ };
3400
4574
  /**
3401
4575
  * Cookies
3402
4576
  *
@@ -3449,6 +4623,24 @@ export declare const Browser: GenService<{
3449
4623
  input: typeof ClearStorageRequestSchema;
3450
4624
  output: typeof EmptySchema;
3451
4625
  };
4626
+ /**
4627
+ * Auth / DBSC (portable signed-in persona)
4628
+ *
4629
+ * @generated from rpc browserscale.v1.Browser.GetAuthSession
4630
+ */
4631
+ getAuthSession: {
4632
+ methodKind: "unary";
4633
+ input: typeof GetAuthSessionRequestSchema;
4634
+ output: typeof GetAuthSessionResponseSchema;
4635
+ };
4636
+ /**
4637
+ * @generated from rpc browserscale.v1.Browser.SetAuthSession
4638
+ */
4639
+ setAuthSession: {
4640
+ methodKind: "unary";
4641
+ input: typeof SetAuthSessionRequestSchema;
4642
+ output: typeof EmptySchema;
4643
+ };
3452
4644
  /**
3453
4645
  * DOM / observation
3454
4646
  *
@@ -3491,6 +4683,80 @@ export declare const Browser: GenService<{
3491
4683
  input: typeof HighlightNodeRequestSchema;
3492
4684
  output: typeof EmptySchema;
3493
4685
  };
4686
+ /**
4687
+ * DOM mirror — an incremental view of the page's DOM, as ONE tree.
4688
+ * StartDomMirror returns the top of the main document and from then on the
4689
+ * browser reports changes to the part the client has actually expanded; the
4690
+ * reads grow and shrink that part. Together they replace polling GetDOMHash
4691
+ * and re-fetching GetDOM.
4692
+ *
4693
+ * An <iframe> is an ordinary element whose one child is the document it
4694
+ * hosts, fetched by expanding it — which is also what starts mirroring that
4695
+ * frame, so frames cost nothing until someone opens one. There is no frame
4696
+ * lifecycle to subscribe to. RevealDomNode reaches into a frame nobody
4697
+ * opened and starts the ones on the way, which is what makes a hit test
4698
+ * usable against a lazily loaded tree.
4699
+ *
4700
+ * Like network capture, the stream is a separate subscription so a mirror
4701
+ * survives a reader reconnect. Unlike it, the stream carries both updates
4702
+ * and resyncs on ONE channel: a resync means "everything you hold is void",
4703
+ * which is only interpretable in order against the batches around it.
4704
+ *
4705
+ * @generated from rpc browserscale.v1.Browser.StartDomMirror
4706
+ */
4707
+ startDomMirror: {
4708
+ methodKind: "unary";
4709
+ input: typeof StartDomMirrorRequestSchema;
4710
+ output: typeof StartDomMirrorResponseSchema;
4711
+ };
4712
+ /**
4713
+ * @generated from rpc browserscale.v1.Browser.StopDomMirror
4714
+ */
4715
+ stopDomMirror: {
4716
+ methodKind: "unary";
4717
+ input: typeof StopDomMirrorRequestSchema;
4718
+ output: typeof EmptySchema;
4719
+ };
4720
+ /**
4721
+ * @generated from rpc browserscale.v1.Browser.GetDomChildren
4722
+ */
4723
+ getDomChildren: {
4724
+ methodKind: "unary";
4725
+ input: typeof GetDomChildrenRequestSchema;
4726
+ output: typeof GetDomChildrenResponseSchema;
4727
+ };
4728
+ /**
4729
+ * @generated from rpc browserscale.v1.Browser.ReleaseDomSubtree
4730
+ */
4731
+ releaseDomSubtree: {
4732
+ methodKind: "unary";
4733
+ input: typeof ReleaseDomSubtreeRequestSchema;
4734
+ output: typeof EmptySchema;
4735
+ };
4736
+ /**
4737
+ * @generated from rpc browserscale.v1.Browser.RevealDomNode
4738
+ */
4739
+ revealDomNode: {
4740
+ methodKind: "unary";
4741
+ input: typeof RevealDomNodeRequestSchema;
4742
+ output: typeof RevealDomNodeResponseSchema;
4743
+ };
4744
+ /**
4745
+ * @generated from rpc browserscale.v1.Browser.GetDomRevision
4746
+ */
4747
+ getDomRevision: {
4748
+ methodKind: "unary";
4749
+ input: typeof GetDomRevisionRequestSchema;
4750
+ output: typeof GetDomRevisionResponseSchema;
4751
+ };
4752
+ /**
4753
+ * @generated from rpc browserscale.v1.Browser.StreamDomEvents
4754
+ */
4755
+ streamDomEvents: {
4756
+ methodKind: "server_streaming";
4757
+ input: typeof StreamDomEventsRequestSchema;
4758
+ output: typeof DomEventSchema;
4759
+ };
3494
4760
  /**
3495
4761
  * Screenshot / capture
3496
4762
  *
@@ -3591,4 +4857,60 @@ export declare const Browser: GenService<{
3591
4857
  input: typeof StopStreamRequestSchema;
3592
4858
  output: typeof StopStreamResponseSchema;
3593
4859
  };
4860
+ /**
4861
+ * Scripts — automation that runs inside the browser process rather than
4862
+ * across the network. The script gets the same `browser.*` surface this
4863
+ * service exposes, but each call is a function call in the browser instead of
4864
+ * a gRPC round trip, so a loop that is unusable at ~50ms per step costs
4865
+ * microseconds. Worth it for anything chatty: waiting for a selector,
4866
+ * scraping a list, walking pagination.
4867
+ *
4868
+ * Two modes, because a script is either something you wait for or something
4869
+ * you leave running. RunScript blocks and hands back the return value with
4870
+ * the whole log, which is what a one-shot caller wants. StartScript returns a
4871
+ * run id immediately and the output arrives on the event stream, which is the
4872
+ * only workable shape for a script that outlives the request.
4873
+ *
4874
+ * Like network capture the stream is a separate subscription, so output
4875
+ * survives a reader reconnect and two readers can watch one run.
4876
+ *
4877
+ * @generated from rpc browserscale.v1.Browser.RunScript
4878
+ */
4879
+ runScript: {
4880
+ methodKind: "unary";
4881
+ input: typeof RunScriptRequestSchema;
4882
+ output: typeof RunScriptResponseSchema;
4883
+ };
4884
+ /**
4885
+ * @generated from rpc browserscale.v1.Browser.StartScript
4886
+ */
4887
+ startScript: {
4888
+ methodKind: "unary";
4889
+ input: typeof StartScriptRequestSchema;
4890
+ output: typeof StartScriptResponseSchema;
4891
+ };
4892
+ /**
4893
+ * @generated from rpc browserscale.v1.Browser.StopScripts
4894
+ */
4895
+ stopScripts: {
4896
+ methodKind: "unary";
4897
+ input: typeof StopScriptsRequestSchema;
4898
+ output: typeof StopScriptsResponseSchema;
4899
+ };
4900
+ /**
4901
+ * @generated from rpc browserscale.v1.Browser.ListScriptRuns
4902
+ */
4903
+ listScriptRuns: {
4904
+ methodKind: "unary";
4905
+ input: typeof ListScriptRunsRequestSchema;
4906
+ output: typeof ListScriptRunsResponseSchema;
4907
+ };
4908
+ /**
4909
+ * @generated from rpc browserscale.v1.Browser.StreamScriptEvents
4910
+ */
4911
+ streamScriptEvents: {
4912
+ methodKind: "server_streaming";
4913
+ input: typeof StreamScriptEventsRequestSchema;
4914
+ output: typeof ScriptEventSchema;
4915
+ };
3594
4916
  }>;