@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.
- package/dist/ai/index.d.mts +312 -155
- package/dist/ai/index.d.ts +312 -155
- package/dist/ai/index.js +2363 -67
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/index.mjs +2328 -68
- package/dist/ai/index.mjs.map +1 -1
- package/dist/annotations/index.d.mts +218 -0
- package/dist/annotations/index.d.ts +218 -0
- package/dist/annotations/index.js +246 -0
- package/dist/annotations/index.js.map +1 -0
- package/dist/annotations/index.mjs +241 -0
- package/dist/annotations/index.mjs.map +1 -0
- package/dist/assertions-BSR3afVr.d.ts +161 -0
- package/dist/assertions-CTw1hfOx.d.mts +161 -0
- package/dist/babel-plugin/index.js +504 -0
- package/dist/babel-plugin/index.js.map +1 -0
- package/dist/babel-plugin/index.mjs +488 -0
- package/dist/babel-plugin/index.mjs.map +1 -0
- package/dist/browser-capture-Bms60T6f.d.mts +47 -0
- package/dist/browser-capture-CsTU29mb.d.ts +47 -0
- package/dist/control/index.d.mts +26 -7
- package/dist/control/index.d.ts +26 -7
- package/dist/control/index.js +276 -48
- package/dist/control/index.js.map +1 -1
- package/dist/control/index.mjs +276 -48
- package/dist/control/index.mjs.map +1 -1
- package/dist/core/index.d.mts +115 -44
- package/dist/core/index.d.ts +115 -44
- package/dist/core/index.js +0 -1560
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +1 -1549
- package/dist/core/index.mjs.map +1 -1
- package/dist/debug/index.d.mts +5 -3
- package/dist/debug/index.d.ts +5 -3
- package/dist/debug/index.js +925 -1
- package/dist/debug/index.js.map +1 -1
- package/dist/debug/index.mjs +924 -2
- package/dist/debug/index.mjs.map +1 -1
- package/dist/index.d.mts +13 -9
- package/dist/index.d.ts +13 -9
- package/dist/index.js +8310 -3777
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8246 -3766
- package/dist/index.mjs.map +1 -1
- package/dist/{metrics-NC3csD0R.d.mts → metrics-DuA2qIIz.d.mts} +2 -2
- package/dist/{metrics-C9XRi_mL.d.ts → metrics-KFAAKNEB.d.ts} +2 -2
- package/dist/native/control/index.js +448 -0
- package/dist/native/control/index.js.map +1 -0
- package/dist/native/control/index.mjs +445 -0
- package/dist/native/control/index.mjs.map +1 -0
- package/dist/native/core/index.js +486 -0
- package/dist/native/core/index.js.map +1 -0
- package/dist/native/core/index.mjs +475 -0
- package/dist/native/core/index.mjs.map +1 -0
- package/dist/native/debug/index.js +408 -0
- package/dist/native/debug/index.js.map +1 -0
- package/dist/native/debug/index.mjs +406 -0
- package/dist/native/debug/index.mjs.map +1 -0
- package/dist/native/index.js +2232 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/index.mjs +2204 -0
- package/dist/native/index.mjs.map +1 -0
- package/dist/native/react/index.js +1377 -0
- package/dist/native/react/index.js.map +1 -0
- package/dist/native/react/index.mjs +1365 -0
- package/dist/native/react/index.mjs.map +1 -0
- package/dist/native/server/index.js +440 -0
- package/dist/native/server/index.js.map +1 -0
- package/dist/native/server/index.mjs +435 -0
- package/dist/native/server/index.mjs.map +1 -0
- package/dist/react/index.d.mts +121 -9
- package/dist/react/index.d.ts +121 -9
- package/dist/react/index.js +2239 -91
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +2239 -92
- package/dist/react/index.mjs.map +1 -1
- package/dist/{registry-CIEDjbQ9.d.ts → registry-C6dDtn1v.d.ts} +34 -15
- package/dist/{registry-SsSDq46X.d.mts → registry-POtcxnal.d.mts} +34 -15
- package/dist/render-log/index.d.mts +1 -1
- package/dist/render-log/index.d.ts +1 -1
- package/dist/server/express.d.mts +37 -0
- package/dist/server/express.d.ts +37 -0
- package/dist/server/express.js +298 -0
- package/dist/server/express.js.map +1 -0
- package/dist/server/express.mjs +294 -0
- package/dist/server/express.mjs.map +1 -0
- package/dist/server/handlers.d.mts +124 -0
- package/dist/server/handlers.d.ts +124 -0
- package/dist/server/handlers.js +7183 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/handlers.mjs +7180 -0
- package/dist/server/handlers.mjs.map +1 -0
- package/dist/server/index.d.mts +12 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.js +8384 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +8369 -0
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/nextjs.d.mts +128 -0
- package/dist/server/nextjs.d.ts +128 -0
- package/dist/server/nextjs.js +390 -0
- package/dist/server/nextjs.js.map +1 -0
- package/dist/server/nextjs.mjs +385 -0
- package/dist/server/nextjs.mjs.map +1 -0
- package/dist/server/standalone.d.mts +7 -0
- package/dist/server/standalone.d.ts +7 -0
- package/dist/server/standalone.js +845 -0
- package/dist/server/standalone.js.map +1 -0
- package/dist/server/standalone.mjs +841 -0
- package/dist/server/standalone.mjs.map +1 -0
- package/dist/specs/index.d.mts +365 -0
- package/dist/specs/index.d.ts +365 -0
- package/dist/specs/index.js +2809 -0
- package/dist/specs/index.js.map +1 -0
- package/dist/specs/index.mjs +2786 -0
- package/dist/specs/index.mjs.map +1 -0
- package/dist/standalone-B6GLIEmR.d.ts +216 -0
- package/dist/standalone-CjdYqj3P.d.mts +216 -0
- package/dist/swc-plugin/index.d.mts +79 -0
- package/dist/swc-plugin/index.d.ts +79 -0
- package/dist/swc-plugin/index.js +15 -0
- package/dist/swc-plugin/index.js.map +1 -0
- package/dist/swc-plugin/index.mjs +9 -0
- package/dist/swc-plugin/index.mjs.map +1 -0
- package/dist/types-B2EfvEaq.d.ts +236 -0
- package/dist/{types-Dr6tH-bm.d.mts → types-C7gVYRnF.d.ts} +72 -2
- package/dist/{types-oCTrRxSw.d.ts → types-CJGrBEhC.d.mts} +72 -2
- package/dist/types-CebMQj76.d.ts +1275 -0
- package/dist/types-D_ypYl3T.d.mts +1275 -0
- package/dist/types-UBtp7R0u.d.mts +132 -0
- package/dist/types-UBtp7R0u.d.ts +132 -0
- package/dist/types-gO696T_t.d.mts +236 -0
- package/dist/{types-CPMbN_Iw.d.mts → types-suaYwWWg.d.mts} +519 -152
- package/dist/{types-CPMbN_Iw.d.ts → types-suaYwWWg.d.ts} +519 -152
- package/package.json +123 -4
- package/swc-plugin-wasm/ui_bridge_swc_plugin.wasm +0 -0
- package/dist/types-BvCfFuEV.d.ts +0 -534
- package/dist/types-CFT3Dnx4.d.mts +0 -534
- package/dist/websocket-client-CX4QJesI.d.ts +0 -124
- package/dist/websocket-client-C_Na0OSp.d.mts +0 -124
|
@@ -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.js';
|
|
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-C7gVYRnF.js';
|
|
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-CebMQj76.js';
|
|
4
|
+
import { RenderLogEntryType, RenderLogEntry } from './render-log/index.js';
|
|
5
|
+
import { E as ElementAnnotation, a as AnnotationConfig, b as AnnotationCoverage } from './types-UBtp7R0u.js';
|
|
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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z as ElementState, u as ContentMetadata, f as ActionRequest, g as ActionResponse, ax as WaitOptions } from './types-suaYwWWg.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Control Module Types
|
|
@@ -153,6 +153,10 @@ interface DiscoveredElement {
|
|
|
153
153
|
state: ElementState;
|
|
154
154
|
/** Whether registered with UI Bridge */
|
|
155
155
|
registered: boolean;
|
|
156
|
+
/** Whether this is an interactive element or static content */
|
|
157
|
+
category?: 'interactive' | 'content';
|
|
158
|
+
/** Metadata for content elements */
|
|
159
|
+
contentMetadata?: ContentMetadata;
|
|
156
160
|
}
|
|
157
161
|
/**
|
|
158
162
|
* Find request options
|
|
@@ -172,6 +176,12 @@ interface FindRequest {
|
|
|
172
176
|
types?: string[];
|
|
173
177
|
/** Filter by selector */
|
|
174
178
|
selector?: string;
|
|
179
|
+
/** Include content (non-interactive) elements in results */
|
|
180
|
+
includeContent?: boolean;
|
|
181
|
+
/** Only return content elements */
|
|
182
|
+
contentOnly?: boolean;
|
|
183
|
+
/** Filter by content role */
|
|
184
|
+
contentRole?: string;
|
|
175
185
|
}
|
|
176
186
|
/**
|
|
177
187
|
* Find response
|
|
@@ -209,6 +219,8 @@ interface ControlSnapshot {
|
|
|
209
219
|
label?: string;
|
|
210
220
|
actions: string[];
|
|
211
221
|
state: ElementState;
|
|
222
|
+
category?: 'interactive' | 'content';
|
|
223
|
+
contentMetadata?: ContentMetadata;
|
|
212
224
|
}>;
|
|
213
225
|
/** All registered components */
|
|
214
226
|
components: Array<{
|
|
@@ -247,6 +259,46 @@ interface KeyboardAction {
|
|
|
247
259
|
/** Hold duration for key press */
|
|
248
260
|
holdDuration?: number;
|
|
249
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Drag action parameters
|
|
264
|
+
*
|
|
265
|
+
* Drags the source element to a target element or position by dispatching
|
|
266
|
+
* a sequence of mouse events: mousedown → mousemove × N → mouseup.
|
|
267
|
+
* Optionally dispatches HTML5 drag events (dragstart, dragover, drop, dragend)
|
|
268
|
+
* for applications that listen to those instead of mouse events.
|
|
269
|
+
*/
|
|
270
|
+
interface DragAction {
|
|
271
|
+
/** Target element to drag to (resolved via registry or DOM query) */
|
|
272
|
+
target?: {
|
|
273
|
+
/** UI Bridge element ID (checked in registry first) */
|
|
274
|
+
elementId?: string;
|
|
275
|
+
/** CSS selector */
|
|
276
|
+
selector?: string;
|
|
277
|
+
};
|
|
278
|
+
/** Target coordinates (absolute client position, alternative to target element) */
|
|
279
|
+
targetPosition?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
};
|
|
283
|
+
/** Source offset from element center in pixels (default: element center) */
|
|
284
|
+
sourceOffset?: {
|
|
285
|
+
x: number;
|
|
286
|
+
y: number;
|
|
287
|
+
};
|
|
288
|
+
/** Target offset from target element center in pixels (default: element center) */
|
|
289
|
+
targetOffset?: {
|
|
290
|
+
x: number;
|
|
291
|
+
y: number;
|
|
292
|
+
};
|
|
293
|
+
/** Number of intermediate mousemove steps (default: 10) */
|
|
294
|
+
steps?: number;
|
|
295
|
+
/** Delay in ms between mousedown and first move (default: 100) */
|
|
296
|
+
holdDelay?: number;
|
|
297
|
+
/** Delay in ms after mouseup (default: 50) */
|
|
298
|
+
releaseDelay?: number;
|
|
299
|
+
/** Also dispatch HTML5 drag events (dragstart/dragover/drop/dragend) alongside mouse events (default: false) */
|
|
300
|
+
html5?: boolean;
|
|
301
|
+
}
|
|
250
302
|
/**
|
|
251
303
|
* Action types for mouse input
|
|
252
304
|
*/
|
|
@@ -318,6 +370,24 @@ interface WaitResult {
|
|
|
318
370
|
/** Error if timed out */
|
|
319
371
|
error?: string;
|
|
320
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Page navigation request
|
|
375
|
+
*/
|
|
376
|
+
interface PageNavigateRequest {
|
|
377
|
+
/** URL to navigate to */
|
|
378
|
+
url: string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Page navigation response
|
|
382
|
+
*/
|
|
383
|
+
interface PageNavigationResponse {
|
|
384
|
+
/** Whether the navigation succeeded */
|
|
385
|
+
success: boolean;
|
|
386
|
+
/** Current URL after navigation */
|
|
387
|
+
url?: string;
|
|
388
|
+
/** Timestamp */
|
|
389
|
+
timestamp: number;
|
|
390
|
+
}
|
|
321
391
|
/**
|
|
322
392
|
* Action executor interface
|
|
323
393
|
*/
|
|
@@ -351,4 +421,4 @@ interface WorkflowEngine {
|
|
|
351
421
|
listActiveRuns(): Promise<WorkflowRunResponse[]>;
|
|
352
422
|
}
|
|
353
423
|
|
|
354
|
-
export type { ActionExecutor as A, ComponentActionRequest as C, DiscoveredElement as D, FindRequest as F, KeyboardAction as K, MouseAction as M, ScrollAction as S, TypeAction as T, WaitResult as W, ComponentActionResponse as a, ControlActionRequest as b, ControlActionResponse as c, ControlSnapshot as d, DiscoveryRequest as e, DiscoveryResponse as f,
|
|
424
|
+
export type { ActionExecutor as A, ComponentActionRequest as C, DiscoveredElement as D, FindRequest as F, KeyboardAction as K, MouseAction as M, PageNavigateRequest as P, ScrollAction as S, TypeAction as T, WaitResult as W, ComponentActionResponse as a, ControlActionRequest as b, ControlActionResponse as c, ControlSnapshot as d, DiscoveryRequest as e, DiscoveryResponse as f, DragAction as g, FindResponse as h, PageNavigationResponse as i, SelectAction as j, WorkflowEngine as k, WorkflowRunRequest as l, WorkflowRunResponse as m, WorkflowRunStatus as n, WorkflowStepResult as o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z as ElementState, u as ContentMetadata, f as ActionRequest, g as ActionResponse, ax as WaitOptions } from './types-suaYwWWg.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Control Module Types
|
|
@@ -153,6 +153,10 @@ interface DiscoveredElement {
|
|
|
153
153
|
state: ElementState;
|
|
154
154
|
/** Whether registered with UI Bridge */
|
|
155
155
|
registered: boolean;
|
|
156
|
+
/** Whether this is an interactive element or static content */
|
|
157
|
+
category?: 'interactive' | 'content';
|
|
158
|
+
/** Metadata for content elements */
|
|
159
|
+
contentMetadata?: ContentMetadata;
|
|
156
160
|
}
|
|
157
161
|
/**
|
|
158
162
|
* Find request options
|
|
@@ -172,6 +176,12 @@ interface FindRequest {
|
|
|
172
176
|
types?: string[];
|
|
173
177
|
/** Filter by selector */
|
|
174
178
|
selector?: string;
|
|
179
|
+
/** Include content (non-interactive) elements in results */
|
|
180
|
+
includeContent?: boolean;
|
|
181
|
+
/** Only return content elements */
|
|
182
|
+
contentOnly?: boolean;
|
|
183
|
+
/** Filter by content role */
|
|
184
|
+
contentRole?: string;
|
|
175
185
|
}
|
|
176
186
|
/**
|
|
177
187
|
* Find response
|
|
@@ -209,6 +219,8 @@ interface ControlSnapshot {
|
|
|
209
219
|
label?: string;
|
|
210
220
|
actions: string[];
|
|
211
221
|
state: ElementState;
|
|
222
|
+
category?: 'interactive' | 'content';
|
|
223
|
+
contentMetadata?: ContentMetadata;
|
|
212
224
|
}>;
|
|
213
225
|
/** All registered components */
|
|
214
226
|
components: Array<{
|
|
@@ -247,6 +259,46 @@ interface KeyboardAction {
|
|
|
247
259
|
/** Hold duration for key press */
|
|
248
260
|
holdDuration?: number;
|
|
249
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Drag action parameters
|
|
264
|
+
*
|
|
265
|
+
* Drags the source element to a target element or position by dispatching
|
|
266
|
+
* a sequence of mouse events: mousedown → mousemove × N → mouseup.
|
|
267
|
+
* Optionally dispatches HTML5 drag events (dragstart, dragover, drop, dragend)
|
|
268
|
+
* for applications that listen to those instead of mouse events.
|
|
269
|
+
*/
|
|
270
|
+
interface DragAction {
|
|
271
|
+
/** Target element to drag to (resolved via registry or DOM query) */
|
|
272
|
+
target?: {
|
|
273
|
+
/** UI Bridge element ID (checked in registry first) */
|
|
274
|
+
elementId?: string;
|
|
275
|
+
/** CSS selector */
|
|
276
|
+
selector?: string;
|
|
277
|
+
};
|
|
278
|
+
/** Target coordinates (absolute client position, alternative to target element) */
|
|
279
|
+
targetPosition?: {
|
|
280
|
+
x: number;
|
|
281
|
+
y: number;
|
|
282
|
+
};
|
|
283
|
+
/** Source offset from element center in pixels (default: element center) */
|
|
284
|
+
sourceOffset?: {
|
|
285
|
+
x: number;
|
|
286
|
+
y: number;
|
|
287
|
+
};
|
|
288
|
+
/** Target offset from target element center in pixels (default: element center) */
|
|
289
|
+
targetOffset?: {
|
|
290
|
+
x: number;
|
|
291
|
+
y: number;
|
|
292
|
+
};
|
|
293
|
+
/** Number of intermediate mousemove steps (default: 10) */
|
|
294
|
+
steps?: number;
|
|
295
|
+
/** Delay in ms between mousedown and first move (default: 100) */
|
|
296
|
+
holdDelay?: number;
|
|
297
|
+
/** Delay in ms after mouseup (default: 50) */
|
|
298
|
+
releaseDelay?: number;
|
|
299
|
+
/** Also dispatch HTML5 drag events (dragstart/dragover/drop/dragend) alongside mouse events (default: false) */
|
|
300
|
+
html5?: boolean;
|
|
301
|
+
}
|
|
250
302
|
/**
|
|
251
303
|
* Action types for mouse input
|
|
252
304
|
*/
|
|
@@ -318,6 +370,24 @@ interface WaitResult {
|
|
|
318
370
|
/** Error if timed out */
|
|
319
371
|
error?: string;
|
|
320
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Page navigation request
|
|
375
|
+
*/
|
|
376
|
+
interface PageNavigateRequest {
|
|
377
|
+
/** URL to navigate to */
|
|
378
|
+
url: string;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Page navigation response
|
|
382
|
+
*/
|
|
383
|
+
interface PageNavigationResponse {
|
|
384
|
+
/** Whether the navigation succeeded */
|
|
385
|
+
success: boolean;
|
|
386
|
+
/** Current URL after navigation */
|
|
387
|
+
url?: string;
|
|
388
|
+
/** Timestamp */
|
|
389
|
+
timestamp: number;
|
|
390
|
+
}
|
|
321
391
|
/**
|
|
322
392
|
* Action executor interface
|
|
323
393
|
*/
|
|
@@ -351,4 +421,4 @@ interface WorkflowEngine {
|
|
|
351
421
|
listActiveRuns(): Promise<WorkflowRunResponse[]>;
|
|
352
422
|
}
|
|
353
423
|
|
|
354
|
-
export type { ActionExecutor as A, ComponentActionRequest as C, DiscoveredElement as D, FindRequest as F, KeyboardAction as K, MouseAction as M, ScrollAction as S, TypeAction as T, WaitResult as W, ComponentActionResponse as a, ControlActionRequest as b, ControlActionResponse as c, ControlSnapshot as d, DiscoveryRequest as e, DiscoveryResponse as f,
|
|
424
|
+
export type { ActionExecutor as A, ComponentActionRequest as C, DiscoveredElement as D, FindRequest as F, KeyboardAction as K, MouseAction as M, PageNavigateRequest as P, ScrollAction as S, TypeAction as T, WaitResult as W, ComponentActionResponse as a, ControlActionRequest as b, ControlActionResponse as c, ControlSnapshot as d, DiscoveryRequest as e, DiscoveryResponse as f, DragAction as g, FindResponse as h, PageNavigationResponse as i, SelectAction as j, WorkflowEngine as k, WorkflowRunRequest as l, WorkflowRunResponse as m, WorkflowRunStatus as n, WorkflowStepResult as o };
|