@qontinui/ui-bridge 0.3.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 +23 -34
- package/dist/babel-plugin/index.js.map +1 -1
- package/dist/babel-plugin/index.mjs +23 -34
- package/dist/babel-plugin/index.mjs.map +1 -1
- 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 +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js.map +1 -1
- 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 +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +4720 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4656 -174
- package/dist/index.mjs.map +1 -1
- package/dist/{metrics-DTA2bwG7.d.mts → metrics-DuA2qIIz.d.mts} +2 -2
- package/dist/{metrics-BfiT_rhZ.d.ts → metrics-KFAAKNEB.d.ts} +2 -2
- package/dist/native/control/index.js +2 -7
- package/dist/native/control/index.js.map +1 -1
- package/dist/native/control/index.mjs +2 -7
- package/dist/native/control/index.mjs.map +1 -1
- package/dist/native/core/index.js.map +1 -1
- package/dist/native/core/index.mjs.map +1 -1
- package/dist/native/debug/index.js +23 -66
- package/dist/native/debug/index.js.map +1 -1
- package/dist/native/debug/index.mjs +23 -66
- package/dist/native/debug/index.mjs.map +1 -1
- package/dist/native/index.js +89 -131
- package/dist/native/index.js.map +1 -1
- package/dist/native/index.mjs +89 -131
- package/dist/native/index.mjs.map +1 -1
- package/dist/native/react/index.js +28 -52
- package/dist/native/react/index.js.map +1 -1
- package/dist/native/react/index.mjs +28 -52
- package/dist/native/react/index.mjs.map +1 -1
- package/dist/native/server/index.js +38 -13
- package/dist/native/server/index.js.map +1 -1
- package/dist/native/server/index.mjs +38 -13
- package/dist/native/server/index.mjs.map +1 -1
- package/dist/react/index.d.mts +107 -8
- package/dist/react/index.d.ts +107 -8
- package/dist/react/index.js +2194 -84
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +2194 -85
- package/dist/react/index.mjs.map +1 -1
- package/dist/{registry-BKLEm-yk.d.ts → registry-C6dDtn1v.d.ts} +27 -2
- package/dist/{registry-BmZgyCz8.d.mts → registry-POtcxnal.d.mts} +27 -2
- package/dist/render-log/index.d.mts +1 -1
- package/dist/render-log/index.d.ts +1 -1
- package/dist/server/express.d.mts +5 -4
- package/dist/server/express.d.ts +5 -4
- package/dist/server/express.js +104 -2
- package/dist/server/express.js.map +1 -1
- package/dist/server/express.mjs +104 -2
- package/dist/server/express.mjs.map +1 -1
- package/dist/server/handlers.d.mts +36 -5
- package/dist/server/handlers.d.ts +36 -5
- package/dist/server/handlers.js +3129 -224
- package/dist/server/handlers.js.map +1 -1
- package/dist/server/handlers.mjs +3129 -224
- package/dist/server/handlers.mjs.map +1 -1
- package/dist/server/index.d.mts +7 -5
- package/dist/server/index.d.ts +7 -5
- package/dist/server/index.js +3215 -183
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +3215 -183
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/nextjs.d.mts +6 -4
- package/dist/server/nextjs.d.ts +6 -4
- package/dist/server/nextjs.js +106 -3
- package/dist/server/nextjs.js.map +1 -1
- package/dist/server/nextjs.mjs +106 -3
- package/dist/server/nextjs.mjs.map +1 -1
- package/dist/server/standalone.d.mts +6 -5
- package/dist/server/standalone.d.ts +6 -5
- package/dist/server/standalone.js +131 -5
- package/dist/server/standalone.js.map +1 -1
- package/dist/server/standalone.mjs +131 -5
- package/dist/server/standalone.mjs.map +1 -1
- 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-BURj8J3G.d.ts → standalone-B6GLIEmR.d.ts} +6 -2
- package/dist/{standalone-Dwmel29d.d.mts → standalone-CjdYqj3P.d.mts} +6 -2
- package/dist/{types-CHnlwiTK.d.ts → types-B2EfvEaq.d.ts} +83 -3
- package/dist/{types-B7J7noLK.d.mts → types-C7gVYRnF.d.ts} +72 -2
- package/dist/{types-BkNRILUa.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-CEQLnFMv.d.mts → types-gO696T_t.d.mts} +83 -3
- package/dist/{types-jKVgTI6_.d.mts → types-suaYwWWg.d.mts} +173 -2
- package/dist/{types-jKVgTI6_.d.ts → types-suaYwWWg.d.ts} +173 -2
- package/package.json +18 -2
- package/dist/types-B5Q0GVo0.d.mts +0 -646
- package/dist/types-DfPqwU-i.d.ts +0 -646
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as ControlSnapshot, b as ControlActionRequest, c as ControlActionResponse, C as ComponentActionRequest, a as ComponentActionResponse, F as FindRequest,
|
|
3
|
-
import {
|
|
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
4
|
import { RenderLogEntryType, RenderLogEntry } from './render-log/index.js';
|
|
5
|
+
import { E as ElementAnnotation, a as AnnotationConfig, b as AnnotationCoverage } from './types-UBtp7R0u.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* UI Bridge Server Types
|
|
@@ -115,6 +116,16 @@ interface UIBridgeServerHandlers {
|
|
|
115
116
|
getMetrics: () => Promise<APIResponse<unknown>>;
|
|
116
117
|
highlightElement: (id: string) => Promise<APIResponse<void>>;
|
|
117
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
|
+
}>>;
|
|
118
129
|
aiSearch: (criteria: SearchCriteria) => Promise<APIResponse<SearchResponse>>;
|
|
119
130
|
aiExecute: (request: NLActionRequest) => Promise<APIResponse<NLActionResponse>>;
|
|
120
131
|
aiAssert: (request: AssertionRequest) => Promise<APIResponse<AssertionResult>>;
|
|
@@ -123,6 +134,75 @@ interface UIBridgeServerHandlers {
|
|
|
123
134
|
getSemanticDiff: (since?: number) => Promise<APIResponse<SemanticDiff | null>>;
|
|
124
135
|
getPageSummary: () => Promise<APIResponse<string>>;
|
|
125
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
|
+
}>>;
|
|
126
206
|
}
|
|
127
207
|
/**
|
|
128
208
|
* Route definition
|
|
@@ -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 };
|