@swmansion/argent 0.27.1-next.2 → 0.27.1-next.21

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/client.d.ts CHANGED
@@ -13,6 +13,74 @@ export interface ArgentToolResult<T = unknown> {
13
13
  /** Optional advisory note the tool attached to the result. */
14
14
  note?: string;
15
15
  }
16
+ /**
17
+ * A node of the `ui-tree` result. A flag is set only when true; a field named in
18
+ * `UiTree.unsupportedFields` is unknown when absent.
19
+ */
20
+ export interface UiTreeNode {
21
+ role: string;
22
+ label?: string;
23
+ value?: string;
24
+ identifier?: string;
25
+ checked?: boolean;
26
+ disabled?: boolean;
27
+ password?: boolean;
28
+ focused?: boolean;
29
+ selected?: boolean;
30
+ /** Normalized to `screen` like gesture-tap, but not clamped: it can fall outside 0..1. */
31
+ frame?: {
32
+ x: number;
33
+ y: number;
34
+ width: number;
35
+ height: number;
36
+ };
37
+ /** Android: the view class. iOS: the XCUIElementType name, e.g. `TextField`. */
38
+ type?: string;
39
+ /** iOS: the accessibility trait names. */
40
+ traits?: string[];
41
+ roleDescription?: string;
42
+ /** Android: the raw content-desc. */
43
+ contentDescription?: string;
44
+ /** Roots: the app's bundle id (iOS) or package (Android). */
45
+ bundleId?: string;
46
+ editable?: boolean;
47
+ heading?: boolean;
48
+ /** On screen, but behind an in-app presentation (iOS) or a system alert. */
49
+ covered?: boolean;
50
+ placeholder?: string;
51
+ /** The input shows its placeholder: it holds no text, and `value` is unset. */
52
+ hintShowing?: boolean;
53
+ /** No part of the frame is on screen inside its ancestors: scrolled out or clipped. */
54
+ hidden?: boolean;
55
+ children: UiTreeNode[];
56
+ }
57
+ export interface UiTree {
58
+ schemaVersion: 1;
59
+ source: "ax-service" | "android-devtools";
60
+ /** Native units: iOS points, Android pixels. */
61
+ screen?: {
62
+ width: number;
63
+ height: number;
64
+ };
65
+ /**
66
+ * iOS: while a system alert shows, the system app first and the app it covers
67
+ * second. Android: one root per window, topmost first.
68
+ */
69
+ roots: UiTreeNode[];
70
+ truncated: boolean;
71
+ alertVisible?: boolean;
72
+ keyboardVisible?: boolean;
73
+ /**
74
+ * The bundle id or package of the app in front, under any system alert.
75
+ * Android: unset when the alert hides the app's window.
76
+ */
77
+ foregroundApp?: string;
78
+ /**
79
+ * Fields this source cannot report. On Android they depend on the API level:
80
+ * `placeholder` and `hintShowing` need 26, `heading` 28.
81
+ */
82
+ unsupportedFields: string[];
83
+ }
16
84
  export interface CallToolOptions {
17
85
  /** Receive progress events while a long-running tool works. */
18
86
  onProgress?: (event: unknown) => void;