@qontinui/ui-bridge 0.17.0 → 0.19.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.
Files changed (108) hide show
  1. package/dist/ai/index.d.mts +5 -5
  2. package/dist/ai/index.d.ts +5 -5
  3. package/dist/artifacts/index.d.mts +6 -6
  4. package/dist/artifacts/index.d.ts +6 -6
  5. package/dist/{assertions-Cuf-hvNa.d.ts → assertions-DwPKlu6v.d.ts} +1 -1
  6. package/dist/{assertions-C-uxQGa8.d.mts → assertions-j3SVwQrW.d.mts} +1 -1
  7. package/dist/{browser-capture-9-HEYLK-.d.ts → browser-capture-CDRUbuDp.d.ts} +1 -1
  8. package/dist/{browser-capture-CrytvSDO.d.mts → browser-capture-CRVnwBE4.d.mts} +1 -1
  9. package/dist/{change-observer-CBfJ5biX.d.mts → change-observer-BPtZll6d.d.mts} +1 -1
  10. package/dist/{change-observer-DRBa79aK.d.ts → change-observer-D0aEcwCl.d.ts} +1 -1
  11. package/dist/contracts/index.d.mts +5 -5
  12. package/dist/contracts/index.d.ts +5 -5
  13. package/dist/control/index.d.mts +4 -4
  14. package/dist/control/index.d.ts +4 -4
  15. package/dist/core/index.d.mts +9 -9
  16. package/dist/core/index.d.ts +9 -9
  17. package/dist/ctr/index.d.mts +4 -4
  18. package/dist/ctr/index.d.ts +4 -4
  19. package/dist/ctr/migrate.d.mts +3 -3
  20. package/dist/ctr/migrate.d.ts +3 -3
  21. package/dist/debug/index.d.mts +6 -6
  22. package/dist/debug/index.d.ts +6 -6
  23. package/dist/{drag-drop-detector-CXlhwPb7.d.mts → drag-drop-detector-Baq_Ixcc.d.mts} +1 -1
  24. package/dist/{drag-drop-detector-B8j1bMWp.d.ts → drag-drop-detector-gMHP_QIg.d.ts} +1 -1
  25. package/dist/{effect-store-Cp6Kb2-X.d.ts → effect-store-C0YCNUMx.d.ts} +1 -1
  26. package/dist/{effect-store-C7l209DQ.d.mts → effect-store-CATaXg5u.d.mts} +1 -1
  27. package/dist/{error-snapshot-DCr4oUYq.d.mts → error-snapshot-CmaQu6Ox.d.mts} +1 -1
  28. package/dist/{error-snapshot-owQQTv8i.d.ts → error-snapshot-DENlqCYO.d.ts} +1 -1
  29. package/dist/{find-B4dTGeqA.d.mts → find-A7hwZli6.d.mts} +1 -1
  30. package/dist/{find-DWZC8yoa.d.ts → find-DpPytcRP.d.ts} +1 -1
  31. package/dist/index.d.mts +20 -20
  32. package/dist/index.d.ts +20 -20
  33. package/dist/index.js +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/injected/bundle.global.js +1 -1
  36. package/dist/injected/index.d.mts +1 -1
  37. package/dist/injected/index.d.ts +1 -1
  38. package/dist/{metrics-Bz_3-pCs.d.mts → metrics-Bqs3Guh-.d.mts} +1 -1
  39. package/dist/{metrics-Dc2AV4Dr.d.ts → metrics-CnWC5_lF.d.ts} +1 -1
  40. package/dist/{migrate-specs-to-ctr-Dem0JPuu.d.ts → migrate-specs-to-ctr-BdcTdvZZ.d.ts} +2 -2
  41. package/dist/{migrate-specs-to-ctr-CUWHsCz-.d.mts → migrate-specs-to-ctr-KlH3DlnN.d.mts} +2 -2
  42. package/dist/{nextjs-CF71sn2M.d.ts → nextjs-BLvmgmnW.d.ts} +2 -2
  43. package/dist/{nextjs-CkNdxAF9.d.mts → nextjs-qQe7vyS4.d.mts} +2 -2
  44. package/dist/react/index.d.mts +4 -4
  45. package/dist/react/index.d.ts +4 -4
  46. package/dist/react/index.js +1 -1
  47. package/dist/react/index.mjs +1 -1
  48. package/dist/render-log/index.d.mts +1 -1
  49. package/dist/render-log/index.d.ts +1 -1
  50. package/dist/server/express.d.mts +7 -7
  51. package/dist/server/express.d.ts +7 -7
  52. package/dist/server/express.js +5 -0
  53. package/dist/server/express.js.map +1 -1
  54. package/dist/server/express.mjs +5 -0
  55. package/dist/server/express.mjs.map +1 -1
  56. package/dist/server/handlers.d.mts +9 -9
  57. package/dist/server/handlers.d.ts +9 -9
  58. package/dist/server/handlers.js +6 -0
  59. package/dist/server/handlers.js.map +1 -1
  60. package/dist/server/handlers.mjs +6 -0
  61. package/dist/server/handlers.mjs.map +1 -1
  62. package/dist/server/index.d.mts +101 -18
  63. package/dist/server/index.d.ts +101 -18
  64. package/dist/server/index.js +35 -1
  65. package/dist/server/index.js.map +1 -1
  66. package/dist/server/index.mjs +35 -2
  67. package/dist/server/index.mjs.map +1 -1
  68. package/dist/server/nextjs.d.mts +8 -8
  69. package/dist/server/nextjs.d.ts +8 -8
  70. package/dist/server/nextjs.js +13 -1
  71. package/dist/server/nextjs.js.map +1 -1
  72. package/dist/server/nextjs.mjs +13 -1
  73. package/dist/server/nextjs.mjs.map +1 -1
  74. package/dist/server/standalone.d.mts +9 -9
  75. package/dist/server/standalone.d.ts +9 -9
  76. package/dist/server/standalone.js +5 -0
  77. package/dist/server/standalone.js.map +1 -1
  78. package/dist/server/standalone.mjs +5 -0
  79. package/dist/server/standalone.mjs.map +1 -1
  80. package/dist/specs/index.d.mts +10 -10
  81. package/dist/specs/index.d.ts +10 -10
  82. package/dist/{sse-handler-CpB3bJ2N.d.mts → sse-handler-BE5cyXF7.d.mts} +1 -1
  83. package/dist/{sse-handler-BpZ9QtRm.d.ts → sse-handler-Bw_4h2AN.d.ts} +1 -1
  84. package/dist/{standalone-C_knSpNG.d.ts → standalone-SkUUJ8sc.d.ts} +4 -4
  85. package/dist/{standalone-CY0Uj5LQ.d.mts → standalone-u-N_N3Wl.d.mts} +4 -4
  86. package/dist/{store-Bv5wJ91r.d.mts → store-BHzSGFU2.d.mts} +1 -1
  87. package/dist/{store-BjSi35SI.d.ts → store-DH3LUEjx.d.ts} +1 -1
  88. package/dist/{style-types-mvMAEeSI.d.mts → style-types-CtwPR05K.d.mts} +1 -1
  89. package/dist/{style-types-De_9GaYG.d.ts → style-types-lmRdKbT8.d.ts} +1 -1
  90. package/dist/{types-BUCPM1o1.d.mts → types-CB7QpT8R.d.mts} +3 -3
  91. package/dist/{types-IQUAZlE2.d.mts → types-CgsWB31c.d.mts} +1 -1
  92. package/dist/{types-zS11cuej.d.ts → types-Chf3cfrT.d.ts} +12 -0
  93. package/dist/{types-C6ix-zFE.d.ts → types-CovPz-sh.d.ts} +1 -1
  94. package/dist/{types-Bubo62kN.d.mts → types-DNc31VlO.d.mts} +80 -7
  95. package/dist/{types-vftd8HsR.d.ts → types-DgIxG1sS.d.ts} +1 -1
  96. package/dist/{types-Bz40rWAT.d.ts → types-DhJE_FQX.d.ts} +3 -3
  97. package/dist/{types-DUVvn3yt.d.ts → types-DmMT2yMs.d.ts} +80 -7
  98. package/dist/{types-D1UiLr75.d.mts → types-DnqZodFb.d.mts} +12 -0
  99. package/dist/{types-cfwRCpgn.d.ts → types-bG3xLcjL.d.ts} +1 -1
  100. package/dist/{types-q-2aMSnI.d.mts → types-cQzKFRd5.d.mts} +1 -1
  101. package/dist/{types-BYhYroLP.d.mts → types-gusNHeJt.d.mts} +1 -1
  102. package/dist/verification-layers/index.d.mts +5 -5
  103. package/dist/verification-layers/index.d.ts +5 -5
  104. package/dist/{websocket-client-Bmt4YNSR.d.ts → websocket-client-BEtd7_GO.d.ts} +1 -1
  105. package/dist/{websocket-client-B_W7ZvT0.d.mts → websocket-client-CDRMdZdU.d.mts} +1 -1
  106. package/dist/{ws-streaming-DGiomqt_.d.mts → ws-streaming-BzumSnWw.d.mts} +1 -1
  107. package/dist/{ws-streaming-D_tat1kF.d.ts → ws-streaming-DweATXes.d.ts} +1 -1
  108. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
