@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.
Files changed (108) hide show
  1. package/dist/ai/index.d.mts +4 -4
  2. package/dist/ai/index.d.ts +4 -4
  3. package/dist/babel-plugin/index.js +515 -0
  4. package/dist/babel-plugin/index.js.map +1 -0
  5. package/dist/babel-plugin/index.mjs +499 -0
  6. package/dist/babel-plugin/index.mjs.map +1 -0
  7. package/dist/control/index.d.mts +5 -5
  8. package/dist/control/index.d.ts +5 -5
  9. package/dist/core/index.d.mts +115 -44
  10. package/dist/core/index.d.ts +115 -44
  11. package/dist/core/index.js +0 -1560
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/core/index.mjs +1 -1549
  14. package/dist/core/index.mjs.map +1 -1
  15. package/dist/debug/index.d.mts +3 -3
  16. package/dist/debug/index.d.ts +3 -3
  17. package/dist/index.d.mts +7 -8
  18. package/dist/index.d.ts +7 -8
  19. package/dist/index.js +859 -873
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +860 -862
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/{metrics-C9XRi_mL.d.ts → metrics-BfiT_rhZ.d.ts} +2 -2
  24. package/dist/{metrics-NC3csD0R.d.mts → metrics-DTA2bwG7.d.mts} +2 -2
  25. package/dist/native/control/index.js +453 -0
  26. package/dist/native/control/index.js.map +1 -0
  27. package/dist/native/control/index.mjs +450 -0
  28. package/dist/native/control/index.mjs.map +1 -0
  29. package/dist/native/core/index.js +486 -0
  30. package/dist/native/core/index.js.map +1 -0
  31. package/dist/native/core/index.mjs +475 -0
  32. package/dist/native/core/index.mjs.map +1 -0
  33. package/dist/native/debug/index.js +451 -0
  34. package/dist/native/debug/index.js.map +1 -0
  35. package/dist/native/debug/index.mjs +449 -0
  36. package/dist/native/debug/index.mjs.map +1 -0
  37. package/dist/native/index.js +2274 -0
  38. package/dist/native/index.js.map +1 -0
  39. package/dist/native/index.mjs +2246 -0
  40. package/dist/native/index.mjs.map +1 -0
  41. package/dist/native/react/index.js +1401 -0
  42. package/dist/native/react/index.js.map +1 -0
  43. package/dist/native/react/index.mjs +1389 -0
  44. package/dist/native/react/index.mjs.map +1 -0
  45. package/dist/native/server/index.js +415 -0
  46. package/dist/native/server/index.js.map +1 -0
  47. package/dist/native/server/index.mjs +410 -0
  48. package/dist/native/server/index.mjs.map +1 -0
  49. package/dist/react/index.d.mts +20 -7
  50. package/dist/react/index.d.ts +20 -7
  51. package/dist/react/index.js +42 -4
  52. package/dist/react/index.js.map +1 -1
  53. package/dist/react/index.mjs +42 -4
  54. package/dist/react/index.mjs.map +1 -1
  55. package/dist/{registry-CIEDjbQ9.d.ts → registry-BKLEm-yk.d.ts} +9 -15
  56. package/dist/{registry-SsSDq46X.d.mts → registry-BmZgyCz8.d.mts} +9 -15
  57. package/dist/render-log/index.d.mts +1 -1
  58. package/dist/render-log/index.d.ts +1 -1
  59. package/dist/server/express.d.mts +36 -0
  60. package/dist/server/express.d.ts +36 -0
  61. package/dist/server/express.js +196 -0
  62. package/dist/server/express.js.map +1 -0
  63. package/dist/server/express.mjs +192 -0
  64. package/dist/server/express.mjs.map +1 -0
  65. package/dist/server/handlers.d.mts +93 -0
  66. package/dist/server/handlers.d.ts +93 -0
  67. package/dist/server/handlers.js +4278 -0
  68. package/dist/server/handlers.js.map +1 -0
  69. package/dist/server/handlers.mjs +4275 -0
  70. package/dist/server/handlers.mjs.map +1 -0
  71. package/dist/server/index.d.mts +10 -0
  72. package/dist/server/index.d.ts +10 -0
  73. package/dist/server/index.js +5352 -0
  74. package/dist/server/index.js.map +1 -0
  75. package/dist/server/index.mjs +5337 -0
  76. package/dist/server/index.mjs.map +1 -0
  77. package/dist/server/nextjs.d.mts +126 -0
  78. package/dist/server/nextjs.d.ts +126 -0
  79. package/dist/server/nextjs.js +287 -0
  80. package/dist/server/nextjs.js.map +1 -0
  81. package/dist/server/nextjs.mjs +282 -0
  82. package/dist/server/nextjs.mjs.map +1 -0
  83. package/dist/server/standalone.d.mts +6 -0
  84. package/dist/server/standalone.d.ts +6 -0
  85. package/dist/server/standalone.js +719 -0
  86. package/dist/server/standalone.js.map +1 -0
  87. package/dist/server/standalone.mjs +715 -0
  88. package/dist/server/standalone.mjs.map +1 -0
  89. package/dist/standalone-BURj8J3G.d.ts +212 -0
  90. package/dist/standalone-Dwmel29d.d.mts +212 -0
  91. package/dist/swc-plugin/index.d.mts +79 -0
  92. package/dist/swc-plugin/index.d.ts +79 -0
  93. package/dist/swc-plugin/index.js +15 -0
  94. package/dist/swc-plugin/index.js.map +1 -0
  95. package/dist/swc-plugin/index.mjs +9 -0
  96. package/dist/swc-plugin/index.mjs.map +1 -0
  97. package/dist/{types-CFT3Dnx4.d.mts → types-B5Q0GVo0.d.mts} +115 -3
  98. package/dist/{types-Dr6tH-bm.d.mts → types-B7J7noLK.d.mts} +1 -1
  99. package/dist/{types-oCTrRxSw.d.ts → types-BkNRILUa.d.ts} +1 -1
  100. package/dist/types-CEQLnFMv.d.mts +156 -0
  101. package/dist/types-CHnlwiTK.d.ts +156 -0
  102. package/dist/{types-BvCfFuEV.d.ts → types-DfPqwU-i.d.ts} +115 -3
  103. package/dist/{types-CPMbN_Iw.d.mts → types-jKVgTI6_.d.mts} +356 -160
  104. package/dist/{types-CPMbN_Iw.d.ts → types-jKVgTI6_.d.ts} +356 -160
  105. package/package.json +106 -3
  106. package/swc-plugin-wasm/ui_bridge_swc_plugin.wasm +0 -0
  107. package/dist/websocket-client-CX4QJesI.d.ts +0 -124
  108. package/dist/websocket-client-C_Na0OSp.d.mts +0 -124
