@qontinui/ui-bridge 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/ai/index.d.mts +312 -155
  2. package/dist/ai/index.d.ts +312 -155
  3. package/dist/ai/index.js +2363 -67
  4. package/dist/ai/index.js.map +1 -1
  5. package/dist/ai/index.mjs +2328 -68
  6. package/dist/ai/index.mjs.map +1 -1
  7. package/dist/annotations/index.d.mts +218 -0
  8. package/dist/annotations/index.d.ts +218 -0
  9. package/dist/annotations/index.js +246 -0
  10. package/dist/annotations/index.js.map +1 -0
  11. package/dist/annotations/index.mjs +241 -0
  12. package/dist/annotations/index.mjs.map +1 -0
  13. package/dist/assertions-BSR3afVr.d.ts +161 -0
  14. package/dist/assertions-CTw1hfOx.d.mts +161 -0
  15. package/dist/babel-plugin/index.js +504 -0
  16. package/dist/babel-plugin/index.js.map +1 -0
  17. package/dist/babel-plugin/index.mjs +488 -0
  18. package/dist/babel-plugin/index.mjs.map +1 -0
  19. package/dist/browser-capture-Bms60T6f.d.mts +47 -0
  20. package/dist/browser-capture-CsTU29mb.d.ts +47 -0
  21. package/dist/control/index.d.mts +26 -7
  22. package/dist/control/index.d.ts +26 -7
  23. package/dist/control/index.js +276 -48
  24. package/dist/control/index.js.map +1 -1
  25. package/dist/control/index.mjs +276 -48
  26. package/dist/control/index.mjs.map +1 -1
  27. package/dist/core/index.d.mts +115 -44
  28. package/dist/core/index.d.ts +115 -44
  29. package/dist/core/index.js +0 -1560
  30. package/dist/core/index.js.map +1 -1
  31. package/dist/core/index.mjs +1 -1549
  32. package/dist/core/index.mjs.map +1 -1
  33. package/dist/debug/index.d.mts +5 -3
  34. package/dist/debug/index.d.ts +5 -3
  35. package/dist/debug/index.js +925 -1
  36. package/dist/debug/index.js.map +1 -1
  37. package/dist/debug/index.mjs +924 -2
  38. package/dist/debug/index.mjs.map +1 -1
  39. package/dist/index.d.mts +13 -9
  40. package/dist/index.d.ts +13 -9
  41. package/dist/index.js +8310 -3777
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +8246 -3766
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/{metrics-NC3csD0R.d.mts → metrics-DuA2qIIz.d.mts} +2 -2
  46. package/dist/{metrics-C9XRi_mL.d.ts → metrics-KFAAKNEB.d.ts} +2 -2
  47. package/dist/native/control/index.js +448 -0
  48. package/dist/native/control/index.js.map +1 -0
  49. package/dist/native/control/index.mjs +445 -0
  50. package/dist/native/control/index.mjs.map +1 -0
  51. package/dist/native/core/index.js +486 -0
  52. package/dist/native/core/index.js.map +1 -0
  53. package/dist/native/core/index.mjs +475 -0
  54. package/dist/native/core/index.mjs.map +1 -0
  55. package/dist/native/debug/index.js +408 -0
  56. package/dist/native/debug/index.js.map +1 -0
  57. package/dist/native/debug/index.mjs +406 -0
  58. package/dist/native/debug/index.mjs.map +1 -0
  59. package/dist/native/index.js +2232 -0
  60. package/dist/native/index.js.map +1 -0
  61. package/dist/native/index.mjs +2204 -0
  62. package/dist/native/index.mjs.map +1 -0
  63. package/dist/native/react/index.js +1377 -0
  64. package/dist/native/react/index.js.map +1 -0
  65. package/dist/native/react/index.mjs +1365 -0
  66. package/dist/native/react/index.mjs.map +1 -0
  67. package/dist/native/server/index.js +440 -0
  68. package/dist/native/server/index.js.map +1 -0
  69. package/dist/native/server/index.mjs +435 -0
  70. package/dist/native/server/index.mjs.map +1 -0
  71. package/dist/react/index.d.mts +121 -9
  72. package/dist/react/index.d.ts +121 -9
  73. package/dist/react/index.js +2239 -91
  74. package/dist/react/index.js.map +1 -1
  75. package/dist/react/index.mjs +2239 -92
  76. package/dist/react/index.mjs.map +1 -1
  77. package/dist/{registry-CIEDjbQ9.d.ts → registry-C6dDtn1v.d.ts} +34 -15
  78. package/dist/{registry-SsSDq46X.d.mts → registry-POtcxnal.d.mts} +34 -15
  79. package/dist/render-log/index.d.mts +1 -1
  80. package/dist/render-log/index.d.ts +1 -1
  81. package/dist/server/express.d.mts +37 -0
  82. package/dist/server/express.d.ts +37 -0
  83. package/dist/server/express.js +298 -0
  84. package/dist/server/express.js.map +1 -0
  85. package/dist/server/express.mjs +294 -0
  86. package/dist/server/express.mjs.map +1 -0
  87. package/dist/server/handlers.d.mts +124 -0
  88. package/dist/server/handlers.d.ts +124 -0
  89. package/dist/server/handlers.js +7183 -0
  90. package/dist/server/handlers.js.map +1 -0
  91. package/dist/server/handlers.mjs +7180 -0
  92. package/dist/server/handlers.mjs.map +1 -0
  93. package/dist/server/index.d.mts +12 -0
  94. package/dist/server/index.d.ts +12 -0
  95. package/dist/server/index.js +8384 -0
  96. package/dist/server/index.js.map +1 -0
  97. package/dist/server/index.mjs +8369 -0
  98. package/dist/server/index.mjs.map +1 -0
  99. package/dist/server/nextjs.d.mts +128 -0
  100. package/dist/server/nextjs.d.ts +128 -0
  101. package/dist/server/nextjs.js +390 -0
  102. package/dist/server/nextjs.js.map +1 -0
  103. package/dist/server/nextjs.mjs +385 -0
  104. package/dist/server/nextjs.mjs.map +1 -0
  105. package/dist/server/standalone.d.mts +7 -0
  106. package/dist/server/standalone.d.ts +7 -0
  107. package/dist/server/standalone.js +845 -0
  108. package/dist/server/standalone.js.map +1 -0
  109. package/dist/server/standalone.mjs +841 -0
  110. package/dist/server/standalone.mjs.map +1 -0
  111. package/dist/specs/index.d.mts +365 -0
  112. package/dist/specs/index.d.ts +365 -0
  113. package/dist/specs/index.js +2809 -0
  114. package/dist/specs/index.js.map +1 -0
  115. package/dist/specs/index.mjs +2786 -0
  116. package/dist/specs/index.mjs.map +1 -0
  117. package/dist/standalone-B6GLIEmR.d.ts +216 -0
  118. package/dist/standalone-CjdYqj3P.d.mts +216 -0
  119. package/dist/swc-plugin/index.d.mts +79 -0
  120. package/dist/swc-plugin/index.d.ts +79 -0
  121. package/dist/swc-plugin/index.js +15 -0
  122. package/dist/swc-plugin/index.js.map +1 -0
  123. package/dist/swc-plugin/index.mjs +9 -0
  124. package/dist/swc-plugin/index.mjs.map +1 -0
  125. package/dist/types-B2EfvEaq.d.ts +236 -0
  126. package/dist/{types-Dr6tH-bm.d.mts → types-C7gVYRnF.d.ts} +72 -2
  127. package/dist/{types-oCTrRxSw.d.ts → types-CJGrBEhC.d.mts} +72 -2
  128. package/dist/types-CebMQj76.d.ts +1275 -0
  129. package/dist/types-D_ypYl3T.d.mts +1275 -0
  130. package/dist/types-UBtp7R0u.d.mts +132 -0
  131. package/dist/types-UBtp7R0u.d.ts +132 -0
  132. package/dist/types-gO696T_t.d.mts +236 -0
  133. package/dist/{types-CPMbN_Iw.d.mts → types-suaYwWWg.d.mts} +519 -152
  134. package/dist/{types-CPMbN_Iw.d.ts → types-suaYwWWg.d.ts} +519 -152
  135. package/package.json +123 -4
  136. package/swc-plugin-wasm/ui_bridge_swc_plugin.wasm +0 -0
  137. package/dist/types-BvCfFuEV.d.ts +0 -534
  138. package/dist/types-CFT3Dnx4.d.mts +0 -534
  139. package/dist/websocket-client-CX4QJesI.d.ts +0 -124
  140. package/dist/websocket-client-C_Na0OSp.d.mts +0 -124
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Annotation Types
3
+ *
4
+ * Types for the semantic annotation system that allows developers
5
+ * to attach rich human-authored context to UI elements.
6
+ */
7
+ /**
8
+ * Annotation for a single UI element.
9
+ *
10
+ * All fields are optional - annotate only what's useful.
11
+ * Annotations provide human-authored semantic context that enriches
12
+ * the UI Bridge's understanding of elements beyond what can be
13
+ * inferred from the DOM alone.
14
+ *
15
+ * @example Basic annotation for a button
16
+ * ```ts
17
+ * const annotation: ElementAnnotation = {
18
+ * description: 'Primary login button',
19
+ * purpose: 'Submits the login form and authenticates the user',
20
+ * tags: ['auth', 'primary-action'],
21
+ * };
22
+ * store.set('login-btn', annotation);
23
+ * ```
24
+ *
25
+ * @example Detailed annotation with relationships and metadata
26
+ * ```ts
27
+ * const annotation: ElementAnnotation = {
28
+ * description: 'Email input field',
29
+ * purpose: 'Collects the user email for authentication',
30
+ * notes: 'Validates email format on blur. Shows inline error below the field.',
31
+ * tags: ['auth', 'form-input', 'required'],
32
+ * relatedElements: ['email-label', 'email-error', 'login-btn'],
33
+ * metadata: { validationPattern: '^[^@]+@[^@]+\\.[^@]+$' },
34
+ * author: 'design-team',
35
+ * };
36
+ * ```
37
+ */
38
+ interface ElementAnnotation {
39
+ /** Human-readable description of what this element is */
40
+ description?: string;
41
+ /** Why this element exists / what it's for */
42
+ purpose?: string;
43
+ /** Behavioral notes, edge cases, or caveats */
44
+ notes?: string;
45
+ /** Searchable tags for categorization */
46
+ tags?: string[];
47
+ /** IDs of related elements (e.g., a label and its input) */
48
+ relatedElements?: string[];
49
+ /** Arbitrary key-value metadata */
50
+ metadata?: Record<string, unknown>;
51
+ /** Timestamp of last update (auto-set by store) */
52
+ updatedAt?: number;
53
+ /** Author of this annotation */
54
+ author?: string;
55
+ }
56
+ /**
57
+ * Annotation configuration file format.
58
+ *
59
+ * This is the import/export format - a JSON file with version and annotations map.
60
+ * Use `AnnotationStore.exportConfig()` to generate this object, and
61
+ * `AnnotationStore.importConfig()` to load it back.
62
+ *
63
+ * @example JSON file format (`annotations.json`)
64
+ * ```json
65
+ * {
66
+ * "version": "1.0.0",
67
+ * "annotations": {
68
+ * "login-btn": {
69
+ * "description": "Primary login button",
70
+ * "purpose": "Submits the login form",
71
+ * "tags": ["auth", "primary-action"]
72
+ * },
73
+ * "email-input": {
74
+ * "description": "Email address input",
75
+ * "purpose": "Collects user email for authentication",
76
+ * "relatedElements": ["email-label", "email-error"]
77
+ * }
78
+ * },
79
+ * "metadata": {
80
+ * "appName": "MyApp",
81
+ * "description": "Annotations for the login page"
82
+ * }
83
+ * }
84
+ * ```
85
+ */
86
+ interface AnnotationConfig {
87
+ /** Config format version */
88
+ version: string;
89
+ /** Map of element ID to annotation */
90
+ annotations: Record<string, ElementAnnotation>;
91
+ /** Optional file-level metadata */
92
+ metadata?: {
93
+ appName?: string;
94
+ exportedAt?: number;
95
+ description?: string;
96
+ };
97
+ }
98
+ /**
99
+ * Annotation coverage statistics.
100
+ */
101
+ interface AnnotationCoverage {
102
+ /** Total elements known to the system */
103
+ totalElements: number;
104
+ /** Elements that have annotations */
105
+ annotatedElements: number;
106
+ /** Coverage as a percentage (0-100) */
107
+ coveragePercent: number;
108
+ /** IDs of annotated elements */
109
+ annotatedIds: string[];
110
+ /** IDs of unannotated elements */
111
+ unannotatedIds: string[];
112
+ /** When this coverage was computed */
113
+ timestamp: number;
114
+ }
115
+ /**
116
+ * Event types emitted by the annotation store.
117
+ */
118
+ type AnnotationEventType = 'annotation:set' | 'annotation:deleted' | 'annotation:imported' | 'annotation:cleared';
119
+ /**
120
+ * Event payload for annotation store events.
121
+ */
122
+ interface AnnotationEvent {
123
+ type: AnnotationEventType;
124
+ elementId?: string;
125
+ annotation?: ElementAnnotation;
126
+ count?: number;
127
+ timestamp: number;
128
+ }
129
+ /** Current annotation config version */
130
+ declare const ANNOTATION_CONFIG_VERSION = "1.0.0";
131
+
132
+ export { ANNOTATION_CONFIG_VERSION as A, type ElementAnnotation as E, type AnnotationConfig as a, type AnnotationCoverage as b, type AnnotationEvent as c, type AnnotationEventType as d };
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Annotation Types
3
+ *
4
+ * Types for the semantic annotation system that allows developers
5
+ * to attach rich human-authored context to UI elements.
6
+ */
7
+ /**
8
+ * Annotation for a single UI element.
9
+ *
10
+ * All fields are optional - annotate only what's useful.
11
+ * Annotations provide human-authored semantic context that enriches
12
+ * the UI Bridge's understanding of elements beyond what can be
13
+ * inferred from the DOM alone.
14
+ *
15
+ * @example Basic annotation for a button
16
+ * ```ts
17
+ * const annotation: ElementAnnotation = {
18
+ * description: 'Primary login button',
19
+ * purpose: 'Submits the login form and authenticates the user',
20
+ * tags: ['auth', 'primary-action'],
21
+ * };
22
+ * store.set('login-btn', annotation);
23
+ * ```
24
+ *
25
+ * @example Detailed annotation with relationships and metadata
26
+ * ```ts
27
+ * const annotation: ElementAnnotation = {
28
+ * description: 'Email input field',
29
+ * purpose: 'Collects the user email for authentication',
30
+ * notes: 'Validates email format on blur. Shows inline error below the field.',
31
+ * tags: ['auth', 'form-input', 'required'],
32
+ * relatedElements: ['email-label', 'email-error', 'login-btn'],
33
+ * metadata: { validationPattern: '^[^@]+@[^@]+\\.[^@]+$' },
34
+ * author: 'design-team',
35
+ * };
36
+ * ```
37
+ */
38
+ interface ElementAnnotation {
39
+ /** Human-readable description of what this element is */
40
+ description?: string;
41
+ /** Why this element exists / what it's for */
42
+ purpose?: string;
43
+ /** Behavioral notes, edge cases, or caveats */
44
+ notes?: string;
45
+ /** Searchable tags for categorization */
46
+ tags?: string[];
47
+ /** IDs of related elements (e.g., a label and its input) */
48
+ relatedElements?: string[];
49
+ /** Arbitrary key-value metadata */
50
+ metadata?: Record<string, unknown>;
51
+ /** Timestamp of last update (auto-set by store) */
52
+ updatedAt?: number;
53
+ /** Author of this annotation */
54
+ author?: string;
55
+ }
56
+ /**
57
+ * Annotation configuration file format.
58
+ *
59
+ * This is the import/export format - a JSON file with version and annotations map.
60
+ * Use `AnnotationStore.exportConfig()` to generate this object, and
61
+ * `AnnotationStore.importConfig()` to load it back.
62
+ *
63
+ * @example JSON file format (`annotations.json`)
64
+ * ```json
65
+ * {
66
+ * "version": "1.0.0",
67
+ * "annotations": {
68
+ * "login-btn": {
69
+ * "description": "Primary login button",
70
+ * "purpose": "Submits the login form",
71
+ * "tags": ["auth", "primary-action"]
72
+ * },
73
+ * "email-input": {
74
+ * "description": "Email address input",
75
+ * "purpose": "Collects user email for authentication",
76
+ * "relatedElements": ["email-label", "email-error"]
77
+ * }
78
+ * },
79
+ * "metadata": {
80
+ * "appName": "MyApp",
81
+ * "description": "Annotations for the login page"
82
+ * }
83
+ * }
84
+ * ```
85
+ */
86
+ interface AnnotationConfig {
87
+ /** Config format version */
88
+ version: string;
89
+ /** Map of element ID to annotation */
90
+ annotations: Record<string, ElementAnnotation>;
91
+ /** Optional file-level metadata */
92
+ metadata?: {
93
+ appName?: string;
94
+ exportedAt?: number;
95
+ description?: string;
96
+ };
97
+ }
98
+ /**
99
+ * Annotation coverage statistics.
100
+ */
101
+ interface AnnotationCoverage {
102
+ /** Total elements known to the system */
103
+ totalElements: number;
104
+ /** Elements that have annotations */
105
+ annotatedElements: number;
106
+ /** Coverage as a percentage (0-100) */
107
+ coveragePercent: number;
108
+ /** IDs of annotated elements */
109
+ annotatedIds: string[];
110
+ /** IDs of unannotated elements */
111
+ unannotatedIds: string[];
112
+ /** When this coverage was computed */
113
+ timestamp: number;
114
+ }
115
+ /**
116
+ * Event types emitted by the annotation store.
117
+ */
118
+ type AnnotationEventType = 'annotation:set' | 'annotation:deleted' | 'annotation:imported' | 'annotation:cleared';
119
+ /**
120
+ * Event payload for annotation store events.
121
+ */
122
+ interface AnnotationEvent {
123
+ type: AnnotationEventType;
124
+ elementId?: string;
125
+ annotation?: ElementAnnotation;
126
+ count?: number;
127
+ timestamp: number;
128
+ }
129
+ /** Current annotation config version */
130
+ declare const ANNOTATION_CONFIG_VERSION = "1.0.0";
131
+
132
+ export { ANNOTATION_CONFIG_VERSION as A, type ElementAnnotation as E, type AnnotationConfig as a, type AnnotationCoverage as b, type AnnotationEvent as c, type AnnotationEventType as d };
@@ -0,0 +1,236 @@
1
+ import { a1 as UIBridgeConfig, C as CapturedError, a3 as UIState, a4 as UIStateGroup, a5 as UITransition, a0 as TransitionResult, T as PathResult, O as NavigationResult, $ as StateSnapshot } from './types-suaYwWWg.mjs';
2
+ import { d as ControlSnapshot, b as ControlActionRequest, c as ControlActionResponse, C as ComponentActionRequest, a as ComponentActionResponse, F as FindRequest, h as FindResponse, l as WorkflowRunRequest, m as WorkflowRunResponse, i as PageNavigationResponse, P as PageNavigateRequest } from './types-CJGrBEhC.mjs';
3
+ import { a8 as SearchCriteria, a9 as SearchResponse, X as NLActionRequest, Y as NLActionResponse, d as AssertionRequest, e as AssertionResult, B as BatchAssertionRequest, g as BatchAssertionResult, af as SemanticSnapshot, ab as SemanticDiff, ac as SemanticSearchCriteria, ad as SemanticSearchResponse, M as IntentExecutionResult, O as IntentSearchResponse, L as Intent, a4 as RecoveryAttemptRequest, a5 as RecoveryAttemptResult, a0 as PageDataMap, a2 as PageRegionMap, ai as StructuredDataExtraction, i as ComponentInfo, m as CrossAppComparisonReport } from './types-D_ypYl3T.mjs';
4
+ import { RenderLogEntryType, RenderLogEntry } from './render-log/index.mjs';
5
+ import { E as ElementAnnotation, a as AnnotationConfig, b as AnnotationCoverage } from './types-UBtp7R0u.mjs';
6
+
7
+ /**
8
+ * UI Bridge Server Types
9
+ *
10
+ * Shared types for server adapters.
11
+ */
12
+
13
+ /**
14
+ * Server configuration
15
+ */
16
+ interface UIBridgeServerConfig extends UIBridgeConfig {
17
+ /** Base path for API routes */
18
+ basePath?: string;
19
+ /** Enable CORS */
20
+ cors?: boolean | CORSOptions;
21
+ /** Authentication middleware */
22
+ authenticate?: (req: unknown) => boolean | Promise<boolean>;
23
+ /** Rate limiting */
24
+ rateLimit?: RateLimitOptions;
25
+ }
26
+ /**
27
+ * CORS options
28
+ */
29
+ interface CORSOptions {
30
+ /** Allowed origins */
31
+ origin?: string | string[] | boolean;
32
+ /** Allowed methods */
33
+ methods?: string[];
34
+ /** Allowed headers */
35
+ headers?: string[];
36
+ /** Expose headers */
37
+ exposeHeaders?: string[];
38
+ /** Allow credentials */
39
+ credentials?: boolean;
40
+ /** Max age for preflight cache */
41
+ maxAge?: number;
42
+ }
43
+ /**
44
+ * Rate limit options
45
+ */
46
+ interface RateLimitOptions {
47
+ /** Time window in milliseconds */
48
+ windowMs?: number;
49
+ /** Max requests per window */
50
+ max?: number;
51
+ /** Message when rate limited */
52
+ message?: string;
53
+ }
54
+ /**
55
+ * API response wrapper
56
+ */
57
+ interface APIResponse<T = unknown> {
58
+ /** Whether the request succeeded */
59
+ success: boolean;
60
+ /** Response data */
61
+ data?: T;
62
+ /** Error message if failed */
63
+ error?: string;
64
+ /** Error code */
65
+ code?: string;
66
+ /** Request timestamp */
67
+ timestamp: number;
68
+ }
69
+ /**
70
+ * Render log query parameters
71
+ */
72
+ interface RenderLogQuery {
73
+ /** Filter by entry type */
74
+ type?: RenderLogEntryType;
75
+ /** Filter entries since timestamp */
76
+ since?: number;
77
+ /** Filter entries until timestamp */
78
+ until?: number;
79
+ /** Limit number of results */
80
+ limit?: number;
81
+ }
82
+ /**
83
+ * Server handler interface
84
+ *
85
+ * Implementations provide these handlers for different frameworks.
86
+ */
87
+ interface UIBridgeServerHandlers {
88
+ getRenderLog: (query?: RenderLogQuery) => Promise<APIResponse<RenderLogEntry[]>>;
89
+ clearRenderLog: () => Promise<APIResponse<void>>;
90
+ captureSnapshot: () => Promise<APIResponse<unknown>>;
91
+ getRenderLogPath: () => Promise<APIResponse<{
92
+ path: string;
93
+ }>>;
94
+ getElements: () => Promise<APIResponse<ControlSnapshot['elements']>>;
95
+ getElement: (id: string) => Promise<APIResponse<ControlSnapshot['elements'][0]>>;
96
+ getElementState: (id: string) => Promise<APIResponse<unknown>>;
97
+ executeElementAction: (id: string, request: ControlActionRequest) => Promise<APIResponse<ControlActionResponse>>;
98
+ getComponents: () => Promise<APIResponse<ControlSnapshot['components']>>;
99
+ getComponent: (id: string) => Promise<APIResponse<ControlSnapshot['components'][0]>>;
100
+ getComponentState: (id: string) => Promise<APIResponse<{
101
+ state: Record<string, unknown>;
102
+ computed: Record<string, unknown>;
103
+ timestamp: number;
104
+ }>>;
105
+ executeComponentAction: (id: string, request: ComponentActionRequest) => Promise<APIResponse<ComponentActionResponse>>;
106
+ find: (request?: FindRequest) => Promise<APIResponse<FindResponse>>;
107
+ /**
108
+ * @deprecated Use find() instead
109
+ */
110
+ discover: (request?: FindRequest) => Promise<APIResponse<FindResponse>>;
111
+ getControlSnapshot: () => Promise<APIResponse<ControlSnapshot>>;
112
+ getWorkflows: () => Promise<APIResponse<ControlSnapshot['workflows']>>;
113
+ runWorkflow: (id: string, request?: WorkflowRunRequest) => Promise<APIResponse<WorkflowRunResponse>>;
114
+ getWorkflowStatus: (runId: string) => Promise<APIResponse<WorkflowRunResponse>>;
115
+ getActionHistory: (limit?: number) => Promise<APIResponse<unknown[]>>;
116
+ getMetrics: () => Promise<APIResponse<unknown>>;
117
+ highlightElement: (id: string) => Promise<APIResponse<void>>;
118
+ getElementTree: () => Promise<APIResponse<unknown>>;
119
+ getConsoleErrors: (params?: {
120
+ since?: number;
121
+ limit?: number;
122
+ }) => Promise<APIResponse<{
123
+ errors: CapturedError[];
124
+ count: number;
125
+ }>>;
126
+ clearConsoleErrors: () => Promise<APIResponse<{
127
+ cleared: boolean;
128
+ }>>;
129
+ aiSearch: (criteria: SearchCriteria) => Promise<APIResponse<SearchResponse>>;
130
+ aiExecute: (request: NLActionRequest) => Promise<APIResponse<NLActionResponse>>;
131
+ aiAssert: (request: AssertionRequest) => Promise<APIResponse<AssertionResult>>;
132
+ aiAssertBatch: (request: BatchAssertionRequest) => Promise<APIResponse<BatchAssertionResult>>;
133
+ getSemanticSnapshot: () => Promise<APIResponse<SemanticSnapshot>>;
134
+ getSemanticDiff: (since?: number) => Promise<APIResponse<SemanticDiff | null>>;
135
+ getPageSummary: () => Promise<APIResponse<string>>;
136
+ aiSemanticSearch: (criteria: SemanticSearchCriteria) => Promise<APIResponse<SemanticSearchResponse>>;
137
+ getStates: () => Promise<APIResponse<UIState[]>>;
138
+ getState: (id: string) => Promise<APIResponse<UIState>>;
139
+ getActiveStates: () => Promise<APIResponse<UIState[]>>;
140
+ activateState: (id: string) => Promise<APIResponse<void>>;
141
+ deactivateState: (id: string) => Promise<APIResponse<void>>;
142
+ getStateGroups: () => Promise<APIResponse<UIStateGroup[]>>;
143
+ activateStateGroup: (id: string) => Promise<APIResponse<void>>;
144
+ deactivateStateGroup: (id: string) => Promise<APIResponse<void>>;
145
+ getTransitions: () => Promise<APIResponse<UITransition[]>>;
146
+ canExecuteTransition: (id: string) => Promise<APIResponse<{
147
+ canExecute: boolean;
148
+ reason?: string;
149
+ }>>;
150
+ executeTransition: (id: string) => Promise<APIResponse<TransitionResult>>;
151
+ findPath: (request: {
152
+ targetStates: string[];
153
+ }) => Promise<APIResponse<PathResult>>;
154
+ navigateTo: (request: {
155
+ targetStates: string[];
156
+ }) => Promise<APIResponse<NavigationResult>>;
157
+ getStateSnapshot: () => Promise<APIResponse<StateSnapshot>>;
158
+ executeIntent: (request: {
159
+ intentId: string;
160
+ params?: Record<string, unknown>;
161
+ }) => Promise<APIResponse<IntentExecutionResult>>;
162
+ findIntent: (request: {
163
+ query: string;
164
+ }) => Promise<APIResponse<IntentSearchResponse>>;
165
+ listIntents: () => Promise<APIResponse<Intent[]>>;
166
+ registerIntent: (intent: Intent) => Promise<APIResponse<Intent>>;
167
+ executeIntentFromQuery: (request: {
168
+ query: string;
169
+ params?: Record<string, unknown>;
170
+ }) => Promise<APIResponse<IntentExecutionResult>>;
171
+ attemptRecovery: (request: RecoveryAttemptRequest) => Promise<APIResponse<RecoveryAttemptResult>>;
172
+ analyzePageData: () => Promise<APIResponse<PageDataMap>>;
173
+ analyzePageRegions: () => Promise<APIResponse<PageRegionMap>>;
174
+ analyzeStructuredData: () => Promise<APIResponse<StructuredDataExtraction>>;
175
+ crossAppCompare: (request: {
176
+ sourceSnapshot: SemanticSnapshot;
177
+ targetSnapshot: SemanticSnapshot;
178
+ sourceComponents?: ComponentInfo[];
179
+ targetComponents?: ComponentInfo[];
180
+ }) => Promise<APIResponse<CrossAppComparisonReport>>;
181
+ pageRefresh: () => Promise<APIResponse<PageNavigationResponse>>;
182
+ pageNavigate: (request: PageNavigateRequest) => Promise<APIResponse<PageNavigationResponse>>;
183
+ pageGoBack: () => Promise<APIResponse<PageNavigationResponse>>;
184
+ pageGoForward: () => Promise<APIResponse<PageNavigationResponse>>;
185
+ getAnnotations: () => Promise<APIResponse<Record<string, ElementAnnotation>>>;
186
+ getAnnotation: (id: string) => Promise<APIResponse<ElementAnnotation>>;
187
+ setAnnotation: (id: string, annotation: ElementAnnotation) => Promise<APIResponse<ElementAnnotation>>;
188
+ deleteAnnotation: (id: string) => Promise<APIResponse<void>>;
189
+ importAnnotations: (config: AnnotationConfig) => Promise<APIResponse<{
190
+ count: number;
191
+ }>>;
192
+ exportAnnotations: () => Promise<APIResponse<AnnotationConfig>>;
193
+ getAnnotationCoverage: () => Promise<APIResponse<AnnotationCoverage>>;
194
+ getPerformanceEntries: () => Promise<APIResponse<unknown>>;
195
+ clearPerformanceEntries: () => Promise<APIResponse<{
196
+ cleared: boolean;
197
+ }>>;
198
+ getBrowserEvents: (params?: {
199
+ type?: string;
200
+ since?: number;
201
+ limit?: number;
202
+ }) => Promise<APIResponse<{
203
+ events: unknown[];
204
+ count: number;
205
+ }>>;
206
+ }
207
+ /**
208
+ * Route definition
209
+ */
210
+ interface RouteDefinition {
211
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
212
+ path: string;
213
+ handler: string;
214
+ params?: string[];
215
+ bodyRequired?: boolean;
216
+ }
217
+ /**
218
+ * All UI Bridge routes
219
+ */
220
+ declare const UI_BRIDGE_ROUTES: RouteDefinition[];
221
+ /**
222
+ * WebSocket message types
223
+ */
224
+ type WebSocketMessageType = 'subscribe' | 'unsubscribe' | 'event' | 'snapshot' | 'action' | 'error';
225
+ /**
226
+ * WebSocket message
227
+ */
228
+ interface WebSocketMessage<T = unknown> {
229
+ type: WebSocketMessageType;
230
+ channel?: string;
231
+ data?: T;
232
+ error?: string;
233
+ timestamp: number;
234
+ }
235
+
236
+ export { type APIResponse as A, type CORSOptions as C, type RateLimitOptions as R, type UIBridgeServerConfig as U, type WebSocketMessage as W, type RenderLogQuery as a, type RouteDefinition as b, type UIBridgeServerHandlers as c, UI_BRIDGE_ROUTES as d, type WebSocketMessageType as e };