@mobilerun/sdk 6.1.0 → 6.1.1

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 (275) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents/agents.d.mts +307 -0
  12. package/resources/agents/agents.d.mts.map +1 -0
  13. package/resources/agents/agents.d.ts +307 -0
  14. package/resources/agents/agents.d.ts.map +1 -0
  15. package/resources/agents/agents.js +56 -0
  16. package/resources/agents/agents.js.map +1 -0
  17. package/resources/agents/agents.mjs +51 -0
  18. package/resources/agents/agents.mjs.map +1 -0
  19. package/resources/agents/conversations.d.mts +110 -0
  20. package/resources/agents/conversations.d.mts.map +1 -0
  21. package/resources/agents/conversations.d.ts +110 -0
  22. package/resources/agents/conversations.d.ts.map +1 -0
  23. package/resources/agents/conversations.js +24 -0
  24. package/resources/agents/conversations.js.map +1 -0
  25. package/resources/agents/conversations.mjs +20 -0
  26. package/resources/agents/conversations.mjs.map +1 -0
  27. package/resources/agents/files.d.mts +64 -0
  28. package/resources/agents/files.d.mts.map +1 -0
  29. package/resources/agents/files.d.ts +64 -0
  30. package/resources/agents/files.d.ts.map +1 -0
  31. package/resources/agents/files.js +16 -0
  32. package/resources/agents/files.js.map +1 -0
  33. package/resources/agents/files.mjs +12 -0
  34. package/resources/agents/files.mjs.map +1 -0
  35. package/resources/agents/index.d.mts +7 -0
  36. package/resources/agents/index.d.mts.map +1 -0
  37. package/resources/agents/index.d.ts +7 -0
  38. package/resources/agents/index.d.ts.map +1 -0
  39. package/resources/agents/index.js +17 -0
  40. package/resources/agents/index.js.map +1 -0
  41. package/resources/agents/index.mjs +8 -0
  42. package/resources/agents/index.mjs.map +1 -0
  43. package/resources/agents/profile.d.mts +156 -0
  44. package/resources/agents/profile.d.mts.map +1 -0
  45. package/resources/agents/profile.d.ts +156 -0
  46. package/resources/agents/profile.d.ts.map +1 -0
  47. package/resources/agents/profile.js +19 -0
  48. package/resources/agents/profile.js.map +1 -0
  49. package/resources/agents/profile.mjs +15 -0
  50. package/resources/agents/profile.mjs.map +1 -0
  51. package/resources/agents/requests.d.mts +295 -0
  52. package/resources/agents/requests.d.mts.map +1 -0
  53. package/resources/agents/requests.d.ts +295 -0
  54. package/resources/agents/requests.d.ts.map +1 -0
  55. package/resources/agents/requests.js +42 -0
  56. package/resources/agents/requests.js.map +1 -0
  57. package/resources/agents/requests.mjs +38 -0
  58. package/resources/agents/requests.mjs.map +1 -0
  59. package/resources/agents/routines.d.mts +95 -0
  60. package/resources/agents/routines.d.mts.map +1 -0
  61. package/resources/agents/routines.d.ts +95 -0
  62. package/resources/agents/routines.d.ts.map +1 -0
  63. package/resources/agents/routines.js +26 -0
  64. package/resources/agents/routines.js.map +1 -0
  65. package/resources/agents/routines.mjs +22 -0
  66. package/resources/agents/routines.mjs.map +1 -0
  67. package/resources/agents.d.mts +2 -0
  68. package/resources/agents.d.mts.map +1 -0
  69. package/resources/agents.d.ts +2 -0
  70. package/resources/agents.d.ts.map +1 -0
  71. package/resources/agents.js +6 -0
  72. package/resources/agents.js.map +1 -0
  73. package/resources/agents.mjs +3 -0
  74. package/resources/agents.mjs.map +1 -0
  75. package/resources/assistant/conversations.d.mts +114 -38
  76. package/resources/assistant/conversations.d.mts.map +1 -1
  77. package/resources/assistant/conversations.d.ts +114 -38
  78. package/resources/assistant/conversations.d.ts.map +1 -1
  79. package/resources/assistant/conversations.js +20 -19
  80. package/resources/assistant/conversations.js.map +1 -1
  81. package/resources/assistant/conversations.mjs +20 -19
  82. package/resources/assistant/conversations.mjs.map +1 -1
  83. package/resources/devices/actions.d.mts +3 -4
  84. package/resources/devices/actions.d.mts.map +1 -1
  85. package/resources/devices/actions.d.ts +3 -4
  86. package/resources/devices/actions.d.ts.map +1 -1
  87. package/resources/devices/actions.js +3 -4
  88. package/resources/devices/actions.js.map +1 -1
  89. package/resources/devices/actions.mjs +3 -4
  90. package/resources/devices/actions.mjs.map +1 -1
  91. package/resources/devices/devices.d.mts +9 -0
  92. package/resources/devices/devices.d.mts.map +1 -1
  93. package/resources/devices/devices.d.ts +9 -0
  94. package/resources/devices/devices.d.ts.map +1 -1
  95. package/resources/devices/devices.js +8 -0
  96. package/resources/devices/devices.js.map +1 -1
  97. package/resources/devices/devices.mjs +8 -0
  98. package/resources/devices/devices.mjs.map +1 -1
  99. package/resources/devices/index.d.mts +2 -0
  100. package/resources/devices/index.d.mts.map +1 -1
  101. package/resources/devices/index.d.ts +2 -0
  102. package/resources/devices/index.d.ts.map +1 -1
  103. package/resources/devices/index.js +5 -1
  104. package/resources/devices/index.js.map +1 -1
  105. package/resources/devices/index.mjs +2 -0
  106. package/resources/devices/index.mjs.map +1 -1
  107. package/resources/devices/number-bindings.d.mts +40 -0
  108. package/resources/devices/number-bindings.d.mts.map +1 -0
  109. package/resources/devices/number-bindings.d.ts +40 -0
  110. package/resources/devices/number-bindings.d.ts.map +1 -0
  111. package/resources/devices/number-bindings.js +15 -0
  112. package/resources/devices/number-bindings.js.map +1 -0
  113. package/resources/devices/number-bindings.mjs +11 -0
  114. package/resources/devices/number-bindings.mjs.map +1 -0
  115. package/resources/devices/number.d.mts +141 -0
  116. package/resources/devices/number.d.mts.map +1 -0
  117. package/resources/devices/number.d.ts +141 -0
  118. package/resources/devices/number.d.ts.map +1 -0
  119. package/resources/devices/number.js +68 -0
  120. package/resources/devices/number.js.map +1 -0
  121. package/resources/devices/number.mjs +64 -0
  122. package/resources/devices/number.mjs.map +1 -0
  123. package/resources/files.d.mts +13 -7
  124. package/resources/files.d.mts.map +1 -1
  125. package/resources/files.d.ts +13 -7
  126. package/resources/files.d.ts.map +1 -1
  127. package/resources/files.js +9 -7
  128. package/resources/files.js.map +1 -1
  129. package/resources/files.mjs +9 -7
  130. package/resources/files.mjs.map +1 -1
  131. package/resources/index.d.mts +1 -0
  132. package/resources/index.d.mts.map +1 -1
  133. package/resources/index.d.ts +1 -0
  134. package/resources/index.d.ts.map +1 -1
  135. package/resources/index.js +3 -1
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs +1 -0
  138. package/resources/index.mjs.map +1 -1
  139. package/resources/numbers/messages.d.mts +2 -1
  140. package/resources/numbers/messages.d.mts.map +1 -1
  141. package/resources/numbers/messages.d.ts +2 -1
  142. package/resources/numbers/messages.d.ts.map +1 -1
  143. package/resources/numbers/messages.js +2 -1
  144. package/resources/numbers/messages.js.map +1 -1
  145. package/resources/numbers/messages.mjs +2 -1
  146. package/resources/numbers/messages.mjs.map +1 -1
  147. package/resources/numbers/numbers.d.mts +48 -0
  148. package/resources/numbers/numbers.d.mts.map +1 -1
  149. package/resources/numbers/numbers.d.ts +48 -0
  150. package/resources/numbers/numbers.d.ts.map +1 -1
  151. package/resources/numbers/numbers.js.map +1 -1
  152. package/resources/numbers/numbers.mjs.map +1 -1
  153. package/resources/tasks/tasks.d.mts +24 -5
  154. package/resources/tasks/tasks.d.mts.map +1 -1
  155. package/resources/tasks/tasks.d.ts +24 -5
  156. package/resources/tasks/tasks.d.ts.map +1 -1
  157. package/resources/tasks/tasks.js.map +1 -1
  158. package/resources/tasks/tasks.mjs.map +1 -1
  159. package/resources/workflows/action-catalog.d.mts +56 -8
  160. package/resources/workflows/action-catalog.d.mts.map +1 -1
  161. package/resources/workflows/action-catalog.d.ts +56 -8
  162. package/resources/workflows/action-catalog.d.ts.map +1 -1
  163. package/resources/workflows/action-catalog.js +7 -5
  164. package/resources/workflows/action-catalog.js.map +1 -1
  165. package/resources/workflows/action-catalog.mjs +7 -5
  166. package/resources/workflows/action-catalog.mjs.map +1 -1
  167. package/resources/workflows/actions/actions.d.mts +22 -10
  168. package/resources/workflows/actions/actions.d.mts.map +1 -1
  169. package/resources/workflows/actions/actions.d.ts +22 -10
  170. package/resources/workflows/actions/actions.d.ts.map +1 -1
  171. package/resources/workflows/actions/actions.js +7 -5
  172. package/resources/workflows/actions/actions.js.map +1 -1
  173. package/resources/workflows/actions/actions.mjs +7 -5
  174. package/resources/workflows/actions/actions.mjs.map +1 -1
  175. package/resources/workflows/actions/index.d.mts +1 -1
  176. package/resources/workflows/actions/index.d.mts.map +1 -1
  177. package/resources/workflows/actions/index.d.ts +1 -1
  178. package/resources/workflows/actions/index.d.ts.map +1 -1
  179. package/resources/workflows/actions/index.js.map +1 -1
  180. package/resources/workflows/actions/index.mjs.map +1 -1
  181. package/resources/workflows/actions/services.d.mts +1 -1
  182. package/resources/workflows/actions/services.d.mts.map +1 -1
  183. package/resources/workflows/actions/services.d.ts +1 -1
  184. package/resources/workflows/actions/services.d.ts.map +1 -1
  185. package/resources/workflows/events.d.mts +25 -3
  186. package/resources/workflows/events.d.mts.map +1 -1
  187. package/resources/workflows/events.d.ts +25 -3
  188. package/resources/workflows/events.d.ts.map +1 -1
  189. package/resources/workflows/executions/executions.d.mts +16 -0
  190. package/resources/workflows/executions/executions.d.mts.map +1 -1
  191. package/resources/workflows/executions/executions.d.ts +16 -0
  192. package/resources/workflows/executions/executions.d.ts.map +1 -1
  193. package/resources/workflows/executions/executions.js.map +1 -1
  194. package/resources/workflows/executions/executions.mjs.map +1 -1
  195. package/resources/workflows/flows/flows.d.mts +547 -102
  196. package/resources/workflows/flows/flows.d.mts.map +1 -1
  197. package/resources/workflows/flows/flows.d.ts +547 -102
  198. package/resources/workflows/flows/flows.d.ts.map +1 -1
  199. package/resources/workflows/flows/flows.js +15 -2
  200. package/resources/workflows/flows/flows.js.map +1 -1
  201. package/resources/workflows/flows/flows.mjs +15 -2
  202. package/resources/workflows/flows/flows.mjs.map +1 -1
  203. package/resources/workflows/flows/index.d.mts +2 -1
  204. package/resources/workflows/flows/index.d.mts.map +1 -1
  205. package/resources/workflows/flows/index.d.ts +2 -1
  206. package/resources/workflows/flows/index.d.ts.map +1 -1
  207. package/resources/workflows/flows/index.js +3 -1
  208. package/resources/workflows/flows/index.js.map +1 -1
  209. package/resources/workflows/flows/index.mjs +1 -0
  210. package/resources/workflows/flows/index.mjs.map +1 -1
  211. package/resources/workflows/flows/state.d.mts +65 -0
  212. package/resources/workflows/flows/state.d.mts.map +1 -0
  213. package/resources/workflows/flows/state.d.ts +65 -0
  214. package/resources/workflows/flows/state.d.ts.map +1 -0
  215. package/resources/workflows/flows/state.js +33 -0
  216. package/resources/workflows/flows/state.js.map +1 -0
  217. package/resources/workflows/flows/state.mjs +29 -0
  218. package/resources/workflows/flows/state.mjs.map +1 -0
  219. package/resources/workflows/index.d.mts +3 -3
  220. package/resources/workflows/index.d.mts.map +1 -1
  221. package/resources/workflows/index.d.ts +3 -3
  222. package/resources/workflows/index.d.ts.map +1 -1
  223. package/resources/workflows/index.js.map +1 -1
  224. package/resources/workflows/index.mjs.map +1 -1
  225. package/resources/workflows/triggers.d.mts +40 -5
  226. package/resources/workflows/triggers.d.mts.map +1 -1
  227. package/resources/workflows/triggers.d.ts +40 -5
  228. package/resources/workflows/triggers.d.ts.map +1 -1
  229. package/resources/workflows/triggers.js +12 -3
  230. package/resources/workflows/triggers.js.map +1 -1
  231. package/resources/workflows/triggers.mjs +12 -3
  232. package/resources/workflows/triggers.mjs.map +1 -1
  233. package/resources/workflows/workflows.d.mts +6 -6
  234. package/resources/workflows/workflows.d.mts.map +1 -1
  235. package/resources/workflows/workflows.d.ts +6 -6
  236. package/resources/workflows/workflows.d.ts.map +1 -1
  237. package/resources/workflows/workflows.js.map +1 -1
  238. package/resources/workflows/workflows.mjs.map +1 -1
  239. package/src/client.ts +17 -0
  240. package/src/resources/agents/agents.ts +475 -0
  241. package/src/resources/agents/conversations.ts +205 -0
  242. package/src/resources/agents/files.ts +105 -0
  243. package/src/resources/agents/index.ts +34 -0
  244. package/src/resources/agents/profile.ts +225 -0
  245. package/src/resources/agents/requests.ts +495 -0
  246. package/src/resources/agents/routines.ts +156 -0
  247. package/src/resources/agents.ts +3 -0
  248. package/src/resources/assistant/conversations.ts +146 -39
  249. package/src/resources/devices/actions.ts +3 -4
  250. package/src/resources/devices/devices.ts +38 -0
  251. package/src/resources/devices/index.ts +14 -0
  252. package/src/resources/devices/number-bindings.ts +62 -0
  253. package/src/resources/devices/number.ts +261 -0
  254. package/src/resources/files.ts +17 -7
  255. package/src/resources/index.ts +7 -0
  256. package/src/resources/numbers/messages.ts +2 -1
  257. package/src/resources/numbers/numbers.ts +64 -0
  258. package/src/resources/tasks/tasks.ts +26 -5
  259. package/src/resources/workflows/action-catalog.ts +69 -8
  260. package/src/resources/workflows/actions/actions.ts +29 -10
  261. package/src/resources/workflows/actions/index.ts +1 -0
  262. package/src/resources/workflows/actions/services.ts +1 -1
  263. package/src/resources/workflows/events.ts +32 -2
  264. package/src/resources/workflows/executions/executions.ts +26 -0
  265. package/src/resources/workflows/flows/flows.ts +707 -97
  266. package/src/resources/workflows/flows/index.ts +10 -0
  267. package/src/resources/workflows/flows/state.ts +103 -0
  268. package/src/resources/workflows/index.ts +4 -0
  269. package/src/resources/workflows/triggers.ts +34 -5
  270. package/src/resources/workflows/workflows.ts +8 -0
  271. package/src/version.ts +1 -1
  272. package/version.d.mts +1 -1
  273. package/version.d.ts +1 -1
  274. package/version.js +1 -1
  275. package/version.mjs +1 -1