@@ -1,5 +1,5 @@
1
- import { i as ElementType, h as ElementState } from './types-CPMbN_Iw.js';
2
- import { D as DiscoveredElement } from './types-oCTrRxSw.js';
1
+ import { r as ElementType, q as ElementState } from './types-jKVgTI6_.js';
2
+ import { D as DiscoveredElement } from './types-BkNRILUa.js';
3
3
 
4
4
  /**
5
5
  * AI Module Types
@@ -212,6 +212,63 @@ interface ParsedAction {
212
212
  /** Parse confidence */
213
213
  parseConfidence: number;
214
214
  }
215
+ /**
216
+ * Partial match information for structured failures
217
+ */
218
+ interface PartialMatchInfo {
219
+ /** Element ID */
220
+ elementId: string;
221
+ /** Match confidence 0-1 */
222
+ confidence: number;
223
+ /** Why this element was considered but not selected */
224
+ reason: string;
225
+ /** Element type */
226
+ type: string;
227
+ /** Element description/label */
228
+ description?: string;
229
+ }
230
+ /**
231
+ * Recovery suggestion for structured failures
232
+ */
233
+ interface RecoverySuggestionInfo {
234
+ /** Human-readable suggestion */
235
+ suggestion: string;
236
+ /** Machine-executable command (if applicable) */
237
+ command?: string;
238
+ /** Confidence that this action will help (0-1) */
239
+ confidence: number;
240
+ /** Whether retry with same parameters might help */
241
+ retryable: boolean;
242
+ }
243
+ /**
244
+ * Structured failure information for NL action responses
245
+ */
246
+ interface StructuredFailureInfo {
247
+ /** Machine-readable error code */
248
+ errorCode: string;
249
+ /** Human-readable error message */
250
+ message: string;
251
+ /** Target element ID (if known) */
252
+ elementId?: string;
253
+ /** Selectors/strategies that were attempted */
254
+ selectorsTried?: string[];
255
+ /** Similar elements that were found but not used */
256
+ partialMatches?: PartialMatchInfo[];
257
+ /** Current state of the target element (if found) */
258
+ elementState?: ElementState;
259
+ /** Reference to visual context (screenshot path/id) */
260
+ screenshotContext?: string;
261
+ /** Suggested recovery actions */
262
+ suggestedActions?: RecoverySuggestionInfo[];
263
+ /** Whether retry with same parameters might help */
264
+ retryRecommended: boolean;
265
+ /** Additional context data */
266
+ context?: Record<string, unknown>;
267
+ /** Duration before failure in milliseconds */
268
+ durationMs?: number;
269
+ /** Timeout value that was exceeded (for timeout errors) */
270
+ timeoutMs?: number;
271
+ }
215
272
  /**
216
273
  * Response from executing a natural language action
217
274
  */
