@mobilerun/sdk 2.2.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 (261) hide show
  1. package/CHANGELOG.md +513 -0
  2. package/README.md +46 -2
  3. package/client.d.mts +33 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +33 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +29 -7
  8. package/client.js.map +1 -1
  9. package/client.mjs +29 -7
  10. package/client.mjs.map +1 -1
  11. package/internal/tslib.js +6 -6
  12. package/internal/utils/env.js +2 -2
  13. package/internal/utils/env.js.map +1 -1
  14. package/internal/utils/env.mjs +2 -2
  15. package/internal/utils/env.mjs.map +1 -1
  16. package/internal/utils/query.d.mts +2 -0
  17. package/internal/utils/query.d.mts.map +1 -0
  18. package/internal/utils/query.d.ts +2 -0
  19. package/internal/utils/query.d.ts.map +1 -0
  20. package/internal/utils/query.js +10 -0
  21. package/internal/utils/query.js.map +1 -0
  22. package/internal/utils/query.mjs +6 -0
  23. package/internal/utils/query.mjs.map +1 -0
  24. package/internal/utils.d.mts +1 -0
  25. package/internal/utils.d.ts +1 -0
  26. package/internal/utils.js +1 -0
  27. package/internal/utils.js.map +1 -1
  28. package/internal/utils.mjs +1 -0
  29. package/package.json +7 -1
  30. package/resources/agents.d.mts +30 -0
  31. package/resources/agents.d.mts.map +1 -0
  32. package/resources/agents.d.ts +30 -0
  33. package/resources/agents.d.ts.map +1 -0
  34. package/resources/agents.js +18 -0
  35. package/resources/agents.js.map +1 -0
  36. package/resources/agents.mjs +14 -0
  37. package/resources/agents.mjs.map +1 -0
  38. package/resources/apps.d.mts +10 -12
  39. package/resources/apps.d.mts.map +1 -1
  40. package/resources/apps.d.ts +10 -12
  41. package/resources/apps.d.ts.map +1 -1
  42. package/resources/apps.js.map +1 -1
  43. package/resources/apps.mjs.map +1 -1
  44. package/resources/carriers.d.mts +233 -0
  45. package/resources/carriers.d.mts.map +1 -0
  46. package/resources/carriers.d.ts +233 -0
  47. package/resources/carriers.d.ts.map +1 -0
  48. package/resources/carriers.js +46 -0
  49. package/resources/carriers.js.map +1 -0
  50. package/resources/carriers.mjs +42 -0
  51. package/resources/carriers.mjs.map +1 -0
  52. package/resources/credentials/credentials.d.mts +4 -13
  53. package/resources/credentials/credentials.d.mts.map +1 -1
  54. package/resources/credentials/credentials.d.ts +4 -13
  55. package/resources/credentials/credentials.d.ts.map +1 -1
  56. package/resources/credentials/credentials.js.map +1 -1
  57. package/resources/credentials/credentials.mjs.map +1 -1
  58. package/resources/devices/actions.d.mts +37 -1
  59. package/resources/devices/actions.d.mts.map +1 -1
  60. package/resources/devices/actions.d.ts +37 -1
  61. package/resources/devices/actions.d.ts.map +1 -1
  62. package/resources/devices/actions.js +36 -0
  63. package/resources/devices/actions.js.map +1 -1
  64. package/resources/devices/actions.mjs +36 -0
  65. package/resources/devices/actions.mjs.map +1 -1
  66. package/resources/devices/apps.d.mts +4 -0
  67. package/resources/devices/apps.d.mts.map +1 -1
  68. package/resources/devices/apps.d.ts +4 -0
  69. package/resources/devices/apps.d.ts.map +1 -1
  70. package/resources/devices/devices.d.mts +63 -35
  71. package/resources/devices/devices.d.mts.map +1 -1
  72. package/resources/devices/devices.d.ts +63 -35
  73. package/resources/devices/devices.d.ts.map +1 -1
  74. package/resources/devices/devices.js +32 -2
  75. package/resources/devices/devices.js.map +1 -1
  76. package/resources/devices/devices.mjs +33 -3
  77. package/resources/devices/devices.mjs.map +1 -1
  78. package/resources/devices/esim.d.mts +95 -0
  79. package/resources/devices/esim.d.mts.map +1 -0
  80. package/resources/devices/esim.d.ts +95 -0
  81. package/resources/devices/esim.d.ts.map +1 -0
  82. package/resources/devices/esim.js +84 -0
  83. package/resources/devices/esim.js.map +1 -0
  84. package/resources/devices/esim.mjs +80 -0
  85. package/resources/devices/esim.mjs.map +1 -0
  86. package/resources/devices/files.d.mts +108 -0
  87. package/resources/devices/files.d.mts.map +1 -0
  88. package/resources/devices/files.d.ts +108 -0
  89. package/resources/devices/files.d.ts.map +1 -0
  90. package/resources/devices/files.js +87 -0
  91. package/resources/devices/files.js.map +1 -0
  92. package/resources/devices/files.mjs +83 -0
  93. package/resources/devices/files.mjs.map +1 -0
  94. package/resources/devices/index.d.mts +9 -3
  95. package/resources/devices/index.d.mts.map +1 -1
  96. package/resources/devices/index.d.ts +9 -3
  97. package/resources/devices/index.d.ts.map +1 -1
  98. package/resources/devices/index.js +13 -1
  99. package/resources/devices/index.js.map +1 -1
  100. package/resources/devices/index.mjs +7 -1
  101. package/resources/devices/index.mjs.map +1 -1
  102. package/resources/devices/keyboard.d.mts +10 -2
  103. package/resources/devices/keyboard.d.mts.map +1 -1
  104. package/resources/devices/keyboard.d.ts +10 -2
  105. package/resources/devices/keyboard.d.ts.map +1 -1
  106. package/resources/devices/location.d.mts +42 -0
  107. package/resources/devices/location.d.mts.map +1 -0
  108. package/resources/devices/location.d.ts +42 -0
  109. package/resources/devices/location.d.ts.map +1 -0
  110. package/resources/devices/location.js +47 -0
  111. package/resources/devices/location.js.map +1 -0
  112. package/resources/devices/location.mjs +43 -0
  113. package/resources/devices/location.mjs.map +1 -0
  114. package/resources/devices/packages.d.mts +4 -0
  115. package/resources/devices/packages.d.mts.map +1 -1
  116. package/resources/devices/packages.d.ts +4 -0
  117. package/resources/devices/packages.d.ts.map +1 -1
  118. package/resources/devices/profile.d.mts +23 -0
  119. package/resources/devices/profile.d.mts.map +1 -0
  120. package/resources/devices/profile.d.ts +23 -0
  121. package/resources/devices/profile.d.ts.map +1 -0
  122. package/resources/devices/profile.js +30 -0
  123. package/resources/devices/profile.js.map +1 -0
  124. package/resources/devices/profile.mjs +26 -0
  125. package/resources/devices/profile.mjs.map +1 -0
  126. package/resources/devices/proxy.d.mts +92 -0
  127. package/resources/devices/proxy.d.mts.map +1 -0
  128. package/resources/devices/proxy.d.ts +92 -0
  129. package/resources/devices/proxy.d.ts.map +1 -0
  130. package/resources/devices/proxy.js +65 -0
  131. package/resources/devices/proxy.js.map +1 -0
  132. package/resources/devices/proxy.mjs +61 -0
  133. package/resources/devices/proxy.mjs.map +1 -0
  134. package/resources/devices/state.d.mts +8 -19
  135. package/resources/devices/state.d.mts.map +1 -1
  136. package/resources/devices/state.d.ts +8 -19
  137. package/resources/devices/state.d.ts.map +1 -1
  138. package/resources/devices/state.js +0 -17
  139. package/resources/devices/state.js.map +1 -1
  140. package/resources/devices/state.mjs +0 -17
  141. package/resources/devices/state.mjs.map +1 -1
  142. package/resources/devices/tasks.d.mts +2 -9
  143. package/resources/devices/tasks.d.mts.map +1 -1
  144. package/resources/devices/tasks.d.ts +2 -9
  145. package/resources/devices/tasks.d.ts.map +1 -1
  146. package/resources/devices/tasks.js.map +1 -1
  147. package/resources/devices/tasks.mjs.map +1 -1
  148. package/resources/devices/time.d.mts +45 -0
  149. package/resources/devices/time.d.mts.map +1 -0
  150. package/resources/devices/time.d.ts +45 -0
  151. package/resources/devices/time.d.ts.map +1 -0
  152. package/resources/devices/time.js +64 -0
  153. package/resources/devices/time.js.map +1 -0
  154. package/resources/devices/time.mjs +60 -0
  155. package/resources/devices/time.mjs.map +1 -0
  156. package/resources/hooks.d.mts +5 -30
  157. package/resources/hooks.d.mts.map +1 -1
  158. package/resources/hooks.d.ts +5 -30
  159. package/resources/hooks.d.ts.map +1 -1
  160. package/resources/hooks.js +3 -0
  161. package/resources/hooks.js.map +1 -1
  162. package/resources/hooks.mjs +3 -0
  163. package/resources/hooks.mjs.map +1 -1
  164. package/resources/index.d.mts +7 -2
  165. package/resources/index.d.mts.map +1 -1
  166. package/resources/index.d.ts +7 -2
  167. package/resources/index.d.ts.map +1 -1
  168. package/resources/index.js +11 -1
  169. package/resources/index.js.map +1 -1
  170. package/resources/index.mjs +5 -0
  171. package/resources/index.mjs.map +1 -1
  172. package/resources/profiles.d.mts +84 -0
  173. package/resources/profiles.d.mts.map +1 -0
  174. package/resources/profiles.d.ts +84 -0
  175. package/resources/profiles.d.ts.map +1 -0
  176. package/resources/profiles.js +40 -0
  177. package/resources/profiles.js.map +1 -0
  178. package/resources/profiles.mjs +36 -0
  179. package/resources/profiles.mjs.map +1 -0
  180. package/resources/proxies.d.mts +103 -0
  181. package/resources/proxies.d.mts.map +1 -0
  182. package/resources/proxies.d.ts +103 -0
  183. package/resources/proxies.d.ts.map +1 -0
  184. package/resources/proxies.js +40 -0
  185. package/resources/proxies.js.map +1 -0
  186. package/resources/proxies.mjs +36 -0
  187. package/resources/proxies.mjs.map +1 -0
  188. package/resources/shared.d.mts +104 -0
  189. package/resources/shared.d.mts.map +1 -0
  190. package/resources/shared.d.ts +104 -0
  191. package/resources/shared.d.ts.map +1 -0
  192. package/resources/shared.js +4 -0
  193. package/resources/shared.js.map +1 -0
  194. package/resources/shared.mjs +3 -0
  195. package/resources/shared.mjs.map +1 -0
  196. package/resources/tasks/index.d.mts +1 -1
  197. package/resources/tasks/index.d.mts.map +1 -1
  198. package/resources/tasks/index.d.ts +1 -1
  199. package/resources/tasks/index.d.ts.map +1 -1
  200. package/resources/tasks/index.js.map +1 -1
  201. package/resources/tasks/index.mjs.map +1 -1
  202. package/resources/tasks/screenshots.d.mts +3 -0
  203. package/resources/tasks/screenshots.d.mts.map +1 -1
  204. package/resources/tasks/screenshots.d.ts +3 -0
  205. package/resources/tasks/screenshots.d.ts.map +1 -1
  206. package/resources/tasks/screenshots.js +3 -0
  207. package/resources/tasks/screenshots.js.map +1 -1
  208. package/resources/tasks/screenshots.mjs +3 -0
  209. package/resources/tasks/screenshots.mjs.map +1 -1
  210. package/resources/tasks/tasks.d.mts +141 -60
  211. package/resources/tasks/tasks.d.mts.map +1 -1
  212. package/resources/tasks/tasks.d.ts +141 -60
  213. package/resources/tasks/tasks.d.ts.map +1 -1
  214. package/resources/tasks/tasks.js +11 -5
  215. package/resources/tasks/tasks.js.map +1 -1
  216. package/resources/tasks/tasks.mjs +11 -5
  217. package/resources/tasks/tasks.mjs.map +1 -1
  218. package/resources/tasks/ui-states.d.mts +3 -0
  219. package/resources/tasks/ui-states.d.mts.map +1 -1
  220. package/resources/tasks/ui-states.d.ts +3 -0
  221. package/resources/tasks/ui-states.d.ts.map +1 -1
  222. package/resources/tasks/ui-states.js +3 -0
  223. package/resources/tasks/ui-states.js.map +1 -1
  224. package/resources/tasks/ui-states.mjs +3 -0
  225. package/resources/tasks/ui-states.mjs.map +1 -1
  226. package/src/client.ts +112 -10
  227. package/src/internal/utils/env.ts +2 -2
  228. package/src/internal/utils/query.ts +7 -0
  229. package/src/internal/utils.ts +1 -0
  230. package/src/resources/agents.ts +45 -0
  231. package/src/resources/apps.ts +11 -19
  232. package/src/resources/carriers.ts +327 -0
  233. package/src/resources/credentials/credentials.ts +4 -19
  234. package/src/resources/devices/actions.ts +84 -0
  235. package/src/resources/devices/apps.ts +5 -0
  236. package/src/resources/devices/devices.ts +171 -50
  237. package/src/resources/devices/esim.ts +201 -0
  238. package/src/resources/devices/files.ts +221 -0
  239. package/src/resources/devices/index.ts +52 -3
  240. package/src/resources/devices/keyboard.ts +12 -2
  241. package/src/resources/devices/location.ts +91 -0
  242. package/src/resources/devices/packages.ts +5 -0
  243. package/src/resources/devices/profile.ts +45 -0
  244. package/src/resources/devices/proxy.ts +173 -0
  245. package/src/resources/devices/state.ts +10 -44
  246. package/src/resources/devices/tasks.ts +2 -15
  247. package/src/resources/devices/time.ts +114 -0
  248. package/src/resources/hooks.ts +5 -36
  249. package/src/resources/index.ts +37 -0
  250. package/src/resources/profiles.ts +133 -0
  251. package/src/resources/proxies.ts +182 -0
  252. package/src/resources/shared.ts +161 -0
  253. package/src/resources/tasks/index.ts +3 -0
  254. package/src/resources/tasks/screenshots.ts +3 -0
  255. package/src/resources/tasks/tasks.ts +191 -68
  256. package/src/resources/tasks/ui-states.ts +3 -0
  257. package/src/version.ts +1 -1
  258. package/version.d.mts +1 -1
  259. package/version.d.ts +1 -1
  260. package/version.js +1 -1
  261. package/version.mjs +1 -1
