@harborclient/sdk 1.4.5 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -607,6 +607,55 @@ export interface RequestToolbarActionContribution {
607
607
  */
608
608
  order?: number;
609
609
  }
610
+ /**
611
+ * Context passed to a live-page chrome action command when the user clicks the button.
612
+ */
613
+ export interface LivePageChromeActionContext {
614
+ /**
615
+ * Client-side id of the browser tab whose chrome rendered the button.
616
+ */
617
+ tabId: string;
618
+ /**
619
+ * Current page URL shown in the address bar.
620
+ */
621
+ url: string;
622
+ /**
623
+ * Document title shown in the tab bar.
624
+ */
625
+ title: string;
626
+ /**
627
+ * Linked saved website database id when the tab is bound to a Website; otherwise null/undefined.
628
+ */
629
+ websiteId?: number | null;
630
+ }
631
+ /**
632
+ * Adds a RoundButton to the embedded browser chrome bar (between Downloads and Ask AI).
633
+ *
634
+ * Register the command handler with {@link PluginCommands.register} separately.
635
+ * The handler receives a single {@link LivePageChromeActionContext} argument.
636
+ * Manifest: `contributes.livePageChromeActions` plus a matching `contributes.commands` entry.
637
+ * Requires the `ui` permission.
638
+ *
639
+ * Buttons sort by plugin activation order, then registration order within the plugin — not by title.
640
+ */
641
+ export interface LivePageChromeActionContribution {
642
+ /**
643
+ * Action id — must match an entry in `contributes.livePageChromeActions`.
644
+ */
645
+ id: string;
646
+ /**
647
+ * Button label / accessible name (and tooltip).
648
+ */
649
+ title: string;
650
+ /**
651
+ * Command id to run on click — must match a registered command and manifest entry.
652
+ */
653
+ command: string;
654
+ /**
655
+ * Optional curated icon name resolved by the host (falls back to a puzzle-piece icon).
656
+ */
657
+ icon?: string;
658
+ }
610
659
  /**
611
660
  * Context passed to a script editor action command when the user clicks a row button.
612
661
  */