@@ -0,0 +1,307 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as ConversationsAPI from "./conversations.mjs";
3
+ import { ConversationCreateParams, ConversationCreateResponse, ConversationListParams, ConversationListResponse, Conversations } from "./conversations.mjs";
4
+ import * as FilesAPI from "./files.mjs";
5
+ import { FileListParams, FileListResponse, Files } from "./files.mjs";
6
+ import * as ProfileAPI from "./profile.mjs";
7
+ import { Profile as ProfileAPIProfile, ProfileUpdateParams, ProfileUpdateResponse } from "./profile.mjs";
8
+ import * as RequestsAPI from "./requests.mjs";
9
+ import { RequestListForAgentParams, RequestListForAgentResponse, RequestListParams, RequestListResponse, RequestRetrieveBySessionResponse, RequestRetrieveResponse, Requests } from "./requests.mjs";
10
+ import * as RoutinesAPI from "./routines.mjs";
11
+ import { RoutineCloneParams, RoutineCloneResponse, RoutineCreateParams, RoutineCreateResponse, Routines } from "./routines.mjs";
12
+ import { APIPromise } from "../../core/api-promise.mjs";
13
+ import { RequestOptions } from "../../internal/request-options.mjs";
14
+ export declare class Agents extends APIResource {
15
+ profile: ProfileAPI.Profile;
16
+ files: FilesAPI.Files;
17
+ conversations: ConversationsAPI.Conversations;
18
+ requests: RequestsAPI.Requests;
19
+ routines: RoutinesAPI.Routines;
20
+ /**
21
+ * Creates an Agent directly on the owner runtime, without a chat message or
22
+ * approval card. Provisioning runs in the background; the new Agent has no chat
23
+ * history. Requires Idempotency-Key; a replay returns the current Agent with the
24
+ * original 201 status.
25
+ */
26
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
27
+ /**
28
+ * Owner-scoped. Returns every Agent of the owner that is not on a retired machine,
29
+ * archived and failed ones included, oldest first.
30
+ */
31
+ list(options?: RequestOptions): APIPromise<AgentListResponse>;
32
+ /**
33
+ * List the environment model profiles and their default. Model routing is managed
34
+ * by the server.
35
+ */
36
+ modelProfiles(options?: RequestOptions): APIPromise<AgentModelProfilesResponse>;
37
+ }
38
+ export interface AgentCreateResponse {
39
+ /**
40
+ * An Agent of the owner: its lifecycle state, profile and runtime.
41
+ */
42
+ agent: AgentCreateResponse.Agent;
43
+ }
44
+ export declare namespace AgentCreateResponse {
45
+ /**
46
+ * An Agent of the owner: its lifecycle state, profile and runtime.
47
+ */
48
+ interface Agent {
49
+ id: string;
50
+ archivedAt: string | null;
51
+ createdAt: string;
52
+ /**
53
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
54
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
55
+ * disabled.
56
+ */
57
+ disabledReason: 'owner' | 'over-limit' | null;
58
+ /**
59
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
60
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
61
+ * `provision_failed`; a code the harness reports for a failed start is passed
62
+ * through.
63
+ */
64
+ errorCode: string | null;
65
+ /**
66
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
67
+ * names no `agentId`.
68
+ */
69
+ primary: boolean;
70
+ /**
71
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
72
+ * null when none is set.
73
+ */
74
+ profile: Agent.Profile;
75
+ /**
76
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
77
+ * Agent is still pending and after its provisioning failed.
78
+ */
79
+ provisionedAt: string | null;
80
+ /**
81
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
82
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
83
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
84
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
85
+ * and the owner can enable it again while a slot is free.
86
+ */
87
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
88
+ /**
89
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
90
+ * 20 newest rows. Null when the thread has no rows.
91
+ */
92
+ threadPreview: Agent.ThreadPreview | null;
93
+ /**
94
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
95
+ * id DESC. Null for pending/archived Agents or no thread.
96
+ */
97
+ threadSessionId: string | null;
98
+ /**
99
+ * Whether this active primary Agent is still due its one-time greeting: the
100
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
101
+ * whose chat never had a message.
102
+ */
103
+ welcomePending: boolean;
104
+ /**
105
+ * Latest activity of the Agent (newest chat session activity or live turn
106
+ * heartbeat), ISO 8601; null when it has never been active.
107
+ */
108
+ lastActiveAt?: string | null;
109
+ /**
110
+ * Whether the Agent is running right now, derived from stored state only.
111
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
112
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
113
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
114
+ * started in the current run. `sleeping`: everything else (stopped or parked
115
+ * machine, an Agent the running harness has not started yet, or an Agent that is
116
+ * not active). `awake` can lag a machine stop until the reconciler converges.
117
+ */
118
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
119
+ }
120
+ namespace Agent {
121
+ /**
122
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
123
+ * null when none is set.
124
+ */
125
+ interface Profile {
126
+ /**
127
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
128
+ * color. A color-only config retains the default seed fallback.
129
+ */
130
+ avatarConfig: Profile.AvatarConfig | null;
131
+ avatarKind: 'blob' | null;
132
+ displayName: string | null;
133
+ instructions: string | null;
134
+ modelProfile: string | null;
135
+ }
136
+ namespace Profile {
137
+ /**
138
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
139
+ * color. A color-only config retains the default seed fallback.
140
+ */
141
+ interface AvatarConfig {
142
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
143
+ seed?: string | number;
144
+ }
145
+ }
146
+ /**
147
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
148
+ * 20 newest rows. Null when the thread has no rows.
149
+ */
150
+ interface ThreadPreview {
151
+ awaitsInput: boolean;
152
+ excerpt: string | null;
153
+ timestamp: string | null;
154
+ }
155
+ }
156
+ }
157
+ export interface AgentListResponse {
158
+ agents: Array<AgentListResponse.Agent>;
159
+ }
160
+ export declare namespace AgentListResponse {
161
+ /**
162
+ * An Agent of the owner: its lifecycle state, profile and runtime.
163
+ */
164
+ interface Agent {
165
+ id: string;
166
+ archivedAt: string | null;
167
+ createdAt: string;
168
+ /**
169
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
170
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
171
+ * disabled.
172
+ */
173
+ disabledReason: 'owner' | 'over-limit' | null;
174
+ /**
175
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
176
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
177
+ * `provision_failed`; a code the harness reports for a failed start is passed
178
+ * through.
179
+ */
180
+ errorCode: string | null;
181
+ /**
182
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
183
+ * names no `agentId`.
184
+ */
185
+ primary: boolean;
186
+ /**
187
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
188
+ * null when none is set.
189
+ */
190
+ profile: Agent.Profile;
191
+ /**
192
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
193
+ * Agent is still pending and after its provisioning failed.
194
+ */
195
+ provisionedAt: string | null;
196
+ /**
197
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
198
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
199
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
200
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
201
+ * and the owner can enable it again while a slot is free.
202
+ */
203
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
204
+ /**
205
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
206
+ * 20 newest rows. Null when the thread has no rows.
207
+ */
208
+ threadPreview: Agent.ThreadPreview | null;
209
+ /**
210
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
211
+ * id DESC. Null for pending/archived Agents or no thread.
212
+ */
213
+ threadSessionId: string | null;
214
+ /**
215
+ * Whether this active primary Agent is still due its one-time greeting: the
216
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
217
+ * whose chat never had a message.
218
+ */
219
+ welcomePending: boolean;
220
+ /**
221
+ * Latest activity of the Agent (newest chat session activity or live turn
222
+ * heartbeat), ISO 8601; null when it has never been active.
223
+ */
224
+ lastActiveAt?: string | null;
225
+ /**
226
+ * Whether the Agent is running right now, derived from stored state only.
227
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
228
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
229
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
230
+ * started in the current run. `sleeping`: everything else (stopped or parked
231
+ * machine, an Agent the running harness has not started yet, or an Agent that is
232
+ * not active). `awake` can lag a machine stop until the reconciler converges.
233
+ */
234
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
235
+ }
236
+ namespace Agent {
237
+ /**
238
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
239
+ * null when none is set.
240
+ */
241
+ interface Profile {
242
+ /**
243
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
244
+ * color. A color-only config retains the default seed fallback.
245
+ */
246
+ avatarConfig: Profile.AvatarConfig | null;
247
+ avatarKind: 'blob' | null;
248
+ displayName: string | null;
249
+ instructions: string | null;
250
+ modelProfile: string | null;
251
+ }
252
+ namespace Profile {
253
+ /**
254
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
255
+ * color. A color-only config retains the default seed fallback.
256
+ */
257
+ interface AvatarConfig {
258
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
259
+ seed?: string | number;
260
+ }
261
+ }
262
+ /**
263
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
264
+ * 20 newest rows. Null when the thread has no rows.
265
+ */
266
+ interface ThreadPreview {
267
+ awaitsInput: boolean;
268
+ excerpt: string | null;
269
+ timestamp: string | null;
270
+ }
271
+ }
272
+ }
273
+ export interface AgentModelProfilesResponse {
274
+ defaultProfileId: string;
275
+ profiles: Array<AgentModelProfilesResponse.Profile>;
276
+ }
277
+ export declare namespace AgentModelProfilesResponse {
278
+ interface Profile {
279
+ id: string;
280
+ costHint: string;
281
+ description: string;
282
+ label: string;
283
+ }
284
+ }
285
+ export interface AgentCreateParams {
286
+ /**
287
+ * Single-line name shown for the Agent; surrounding whitespace is trimmed and it
288
+ * needs at least one letter or number.
289
+ */
290
+ displayName: string;
291
+ avatarSeed?: string | number;
292
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
293
+ /**
294
+ * The Agent's individual instructions passage; an empty or whitespace-only text
295
+ * clears it. Line breaks count three characters toward the rendered size limit.
296
+ */
297
+ instructions?: string;
298
+ }
299
+ export declare namespace Agents {
300
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentListResponse as AgentListResponse, type AgentModelProfilesResponse as AgentModelProfilesResponse, type AgentCreateParams as AgentCreateParams, };
301
+ export { ProfileAPIProfile as Profile, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileUpdateParams as ProfileUpdateParams, };
302
+ export { Files as Files, type FileListResponse as FileListResponse, type FileListParams as FileListParams };
303
+ export { Conversations as Conversations, type ConversationCreateResponse as ConversationCreateResponse, type ConversationListResponse as ConversationListResponse, type ConversationCreateParams as ConversationCreateParams, type ConversationListParams as ConversationListParams, };
304
+ export { Requests as Requests, type RequestRetrieveResponse as RequestRetrieveResponse, type RequestListResponse as RequestListResponse, type RequestListForAgentResponse as RequestListForAgentResponse, type RequestRetrieveBySessionResponse as RequestRetrieveBySessionResponse, type RequestListParams as RequestListParams, type RequestListForAgentParams as RequestListForAgentParams, };
305
+ export { Routines as Routines, type RoutineCreateResponse as RoutineCreateResponse, type RoutineCloneResponse as RoutineCloneResponse, type RoutineCreateParams as RoutineCreateParams, type RoutineCloneParams as RoutineCloneParams, };
306
+ }
307
+ //# sourceMappingURL=agents.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../../src/resources/agents/agents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,gBAAgB,4BAAwB;AACpD,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACd,4BAAwB;AACzB,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,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BAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,307 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as ConversationsAPI from "./conversations.js";
3
+ import { ConversationCreateParams, ConversationCreateResponse, ConversationListParams, ConversationListResponse, Conversations } from "./conversations.js";
4
+ import * as FilesAPI from "./files.js";
5
+ import { FileListParams, FileListResponse, Files } from "./files.js";
6
+ import * as ProfileAPI from "./profile.js";
7
+ import { Profile as ProfileAPIProfile, ProfileUpdateParams, ProfileUpdateResponse } from "./profile.js";
8
+ import * as RequestsAPI from "./requests.js";
9
+ import { RequestListForAgentParams, RequestListForAgentResponse, RequestListParams, RequestListResponse, RequestRetrieveBySessionResponse, RequestRetrieveResponse, Requests } from "./requests.js";
10
+ import * as RoutinesAPI from "./routines.js";
11
+ import { RoutineCloneParams, RoutineCloneResponse, RoutineCreateParams, RoutineCreateResponse, Routines } from "./routines.js";
12
+ import { APIPromise } from "../../core/api-promise.js";
13
+ import { RequestOptions } from "../../internal/request-options.js";
14
+ export declare class Agents extends APIResource {
15
+ profile: ProfileAPI.Profile;
16
+ files: FilesAPI.Files;
17
+ conversations: ConversationsAPI.Conversations;
18
+ requests: RequestsAPI.Requests;
19
+ routines: RoutinesAPI.Routines;
20
+ /**
21
+ * Creates an Agent directly on the owner runtime, without a chat message or
22
+ * approval card. Provisioning runs in the background; the new Agent has no chat
23
+ * history. Requires Idempotency-Key; a replay returns the current Agent with the
24
+ * original 201 status.
25
+ */
26
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
27
+ /**
28
+ * Owner-scoped. Returns every Agent of the owner that is not on a retired machine,
29
+ * archived and failed ones included, oldest first.
30
+ */
31
+ list(options?: RequestOptions): APIPromise<AgentListResponse>;
32
+ /**
33
+ * List the environment model profiles and their default. Model routing is managed
34
+ * by the server.
35
+ */
36
+ modelProfiles(options?: RequestOptions): APIPromise<AgentModelProfilesResponse>;
37
+ }
38
+ export interface AgentCreateResponse {
39
+ /**
40
+ * An Agent of the owner: its lifecycle state, profile and runtime.
41
+ */
42
+ agent: AgentCreateResponse.Agent;
43
+ }
44
+ export declare namespace AgentCreateResponse {
45
+ /**
46
+ * An Agent of the owner: its lifecycle state, profile and runtime.
47
+ */
48
+ interface Agent {
49
+ id: string;
50
+ archivedAt: string | null;
51
+ createdAt: string;
52
+ /**
53
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
54
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
55
+ * disabled.
56
+ */
57
+ disabledReason: 'owner' | 'over-limit' | null;
58
+ /**
59
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
60
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
61
+ * `provision_failed`; a code the harness reports for a failed start is passed
62
+ * through.
63
+ */
64
+ errorCode: string | null;
65
+ /**
66
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
67
+ * names no `agentId`.
68
+ */
69
+ primary: boolean;
70
+ /**
71
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
72
+ * null when none is set.
73
+ */
74
+ profile: Agent.Profile;
75
+ /**
76
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
77
+ * Agent is still pending and after its provisioning failed.
78
+ */
79
+ provisionedAt: string | null;
80
+ /**
81
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
82
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
83
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
84
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
85
+ * and the owner can enable it again while a slot is free.
86
+ */
87
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
88
+ /**
89
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
90
+ * 20 newest rows. Null when the thread has no rows.
91
+ */
92
+ threadPreview: Agent.ThreadPreview | null;
93
+ /**
94
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
95
+ * id DESC. Null for pending/archived Agents or no thread.
96
+ */
97
+ threadSessionId: string | null;
98
+ /**
99
+ * Whether this active primary Agent is still due its one-time greeting: the
100
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
101
+ * whose chat never had a message.
102
+ */
103
+ welcomePending: boolean;
104
+ /**
105
+ * Latest activity of the Agent (newest chat session activity or live turn
106
+ * heartbeat), ISO 8601; null when it has never been active.
107
+ */
108
+ lastActiveAt?: string | null;
109
+ /**
110
+ * Whether the Agent is running right now, derived from stored state only.
111
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
112
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
113
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
114
+ * started in the current run. `sleeping`: everything else (stopped or parked
115
+ * machine, an Agent the running harness has not started yet, or an Agent that is
116
+ * not active). `awake` can lag a machine stop until the reconciler converges.
117
+ */
118
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
119
+ }
120
+ namespace Agent {
121
+ /**
122
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
123
+ * null when none is set.
124
+ */
125
+ interface Profile {
126
+ /**
127
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
128
+ * color. A color-only config retains the default seed fallback.
129
+ */
130
+ avatarConfig: Profile.AvatarConfig | null;
131
+ avatarKind: 'blob' | null;
132
+ displayName: string | null;
133
+ instructions: string | null;
134
+ modelProfile: string | null;
135
+ }
136
+ namespace Profile {
137
+ /**
138
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
139
+ * color. A color-only config retains the default seed fallback.
140
+ */
141
+ interface AvatarConfig {
142
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
143
+ seed?: string | number;
144
+ }
145
+ }
146
+ /**
147
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
148
+ * 20 newest rows. Null when the thread has no rows.
149
+ */
150
+ interface ThreadPreview {
151
+ awaitsInput: boolean;
152
+ excerpt: string | null;
153
+ timestamp: string | null;
154
+ }
155
+ }
156
+ }
157
+ export interface AgentListResponse {
158
+ agents: Array<AgentListResponse.Agent>;
159
+ }
160
+ export declare namespace AgentListResponse {
161
+ /**
162
+ * An Agent of the owner: its lifecycle state, profile and runtime.
163
+ */
164
+ interface Agent {
165
+ id: string;
166
+ archivedAt: string | null;
167
+ createdAt: string;
168
+ /**
169
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
170
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
171
+ * disabled.
172
+ */
173
+ disabledReason: 'owner' | 'over-limit' | null;
174
+ /**
175
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
176
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
177
+ * `provision_failed`; a code the harness reports for a failed start is passed
178
+ * through.
179
+ */
180
+ errorCode: string | null;
181
+ /**
182
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
183
+ * names no `agentId`.
184
+ */
185
+ primary: boolean;
186
+ /**
187
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
188
+ * null when none is set.
189
+ */
190
+ profile: Agent.Profile;
191
+ /**
192
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
193
+ * Agent is still pending and after its provisioning failed.
194
+ */
195
+ provisionedAt: string | null;
196
+ /**
197
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
198
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
199
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
200
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
201
+ * and the owner can enable it again while a slot is free.
202
+ */
203
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
204
+ /**
205
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
206
+ * 20 newest rows. Null when the thread has no rows.
207
+ */
208
+ threadPreview: Agent.ThreadPreview | null;
209
+ /**
210
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
211
+ * id DESC. Null for pending/archived Agents or no thread.
212
+ */
213
+ threadSessionId: string | null;
214
+ /**
215
+ * Whether this active primary Agent is still due its one-time greeting: the
216
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
217
+ * whose chat never had a message.
218
+ */
219
+ welcomePending: boolean;
220
+ /**
221
+ * Latest activity of the Agent (newest chat session activity or live turn
222
+ * heartbeat), ISO 8601; null when it has never been active.
223
+ */
224
+ lastActiveAt?: string | null;
225
+ /**
226
+ * Whether the Agent is running right now, derived from stored state only.
227
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
228
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
229
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
230
+ * started in the current run. `sleeping`: everything else (stopped or parked
231
+ * machine, an Agent the running harness has not started yet, or an Agent that is
232
+ * not active). `awake` can lag a machine stop until the reconciler converges.
233
+ */
234
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
235
+ }
236
+ namespace Agent {
237
+ /**
238
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
239
+ * null when none is set.
240
+ */
241
+ interface Profile {
242
+ /**
243
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
244
+ * color. A color-only config retains the default seed fallback.
245
+ */
246
+ avatarConfig: Profile.AvatarConfig | null;
247
+ avatarKind: 'blob' | null;
248
+ displayName: string | null;
249
+ instructions: string | null;
250
+ modelProfile: string | null;
251
+ }
252
+ namespace Profile {
253
+ /**
254
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
255
+ * color. A color-only config retains the default seed fallback.
256
+ */
257
+ interface AvatarConfig {
258
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
259
+ seed?: string | number;
260
+ }
261
+ }
262
+ /**
263
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
264
+ * 20 newest rows. Null when the thread has no rows.
265
+ */
266
+ interface ThreadPreview {
267
+ awaitsInput: boolean;
268
+ excerpt: string | null;
269
+ timestamp: string | null;
270
+ }
271
+ }
272
+ }
273
+ export interface AgentModelProfilesResponse {
274
+ defaultProfileId: string;
275
+ profiles: Array<AgentModelProfilesResponse.Profile>;
276
+ }
277
+ export declare namespace AgentModelProfilesResponse {
278
+ interface Profile {
279
+ id: string;
280
+ costHint: string;
281
+ description: string;
282
+ label: string;
283
+ }
284
+ }
285
+ export interface AgentCreateParams {
286
+ /**
287
+ * Single-line name shown for the Agent; surrounding whitespace is trimmed and it
288
+ * needs at least one letter or number.
289
+ */
290
+ displayName: string;
291
+ avatarSeed?: string | number;
292
+ color?: 'slate' | 'red' | 'orange' | 'amber' | 'lime' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'violet' | 'pink';
293
+ /**
294
+ * The Agent's individual instructions passage; an empty or whitespace-only text
295
+ * clears it. Line breaks count three characters toward the rendered size limit.
296
+ */
297
+ instructions?: string;
298
+ }
299
+ export declare namespace Agents {
300
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentListResponse as AgentListResponse, type AgentModelProfilesResponse as AgentModelProfilesResponse, type AgentCreateParams as AgentCreateParams, };
301
+ export { ProfileAPIProfile as Profile, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileUpdateParams as ProfileUpdateParams, };
302
+ export { Files as Files, type FileListResponse as FileListResponse, type FileListParams as FileListParams };
303
+ export { Conversations as Conversations, type ConversationCreateResponse as ConversationCreateResponse, type ConversationListResponse as ConversationListResponse, type ConversationCreateParams as ConversationCreateParams, type ConversationListParams as ConversationListParams, };
304
+ export { Requests as Requests, type RequestRetrieveResponse as RequestRetrieveResponse, type RequestListResponse as RequestListResponse, type RequestListForAgentResponse as RequestListForAgentResponse, type RequestRetrieveBySessionResponse as RequestRetrieveBySessionResponse, type RequestListParams as RequestListParams, type RequestListForAgentParams as RequestListForAgentParams, };
305
+ export { Routines as Routines, type RoutineCreateResponse as RoutineCreateResponse, type RoutineCloneResponse as RoutineCloneResponse, type RoutineCreateParams as RoutineCreateParams, type RoutineCloneParams as RoutineCloneParams, };
306
+ }
307
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/agents/agents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,gBAAgB,2BAAwB;AACpD,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,EACd,2BAAwB;AACzB,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,mBAAgB;AAClE,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAkB;AACrG,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,gCAAgC,EAChC,uBAAuB,EACvB,QAAQ,EACT,sBAAmB;AACpB,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,QAAQ,EACT,sBAAmB;AACpB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,MAAO,SAAQ,WAAW;IACrC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAoD;IACjG,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,QAAQ,EAAE,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