@@ -0,0 +1,104 @@
1
+ export interface DeviceCarrier {
2
+ GsmOperatorAlpha: string;
3
+ GsmOperatorNumeric: number;
4
+ GsmSimOperatorAlpha: string;
5
+ GsmSimOperatorIsoCountry: string;
6
+ GsmSimOperatorNumeric: number;
7
+ PersistSysTimezone: string;
8
+ }
9
+ export interface DeviceIdentifiers {
10
+ BootloaderSerialNumber: string;
11
+ IdentifierAndroidID: string;
12
+ IdentifierAppSetID: string;
13
+ IdentifierBluetoothMAC: string;
14
+ IdentifierGAID: string;
15
+ IdentifierGSFID: string;
16
+ IdentifierICCID: string;
17
+ IdentifierIMEI: string;
18
+ IdentifierIMSI: string;
19
+ IdentifierMediaDRMID: string;
20
+ IdentifierMEID: string;
21
+ IdentifierPhoneNumber: string;
22
+ IdentifierSerial: string;
23
+ IdentifierWifiMAC: string;
24
+ SerialNumber: string;
25
+ }
26
+ export interface DeviceSpec {
27
+ /**
28
+ * A URL to the JSON Schema for this object.
29
+ */
30
+ $schema?: string;
31
+ apps?: Array<string> | null;
32
+ carrier?: DeviceCarrier;
33
+ files?: Array<string> | null;
34
+ identifiers?: DeviceIdentifiers;
35
+ name?: string;
36
+ proxy?: DeviceSpec.Proxy;
37
+ }
38
+ export declare namespace DeviceSpec {
39
+ interface Proxy {
40
+ name?: string;
41
+ smartIp?: boolean;
42
+ socks5?: Proxy.Socks5;
43
+ wireguard?: string;
44
+ }
45
+ namespace Proxy {
46
+ interface Socks5 {
47
+ host: string;
48
+ password: string;
49
+ port: number;
50
+ user: string;
51
+ }
52
+ }
53
+ }
54
+ export interface Meta {
55
+ hasNext: boolean;
56
+ hasPrev: boolean;
57
+ page: number;
58
+ pages: number;
59
+ pageSize: number;
60
+ total: number;
61
+ }
62
+ export interface Pagination {
63
+ hasNext: boolean;
64
+ hasPrev: boolean;
65
+ page: number;
66
+ pages: number;
67
+ pageSize: number;
68
+ total: number;
69
+ }
70
+ /**
71
+ * Pagination metadata.
72
+ */
73
+ export interface PaginationMeta {
74
+ /**
75
+ * Whether there is a next page
76
+ */
77
+ hasNext: boolean;
78
+ /**
79
+ * Whether there is a previous page
80
+ */
81
+ hasPrev: boolean;
82
+ /**
83
+ * Current page number (1-based)
84
+ */
85
+ page: number;
86
+ /**
87
+ * Total number of pages
88
+ */
89
+ pages: number;
90
+ /**
91
+ * Number of items per page
92
+ */
93
+ pageSize: number;
94
+ /**
95
+ * Total number of items
96
+ */
97
+ total: number;
98
+ }
99
+ export interface PermissionSet {
100
+ execute: boolean;
101
+ read: boolean;
102
+ write: boolean;
103
+ }
104
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,wBAAwB,EAAE,MAAM,CAAC;IAEjC,qBAAqB,EAAE,MAAM,CAAC;IAE9B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAE/B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,sBAAsB,EAAE,MAAM,CAAC;IAE/B,cAAc,EAAE,MAAM,CAAC;IAEvB,eAAe,EAAE,MAAM,CAAC;IAExB,eAAe,EAAE,MAAM,CAAC;IAExB,cAAc,EAAE,MAAM,CAAC;IAEvB,cAAc,EAAE,MAAM,CAAC;IAEvB,oBAAoB,EAAE,MAAM,CAAC;IAE7B,cAAc,EAAE,MAAM,CAAC;IAEvB,qBAAqB,EAAE,MAAM,CAAC;IAE9B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,iBAAiB,EAAE,MAAM,CAAC;IAE1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE5B,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE7B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEhC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC;CAC1B;AAED,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,KAAK;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;QAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,KAAK,CAAC;QACrB,UAAiB,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC;YAEb,QAAQ,EAAE,MAAM,CAAC;YAEjB,IAAI,EAAE,MAAM,CAAC;YAEb,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,WAAW,IAAI;IACnB,OAAO,EAAE,OAAO,CAAC;IAEjB,OAAO,EAAE,OAAO,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IAEjB,OAAO,EAAE,OAAO,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,IAAI,EAAE,OAAO,CAAC;IAEd,KAAK,EAAE,OAAO,CAAC;CAChB"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export {};
3
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,4 +1,4 @@
1
1
  export { Screenshots, type MediaResponse, type ScreenshotListResponse, type ScreenshotRetrieveParams, } from "./screenshots.mjs";
