@allwright.dev/core 0.0.52 → 0.0.54

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.
@@ -0,0 +1,214 @@
1
+ syntax = "proto3";
2
+
3
+ package allwright.engine.v1;
4
+ option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
5
+
6
+ import "core/v1/common.proto";
7
+
8
+ message ContextSessionCommand {
9
+ string surface_session_id = 1;
10
+ string context_session_id = 2;
11
+
12
+ oneof command {
13
+ ContextSessionPingCommand ping = 3;
14
+ CloseContextSessionCommand close = 4;
15
+ NavigatePageCommand navigate = 5;
16
+ ClickElementCommand click_element = 6;
17
+ CountElementsCommand count_elements = 7;
18
+ HighlightElementsCommand highlight_elements = 8;
19
+ FocusElementCommand focus_element = 9;
20
+ FillElementCommand fill_element = 10;
21
+ HoverElementCommand hover_element = 11;
22
+ PressKeyCommand press_key = 12;
23
+ GetTextContentCommand get_text_content = 13;
24
+ GetInnerTextCommand get_inner_text = 14;
25
+ WaitForSelectorCommand wait_for_selector = 15;
26
+ ScreenshotCommand screenshot = 16;
27
+ }
28
+ }
29
+
30
+ message ContextSessionPingCommand {
31
+ string message = 1;
32
+ }
33
+
34
+ message CloseContextSessionCommand {}
35
+
36
+ message ContextSessionEvent {
37
+ string context_session_id = 1;
38
+
39
+ oneof event {
40
+ ContextSessionAttachedEvent attached = 2;
41
+ ContextSessionPongEvent pong = 3;
42
+ ContextSessionClosedEvent closed = 4;
43
+ ContextSessionErrorEvent error = 5;
44
+ PageNavigatedEvent navigated = 6;
45
+ ChromiumBidiInjectionEvent chromium_bidi_injection = 7;
46
+ ElementClickedEvent element_clicked = 8;
47
+ ElementCountedEvent element_counted = 9;
48
+ ElementsHighlightedEvent elements_highlighted = 10;
49
+ ElementFocusedEvent element_focused = 11;
50
+ ElementFilledEvent element_filled = 12;
51
+ ElementHoveredEvent element_hovered = 13;
52
+ KeyPressedEvent key_pressed = 14;
53
+ TextContentResolvedEvent text_content_resolved = 15;
54
+ InnerTextResolvedEvent inner_text_resolved = 16;
55
+ SelectorWaitSatisfiedEvent selector_wait_satisfied = 17;
56
+ ScreenshotCapturedEvent screenshot_captured = 18;
57
+ }
58
+ }
59
+
60
+ message ContextSessionAttachedEvent {
61
+ string note = 1;
62
+ }
63
+
64
+ message ContextSessionPongEvent {
65
+ string message = 1;
66
+ }
67
+
68
+ message ContextSessionClosedEvent {
69
+ string reason = 1;
70
+ }
71
+
72
+ message ContextSessionErrorEvent {
73
+ string message = 1;
74
+ }
75
+
76
+ message NavigatePageCommand {
77
+ string url = 1;
78
+ optional CommandRetryOptions retry_options = 2;
79
+ }
80
+
81
+ message ClickElementCommand {
82
+ string css_selector = 1;
83
+ optional CommandRetryOptions retry_options = 2;
84
+ }
85
+
86
+ message CountElementsCommand {
87
+ string css_selector = 1;
88
+ optional CommandRetryOptions retry_options = 2;
89
+ }
90
+
91
+ message HighlightElementsCommand {
92
+ string css_selector = 1;
93
+ optional uint32 duration_ms = 2;
94
+ optional CommandRetryOptions retry_options = 3;
95
+ }
96
+
97
+ message FocusElementCommand {
98
+ string css_selector = 1;
99
+ optional CommandRetryOptions retry_options = 2;
100
+ }
101
+
102
+ message FillElementCommand {
103
+ string css_selector = 1;
104
+ string value = 2;
105
+ optional CommandRetryOptions retry_options = 3;
106
+ }
107
+
108
+ message HoverElementCommand {
109
+ string css_selector = 1;
110
+ optional CommandRetryOptions retry_options = 2;
111
+ }
112
+
113
+ message PressKeyCommand {
114
+ string css_selector = 1;
115
+ string key = 2;
116
+ optional string text = 3;
117
+ optional CommandRetryOptions retry_options = 4;
118
+ }
119
+
120
+ message GetTextContentCommand {
121
+ string css_selector = 1;
122
+ optional CommandRetryOptions retry_options = 2;
123
+ }
124
+
125
+ message GetInnerTextCommand {
126
+ string css_selector = 1;
127
+ optional CommandRetryOptions retry_options = 2;
128
+ }
129
+
130
+ message WaitForSelectorCommand {
131
+ string css_selector = 1;
132
+ optional bool visible = 2;
133
+ optional CommandRetryOptions retry_options = 3;
134
+ }
135
+
136
+ message ScreenshotCommand {
137
+ optional CommandRetryOptions retry_options = 1;
138
+ }
139
+
140
+ message PageNavigatedEvent {
141
+ string url = 1;
142
+ string note = 2;
143
+ }
144
+
145
+ message ChromiumBidiInjectionEvent {
146
+ string note = 1;
147
+ string bidi_session_id = 2;
148
+ string mapper_target_id = 3;
149
+ string mapper_session_id = 4;
150
+ string package_version = 5;
151
+ }
152
+
153
+ message ElementClickedEvent {
154
+ string css_selector = 1;
155
+ string note = 2;
156
+ string bidi_session_id = 3;
157
+ }
158
+
159
+ message ElementCountedEvent {
160
+ string css_selector = 1;
161
+ uint32 count = 2;
162
+ string note = 3;
163
+ }
164
+
165
+ message ElementsHighlightedEvent {
166
+ string css_selector = 1;
167
+ uint32 count = 2;
168
+ string note = 3;
169
+ }
170
+
171
+ message ElementFocusedEvent {
172
+ string css_selector = 1;
173
+ string note = 2;
174
+ }
175
+
176
+ message ElementFilledEvent {
177
+ string css_selector = 1;
178
+ string value = 2;
179
+ string note = 3;
180
+ }
181
+
182
+ message ElementHoveredEvent {
183
+ string css_selector = 1;
184
+ string note = 2;
185
+ }
186
+
187
+ message KeyPressedEvent {
188
+ string css_selector = 1;
189
+ string key = 2;
190
+ string note = 3;
191
+ }
192
+
193
+ message TextContentResolvedEvent {
194
+ string css_selector = 1;
195
+ string text = 2;
196
+ string note = 3;
197
+ }
198
+
199
+ message InnerTextResolvedEvent {
200
+ string css_selector = 1;
201
+ string text = 2;
202
+ string note = 3;
203
+ }
204
+
205
+ message SelectorWaitSatisfiedEvent {
206
+ string css_selector = 1;
207
+ bool visible = 2;
208
+ string note = 3;
209
+ }
210
+
211
+ message ScreenshotCapturedEvent {
212
+ bytes png_data = 1;
213
+ string note = 2;
214
+ }
@@ -4,19 +4,22 @@ package allwright.engine.v1;
4
4
  option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
