@qontinui/ui-bridge 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/index.d.mts +4 -4
- package/dist/ai/index.d.ts +4 -4
- package/dist/babel-plugin/index.js +515 -0
- package/dist/babel-plugin/index.js.map +1 -0
- package/dist/babel-plugin/index.mjs +499 -0
- package/dist/babel-plugin/index.mjs.map +1 -0
- package/dist/control/index.d.mts +5 -5
- package/dist/control/index.d.ts +5 -5
- 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 +3 -3
- package/dist/debug/index.d.ts +3 -3
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +859 -873
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +860 -862
- package/dist/index.mjs.map +1 -1
- package/dist/{metrics-C9XRi_mL.d.ts → metrics-BfiT_rhZ.d.ts} +2 -2
- package/dist/{metrics-NC3csD0R.d.mts → metrics-DTA2bwG7.d.mts} +2 -2
- package/dist/native/control/index.js +453 -0
- package/dist/native/control/index.js.map +1 -0
- package/dist/native/control/index.mjs +450 -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 +451 -0
- package/dist/native/debug/index.js.map +1 -0
- package/dist/native/debug/index.mjs +449 -0
- package/dist/native/debug/index.mjs.map +1 -0
- package/dist/native/index.js +2274 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/index.mjs +2246 -0
- package/dist/native/index.mjs.map +1 -0
- package/dist/native/react/index.js +1401 -0
- package/dist/native/react/index.js.map +1 -0
- package/dist/native/react/index.mjs +1389 -0
- package/dist/native/react/index.mjs.map +1 -0
- package/dist/native/server/index.js +415 -0
- package/dist/native/server/index.js.map +1 -0
- package/dist/native/server/index.mjs +410 -0
- package/dist/native/server/index.mjs.map +1 -0
- package/dist/react/index.d.mts +20 -7
- package/dist/react/index.d.ts +20 -7
- package/dist/react/index.js +42 -4
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +42 -4
- package/dist/react/index.mjs.map +1 -1
- package/dist/{registry-CIEDjbQ9.d.ts → registry-BKLEm-yk.d.ts} +9 -15
- package/dist/{registry-SsSDq46X.d.mts → registry-BmZgyCz8.d.mts} +9 -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 +36 -0
- package/dist/server/express.d.ts +36 -0
- package/dist/server/express.js +196 -0
- package/dist/server/express.js.map +1 -0
- package/dist/server/express.mjs +192 -0
- package/dist/server/express.mjs.map +1 -0
- package/dist/server/handlers.d.mts +93 -0
- package/dist/server/handlers.d.ts +93 -0
- package/dist/server/handlers.js +4278 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/handlers.mjs +4275 -0
- package/dist/server/handlers.mjs.map +1 -0
- package/dist/server/index.d.mts +10 -0
- package/dist/server/index.d.ts +10 -0
- package/dist/server/index.js +5352 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +5337 -0
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/nextjs.d.mts +126 -0
- package/dist/server/nextjs.d.ts +126 -0
- package/dist/server/nextjs.js +287 -0
- package/dist/server/nextjs.js.map +1 -0
- package/dist/server/nextjs.mjs +282 -0
- package/dist/server/nextjs.mjs.map +1 -0
- package/dist/server/standalone.d.mts +6 -0
- package/dist/server/standalone.d.ts +6 -0
- package/dist/server/standalone.js +719 -0
- package/dist/server/standalone.js.map +1 -0
- package/dist/server/standalone.mjs +715 -0
- package/dist/server/standalone.mjs.map +1 -0
- package/dist/standalone-BURj8J3G.d.ts +212 -0
- package/dist/standalone-Dwmel29d.d.mts +212 -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-CFT3Dnx4.d.mts → types-B5Q0GVo0.d.mts} +115 -3
- package/dist/{types-Dr6tH-bm.d.mts → types-B7J7noLK.d.mts} +1 -1
- package/dist/{types-oCTrRxSw.d.ts → types-BkNRILUa.d.ts} +1 -1
- package/dist/types-CEQLnFMv.d.mts +156 -0
- package/dist/types-CHnlwiTK.d.ts +156 -0
- package/dist/{types-BvCfFuEV.d.ts → types-DfPqwU-i.d.ts} +115 -3
- package/dist/{types-CPMbN_Iw.d.mts → types-jKVgTI6_.d.mts} +356 -160
- package/dist/{types-CPMbN_Iw.d.ts → types-jKVgTI6_.d.ts} +356 -160
- package/package.json +106 -3
- package/swc-plugin-wasm/ui_bridge_swc_plugin.wasm +0 -0
- package/dist/websocket-client-CX4QJesI.d.ts +0 -124
- package/dist/websocket-client-C_Na0OSp.d.mts +0 -124
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UI Bridge Core Types
|
|
3
3
|
*
|
|
4
|
-
* Defines the fundamental types used throughout the UI Bridge framework
|
|
4
|
+
* Defines the fundamental types used throughout the UI Bridge framework,
|
|
5
|
+
* plus ui-bridge-specific types (WebSocket protocol, accessibility, extended workflow types).
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
* Element identification using multiple strategies
|
|
@@ -117,6 +118,10 @@ interface RegisteredElement {
|
|
|
117
118
|
/** Purpose of the element */
|
|
118
119
|
purpose?: string;
|
|
119
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Generic state getter function
|
|
123
|
+
*/
|
|
124
|
+
type StateGetter<T = unknown> = () => T;
|
|
120
125
|
/**
|
|
121
126
|
* Component action definition
|
|
122
127
|
*/
|
|
@@ -150,6 +155,10 @@ interface RegisteredComponent {
|
|
|
150
155
|
registeredAt: number;
|
|
151
156
|
/** Whether this component is currently mounted */
|
|
152
157
|
mounted: boolean;
|
|
158
|
+
/** State getter function */
|
|
159
|
+
getState?: StateGetter<Record<string, unknown>>;
|
|
160
|
+
/** Computed properties getter function */
|
|
161
|
+
getComputed?: () => Record<string, unknown>;
|
|
153
162
|
}
|
|
154
163
|
/**
|
|
155
164
|
* Workflow step types
|
|
@@ -252,6 +261,25 @@ interface WorkflowStep {
|
|
|
252
261
|
/** Log configuration (type: 'log') */
|
|
253
262
|
logConfig?: LogConfig;
|
|
254
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Extended workflow step with additional branch/loop/extract support
|
|
266
|
+
*/
|
|
267
|
+
interface ExtendedWorkflowStep extends WorkflowStep {
|
|
268
|
+
/** Branch condition (type: 'branch') */
|
|
269
|
+
branchCondition?: BranchCondition;
|
|
270
|
+
/** Steps to execute if branch condition is true */
|
|
271
|
+
thenSteps?: ExtendedWorkflowStep[];
|
|
272
|
+
/** Steps to execute if branch condition is false */
|
|
273
|
+
elseSteps?: ExtendedWorkflowStep[];
|
|
274
|
+
/** Loop configuration (type: 'loop') */
|
|
275
|
+
loopConfig?: LoopConfig;
|
|
276
|
+
/** Steps to execute in loop */
|
|
277
|
+
loopSteps?: ExtendedWorkflowStep[];
|
|
278
|
+
/** Extract configuration (type: 'extract') */
|
|
279
|
+
extractConfig?: ExtractConfig;
|
|
280
|
+
/** Log configuration (type: 'log') */
|
|
281
|
+
logConfig?: LogConfig;
|
|
282
|
+
}
|
|
255
283
|
/**
|
|
256
284
|
* Workflow definition
|
|
257
285
|
*/
|
|
@@ -333,6 +361,67 @@ interface ActionResponse {
|
|
|
333
361
|
/** Timestamp when the action completed */
|
|
334
362
|
timestamp: number;
|
|
335
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Machine-readable error codes for action failures
|
|
366
|
+
*/
|
|
367
|
+
type ActionErrorCode = 'ELEMENT_NOT_FOUND' | 'ELEMENT_NOT_VISIBLE' | 'ELEMENT_NOT_ENABLED' | 'ELEMENT_NOT_INTERACTABLE' | 'ACTION_TIMEOUT' | 'ACTION_REJECTED' | 'STATE_NOT_REACHED' | 'NETWORK_ERROR' | 'PARSE_ERROR' | 'VALIDATION_ERROR' | 'AMBIGUOUS_MATCH' | 'LOW_CONFIDENCE' | 'UNSUPPORTED_ACTION' | 'UNKNOWN_ERROR';
|
|
368
|
+
/**
|
|
369
|
+
* Partial element match found during search
|
|
370
|
+
*/
|
|
371
|
+
interface PartialMatch {
|
|
372
|
+
/** Element ID of the partial match */
|
|
373
|
+
elementId: string;
|
|
374
|
+
/** Match confidence score (0-1) */
|
|
375
|
+
confidence: number;
|
|
376
|
+
/** Reason for partial match */
|
|
377
|
+
reason: string;
|
|
378
|
+
/** Type of match */
|
|
379
|
+
type: string;
|
|
380
|
+
/** Description of the match */
|
|
381
|
+
description?: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Suggested recovery action
|
|
385
|
+
*/
|
|
386
|
+
interface RecoveryAction {
|
|
387
|
+
/** Human-readable suggestion */
|
|
388
|
+
suggestion: string;
|
|
389
|
+
/** Optional command to execute */
|
|
390
|
+
command?: string;
|
|
391
|
+
/** Confidence score (0-1) */
|
|
392
|
+
confidence: number;
|
|
393
|
+
/** Whether the original action can be retried */
|
|
394
|
+
retryable: boolean;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Structured error details for action failures
|
|
398
|
+
*/
|
|
399
|
+
interface ActionFailureDetails {
|
|
400
|
+
/** Machine-readable error code */
|
|
401
|
+
errorCode: ActionErrorCode;
|
|
402
|
+
/** Human-readable error message */
|
|
403
|
+
message: string;
|
|
404
|
+
/** Element ID that was targeted */
|
|
405
|
+
elementId?: string;
|
|
406
|
+
/** CSS selectors that were tried */
|
|
407
|
+
selectorsTried?: string[];
|
|
408
|
+
/** Partial matches found during element search */
|
|
409
|
+
partialMatches?: PartialMatch[];
|
|
410
|
+
/** Element state at time of failure */
|
|
411
|
+
elementState?: ElementState;
|
|
412
|
+
/** Screenshot context (base64 or URL) */
|
|
413
|
+
screenshotContext?: string;
|
|
414
|
+
/** Suggested recovery actions */
|
|
415
|
+
suggestedActions: RecoveryAction[];
|
|
416
|
+
/** Whether retrying is recommended */
|
|
417
|
+
retryRecommended: boolean;
|
|
418
|
+
/** Additional context */
|
|
419
|
+
context?: Record<string, unknown>;
|
|
420
|
+
/** Duration of the action in milliseconds */
|
|
421
|
+
durationMs?: number;
|
|
422
|
+
/** Timeout that was configured in milliseconds */
|
|
423
|
+
timeoutMs?: number;
|
|
424
|
+
}
|
|
336
425
|
/**
|
|
337
426
|
* Snapshot of the entire UI bridge state
|
|
338
427
|
*/
|
|
@@ -365,6 +454,22 @@ interface BridgeSnapshot {
|
|
|
365
454
|
stepCount: number;
|
|
366
455
|
}>;
|
|
367
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* Event types emitted by the bridge
|
|
459
|
+
*/
|
|
460
|
+
type BridgeEventType = 'element:registered' | 'element:unregistered' | 'element:stateChanged' | 'component:registered' | 'component:unregistered' | 'action:started' | 'action:completed' | 'action:failed' | 'workflow:started' | 'workflow:stepCompleted' | 'workflow:completed' | 'workflow:failed' | 'render:snapshot' | 'error';
|
|
461
|
+
/**
|
|
462
|
+
* Event payload structure
|
|
463
|
+
*/
|
|
464
|
+
interface BridgeEvent<T = unknown> {
|
|
465
|
+
type: BridgeEventType;
|
|
466
|
+
timestamp: number;
|
|
467
|
+
data: T;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Event listener function
|
|
471
|
+
*/
|
|
472
|
+
type BridgeEventListener<T = unknown> = (event: BridgeEvent<T>) => void;
|
|
368
473
|
/**
|
|
369
474
|
* UI Bridge feature flags
|
|
370
475
|
*/
|
|
@@ -396,21 +501,161 @@ interface UIBridgeConfig {
|
|
|
396
501
|
verbose?: boolean;
|
|
397
502
|
}
|
|
398
503
|
/**
|
|
399
|
-
*
|
|
504
|
+
* Computed property definition
|
|
400
505
|
*/
|
|
401
|
-
|
|
506
|
+
interface ComputedProperty<T = unknown> {
|
|
507
|
+
/** Getter function for the computed value */
|
|
508
|
+
getter: () => T;
|
|
509
|
+
/** Description of what the computed property represents */
|
|
510
|
+
description?: string;
|
|
511
|
+
}
|
|
402
512
|
/**
|
|
403
|
-
*
|
|
513
|
+
* Response from getting component state
|
|
404
514
|
*/
|
|
405
|
-
interface
|
|
406
|
-
|
|
515
|
+
interface ComponentStateResponse {
|
|
516
|
+
/** Current state values */
|
|
517
|
+
state: Record<string, unknown>;
|
|
518
|
+
/** Current computed property values */
|
|
519
|
+
computed: Record<string, unknown>;
|
|
520
|
+
/** Timestamp when the state was captured */
|
|
407
521
|
timestamp: number;
|
|
408
|
-
data: T;
|
|
409
522
|
}
|
|
410
523
|
/**
|
|
411
|
-
*
|
|
524
|
+
* UI State definition
|
|
525
|
+
*
|
|
526
|
+
* Represents a distinct state in the UI (e.g., "LoginForm", "Dashboard", "Modal").
|
|
527
|
+
* States can be active or inactive, and can block other states from activating.
|
|
412
528
|
*/
|
|
413
|
-
|
|
529
|
+
interface UIState {
|
|
530
|
+
/** Unique state identifier */
|
|
531
|
+
id: string;
|
|
532
|
+
/** Human-readable name */
|
|
533
|
+
name: string;
|
|
534
|
+
/** Element IDs belonging to this state */
|
|
535
|
+
elements: string[];
|
|
536
|
+
/** Optional function to detect if state is active */
|
|
537
|
+
activeWhen?: () => boolean;
|
|
538
|
+
/** If true, blocks other state activations (modal behavior) */
|
|
539
|
+
blocking?: boolean;
|
|
540
|
+
/** Specific state IDs this state blocks */
|
|
541
|
+
blocks?: string[];
|
|
542
|
+
/** State group membership */
|
|
543
|
+
group?: string;
|
|
544
|
+
/** Cost for pathfinding (default: 1.0) */
|
|
545
|
+
pathCost?: number;
|
|
546
|
+
/** Custom metadata */
|
|
547
|
+
metadata?: Record<string, unknown>;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* State group - states that activate/deactivate atomically
|
|
551
|
+
*
|
|
552
|
+
* When a group is activated, all its states are activated together.
|
|
553
|
+
* When deactivated, all states are deactivated together.
|
|
554
|
+
*/
|
|
555
|
+
interface UIStateGroup {
|
|
556
|
+
/** Unique group identifier */
|
|
557
|
+
id: string;
|
|
558
|
+
/** Human-readable name */
|
|
559
|
+
name: string;
|
|
560
|
+
/** State IDs belonging to this group */
|
|
561
|
+
states: string[];
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* State transition definition
|
|
565
|
+
*
|
|
566
|
+
* Defines how to move from one set of states to another,
|
|
567
|
+
* including any actions to execute during the transition.
|
|
568
|
+
*/
|
|
569
|
+
interface UITransition {
|
|
570
|
+
/** Unique transition identifier */
|
|
571
|
+
id: string;
|
|
572
|
+
/** Human-readable name */
|
|
573
|
+
name: string;
|
|
574
|
+
/** Precondition: at least one must be active */
|
|
575
|
+
fromStates: string[];
|
|
576
|
+
/** States to activate */
|
|
577
|
+
activateStates: string[];
|
|
578
|
+
/** States to deactivate */
|
|
579
|
+
exitStates: string[];
|
|
580
|
+
/** Groups to activate */
|
|
581
|
+
activateGroups?: string[];
|
|
582
|
+
/** Groups to deactivate */
|
|
583
|
+
exitGroups?: string[];
|
|
584
|
+
/** Actions to execute during transition */
|
|
585
|
+
actions?: WorkflowStep[];
|
|
586
|
+
/** Cost for pathfinding */
|
|
587
|
+
pathCost?: number;
|
|
588
|
+
/** Whether source states remain visible during transition */
|
|
589
|
+
staysVisible?: boolean;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Path result from pathfinding
|
|
593
|
+
*
|
|
594
|
+
* Returned when searching for a path to target states.
|
|
595
|
+
*/
|
|
596
|
+
interface PathResult {
|
|
597
|
+
/** Whether a path was found */
|
|
598
|
+
found: boolean;
|
|
599
|
+
/** Transition IDs in order to reach target */
|
|
600
|
+
transitions: string[];
|
|
601
|
+
/** Total cost of the path */
|
|
602
|
+
totalCost: number;
|
|
603
|
+
/** Target state IDs */
|
|
604
|
+
targetStates: string[];
|
|
605
|
+
/** Estimated number of steps */
|
|
606
|
+
estimatedSteps: number;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Transition execution result
|
|
610
|
+
*/
|
|
611
|
+
interface TransitionResult {
|
|
612
|
+
/** Whether the transition succeeded */
|
|
613
|
+
success: boolean;
|
|
614
|
+
/** States that were activated */
|
|
615
|
+
activatedStates: string[];
|
|
616
|
+
/** States that were deactivated */
|
|
617
|
+
deactivatedStates: string[];
|
|
618
|
+
/** Error message if failed */
|
|
619
|
+
error?: string;
|
|
620
|
+
/** Phase where failure occurred (if any) */
|
|
621
|
+
failedPhase?: string;
|
|
622
|
+
/** Duration of the transition in milliseconds */
|
|
623
|
+
durationMs: number;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Navigation result
|
|
627
|
+
*
|
|
628
|
+
* Returned after navigating to target states via pathfinding.
|
|
629
|
+
*/
|
|
630
|
+
interface NavigationResult {
|
|
631
|
+
/** Whether navigation succeeded */
|
|
632
|
+
success: boolean;
|
|
633
|
+
/** The path that was followed */
|
|
634
|
+
path: PathResult;
|
|
635
|
+
/** Transitions that were executed */
|
|
636
|
+
executedTransitions: string[];
|
|
637
|
+
/** Final active states after navigation */
|
|
638
|
+
finalActiveStates: string[];
|
|
639
|
+
/** Error message if failed */
|
|
640
|
+
error?: string;
|
|
641
|
+
/** Duration of the navigation in milliseconds */
|
|
642
|
+
durationMs: number;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* State manager snapshot
|
|
646
|
+
*/
|
|
647
|
+
interface StateSnapshot {
|
|
648
|
+
/** Timestamp of the snapshot */
|
|
649
|
+
timestamp: number;
|
|
650
|
+
/** Currently active state IDs */
|
|
651
|
+
activeStates: string[];
|
|
652
|
+
/** All registered states */
|
|
653
|
+
states: UIState[];
|
|
654
|
+
/** All registered state groups */
|
|
655
|
+
groups: UIStateGroup[];
|
|
656
|
+
/** All registered transitions */
|
|
657
|
+
transitions: UITransition[];
|
|
658
|
+
}
|
|
414
659
|
/**
|
|
415
660
|
* WebSocket message types from client to server
|
|
416
661
|
*/
|
|
@@ -436,11 +681,8 @@ interface WSMessageBase {
|
|
|
436
681
|
interface WSSubscribeMessage extends WSMessageBase {
|
|
437
682
|
type: 'subscribe';
|
|
438
683
|
payload: {
|
|
439
|
-
/** Event types to subscribe to (empty = all events) */
|
|
440
684
|
events?: BridgeEventType[];
|
|
441
|
-
/** Filter events by element ID */
|
|
442
685
|
elementIds?: string[];
|
|
443
|
-
/** Filter events by component ID */
|
|
444
686
|
componentIds?: string[];
|
|
445
687
|
};
|
|
446
688
|
}
|
|
@@ -450,7 +692,6 @@ interface WSSubscribeMessage extends WSMessageBase {
|
|
|
450
692
|
interface WSUnsubscribeMessage extends WSMessageBase {
|
|
451
693
|
type: 'unsubscribe';
|
|
452
694
|
payload: {
|
|
453
|
-
/** Event types to unsubscribe from (empty = all) */
|
|
454
695
|
events?: BridgeEventType[];
|
|
455
696
|
};
|
|
456
697
|
}
|
|
@@ -472,7 +713,7 @@ interface WSFindMessage extends WSMessageBase {
|
|
|
472
713
|
};
|
|
473
714
|
}
|
|
474
715
|
/**
|
|
475
|
-
* Client message: Discover elements
|
|
716
|
+
* Client message: Discover elements (deprecated)
|
|
476
717
|
* @deprecated Use WSFindMessage instead
|
|
477
718
|
*/
|
|
478
719
|
interface WSDiscoverMessage extends WSMessageBase {
|
|
@@ -506,7 +747,11 @@ interface WSExecuteActionMessage extends WSMessageBase {
|
|
|
506
747
|
type: 'executeAction';
|
|
507
748
|
payload: {
|
|
508
749
|
elementId: string;
|
|
509
|
-
action:
|
|
750
|
+
action: {
|
|
751
|
+
action: string;
|
|
752
|
+
params?: Record<string, unknown>;
|
|
753
|
+
waitOptions?: WaitOptions;
|
|
754
|
+
};
|
|
510
755
|
};
|
|
511
756
|
}
|
|
512
757
|
/**
|
|
@@ -528,7 +773,6 @@ interface WSExecuteWorkflowMessage extends WSMessageBase {
|
|
|
528
773
|
payload: {
|
|
529
774
|
workflowId: string;
|
|
530
775
|
params?: Record<string, unknown>;
|
|
531
|
-
/** Stream progress updates */
|
|
532
776
|
streamProgress?: boolean;
|
|
533
777
|
};
|
|
534
778
|
}
|
|
@@ -542,11 +786,8 @@ type WSClientMessage = WSSubscribeMessage | WSUnsubscribeMessage | WSPingMessage
|
|
|
542
786
|
interface WSWelcomeMessage extends WSMessageBase {
|
|
543
787
|
type: 'welcome';
|
|
544
788
|
payload: {
|
|
545
|
-
/** Server version */
|
|
546
789
|
version: string;
|
|
547
|
-
/** Available features */
|
|
548
790
|
features: UIBridgeFeatures;
|
|
549
|
-
/** Client ID assigned by server */
|
|
550
791
|
clientId: string;
|
|
551
792
|
};
|
|
552
793
|
}
|
|
@@ -562,7 +803,6 @@ interface WSPongMessage extends WSMessageBase {
|
|
|
562
803
|
interface WSSubscribedMessage extends WSMessageBase {
|
|
563
804
|
type: 'subscribed';
|
|
564
805
|
payload: {
|
|
565
|
-
/** Events now subscribed to */
|
|
566
806
|
events: BridgeEventType[];
|
|
567
807
|
};
|
|
568
808
|
}
|
|
@@ -572,7 +812,6 @@ interface WSSubscribedMessage extends WSMessageBase {
|
|
|
572
812
|
interface WSUnsubscribedMessage extends WSMessageBase {
|
|
573
813
|
type: 'unsubscribed';
|
|
574
814
|
payload: {
|
|
575
|
-
/** Events unsubscribed from */
|
|
576
815
|
events: BridgeEventType[];
|
|
577
816
|
};
|
|
578
817
|
}
|
|
@@ -588,7 +827,6 @@ interface WSEventMessage extends WSMessageBase {
|
|
|
588
827
|
*/
|
|
589
828
|
interface WSResponseMessage<T = unknown> extends WSMessageBase {
|
|
590
829
|
type: 'response';
|
|
591
|
-
/** ID of the request this responds to */
|
|
592
830
|
requestId: string;
|
|
593
831
|
payload: {
|
|
594
832
|
success: boolean;
|
|
@@ -601,7 +839,6 @@ interface WSResponseMessage<T = unknown> extends WSMessageBase {
|
|
|
601
839
|
*/
|
|
602
840
|
interface WSErrorMessage extends WSMessageBase {
|
|
603
841
|
type: 'error';
|
|
604
|
-
/** ID of the request that caused the error (if applicable) */
|
|
605
842
|
requestId?: string;
|
|
606
843
|
payload: {
|
|
607
844
|
code: string;
|
|
@@ -614,23 +851,17 @@ interface WSErrorMessage extends WSMessageBase {
|
|
|
614
851
|
*/
|
|
615
852
|
interface WSWorkflowProgressMessage extends WSMessageBase {
|
|
616
853
|
type: 'workflowProgress';
|
|
617
|
-
/** ID of the workflow execution request */
|
|
618
854
|
requestId: string;
|
|
619
855
|
payload: {
|
|
620
856
|
workflowId: string;
|
|
621
|
-
/** Current step index (0-based) */
|
|
622
857
|
currentStep: number;
|
|
623
|
-
/** Total number of steps */
|
|
624
858
|
totalSteps: number;
|
|
625
|
-
/** Current step info */
|
|
626
859
|
step: {
|
|
627
860
|
id: string;
|
|
628
|
-
type:
|
|
861
|
+
type: string;
|
|
629
862
|
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
630
863
|
};
|
|
631
|
-
/** Result of the current step (if completed) */
|
|
632
864
|
stepResult?: unknown;
|
|
633
|
-
/** Error (if failed) */
|
|
634
865
|
error?: string;
|
|
635
866
|
};
|
|
636
867
|
}
|
|
@@ -671,140 +902,105 @@ interface WSSubscriptionOptions {
|
|
|
671
902
|
componentIds?: string[];
|
|
672
903
|
}
|
|
673
904
|
/**
|
|
674
|
-
*
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
name
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
/**
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
905
|
+
* ARIA checked state (can be boolean or 'mixed' for indeterminate)
|
|
906
|
+
*/
|
|
907
|
+
type AriaCheckedState = boolean | 'mixed';
|
|
908
|
+
/**
|
|
909
|
+
* Accessibility information for a UI element
|
|
910
|
+
*/
|
|
911
|
+
interface ElementAccessibility {
|
|
912
|
+
/** The element's computed role (explicit or implicit) */
|
|
913
|
+
role: string;
|
|
914
|
+
/** Computed accessible name following ARIA name computation */
|
|
915
|
+
accessibleName?: string;
|
|
916
|
+
/** Computed accessible description */
|
|
917
|
+
accessibleDescription?: string;
|
|
918
|
+
/** Value of aria-label attribute */
|
|
919
|
+
ariaLabel?: string;
|
|
920
|
+
/** Value of aria-labelledby attribute */
|
|
921
|
+
ariaLabelledBy?: string;
|
|
922
|
+
/** Value of aria-describedby attribute */
|
|
923
|
+
ariaDescribedBy?: string;
|
|
924
|
+
/** Whether element is expanded (for expandable elements) */
|
|
925
|
+
ariaExpanded?: boolean;
|
|
926
|
+
/** Whether element is selected (for selectable elements) */
|
|
927
|
+
ariaSelected?: boolean;
|
|
928
|
+
/** Checked state (for checkboxes, can be true/false/'mixed') */
|
|
929
|
+
ariaChecked?: AriaCheckedState;
|
|
930
|
+
/** Whether element is hidden from accessibility tree */
|
|
931
|
+
ariaHidden?: boolean;
|
|
932
|
+
/** Whether element is disabled via aria-disabled */
|
|
933
|
+
ariaDisabled?: boolean;
|
|
934
|
+
/** Whether element is required (for form inputs) */
|
|
935
|
+
ariaRequired?: boolean;
|
|
936
|
+
/** Current aria-live value for live regions */
|
|
937
|
+
ariaLive?: 'off' | 'polite' | 'assertive';
|
|
938
|
+
/** Tab index value */
|
|
939
|
+
tabIndex: number;
|
|
940
|
+
/** Whether element is in the tab order (tabindex >= 0 or naturally focusable) */
|
|
941
|
+
isInTabOrder: boolean;
|
|
942
|
+
/** Whether element can receive keyboard focus */
|
|
943
|
+
isKeyboardAccessible: boolean;
|
|
944
|
+
/** The implicit role based on element type (before explicit role override) */
|
|
945
|
+
implicitRole?: string;
|
|
946
|
+
/** Whether element has an explicit role attribute */
|
|
947
|
+
hasExplicitRole: boolean;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* WCAG conformance level
|
|
951
|
+
*/
|
|
952
|
+
type WCAGLevel = 'A' | 'AA' | 'AAA';
|
|
953
|
+
/**
|
|
954
|
+
* Accessibility issue severity
|
|
955
|
+
*/
|
|
956
|
+
type AccessibilitySeverity = 'critical' | 'serious' | 'moderate' | 'minor';
|
|
957
|
+
/**
|
|
958
|
+
* An accessibility issue found during validation
|
|
959
|
+
*/
|
|
960
|
+
interface AccessibilityIssue {
|
|
961
|
+
/** Unique identifier for this issue instance */
|
|
721
962
|
id: string;
|
|
722
|
-
/**
|
|
723
|
-
|
|
724
|
-
/**
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
|
|
738
|
-
/** Whether source states remain visible during transition */
|
|
739
|
-
staysVisible?: boolean;
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* Path result from pathfinding
|
|
743
|
-
*
|
|
744
|
-
* Returned when searching for a path to target states.
|
|
745
|
-
*/
|
|
746
|
-
interface PathResult {
|
|
747
|
-
/** Whether a path was found */
|
|
748
|
-
found: boolean;
|
|
749
|
-
/** Transition IDs in order to reach target */
|
|
750
|
-
transitions: string[];
|
|
751
|
-
/** Total cost of the path */
|
|
752
|
-
totalCost: number;
|
|
753
|
-
/** Target state IDs */
|
|
754
|
-
targetStates: string[];
|
|
755
|
-
/** Estimated number of steps */
|
|
756
|
-
estimatedSteps: number;
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Transition execution result
|
|
760
|
-
*/
|
|
761
|
-
interface TransitionResult {
|
|
762
|
-
/** Whether the transition succeeded */
|
|
763
|
-
success: boolean;
|
|
764
|
-
/** States that were activated */
|
|
765
|
-
activatedStates: string[];
|
|
766
|
-
/** States that were deactivated */
|
|
767
|
-
deactivatedStates: string[];
|
|
768
|
-
/** Error message if failed */
|
|
769
|
-
error?: string;
|
|
770
|
-
/** Phase where failure occurred (if any) */
|
|
771
|
-
failedPhase?: string;
|
|
772
|
-
/** Duration of the transition in milliseconds */
|
|
773
|
-
durationMs: number;
|
|
774
|
-
}
|
|
775
|
-
/**
|
|
776
|
-
* Navigation result
|
|
777
|
-
*
|
|
778
|
-
* Returned after navigating to target states via pathfinding.
|
|
779
|
-
*/
|
|
780
|
-
interface NavigationResult {
|
|
781
|
-
/** Whether navigation succeeded */
|
|
782
|
-
success: boolean;
|
|
783
|
-
/** The path that was followed */
|
|
784
|
-
path: PathResult;
|
|
785
|
-
/** Transitions that were executed */
|
|
786
|
-
executedTransitions: string[];
|
|
787
|
-
/** Final active states after navigation */
|
|
788
|
-
finalActiveStates: string[];
|
|
789
|
-
/** Error message if failed */
|
|
790
|
-
error?: string;
|
|
791
|
-
/** Duration of the navigation in milliseconds */
|
|
792
|
-
durationMs: number;
|
|
963
|
+
/** The WCAG success criterion this issue relates to (e.g., "4.1.2") */
|
|
964
|
+
wcagCriterion: string;
|
|
965
|
+
/** How severe this issue is */
|
|
966
|
+
severity: AccessibilitySeverity;
|
|
967
|
+
/** WCAG conformance level this criterion belongs to */
|
|
968
|
+
level: WCAGLevel;
|
|
969
|
+
/** Human-readable description of the issue */
|
|
970
|
+
message: string;
|
|
971
|
+
/** ID of the element with the issue */
|
|
972
|
+
elementId: string;
|
|
973
|
+
/** Selector to find the element */
|
|
974
|
+
elementSelector?: string;
|
|
975
|
+
/** Suggested fix for the issue */
|
|
976
|
+
suggestion: string;
|
|
977
|
+
/** The rule ID that detected this issue */
|
|
978
|
+
ruleId: string;
|
|
793
979
|
}
|
|
794
980
|
/**
|
|
795
|
-
*
|
|
981
|
+
* Accessibility validation report
|
|
796
982
|
*/
|
|
797
|
-
interface
|
|
798
|
-
/**
|
|
983
|
+
interface AccessibilityReport {
|
|
984
|
+
/** When the validation was performed */
|
|
799
985
|
timestamp: number;
|
|
800
|
-
/**
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
|
|
804
|
-
/** All
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
|
|
986
|
+
/** URL of the page that was validated */
|
|
987
|
+
url: string;
|
|
988
|
+
/** Number of elements that were scanned */
|
|
989
|
+
elementsScanned: number;
|
|
990
|
+
/** All issues found during validation */
|
|
991
|
+
issues: AccessibilityIssue[];
|
|
992
|
+
/** Number of checks that passed */
|
|
993
|
+
passedCount: number;
|
|
994
|
+
/** Number of checks that failed */
|
|
995
|
+
failedCount: number;
|
|
996
|
+
/** Whether the page meets WCAG 2.1 Level A */
|
|
997
|
+
meetsWCAG_A: boolean;
|
|
998
|
+
/** Whether the page meets WCAG 2.1 Level AA */
|
|
999
|
+
meetsWCAG_AA: boolean;
|
|
1000
|
+
/** Human-readable summary of the validation */
|
|
1001
|
+
summary: string;
|
|
1002
|
+
/** Duration of the validation in milliseconds */
|
|
1003
|
+
durationMs: number;
|
|
808
1004
|
}
|
|
809
1005
|
|
|
810
|
-
export type {
|
|
1006
|
+
export type { WSGetElementMessage as $, AccessibilityIssue as A, BranchCondition as B, ComponentAction as C, UIBridgeFeatures as D, ElementAccessibility as E, UIState as F, UIStateGroup as G, UITransition as H, WSClientConfig as I, WSClientMessage as J, WSClientMessageType as K, LogConfig as L, WSConnectionState as M, NavigationResult as N, WSDiscoverMessage as O, PartialMatch as P, WSErrorMessage as Q, RecoveryAction as R, StandardAction as S, TransitionResult as T, UIBridgeConfig as U, WSEventMessage as V, WCAGLevel as W, WSExecuteActionMessage as X, WSExecuteComponentActionMessage as Y, WSExecuteWorkflowMessage as Z, WSFindMessage as _, AccessibilityReport as a, WSGetSnapshotMessage as a0, WSMessageBase as a1, WSPingMessage as a2, WSPongMessage as a3, WSResponseMessage as a4, WSServerMessage as a5, WSServerMessageType as a6, WSSubscribeMessage as a7, WSSubscribedMessage as a8, WSSubscriptionOptions as a9, WSUnsubscribeMessage as aa, WSUnsubscribedMessage as ab, WSWelcomeMessage as ac, WSWorkflowProgressMessage as ad, WaitOptions as ae, Workflow as af, WorkflowStep as ag, WorkflowStepType as ah, AccessibilitySeverity as b, ActionErrorCode as c, ActionFailureDetails as d, ActionHandler as e, ActionRequest as f, ActionResponse as g, AriaCheckedState as h, BridgeEvent as i, BridgeEventListener as j, BridgeEventType as k, BridgeSnapshot as l, ComponentStateResponse as m, ComputedProperty as n, CustomAction as o, ElementIdentifier as p, ElementState as q, ElementType as r, ExtendedWorkflowStep as s, ExtractConfig as t, LoopConfig as u, PathResult as v, RegisteredComponent as w, RegisteredElement as x, StateGetter as y, StateSnapshot as z };
|