2
- export { Tasks, type PackageCredentials, type Task, type TaskStatus, type UsageResult, type TaskRetrieveResponse, type TaskListResponse, type TaskGetStatusResponse, type TaskGetTrajectoryResponse, type TaskRunResponse, type TaskStopResponse, type TaskListParams, type TaskRunParams, type TaskRunStreamedParams, } from "./tasks.mjs";
2
+ export { Tasks, type PackageCredentials, type Task, type TaskStatus, type UsageResult, type TaskRetrieveResponse, type TaskListResponse, type TaskGetStatusResponse, type TaskGetTrajectoryResponse, type TaskRunResponse, type TaskRunStreamedResponse, type TaskSendMessageResponse, type TaskStopResponse, type TaskListParams, type TaskRunParams, type TaskRunStreamedParams, type TaskSendMessageParams, } from "./tasks.mjs";
3
3
  export { UiStates, type UiStateListResponse, type UiStateRetrieveParams } from "./ui-states.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B;OACM,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B;OACM,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE"}
@@ -1,4 +1,4 @@
1
1
  export { Screenshots, type MediaResponse, type ScreenshotListResponse, type ScreenshotRetrieveParams, } from "./screenshots.js";
2
- export { Tasks, type PackageCredentials, type Task, type TaskStatus, type UsageResult, type TaskRetrieveResponse, type TaskListResponse, type TaskGetStatusResponse, type TaskGetTrajectoryResponse, type TaskRunResponse, type TaskStopResponse, type TaskListParams, type TaskRunParams, type TaskRunStreamedParams, } from "./tasks.js";
2
+ export { Tasks, type PackageCredentials, type Task, type TaskStatus, type UsageResult, type TaskRetrieveResponse, type TaskListResponse, type TaskGetStatusResponse, type TaskGetTrajectoryResponse, type TaskRunResponse, type TaskRunStreamedResponse, type TaskSendMessageResponse, type TaskStopResponse, type TaskListParams, type TaskRunParams, type TaskRunStreamedParams, type TaskSendMessageParams, } from "./tasks.js";
3
3
  export { UiStates, type UiStateListResponse, type UiStateRetrieveParams } from "./ui-states.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B;OACM,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B;OACM,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B;OACM,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAKuB;AAJrB,0GAAA,WAAW,OAAA;AAKb,oCAeiB;AAdf,8FAAA,KAAK,OAAA;AAeP,4CAA6F;AAApF,qGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAKuB;AAJrB,0GAAA,WAAW,OAAA;AAKb,oCAkBiB;AAjBf,8FAAA,KAAK,OAAA;AAkBP,4CAA6F;AAApF,qGAAA,QAAQ,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAIZ;OACM,EACL,KAAK,GAcN;OACM,EAAE,QAAQ,EAAwD"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/tasks/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAIZ;OACM,EACL,KAAK,GAiBN;OACM,EAAE,QAAQ,EAAwD"}