5
5
 
6
6
  import "core/v1/common.proto";
7
+ import "surfaces/mobile/v1/mobile.proto";
7
8
  import "surfaces/web/v1/web.proto";
8
9
 
9
- message BrowserSessionCommand {
10
+ message SurfaceSessionCommand {
10
11
  oneof command {
11
12
  LaunchChromeCommand launch_chrome = 1;
12
- OpenTabCommand open_tab = 2;
13
+ OpenContextCommand open_context = 2;
13
14
  SessionPingCommand ping = 3;
14
- CloseBrowserSessionCommand close = 4;
15
+ CloseSurfaceSessionCommand close = 4;
15
16
  LaunchBrowserCommand launch_browser = 5;
17
+ ConnectMobileCommand connect_mobile = 6;
18
+ LaunchAppCommand launch_app = 7;
16
19
  }
17
20
  }
18
21
 
19
- message OpenTabCommand {
22
+ message OpenContextCommand {
20
23
  optional CommandRetryOptions retry_options = 1;
21
24
  }
22
25
 
@@ -24,23 +27,25 @@ message SessionPingCommand {
24
27
  string message = 1;
25
28
  }
26
29
 
27
- message CloseBrowserSessionCommand {}
30
+ message CloseSurfaceSessionCommand {}
28
31
 
29
- message BrowserSessionEvent {
32
+ message SurfaceSessionEvent {
30
33
  string session_id = 1;
31
34
 
32
35
  oneof event {
33
36
  ChromeLaunchedEvent chrome_launched = 2;
34
- TabOpenedEvent tab_opened = 3;
37
+ ContextOpenedEvent context_opened = 3;
35
38
  SessionPongEvent pong = 4;
36
- BrowserSessionClosedEvent closed = 5;
37
- BrowserSessionErrorEvent error = 6;
39
+ SurfaceSessionClosedEvent closed = 5;
40
+ SurfaceSessionErrorEvent error = 6;
38
41
  BrowserLaunchedEvent browser_launched = 7;
42
+ MobileConnectedEvent mobile_connected = 8;
43
+ AppLaunchedEvent app_launched = 9;
39
44
  }
40
45
  }
41
46
 
42
- message TabOpenedEvent {
43
- string tab_session_id = 1;
47
+ message ContextOpenedEvent {
48
+ string context_session_id = 1;
44
49
  string note = 2;
45
50
  }
46
51
 
@@ -48,10 +53,10 @@ message SessionPongEvent {
48
53
  string message = 1;
49
54
  }
50
55
 
51
- message BrowserSessionClosedEvent {
56
+ message SurfaceSessionClosedEvent {
52
57
  string reason = 1;
53
58
  }
54
59
 
55
- message BrowserSessionErrorEvent {
60
+ message SurfaceSessionErrorEvent {
56
61
  string message = 1;
57
62
  }
@@ -3,12 +3,12 @@ syntax = "proto3";
3
3
  package allwright.engine.v1;
4
4
  option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
5
5
 
6
- import "core/v1/browser.proto";
6
+ import "core/v1/surface.proto";
7
7
  import "core/v1/common.proto";
8
- import "core/v1/tab.proto";
8
+ import "core/v1/context.proto";
9
9
 
10
10
  service EngineService {
11
11
  rpc Ping(PingRequest) returns (PingResponse);
12
- rpc BrowserSession(stream BrowserSessionCommand) returns (stream BrowserSessionEvent);
13
- rpc TabSession(stream TabSessionCommand) returns (stream TabSessionEvent);
12
+ rpc SurfaceSession(stream SurfaceSessionCommand) returns (stream SurfaceSessionEvent);
13
+ rpc ContextSession(stream ContextSessionCommand) returns (stream ContextSessionEvent);
14
14
  }
@@ -0,0 +1,56 @@
1
+ syntax = "proto3";
2
+
3
+ package allwright.engine.v1;
4
+ option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
5
+
6
+ import "core/v1/common.proto";
7
+
8
+ enum MobilePlatform {
9
+ MOBILE_PLATFORM_UNSPECIFIED = 0;
10
+ MOBILE_PLATFORM_ANDROID = 1;
11
+ MOBILE_PLATFORM_IOS = 2;
12
+ }
13
+
14
+ enum DeviceConnectionKind {
15
+ DEVICE_CONNECTION_KIND_UNSPECIFIED = 0;
16
+ DEVICE_CONNECTION_KIND_USB = 1;
17
+ DEVICE_CONNECTION_KIND_EMULATOR = 2;
18
+ DEVICE_CONNECTION_KIND_REMOTE_ADB = 3;
19
+ }
20
+
21
+ message ConnectMobileCommand {
22
+ MobilePlatform platform = 1;
23
+ optional string device = 2;
24
+ optional string adb_endpoint = 3;
25
+ bool preserve_app_state = 4;
26
+ optional CommandRetryOptions retry_options = 5;
27
+ }
28
+
29
+ message MobileConnectedEvent {
30
+ MobilePlatform platform = 1;
31
+ string device_name = 2;
32
+ string note = 3;
33
+ string device_id = 4;
34
+ DeviceConnectionKind connection_kind = 5;
35
+ string backend = 6;
36
+ string device_session_id = 7;
37
+ string initial_app_session_id = 8;
38
+ optional string package_name = 9;
39
+ optional string activity_name = 10;
40
+ }
41
+
42
+ message LaunchAppCommand {
43
+ optional string apk_path = 1;
44
+ optional string app_id = 2;
45
+ optional string launch_activity = 3;
46
+ bool stop_before_launch = 4;
47
+ optional CommandRetryOptions retry_options = 5;
48
+ }
49
+
50
+ message AppLaunchedEvent {
51
+ string app_session_id = 1;
52
+ string note = 2;
53
+ optional string package_name = 3;
54
+ optional string activity_name = 4;
55
+ optional string webview_context = 5;
56
+ }
@@ -22,7 +22,7 @@ message BrowserLaunchedEvent {
22
22
  string browser = 2;
23
23
  string note = 3;
24
24
  string user_data_dir = 4;
25
- string initial_tab_session_id = 5;
25
+ string initial_page_session_id = 5;
26
26
  }
27
27
 
28
28
  message LaunchChromeCommand {
@@ -35,136 +35,5 @@ message ChromeLaunchedEvent {
35
35
  string note = 2;
36
36
  string cdp_websocket_url = 3;
37
37
  string user_data_dir = 4;
38
- string initial_tab_session_id = 5;
39
- }
40
-
41
- message NavigateTabCommand {
42
- string url = 1;
43
- optional CommandRetryOptions retry_options = 2;
44
- }
45
-
46
- message ClickElementCommand {
47
- string css_selector = 1;
48
- optional CommandRetryOptions retry_options = 2;
49
- }
50
-
51
- message CountElementsCommand {
52
- string css_selector = 1;
53
- optional CommandRetryOptions retry_options = 2;
54
- }
55
-
56
- message HighlightElementsCommand {
57
- string css_selector = 1;
58
- optional uint32 duration_ms = 2;
59
- optional CommandRetryOptions retry_options = 3;
60
- }
61
-
62
- message FocusElementCommand {
63
- string css_selector = 1;
64
- optional CommandRetryOptions retry_options = 2;
65
- }
66
-
67
- message FillElementCommand {
68
- string css_selector = 1;
69
- string value = 2;
70
- optional CommandRetryOptions retry_options = 3;
71
- }
72
-
73
- message HoverElementCommand {
74
- string css_selector = 1;
75
- optional CommandRetryOptions retry_options = 2;
76
- }
77
-
78
- message PressKeyCommand {
79
- string css_selector = 1;
80
- string key = 2;
81
- optional string text = 3;
82
- optional CommandRetryOptions retry_options = 4;
83
- }
84
-
85
- message GetTextContentCommand {
86
- string css_selector = 1;
87
- optional CommandRetryOptions retry_options = 2;
88
- }
89
-
90
- message GetInnerTextCommand {
91
- string css_selector = 1;
92
- optional CommandRetryOptions retry_options = 2;
93
- }
94
-
95
- message WaitForSelectorCommand {
96
- string css_selector = 1;
97
- optional bool visible = 2;
98
- optional CommandRetryOptions retry_options = 3;
99
- }
100
-
101
- message TabNavigatedEvent {
102
- string url = 1;
103
- string note = 2;
104
- }
105
-
106
- message ChromiumBidiInjectionEvent {
107
- string note = 1;
108
- string bidi_session_id = 2;
109
- string mapper_target_id = 3;
110
- string mapper_session_id = 4;
111
- string package_version = 5;
112
- }
113
-
114
- message ElementClickedEvent {
115
- string css_selector = 1;
116
- string note = 2;
117
- string bidi_session_id = 3;
118
- }
119
-
120
- message ElementCountedEvent {
121
- string css_selector = 1;
122
- uint32 count = 2;
123
- string note = 3;
124
- }
125
-
126
- message ElementsHighlightedEvent {
127
- string css_selector = 1;
128
- uint32 count = 2;
129
- string note = 3;
130
- }
131
-
132
- message ElementFocusedEvent {
133
- string css_selector = 1;
134
- string note = 2;
135
- }
136
-
137
- message ElementFilledEvent {
138
- string css_selector = 1;
139
- string value = 2;
140
- string note = 3;
141
- }
142
-
143
- message ElementHoveredEvent {
144
- string css_selector = 1;
145
- string note = 2;
146
- }
147
-
148
- message KeyPressedEvent {
149
- string css_selector = 1;
150
- string key = 2;
151
- string note = 3;
152
- }
153
-
154
- message TextContentResolvedEvent {
155
- string css_selector = 1;
156
- string text = 2;
157
- string note = 3;
158
- }
159
-
160
- message InnerTextResolvedEvent {
161
- string css_selector = 1;
162
- string text = 2;
163
- string note = 3;
164
- }
165
-
166
- message SelectorWaitSatisfiedEvent {
167
- string css_selector = 1;
168
- bool visible = 2;
169
- string note = 3;
38
+ string initial_page_session_id = 5;
170
39
  }
@@ -1,72 +0,0 @@
1
- syntax = "proto3";
2
-
3
- package allwright.engine.v1;
4
- option go_package = "allwright.dev/gen/allwright/engine/v1;enginev1";
5
-
6
- import "surfaces/web/v1/web.proto";
7
-
8
- message TabSessionCommand {
9
- string browser_session_id = 1;
10
- string tab_session_id = 2;
11
-
12
- oneof command {
13
- TabSessionPingCommand ping = 3;
14
- CloseTabSessionCommand close = 4;
15
- NavigateTabCommand navigate = 5;
16
- ClickElementCommand click_element = 6;
17
- CountElementsCommand count_elements = 7;
18
- HighlightElementsCommand highlight_elements = 8;
19
- FocusElementCommand focus_element = 9;
20
- FillElementCommand fill_element = 10;
21
- HoverElementCommand hover_element = 11;
22
- PressKeyCommand press_key = 12;
23
- GetTextContentCommand get_text_content = 13;
24
- GetInnerTextCommand get_inner_text = 14;
25
- WaitForSelectorCommand wait_for_selector = 15;
26
- }
27
- }
28
-
29
- message TabSessionPingCommand {
30
- string message = 1;
31
- }
32
-
33
- message CloseTabSessionCommand {}
34
-
35
- message TabSessionEvent {
36
- string tab_session_id = 1;
37
-
38
- oneof event {
39
- TabSessionAttachedEvent attached = 2;
40
- TabSessionPongEvent pong = 3;
41
- TabSessionClosedEvent closed = 4;
42
- TabSessionErrorEvent error = 5;
43
- TabNavigatedEvent navigated = 6;
44
- ChromiumBidiInjectionEvent chromium_bidi_injection = 7;
45
- ElementClickedEvent element_clicked = 8;
46
- ElementCountedEvent element_counted = 9;
47
- ElementsHighlightedEvent elements_highlighted = 10;
48
- ElementFocusedEvent element_focused = 11;
49
- ElementFilledEvent element_filled = 12;
50
- ElementHoveredEvent element_hovered = 13;
51
- KeyPressedEvent key_pressed = 14;
52
- TextContentResolvedEvent text_content_resolved = 15;
53
- InnerTextResolvedEvent inner_text_resolved = 16;
54
- SelectorWaitSatisfiedEvent selector_wait_satisfied = 17;
55
- }
56
- }
57
-
58
- message TabSessionAttachedEvent {
59
- string note = 1;
60
- }
61
-
62
- message TabSessionPongEvent {
63
- string message = 1;
64
- }
65
-
66
- message TabSessionClosedEvent {
67
- string reason = 1;
68
- }
69
-
70
- message TabSessionErrorEvent {
71
- string message = 1;
72
- }