@@ -238,6 +295,8 @@ interface NLActionResponse {
238
295
  suggestions?: string[];
239
296
  /** Alternative elements that could have been used */
240
297
  alternatives?: SearchResult[];
298
+ /** Detailed failure information when success is false */
299
+ failureInfo?: StructuredFailureInfo;
241
300
  }
242
301
  /**
243
302
  * Types of assertions that can be made about elements
@@ -464,6 +523,59 @@ interface ElementModification {
464
523
  /** Whether this is a significant change */
465
524
  significant: boolean;
466
525
  }
526
+ /**
527
+ * Semantic search criteria using embeddings
528
+ */
529
+ interface SemanticSearchCriteria {
530
+ /** Natural language query for semantic matching */
531
+ query: string;
532
+ /** Minimum similarity score (0-1, default: 0.5) */
533
+ threshold?: number;
534
+ /** Maximum results to return */
535
+ limit?: number;
536
+ /** Filter by element type */
537
+ type?: string;
538
+ /** Filter by ARIA role */
539
+ role?: string;
540
+ /** Combine with text-based search */
541
+ combineWithText?: boolean;
542
+ }
543
+ /**
544
+ * Semantic search result
545
+ */
546
+ interface SemanticSearchResult {
547
+ /** The matched element */
548
+ element: AIDiscoveredElement;
549
+ /** Semantic similarity score (0-1) */
550
+ similarity: number;
551
+ /** Rank in results (1-indexed) */
552
+ rank: number;
553
+ /** Text that was used for embedding */
554
+ embeddedText: string;
555
+ }
556
+ /**
557
+ * Response from semantic search operations
558
+ */
559
+ interface SemanticSearchResponse {
560
+ /** All matching results sorted by similarity */
561
+ results: SemanticSearchResult[];
562
+ /** Best match (highest similarity above threshold) */
563
+ bestMatch: SemanticSearchResult | null;
564
+ /** Total elements scanned */
565
+ scannedCount: number;
566
+ /** Search duration in milliseconds */
567
+ durationMs: number;
568
+ /** Query used */
569
+ query: string;
570
+ /** Embedding provider info */
571
+ providerInfo?: {
572
+ provider: string;
573
+ model: string;
574
+ dimension: number;
575
+ };
576
+ /** Timestamp */
577
+ timestamp: number;
578
+ }
467
579
  /**
468
580
  * Rich error context for AI agents
469
581
  */
@@ -531,4 +643,4 @@ interface AIElementRegistrationOptions {
531
643
  autoGenerateAliases?: boolean;
532
644
  }
533
645
 
534
- export type { AIDiscoveredElement as A, BatchAssertionRequest as B, ElementChange as E, FormAnalysis as F, ModalState as M, NLActionRequest as N, PageContext as P, RecoverySuggestion as R, SearchCriteria as S, AIElementRegistrationOptions as a, AIErrorContext as b, AIFindResponse as c, AssertionRequest as d, AssertionResult as e, AssertionType as f, BatchAssertionResult as g, ElementModification as h, FormFieldAnalysis as i, FormFieldState as j, FormState as k, NLActionResponse as l, ParsedAction as m, SearchResponse as n, SearchResult as o, SemanticDiff as p, SemanticSnapshot as q };
646
+ export type { AIDiscoveredElement as A, BatchAssertionRequest as B, ElementChange as E, FormAnalysis as F, ModalState as M, NLActionRequest as N, PageContext as P, RecoverySuggestion as R, SearchCriteria as S, AIElementRegistrationOptions as a, AIErrorContext as b, AIFindResponse as c, AssertionRequest as d, AssertionResult as e, AssertionType as f, BatchAssertionResult as g, ElementModification as h, FormFieldAnalysis as i, FormFieldState as j, FormState as k, NLActionResponse as l, ParsedAction as m, SearchResponse as n, SearchResult as o, SemanticDiff as p, SemanticSearchCriteria as q, SemanticSearchResponse as r, SemanticSearchResult as s, SemanticSnapshot as t };