@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
package/src/client.ts CHANGED
@@ -54,6 +54,13 @@ import {
54
54
  ProxyUpdateParams,
55
55
  ProxyUpdateResponse,
56
56
  } from './resources/proxies';
57
+ import {
58
+ AgentCreateParams,
59
+ AgentCreateResponse,
60
+ AgentListResponse,
61
+ AgentModelProfilesResponse,
62
+ Agents,
63
+ } from './resources/agents/agents';
57
64
  import { Assistant } from './resources/assistant/assistant';
58
65
  import { Connect } from './resources/connect/connect';
59
66
  import {
@@ -884,6 +891,7 @@ export class Mobilerun {
884
891
  webhooks: API.Webhooks = new API.Webhooks(this);
885
892
  mailboxes: API.Mailboxes = new API.Mailboxes(this);
886
893
  files: API.Files = new API.Files(this);
894
+ agents: API.Agents = new API.Agents(this);
887
895
  assistant: API.Assistant = new API.Assistant(this);
888
896
  messages: API.Messages = new API.Messages(this);
889
897
  numbers: API.Numbers = new API.Numbers(this);
@@ -900,6 +908,7 @@ Mobilerun.Workflows = Workflows;
900
908
  Mobilerun.Webhooks = Webhooks;
901
909
  Mobilerun.Mailboxes = Mailboxes;
902
910
  Mobilerun.Files = Files;
911
+ Mobilerun.Agents = Agents;
903
912
  Mobilerun.Assistant = Assistant;
904
913
  Mobilerun.Messages = Messages;
905
914
  Mobilerun.Numbers = Numbers;
@@ -1026,6 +1035,14 @@ export declare namespace Mobilerun {
1026
1035
  type FileUploadURLParams as FileUploadURLParams,
1027
1036
  };
1028
1037
 
1038
+ export {
1039
+ Agents as Agents,
1040
+ type AgentCreateResponse as AgentCreateResponse,
1041
+ type AgentListResponse as AgentListResponse,
1042
+ type AgentModelProfilesResponse as AgentModelProfilesResponse,
1043
+ type AgentCreateParams as AgentCreateParams,
1044
+ };
1045
+
1029
1046
  export { Assistant as Assistant };
1030
1047
 
1031
1048
  export {
@@ -0,0 +1,475 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ConversationsAPI from './conversations';
5
+ import {
6
+ ConversationCreateParams,
7
+ ConversationCreateResponse,
8
+ ConversationListParams,
9
+ ConversationListResponse,
10
+ Conversations,
11
+ } from './conversations';
12
+ import * as FilesAPI from './files';
13
+ import { FileListParams, FileListResponse, Files } from './files';
14
+ import * as ProfileAPI from './profile';
15
+ import { Profile as ProfileAPIProfile, ProfileUpdateParams, ProfileUpdateResponse } from './profile';
16
+ import * as RequestsAPI from './requests';
17
+ import {
18
+ RequestListForAgentParams,
19
+ RequestListForAgentResponse,
20
+ RequestListParams,
21
+ RequestListResponse,
22
+ RequestRetrieveBySessionResponse,
23
+ RequestRetrieveResponse,
24
+ Requests,
25
+ } from './requests';
26
+ import * as RoutinesAPI from './routines';
27
+ import {
28
+ RoutineCloneParams,
29
+ RoutineCloneResponse,
30
+ RoutineCreateParams,
31
+ RoutineCreateResponse,
32
+ Routines,
33
+ } from './routines';
34
+ import { APIPromise } from '../../core/api-promise';
35
+ import { RequestOptions } from '../../internal/request-options';
36
+
37
+ export class Agents extends APIResource {
38
+ profile: ProfileAPI.Profile = new ProfileAPI.Profile(this._client);
39
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
40
+ conversations: ConversationsAPI.Conversations = new ConversationsAPI.Conversations(this._client);
41
+ requests: RequestsAPI.Requests = new RequestsAPI.Requests(this._client);
42
+ routines: RoutinesAPI.Routines = new RoutinesAPI.Routines(this._client);
43
+
44
+ /**
45
+ * Creates an Agent directly on the owner runtime, without a chat message or
46
+ * approval card. Provisioning runs in the background; the new Agent has no chat
47
+ * history. Requires Idempotency-Key; a replay returns the current Agent with the
48
+ * original 201 status.
49
+ */
50
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse> {
51
+ return this._client.post('/agents', { body, ...options });
52
+ }
53
+
54
+ /**
55
+ * Owner-scoped. Returns every Agent of the owner that is not on a retired machine,
56
+ * archived and failed ones included, oldest first.
57
+ */
58
+ list(options?: RequestOptions): APIPromise<AgentListResponse> {
59
+ return this._client.get('/agents', options);
60
+ }
61
+
62
+ /**
63
+ * List the environment model profiles and their default. Model routing is managed
64
+ * by the server.
65
+ */
66
+ modelProfiles(options?: RequestOptions): APIPromise<AgentModelProfilesResponse> {
67
+ return this._client.get('/agents/model-profiles', options);
68
+ }
69
+ }
70
+
71
+ export interface AgentCreateResponse {
72
+ /**
73
+ * An Agent of the owner: its lifecycle state, profile and runtime.
74
+ */
75
+ agent: AgentCreateResponse.Agent;
76
+ }
77
+
78
+ export namespace AgentCreateResponse {
79
+ /**
80
+ * An Agent of the owner: its lifecycle state, profile and runtime.
81
+ */
82
+ export interface Agent {
83
+ id: string;
84
+
85
+ archivedAt: string | null;
86
+
87
+ createdAt: string;
88
+
89
+ /**
90
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
91
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
92
+ * disabled.
93
+ */
94
+ disabledReason: 'owner' | 'over-limit' | null;
95
+
96
+ /**
97
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
98
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
99
+ * `provision_failed`; a code the harness reports for a failed start is passed
100
+ * through.
101
+ */
102
+ errorCode: string | null;
103
+
104
+ /**
105
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
106
+ * names no `agentId`.
107
+ */
108
+ primary: boolean;
109
+
110
+ /**
111
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
112
+ * null when none is set.
113
+ */
114
+ profile: Agent.Profile;
115
+
116
+ /**
117
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
118
+ * Agent is still pending and after its provisioning failed.
119
+ */
120
+ provisionedAt: string | null;
121
+
122
+ /**
123
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
124
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
125
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
126
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
127
+ * and the owner can enable it again while a slot is free.
128
+ */
129
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
130
+
131
+ /**
132
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
133
+ * 20 newest rows. Null when the thread has no rows.
134
+ */
135
+ threadPreview: Agent.ThreadPreview | null;
136
+
137
+ /**
138
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
139
+ * id DESC. Null for pending/archived Agents or no thread.
140
+ */
141
+ threadSessionId: string | null;
142
+
143
+ /**
144
+ * Whether this active primary Agent is still due its one-time greeting: the
145
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
146
+ * whose chat never had a message.
147
+ */
148
+ welcomePending: boolean;
149
+
150
+ /**
151
+ * Latest activity of the Agent (newest chat session activity or live turn
152
+ * heartbeat), ISO 8601; null when it has never been active.
153
+ */
154
+ lastActiveAt?: string | null;
155
+
156
+ /**
157
+ * Whether the Agent is running right now, derived from stored state only.
158
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
159
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
160
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
161
+ * started in the current run. `sleeping`: everything else (stopped or parked
162
+ * machine, an Agent the running harness has not started yet, or an Agent that is
163
+ * not active). `awake` can lag a machine stop until the reconciler converges.
164
+ */
165
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
166
+ }
167
+
168
+ export namespace Agent {
169
+ /**
170
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
171
+ * null when none is set.
172
+ */
173
+ export interface Profile {
174
+ /**
175
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
176
+ * color. A color-only config retains the default seed fallback.
177
+ */
178
+ avatarConfig: Profile.AvatarConfig | null;
179
+
180
+ avatarKind: 'blob' | null;
181
+
182
+ displayName: string | null;
183
+
184
+ instructions: string | null;
185
+
186
+ modelProfile: string | null;
187
+ }
188
+
189
+ export namespace Profile {
190
+ /**
191
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
192
+ * color. A color-only config retains the default seed fallback.
193
+ */
194
+ export interface AvatarConfig {
195
+ color?:
196
+ | 'slate'
197
+ | 'red'
198
+ | 'orange'
199
+ | 'amber'
200
+ | 'lime'
201
+ | 'green'
202
+ | 'teal'
203
+ | 'cyan'
204
+ | 'blue'
205
+ | 'indigo'
206
+ | 'violet'
207
+ | 'pink';
208
+
209
+ seed?: string | number;
210
+ }
211
+ }
212
+
213
+ /**
214
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
215
+ * 20 newest rows. Null when the thread has no rows.
216
+ */
217
+ export interface ThreadPreview {
218
+ awaitsInput: boolean;
219
+
220
+ excerpt: string | null;
221
+
222
+ timestamp: string | null;
223
+ }
224
+ }
225
+ }
226
+
227
+ export interface AgentListResponse {
228
+ agents: Array<AgentListResponse.Agent>;
229
+ }
230
+
231
+ export namespace AgentListResponse {
232
+ /**
233
+ * An Agent of the owner: its lifecycle state, profile and runtime.
234
+ */
235
+ export interface Agent {
236
+ id: string;
237
+
238
+ archivedAt: string | null;
239
+
240
+ createdAt: string;
241
+
242
+ /**
243
+ * Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
244
+ * grants fewer Agent slots than the owner had enabled. Null while the Agent is not
245
+ * disabled.
246
+ */
247
+ disabledReason: 'owner' | 'over-limit' | null;
248
+
249
+ /**
250
+ * Why provisioning failed, null otherwise. An open set: new codes can appear.
251
+ * Codes written today: `provision_timeout`, `agent_limit_reached`,
252
+ * `provision_failed`; a code the harness reports for a failed start is passed
253
+ * through.
254
+ */
255
+ errorCode: string | null;
256
+
257
+ /**
258
+ * Whether this is the owner's primary Agent, the one a chat session uses when it
259
+ * names no `agentId`.
260
+ */
261
+ primary: boolean;
262
+
263
+ /**
264
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
265
+ * null when none is set.
266
+ */
267
+ profile: Agent.Profile;
268
+
269
+ /**
270
+ * When provisioning of the Agent completed (ISO 8601); null while a newly created
271
+ * Agent is still pending and after its provisioning failed.
272
+ */
273
+ provisionedAt: string | null;
274
+
275
+ /**
276
+ * `pending`: created but not provisioned yet, it takes no turns. `active`: ready
277
+ * for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
278
+ * archived. `archived`: read-only. `disabled`: switched off by the owner or
279
+ * because the plan grants fewer Agent slots; it takes no turns and holds no slot,
280
+ * and the owner can enable it again while a slot is free.
281
+ */
282
+ status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
283
+
284
+ /**
285
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
286
+ * 20 newest rows. Null when the thread has no rows.
287
+ */
288
+ threadPreview: Agent.ThreadPreview | null;
289
+
290
+ /**
291
+ * Active chat on the active machine, pinned first, then session lastActiveAt DESC,
292
+ * id DESC. Null for pending/archived Agents or no thread.
293
+ */
294
+ threadSessionId: string | null;
295
+
296
+ /**
297
+ * Whether this active primary Agent is still due its one-time greeting: the
298
+ * welcome-back for an adopted primary, or the onboarding greeting for a primary
299
+ * whose chat never had a message.
300
+ */
301
+ welcomePending: boolean;
302
+
303
+ /**
304
+ * Latest activity of the Agent (newest chat session activity or live turn
305
+ * heartbeat), ISO 8601; null when it has never been active.
306
+ */
307
+ lastActiveAt?: string | null;
308
+
309
+ /**
310
+ * Whether the Agent is running right now, derived from stored state only.
311
+ * `waking`: an active start, its machine is provisioning or a restart/rehydrate is
312
+ * pending and changed within the last 10 minutes (a timed-out or stalled start
313
+ * reads `sleeping`). `awake`: the machine is running and this Agent has been
314
+ * started in the current run. `sleeping`: everything else (stopped or parked
315
+ * machine, an Agent the running harness has not started yet, or an Agent that is
316
+ * not active). `awake` can lag a machine stop until the reconciler converges.
317
+ */
318
+ runtime?: 'awake' | 'sleeping' | 'waking' | null;
319
+ }
320
+
321
+ export namespace Agent {
322
+ /**
323
+ * Persona of the Agent plus its individual instructions passage; `instructions` is
324
+ * null when none is set.
325
+ */
326
+ export interface Profile {
327
+ /**
328
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
329
+ * color. A color-only config retains the default seed fallback.
330
+ */
331
+ avatarConfig: Profile.AvatarConfig | null;
332
+
333
+ avatarKind: 'blob' | null;
334
+
335
+ displayName: string | null;
336
+
337
+ instructions: string | null;
338
+
339
+ modelProfile: string | null;
340
+ }
341
+
342
+ export namespace Profile {
343
+ /**
344
+ * Configuration of a `blob` avatar: its seed and optional user-chosen palette
345
+ * color. A color-only config retains the default seed fallback.
346
+ */
347
+ export interface AvatarConfig {
348
+ color?:
349
+ | 'slate'
350
+ | 'red'
351
+ | 'orange'
352
+ | 'amber'
353
+ | 'lime'
354
+ | 'green'
355
+ | 'teal'
356
+ | 'cyan'
357
+ | 'blue'
358
+ | 'indigo'
359
+ | 'violet'
360
+ | 'pink';
361
+
362
+ seed?: string | number;
363
+ }
364
+ }
365
+
366
+ /**
367
+ * Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
368
+ * 20 newest rows. Null when the thread has no rows.
369
+ */
370
+ export interface ThreadPreview {
371
+ awaitsInput: boolean;
372
+
373
+ excerpt: string | null;
374
+
375
+ timestamp: string | null;
376
+ }
377
+ }
378
+ }
379
+
380
+ export interface AgentModelProfilesResponse {
381
+ defaultProfileId: string;
382
+
383
+ profiles: Array<AgentModelProfilesResponse.Profile>;
384
+ }
385
+
386
+ export namespace AgentModelProfilesResponse {
387
+ export interface Profile {
388
+ id: string;
389
+
390
+ costHint: string;
391
+
392
+ description: string;
393
+
394
+ label: string;
395
+ }
396
+ }
397
+
398
+ export interface AgentCreateParams {
399
+ /**
400
+ * Single-line name shown for the Agent; surrounding whitespace is trimmed and it
401
+ * needs at least one letter or number.
402
+ */
403
+ displayName: string;
404
+
405
+ avatarSeed?: string | number;
406
+
407
+ color?:
408
+ | 'slate'
409
+ | 'red'
410
+ | 'orange'
411
+ | 'amber'
412
+ | 'lime'
413
+ | 'green'
414
+ | 'teal'
415
+ | 'cyan'
416
+ | 'blue'
417
+ | 'indigo'
418
+ | 'violet'
419
+ | 'pink';
420
+
421
+ /**
422
+ * The Agent's individual instructions passage; an empty or whitespace-only text
423
+ * clears it. Line breaks count three characters toward the rendered size limit.
424
+ */
425
+ instructions?: string;
426
+ }
427
+
428
+ Agents.Profile = ProfileAPIProfile;
429
+ Agents.Files = Files;
430
+ Agents.Conversations = Conversations;
431
+ Agents.Requests = Requests;
432
+ Agents.Routines = Routines;
433
+
434
+ export declare namespace Agents {
435
+ export {
436
+ type AgentCreateResponse as AgentCreateResponse,
437
+ type AgentListResponse as AgentListResponse,
438
+ type AgentModelProfilesResponse as AgentModelProfilesResponse,
439
+ type AgentCreateParams as AgentCreateParams,
440
+ };
441
+
442
+ export {
443
+ ProfileAPIProfile as Profile,
444
+ type ProfileUpdateResponse as ProfileUpdateResponse,
445
+ type ProfileUpdateParams as ProfileUpdateParams,
446
+ };
447
+
448
+ export { Files as Files, type FileListResponse as FileListResponse, type FileListParams as FileListParams };
449
+
450
+ export {
451
+ Conversations as Conversations,
452
+ type ConversationCreateResponse as ConversationCreateResponse,
453
+ type ConversationListResponse as ConversationListResponse,
454
+ type ConversationCreateParams as ConversationCreateParams,
455
+ type ConversationListParams as ConversationListParams,
456
+ };
457
+
458
+ export {
459
+ Requests as Requests,
460
+ type RequestRetrieveResponse as RequestRetrieveResponse,
461
+ type RequestListResponse as RequestListResponse,
462
+ type RequestListForAgentResponse as RequestListForAgentResponse,
463
+ type RequestRetrieveBySessionResponse as RequestRetrieveBySessionResponse,
464
+ type RequestListParams as RequestListParams,
465
+ type RequestListForAgentParams as RequestListForAgentParams,
466
+ };
467
+
468
+ export {
469
+ Routines as Routines,
470
+ type RoutineCreateResponse as RoutineCreateResponse,
471
+ type RoutineCloneResponse as RoutineCloneResponse,
472
+ type RoutineCreateParams as RoutineCreateParams,
473
+ type RoutineCloneParams as RoutineCloneParams,
474
+ };
475
+ }