@@ -1,6 +1,9 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import { APIPromise } from "../../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../../internal/request-options.mjs";
4
+ /**
5
+ * Tasks API
6
+ */
4
7
  export declare class Screenshots extends APIResource {
5
8
  /**
6
9
  * Get a specific screenshot by index.
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.d.mts","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAK5B;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
1
+ {"version":3,"file":"screenshots.d.mts","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAK5B;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -1,6 +1,9 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import { APIPromise } from "../../core/api-promise.js";
3
3
  import { RequestOptions } from "../../internal/request-options.js";
4
+ /**
5
+ * Tasks API
6
+ */
4
7
  export declare class Screenshots extends APIResource {
5
8
  /**
6
9
  * Get a specific screenshot by index.
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAK5B;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
1
+ {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,aAAa,CAAC;IAK5B;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGnF;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Screenshots = void 0;
5
5
  const resource_1 = require("../../core/resource.js");
6
6
  const path_1 = require("../../internal/utils/path.js");
7
+ /**
8
+ * Tasks API
9
+ */
7
10
  class Screenshots extends resource_1.APIResource {
8
11
  /**
9
12
  * Get a specific screenshot by index.
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAnBD,kCAmBC"}
1
+ {"version":3,"file":"screenshots.js","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,OAAO,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,UAAU,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF;AAnBD,kCAmBC"}
@@ -1,6 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../../core/resource.mjs";
3
3
  import { path } from "../../internal/utils/path.mjs";
4
+ /**
5
+ * Tasks API
6
+ */
4
7
  export class Screenshots extends APIResource {
5
8
  /**
6
9
  * Get a specific screenshot by index.
@@ -1 +1 @@
1
- {"version":3,"file":"screenshots.mjs","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"screenshots.mjs","sourceRoot":"","sources":["../../src/resources/tasks/screenshots.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CACN,KAAa,EACb,MAAgC,EAChC,OAAwB;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,OAAO,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,UAAU,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;CACF"}
@@ -1,11 +1,15 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
2
  import * as TasksAPI from "./tasks.mjs";
3
+ import * as Shared from "../shared.mjs";
3
4
  import * as ScreenshotsAPI from "./screenshots.mjs";
4
5
  import { MediaResponse, ScreenshotListResponse, ScreenshotRetrieveParams, Screenshots } from "./screenshots.mjs";
5
6
  import * as UiStatesAPI from "./ui-states.mjs";
6
7
  import { UiStateListResponse, UiStateRetrieveParams, UiStates } from "./ui-states.mjs";
7
8
  import { APIPromise } from "../../core/api-promise.mjs";
8
9
  import { RequestOptions } from "../../internal/request-options.mjs";
10
+ /**
11
+ * Tasks API
12
+ */
9
13
  export declare class Tasks extends APIResource {
10
14
  screenshots: ScreenshotsAPI.Screenshots;
11
15
  uiStates: UiStatesAPI.UiStates;
@@ -38,7 +42,12 @@ export declare class Tasks extends APIResource {
38
42
  * Create and dispatch a new agent task, returning an SSE stream of task events.
39
43
  * Cancels the task if the client disconnects.
40
44
  */
41
- runStreamed(body: TaskRunStreamedParams, options?: RequestOptions): APIPromise<void>;
45
+ runStreamed(body: TaskRunStreamedParams, options?: RequestOptions): APIPromise<unknown>;
46
+ /**
47
+ * Send a message to a running agent task. The message ID is delivered via SSE
48
+ * (UserMessageEvent with action=queued).
49
+ */
50
+ sendMessage(taskID: string, body: TaskSendMessageParams, options?: RequestOptions): APIPromise<TaskSendMessageResponse>;
42
51
  /**
43
52
  * Cancel a running task. Returns an error if the task is already in a terminal
44
53
  * state.
@@ -58,14 +67,24 @@ export interface Task {
58
67
  task: string;
59
68
  userId: string;
60
69
  id?: string;
70
+ agentId?: number;
61
71
  apps?: Array<string>;
72
+ cancelRequestedAt?: string | null;
73
+ claimedAt?: string | null;
74
+ continueOnFailure?: boolean;
62
75
  createdAt?: string;
63
76
  credentials?: Array<PackageCredentials>;
77
+ dispatchedAt?: string | null;
64
78
  displayId?: number;
65
79
  executionTimeout?: number;
66
80
  files?: Array<string>;
67
81
  finishedAt?: string | null;
68
82
  maxSteps?: number;
83
+ /**
84
+ * Memory namespace for cross-task personalization
85
+ */
86
+ memoryNamespace?: string;
87
+ message?: string | null;
69
88
  output?: {
70
89
  [key: string]: unknown;
71
90
  } | null;
@@ -76,6 +95,11 @@ export interface Task {
76
95
  status?: TaskStatus;
77
96
  stealth?: boolean;
78
97
  steps?: number | null;
98
+ streamUrl?: string | null;
99
+ /**
100
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
101
+ */
102
+ subagentModel?: string;
79
103
  succeeded?: boolean | null;
80
104
  temperature?: number;
81
105
  tmpDevice?: boolean;
@@ -86,7 +110,7 @@ export interface Task {
86
110
  vision?: boolean;
87
111
  vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
88
112
  }
89
- export type TaskStatus = 'created' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
113
+ export type TaskStatus = 'queued' | 'created' | 'running' | 'cancelling' | 'paused' | 'completed' | 'failed' | 'cancelled';
90
114
  export interface UsageResult {
91
115
  request_tokens: number;
92
116
  requests: number;
@@ -107,52 +131,61 @@ export interface TaskListResponse {
107
131
  /**
108
132
  * Pagination metadata
109
133
  */
110
- pagination: TaskListResponse.Pagination;
111
- }
112
- export declare namespace TaskListResponse {
113
- /**
114
- * Pagination metadata
115
- */
116
- interface Pagination {
117
- /**
118
- * Whether there is a next page
119
- */
120
- hasNext: boolean;
121
- /**
122
- * Whether there is a previous page
123
- */
124
- hasPrev: boolean;
125
- /**
126
- * Current page number (1-based)
127
- */
128
- page: number;
129
- /**
130
- * Total number of pages
131
- */
132
- pages: number;
133
- /**
134
- * Number of items per page
135
- */
136
- pageSize: number;
137
- /**
138
- * Total number of items
139
- */
140
- total: number;
141
- }
134
+ pagination: Shared.PaginationMeta;
142
135
  }
143
136
  export interface TaskGetStatusResponse {
144
137
  /**
145
138
  * The status of the task
146
139
  */
147
140
  status: TaskStatus;
141
+ /**
142
+ * The last agent response (FastAgentResponseEvent or ManagerPlanEvent)
143
+ */
144
+ lastResponse?: {
145
+ [key: string]: unknown;
146
+ } | null;
147
+ /**
148
+ * The agent's final answer or failure reason
149
+ */
150
+ message?: string | null;
151
+ /**
152
+ * Structured output if outputSchema was set
153
+ */
154
+ output?: {
155
+ [key: string]: unknown;
156
+ } | null;
157
+ /**
158
+ * Number of steps taken
159
+ */
160
+ steps?: number | null;
161
+ /**
162
+ * Whether the task succeeded
163
+ */
164
+ succeeded?: boolean | null;
148
165
  }
149
166
  export interface TaskGetTrajectoryResponse {
150
167
  /**
151
168
  * The trajectory of the task
152
169
  */
153
- trajectory: Array<TaskGetTrajectoryResponse.TrajectoryCreatedEvent | TaskGetTrajectoryResponse.TrajectoryExceptionEvent | TaskGetTrajectoryResponse.TrajectoryCancelEvent | TaskGetTrajectoryResponse.TrajectoryScreenshotEvent | TaskGetTrajectoryResponse.TrajectoryStartEvent | TaskGetTrajectoryResponse.TrajectoryFinalizeEvent | TaskGetTrajectoryResponse.TrajectoryStopEvent | TaskGetTrajectoryResponse.TrajectoryResultEvent | TaskGetTrajectoryResponse.TrajectoryManagerInputEvent | TaskGetTrajectoryResponse.TrajectoryManagerPlanEvent | TaskGetTrajectoryResponse.TrajectoryExecutorInputEvent | TaskGetTrajectoryResponse.TrajectoryExecutorResultEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentInputEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentResponseEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentToolCallEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentOutputEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentEndEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentExecuteEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentResultEvent | TaskGetTrajectoryResponse.TrajectoryToolExecutionEvent | TaskGetTrajectoryResponse.TrajectoryRecordUiStateEvent | TaskGetTrajectoryResponse.TrajectoryManagerContextEvent | TaskGetTrajectoryResponse.TrajectoryManagerResponseEvent | TaskGetTrajectoryResponse.TrajectoryManagerPlanDetailsEvent | TaskGetTrajectoryResponse.TrajectoryExecutorContextEvent | TaskGetTrajectoryResponse.TrajectoryExecutorResponseEvent | TaskGetTrajectoryResponse.TrajectoryExecutorActionEvent | TaskGetTrajectoryResponse.TrajectoryExecutorActionResultEvent | TaskGetTrajectoryResponse.TrajectoryUnknownEvent>;
170
+ trajectory: Array<TaskGetTrajectoryResponse.TrajectoryQueuedEvent | TaskGetTrajectoryResponse.TrajectoryCreatedEvent | TaskGetTrajectoryResponse.TrajectoryExceptionEvent | TaskGetTrajectoryResponse.TrajectoryCancelEvent | TaskGetTrajectoryResponse.TrajectoryScreenshotEvent | TaskGetTrajectoryResponse.TrajectoryStartEvent | TaskGetTrajectoryResponse.TrajectoryFinalizeEvent | TaskGetTrajectoryResponse.TrajectoryStopEvent | TaskGetTrajectoryResponse.TrajectoryResultEvent | TaskGetTrajectoryResponse.TrajectoryManagerInputEvent | TaskGetTrajectoryResponse.TrajectoryManagerPlanEvent | TaskGetTrajectoryResponse.TrajectoryExecutorInputEvent | TaskGetTrajectoryResponse.TrajectoryExecutorResultEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentInputEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentResponseEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentToolCallEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentOutputEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentEndEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentExecuteEvent | TaskGetTrajectoryResponse.TrajectoryFastAgentResultEvent | TaskGetTrajectoryResponse.TrajectoryToolExecutionEvent | TaskGetTrajectoryResponse.TrajectoryRecordUiStateEvent | TaskGetTrajectoryResponse.TrajectoryManagerContextEvent | TaskGetTrajectoryResponse.TrajectoryManagerResponseEvent | TaskGetTrajectoryResponse.TrajectoryManagerPlanDetailsEvent | TaskGetTrajectoryResponse.TrajectoryExecutorContextEvent | TaskGetTrajectoryResponse.TrajectoryExecutorResponseEvent | TaskGetTrajectoryResponse.TrajectoryExecutorActionEvent | TaskGetTrajectoryResponse.TrajectoryExecutorActionResultEvent | TaskGetTrajectoryResponse.TrajectoryUserMessageEvent | TaskGetTrajectoryResponse.TrajectoryUnknownEvent>;
154
171
  }
155
172
  export declare namespace TaskGetTrajectoryResponse {
173
+ interface TrajectoryQueuedEvent {
174
+ /**
175
+ * Emitted to SSE clients when the task is waiting in the device queue.
176
+ */
177
+ data: TrajectoryQueuedEvent.Data;
178
+ event: 'QueuedEvent';
179
+ }
180
+ namespace TrajectoryQueuedEvent {
181
+ /**
182
+ * Emitted to SSE clients when the task is waiting in the device queue.
183
+ */
184
+ interface Data {
185
+ id: string;
186
+ status?: string;
187
+ }
188
+ }
156
189
  interface TrajectoryCreatedEvent {
157
190
  data: TrajectoryCreatedEvent.Data;
158
191
  event: 'CreatedEvent';
@@ -160,7 +193,6 @@ export declare namespace TaskGetTrajectoryResponse {
160
193
  namespace TrajectoryCreatedEvent {
161
194
  interface Data {
162
195
  id: string;
163
- token: string;
164
196
  streamUrl: string;
165
197
  }
166
198
  }
@@ -257,6 +289,7 @@ export declare namespace TaskGetTrajectoryResponse {
257
289
  * API OpenAPI schema can reference it without the heavy droidrun import.
258
290
  */
259
291
  interface Data {
292
+ message?: string | null;
260
293
  steps?: number | null;
261
294
  structured_output?: {
262
295
  [key: string]: unknown;
@@ -568,6 +601,25 @@ export declare namespace TaskGetTrajectoryResponse {
568
601
  thought?: string;
569
602
  }
570
603
  }
604
+ interface TrajectoryUserMessageEvent {
605
+ /**
606
+ * Tracks the lifecycle of an external user message: queued → applied | dropped.
607
+ */
608
+ data: TrajectoryUserMessageEvent.Data;
609
+ event: 'UserMessageEvent';
610
+ }
611
+ namespace TrajectoryUserMessageEvent {
612
+ /**
613
+ * Tracks the lifecycle of an external user message: queued → applied | dropped.
614
+ */
615
+ interface Data {
616
+ action: string;
617
+ message_ids: Array<string>;
618
+ consumer?: string | null;
619
+ reason?: string | null;
620
+ step_number?: number | null;
621
+ }
622
+ }
571
623
  interface TrajectoryUnknownEvent {
572
624
  event: string;
573
625
  data?: {
@@ -581,13 +633,20 @@ export interface TaskRunResponse {
581
633
  */
582
634
  id: string;
583
635
  /**
584
- * The token of the stream
636
+ * The status of the task (queued or created)
637
+ */
638
+ status: TaskStatus;
639
+ /**
640
+ * The URL of the stream (null when queued)
585
641
  */
586
- token: string;
642
+ streamUrl?: string | null;
643
+ }
644
+ export type TaskRunStreamedResponse = unknown;
645
+ export interface TaskSendMessageResponse {
587
646
  /**
588
- * The URL of the stream
647
+ * Whether the message was queued for delivery
589
648
  */
590
- streamUrl: string;
649
+ sent: boolean;
591
650
  }
592
651
  export interface TaskStopResponse {
593
652
  /**
@@ -598,13 +657,7 @@ export interface TaskStopResponse {
598
657
  export interface TaskListParams {
599
658
  orderBy?: 'id' | 'createdAt' | 'finishedAt' | 'status' | null;
600
659
  orderByDirection?: 'asc' | 'desc';
601
- /**
602
- * Page number (1-based). If provided, returns paginated results.
603
- */
604
- page?: number | null;
605
- /**
606
- * Number of items per page
607
- */
660
+ page?: number;
608
661
  pageSize?: number;
609
662
  /**
610
663
  * Search in task description.
@@ -614,62 +667,90 @@ export interface TaskListParams {
614
667
  }
615
668
  export interface TaskRunParams {
616
669
  /**
617
- * The LLM model identifier to use for the task (e.g. 'gemini/gemini-2.5-flash')
670
+ * The ID of the device to run the task on.
618
671
  */
619
- llmModel: string;
672
+ deviceId: string;
620
673
  task: string;
674
+ agentId?: number;
621
675
  apps?: Array<string>;
676
+ continueOnFailure?: boolean;
622
677
  credentials?: Array<PackageCredentials>;
623
- /**
624
- * The ID of the device to run the task on.
625
- */
626
- deviceId?: string | null;
627
678
  /**
628
679
  * The display ID of the device to run the task on.
629
680
  */
630
681
  displayId?: number;
631
682
  executionTimeout?: number;
632
683
  files?: Array<string>;
684
+ /**
685
+ * The LLM model identifier to use for the task (e.g.
686
+ * 'google/gemini-3.1-flash-lite-preview')
687
+ */
688
+ llmModel?: string;
633
689
  maxSteps?: number;
690
+ /**
691
+ * Memory namespace for cross-task personalization
692
+ */
693
+ memoryNamespace?: string;
634
694
  outputSchema?: {
635
695
  [key: string]: unknown;
636
696
  } | null;
637
697
  reasoning?: boolean;
638
698
  stealth?: boolean;
699
+ /**
700
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
701
+ */
702
+ subagentModel?: string;
639
703
  temperature?: number;
640
704
  vision?: boolean;
641
705
  vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
642
706
  }
643
707
  export interface TaskRunStreamedParams {
644
708
  /**
645
- * The LLM model identifier to use for the task (e.g. 'gemini/gemini-2.5-flash')
709
+ * The ID of the device to run the task on.
646
710
  */
647
- llmModel: string;
711
+ deviceId: string;
648
712
  task: string;
713
+ agentId?: number;
649
714
  apps?: Array<string>;
715
+ continueOnFailure?: boolean;
650
716
  credentials?: Array<PackageCredentials>;
651
- /**
652
- * The ID of the device to run the task on.
653
- */
654
- deviceId?: string | null;
655
717
  /**
656
718
  * The display ID of the device to run the task on.
657
719
  */
658
720
  displayId?: number;
659
721
  executionTimeout?: number;
660
722
  files?: Array<string>;
723
+ /**
724
+ * The LLM model identifier to use for the task (e.g.
725
+ * 'google/gemini-3.1-flash-lite-preview')
726
+ */
727
+ llmModel?: string;
661
728
  maxSteps?: number;
729
+ /**
730
+ * Memory namespace for cross-task personalization
731
+ */
732
+ memoryNamespace?: string;
662
733
  outputSchema?: {
663
734
  [key: string]: unknown;
664
735
  } | null;
665
736
  reasoning?: boolean;
666
737
  stealth?: boolean;
738
+ /**
739
+ * LLM model used by sub-agent roles: executor, app_opener, structured_output
740
+ */
741
+ subagentModel?: string;
667
742
  temperature?: number;
668
743
  vision?: boolean;
669
744
  vpnCountry?: 'US' | 'BR' | 'FR' | 'DE' | 'IN' | 'JP' | 'KR' | 'ZA' | null;
670
745
  }
746
+ export interface TaskSendMessageParams {
747
+ /**
748
+ * Message to send to the running agent
749
+ */
750
+ message: string;
751
+ }
671
752
  export declare namespace Tasks {
672
- export { type PackageCredentials as PackageCredentials, type Task as Task, type TaskStatus as TaskStatus, type UsageResult as UsageResult, type TaskRetrieveResponse as TaskRetrieveResponse, type TaskListResponse as TaskListResponse, type TaskGetStatusResponse as TaskGetStatusResponse, type TaskGetTrajectoryResponse as TaskGetTrajectoryResponse, type TaskRunResponse as TaskRunResponse, type TaskStopResponse as TaskStopResponse, type TaskListParams as TaskListParams, type TaskRunParams as TaskRunParams, type TaskRunStreamedParams as TaskRunStreamedParams, };
753
+ export { type PackageCredentials as PackageCredentials, type Task as Task, type TaskStatus as TaskStatus, type UsageResult as UsageResult, type TaskRetrieveResponse as TaskRetrieveResponse, type TaskListResponse as TaskListResponse, type TaskGetStatusResponse as TaskGetStatusResponse, type TaskGetTrajectoryResponse as TaskGetTrajectoryResponse, type TaskRunResponse as TaskRunResponse, type TaskRunStreamedResponse as TaskRunStreamedResponse, type TaskSendMessageResponse as TaskSendMessageResponse, type TaskStopResponse as TaskStopResponse, type TaskListParams as TaskListParams, type TaskRunParams as TaskRunParams, type TaskRunStreamedParams as TaskRunStreamedParams, type TaskSendMessageParams as TaskSendMessageParams, };
673
754
  export { Screenshots as Screenshots, type MediaResponse as MediaResponse, type ScreenshotListResponse as ScreenshotListResponse, type ScreenshotRetrieveParams as ScreenshotRetrieveParams, };
674
755
  export { UiStates as UiStates, type UiStateListResponse as UiStateListResponse, type UiStateRetrieveParams as UiStateRetrieveParams, };
675
756
  }