@@ -868,6 +917,10 @@ export interface StatusBarItemContribution {
868
917
  *
869
918
  * Token usage:
870
919
  * - `surface` — main content background
920
+ * - `header` — top header strip (sidebar search + request tab bar)
921
+ * - `page-header` — page title header background (`PageHeader`)
922
+ * - `page-header-text` — page title header primary text
923
+ * - `page-header-muted` — page title header description and decorative icons
871
924
  * - `sidebar` — left sidebar background
872
925
  * - `sidebar-toolbar` — sidebar/footer toolbar strip background
873
926
  * - `sidebar-rail` — activity rail background
@@ -899,7 +952,8 @@ export interface StatusBarItemContribution {
899
952
  * - `doc-markdown` — collection sidebar markdown document icon
900
953
  * - `tab-unsaved` — request/markdown tab title when the tab has unsaved changes
901
954
  * - `tab-underline` — active request tab underline
902
- * - `resize-handle` — borders, resize grips, and high-contrast chrome accents
955
+ * - `resize-separator` — resizable panel separator track and edge border
956
+ * - `resize-handle` — resizable panel grip (and high-contrast chrome accents)
903
957
  * - `variable-token` — `{{variable}}` syntax highlight in editors
904
958
  * - `danger`, `danger-light`, `warning`, `success`, `info` — status colors
905
959
  * - `method-get`, `method-post`, `method-put`, `method-patch`, `method-delete`, `method-head`, `method-options` — HTTP method badge colors
@@ -907,7 +961,7 @@ export interface StatusBarItemContribution {
907
961
  * - `script-stage-before-all`, `script-stage-before-each`, `script-stage-main`, `script-stage-after-each`, `script-stage-after-all` — script row stage accent colors
908
962
  * - `terminal` — footer terminal background
909
963
  */
910
- export type ThemeColorToken = 'surface' | 'sidebar' | 'sidebar-toolbar' | 'sidebar-rail' | 'sidebar-rail-active' | 'sidebar-rail-text' | 'sidebar-rail-separator' | 'sidebar-section' | 'sidebar-section-text' | 'footer' | 'footer-text' | 'footer-muted' | 'footer-icon-active' | 'toolbar-action-active' | 'breadcrumb-background' | 'breadcrumb-segment' | 'breadcrumb-current' | 'git-staged' | 'git-uncommitted' | 'git-unstaged' | 'git-untracked' | 'control' | 'field' | 'separator' | 'text' | 'text-secondary' | 'muted' | 'accent' | 'selection' | 'doc-markdown' | 'tab-unsaved' | 'tab-underline' | 'resize-handle' | 'variable-token' | 'danger' | 'danger-light' | 'warning' | 'success' | 'info' | 'method-get' | 'method-post' | 'method-put' | 'method-patch' | 'method-delete' | 'method-head' | 'method-options' | 'scrollbar-track' | 'scrollbar-thumb' | 'scrollbar-thumb-hover' | 'scrollbar-thumb-active' | 'script-stage-before-all' | 'script-stage-before-each' | 'script-stage-main' | 'script-stage-after-each' | 'script-stage-after-all' | 'terminal';
964
+ export type ThemeColorToken = 'surface' | 'header' | 'page-header' | 'page-header-text' | 'page-header-muted' | 'sidebar' | 'sidebar-toolbar' | 'sidebar-rail' | 'sidebar-rail-active' | 'sidebar-rail-text' | 'sidebar-rail-separator' | 'sidebar-section' | 'sidebar-section-text' | 'footer' | 'footer-text' | 'footer-muted' | 'footer-icon-active' | 'toolbar-action-active' | 'breadcrumb-background' | 'breadcrumb-segment' | 'breadcrumb-current' | 'git-staged' | 'git-uncommitted' | 'git-unstaged' | 'git-untracked' | 'control' | 'field' | 'separator' | 'text' | 'text-secondary' | 'muted' | 'accent' | 'selection' | 'doc-markdown' | 'tab-unsaved' | 'tab-underline' | 'resize-separator' | 'resize-handle' | 'variable-token' | 'danger' | 'danger-light' | 'warning' | 'success' | 'info' | 'method-get' | 'method-post' | 'method-put' | 'method-patch' | 'method-delete' | 'method-head' | 'method-options' | 'scrollbar-track' | 'scrollbar-thumb' | 'scrollbar-thumb-hover' | 'scrollbar-thumb-active' | 'script-stage-before-all' | 'script-stage-before-each' | 'script-stage-main' | 'script-stage-after-each' | 'script-stage-after-all' | 'terminal';
911
965
  /**
912
966
  * HarborClient UI metric token ids (typography and geometry).
913
967
  *
@@ -1864,7 +1918,7 @@ export interface UpdateLiveServerInput {
1864
1918
  *
1865
1919
  * Provide `savedId` to start from a persisted config (config optional override),
1866
1920
  * or provide `config` alone for an ad-hoc run. Does not open a browser tab;
1867
- * use {@link PluginContext.webpage} when the `browser` permission is granted.
1921
+ * use {@link PluginContext.livePage} when the `browser` permission is granted.
1868
1922
  */
1869
1923
  export interface StartLiveServerInput {
1870
1924
  /**
@@ -2168,6 +2222,343 @@ export interface PluginLiveServers {
2168
2222
  */
2169
2223
  onRequestLog(listener: (entry: LiveServerRequestLogEntry) => void): Disposable;
2170
2224
  }
2225
+ /**
2226
+ * Page-load points at which a saved website injection script may run.
2227
+ *
2228
+ * Mirrors `@harborclient/core` website script run-at values.
2229
+ */
2230
+ export type WebsiteScriptRunAt = 'document-start' | 'dom-ready' | 'did-finish-load';
2231
+ /**
2232
+ * One plain JavaScript injection script persisted with a website.
2233
+ *
2234
+ * Mirrors `@harborclient/core` website injection script rows.
2235
+ */
2236
+ export interface WebsiteInjectionScript {
2237
+ /**
2238
+ * Stable id within the website's script list.
2239
+ */
2240
+ id: string;
2241
+ /**
2242
+ * Display name shown in browser settings.
2243
+ */
2244
+ name: string;
2245
+ /**
2246
+ * When false, the script is skipped at injection time.
2247
+ */
2248
+ enabled: boolean;
2249
+ /**
2250
+ * Guest lifecycle hook that triggers this script.
2251
+ */
2252
+ runAt: WebsiteScriptRunAt;
2253
+ /**
2254
+ * JavaScript source executed in the page main world.
2255
+ */
2256
+ source: string;
2257
+ }
2258
+ /**
2259
+ * One pre/post request script on a saved website (no path match).
2260
+ *
2261
+ * Mirrors `@harborclient/core` ScriptRef used by live pages.
2262
+ */
2263
+ export interface WebsiteScriptRef {
2264
+ /**
2265
+ * Stable list key used for reordering and React keys.
2266
+ */
2267
+ id: string;
2268
+ /**
2269
+ * When false, the script is skipped.
2270
+ */
2271
+ enabled: boolean;
2272
+ /**
2273
+ * Inline JavaScript source or a live reference to a saved snippet.
2274
+ */
2275
+ kind: 'inline' | 'snippet';
2276
+ /**
2277
+ * Optional display label for inline scripts.
2278
+ */
2279
+ name?: string;
2280
+ /**
2281
+ * JavaScript source when {@link kind} is `inline`.
2282
+ */
2283
+ code?: string;
2284
+ /**
2285
+ * Snippet uuid when {@link kind} is `snippet`.
2286
+ */
2287
+ snippetUuid?: string;
2288
+ /**
2289
+ * When true, the script editor body is expanded in the list UI.
2290
+ */
2291
+ expanded?: boolean;
2292
+ /**
2293
+ * Stage within a request stage list. Live pages coerce this to `main`.
2294
+ */
2295
+ stage?: ScriptStage;
2296
+ }
2297
+ /**
2298
+ * Authorization stored on a saved website (includes OAuth 2.0 fields for parity with core).
2299
+ *
2300
+ * Mirrors `@harborclient/core` AuthConfig used by {@link Website}.
2301
+ */
2302
+ export interface WebsiteAuthConfig {
2303
+ /**
2304
+ * Selected auth mode; none means no chrome-driven auth header.
2305
+ */
2306
+ type: 'none' | 'basic' | 'bearer' | 'oauth2';
2307
+ /**
2308
+ * Username and password for Basic Auth.
2309
+ */
2310
+ basic: {
2311
+ username: string;
2312
+ password: string;
2313
+ };
2314
+ /**
2315
+ * Token value for Bearer Token auth.
2316
+ */
2317
+ bearer: {
2318
+ token: string;
2319
+ };
2320
+ /**
2321
+ * OAuth 2.0 Client Credentials settings (not applied to guest navigations today).
2322
+ */
2323
+ oauth2: {
2324
+ tokenUrl: string;
2325
+ clientId: string;
2326
+ clientSecret: string;
2327
+ scope: string;
2328
+ audience: string;
2329
+ clientAuth: 'body' | 'header';
2330
+ };
2331
+ }
2332
+ /**
2333
+ * A saved embedded-browser website (live page) in the local registry.
2334
+ *
2335
+ * Mirrors `@harborclient/core` Website entity shape.
2336
+ */
2337
+ export interface Website {
2338
+ /**
2339
+ * Database primary key.
2340
+ */
2341
+ id: number;
2342
+ /**
2343
+ * Stable portable identifier for export/import.
2344
+ */
2345
+ uuid: string;
2346
+ /**
2347
+ * Display name shown in the sidebar (last page title).
2348
+ */
2349
+ name: string;
2350
+ /**
2351
+ * Last committed URL when the website was saved.
2352
+ */
2353
+ url: string;
2354
+ /**
2355
+ * Home URL for the browser Home button.
2356
+ */
2357
+ homeUrl: string;
2358
+ /**
2359
+ * Favicon as a data URL when available.
2360
+ */
2361
+ faviconDataUrl: string | null;
2362
+ /**
2363
+ * Applied injection scripts.
2364
+ */
2365
+ scripts: WebsiteInjectionScript[];
2366
+ /**
2367
+ * Applied pre-request hc.* scripts.
2368
+ */
2369
+ preRequestScripts: WebsiteScriptRef[];
2370
+ /**
2371
+ * Applied post-request hc.* scripts.
2372
+ */
2373
+ postRequestScripts: WebsiteScriptRef[];
2374
+ /**
2375
+ * Website-scoped variables for address-bar and script substitution.
2376
+ */
2377
+ variables: Variable[];
2378
+ /**
2379
+ * Headers sent with chrome-driven guest navigations.
2380
+ */
2381
+ headers: KeyValue[];
2382
+ /**
2383
+ * User-Agent override for chrome-driven navigations; empty uses Chromium default.
2384
+ */
2385
+ userAgent: string;
2386
+ /**
2387
+ * Authorization applied to chrome-driven guest navigations (Basic/Bearer).
2388
+ */
2389
+ auth: WebsiteAuthConfig;
2390
+ /**
2391
+ * Id of the storage connection that stores this live page.
2392
+ *
2393
+ * Omitted for provider-local records before RoutingStorage merges registry metadata.
2394
+ */
2395
+ connectionId?: string;
2396
+ /**
2397
+ * Creation timestamp in milliseconds since epoch.
2398
+ */
2399
+ createdAt: number;
2400
+ /**
2401
+ * Last update timestamp in milliseconds since epoch.
2402
+ */
2403
+ updatedAt: number;
2404
+ }
2405
+ /**
2406
+ * Input for creating a website in the local registry.
2407
+ *
2408
+ * Mirrors `@harborclient/core` CreateWebsiteInput.
2409
+ */
2410
+ export interface CreateWebsiteInput {
2411
+ /**
2412
+ * Display name for the website.
2413
+ */
2414
+ name: string;
2415
+ /**
2416
+ * Optional portable uuid; generated when omitted.
2417
+ */
2418
+ uuid?: string;
2419
+ /**
2420
+ * Optional storage connection id; defaults to the active data provider when omitted.
2421
+ */
2422
+ connectionId?: string;
2423
+ /**
2424
+ * Last committed URL.
2425
+ */
2426
+ url: string;
2427
+ /**
2428
+ * Home URL for the browser Home button.
2429
+ */
2430
+ homeUrl: string;
2431
+ /**
2432
+ * Optional favicon data URL.
2433
+ */
2434
+ faviconDataUrl?: string | null;
2435
+ /**
2436
+ * Injection scripts to persist.
2437
+ */
2438
+ scripts?: WebsiteInjectionScript[];
2439
+ /**
2440
+ * Pre-request hc.* scripts to persist.
2441
+ */
2442
+ preRequestScripts?: WebsiteScriptRef[];
2443
+ /**
2444
+ * Post-request hc.* scripts to persist.
2445
+ */
2446
+ postRequestScripts?: WebsiteScriptRef[];
2447
+ /**
2448
+ * Website-scoped variables to persist.
2449
+ */
2450
+ variables?: Variable[];
2451
+ /**
2452
+ * Headers to persist for chrome-driven navigations.
2453
+ */
2454
+ headers?: KeyValue[];
2455
+ /**
2456
+ * User-Agent override to persist; empty uses Chromium default.
2457
+ */
2458
+ userAgent?: string;
2459
+ /**
2460
+ * Authorization settings to persist.
2461
+ */
2462
+ auth?: WebsiteAuthConfig;
2463
+ }
2464
+ /**
2465
+ * Input for updating a website in the local registry.
2466
+ *
2467
+ * Mirrors `@harborclient/core` UpdateWebsiteInput.
2468
+ */
2469
+ export interface UpdateWebsiteInput {
2470
+ /**
2471
+ * Database primary key of the website to update.
2472
+ */
2473
+ id: number;
2474
+ /**
2475
+ * Display name for the website.
2476
+ */
2477
+ name: string;
2478
+ /**
2479
+ * Last committed URL.
2480
+ */
2481
+ url: string;
2482
+ /**
2483
+ * Home URL for the browser Home button.
2484
+ */
2485
+ homeUrl: string;
2486
+ /**
2487
+ * Optional favicon data URL.
2488
+ */
2489
+ faviconDataUrl?: string | null;
2490
+ /**
2491
+ * Injection scripts to persist.
2492
+ */
2493
+ scripts: WebsiteInjectionScript[];
2494
+ /**
2495
+ * Pre-request hc.* scripts to persist.
2496
+ */
2497
+ preRequestScripts: WebsiteScriptRef[];
2498
+ /**
2499
+ * Post-request hc.* scripts to persist.
2500
+ */
2501
+ postRequestScripts: WebsiteScriptRef[];
2502
+ /**
2503
+ * Website-scoped variables to persist.
2504
+ */
2505
+ variables: Variable[];
2506
+ /**
2507
+ * Headers to persist for chrome-driven navigations.
2508
+ */
2509
+ headers: KeyValue[];
2510
+ /**
2511
+ * User-Agent override to persist; empty uses Chromium default.
2512
+ */
2513
+ userAgent: string;
2514
+ /**
2515
+ * Authorization settings to persist.
2516
+ */
2517
+ auth: WebsiteAuthConfig;
2518
+ }
2519
+ /**
2520
+ * Saved live page (website) APIs available on {@link PluginContext.livePages}.
2521
+ *
2522
+ * Requires the `live-pages` permission. Mutations update the registry only; they do
2523
+ * not open or bind a browser tab.
2524
+ */
2525
+ export interface PluginLivePages {
2526
+ /**
2527
+ * Lists all saved live pages from the local registry.
2528
+ *
2529
+ * @returns Saved website rows.
2530
+ */
2531
+ list(): Promise<Website[]>;
2532
+ /**
2533
+ * Returns one saved live page by database id or uuid.
2534
+ *
2535
+ * @param idOrUuid - Numeric id or uuid string.
2536
+ * @returns The saved website, or null when not found.
2537
+ */
2538
+ get(idOrUuid: number | string): Promise<Website | null>;
2539
+ /**
2540
+ * Creates a saved live page and returns the new row.
2541
+ *
2542
+ * @param input - Name, URLs, and optional scripts/headers/auth/variables.
2543
+ * @returns The created saved website.
2544
+ */
2545
+ create(input: CreateWebsiteInput): Promise<Website>;
2546
+ /**
2547
+ * Updates a saved live page and returns the refreshed row.
2548
+ *
2549
+ * Does not open or bind a browser tab.
2550
+ *
2551
+ * @param input - Full update payload including id.
2552
+ * @returns The updated saved website.
2553
+ */
2554
+ update(input: UpdateWebsiteInput): Promise<Website>;
2555
+ /**
2556
+ * Deletes a saved live page (moves it to trash).
2557
+ *
2558
+ * @param id - Database primary key.
2559
+ */
2560
+ delete(id: number): Promise<void>;
2561
+ }
2171
2562
  /**
2172
2563
  * Config for {@link PluginAi.registerChatPointer}.
2173
2564
  */
@@ -2218,11 +2609,11 @@ export interface PluginCopyToChatInput {
2218
2609
  };
2219
2610
  }
2220
2611
  /**
2221
- * Live DOM helpers on a webpage handle from {@link PluginContext.webpage}.
2612
+ * Live DOM helpers on a live-page handle from {@link PluginContext.livePage}.
2222
2613
  *
2223
2614
  * Requires the `browser` permission.
2224
2615
  */
2225
- export interface PluginWebpageDom {
2616
+ export interface PluginLivePageDom {
2226
2617
  /**
2227
2618
  * Queries the live page DOM with a CSS selector.
2228
2619
  *
@@ -2261,17 +2652,29 @@ export interface PluginWebpageDom {
2261
2652
  injectStylesheet(css: string): Promise<string>;
2262
2653
  }
2263
2654
  /**
2264
- * Handle returned by {@link PluginContext.webpage} for an embedded browser tab.
2655
+ * Handle returned by {@link PluginContext.livePage} for an embedded browser tab.
2265
2656
  *
2266
- * Requires the `browser` permission. Same semantics as request-script `hc.webpage`.
2657
+ * Requires the `browser` permission. Same semantics as request-script `hc.livePage`.
2267
2658
  */
2268
- export interface PluginWebpageHandle {
2659
+ export interface PluginLivePageHandle {
2269
2660
  readonly tabId: string;
2270
- readonly url: string;
2271
- readonly title: string;
2272
- readonly canGoBack: boolean;
2273
- readonly canGoForward: boolean;
2274
- readonly dom: PluginWebpageDom;
2661
+ /**
2662
+ * Current page URL. Updated after navigate / goBack / goForward / reload.
2663
+ */
2664
+ url: string;
2665
+ /**
2666
+ * Document title. Updated after navigate / goBack / goForward / reload.
2667
+ */
2668
+ title: string;
2669
+ /**
2670
+ * Whether history can go back. Updated after navigation helpers.
2671
+ */
2672
+ canGoBack: boolean;
2673
+ /**
2674
+ * Whether history can go forward. Updated after navigation helpers.
2675
+ */
2676
+ canGoForward: boolean;
2677
+ readonly dom: PluginLivePageDom;
2275
2678
  /**
2276
2679
  * Focuses this browser tab in the tab bar.
2277
2680
  */
@@ -2280,6 +2683,36 @@ export interface PluginWebpageHandle {
2280
2683
  * Closes this browser tab. Returns false when the user cancels a leave prompt.
2281
2684
  */
2282
2685
  close(): Promise<boolean>;
2686
+ /**
2687
+ * Navigates history back one entry and waits for load.
2688
+ *
2689
+ * Updates {@link PluginLivePageHandle.url}, {@link PluginLivePageHandle.title},
2690
+ * {@link PluginLivePageHandle.canGoBack}, and {@link PluginLivePageHandle.canGoForward}.
2691
+ */
2692
+ goBack(): Promise<void>;
2693
+ /**
2694
+ * Navigates history forward one entry and waits for load.
2695
+ *
2696
+ * Updates {@link PluginLivePageHandle.url}, {@link PluginLivePageHandle.title},
2697
+ * {@link PluginLivePageHandle.canGoBack}, and {@link PluginLivePageHandle.canGoForward}.
2698
+ */
2699
+ goForward(): Promise<void>;
2700
+ /**
2701
+ * Reloads the current page and waits for load.
2702
+ *
2703
+ * Updates {@link PluginLivePageHandle.url}, {@link PluginLivePageHandle.title},
2704
+ * {@link PluginLivePageHandle.canGoBack}, and {@link PluginLivePageHandle.canGoForward}.
2705
+ */
2706
+ reload(): Promise<void>;
2707
+ /**
2708
+ * Loads a URL in this tab and waits for load.
2709
+ *
2710
+ * Updates {@link PluginLivePageHandle.url}, {@link PluginLivePageHandle.title},
2711
+ * {@link PluginLivePageHandle.canGoBack}, and {@link PluginLivePageHandle.canGoForward}.
2712
+ *
2713
+ * @param url - Absolute http(s) or about:blank URL.
2714
+ */
2715
+ navigate(url: string): Promise<void>;
2283
2716
  /**
2284
2717
  * Captures the visible viewport as PNG and writes it under an allowlisted path.
2285
2718
  *
@@ -2582,6 +3015,16 @@ export interface PluginUi {
2582
3015
  * @returns A {@link Disposable} that unregisters the action when disposed.
2583
3016
  */
2584
3017
  registerRequestToolbarAction(action: RequestToolbarActionContribution): Disposable;
3018
+ /**
3019
+ * Adds a RoundButton to the embedded browser chrome bar.
3020
+ *
3021
+ * Manifest: `contributes.livePageChromeActions` plus a matching `contributes.commands` entry.
3022
+ * The command handler receives a {@link LivePageChromeActionContext} argument.
3023
+ *
3024
+ * @param action - Live-page chrome action contribution.
3025
+ * @returns A {@link Disposable} that unregisters the action when disposed.
3026
+ */
3027
+ registerLivePageChromeAction(action: LivePageChromeActionContribution): Disposable;
2585
3028
  /**
2586
3029
  * Adds an icon button to each script row in the pre/post request script editor.
2587
3030
  *
@@ -4027,6 +4470,10 @@ export interface PluginContext {
4027
4470
  * permission.
4028
4471
  */
4029
4472
  liveServers: PluginLiveServers;
4473
+ /**
4474
+ * Saved live page (website) CRUD. Requires the `live-pages` permission.
4475
+ */
4476
+ livePages: PluginLivePages;
4030
4477
  /**
4031
4478
  * AI chat pointer registration and copy-to-chat. Requires the `ai` permission.
4032
4479
  */
@@ -4035,16 +4482,16 @@ export interface PluginContext {
4035
4482
  * Opens or reuses an embedded browser tab and returns a control handle.
4036
4483
  *
4037
4484
  * Requires the `browser` permission (granted at install/enable). Same call shape
4038
- * as request-script `hc.webpage`: omit `url` to bind the active browser tab;
4485
+ * as request-script `hc.livePage`: omit `url` to bind the active browser tab;
4039
4486
  * `{ reuse }` defaults to true; new tabs wait for load.
4040
4487
  *
4041
4488
  * @param url - Optional URL to open or reuse.
4042
4489
  * @param options - Optional `{ reuse }` (default true).
4043
4490
  * @returns Handle with `focus` / `close` and `dom` helpers.
4044
4491
  */
4045
- webpage(url?: string, options?: {
4492
+ livePage(url?: string, options?: {
4046
4493
  reuse?: boolean;
4047
- }): Promise<PluginWebpageHandle>;
4494
+ }): Promise<PluginLivePageHandle>;
4048
4495
  /**
4049
4496
  * Host-managed disposable list used for registration cleanup on deactivation.
4050
4497
  *