@mobilerun/sdk 3.0.0 → 4.0.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 (98) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +4 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +4 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/utils/env.js +2 -2
  10. package/internal/utils/env.js.map +1 -1
  11. package/internal/utils/env.mjs +2 -2
  12. package/internal/utils/env.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/agents.d.mts +1 -0
  15. package/resources/agents.d.mts.map +1 -1
  16. package/resources/agents.d.ts +1 -0
  17. package/resources/agents.d.ts.map +1 -1
  18. package/resources/devices/devices.d.mts +39 -13
  19. package/resources/devices/devices.d.mts.map +1 -1
  20. package/resources/devices/devices.d.ts +39 -13
  21. package/resources/devices/devices.d.ts.map +1 -1
  22. package/resources/devices/devices.js +10 -0
  23. package/resources/devices/devices.js.map +1 -1
  24. package/resources/devices/devices.mjs +12 -2
  25. package/resources/devices/devices.mjs.map +1 -1
  26. package/resources/devices/esim.d.mts +95 -0
  27. package/resources/devices/esim.d.mts.map +1 -0
  28. package/resources/devices/esim.d.ts +95 -0
  29. package/resources/devices/esim.d.ts.map +1 -0
  30. package/resources/devices/esim.js +84 -0
  31. package/resources/devices/esim.js.map +1 -0
  32. package/resources/devices/esim.mjs +80 -0
  33. package/resources/devices/esim.mjs.map +1 -0
  34. package/resources/devices/index.d.mts +4 -3
  35. package/resources/devices/index.d.mts.map +1 -1
  36. package/resources/devices/index.d.ts +4 -3
  37. package/resources/devices/index.d.ts.map +1 -1
  38. package/resources/devices/index.js +3 -1
  39. package/resources/devices/index.js.map +1 -1
  40. package/resources/devices/index.mjs +2 -1
  41. package/resources/devices/index.mjs.map +1 -1
  42. package/resources/devices/proxy.d.mts +40 -9
  43. package/resources/devices/proxy.d.mts.map +1 -1
  44. package/resources/devices/proxy.d.ts +40 -9
  45. package/resources/devices/proxy.d.ts.map +1 -1
  46. package/resources/devices/proxy.js +17 -0
  47. package/resources/devices/proxy.js.map +1 -1
  48. package/resources/devices/proxy.mjs +17 -0
  49. package/resources/devices/proxy.mjs.map +1 -1
  50. package/resources/devices/time.d.mts +2 -16
  51. package/resources/devices/time.d.mts.map +1 -1
  52. package/resources/devices/time.d.ts +2 -16
  53. package/resources/devices/time.d.ts.map +1 -1
  54. package/resources/devices/time.js +0 -19
  55. package/resources/devices/time.js.map +1 -1
  56. package/resources/devices/time.mjs +0 -19
  57. package/resources/devices/time.mjs.map +1 -1
  58. package/resources/index.d.mts +2 -2
  59. package/resources/index.d.mts.map +1 -1
  60. package/resources/index.d.ts +2 -2
  61. package/resources/index.d.ts.map +1 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/proxies.d.mts +52 -21
  65. package/resources/proxies.d.mts.map +1 -1
  66. package/resources/proxies.d.ts +52 -21
  67. package/resources/proxies.d.ts.map +1 -1
  68. package/resources/proxies.js +2 -2
  69. package/resources/proxies.js.map +1 -1
  70. package/resources/proxies.mjs +2 -2
  71. package/resources/proxies.mjs.map +1 -1
  72. package/resources/shared.d.mts +17 -8
  73. package/resources/shared.d.mts.map +1 -1
  74. package/resources/shared.d.ts +17 -8
  75. package/resources/shared.d.ts.map +1 -1
  76. package/resources/tasks/tasks.d.mts +55 -4
  77. package/resources/tasks/tasks.d.mts.map +1 -1
  78. package/resources/tasks/tasks.d.ts +55 -4
  79. package/resources/tasks/tasks.d.ts.map +1 -1
  80. package/resources/tasks/tasks.js.map +1 -1
  81. package/resources/tasks/tasks.mjs.map +1 -1
  82. package/src/client.ts +4 -1
  83. package/src/internal/utils/env.ts +2 -2
  84. package/src/resources/agents.ts +2 -0
  85. package/src/resources/devices/devices.ts +88 -13
  86. package/src/resources/devices/esim.ts +201 -0
  87. package/src/resources/devices/index.ts +17 -2
  88. package/src/resources/devices/proxy.ts +67 -9
  89. package/src/resources/devices/time.ts +1 -34
  90. package/src/resources/index.ts +2 -0
  91. package/src/resources/proxies.ts +73 -21
  92. package/src/resources/shared.ts +24 -12
  93. package/src/resources/tasks/tasks.ts +81 -3
  94. package/src/version.ts +1 -1
  95. package/version.d.mts +1 -1
  96. package/version.d.ts +1 -1
  97. package/version.js +1 -1
  98. package/version.mjs +1 -1
