@qontinui/ui-bridge-native 0.6.8 → 0.6.9
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/control/action-executor.d.ts +15 -0
- package/dist/control/action-executor.d.ts.map +1 -1
- package/dist/control/index.js +34 -0
- package/dist/control/index.js.map +1 -1
- package/dist/control/index.mjs +34 -0
- package/dist/control/index.mjs.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/core/index.mjs.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.js +92 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -16
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.js +75 -16
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +75 -16
- package/dist/react/index.mjs.map +1 -1
- package/dist/react/useUIElement.d.ts +10 -0
- package/dist/react/useUIElement.d.ts.map +1 -1
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/http-server.d.ts.map +1 -1
- package/dist/server/index.js +44 -13
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +44 -13
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/types.d.ts +14 -0
- package/dist/server/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/core/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/registry.ts","../../src/core/element-identifier.ts"],"names":[],"mappings":";AA+EO,SAAS,oBAAoB,KAAA,EAA2C;AAC7E,EAAA,IAAI,CAAC,KAAA,EAAO,OAAO,EAAC;AACpB,EAAA,OAAO,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAM,OAAO,KAAA,CAAM,CAAC,CAAA,KAAM,UAAU,CAAA;AACxE;AAyBO,SAAS,mBAAA,CACd,mBACA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AAY,UAAA,CAAW,QAAA,KAAa,SAAS,QAAA,EAAU;AAClE,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT","file":"index.mjs","sourcesContent":["/**\n * Native Element and Component Registry\n *\n * Central registry for all UI elements and components registered with UI Bridge Native.\n * Adapted from ui-bridge for React Native environments.\n */\n\nimport type {\n RegisteredNativeElement,\n RegisteredNativeComponent,\n NativeElementState,\n NativeElementType,\n NativeStandardAction,\n NativeCustomAction,\n NativeAppInfo,\n NativeBridgeSnapshot,\n NativeElementIdentifier,\n NativeElementRef,\n NativeRegistrationCoverage,\n NativeRouteProviderLike,\n NativeSnapshotEnrichers,\n NativeSnapshotEnricher,\n Workflow,\n BridgeEvent,\n BridgeEventType,\n BridgeEventListener,\n} from './types';\n\n/**\n * Options for registering an element\n */\nexport interface RegisterElementOptions {\n type?: NativeElementType;\n label?: string;\n actions?: NativeStandardAction[];\n customActions?: Record<string, NativeCustomAction>;\n props?: Record<string, unknown>;\n treePath?: string;\n testId?: string;\n accessibilityLabel?: string;\n /** Route path where the element was registered (for page-scoped filtering) */\n registrationRoute?: string | null;\n /** Flattened RN style (from StyleSheet.flatten) for design review */\n flatStyle?: Record<string, unknown>;\n /** State-specific style overrides for design review */\n stateStyles?: {\n pressed?: Record<string, unknown>;\n focused?: Record<string, unknown>;\n disabled?: Record<string, unknown>;\n };\n}\n\n/**\n * Options for registering a component\n */\nexport interface RegisterComponentOptions {\n name: string;\n description?: string;\n actions?: Array<{\n id: string;\n label?: string;\n description?: string;\n handler: (params?: unknown) => unknown | Promise<unknown>;\n }>;\n elementIds?: string[];\n}\n\n/**\n * Registry configuration\n */\nexport interface NativeRegistryConfig {\n verbose?: boolean;\n onEvent?: BridgeEventListener;\n}\n\n/**\n * Extract handler function names from an element's props.\n * Returns names of props whose values are functions (e.g. ['onPress', 'onChangeText']).\n */\nexport function extractHandlerNames(props?: Record<string, unknown>): string[] {\n if (!props) return [];\n return Object.keys(props).filter((k) => typeof props[k] === 'function');\n}\n\n/**\n * `currentRouteOnly` filter predicate for `registrationRoute`.\n *\n * Returns `true` when an element should be INCLUDED in a current-route-only\n * view. Two classes of elements pass the filter:\n *\n * 1. Elements registered on the current route\n * (`registrationRoute === currentRoute`).\n * 2. Route-agnostic elements (`registrationRoute == null` or `''`) — these\n * are typically registered at the app root (tab bars, persistent\n * headers, modal hosts) and apply to every route. Excluding them by\n * default makes `currentRouteOnly=true` return empty on mobile where\n * most apps register chrome at the root and screens via routed stacks.\n *\n * The filter only DROPS elements whose `registrationRoute` is set to a\n * non-matching route — i.e. they belong to a different screen. This matches\n * the runner-side semantics: route-tagged DOM nodes that don't match the\n * active URL are scoped out; untagged nodes are always in scope.\n *\n * Surfaced 2026-05-23 (item 4 of the 0.6.6 robustness pass) — the prior\n * strict equality returned 0 elements on mobile screens that register tabs\n * at the root, because tab elements had `registrationRoute: null`.\n */\nexport function matchesCurrentRoute(\n registrationRoute: string | null | undefined,\n currentRoute: string\n): boolean {\n if (registrationRoute == null || registrationRoute === '') return true;\n return registrationRoute === currentRoute;\n}\n\n/**\n * Infer available actions based on element type\n */\nfunction inferActions(type: NativeElementType): NativeStandardAction[] {\n const baseActions: NativeStandardAction[] = ['focus', 'blur'];\n\n switch (type) {\n case 'button':\n case 'touchable':\n case 'pressable':\n return [...baseActions, 'click', 'press', 'longPress', 'doubleTap'];\n case 'input':\n return [...baseActions, 'click', 'press', 'type', 'clear'];\n case 'text':\n return [...baseActions, 'click', 'press', 'longPress'];\n case 'view':\n return [...baseActions, 'click', 'press'];\n case 'scroll':\n return [...baseActions, 'scroll', 'swipe'];\n case 'list':\n return [...baseActions, 'scroll', 'swipe'];\n case 'listItem':\n return [...baseActions, 'click', 'press', 'longPress', 'swipe'];\n case 'switch':\n case 'checkbox':\n return [...baseActions, 'click', 'press', 'toggle'];\n case 'radio':\n return [...baseActions, 'click', 'press'];\n case 'image':\n return [...baseActions, 'click', 'press', 'longPress'];\n case 'modal':\n return ['focus', 'blur'];\n case 'custom':\n default:\n return [...baseActions, 'click', 'press'];\n }\n}\n\n/**\n * Native UI Bridge Registry\n *\n * Manages registration and lookup of native UI elements and components.\n */\nexport class NativeUIBridgeRegistry {\n private elements = new Map<string, RegisteredNativeElement>();\n private components = new Map<string, RegisteredNativeComponent>();\n private workflows = new Map<string, Workflow>();\n private eventListeners = new Map<BridgeEventType, Set<BridgeEventListener>>();\n private config: NativeRegistryConfig;\n private enrichers: NativeSnapshotEnrichers = {};\n private snapshotExtras = new Map<string, NativeSnapshotEnricher>();\n /**\n * App identification metadata (appId/appName/appType/framework). Set via\n * `setAppInfo` — typically wired in the server constructor from the\n * `NativeUIBridgeConfig` the host passes to `UIBridgeNativeProvider`.\n *\n * When set, `createSnapshot` includes it on the resulting snapshot so\n * agents can identify the app from snapshot bytes alone (parity with the\n * `uiBridge` block on the `health` response). Snapshots created before\n * this is wired simply omit the field.\n */\n private appInfo: NativeAppInfo | null = null;\n /**\n * Optional route provider. When set, `createSnapshot` reads\n * `currentRoute`/`segments` from it whenever the caller does not pass an\n * explicit `routeInfo` argument. This lets the default `getSnapshot` HTTP\n * handler — which has no direct reference to the `NativeUIBridgeServer`\n * instance — still emit a populated `currentRoute` field.\n *\n * Wired by `NativeUIBridgeServer.setRouteProvider`, which forwards the\n * provider into the registry alongside the per-handler overrides it\n * already installs.\n */\n private routeProvider: NativeRouteProviderLike | null = null;\n /**\n * Sticky flag: flips `true` the first time any element is registered and\n * stays `true` even after elements are unregistered. Lets agents distinguish\n * \"this route never wired any elements\" from \"this route registered then\n * unmounted\".\n */\n private everHadRegistrations = false;\n\n constructor(config: NativeRegistryConfig = {}) {\n this.config = config;\n }\n\n // ============================================================================\n // App Info & Route Provider\n // ============================================================================\n\n /**\n * Set the app identification metadata returned alongside snapshots.\n * Idempotent — re-calling with the same shape is a no-op.\n * Pass `null` (or omit a previous call) to clear.\n */\n setAppInfo(info: NativeAppInfo | null | undefined): void {\n this.appInfo = info ?? null;\n }\n\n /** Read-only accessor for the registered app info, if any. */\n getAppInfo(): NativeAppInfo | null {\n return this.appInfo;\n }\n\n /**\n * Set a route provider whose `getCurrentRoute`/`getSegments` are read by\n * `createSnapshot` when no explicit `routeInfo` argument is supplied.\n *\n * Call with `null` to detach (e.g. when the host swaps providers on HMR).\n */\n setRouteProvider(provider: NativeRouteProviderLike | null | undefined): void {\n this.routeProvider = provider ?? null;\n }\n\n /** Read-only accessor for the registered route provider, if any. */\n getRouteProvider(): NativeRouteProviderLike | null {\n return this.routeProvider;\n }\n\n // ============================================================================\n // Snapshot Enricher Slots\n // ============================================================================\n\n /**\n * Register/replace canonical enrichers (modal/toast/undo). HMR-safe — calling\n * with a partial set merges into existing slots instead of clobbering them.\n */\n setEnrichers(e: Partial<NativeSnapshotEnrichers>): void {\n this.enrichers = { ...this.enrichers, ...e };\n }\n\n /**\n * Read-only accessor for the canonical enrichers slot. Returned object is\n * the live reference, so callers can detect \"no detector wired\" via\n * `getEnrichers().modalDetector === undefined`. Used by the test-hook HTTP\n * handlers (`control/modal/push`, `control/modal/dismiss/:id`) which need\n * to drive the ModalDetector directly without re-instantiating it.\n */\n getEnrichers(): Readonly<NativeSnapshotEnrichers> {\n return this.enrichers;\n }\n\n /**\n * Register a custom snapshot enricher. The returned object will be\n * `Object.assign`ed onto the snapshot, so use unique top-level keys to avoid\n * clobbering canonical fields. Returns a disposer.\n */\n registerSnapshotEnricher(name: string, fn: NativeSnapshotEnricher): () => void {\n this.snapshotExtras.set(name, fn);\n return () => this.unregisterSnapshotEnricher(name);\n }\n\n /** Remove a custom snapshot enricher by name */\n unregisterSnapshotEnricher(name: string): void {\n this.snapshotExtras.delete(name);\n }\n\n // ============================================================================\n // Element Management\n // ============================================================================\n\n /**\n * Register a native element\n */\n registerElement(\n id: string,\n ref: React.RefObject<NativeElementRef>,\n options: RegisterElementOptions = {}\n ): RegisteredNativeElement {\n const {\n type = 'custom',\n label,\n actions = inferActions(type),\n customActions,\n props,\n treePath = id,\n testId,\n accessibilityLabel,\n registrationRoute,\n flatStyle,\n stateStyles,\n } = options;\n\n // Create state getter\n const getState = (): NativeElementState => {\n const element = ref.current;\n if (!element) {\n return {\n mounted: false,\n visible: false,\n enabled: false,\n focused: false,\n layout: null,\n };\n }\n\n // State is populated by the element during onLayout\n // Here we return the stored state from the element's metadata\n const stored = this.elements.get(id);\n if (stored && stored.getState !== getState) {\n return stored.getState();\n }\n\n return {\n mounted: true,\n visible: true,\n enabled: true,\n focused: false,\n layout: null,\n };\n };\n\n // Create identifier getter\n const getIdentifier = (): NativeElementIdentifier => ({\n uiId: id,\n testId: testId || id,\n accessibilityLabel,\n treePath,\n });\n\n const registered: RegisteredNativeElement = {\n id,\n ref,\n type,\n label,\n actions,\n customActions,\n props,\n getState,\n getIdentifier,\n registeredAt: Date.now(),\n mounted: true,\n registrationRoute: registrationRoute ?? null,\n flatStyle,\n stateStyles,\n };\n\n this.elements.set(id, registered);\n this.everHadRegistrations = true;\n\n this.emit('element:registered', { id, type, label });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered element: ${id} (${type})`);\n }\n\n // Seed a sensible initial state so elements are immediately visible in snapshots\n // even before onLayout fires. Layout-measuring code can overwrite this later.\n //\n // For controlled-input elements (`type:'input'` with a string `props.value`),\n // also seed `state.value` from the prop so bridge consumers can read the\n // default value before the user has typed. See `updateElementProps` for\n // the corresponding re-sync path on prop changes.\n const seededState: Partial<NativeElementState> = {\n mounted: true,\n visible: true,\n enabled: true,\n focused: false,\n layout: null,\n };\n if (type === 'input' && typeof props?.value === 'string') {\n seededState.value = props.value;\n }\n // For `type:'text'` elements, surface the (dynamic) label as `state.value`\n // so bridge consumers can read text content with a uniform `state.value`\n // accessor instead of parsing the `label` field (\"Status: ...\"). The hook\n // already re-publishes the label via `updateElementMeta` when consumers\n // call `updateLabel(newLabel)` — that path also re-syncs `state.value`\n // (see `updateElementMeta`).\n if (type === 'text' && typeof label === 'string') {\n seededState.value = label;\n }\n this.updateElementState(id, seededState);\n\n return registered;\n }\n\n /**\n * Unregister an element\n */\n unregisterElement(id: string): void {\n const element = this.elements.get(id);\n if (element) {\n this.elements.delete(id);\n this.emit('element:unregistered', { id });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Unregistered element: ${id}`);\n }\n }\n }\n\n /**\n * Get a registered element\n */\n getElement(id: string): RegisteredNativeElement | undefined {\n return this.elements.get(id);\n }\n\n /**\n * Get all registered elements\n */\n getAllElements(): RegisteredNativeElement[] {\n return Array.from(this.elements.values());\n }\n\n /**\n * Get all registered elements that are visible AND have a measured layout.\n *\n * This is the *strict* visibility filter: requires `state.visible === true`\n * AND `state.layout !== null`. Use this when you need both signals\n * (e.g. coord-based tap, where you need an actual rect to hit-test against).\n *\n * Callers driving an LLM agent typically want\n * {@link getMountedVisibleElements} instead — that variant accepts\n * elements that *should* be on screen (visible:true) but whose first\n * `onLayout` has not yet fired. Without it, a snapshot taken in the gap\n * between mount and the first layout pass returns 0 elements on a fully\n * populated screen.\n */\n getVisibleElements(): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => {\n const state = e.getState();\n return state.visible && state.layout !== null;\n });\n }\n\n /**\n * Get all registered elements marked as visible (regardless of layout).\n *\n * Looser than {@link getVisibleElements}: includes elements whose\n * `onLayout` callback has not yet fired (so `layout === null`). React\n * Native's `onLayout` is async — there's a one-tick window after mount\n * where elements are in the tree, the user *sees* them, but the\n * registry hasn't received their measurements yet. Excluding those\n * elements makes `getSnapshot?visibleOnly=true` return 0 on a populated\n * screen, which is a worse failure mode than including a few elements\n * we can't yet locate spatially.\n *\n * Used by `createSnapshot`'s `visibleOnly` filter and by the\n * `getSnapshot` / `getElements` handlers. Each emitted element carries a\n * `visibility` discriminator (`\"visible\"` / `\"likely-visible\"`) so\n * agents that *do* require a known rect can branch downstream.\n */\n getMountedVisibleElements(): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => e.getState().visible);\n }\n\n /**\n * Get elements registered on a specific route (for page-scoped filtering)\n */\n getElementsForRoute(route: string): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => e.registrationRoute === route);\n }\n\n /**\n * Mark elements registered on a route as off-screen (visible: false, layout: null).\n *\n * Use this when a screen loses focus but stays mounted — common in React Navigation\n * tab navigators where inactive tabs remain in the tree. Without this call, stale\n * `layout` data lingers in snapshots and makes off-screen elements look rendered.\n *\n * Does NOT unregister the elements — they stay registered so the user's next visit\n * re-measures them via `onLayout` without re-mount cost. Elements without a\n * `registrationRoute` (app-wide registrations) are untouched.\n */\n markRouteOffscreen(route: string): void {\n // Guard against accidental global wipes. Elements registered without a\n // route have `registrationRoute: null` — passing null/empty here would\n // match every globally-registered element and erase their layouts.\n if (route == null || route === '') {\n if (this.config.verbose) {\n console.warn(\n `[ui-bridge-native] markRouteOffscreen called with null/empty route — ignoring`\n );\n }\n return;\n }\n let cleared = 0;\n for (const element of this.elements.values()) {\n if (element.registrationRoute === route) {\n this.updateElementState(element.id, {\n visible: false,\n layout: null,\n });\n cleared++;\n }\n }\n if (this.config.verbose && cleared > 0) {\n console.log(`[ui-bridge-native] Marked ${cleared} elements offscreen for route: ${route}`);\n }\n }\n\n /**\n * Update element state\n */\n updateElementState(id: string, state: Partial<NativeElementState>): void {\n const element = this.elements.get(id);\n if (element) {\n // Create a new getState that includes the updated state\n const currentState = element.getState();\n const newState = { ...currentState, ...state };\n\n const updated: RegisteredNativeElement = {\n ...element,\n getState: () => newState,\n };\n\n this.elements.set(id, updated);\n this.emit('element:stateChanged', { id, state: newState });\n }\n }\n\n /**\n * Update an element's descriptive metadata (label / accessibilityLabel /\n * testId). Sister to {@link updateElementState} (which carries layout +\n * visibility) and {@link updateElementProps} (which carries event handlers).\n *\n * Idempotent — if every passed field equals the existing value, the call\n * returns without mutating the entry or emitting an event. This keeps\n * `useUIElement().updateLabel(...)` cheap when consumers re-publish from a\n * render path that produces the same string on every tick.\n *\n * Returns `true` when the entry was mutated, `false` otherwise. Callers\n * that want to gate a `console.warn` on no-op invocations can use the\n * return value instead of recomputing equality.\n */\n updateElementMeta(\n id: string,\n meta: { label?: string; accessibilityLabel?: string; testId?: string }\n ): boolean {\n const element = this.elements.get(id);\n if (!element) return false;\n\n // The `testId` on a registered element lives inside the identifier\n // closure (see registerElement's `getIdentifier`). To rebuild it we\n // need the current value — read it via the existing identifier and\n // overlay the new one if provided.\n const currentIdentifier = element.getIdentifier();\n const nextLabel = meta.label !== undefined ? meta.label : element.label;\n const nextAccessibilityLabel =\n meta.accessibilityLabel !== undefined\n ? meta.accessibilityLabel\n : currentIdentifier.accessibilityLabel;\n const nextTestId = meta.testId !== undefined ? meta.testId : currentIdentifier.testId;\n\n const labelChanged = nextLabel !== element.label;\n const accessibilityLabelChanged = nextAccessibilityLabel !== currentIdentifier.accessibilityLabel;\n const testIdChanged = nextTestId !== currentIdentifier.testId;\n\n if (!labelChanged && !accessibilityLabelChanged && !testIdChanged) {\n return false;\n }\n\n const updated: RegisteredNativeElement = {\n ...element,\n label: nextLabel,\n getIdentifier: (): NativeElementIdentifier => ({\n uiId: id,\n testId: nextTestId,\n accessibilityLabel: nextAccessibilityLabel,\n treePath: currentIdentifier.treePath,\n }),\n };\n this.elements.set(id, updated);\n\n // For text-type elements, mirror the new label into `state.value` so\n // bridge consumers can read text content with a uniform `state.value`\n // accessor. Initial seed lives in `registerElement`; this keeps the\n // mirror in sync when consumers call `updateLabel(newLabel)` from a\n // state-driven render path (e.g. `Status: ${connected ? 'online' : 'offline'}`).\n if (element.type === 'text' && labelChanged && typeof nextLabel === 'string') {\n this.updateElementState(id, { value: nextLabel });\n }\n\n // Reuse `element:registered` rather than minting a new event — downstream\n // consumers already subscribe to it for label/identifier diffs, and\n // adding a new BridgeEventType ('element:metaChanged') would force a\n // SemVer-major bump on every snapshot consumer.\n this.emit('element:registered', {\n id,\n type: element.type,\n label: nextLabel,\n });\n\n return true;\n }\n\n /**\n * Update element props (for action execution).\n *\n * Side effect for `type: 'input'` elements: when `props.value` is a string,\n * mirror it into `state.value` so AI drivers reading the registry don't see\n * `state.value === undefined` until the user types. Before this mirror,\n * controlled-input consumers (`<TextInput value={x} onChangeText={setX} />`\n * with `captureProps({ value: x, onChangeText: setX })`) registered an\n * input whose `state.value` only became defined after the FIRST\n * `onChangeText` call — bridge consumers couldn't read the default value\n * (e.g. a pre-populated API-URL input) until someone typed into it.\n *\n * Re-runs on every `updateElementProps` so a parent passing a fresh\n * `value` prop (controlled re-render) keeps the registry in sync. The\n * mirror is gated on `type === 'input'` to avoid touching non-input\n * elements that may carry an unrelated `value` prop (e.g. a Switch's\n * boolean value, which lives on `state.checked`).\n */\n updateElementProps(id: string, props: Record<string, unknown>): void {\n const element = this.elements.get(id);\n if (element) {\n const updated: RegisteredNativeElement = {\n ...element,\n props: { ...element.props, ...props },\n };\n this.elements.set(id, updated);\n\n // Controlled-input value mirror — see doc comment above.\n if (\n element.type === 'input' &&\n Object.prototype.hasOwnProperty.call(props, 'value') &&\n typeof props.value === 'string'\n ) {\n const currentState = updated.getState();\n if (currentState.value !== props.value) {\n this.updateElementState(id, { value: props.value });\n }\n }\n }\n }\n\n /**\n * Update element style for design review\n */\n updateElementStyle(\n id: string,\n flatStyle: Record<string, unknown>,\n stateStyles?: {\n pressed?: Record<string, unknown>;\n focused?: Record<string, unknown>;\n disabled?: Record<string, unknown>;\n }\n ): void {\n const element = this.elements.get(id);\n if (element) {\n const updated: RegisteredNativeElement = {\n ...element,\n flatStyle,\n ...(stateStyles !== undefined ? { stateStyles } : {}),\n };\n this.elements.set(id, updated);\n }\n }\n\n /**\n * Get element style for design review\n */\n getElementStyle(id: string): Record<string, unknown> | null {\n const element = this.elements.get(id);\n return element?.flatStyle ?? null;\n }\n\n /**\n * Find element by testID\n */\n findByTestId(testId: string): RegisteredNativeElement | undefined {\n for (const element of this.elements.values()) {\n const identifier = element.getIdentifier();\n if (identifier.testId === testId) {\n return element;\n }\n }\n return undefined;\n }\n\n /**\n * Find elements by type\n */\n findByType(type: NativeElementType): RegisteredNativeElement[] {\n return Array.from(this.elements.values()).filter((e) => e.type === type);\n }\n\n // ============================================================================\n // Component Management\n // ============================================================================\n\n /**\n * Register a component\n */\n registerComponent(id: string, options: RegisterComponentOptions): RegisteredNativeComponent {\n const { name, description, actions = [], elementIds } = options;\n\n const registered: RegisteredNativeComponent = {\n id,\n name,\n description,\n actions: actions.map((a) => ({\n id: a.id,\n label: a.label,\n description: a.description,\n handler: a.handler,\n })),\n elementIds,\n registeredAt: Date.now(),\n mounted: true,\n };\n\n this.components.set(id, registered);\n\n this.emit('component:registered', { id, name });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered component: ${id} (${name})`);\n }\n\n return registered;\n }\n\n /**\n * Unregister a component\n */\n unregisterComponent(id: string): void {\n const component = this.components.get(id);\n if (component) {\n this.components.delete(id);\n this.emit('component:unregistered', { id });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Unregistered component: ${id}`);\n }\n }\n }\n\n /**\n * Get a registered component\n */\n getComponent(id: string): RegisteredNativeComponent | undefined {\n return this.components.get(id);\n }\n\n /**\n * Get all registered components\n */\n getAllComponents(): RegisteredNativeComponent[] {\n return Array.from(this.components.values());\n }\n\n // ============================================================================\n // Workflow Management\n // ============================================================================\n\n /**\n * Register a workflow\n */\n registerWorkflow(workflow: Workflow): void {\n this.workflows.set(workflow.id, workflow);\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered workflow: ${workflow.id}`);\n }\n }\n\n /**\n * Unregister a workflow\n */\n unregisterWorkflow(id: string): void {\n this.workflows.delete(id);\n }\n\n /**\n * Get a workflow\n */\n getWorkflow(id: string): Workflow | undefined {\n return this.workflows.get(id);\n }\n\n /**\n * Get all workflows\n */\n getAllWorkflows(): Workflow[] {\n return Array.from(this.workflows.values());\n }\n\n // ============================================================================\n // Event System\n // ============================================================================\n\n /**\n * Subscribe to events\n */\n on<T = unknown>(type: BridgeEventType, listener: BridgeEventListener<T>): () => void {\n if (!this.eventListeners.has(type)) {\n this.eventListeners.set(type, new Set());\n }\n this.eventListeners.get(type)!.add(listener as BridgeEventListener);\n\n // Return unsubscribe function\n return () => this.off(type, listener);\n }\n\n /**\n * Unsubscribe from events\n */\n off<T = unknown>(type: BridgeEventType, listener: BridgeEventListener<T>): void {\n this.eventListeners.get(type)?.delete(listener as BridgeEventListener);\n }\n\n /**\n * Emit an event\n */\n emit(type: BridgeEventType, data: unknown): void {\n const event: BridgeEvent = {\n type,\n timestamp: Date.now(),\n data,\n };\n\n // Notify listeners\n const listeners = this.eventListeners.get(type);\n if (listeners) {\n for (const listener of listeners) {\n try {\n listener(event);\n } catch (error) {\n console.error(`[ui-bridge-native] Event listener error:`, error);\n }\n }\n }\n\n // Notify global handler\n if (this.config.onEvent) {\n try {\n this.config.onEvent(event);\n } catch (error) {\n console.error(`[ui-bridge-native] Global event handler error:`, error);\n }\n }\n }\n\n // ============================================================================\n // Snapshots\n // ============================================================================\n\n /**\n * Create a snapshot of the current state.\n *\n * Route resolution: `routeInfo` wins when provided. Otherwise — and this\n * is the path the default `getSnapshot` HTTP handler takes — we fall back\n * to the registered `routeProvider`. This means callers that never wire a\n * server-level override (the bare-server / cloud-relay path) still get a\n * populated `currentRoute` field as long as `setRouteProvider` was called\n * on the registry.\n */\n createSnapshot(\n routeInfo?: {\n currentRoute?: string | null;\n segments?: string[];\n },\n options?: { visibleOnly?: boolean; currentRouteOnly?: boolean }\n ): NativeBridgeSnapshot {\n // Resolve route info: prefer the explicit argument, fall back to a\n // registered route provider. We treat an explicitly-passed `routeInfo`\n // (even if both fields are null/undefined) as \"the caller is in charge\"\n // so server-layer overrides that pass `{currentRoute: null}` keep working.\n const resolvedRoute: { currentRoute: string | null; segments: string[] | undefined } = (() => {\n if (routeInfo !== undefined) {\n return {\n currentRoute: routeInfo.currentRoute ?? null,\n segments: routeInfo.segments,\n };\n }\n if (this.routeProvider) {\n try {\n return {\n currentRoute: this.routeProvider.getCurrentRoute() ?? null,\n segments: this.routeProvider.getSegments?.(),\n };\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] routeProvider getCurrentRoute threw:`, error);\n }\n return { currentRoute: null, segments: undefined };\n }\n }\n return { currentRoute: null, segments: undefined };\n })();\n\n // visibleOnly uses the *looser* mounted-visible filter so a snapshot\n // taken in the gap between mount and the first `onLayout` doesn't\n // return 0 elements on a populated screen. Each element in the\n // payload carries a `visibility` field so agents can branch on\n // measured vs unmeasured.\n let elements = options?.visibleOnly\n ? this.getMountedVisibleElements()\n : this.getAllElements();\n\n // Filter to elements that belong on the current route. Route-agnostic\n // elements (no `registrationRoute`) pass through too — see the\n // `matchesCurrentRoute` doc comment for the rationale (tab bars, modal\n // hosts and other app-root registrations have a null route and apply to\n // every screen).\n if (options?.currentRouteOnly && resolvedRoute.currentRoute) {\n const currentRoute = resolvedRoute.currentRoute;\n elements = elements.filter((e) => matchesCurrentRoute(e.registrationRoute, currentRoute));\n }\n\n const snapshot: NativeBridgeSnapshot = {\n timestamp: Date.now(),\n elements: elements.map((e) => {\n const handlers = extractHandlerNames(e.props);\n const state = e.getState();\n const visibility: 'visible' | 'likely-visible' | 'hidden' = !state.visible\n ? 'hidden'\n : state.layout !== null\n ? 'visible'\n : 'likely-visible';\n return {\n id: e.id,\n type: e.type,\n label: e.label,\n identifier: e.getIdentifier(),\n state,\n actions: e.actions,\n customActions: e.customActions ? Object.keys(e.customActions) : undefined,\n registeredHandlers: handlers.length > 0 ? handlers : undefined,\n registrationRoute: e.registrationRoute,\n visibility,\n };\n }),\n components: this.getAllComponents().map((c) => ({\n id: c.id,\n name: c.name,\n description: c.description,\n actions: c.actions.map((a) => a.id),\n elementIds: c.elementIds,\n })),\n workflows: this.getAllWorkflows().map((w) => ({\n id: w.id,\n name: w.name,\n description: w.description,\n stepCount: w.steps.length,\n })),\n currentRoute: resolvedRoute.currentRoute,\n segments: resolvedRoute.segments,\n registration: this.getRegistrationCoverage(),\n };\n\n // Include app identification metadata so consumers can identify which\n // app produced this snapshot without a separate health probe.\n if (this.appInfo) {\n snapshot.appInfo = this.appInfo;\n }\n\n // Canonical enrichers — each in its own try/catch so a misbehaving tracker\n // can never break the rest of the snapshot.\n if (this.enrichers.modalDetector) {\n try {\n snapshot.modalStack = this.enrichers.modalDetector.getSnapshotModalContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] modalDetector enricher threw:`, error);\n }\n }\n }\n if (this.enrichers.toastCapture) {\n try {\n snapshot.toasts = this.enrichers.toastCapture.getSnapshotToastContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] toastCapture enricher threw:`, error);\n }\n }\n }\n if (this.enrichers.undoTracker) {\n try {\n snapshot.undoRedo = this.enrichers.undoTracker.getSnapshotUndoContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] undoTracker enricher threw:`, error);\n }\n }\n }\n\n // Custom enrichers — keys assign-merged onto the snapshot\n if (this.snapshotExtras.size > 0) {\n const ctx = { elements, currentRoute: resolvedRoute.currentRoute };\n for (const [name, fn] of this.snapshotExtras) {\n try {\n const extra = fn(ctx);\n if (extra && typeof extra === 'object') {\n Object.assign(snapshot, extra);\n }\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] snapshot enricher \"${name}\" threw:`, error);\n }\n }\n }\n }\n\n return snapshot;\n }\n\n /**\n * Get registry statistics\n */\n getStats(): { elements: number; components: number; workflows: number } {\n return {\n elements: this.elements.size,\n components: this.components.size,\n workflows: this.workflows.size,\n };\n }\n\n /**\n * Compute registration coverage metadata for the current registry state.\n *\n * Groups currently-registered elements by `registrationRoute`, bucketing\n * elements without a route under `'?'`. `everHadRegistrations` is sticky —\n * once true, it stays true for the lifetime of the registry instance.\n */\n getRegistrationCoverage(): NativeRegistrationCoverage {\n const byRoute: Record<string, number> = {};\n for (const element of this.elements.values()) {\n const key =\n element.registrationRoute == null || element.registrationRoute === ''\n ? '?'\n : element.registrationRoute;\n byRoute[key] = (byRoute[key] ?? 0) + 1;\n }\n return {\n totalRegistered: this.elements.size,\n everHadRegistrations: this.everHadRegistrations,\n byRoute,\n };\n }\n\n /**\n * Clear all registrations\n */\n clear(): void {\n this.elements.clear();\n this.components.clear();\n this.workflows.clear();\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registry cleared`);\n }\n }\n}\n\n// ============================================================================\n// Global Registry\n// ============================================================================\n\nlet globalRegistry: NativeUIBridgeRegistry | null = null;\n\n/**\n * Set the global registry\n */\nexport function setGlobalRegistry(registry: NativeUIBridgeRegistry): void {\n globalRegistry = registry;\n}\n\n/**\n * Get the global registry\n */\nexport function getGlobalRegistry(): NativeUIBridgeRegistry | null {\n return globalRegistry;\n}\n\n/**\n * Reset the global registry\n */\nexport function resetGlobalRegistry(): void {\n globalRegistry?.clear();\n globalRegistry = null;\n}\n","/**\n * Native Element Identifier\n *\n * Utilities for identifying and finding native elements.\n * In React Native, we use testID, accessibilityLabel, and tree paths\n * instead of XPath/CSS selectors.\n */\n\nimport type { NativeElementIdentifier, RegisteredNativeElement } from './types';\nimport { getGlobalRegistry } from './registry';\n\n/**\n * Create an element identifier for a native element\n */\nexport function createNativeElementIdentifier(\n id: string,\n options: {\n testId?: string;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n treePath?: string;\n } = {}\n): NativeElementIdentifier {\n return {\n uiId: id,\n testId: options.testId || id,\n accessibilityLabel: options.accessibilityLabel,\n accessibilityHint: options.accessibilityHint,\n treePath: options.treePath || id,\n };\n}\n\n/**\n * Find an element by its identifier in the global registry\n */\nexport function findElementByIdentifier(\n identifier: string | NativeElementIdentifier\n): RegisteredNativeElement | null {\n const registry = getGlobalRegistry();\n if (!registry) return null;\n\n // If string, try different lookup strategies\n if (typeof identifier === 'string') {\n // Try direct ID lookup\n const byId = registry.getElement(identifier);\n if (byId) return byId;\n\n // Try testID lookup\n const byTestId = registry.findByTestId(identifier);\n if (byTestId) return byTestId;\n\n // Try pattern matching\n return findByPattern(registry, identifier);\n }\n\n // If identifier object, try each strategy\n if (identifier.uiId) {\n const byId = registry.getElement(identifier.uiId);\n if (byId) return byId;\n }\n\n if (identifier.testId) {\n const byTestId = registry.findByTestId(identifier.testId);\n if (byTestId) return byTestId;\n }\n\n return null;\n}\n\n/**\n * Find element by pattern (supports wildcards)\n */\nfunction findByPattern(\n registry: ReturnType<typeof getGlobalRegistry>,\n pattern: string\n): RegisteredNativeElement | null {\n if (!registry) return null;\n\n // Convert pattern to regex\n const regexPattern = pattern\n .replace(/[.+^${}()|[\\]\\\\]/g, '\\\\$&') // Escape special chars\n .replace(/\\*/g, '.*') // Convert * to .*\n .replace(/\\?/g, '.'); // Convert ? to .\n\n const regex = new RegExp(`^${regexPattern}$`, 'i');\n\n for (const element of registry.getAllElements()) {\n const identifier = element.getIdentifier();\n\n // Match against testId\n if (identifier.testId && regex.test(identifier.testId)) {\n return element;\n }\n\n // Match against uiId\n if (identifier.uiId && regex.test(identifier.uiId)) {\n return element;\n }\n\n // Match against treePath\n if (identifier.treePath && regex.test(identifier.treePath)) {\n return element;\n }\n\n // Match against accessibilityLabel\n if (identifier.accessibilityLabel && regex.test(identifier.accessibilityLabel)) {\n return element;\n }\n }\n\n return null;\n}\n\n/**\n * Find all elements matching a pattern\n */\nexport function findAllByPattern(pattern: string): RegisteredNativeElement[] {\n const registry = getGlobalRegistry();\n if (!registry) return [];\n\n // Convert pattern to regex\n const regexPattern = pattern\n .replace(/[.+^${}()|[\\]\\\\]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/\\?/g, '.');\n\n const regex = new RegExp(`^${regexPattern}$`, 'i');\n const results: RegisteredNativeElement[] = [];\n\n for (const element of registry.getAllElements()) {\n const identifier = element.getIdentifier();\n\n if (\n (identifier.testId && regex.test(identifier.testId)) ||\n (identifier.uiId && regex.test(identifier.uiId)) ||\n (identifier.treePath && regex.test(identifier.treePath)) ||\n (identifier.accessibilityLabel && regex.test(identifier.accessibilityLabel))\n ) {\n results.push(element);\n }\n }\n\n return results;\n}\n\n/**\n * Build a tree path for an element based on its position in the component tree\n */\nexport function buildTreePath(componentPath: string[], elementIndex?: number): string {\n let path = componentPath.join('/');\n if (elementIndex !== undefined) {\n path += `[${elementIndex}]`;\n }\n return path;\n}\n\n/**\n * Parse a tree path into its components\n */\nexport function parseTreePath(treePath: string): { components: string[]; index?: number } {\n const indexMatch = treePath.match(/\\[(\\d+)\\]$/);\n const index = indexMatch ? parseInt(indexMatch[1], 10) : undefined;\n const pathWithoutIndex = treePath.replace(/\\[\\d+\\]$/, '');\n const components = pathWithoutIndex.split('/').filter(Boolean);\n\n return { components, index };\n}\n\n/**\n * Check if an identifier matches criteria\n */\nexport function matchesIdentifier(\n identifier: NativeElementIdentifier,\n criteria: Partial<NativeElementIdentifier>\n): boolean {\n if (criteria.uiId && identifier.uiId !== criteria.uiId) {\n return false;\n }\n if (criteria.testId && identifier.testId !== criteria.testId) {\n return false;\n }\n if (\n criteria.accessibilityLabel &&\n identifier.accessibilityLabel !== criteria.accessibilityLabel\n ) {\n return false;\n }\n if (criteria.treePath && identifier.treePath !== criteria.treePath) {\n return false;\n }\n return true;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/core/registry.ts","../../src/core/element-identifier.ts"],"names":[],"mappings":";AA+EO,SAAS,oBAAoB,KAAA,EAA2C;AAC7E,EAAA,IAAI,CAAC,KAAA,EAAO,OAAO,EAAC;AACpB,EAAA,OAAO,MAAA,CAAO,IAAA,CAAK,KAAK,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAM,OAAO,KAAA,CAAM,CAAC,CAAA,KAAM,UAAU,CAAA;AACxE;AAyBO,SAAS,mBAAA,CACd,mBACA,YAAA,EACS;AACT,EAAA,IAAI,iBAAA,IAAqB,IAAA,IAAQ,iBAAA,KAAsB,EAAA,EAAI,OAAO,IAAA;AAClE,EAAA,OAAO,iBAAA,KAAsB,YAAA;AAC/B;AAKA,SAAS,aAAa,IAAA,EAAiD;AACrE,EAAA,MAAM,WAAA,GAAsC,CAAC,OAAA,EAAS,MAAM,CAAA;AAE5D,EAAA,QAAQ,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C,EAAA,IAAI,iBAAiB,MAAA,EAAW;AAC9B,IAAA,IAAA,IAAQ,IAAI,YAAY,CAAA,CAAA,CAAA;AAAA,EAC1B;AACA,EAAA,OAAO,IAAA;AACT;AAKO,SAAS,cAAc,QAAA,EAA4D;AACxF,EAAA,MAAM,UAAA,GAAa,QAAA,CAAS,KAAA,CAAM,YAAY,CAAA;AAC9C,EAAA,MAAM,QAAQ,UAAA,GAAa,QAAA,CAAS,WAAW,CAAC,CAAA,EAAG,EAAE,CAAA,GAAI,MAAA;AACzD,EAAA,MAAM,gBAAA,GAAmB,QAAA,CAAS,OAAA,CAAQ,UAAA,EAAY,EAAE,CAAA;AACxD,EAAA,MAAM,aAAa,gBAAA,CAAiB,KAAA,CAAM,GAAG,CAAA,CAAE,OAAO,OAAO,CAAA;AAE7D,EAAA,OAAO,EAAE,YAAY,KAAA,EAAM;AAC7B;AAKO,SAAS,iBAAA,CACd,YACA,QAAA,EACS;AACT,EAAA,IAAI,QAAA,CAAS,IAAA,IAAQ,UAAA,CAAW,IAAA,KAAS,SAAS,IAAA,EAAM;AACtD,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,QAAA,CAAS,MAAA,IAAU,UAAA,CAAW,MAAA,KAAW,SAAS,MAAA,EAAQ;AAC5D,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IACE,QAAA,CAAS,kBAAA,IACT,UAAA,CAAW,kBAAA,KAAuB,SAAS,kBAAA,EAC3C;AACA,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,QAAA,CAAS,QAAA,IAAY,UAAA,CAAW,QAAA,KAAa,SAAS,QAAA,EAAU;AAClE,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT","file":"index.mjs","sourcesContent":["/**\n * Native Element and Component Registry\n *\n * Central registry for all UI elements and components registered with UI Bridge Native.\n * Adapted from ui-bridge for React Native environments.\n */\n\nimport type {\n RegisteredNativeElement,\n RegisteredNativeComponent,\n NativeElementState,\n NativeElementType,\n NativeStandardAction,\n NativeCustomAction,\n NativeAppInfo,\n NativeBridgeSnapshot,\n NativeElementIdentifier,\n NativeElementRef,\n NativeRegistrationCoverage,\n NativeRouteProviderLike,\n NativeSnapshotEnrichers,\n NativeSnapshotEnricher,\n Workflow,\n BridgeEvent,\n BridgeEventType,\n BridgeEventListener,\n} from './types';\n\n/**\n * Options for registering an element\n */\nexport interface RegisterElementOptions {\n type?: NativeElementType;\n label?: string;\n actions?: NativeStandardAction[];\n customActions?: Record<string, NativeCustomAction>;\n props?: Record<string, unknown>;\n treePath?: string;\n testId?: string;\n accessibilityLabel?: string;\n /** Route path where the element was registered (for page-scoped filtering) */\n registrationRoute?: string | null;\n /** Flattened RN style (from StyleSheet.flatten) for design review */\n flatStyle?: Record<string, unknown>;\n /** State-specific style overrides for design review */\n stateStyles?: {\n pressed?: Record<string, unknown>;\n focused?: Record<string, unknown>;\n disabled?: Record<string, unknown>;\n };\n}\n\n/**\n * Options for registering a component\n */\nexport interface RegisterComponentOptions {\n name: string;\n description?: string;\n actions?: Array<{\n id: string;\n label?: string;\n description?: string;\n handler: (params?: unknown) => unknown | Promise<unknown>;\n }>;\n elementIds?: string[];\n}\n\n/**\n * Registry configuration\n */\nexport interface NativeRegistryConfig {\n verbose?: boolean;\n onEvent?: BridgeEventListener;\n}\n\n/**\n * Extract handler function names from an element's props.\n * Returns names of props whose values are functions (e.g. ['onPress', 'onChangeText']).\n */\nexport function extractHandlerNames(props?: Record<string, unknown>): string[] {\n if (!props) return [];\n return Object.keys(props).filter((k) => typeof props[k] === 'function');\n}\n\n/**\n * `currentRouteOnly` filter predicate for `registrationRoute`.\n *\n * Returns `true` when an element should be INCLUDED in a current-route-only\n * view. Two classes of elements pass the filter:\n *\n * 1. Elements registered on the current route\n * (`registrationRoute === currentRoute`).\n * 2. Route-agnostic elements (`registrationRoute == null` or `''`) — these\n * are typically registered at the app root (tab bars, persistent\n * headers, modal hosts) and apply to every route. Excluding them by\n * default makes `currentRouteOnly=true` return empty on mobile where\n * most apps register chrome at the root and screens via routed stacks.\n *\n * The filter only DROPS elements whose `registrationRoute` is set to a\n * non-matching route — i.e. they belong to a different screen. This matches\n * the runner-side semantics: route-tagged DOM nodes that don't match the\n * active URL are scoped out; untagged nodes are always in scope.\n *\n * Surfaced 2026-05-23 (item 4 of the 0.6.6 robustness pass) — the prior\n * strict equality returned 0 elements on mobile screens that register tabs\n * at the root, because tab elements had `registrationRoute: null`.\n */\nexport function matchesCurrentRoute(\n registrationRoute: string | null | undefined,\n currentRoute: string\n): boolean {\n if (registrationRoute == null || registrationRoute === '') return true;\n return registrationRoute === currentRoute;\n}\n\n/**\n * Infer available actions based on element type\n */\nfunction inferActions(type: NativeElementType): NativeStandardAction[] {\n const baseActions: NativeStandardAction[] = ['focus', 'blur'];\n\n switch (type) {\n case 'button':\n case 'touchable':\n case 'pressable':\n return [...baseActions, 'click', 'press', 'longPress', 'doubleTap'];\n case 'input':\n return [...baseActions, 'click', 'press', 'type', 'setValue', 'clear'];\n case 'text':\n return [...baseActions, 'click', 'press', 'longPress'];\n case 'view':\n return [...baseActions, 'click', 'press'];\n case 'scroll':\n return [...baseActions, 'scroll', 'swipe'];\n case 'list':\n return [...baseActions, 'scroll', 'swipe'];\n case 'listItem':\n return [...baseActions, 'click', 'press', 'longPress', 'swipe'];\n case 'switch':\n case 'checkbox':\n return [...baseActions, 'click', 'press', 'toggle'];\n case 'radio':\n return [...baseActions, 'click', 'press'];\n case 'image':\n return [...baseActions, 'click', 'press', 'longPress'];\n case 'modal':\n return ['focus', 'blur'];\n case 'custom':\n default:\n return [...baseActions, 'click', 'press'];\n }\n}\n\n/**\n * Native UI Bridge Registry\n *\n * Manages registration and lookup of native UI elements and components.\n */\nexport class NativeUIBridgeRegistry {\n private elements = new Map<string, RegisteredNativeElement>();\n private components = new Map<string, RegisteredNativeComponent>();\n private workflows = new Map<string, Workflow>();\n private eventListeners = new Map<BridgeEventType, Set<BridgeEventListener>>();\n private config: NativeRegistryConfig;\n private enrichers: NativeSnapshotEnrichers = {};\n private snapshotExtras = new Map<string, NativeSnapshotEnricher>();\n /**\n * App identification metadata (appId/appName/appType/framework). Set via\n * `setAppInfo` — typically wired in the server constructor from the\n * `NativeUIBridgeConfig` the host passes to `UIBridgeNativeProvider`.\n *\n * When set, `createSnapshot` includes it on the resulting snapshot so\n * agents can identify the app from snapshot bytes alone (parity with the\n * `uiBridge` block on the `health` response). Snapshots created before\n * this is wired simply omit the field.\n */\n private appInfo: NativeAppInfo | null = null;\n /**\n * Optional route provider. When set, `createSnapshot` reads\n * `currentRoute`/`segments` from it whenever the caller does not pass an\n * explicit `routeInfo` argument. This lets the default `getSnapshot` HTTP\n * handler — which has no direct reference to the `NativeUIBridgeServer`\n * instance — still emit a populated `currentRoute` field.\n *\n * Wired by `NativeUIBridgeServer.setRouteProvider`, which forwards the\n * provider into the registry alongside the per-handler overrides it\n * already installs.\n */\n private routeProvider: NativeRouteProviderLike | null = null;\n /**\n * Sticky flag: flips `true` the first time any element is registered and\n * stays `true` even after elements are unregistered. Lets agents distinguish\n * \"this route never wired any elements\" from \"this route registered then\n * unmounted\".\n */\n private everHadRegistrations = false;\n\n constructor(config: NativeRegistryConfig = {}) {\n this.config = config;\n }\n\n // ============================================================================\n // App Info & Route Provider\n // ============================================================================\n\n /**\n * Set the app identification metadata returned alongside snapshots.\n * Idempotent — re-calling with the same shape is a no-op.\n * Pass `null` (or omit a previous call) to clear.\n */\n setAppInfo(info: NativeAppInfo | null | undefined): void {\n this.appInfo = info ?? null;\n }\n\n /** Read-only accessor for the registered app info, if any. */\n getAppInfo(): NativeAppInfo | null {\n return this.appInfo;\n }\n\n /**\n * Set a route provider whose `getCurrentRoute`/`getSegments` are read by\n * `createSnapshot` when no explicit `routeInfo` argument is supplied.\n *\n * Call with `null` to detach (e.g. when the host swaps providers on HMR).\n */\n setRouteProvider(provider: NativeRouteProviderLike | null | undefined): void {\n this.routeProvider = provider ?? null;\n }\n\n /** Read-only accessor for the registered route provider, if any. */\n getRouteProvider(): NativeRouteProviderLike | null {\n return this.routeProvider;\n }\n\n // ============================================================================\n // Snapshot Enricher Slots\n // ============================================================================\n\n /**\n * Register/replace canonical enrichers (modal/toast/undo). HMR-safe — calling\n * with a partial set merges into existing slots instead of clobbering them.\n */\n setEnrichers(e: Partial<NativeSnapshotEnrichers>): void {\n this.enrichers = { ...this.enrichers, ...e };\n }\n\n /**\n * Read-only accessor for the canonical enrichers slot. Returned object is\n * the live reference, so callers can detect \"no detector wired\" via\n * `getEnrichers().modalDetector === undefined`. Used by the test-hook HTTP\n * handlers (`control/modal/push`, `control/modal/dismiss/:id`) which need\n * to drive the ModalDetector directly without re-instantiating it.\n */\n getEnrichers(): Readonly<NativeSnapshotEnrichers> {\n return this.enrichers;\n }\n\n /**\n * Register a custom snapshot enricher. The returned object will be\n * `Object.assign`ed onto the snapshot, so use unique top-level keys to avoid\n * clobbering canonical fields. Returns a disposer.\n */\n registerSnapshotEnricher(name: string, fn: NativeSnapshotEnricher): () => void {\n this.snapshotExtras.set(name, fn);\n return () => this.unregisterSnapshotEnricher(name);\n }\n\n /** Remove a custom snapshot enricher by name */\n unregisterSnapshotEnricher(name: string): void {\n this.snapshotExtras.delete(name);\n }\n\n // ============================================================================\n // Element Management\n // ============================================================================\n\n /**\n * Register a native element\n */\n registerElement(\n id: string,\n ref: React.RefObject<NativeElementRef>,\n options: RegisterElementOptions = {}\n ): RegisteredNativeElement {\n const {\n type = 'custom',\n label,\n actions = inferActions(type),\n customActions,\n props,\n treePath = id,\n testId,\n accessibilityLabel,\n registrationRoute,\n flatStyle,\n stateStyles,\n } = options;\n\n // Create state getter\n const getState = (): NativeElementState => {\n const element = ref.current;\n if (!element) {\n return {\n mounted: false,\n visible: false,\n enabled: false,\n focused: false,\n layout: null,\n };\n }\n\n // State is populated by the element during onLayout\n // Here we return the stored state from the element's metadata\n const stored = this.elements.get(id);\n if (stored && stored.getState !== getState) {\n return stored.getState();\n }\n\n return {\n mounted: true,\n visible: true,\n enabled: true,\n focused: false,\n layout: null,\n };\n };\n\n // Create identifier getter\n const getIdentifier = (): NativeElementIdentifier => ({\n uiId: id,\n testId: testId || id,\n accessibilityLabel,\n treePath,\n });\n\n const registered: RegisteredNativeElement = {\n id,\n ref,\n type,\n label,\n actions,\n customActions,\n props,\n getState,\n getIdentifier,\n registeredAt: Date.now(),\n mounted: true,\n registrationRoute: registrationRoute ?? null,\n flatStyle,\n stateStyles,\n };\n\n this.elements.set(id, registered);\n this.everHadRegistrations = true;\n\n this.emit('element:registered', { id, type, label });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered element: ${id} (${type})`);\n }\n\n // Seed a sensible initial state so elements are immediately visible in snapshots\n // even before onLayout fires. Layout-measuring code can overwrite this later.\n //\n // For controlled-input elements (`type:'input'` with a string `props.value`),\n // also seed `state.value` from the prop so bridge consumers can read the\n // default value before the user has typed. See `updateElementProps` for\n // the corresponding re-sync path on prop changes.\n const seededState: Partial<NativeElementState> = {\n mounted: true,\n visible: true,\n enabled: true,\n focused: false,\n layout: null,\n };\n if (type === 'input' && typeof props?.value === 'string') {\n seededState.value = props.value;\n }\n // For `type:'text'` elements, surface the (dynamic) label as `state.value`\n // so bridge consumers can read text content with a uniform `state.value`\n // accessor instead of parsing the `label` field (\"Status: ...\"). The hook\n // already re-publishes the label via `updateElementMeta` when consumers\n // call `updateLabel(newLabel)` — that path also re-syncs `state.value`\n // (see `updateElementMeta`).\n if (type === 'text' && typeof label === 'string') {\n seededState.value = label;\n }\n this.updateElementState(id, seededState);\n\n return registered;\n }\n\n /**\n * Unregister an element\n */\n unregisterElement(id: string): void {\n const element = this.elements.get(id);\n if (element) {\n this.elements.delete(id);\n this.emit('element:unregistered', { id });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Unregistered element: ${id}`);\n }\n }\n }\n\n /**\n * Get a registered element\n */\n getElement(id: string): RegisteredNativeElement | undefined {\n return this.elements.get(id);\n }\n\n /**\n * Get all registered elements\n */\n getAllElements(): RegisteredNativeElement[] {\n return Array.from(this.elements.values());\n }\n\n /**\n * Get all registered elements that are visible AND have a measured layout.\n *\n * This is the *strict* visibility filter: requires `state.visible === true`\n * AND `state.layout !== null`. Use this when you need both signals\n * (e.g. coord-based tap, where you need an actual rect to hit-test against).\n *\n * Callers driving an LLM agent typically want\n * {@link getMountedVisibleElements} instead — that variant accepts\n * elements that *should* be on screen (visible:true) but whose first\n * `onLayout` has not yet fired. Without it, a snapshot taken in the gap\n * between mount and the first layout pass returns 0 elements on a fully\n * populated screen.\n */\n getVisibleElements(): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => {\n const state = e.getState();\n return state.visible && state.layout !== null;\n });\n }\n\n /**\n * Get all registered elements marked as visible (regardless of layout).\n *\n * Looser than {@link getVisibleElements}: includes elements whose\n * `onLayout` callback has not yet fired (so `layout === null`). React\n * Native's `onLayout` is async — there's a one-tick window after mount\n * where elements are in the tree, the user *sees* them, but the\n * registry hasn't received their measurements yet. Excluding those\n * elements makes `getSnapshot?visibleOnly=true` return 0 on a populated\n * screen, which is a worse failure mode than including a few elements\n * we can't yet locate spatially.\n *\n * Used by `createSnapshot`'s `visibleOnly` filter and by the\n * `getSnapshot` / `getElements` handlers. Each emitted element carries a\n * `visibility` discriminator (`\"visible\"` / `\"likely-visible\"`) so\n * agents that *do* require a known rect can branch downstream.\n */\n getMountedVisibleElements(): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => e.getState().visible);\n }\n\n /**\n * Get elements registered on a specific route (for page-scoped filtering)\n */\n getElementsForRoute(route: string): RegisteredNativeElement[] {\n return this.getAllElements().filter((e) => e.registrationRoute === route);\n }\n\n /**\n * Mark elements registered on a route as off-screen (visible: false, layout: null).\n *\n * Use this when a screen loses focus but stays mounted — common in React Navigation\n * tab navigators where inactive tabs remain in the tree. Without this call, stale\n * `layout` data lingers in snapshots and makes off-screen elements look rendered.\n *\n * Does NOT unregister the elements — they stay registered so the user's next visit\n * re-measures them via `onLayout` without re-mount cost. Elements without a\n * `registrationRoute` (app-wide registrations) are untouched.\n */\n markRouteOffscreen(route: string): void {\n // Guard against accidental global wipes. Elements registered without a\n // route have `registrationRoute: null` — passing null/empty here would\n // match every globally-registered element and erase their layouts.\n if (route == null || route === '') {\n if (this.config.verbose) {\n console.warn(\n `[ui-bridge-native] markRouteOffscreen called with null/empty route — ignoring`\n );\n }\n return;\n }\n let cleared = 0;\n for (const element of this.elements.values()) {\n if (element.registrationRoute === route) {\n this.updateElementState(element.id, {\n visible: false,\n layout: null,\n });\n cleared++;\n }\n }\n if (this.config.verbose && cleared > 0) {\n console.log(`[ui-bridge-native] Marked ${cleared} elements offscreen for route: ${route}`);\n }\n }\n\n /**\n * Update element state\n */\n updateElementState(id: string, state: Partial<NativeElementState>): void {\n const element = this.elements.get(id);\n if (element) {\n // Create a new getState that includes the updated state\n const currentState = element.getState();\n const newState = { ...currentState, ...state };\n\n const updated: RegisteredNativeElement = {\n ...element,\n getState: () => newState,\n };\n\n this.elements.set(id, updated);\n this.emit('element:stateChanged', { id, state: newState });\n }\n }\n\n /**\n * Update an element's descriptive metadata (label / accessibilityLabel /\n * testId). Sister to {@link updateElementState} (which carries layout +\n * visibility) and {@link updateElementProps} (which carries event handlers).\n *\n * Idempotent — if every passed field equals the existing value, the call\n * returns without mutating the entry or emitting an event. This keeps\n * `useUIElement().updateLabel(...)` cheap when consumers re-publish from a\n * render path that produces the same string on every tick.\n *\n * Returns `true` when the entry was mutated, `false` otherwise. Callers\n * that want to gate a `console.warn` on no-op invocations can use the\n * return value instead of recomputing equality.\n */\n updateElementMeta(\n id: string,\n meta: { label?: string; accessibilityLabel?: string; testId?: string }\n ): boolean {\n const element = this.elements.get(id);\n if (!element) return false;\n\n // The `testId` on a registered element lives inside the identifier\n // closure (see registerElement's `getIdentifier`). To rebuild it we\n // need the current value — read it via the existing identifier and\n // overlay the new one if provided.\n const currentIdentifier = element.getIdentifier();\n const nextLabel = meta.label !== undefined ? meta.label : element.label;\n const nextAccessibilityLabel =\n meta.accessibilityLabel !== undefined\n ? meta.accessibilityLabel\n : currentIdentifier.accessibilityLabel;\n const nextTestId = meta.testId !== undefined ? meta.testId : currentIdentifier.testId;\n\n const labelChanged = nextLabel !== element.label;\n const accessibilityLabelChanged = nextAccessibilityLabel !== currentIdentifier.accessibilityLabel;\n const testIdChanged = nextTestId !== currentIdentifier.testId;\n\n if (!labelChanged && !accessibilityLabelChanged && !testIdChanged) {\n return false;\n }\n\n const updated: RegisteredNativeElement = {\n ...element,\n label: nextLabel,\n getIdentifier: (): NativeElementIdentifier => ({\n uiId: id,\n testId: nextTestId,\n accessibilityLabel: nextAccessibilityLabel,\n treePath: currentIdentifier.treePath,\n }),\n };\n this.elements.set(id, updated);\n\n // For text-type elements, mirror the new label into `state.value` so\n // bridge consumers can read text content with a uniform `state.value`\n // accessor. Initial seed lives in `registerElement`; this keeps the\n // mirror in sync when consumers call `updateLabel(newLabel)` from a\n // state-driven render path (e.g. `Status: ${connected ? 'online' : 'offline'}`).\n if (element.type === 'text' && labelChanged && typeof nextLabel === 'string') {\n this.updateElementState(id, { value: nextLabel });\n }\n\n // Reuse `element:registered` rather than minting a new event — downstream\n // consumers already subscribe to it for label/identifier diffs, and\n // adding a new BridgeEventType ('element:metaChanged') would force a\n // SemVer-major bump on every snapshot consumer.\n this.emit('element:registered', {\n id,\n type: element.type,\n label: nextLabel,\n });\n\n return true;\n }\n\n /**\n * Update element props (for action execution).\n *\n * Side effect for `type: 'input'` elements: when `props.value` is a string,\n * mirror it into `state.value` so AI drivers reading the registry don't see\n * `state.value === undefined` until the user types. Before this mirror,\n * controlled-input consumers (`<TextInput value={x} onChangeText={setX} />`\n * with `captureProps({ value: x, onChangeText: setX })`) registered an\n * input whose `state.value` only became defined after the FIRST\n * `onChangeText` call — bridge consumers couldn't read the default value\n * (e.g. a pre-populated API-URL input) until someone typed into it.\n *\n * Re-runs on every `updateElementProps` so a parent passing a fresh\n * `value` prop (controlled re-render) keeps the registry in sync. The\n * mirror is gated on `type === 'input'` to avoid touching non-input\n * elements that may carry an unrelated `value` prop (e.g. a Switch's\n * boolean value, which lives on `state.checked`).\n */\n updateElementProps(id: string, props: Record<string, unknown>): void {\n const element = this.elements.get(id);\n if (element) {\n const updated: RegisteredNativeElement = {\n ...element,\n props: { ...element.props, ...props },\n };\n this.elements.set(id, updated);\n\n // Controlled-input value mirror — see doc comment above.\n if (\n element.type === 'input' &&\n Object.prototype.hasOwnProperty.call(props, 'value') &&\n typeof props.value === 'string'\n ) {\n const currentState = updated.getState();\n if (currentState.value !== props.value) {\n this.updateElementState(id, { value: props.value });\n }\n }\n }\n }\n\n /**\n * Update element style for design review\n */\n updateElementStyle(\n id: string,\n flatStyle: Record<string, unknown>,\n stateStyles?: {\n pressed?: Record<string, unknown>;\n focused?: Record<string, unknown>;\n disabled?: Record<string, unknown>;\n }\n ): void {\n const element = this.elements.get(id);\n if (element) {\n const updated: RegisteredNativeElement = {\n ...element,\n flatStyle,\n ...(stateStyles !== undefined ? { stateStyles } : {}),\n };\n this.elements.set(id, updated);\n }\n }\n\n /**\n * Get element style for design review\n */\n getElementStyle(id: string): Record<string, unknown> | null {\n const element = this.elements.get(id);\n return element?.flatStyle ?? null;\n }\n\n /**\n * Find element by testID\n */\n findByTestId(testId: string): RegisteredNativeElement | undefined {\n for (const element of this.elements.values()) {\n const identifier = element.getIdentifier();\n if (identifier.testId === testId) {\n return element;\n }\n }\n return undefined;\n }\n\n /**\n * Find elements by type\n */\n findByType(type: NativeElementType): RegisteredNativeElement[] {\n return Array.from(this.elements.values()).filter((e) => e.type === type);\n }\n\n // ============================================================================\n // Component Management\n // ============================================================================\n\n /**\n * Register a component\n */\n registerComponent(id: string, options: RegisterComponentOptions): RegisteredNativeComponent {\n const { name, description, actions = [], elementIds } = options;\n\n const registered: RegisteredNativeComponent = {\n id,\n name,\n description,\n actions: actions.map((a) => ({\n id: a.id,\n label: a.label,\n description: a.description,\n handler: a.handler,\n })),\n elementIds,\n registeredAt: Date.now(),\n mounted: true,\n };\n\n this.components.set(id, registered);\n\n this.emit('component:registered', { id, name });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered component: ${id} (${name})`);\n }\n\n return registered;\n }\n\n /**\n * Unregister a component\n */\n unregisterComponent(id: string): void {\n const component = this.components.get(id);\n if (component) {\n this.components.delete(id);\n this.emit('component:unregistered', { id });\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Unregistered component: ${id}`);\n }\n }\n }\n\n /**\n * Get a registered component\n */\n getComponent(id: string): RegisteredNativeComponent | undefined {\n return this.components.get(id);\n }\n\n /**\n * Get all registered components\n */\n getAllComponents(): RegisteredNativeComponent[] {\n return Array.from(this.components.values());\n }\n\n // ============================================================================\n // Workflow Management\n // ============================================================================\n\n /**\n * Register a workflow\n */\n registerWorkflow(workflow: Workflow): void {\n this.workflows.set(workflow.id, workflow);\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registered workflow: ${workflow.id}`);\n }\n }\n\n /**\n * Unregister a workflow\n */\n unregisterWorkflow(id: string): void {\n this.workflows.delete(id);\n }\n\n /**\n * Get a workflow\n */\n getWorkflow(id: string): Workflow | undefined {\n return this.workflows.get(id);\n }\n\n /**\n * Get all workflows\n */\n getAllWorkflows(): Workflow[] {\n return Array.from(this.workflows.values());\n }\n\n // ============================================================================\n // Event System\n // ============================================================================\n\n /**\n * Subscribe to events\n */\n on<T = unknown>(type: BridgeEventType, listener: BridgeEventListener<T>): () => void {\n if (!this.eventListeners.has(type)) {\n this.eventListeners.set(type, new Set());\n }\n this.eventListeners.get(type)!.add(listener as BridgeEventListener);\n\n // Return unsubscribe function\n return () => this.off(type, listener);\n }\n\n /**\n * Unsubscribe from events\n */\n off<T = unknown>(type: BridgeEventType, listener: BridgeEventListener<T>): void {\n this.eventListeners.get(type)?.delete(listener as BridgeEventListener);\n }\n\n /**\n * Emit an event\n */\n emit(type: BridgeEventType, data: unknown): void {\n const event: BridgeEvent = {\n type,\n timestamp: Date.now(),\n data,\n };\n\n // Notify listeners\n const listeners = this.eventListeners.get(type);\n if (listeners) {\n for (const listener of listeners) {\n try {\n listener(event);\n } catch (error) {\n console.error(`[ui-bridge-native] Event listener error:`, error);\n }\n }\n }\n\n // Notify global handler\n if (this.config.onEvent) {\n try {\n this.config.onEvent(event);\n } catch (error) {\n console.error(`[ui-bridge-native] Global event handler error:`, error);\n }\n }\n }\n\n // ============================================================================\n // Snapshots\n // ============================================================================\n\n /**\n * Create a snapshot of the current state.\n *\n * Route resolution: `routeInfo` wins when provided. Otherwise — and this\n * is the path the default `getSnapshot` HTTP handler takes — we fall back\n * to the registered `routeProvider`. This means callers that never wire a\n * server-level override (the bare-server / cloud-relay path) still get a\n * populated `currentRoute` field as long as `setRouteProvider` was called\n * on the registry.\n */\n createSnapshot(\n routeInfo?: {\n currentRoute?: string | null;\n segments?: string[];\n },\n options?: { visibleOnly?: boolean; currentRouteOnly?: boolean }\n ): NativeBridgeSnapshot {\n // Resolve route info: prefer the explicit argument, fall back to a\n // registered route provider. We treat an explicitly-passed `routeInfo`\n // (even if both fields are null/undefined) as \"the caller is in charge\"\n // so server-layer overrides that pass `{currentRoute: null}` keep working.\n const resolvedRoute: { currentRoute: string | null; segments: string[] | undefined } = (() => {\n if (routeInfo !== undefined) {\n return {\n currentRoute: routeInfo.currentRoute ?? null,\n segments: routeInfo.segments,\n };\n }\n if (this.routeProvider) {\n try {\n return {\n currentRoute: this.routeProvider.getCurrentRoute() ?? null,\n segments: this.routeProvider.getSegments?.(),\n };\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] routeProvider getCurrentRoute threw:`, error);\n }\n return { currentRoute: null, segments: undefined };\n }\n }\n return { currentRoute: null, segments: undefined };\n })();\n\n // visibleOnly uses the *looser* mounted-visible filter so a snapshot\n // taken in the gap between mount and the first `onLayout` doesn't\n // return 0 elements on a populated screen. Each element in the\n // payload carries a `visibility` field so agents can branch on\n // measured vs unmeasured.\n let elements = options?.visibleOnly\n ? this.getMountedVisibleElements()\n : this.getAllElements();\n\n // Filter to elements that belong on the current route. Route-agnostic\n // elements (no `registrationRoute`) pass through too — see the\n // `matchesCurrentRoute` doc comment for the rationale (tab bars, modal\n // hosts and other app-root registrations have a null route and apply to\n // every screen).\n if (options?.currentRouteOnly && resolvedRoute.currentRoute) {\n const currentRoute = resolvedRoute.currentRoute;\n elements = elements.filter((e) => matchesCurrentRoute(e.registrationRoute, currentRoute));\n }\n\n const snapshot: NativeBridgeSnapshot = {\n timestamp: Date.now(),\n elements: elements.map((e) => {\n const handlers = extractHandlerNames(e.props);\n const state = e.getState();\n const visibility: 'visible' | 'likely-visible' | 'hidden' = !state.visible\n ? 'hidden'\n : state.layout !== null\n ? 'visible'\n : 'likely-visible';\n return {\n id: e.id,\n type: e.type,\n label: e.label,\n identifier: e.getIdentifier(),\n state,\n actions: e.actions,\n customActions: e.customActions ? Object.keys(e.customActions) : undefined,\n registeredHandlers: handlers.length > 0 ? handlers : undefined,\n registrationRoute: e.registrationRoute,\n visibility,\n };\n }),\n components: this.getAllComponents().map((c) => ({\n id: c.id,\n name: c.name,\n description: c.description,\n actions: c.actions.map((a) => a.id),\n elementIds: c.elementIds,\n })),\n workflows: this.getAllWorkflows().map((w) => ({\n id: w.id,\n name: w.name,\n description: w.description,\n stepCount: w.steps.length,\n })),\n currentRoute: resolvedRoute.currentRoute,\n segments: resolvedRoute.segments,\n registration: this.getRegistrationCoverage(),\n };\n\n // Include app identification metadata so consumers can identify which\n // app produced this snapshot without a separate health probe.\n if (this.appInfo) {\n snapshot.appInfo = this.appInfo;\n }\n\n // Canonical enrichers — each in its own try/catch so a misbehaving tracker\n // can never break the rest of the snapshot.\n if (this.enrichers.modalDetector) {\n try {\n snapshot.modalStack = this.enrichers.modalDetector.getSnapshotModalContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] modalDetector enricher threw:`, error);\n }\n }\n }\n if (this.enrichers.toastCapture) {\n try {\n snapshot.toasts = this.enrichers.toastCapture.getSnapshotToastContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] toastCapture enricher threw:`, error);\n }\n }\n }\n if (this.enrichers.undoTracker) {\n try {\n snapshot.undoRedo = this.enrichers.undoTracker.getSnapshotUndoContext();\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] undoTracker enricher threw:`, error);\n }\n }\n }\n\n // Custom enrichers — keys assign-merged onto the snapshot\n if (this.snapshotExtras.size > 0) {\n const ctx = { elements, currentRoute: resolvedRoute.currentRoute };\n for (const [name, fn] of this.snapshotExtras) {\n try {\n const extra = fn(ctx);\n if (extra && typeof extra === 'object') {\n Object.assign(snapshot, extra);\n }\n } catch (error) {\n if (this.config.verbose) {\n console.warn(`[ui-bridge-native] snapshot enricher \"${name}\" threw:`, error);\n }\n }\n }\n }\n\n return snapshot;\n }\n\n /**\n * Get registry statistics\n */\n getStats(): { elements: number; components: number; workflows: number } {\n return {\n elements: this.elements.size,\n components: this.components.size,\n workflows: this.workflows.size,\n };\n }\n\n /**\n * Compute registration coverage metadata for the current registry state.\n *\n * Groups currently-registered elements by `registrationRoute`, bucketing\n * elements without a route under `'?'`. `everHadRegistrations` is sticky —\n * once true, it stays true for the lifetime of the registry instance.\n */\n getRegistrationCoverage(): NativeRegistrationCoverage {\n const byRoute: Record<string, number> = {};\n for (const element of this.elements.values()) {\n const key =\n element.registrationRoute == null || element.registrationRoute === ''\n ? '?'\n : element.registrationRoute;\n byRoute[key] = (byRoute[key] ?? 0) + 1;\n }\n return {\n totalRegistered: this.elements.size,\n everHadRegistrations: this.everHadRegistrations,\n byRoute,\n };\n }\n\n /**\n * Clear all registrations\n */\n clear(): void {\n this.elements.clear();\n this.components.clear();\n this.workflows.clear();\n\n if (this.config.verbose) {\n console.log(`[ui-bridge-native] Registry cleared`);\n }\n }\n}\n\n// ============================================================================\n// Global Registry\n// ============================================================================\n\nlet globalRegistry: NativeUIBridgeRegistry | null = null;\n\n/**\n * Set the global registry\n */\nexport function setGlobalRegistry(registry: NativeUIBridgeRegistry): void {\n globalRegistry = registry;\n}\n\n/**\n * Get the global registry\n */\nexport function getGlobalRegistry(): NativeUIBridgeRegistry | null {\n return globalRegistry;\n}\n\n/**\n * Reset the global registry\n */\nexport function resetGlobalRegistry(): void {\n globalRegistry?.clear();\n globalRegistry = null;\n}\n","/**\n * Native Element Identifier\n *\n * Utilities for identifying and finding native elements.\n * In React Native, we use testID, accessibilityLabel, and tree paths\n * instead of XPath/CSS selectors.\n */\n\nimport type { NativeElementIdentifier, RegisteredNativeElement } from './types';\nimport { getGlobalRegistry } from './registry';\n\n/**\n * Create an element identifier for a native element\n */\nexport function createNativeElementIdentifier(\n id: string,\n options: {\n testId?: string;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n treePath?: string;\n } = {}\n): NativeElementIdentifier {\n return {\n uiId: id,\n testId: options.testId || id,\n accessibilityLabel: options.accessibilityLabel,\n accessibilityHint: options.accessibilityHint,\n treePath: options.treePath || id,\n };\n}\n\n/**\n * Find an element by its identifier in the global registry\n */\nexport function findElementByIdentifier(\n identifier: string | NativeElementIdentifier\n): RegisteredNativeElement | null {\n const registry = getGlobalRegistry();\n if (!registry) return null;\n\n // If string, try different lookup strategies\n if (typeof identifier === 'string') {\n // Try direct ID lookup\n const byId = registry.getElement(identifier);\n if (byId) return byId;\n\n // Try testID lookup\n const byTestId = registry.findByTestId(identifier);\n if (byTestId) return byTestId;\n\n // Try pattern matching\n return findByPattern(registry, identifier);\n }\n\n // If identifier object, try each strategy\n if (identifier.uiId) {\n const byId = registry.getElement(identifier.uiId);\n if (byId) return byId;\n }\n\n if (identifier.testId) {\n const byTestId = registry.findByTestId(identifier.testId);\n if (byTestId) return byTestId;\n }\n\n return null;\n}\n\n/**\n * Find element by pattern (supports wildcards)\n */\nfunction findByPattern(\n registry: ReturnType<typeof getGlobalRegistry>,\n pattern: string\n): RegisteredNativeElement | null {\n if (!registry) return null;\n\n // Convert pattern to regex\n const regexPattern = pattern\n .replace(/[.+^${}()|[\\]\\\\]/g, '\\\\$&') // Escape special chars\n .replace(/\\*/g, '.*') // Convert * to .*\n .replace(/\\?/g, '.'); // Convert ? to .\n\n const regex = new RegExp(`^${regexPattern}$`, 'i');\n\n for (const element of registry.getAllElements()) {\n const identifier = element.getIdentifier();\n\n // Match against testId\n if (identifier.testId && regex.test(identifier.testId)) {\n return element;\n }\n\n // Match against uiId\n if (identifier.uiId && regex.test(identifier.uiId)) {\n return element;\n }\n\n // Match against treePath\n if (identifier.treePath && regex.test(identifier.treePath)) {\n return element;\n }\n\n // Match against accessibilityLabel\n if (identifier.accessibilityLabel && regex.test(identifier.accessibilityLabel)) {\n return element;\n }\n }\n\n return null;\n}\n\n/**\n * Find all elements matching a pattern\n */\nexport function findAllByPattern(pattern: string): RegisteredNativeElement[] {\n const registry = getGlobalRegistry();\n if (!registry) return [];\n\n // Convert pattern to regex\n const regexPattern = pattern\n .replace(/[.+^${}()|[\\]\\\\]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/\\?/g, '.');\n\n const regex = new RegExp(`^${regexPattern}$`, 'i');\n const results: RegisteredNativeElement[] = [];\n\n for (const element of registry.getAllElements()) {\n const identifier = element.getIdentifier();\n\n if (\n (identifier.testId && regex.test(identifier.testId)) ||\n (identifier.uiId && regex.test(identifier.uiId)) ||\n (identifier.treePath && regex.test(identifier.treePath)) ||\n (identifier.accessibilityLabel && regex.test(identifier.accessibilityLabel))\n ) {\n results.push(element);\n }\n }\n\n return results;\n}\n\n/**\n * Build a tree path for an element based on its position in the component tree\n */\nexport function buildTreePath(componentPath: string[], elementIndex?: number): string {\n let path = componentPath.join('/');\n if (elementIndex !== undefined) {\n path += `[${elementIndex}]`;\n }\n return path;\n}\n\n/**\n * Parse a tree path into its components\n */\nexport function parseTreePath(treePath: string): { components: string[]; index?: number } {\n const indexMatch = treePath.match(/\\[(\\d+)\\]$/);\n const index = indexMatch ? parseInt(indexMatch[1], 10) : undefined;\n const pathWithoutIndex = treePath.replace(/\\[\\d+\\]$/, '');\n const components = pathWithoutIndex.split('/').filter(Boolean);\n\n return { components, index };\n}\n\n/**\n * Check if an identifier matches criteria\n */\nexport function matchesIdentifier(\n identifier: NativeElementIdentifier,\n criteria: Partial<NativeElementIdentifier>\n): boolean {\n if (criteria.uiId && identifier.uiId !== criteria.uiId) {\n return false;\n }\n if (criteria.testId && identifier.testId !== criteria.testId) {\n return false;\n }\n if (\n criteria.accessibilityLabel &&\n identifier.accessibilityLabel !== criteria.accessibilityLabel\n ) {\n return false;\n }\n if (criteria.treePath && identifier.treePath !== criteria.treePath) {\n return false;\n }\n return true;\n}\n"]}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ export type NativeElementType = 'button' | 'input' | 'text' | 'view' | 'scroll'
|
|
|
134
134
|
/**
|
|
135
135
|
* Standard actions available on native elements
|
|
136
136
|
*/
|
|
137
|
-
export type NativeStandardAction = 'press' | 'click' | 'longPress' | 'doubleTap' | 'type' | 'clear' | 'focus' | 'blur' | 'scroll' | 'swipe' | 'toggle';
|
|
137
|
+
export type NativeStandardAction = 'press' | 'click' | 'longPress' | 'doubleTap' | 'type' | 'setValue' | 'clear' | 'focus' | 'blur' | 'scroll' | 'swipe' | 'toggle';
|
|
138
138
|
/**
|
|
139
139
|
* Custom action definition for native elements
|
|
140
140
|
*/
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,KAAK,gBAAgB,GAAG,GAAG,CAAC;AAK5B,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,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kB,CAAC;IAC1B,wBAAwB;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IACpC,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ function inferActions(type) {
|
|
|
28
28
|
case "pressable":
|
|
29
29
|
return [...baseActions, "click", "press", "longPress", "doubleTap"];
|
|
30
30
|
case "input":
|
|
31
|
-
return [...baseActions, "click", "press", "type", "clear"];
|
|
31
|
+
return [...baseActions, "click", "press", "type", "setValue", "clear"];
|
|
32
32
|
case "text":
|
|
33
33
|
return [...baseActions, "click", "press", "longPress"];
|
|
34
34
|
case "view":
|
|
@@ -1042,6 +1042,8 @@ var DefaultNativeActionExecutor = class {
|
|
|
1042
1042
|
return this.performDoubleTap(props);
|
|
1043
1043
|
case "type":
|
|
1044
1044
|
return this.performType(element, props, params);
|
|
1045
|
+
case "setValue":
|
|
1046
|
+
return this.performSetValue(element, props, params);
|
|
1045
1047
|
case "clear":
|
|
1046
1048
|
return this.performClear(element, props);
|
|
1047
1049
|
case "focus":
|
|
@@ -1134,6 +1136,38 @@ var DefaultNativeActionExecutor = class {
|
|
|
1134
1136
|
this.registry.updateElementState(element.id, { value: params.text });
|
|
1135
1137
|
}
|
|
1136
1138
|
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Perform setValue action.
|
|
1141
|
+
*
|
|
1142
|
+
* Web/runner UI Bridge parity: `setValue` replaces the input's value
|
|
1143
|
+
* atomically in a single call (no per-character keystroke simulation),
|
|
1144
|
+
* mirroring the web bridge's `setValue` semantics. On native there is no
|
|
1145
|
+
* DOM value to assign, so we drive the controlled-input handler
|
|
1146
|
+
* (`onChangeText`, falling back to `onChange`) with the full string. The
|
|
1147
|
+
* registry's `state.value` is then synced so a subsequent GET on the
|
|
1148
|
+
* element reflects the new value.
|
|
1149
|
+
*
|
|
1150
|
+
* Unlike `type`, this does not append to existing content and ignores
|
|
1151
|
+
* `delay` — it is the deterministic "set the field to exactly this" action.
|
|
1152
|
+
*/
|
|
1153
|
+
async performSetValue(element, props, params) {
|
|
1154
|
+
const next = typeof params?.text === "string" ? params.text : typeof params?.value === "string" ? params.value : void 0;
|
|
1155
|
+
if (typeof next !== "string") {
|
|
1156
|
+
throw new Error('setValue action requires a string "text" (or "value") parameter');
|
|
1157
|
+
}
|
|
1158
|
+
if (typeof props.onChangeText === "function") {
|
|
1159
|
+
props.onChangeText(next);
|
|
1160
|
+
} else if (typeof props.onChange === "function") {
|
|
1161
|
+
props.onChange({
|
|
1162
|
+
nativeEvent: { text: next }
|
|
1163
|
+
});
|
|
1164
|
+
} else {
|
|
1165
|
+
throw new Error("No text change handler found on element");
|
|
1166
|
+
}
|
|
1167
|
+
if (element) {
|
|
1168
|
+
this.registry.updateElementState(element.id, { value: next });
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1137
1171
|
/**
|
|
1138
1172
|
* Perform clear action
|
|
1139
1173
|
*/
|
|
@@ -2899,7 +2933,8 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2899
2933
|
return success2({
|
|
2900
2934
|
entries: [],
|
|
2901
2935
|
count: 0,
|
|
2902
|
-
bufferSize: 0
|
|
2936
|
+
bufferSize: 0,
|
|
2937
|
+
installed: false
|
|
2903
2938
|
});
|
|
2904
2939
|
}
|
|
2905
2940
|
const entries = buf.entries({
|
|
@@ -2909,7 +2944,8 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2909
2944
|
return success2({
|
|
2910
2945
|
entries,
|
|
2911
2946
|
count: entries.length,
|
|
2912
|
-
bufferSize: buf.size()
|
|
2947
|
+
bufferSize: buf.size(),
|
|
2948
|
+
installed: buf.isInstalled()
|
|
2913
2949
|
});
|
|
2914
2950
|
},
|
|
2915
2951
|
getNetworkRequests: async (ctx) => {
|
|
@@ -2920,7 +2956,8 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2920
2956
|
return success2({
|
|
2921
2957
|
entries: [],
|
|
2922
2958
|
count: 0,
|
|
2923
|
-
bufferSize: 0
|
|
2959
|
+
bufferSize: 0,
|
|
2960
|
+
installed: false
|
|
2924
2961
|
});
|
|
2925
2962
|
}
|
|
2926
2963
|
const entries = buf.entries({
|
|
@@ -2930,7 +2967,8 @@ function createServerHandlers(registry, executor, config) {
|
|
|
2930
2967
|
return success2({
|
|
2931
2968
|
entries,
|
|
2932
2969
|
count: entries.length,
|
|
2933
|
-
bufferSize: buf.size()
|
|
2970
|
+
bufferSize: buf.size(),
|
|
2971
|
+
installed: buf.isInstalled()
|
|
2934
2972
|
});
|
|
2935
2973
|
},
|
|
2936
2974
|
// Test hooks — modal stack manipulation
|
|
@@ -3349,7 +3387,10 @@ var WS_ROUTES = [
|
|
|
3349
3387
|
// same handler at both paths to keep agents portable across platforms.
|
|
3350
3388
|
{ pattern: "ai/find", handler: "find", httpMethods: ["POST"] },
|
|
3351
3389
|
{ pattern: "control/snapshot", handler: "getSnapshot", httpMethods: ["GET"] },
|
|
3352
|
-
|
|
3390
|
+
// Discovery alias — web/runner parity with `POST /control/discover` (a
|
|
3391
|
+
// legacy alias for snapshot/find). Mounted on HTTP (GET+POST) so mobile
|
|
3392
|
+
// doesn't 404 where web returns 200; delegates to the snapshot handler.
|
|
3393
|
+
{ pattern: "control/discover", handler: "getSnapshot", httpMethods: ["GET", "POST"] },
|
|
3353
3394
|
// Page health — accepts both GET and POST so the canonical skill invocation
|
|
3354
3395
|
// (`POST .../control/page-health` with an empty body) and ad-hoc curls both
|
|
3355
3396
|
// work without a body-shape gotcha.
|
|
@@ -3443,19 +3484,26 @@ var WS_ROUTES = [
|
|
|
3443
3484
|
httpMethods: ["POST"],
|
|
3444
3485
|
requiresTestHooks: true
|
|
3445
3486
|
},
|
|
3446
|
-
// Observability — last-N console errors + network requests.
|
|
3447
|
-
//
|
|
3487
|
+
// Observability — last-N console errors + network requests.
|
|
3488
|
+
//
|
|
3489
|
+
// Always mounted (not testHooks-gated) so they return a schema-valid 200
|
|
3490
|
+
// on every build instead of a 404 that agents can't distinguish from a
|
|
3491
|
+
// missing route. The INVASIVE part — monkey-patching `console.error` /
|
|
3492
|
+
// `fetch` / `XMLHttpRequest` — stays gated behind `testHooks` (see
|
|
3493
|
+
// NativeUIBridgeServer.start → buffer.install()). When the patches aren't
|
|
3494
|
+
// installed the handlers report `installed: false` + empty entries, so
|
|
3495
|
+
// production builds expose the contract without observing real users'
|
|
3496
|
+
// console/network traffic. Set `features.testHooks` (typically on
|
|
3497
|
+
// `__DEV__`) to populate the buffers with live data.
|
|
3448
3498
|
{
|
|
3449
3499
|
pattern: "control/console-errors",
|
|
3450
3500
|
handler: "getConsoleErrors",
|
|
3451
|
-
httpMethods: ["GET"]
|
|
3452
|
-
requiresTestHooks: true
|
|
3501
|
+
httpMethods: ["GET"]
|
|
3453
3502
|
},
|
|
3454
3503
|
{
|
|
3455
3504
|
pattern: "sdk/network-requests",
|
|
3456
3505
|
handler: "getNetworkRequests",
|
|
3457
|
-
httpMethods: ["GET"]
|
|
3458
|
-
requiresTestHooks: true
|
|
3506
|
+
httpMethods: ["GET"]
|
|
3459
3507
|
}
|
|
3460
3508
|
];
|
|
3461
3509
|
var HANDLER_DESCRIPTIONS = {
|
|
@@ -3502,8 +3550,8 @@ var HANDLER_DESCRIPTIONS = {
|
|
|
3502
3550
|
typeInto: "App-agnostic: type into the input matching a label: body { label, text, clear?, visibleOnly? }. (selector form is web-only)",
|
|
3503
3551
|
readValue: "STUB \u2014 selector-based; NOT_SUPPORTED on native (no DOM). Use /control/element/:id/state to read a value.",
|
|
3504
3552
|
findByText: "App-agnostic: list elements matching free-text (no press): body { text, visibleOnly? }",
|
|
3505
|
-
getConsoleErrors: "
|
|
3506
|
-
getNetworkRequests: "
|
|
3553
|
+
getConsoleErrors: "Last-N console.error/console.warn entries; ?since=<ms>&limit=<n>. `installed:false` when capture is off (no testHooks) \u2014 entries empty but schema-valid.",
|
|
3554
|
+
getNetworkRequests: "Last-N fetch/XHR entries with status + duration; ?since=<ms>&limit=<n>. `installed:false` when capture is off (no testHooks) \u2014 entries empty but schema-valid.",
|
|
3507
3555
|
pushModal: "TEST HOOK \u2014 push a modal onto the snapshot.modalStack via the registry ModalDetector",
|
|
3508
3556
|
dismissModal: "TEST HOOK \u2014 dismiss a modal by id from the snapshot.modalStack via the registry ModalDetector",
|
|
3509
3557
|
keepAwake: "TEST HOOK \u2014 keep the device screen awake via the injected keepAwakeProvider: body { enabled: boolean, durationMs?: number }"
|
|
@@ -5674,7 +5722,8 @@ function useUIElement(options) {
|
|
|
5674
5722
|
parentPath,
|
|
5675
5723
|
style,
|
|
5676
5724
|
stateStyles: stateStylesProp,
|
|
5677
|
-
handlers: handlersProp
|
|
5725
|
+
handlers: handlersProp,
|
|
5726
|
+
value: valueProp
|
|
5678
5727
|
} = options;
|
|
5679
5728
|
const treePath = parentPath ? `${parentPath}/${id}` : id;
|
|
5680
5729
|
const bridgeProps = react.useMemo(
|
|
@@ -5700,9 +5749,12 @@ function useUIElement(options) {
|
|
|
5700
5749
|
});
|
|
5701
5750
|
registeredRef.current = true;
|
|
5702
5751
|
registeredIdRef.current = id;
|
|
5752
|
+
if (typeof valueProp === "string") {
|
|
5753
|
+
bridge.registry.updateElementState(id, { value: valueProp });
|
|
5754
|
+
}
|
|
5703
5755
|
setRegistered(true);
|
|
5704
5756
|
scheduleDeadButtonWarning(bridge, id, type);
|
|
5705
|
-
}, [bridge, id, type, label, actions, customActions, treePath, style, stateStylesProp]);
|
|
5757
|
+
}, [bridge, id, type, label, actions, customActions, treePath, style, stateStylesProp, valueProp]);
|
|
5706
5758
|
const unregister = react.useCallback(() => {
|
|
5707
5759
|
if (!bridge || !registeredRef.current) return;
|
|
5708
5760
|
bridge.registry.unregisterElement(registeredIdRef.current ?? id);
|
|
@@ -5832,6 +5884,13 @@ function useUIElement(options) {
|
|
|
5832
5884
|
}
|
|
5833
5885
|
};
|
|
5834
5886
|
}, [bridge, registered, id, handlersProp]);
|
|
5887
|
+
react.useEffect(() => {
|
|
5888
|
+
if (!bridge || !registered) return;
|
|
5889
|
+
if (typeof valueProp !== "string") return;
|
|
5890
|
+
const current = bridge.registry.getElement(id)?.getState().value;
|
|
5891
|
+
if (current === valueProp) return;
|
|
5892
|
+
bridge.registry.updateElementState(id, { value: valueProp });
|
|
5893
|
+
}, [bridge, registered, id, valueProp]);
|
|
5835
5894
|
react.useCallback(
|
|
5836
5895
|
(props) => {
|
|
5837
5896
|
propsRef.current = { ...propsRef.current, ...props };
|
|
@@ -6223,6 +6282,11 @@ var UI_BRIDGE_NATIVE_ROUTES = {
|
|
|
6223
6282
|
path: "/ui-bridge/control/snapshot",
|
|
6224
6283
|
description: "Get full bridge snapshot"
|
|
6225
6284
|
},
|
|
6285
|
+
DISCOVER: {
|
|
6286
|
+
method: "GET",
|
|
6287
|
+
path: "/ui-bridge/control/discover",
|
|
6288
|
+
description: "Discover elements (alias for snapshot; web/runner parity)"
|
|
6289
|
+
},
|
|
6226
6290
|
PAGE_HEALTH: {
|
|
6227
6291
|
method: "POST",
|
|
6228
6292
|
path: "/ui-bridge/control/page-health",
|
|
@@ -6350,6 +6414,18 @@ var UI_BRIDGE_NATIVE_ROUTES = {
|
|
|
6350
6414
|
path: "/ui-bridge/control/modal/dismiss/:id",
|
|
6351
6415
|
description: "Dismiss a modal by id (testHooks)"
|
|
6352
6416
|
},
|
|
6417
|
+
// Observability — last-N ring buffers (always mounted; `installed:false`
|
|
6418
|
+
// when the console/network patches are off, i.e. no testHooks).
|
|
6419
|
+
CONSOLE_ERRORS: {
|
|
6420
|
+
method: "GET",
|
|
6421
|
+
path: "/ui-bridge/control/console-errors",
|
|
6422
|
+
description: "Last-N captured console.error/console.warn entries"
|
|
6423
|
+
},
|
|
6424
|
+
NETWORK_REQUESTS: {
|
|
6425
|
+
method: "GET",
|
|
6426
|
+
path: "/ui-bridge/sdk/network-requests",
|
|
6427
|
+
description: "Last-N captured fetch/XHR requests with status + duration"
|
|
6428
|
+
},
|
|
6353
6429
|
// Health
|
|
6354
6430
|
HEALTH: {
|
|
6355
6431
|
method: "GET",
|