- import { a as UIBridgeServerHandlers } from '../types-Bubo62kN.mjs';
2
- export { A as APIResponse, B as BrowserEventsResponse, C as CORSOptions, b as CapabilitiesResponse, c as ControlBatchRequest, d as ControlBatchResponse, e as ControlBatchStep, f as ControlBatchStepResult, D as DOMChangeEvent, E as ElementConditionSelector, g as ElementExpectRequest, h as ElementExpectResponse, i as EndpointCategory, j as EndpointInfo, H as HandlerContext, I as INTERACTION_RELAY_COMMAND_ACTIONS, k as InteractionRelayCommandAction, R as RateLimitOptions, l as RenderLogQuery, m as RouteDefinition, S as SpawnHeadlessRequest, n as SpawnHeadlessResponse, o as StateSummary, U as UIBridgeServerConfig, p as UI_BRIDGE_ROUTES, q as WaitForElementByConditionRequest, r as WaitForElementByConditionResponse, s as WaitForElementPredicate, t as WaitForElementRequest, u as WaitForElementSuccessResponse, v as WaitForRouteChangeRequest, w as WaitForRouteChangeResponse, W as WebSocketMessage, x as WebSocketMessageType } from '../types-Bubo62kN.mjs';
1
+ import { a as UIBridgeServerHandlers, H as HandlerContext } from '../types-DNc31VlO.mjs';
2
+ export { A as APIResponse, B as BrowserEventsResponse, C as CORSOptions, b as CapabilitiesResponse, c as ControlBatchRequest, d as ControlBatchResponse, e as ControlBatchStep, f as ControlBatchStepResult, D as DOMChangeEvent, E as ElementConditionSelector, g as ElementExpectRequest, h as ElementExpectResponse, i as EndpointCategory, j as EndpointInfo, I as INTERACTION_RELAY_COMMAND_ACTIONS, k as InteractionRelayCommandAction, P as PageEvaluateRequest, R as RateLimitOptions, l as RenderLogQuery, m as RouteDefinition, n as RunnerWindow, o as RunnerWindowsList, S as SpawnHeadlessRequest, p as SpawnHeadlessResponse, q as StateSummary, U as UIBridgeServerConfig, r as UI_BRIDGE_ROUTES, s as WaitForElementByConditionRequest, t as WaitForElementByConditionResponse, u as WaitForElementPredicate, v as WaitForElementRequest, w as WaitForElementSuccessResponse, x as WaitForRouteChangeRequest, y as WaitForRouteChangeResponse, W as WebSocketMessage, z as WebSocketMessageType } from '../types-DNc31VlO.mjs';
3
3
  export { ActionExecutorLike, CreateHandlersConfig, RegistryLike, closeAllSpawnedHeadlessTabs, createAIHandlers, createHandlers } from './handlers.mjs';