@@ -25,6 +25,7 @@ export {
25
25
  type DeviceCountResponse,
26
26
  type DeviceCreateParams,
27
27
  type DeviceListParams,
28
+ type DeviceSetNameParams,
28
29
  type DeviceTerminateParams,
29
30
  } from './devices/devices';
30
31
  export {
@@ -61,6 +62,7 @@ export {
61
62
  type ProxyDeleteResponse,
62
63
  type ProxyCreateParams,
63
64
  type ProxyUpdateParams,
65
+ type ProxyListParams,
64
66
  } from './proxies';
65
67
  export {
66
68
  Tasks,
@@ -34,8 +34,11 @@ export class Proxies extends APIResource {
34
34
  /**
35
35
  * List all proxy configs for the authenticated user
36
36
  */
37
- list(options?: RequestOptions): APIPromise<ProxyListResponse> {
38
- return this._client.get('/proxies', options);
37
+ list(
38
+ query: ProxyListParams | null | undefined = {},
39
+ options?: RequestOptions,
40
+ ): APIPromise<ProxyListResponse> {
41
+ return this._client.get('/proxies', { query, ...options });
39
42
  }
40
43
 
41
44
  /**
@@ -46,18 +49,34 @@ export class Proxies extends APIResource {
46
49
  }
47
50
  }
48
51
 
49
- export interface ProxyConfig {
50
- host: string;
52
+ export type ProxyConfig = ProxyConfig.Socks5ProxyConfig | ProxyConfig.WireguardProxyConfig;
53
+
54
+ export namespace ProxyConfig {
55
+ export interface Socks5ProxyConfig {
56
+ host: string;
57
+
58
+ name: string;
59
+
60
+ password: string;
51
61
 
52
- name: string;
62
+ port: number;
53
63
 
54
- password: string;
64
+ protocol: 'socks5';
65
+
66
+ proxyId: string;
67
+
68
+ user: string;
69
+ }
55
70
 
56
- port: number;
71
+ export interface WireguardProxyConfig {
72
+ config: string;
57
73
 
58
- proxyId: string;
74
+ name: string;
59
75
 
60
- user: string;
76
+ protocol: 'wireguard';
77
+
78
+ proxyId: string;
79
+ }
61
80
  }
62
81
 
63
82
  export interface ProxyCreateResponse {
@@ -92,28 +111,60 @@ export interface ProxyDeleteResponse {
92
111
  success: true;
93
112
  }
94
113
 
95
- export interface ProxyCreateParams {
96
- host: string;
114
+ export type ProxyCreateParams = ProxyCreateParams.CreateSocks5Proxy | ProxyCreateParams.CreateWireguardProxy;
115
+
116
+ export declare namespace ProxyCreateParams {
117
+ export interface CreateSocks5Proxy {
118
+ host: string;
97
119
 
98
- name: string;
120
+ name: string;
99
121
 
100
- password: string;
122
+ password: string;
101
123
 
102
- port: number;
124
+ port: number;
125
+
126
+ protocol: 'socks5';
127
+
128
+ user: string;
129
+ }
103
130
 
104
- user: string;
131
+ export interface CreateWireguardProxy {
132
+ config: string;
133
+
134
+ name: string;
135
+
136
+ protocol: 'wireguard';
137
+ }
105
138
  }
106
139
 
107
- export interface ProxyUpdateParams {
108
- host: string;
140
+ export type ProxyUpdateParams = ProxyUpdateParams.UpdateSocks5Proxy | ProxyUpdateParams.UpdateWireguardProxy;
141
+
142
+ export declare namespace ProxyUpdateParams {
143
+ export interface UpdateSocks5Proxy {
144
+ host: string;
145
+
146
+ name: string;
147
+
148
+ password: string;
109
149
 
110
- name: string;
150
+ port: number;
111
151
 
112
- password: string;
152
+ protocol: 'socks5';
113
153
 
114
- port: number;
154
+ user: string;
155
+ }
156
+
157
+ export interface UpdateWireguardProxy {
158
+ config: string;
159
+
160
+ name: string;
161
+
162
+ protocol: 'wireguard';
163
+ }
164
+ }
115
165
 
116
- user: string;
166
+ export interface ProxyListParams {
167
+ protocol?: 'socks5' | 'wireguard';
117
168
  }
118
169
 
119
170
  export declare namespace Proxies {
@@ -126,5 +177,6 @@ export declare namespace Proxies {
126
177
  type ProxyDeleteResponse as ProxyDeleteResponse,
127
178
  type ProxyCreateParams as ProxyCreateParams,
128
179
  type ProxyUpdateParams as ProxyUpdateParams,
180
+ type ProxyListParams as ProxyListParams,
129
181
  };
130
182
  }
@@ -1,15 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export interface Config {
4
- host: string;
5
-
6
- password: string;
7
-
8
- port: number;
9
-
10
- user: string;
11
- }
12
-
13
3
  export interface DeviceCarrier {
14
4
  GsmOperatorAlpha: string;
15
5
 
@@ -72,9 +62,31 @@ export interface DeviceSpec {
72
62
 
73
63
  name?: string;
74
64
 
75
- proxy?: Config;
65
+ proxy?: DeviceSpec.Proxy;
66
+ }
67
+
68
+ export namespace DeviceSpec {
69
+ export interface Proxy {
70
+ name?: string;
71
+
72
+ smartIp?: boolean;
73
+
74
+ socks5?: Proxy.Socks5;
75
+
76
+ wireguard?: string;
77
+ }
78
+
79
+ export namespace Proxy {
80
+ export interface Socks5 {
81
+ host: string;
82
+
83
+ password: string;
84
+
85
+ port: number;
76
86
 
77
- smartIp?: boolean;
87
+ user: string;
88
+ }
89
+ }
78
90
  }
79
91
 
80
92
  export interface Meta {
@@ -121,10 +121,18 @@ export interface Task {
121
121
 
122
122
  apps?: Array<string>;
123
123
 
124
+ cancelRequestedAt?: string | null;
125
+
126
+ claimedAt?: string | null;
127
+
128
+ continueOnFailure?: boolean;
129
+
124
130
  createdAt?: string;
125
131
 
126
132
  credentials?: Array<PackageCredentials>;
127
133
 
134
+ dispatchedAt?: string | null;
135
+
128
136
  displayId?: number;
129
137
 
130
138
  executionTimeout?: number;
@@ -135,6 +143,11 @@ export interface Task {
135
143
 
136
144
  maxSteps?: number;
137
145
 
146
+ /**
147
+ * Memory namespace for cross-task personalization
148
+ */
149
+ memoryNamespace?: string;
150
+
138
151
  message?: string | null;
139
152
 
140
153
  output?: { [key: string]: unknown } | null;
@@ -149,6 +162,13 @@ export interface Task {
149
162
 
150
163
  steps?: number | null;
151
164
 
165
+ streamUrl?: string | null;
166
+
167
+ /**
168
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
169
+ */
170
+ subagentModel?: string;
171
+
152
172
  succeeded?: boolean | null;
153
173
 
154
174
  temperature?: number;
@@ -164,7 +184,15 @@ export interface Task {
164
184
  vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
165
185
  }
166
186
 
167
- export type TaskStatus = 'created' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
187
+ export type TaskStatus =
188
+ | 'queued'
189
+ | 'created'
190
+ | 'running'
191
+ | 'cancelling'
192
+ | 'paused'
193
+ | 'completed'
194
+ | 'failed'
195
+ | 'cancelled';
168
196
 
169
197
  export interface UsageResult {
170
198
  request_tokens: number;
@@ -232,6 +260,7 @@ export interface TaskGetTrajectoryResponse {
232
260
  * The trajectory of the task
233
261
  */
234
262
  trajectory: Array<
263
+ | TaskGetTrajectoryResponse.TrajectoryQueuedEvent
235
264
  | TaskGetTrajectoryResponse.TrajectoryCreatedEvent
236
265
  | TaskGetTrajectoryResponse.TrajectoryExceptionEvent
237
266
  | TaskGetTrajectoryResponse.TrajectoryCancelEvent
@@ -266,6 +295,26 @@ export interface TaskGetTrajectoryResponse {
266
295
  }
267
296
 
268
297
  export namespace TaskGetTrajectoryResponse {
298
+ export interface TrajectoryQueuedEvent {
299
+ /**
300
+ * Emitted to SSE clients when the task is waiting in the device queue.
301
+ */
302
+ data: TrajectoryQueuedEvent.Data;
303
+
304
+ event: 'QueuedEvent';
305
+ }
306
+
307
+ export namespace TrajectoryQueuedEvent {
308
+ /**
309
+ * Emitted to SSE clients when the task is waiting in the device queue.
310
+ */
311
+ export interface Data {
312
+ id: string;
313
+
314
+ status?: string;
315
+ }
316
+ }
317
+
269
318
  export interface TrajectoryCreatedEvent {
270
319
  data: TrajectoryCreatedEvent.Data;
271
320
 
@@ -832,9 +881,14 @@ export interface TaskRunResponse {
832
881
  id: string;
833
882
 
834
883
  /**
835
- * The URL of the stream
884
+ * The status of the task (queued or created)
836
885
  */
837
- streamUrl: string;
886
+ status: TaskStatus;
887
+
888
+ /**
889
+ * The URL of the stream (null when queued)
890
+ */
891
+ streamUrl?: string | null;
838
892
  }
839
893
 
840
894
  export type TaskRunStreamedResponse = unknown;
@@ -882,6 +936,8 @@ export interface TaskRunParams {
882
936
 
883
937
  apps?: Array<string>;
884
938
 
939
+ continueOnFailure?: boolean;
940
+
885
941
  credentials?: Array<PackageCredentials>;
886
942
 
887
943
  /**
@@ -901,12 +957,22 @@ export interface TaskRunParams {
901
957
 
902
958
  maxSteps?: number;
903
959
 
960
+ /**
961
+ * Memory namespace for cross-task personalization
962
+ */
963
+ memoryNamespace?: string;
964
+
904
965
  outputSchema?: { [key: string]: unknown } | null;
905
966
 
906
967
  reasoning?: boolean;
907
968
 
908
969
  stealth?: boolean;
909
970
 
971
+ /**
972
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
973
+ */
974
+ subagentModel?: string;
975
+
910
976
  temperature?: number;
911
977
 
912
978
  vision?: boolean;
@@ -926,6 +992,8 @@ export interface TaskRunStreamedParams {
926
992
 
927
993
  apps?: Array<string>;
928
994
 
995
+ continueOnFailure?: boolean;
996
+
929
997
  credentials?: Array<PackageCredentials>;
930
998
 
931
999
  /**
@@ -945,12 +1013,22 @@ export interface TaskRunStreamedParams {
945
1013
 
946
1014
  maxSteps?: number;
947
1015
 
1016
+ /**
1017
+ * Memory namespace for cross-task personalization
1018
+ */
1019
+ memoryNamespace?: string;
1020
+
948
1021
  outputSchema?: { [key: string]: unknown } | null;
949
1022
 
950
1023
  reasoning?: boolean;
951
1024
 
952
1025
  stealth?: boolean;
953
1026
 
1027
+ /**
1028
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
1029
+ */
1030
+ subagentModel?: string;
1031
+
954
1032
  temperature?: number;
955
1033
 
956
1034
  vision?: boolean;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.0.0'; // x-release-please-version
1
+ export const VERSION = '4.0.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.0.0";
1
+ export declare const VERSION = "4.0.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.0.0";
1
+ export declare const VERSION = "4.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.0.0'; // x-release-please-version
4
+ exports.VERSION = '4.0.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.0.0'; // x-release-please-version
1
+ export const VERSION = '4.0.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map