4
4
  export { ExpressAdapterConfig, createExpressApp, createExpressRouter, uiBridgeMiddleware } from './express.mjs';
5
- import { C as CommandRelay } from '../nextjs-CkNdxAF9.mjs';
6
- export { a as CommandListener, b as CommandRelayOptions, N as NextJSAdapterConfig, c as NextRouteHandler, P as PendingCommand, Q as QueuedCommand, R as RedisRelayBus, d as RelayBus, e as RelayCommandEnvelope, f as RelayResponseEnvelope, T as TabInfo, g as TabListener, h as TabRoutingError, i as TransportDiagnostics, W as WebSocketClient, j as createControlHandlers, k as createDebugHandlers, l as createNextRouteHandlers, m as createRedisRelayBus, n as createRenderLogHandlers, o as createUIBridgeHandler } from '../nextjs-CkNdxAF9.mjs';
7
- import { U as UIBridgeWSHandler } from '../standalone-CY0Uj5LQ.mjs';
8
- export { S as StandaloneServer, a as StandaloneServerConfig, W as WebSocketLike, c as createStandaloneServer, s as startCLI } from '../standalone-CY0Uj5LQ.mjs';
9
- import { e as BridgeEvent, i as AnyCapturedEvent } from '../types-D1UiLr75.mjs';
10
- import { B as BrowserEventStream, S as StreamSubscription } from '../ws-streaming-DGiomqt_.mjs';
11
- export { S as SSEManager } from '../sse-handler-CpB3bJ2N.mjs';
5
+ import { C as CommandRelay } from '../nextjs-qQe7vyS4.mjs';
6
+ export { a as CommandListener, b as CommandRelayOptions, N as NextJSAdapterConfig, c as NextRouteHandler, P as PendingCommand, Q as QueuedCommand, R as RedisRelayBus, d as RelayBus, e as RelayCommandEnvelope, f as RelayResponseEnvelope, T as TabInfo, g as TabListener, h as TabRoutingError, i as TransportDiagnostics, W as WebSocketClient, j as createControlHandlers, k as createDebugHandlers, l as createNextRouteHandlers, m as createRedisRelayBus, n as createRenderLogHandlers, o as createUIBridgeHandler } from '../nextjs-qQe7vyS4.mjs';
7
+ import { U as UIBridgeWSHandler } from '../standalone-u-N_N3Wl.mjs';
8
+ export { S as StandaloneServer, a as StandaloneServerConfig, W as WebSocketLike, c as createStandaloneServer, s as startCLI } from '../standalone-u-N_N3Wl.mjs';
9
+ import { e as BridgeEvent, i as AnyCapturedEvent, Q as ControlActionRequest } from '../types-DnqZodFb.mjs';
10
+ import { B as BrowserEventStream, S as StreamSubscription } from '../ws-streaming-BzumSnWw.mjs';
11
+ export { S as SSEManager } from '../sse-handler-BE5cyXF7.mjs';
12
12
  import '../codes.generated-CXeSH-M4.mjs';
13
13
  import '../types-dIjjX5Mf.mjs';
14
14
  import '../tracker-ChLmf8-u.mjs';
15
- import '../effect-store-C7l209DQ.mjs';
15
+ import '../effect-store-CATaXg5u.mjs';
16
16
  import '../render-log/index.mjs';
17
- import '../find-B4dTGeqA.mjs';
18
- import '../style-types-mvMAEeSI.mjs';
17
+ import '../find-A7hwZli6.mjs';
18
+ import '../style-types-CtwPR05K.mjs';
19
19
  import '../types-C7D5seeQ.mjs';
20
- import '../error-snapshot-DCr4oUYq.mjs';
21
- import '../store-Bv5wJ91r.mjs';
22
- import '../types-BYhYroLP.mjs';
20
+ import '../error-snapshot-CmaQu6Ox.mjs';
21
+ import '../store-BHzSGFU2.mjs';
22
+ import '../types-gusNHeJt.mjs';
23
23
  import '../navigation-adapter-D0eod-Ve.mjs';
24
- import '../drag-drop-detector-CXlhwPb7.mjs';
24
+ import '../drag-drop-detector-Baq_Ixcc.mjs';
25
25
  import '../annotations/index.mjs';
26
26
  import 'express';
27
- import '../change-observer-CBfJ5biX.mjs';
27
+ import '../change-observer-BPtZll6d.mjs';
28
28
 
29
29
  interface WSStreamAdapterConfig {
30
30
  /** Minimum severity to forward (default: 'warning') */
@@ -178,6 +178,89 @@ interface RelayHandlersOptions {
178
178
  */
179
179
  declare function createRelayHandlers(relay: CommandRelay, options?: RelayHandlersOptions): UIBridgeServerHandlers;
180
180
 
181
+ /**
182
+ * Window-scoped client facade (plan 2026-06-07-multi-window-sdk-automation,
183
+ * Phase 3).
184
+ *
185
+ * `windowScope(bridge, 'term-2')` pre-binds the window-targetable SDK methods to
186
+ * a single runner pop-out window, so a caller driving one window doesn't repeat
187
+ * (and can't typo) `windowLabel` on every call:
188
+ *
189
+ * ```ts
190
+ * const term = windowScope(handlers, 'term-2');
191
+ * await term.evaluate({ expression: 'document.title' });
192
+ * await term.getElements({ text: 'Save' });
193
+ * await term.executeAction('btn-save', { action: 'click' });
194
+ * ```
195
+ *
196
+ * It is pure sugar over the Phase-1 per-call `windowLabel` option — ONE code
197
+ * path. `windowScope(bridge, label).evaluate(req)` is exactly
198
+ * `bridge.pageEvaluate({ ...req, windowLabel: label })`, so there is no
199
+ * divergent behavior to reason about, and not using the scope (or passing a
200
+ * label of `'main'`) is byte-identical to a bare call. Only the window-
201
+ * targetable methods are exposed — you cannot call a non-targetable method on a
202
+ * window scope and get a silent no-op.
203
+ *
204
+ * The read/convenience family (`readValue`/`typeInto`/`clickByText`/
205
+ * `clickBySelector`/`findByText`) is included as of Phase 4 — the runner now
206
+ * honors `windowLabel` (read from the body) on those routes, so scoping them is
207
+ * honest end-to-end.
208
+ */
209
+
210
+ /** Options accepted by `getElements`, minus the now-implicit `windowLabel`. */
211
+ type ScopedGetElementsOptions = Omit<NonNullable<Parameters<UIBridgeServerHandlers['getElements']>[0]>, 'windowLabel'>;
212
+ /**
213
+ * Args for a scoped `evaluate` — the JS expression plus any extra body fields,
214
+ * minus the now-implicit `windowLabel`. Spelled out rather than
215
+ * `Omit<PageEvaluateRequest, 'windowLabel'>` because `PageEvaluateRequest`'s
216
+ * index signature defeats `Omit` (it would drop the required `expression`).
217
+ */
218
+ type ScopedEvaluateRequest = {
219
+ expression: string;
220
+ [key: string]: unknown;
221
+ };
222
+ /**
223
+ * The window-targetable subset of the SDK, pre-bound to one runner window.
224
+ * Returned by {@link windowScope}.
225
+ */
226
+ interface WindowScopedBridge {
227
+ /** The window label every call on this scope targets. */
228
+ readonly windowLabel: string;
229
+ /**
230
+ * Evaluate a JS expression in the bound window. Delegates to `pageEvaluate`
231
+ * with `windowLabel` injected.
232
+ */
233
+ evaluate(request: ScopedEvaluateRequest, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['pageEvaluate']>;
234
+ /**
235
+ * Snapshot elements from the bound window. Delegates to `getElements` with
236
+ * `windowLabel` injected.
237
+ */
238
+ getElements(options?: ScopedGetElementsOptions, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['getElements']>;
239
+ /**
240
+ * Execute an action on an element in the bound window. Delegates to
241
+ * `executeElementAction` with `windowLabel` injected.
242
+ */
243
+ executeAction(id: string, request: Omit<ControlActionRequest, 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['executeElementAction']>;
244
+ /** Read an element's value in the bound window. Delegates to `readValue`. */
245
+ readValue(request: Omit<Parameters<UIBridgeServerHandlers['readValue']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['readValue']>;
246
+ /** Type text into an element in the bound window. Delegates to `typeInto`. */
247
+ typeInto(request: Omit<Parameters<UIBridgeServerHandlers['typeInto']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['typeInto']>;
248
+ /** Click an element by visible text in the bound window. Delegates to `clickByText`. */
249
+ clickByText(request: Omit<Parameters<UIBridgeServerHandlers['clickByText']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['clickByText']>;
250
+ /** Click an element by CSS selector in the bound window. Delegates to `clickBySelector`. */
251
+ clickBySelector(request: Omit<Parameters<UIBridgeServerHandlers['clickBySelector']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['clickBySelector']>;
252
+ /** Find elements by visible text in the bound window. Delegates to `findByText`. */
253
+ findByText(request: Omit<Parameters<UIBridgeServerHandlers['findByText']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['findByText']>;
254
+ }
255
+ /**
256
+ * Pre-bind the window-targetable methods of a `UIBridgeServerHandlers` to a
257
+ * single runner window. See the module docs for the contract.
258
+ *
259
+ * @param handlers - the bridge handlers (e.g. from `createRelayHandlers`).
260
+ * @param windowLabel - the target window's label (discover via `listWindows()`).
261
+ */
262
+ declare function windowScope(handlers: UIBridgeServerHandlers, windowLabel: string): WindowScopedBridge;
263
+
181
264
  /**
182
265
  * Chrome DevTools Protocol Tab Discovery
183
266
  *
@@ -309,4 +392,4 @@ interface ElementSelector {
309
392
  */
310
393
  declare function matchesElementSelector(el: MatchableElement, selector: ElementSelector): boolean;
311
394
 
312
- export { CDPTabDiscovery, type CDPTabsConfig, type CDPTarget, CommandRelay, type ElementSelector, type MatchableElement, type RelayHandlersOptions, UIBridgeServerHandlers, UIBridgeWSHandler, WSStreamAdapter, type WSStreamAdapterConfig, createRelayHandlers, createWSStreamBroadcast, matchesElementSelector };
395
+ export { CDPTabDiscovery, type CDPTabsConfig, type CDPTarget, CommandRelay, type ElementSelector, HandlerContext, type MatchableElement, type RelayHandlersOptions, UIBridgeServerHandlers, UIBridgeWSHandler, WSStreamAdapter, type WSStreamAdapterConfig, type WindowScopedBridge, createRelayHandlers, createWSStreamBroadcast, matchesElementSelector, windowScope };
@@ -1,30 +1,30 @@
1
- import { a as UIBridgeServerHandlers } from '../types-DUVvn3yt.js';
2
- export { A as APIResponse, B as BrowserEventsResponse, C as CORSOptions, b as CapabilitiesResponse, c as ControlBatchRequest, d as ControlBatchResponse, e as ControlBatchStep, f as ControlBatchStepResult, D as DOMChangeEvent, E as ElementConditionSelector, g as ElementExpectRequest, h as ElementExpectResponse, i as EndpointCategory, j as EndpointInfo, H as HandlerContext, I as INTERACTION_RELAY_COMMAND_ACTIONS, k as InteractionRelayCommandAction, R as RateLimitOptions, l as RenderLogQuery, m as RouteDefinition, S as SpawnHeadlessRequest, n as SpawnHeadlessResponse, o as StateSummary, U as UIBridgeServerConfig, p as UI_BRIDGE_ROUTES, q as WaitForElementByConditionRequest, r as WaitForElementByConditionResponse, s as WaitForElementPredicate, t as WaitForElementRequest, u as WaitForElementSuccessResponse, v as WaitForRouteChangeRequest, w as WaitForRouteChangeResponse, W as WebSocketMessage, x as WebSocketMessageType } from '../types-DUVvn3yt.js';
1
+ import { a as UIBridgeServerHandlers, H as HandlerContext } from '../types-DmMT2yMs.js';
2
+ export { A as APIResponse, B as BrowserEventsResponse, C as CORSOptions, b as CapabilitiesResponse, c as ControlBatchRequest, d as ControlBatchResponse, e as ControlBatchStep, f as ControlBatchStepResult, D as DOMChangeEvent, E as ElementConditionSelector, g as ElementExpectRequest, h as ElementExpectResponse, i as EndpointCategory, j as EndpointInfo, I as INTERACTION_RELAY_COMMAND_ACTIONS, k as InteractionRelayCommandAction, P as PageEvaluateRequest, R as RateLimitOptions, l as RenderLogQuery, m as RouteDefinition, n as RunnerWindow, o as RunnerWindowsList, S as SpawnHeadlessRequest, p as SpawnHeadlessResponse, q as StateSummary, U as UIBridgeServerConfig, r as UI_BRIDGE_ROUTES, s as WaitForElementByConditionRequest, t as WaitForElementByConditionResponse, u as WaitForElementPredicate, v as WaitForElementRequest, w as WaitForElementSuccessResponse, x as WaitForRouteChangeRequest, y as WaitForRouteChangeResponse, W as WebSocketMessage, z as WebSocketMessageType } from '../types-DmMT2yMs.js';
3
3
  export { ActionExecutorLike, CreateHandlersConfig, RegistryLike, closeAllSpawnedHeadlessTabs, createAIHandlers, createHandlers } from './handlers.js';
4
4
  export { ExpressAdapterConfig, createExpressApp, createExpressRouter, uiBridgeMiddleware } from './express.js';
5
- import { C as CommandRelay } from '../nextjs-CF71sn2M.js';
6
- export { a as CommandListener, b as CommandRelayOptions, N as NextJSAdapterConfig, c as NextRouteHandler, P as PendingCommand, Q as QueuedCommand, R as RedisRelayBus, d as RelayBus, e as RelayCommandEnvelope, f as RelayResponseEnvelope, T as TabInfo, g as TabListener, h as TabRoutingError, i as TransportDiagnostics, W as WebSocketClient, j as createControlHandlers, k as createDebugHandlers, l as createNextRouteHandlers, m as createRedisRelayBus, n as createRenderLogHandlers, o as createUIBridgeHandler } from '../nextjs-CF71sn2M.js';
7
- import { U as UIBridgeWSHandler } from '../standalone-C_knSpNG.js';
8
- export { S as StandaloneServer, a as StandaloneServerConfig, W as WebSocketLike, c as createStandaloneServer, s as startCLI } from '../standalone-C_knSpNG.js';
9
- import { e as BridgeEvent, i as AnyCapturedEvent } from '../types-zS11cuej.js';
10
- import { B as BrowserEventStream, S as StreamSubscription } from '../ws-streaming-D_tat1kF.js';
11
- export { S as SSEManager } from '../sse-handler-BpZ9QtRm.js';
5
+ import { C as CommandRelay } from '../nextjs-BLvmgmnW.js';
6
+ export { a as CommandListener, b as CommandRelayOptions, N as NextJSAdapterConfig, c as NextRouteHandler, P as PendingCommand, Q as QueuedCommand, R as RedisRelayBus, d as RelayBus, e as RelayCommandEnvelope, f as RelayResponseEnvelope, T as TabInfo, g as TabListener, h as TabRoutingError, i as TransportDiagnostics, W as WebSocketClient, j as createControlHandlers, k as createDebugHandlers, l as createNextRouteHandlers, m as createRedisRelayBus, n as createRenderLogHandlers, o as createUIBridgeHandler } from '../nextjs-BLvmgmnW.js';
7
+ import { U as UIBridgeWSHandler } from '../standalone-SkUUJ8sc.js';
8
+ export { S as StandaloneServer, a as StandaloneServerConfig, W as WebSocketLike, c as createStandaloneServer, s as startCLI } from '../standalone-SkUUJ8sc.js';
9
+ import { e as BridgeEvent, i as AnyCapturedEvent, Q as ControlActionRequest } from '../types-Chf3cfrT.js';
10
+ import { B as BrowserEventStream, S as StreamSubscription } from '../ws-streaming-DweATXes.js';
11
+ export { S as SSEManager } from '../sse-handler-Bw_4h2AN.js';
12
12
  import '../codes.generated-CXeSH-M4.js';
13
13
  import '../types-D7e9AWwl.js';
14
14
  import '../tracker-ChLmf8-u.js';
15
- import '../effect-store-Cp6Kb2-X.js';
15
+ import '../effect-store-C0YCNUMx.js';
16
16
  import '../render-log/index.js';
17
- import '../find-DWZC8yoa.js';
18
- import '../style-types-De_9GaYG.js';
17
+ import '../find-DpPytcRP.js';
18
+ import '../style-types-lmRdKbT8.js';
19
19
  import '../types-C7D5seeQ.js';
20
- import '../error-snapshot-owQQTv8i.js';
21
- import '../store-BjSi35SI.js';
22
- import '../types-cfwRCpgn.js';
20
+ import '../error-snapshot-DENlqCYO.js';
21
+ import '../store-DH3LUEjx.js';
22
+ import '../types-bG3xLcjL.js';
23
23
  import '../navigation-adapter-D0eod-Ve.js';
24
- import '../drag-drop-detector-B8j1bMWp.js';
24
+ import '../drag-drop-detector-gMHP_QIg.js';
25
25
  import '../annotations/index.js';
26
26
  import 'express';
27
- import '../change-observer-DRBa79aK.js';
27
+ import '../change-observer-D0aEcwCl.js';
28
28
 
29
29
  interface WSStreamAdapterConfig {
30
30
  /** Minimum severity to forward (default: 'warning') */
@@ -178,6 +178,89 @@ interface RelayHandlersOptions {
178
178
  */
179
179
  declare function createRelayHandlers(relay: CommandRelay, options?: RelayHandlersOptions): UIBridgeServerHandlers;
180
180
 
181
+ /**
182
+ * Window-scoped client facade (plan 2026-06-07-multi-window-sdk-automation,
183
+ * Phase 3).
184
+ *
185
+ * `windowScope(bridge, 'term-2')` pre-binds the window-targetable SDK methods to
186
+ * a single runner pop-out window, so a caller driving one window doesn't repeat
187
+ * (and can't typo) `windowLabel` on every call:
188
+ *
189
+ * ```ts
190
+ * const term = windowScope(handlers, 'term-2');
191
+ * await term.evaluate({ expression: 'document.title' });
192
+ * await term.getElements({ text: 'Save' });
193
+ * await term.executeAction('btn-save', { action: 'click' });
194
+ * ```
195
+ *
196
+ * It is pure sugar over the Phase-1 per-call `windowLabel` option — ONE code
197
+ * path. `windowScope(bridge, label).evaluate(req)` is exactly
198
+ * `bridge.pageEvaluate({ ...req, windowLabel: label })`, so there is no
199
+ * divergent behavior to reason about, and not using the scope (or passing a
200
+ * label of `'main'`) is byte-identical to a bare call. Only the window-
201
+ * targetable methods are exposed — you cannot call a non-targetable method on a
202
+ * window scope and get a silent no-op.
203
+ *
204
+ * The read/convenience family (`readValue`/`typeInto`/`clickByText`/
205
+ * `clickBySelector`/`findByText`) is included as of Phase 4 — the runner now
206
+ * honors `windowLabel` (read from the body) on those routes, so scoping them is
207
+ * honest end-to-end.
208
+ */
209
+
210
+ /** Options accepted by `getElements`, minus the now-implicit `windowLabel`. */
211
+ type ScopedGetElementsOptions = Omit<NonNullable<Parameters<UIBridgeServerHandlers['getElements']>[0]>, 'windowLabel'>;
212
+ /**
213
+ * Args for a scoped `evaluate` — the JS expression plus any extra body fields,
214
+ * minus the now-implicit `windowLabel`. Spelled out rather than
215
+ * `Omit<PageEvaluateRequest, 'windowLabel'>` because `PageEvaluateRequest`'s
216
+ * index signature defeats `Omit` (it would drop the required `expression`).
217
+ */
218
+ type ScopedEvaluateRequest = {
219
+ expression: string;
220
+ [key: string]: unknown;
221
+ };
222
+ /**
223
+ * The window-targetable subset of the SDK, pre-bound to one runner window.
224
+ * Returned by {@link windowScope}.
225
+ */
226
+ interface WindowScopedBridge {
227
+ /** The window label every call on this scope targets. */
228
+ readonly windowLabel: string;
229
+ /**
230
+ * Evaluate a JS expression in the bound window. Delegates to `pageEvaluate`
231
+ * with `windowLabel` injected.
232
+ */
233
+ evaluate(request: ScopedEvaluateRequest, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['pageEvaluate']>;
234
+ /**
235
+ * Snapshot elements from the bound window. Delegates to `getElements` with
236
+ * `windowLabel` injected.
237
+ */
238
+ getElements(options?: ScopedGetElementsOptions, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['getElements']>;
239
+ /**
240
+ * Execute an action on an element in the bound window. Delegates to
241
+ * `executeElementAction` with `windowLabel` injected.
242
+ */
243
+ executeAction(id: string, request: Omit<ControlActionRequest, 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['executeElementAction']>;
244
+ /** Read an element's value in the bound window. Delegates to `readValue`. */
245
+ readValue(request: Omit<Parameters<UIBridgeServerHandlers['readValue']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['readValue']>;
246
+ /** Type text into an element in the bound window. Delegates to `typeInto`. */
247
+ typeInto(request: Omit<Parameters<UIBridgeServerHandlers['typeInto']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['typeInto']>;
248
+ /** Click an element by visible text in the bound window. Delegates to `clickByText`. */
249
+ clickByText(request: Omit<Parameters<UIBridgeServerHandlers['clickByText']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['clickByText']>;
250
+ /** Click an element by CSS selector in the bound window. Delegates to `clickBySelector`. */
251
+ clickBySelector(request: Omit<Parameters<UIBridgeServerHandlers['clickBySelector']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['clickBySelector']>;
252
+ /** Find elements by visible text in the bound window. Delegates to `findByText`. */
253
+ findByText(request: Omit<Parameters<UIBridgeServerHandlers['findByText']>[0], 'windowLabel'>, context?: HandlerContext): ReturnType<UIBridgeServerHandlers['findByText']>;
254
+ }
255
+ /**
256
+ * Pre-bind the window-targetable methods of a `UIBridgeServerHandlers` to a
257
+ * single runner window. See the module docs for the contract.
258
+ *
259
+ * @param handlers - the bridge handlers (e.g. from `createRelayHandlers`).
260
+ * @param windowLabel - the target window's label (discover via `listWindows()`).
261
+ */
262
+ declare function windowScope(handlers: UIBridgeServerHandlers, windowLabel: string): WindowScopedBridge;
263
+
181
264
  /**
182
265
  * Chrome DevTools Protocol Tab Discovery
183
266
  *
@@ -309,4 +392,4 @@ interface ElementSelector {
309
392
  */
310
393
  declare function matchesElementSelector(el: MatchableElement, selector: ElementSelector): boolean;
311
394
 
312
- export { CDPTabDiscovery, type CDPTabsConfig, type CDPTarget, CommandRelay, type ElementSelector, type MatchableElement, type RelayHandlersOptions, UIBridgeServerHandlers, UIBridgeWSHandler, WSStreamAdapter, type WSStreamAdapterConfig, createRelayHandlers, createWSStreamBroadcast, matchesElementSelector };
395
+ export { CDPTabDiscovery, type CDPTabsConfig, type CDPTarget, CommandRelay, type ElementSelector, HandlerContext, type MatchableElement, type RelayHandlersOptions, UIBridgeServerHandlers, UIBridgeWSHandler, WSStreamAdapter, type WSStreamAdapterConfig, type WindowScopedBridge, createRelayHandlers, createWSStreamBroadcast, matchesElementSelector, windowScope };
@@ -237,6 +237,11 @@ var UI_BRIDGE_ROUTES = [
237
237
  { method: "GET", path: "/render-log/path", handler: "getRenderLogPath" },
238
238
  // Control - Elements
239
239
  { method: "GET", path: "/control/elements", handler: "getElements" },
240
+ // Discover the runner process's own webview windows (main + pop-outs) so
241
+ // callers can resolve a `windowLabel` target. Runner-owned; promoted out of
242
+ // the runner_only_baseline allow-list once the SDK declared it here (plan
243
+ // 2026-06-07-multi-window-sdk-automation, Phase 2).
244
+ { method: "GET", path: "/control/runner-windows", handler: "listWindows" },
240
245
  { method: "GET", path: "/control/element/:id", handler: "getElement", params: ["id"] },
241
246
  { method: "GET", path: "/control/element/:id/state", handler: "getElementState", params: ["id"] },
242
247
  {
@@ -20697,6 +20702,12 @@ function createHandlers(registry, actionExecutor, config = {}) {
20697
20702
  return error(err.message, "RANK_ELEMENTS_ERROR");
20698
20703
  }
20699
20704
  },
20705
+ listWindows: async () => {
20706
+ return error(
20707
+ "listWindows is runner-only \u2014 query the qontinui-runner directly (GET /control/runner-windows)",
20708
+ "NOT_IMPLEMENTED"
20709
+ );
20710
+ },
20700
20711
  getElement: async (id) => {
20701
20712
  try {
20702
20713
  const element = registry.getElement(id);
@@ -25622,7 +25633,8 @@ function createControlHandlers(handlers) {
25622
25633
  title: pick("title"),
25623
25634
  aria_label: pick("aria_label"),
25624
25635
  text: pick("text"),
25625
- revealsAny: pick("revealsAny")
25636
+ revealsAny: pick("revealsAny"),
25637
+ windowLabel: pick("windowLabel")
25626
25638
  });
25627
25639
  return jsonResponse(result);
25628
25640
  }
@@ -29782,6 +29794,12 @@ function createRelayHandlers(relay, options) {
29782
29794
  }))
29783
29795
  );
29784
29796
  },
29797
+ async listWindows() {
29798
+ return error2(
29799
+ "listWindows is runner-only \u2014 query the qontinui-runner directly (GET /control/runner-windows), not the browser-tab relay",
29800
+ "NOT_IMPLEMENTED"
29801
+ );
29802
+ },
29785
29803
  async getElement(id, options2, context) {
29786
29804
  try {
29787
29805
  const { callerUserId } = extractTabRouting(options2 ?? {});
@@ -30872,6 +30890,21 @@ function createRelayHandlers(relay, options) {
30872
30890
  return handlers;
30873
30891
  }
30874
30892
 
30893
+ // src/server/window-scope.ts
30894
+ function windowScope(handlers, windowLabel) {
30895
+ return {
30896
+ windowLabel,
30897
+ evaluate: (request, context) => handlers.pageEvaluate({ ...request, windowLabel }, context),
30898
+ getElements: (options, context) => handlers.getElements({ ...options, windowLabel }, context),
30899
+ executeAction: (id, request, context) => handlers.executeElementAction(id, { ...request, windowLabel }, context),
30900
+ readValue: (request, context) => handlers.readValue({ ...request, windowLabel }, context),
30901
+ typeInto: (request, context) => handlers.typeInto({ ...request, windowLabel }, context),
30902
+ clickByText: (request, context) => handlers.clickByText({ ...request, windowLabel }, context),
30903
+ clickBySelector: (request, context) => handlers.clickBySelector({ ...request, windowLabel }, context),
30904
+ findByText: (request, context) => handlers.findByText({ ...request, windowLabel }, context)
30905
+ };
30906
+ }
30907
+
30875
30908
  exports.CDPTabDiscovery = CDPTabDiscovery;
30876
30909
  exports.CommandRelay = CommandRelay;
30877
30910
  exports.INTERACTION_RELAY_COMMAND_ACTIONS = INTERACTION_RELAY_COMMAND_ACTIONS;
@@ -30899,5 +30932,6 @@ exports.createWSStreamBroadcast = createWSStreamBroadcast;
30899
30932
  exports.matchesElementSelector = matchesElementSelector;
30900
30933
  exports.startCLI = startCLI;
30901
30934
  exports.uiBridgeMiddleware = uiBridgeMiddleware;
30935
+ exports.windowScope = windowScope;
30902
30936
  //# sourceMappingURL=index.js.map
30903
30937
  //# sourceMappingURL=index.js.map