@nimble-way/nimble-js 0.20.0 → 1.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 (252) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +10 -10
  3. package/client.d.mts +10 -39
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +10 -39
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -43
  8. package/client.js.map +1 -1
  9. package/client.mjs +8 -43
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/{task-agent/task-agent.d.mts → agents/agents.d.mts} +51 -213
  13. package/resources/agents/agents.d.mts.map +1 -0
  14. package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +51 -213
  15. package/resources/agents/agents.d.ts.map +1 -0
  16. package/resources/agents/agents.js +67 -0
  17. package/resources/agents/agents.js.map +1 -0
  18. package/resources/agents/agents.mjs +62 -0
  19. package/resources/agents/agents.mjs.map +1 -0
  20. package/resources/agents/index.d.mts +4 -0
  21. package/resources/agents/index.d.mts.map +1 -0
  22. package/resources/agents/index.d.ts +4 -0
  23. package/resources/agents/index.d.ts.map +1 -0
  24. package/resources/{task-agent → agents}/index.js +3 -3
  25. package/resources/agents/index.js.map +1 -0
  26. package/resources/{task-agent → agents}/index.mjs +1 -1
  27. package/resources/agents/index.mjs.map +1 -0
  28. package/resources/{task-agent → agents}/runs.d.mts +192 -43
  29. package/resources/agents/runs.d.mts.map +1 -0
  30. package/resources/{task-agent → agents}/runs.d.ts +192 -43
  31. package/resources/agents/runs.d.ts.map +1 -0
  32. package/resources/agents/runs.js +63 -0
  33. package/resources/agents/runs.js.map +1 -0
  34. package/resources/agents/runs.mjs +59 -0
  35. package/resources/agents/runs.mjs.map +1 -0
  36. package/resources/{task-agent → agents}/templates.d.mts +3 -6
  37. package/resources/agents/templates.d.mts.map +1 -0
  38. package/resources/{task-agent → agents}/templates.d.ts +3 -6
  39. package/resources/agents/templates.d.ts.map +1 -0
  40. package/resources/{task-agent → agents}/templates.js +5 -8
  41. package/resources/agents/templates.js.map +1 -0
  42. package/resources/agents/templates.mjs +19 -0
  43. package/resources/agents/templates.mjs.map +1 -0
  44. package/resources/agents.d.mts +2 -0
  45. package/resources/agents.d.mts.map +1 -0
  46. package/resources/agents.d.ts +2 -0
  47. package/resources/agents.d.ts.map +1 -0
  48. package/resources/{task-agent.js → agents.js} +2 -2
  49. package/resources/agents.js.map +1 -0
  50. package/resources/{task-agent.mjs → agents.mjs} +2 -2
  51. package/resources/agents.mjs.map +1 -0
  52. package/resources/batches.js +3 -3
  53. package/resources/batches.mjs +3 -3
  54. package/resources/crawl.js +4 -4
  55. package/resources/crawl.mjs +4 -4
  56. package/resources/domain-knowledge.js +1 -1
  57. package/resources/domain-knowledge.mjs +1 -1
  58. package/resources/extract/extract.d.mts +1243 -0
  59. package/resources/extract/extract.d.mts.map +1 -0
  60. package/resources/extract/extract.d.ts +1243 -0
  61. package/resources/extract/extract.d.ts.map +1 -0
  62. package/resources/extract/extract.js +52 -0
  63. package/resources/extract/extract.js.map +1 -0
  64. package/resources/extract/extract.mjs +47 -0
  65. package/resources/extract/extract.mjs.map +1 -0
  66. package/resources/extract/index.d.mts +3 -0
  67. package/resources/extract/index.d.mts.map +1 -0
  68. package/resources/extract/index.d.ts +3 -0
  69. package/resources/extract/index.d.ts.map +1 -0
  70. package/resources/extract/index.js +9 -0
  71. package/resources/extract/index.js.map +1 -0
  72. package/resources/extract/index.mjs +4 -0
  73. package/resources/extract/index.mjs.map +1 -0
  74. package/resources/extract/templates/generations.d.mts +364 -0
  75. package/resources/extract/templates/generations.d.mts.map +1 -0
  76. package/resources/extract/templates/generations.d.ts +364 -0
  77. package/resources/extract/templates/generations.d.ts.map +1 -0
  78. package/resources/extract/templates/generations.js +39 -0
  79. package/resources/extract/templates/generations.js.map +1 -0
  80. package/resources/extract/templates/generations.mjs +35 -0
  81. package/resources/extract/templates/generations.mjs.map +1 -0
  82. package/resources/extract/templates/index.d.mts +4 -0
  83. package/resources/extract/templates/index.d.mts.map +1 -0
  84. package/resources/extract/templates/index.d.ts +4 -0
  85. package/resources/extract/templates/index.d.ts.map +1 -0
  86. package/resources/extract/templates/index.js +11 -0
  87. package/resources/extract/templates/index.js.map +1 -0
  88. package/resources/extract/templates/index.mjs +5 -0
  89. package/resources/extract/templates/index.mjs.map +1 -0
  90. package/resources/extract/templates/templates.d.mts +870 -0
  91. package/resources/extract/templates/templates.d.mts.map +1 -0
  92. package/resources/extract/templates/templates.d.ts +870 -0
  93. package/resources/extract/templates/templates.d.ts.map +1 -0
  94. package/resources/extract/templates/templates.js +120 -0
  95. package/resources/extract/templates/templates.js.map +1 -0
  96. package/resources/extract/templates/templates.mjs +115 -0
  97. package/resources/extract/templates/templates.mjs.map +1 -0
  98. package/resources/extract/templates/versions.d.mts +226 -0
  99. package/resources/extract/templates/versions.d.mts.map +1 -0
  100. package/resources/extract/templates/versions.d.ts +226 -0
  101. package/resources/extract/templates/versions.d.ts.map +1 -0
  102. package/resources/extract/templates/versions.js +42 -0
  103. package/resources/extract/templates/versions.js.map +1 -0
  104. package/resources/extract/templates/versions.mjs +38 -0
  105. package/resources/extract/templates/versions.mjs.map +1 -0
  106. package/resources/extract/templates.d.mts +2 -0
  107. package/resources/extract/templates.d.mts.map +1 -0
  108. package/resources/extract/templates.d.ts +2 -0
  109. package/resources/extract/templates.d.ts.map +1 -0
  110. package/resources/extract/templates.js +6 -0
  111. package/resources/extract/templates.js.map +1 -0
  112. package/resources/extract/templates.mjs +3 -0
  113. package/resources/extract/templates.mjs.map +1 -0
  114. package/resources/extract.d.mts +2 -0
  115. package/resources/extract.d.mts.map +1 -0
  116. package/resources/extract.d.ts +2 -0
  117. package/resources/extract.d.ts.map +1 -0
  118. package/resources/extract.js +6 -0
  119. package/resources/extract.js.map +1 -0
  120. package/resources/extract.mjs +3 -0
  121. package/resources/extract.mjs.map +1 -0
  122. package/resources/fast-serp.js +1 -1
  123. package/resources/fast-serp.mjs +1 -1
  124. package/resources/index.d.mts +4 -4
  125. package/resources/index.d.mts.map +1 -1
  126. package/resources/index.d.ts +4 -4
  127. package/resources/index.d.ts.map +1 -1
  128. package/resources/index.js +5 -5
  129. package/resources/index.js.map +1 -1
  130. package/resources/index.mjs +2 -2
  131. package/resources/index.mjs.map +1 -1
  132. package/resources/jobs/index.d.mts +2 -2
  133. package/resources/jobs/index.d.mts.map +1 -1
  134. package/resources/jobs/index.d.ts +2 -2
  135. package/resources/jobs/index.d.ts.map +1 -1
  136. package/resources/jobs/index.js.map +1 -1
  137. package/resources/jobs/index.mjs.map +1 -1
  138. package/resources/jobs/jobs.d.mts +35 -103
  139. package/resources/jobs/jobs.d.mts.map +1 -1
  140. package/resources/jobs/jobs.d.ts +35 -103
  141. package/resources/jobs/jobs.d.ts.map +1 -1
  142. package/resources/jobs/jobs.js +10 -28
  143. package/resources/jobs/jobs.js.map +1 -1
  144. package/resources/jobs/jobs.mjs +11 -29
  145. package/resources/jobs/jobs.mjs.map +1 -1
  146. package/resources/jobs/runs/artifacts.d.mts +4 -12
  147. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  148. package/resources/jobs/runs/artifacts.d.ts +4 -12
  149. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  150. package/resources/jobs/runs/artifacts.js +8 -16
  151. package/resources/jobs/runs/artifacts.js.map +1 -1
  152. package/resources/jobs/runs/artifacts.mjs +8 -16
  153. package/resources/jobs/runs/artifacts.mjs.map +1 -1
  154. package/resources/jobs/runs/index.d.mts +1 -1
  155. package/resources/jobs/runs/index.d.mts.map +1 -1
  156. package/resources/jobs/runs/index.d.ts +1 -1
  157. package/resources/jobs/runs/index.d.ts.map +1 -1
  158. package/resources/jobs/runs/index.js.map +1 -1
  159. package/resources/jobs/runs/index.mjs.map +1 -1
  160. package/resources/jobs/runs/runs.d.mts +60 -28
  161. package/resources/jobs/runs/runs.d.mts.map +1 -1
  162. package/resources/jobs/runs/runs.d.ts +60 -28
  163. package/resources/jobs/runs/runs.d.ts.map +1 -1
  164. package/resources/jobs/runs/runs.js +12 -12
  165. package/resources/jobs/runs/runs.js.map +1 -1
  166. package/resources/jobs/runs/runs.mjs +12 -12
  167. package/resources/jobs/runs/runs.mjs.map +1 -1
  168. package/resources/media.js +2 -2
  169. package/resources/media.mjs +2 -2
  170. package/resources/serp.js +3 -3
  171. package/resources/serp.mjs +3 -3
  172. package/resources/tasks.js +3 -3
  173. package/resources/tasks.mjs +3 -3
  174. package/resources/top-level.d.mts +1 -1202
  175. package/resources/top-level.d.mts.map +1 -1
  176. package/resources/top-level.d.ts +1 -1202
  177. package/resources/top-level.d.ts.map +1 -1
  178. package/src/client.ts +41 -123
  179. package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +71 -258
  180. package/src/resources/{task-agent → agents}/index.ts +14 -14
  181. package/src/resources/{task-agent → agents}/runs.ts +228 -54
  182. package/src/resources/{task-agent → agents}/templates.ts +5 -8
  183. package/src/resources/{task-agent.ts → agents.ts} +1 -1
  184. package/src/resources/batches.ts +3 -3
  185. package/src/resources/crawl.ts +4 -4
  186. package/src/resources/domain-knowledge.ts +1 -1
  187. package/src/resources/extract/extract.ts +5182 -0
  188. package/src/resources/extract/index.ts +25 -0
  189. package/src/resources/extract/templates/generations.ts +435 -0
  190. package/src/resources/extract/templates/index.ts +29 -0
  191. package/src/resources/extract/templates/templates.ts +1176 -0
  192. package/src/resources/extract/templates/versions.ts +284 -0
  193. package/src/resources/extract/templates.ts +3 -0
  194. package/src/resources/extract.ts +3 -0
  195. package/src/resources/fast-serp.ts +1 -1
  196. package/src/resources/index.ts +16 -36
  197. package/src/resources/jobs/index.ts +1 -1
  198. package/src/resources/jobs/jobs.ts +50 -125
  199. package/src/resources/jobs/runs/artifacts.ts +8 -16
  200. package/src/resources/jobs/runs/index.ts +1 -0
  201. package/src/resources/jobs/runs/runs.ts +75 -31
  202. package/src/resources/media.ts +2 -2
  203. package/src/resources/serp.ts +3 -3
  204. package/src/resources/tasks.ts +3 -3
  205. package/src/resources/top-level.ts +72 -5171
  206. package/src/version.ts +1 -1
  207. package/version.d.mts +1 -1
  208. package/version.d.mts.map +1 -1
  209. package/version.d.ts +1 -1
  210. package/version.d.ts.map +1 -1
  211. package/version.js +1 -1
  212. package/version.js.map +1 -1
  213. package/version.mjs +1 -1
  214. package/version.mjs.map +1 -1
  215. package/resources/agent.d.mts +0 -641
  216. package/resources/agent.d.mts.map +0 -1
  217. package/resources/agent.d.ts +0 -641
  218. package/resources/agent.d.ts.map +0 -1
  219. package/resources/agent.js +0 -84
  220. package/resources/agent.js.map +0 -1
  221. package/resources/agent.mjs +0 -80
  222. package/resources/agent.mjs.map +0 -1
  223. package/resources/task-agent/index.d.mts +0 -4
  224. package/resources/task-agent/index.d.mts.map +0 -1
  225. package/resources/task-agent/index.d.ts +0 -4
  226. package/resources/task-agent/index.d.ts.map +0 -1
  227. package/resources/task-agent/index.js.map +0 -1
  228. package/resources/task-agent/index.mjs.map +0 -1
  229. package/resources/task-agent/runs.d.mts.map +0 -1
  230. package/resources/task-agent/runs.d.ts.map +0 -1
  231. package/resources/task-agent/runs.js +0 -63
  232. package/resources/task-agent/runs.js.map +0 -1
  233. package/resources/task-agent/runs.mjs +0 -59
  234. package/resources/task-agent/runs.mjs.map +0 -1
  235. package/resources/task-agent/task-agent.d.mts.map +0 -1
  236. package/resources/task-agent/task-agent.d.ts.map +0 -1
  237. package/resources/task-agent/task-agent.js +0 -80
  238. package/resources/task-agent/task-agent.js.map +0 -1
  239. package/resources/task-agent/task-agent.mjs +0 -75
  240. package/resources/task-agent/task-agent.mjs.map +0 -1
  241. package/resources/task-agent/templates.d.mts.map +0 -1
  242. package/resources/task-agent/templates.d.ts.map +0 -1
  243. package/resources/task-agent/templates.js.map +0 -1
  244. package/resources/task-agent/templates.mjs +0 -22
  245. package/resources/task-agent/templates.mjs.map +0 -1
  246. package/resources/task-agent.d.mts +0 -2
  247. package/resources/task-agent.d.mts.map +0 -1
  248. package/resources/task-agent.d.ts +0 -2
  249. package/resources/task-agent.d.ts.map +0 -1
  250. package/resources/task-agent.js.map +0 -1
  251. package/resources/task-agent.mjs.map +0 -1
  252. package/src/resources/agent.ts +0 -935
@@ -3,12 +3,14 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as RunsAPI from './runs';
5
5
  import {
6
+ RunCreateParams,
7
+ RunCreateResponse,
6
8
  RunGetParams,
7
9
  RunGetResponse,
8
- RunGetResultParams,
9
- RunGetResultResponse,
10
10
  RunListParams,
11
11
  RunListResponse,
12
+ RunResultParams,
13
+ RunResultResponse,
12
14
  RunStreamEventsParams,
13
15
  Runs,
14
16
  } from './runs';
@@ -19,82 +21,68 @@ import { buildHeaders } from '../../internal/headers';
19
21
  import { RequestOptions } from '../../internal/request-options';
20
22
  import { path } from '../../internal/utils/path';
21
23
 
22
- export class TaskAgent extends APIResource {
24
+ export class Agents extends APIResource {
23
25
  templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
24
26
  runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
25
27
 
26
28
  /**
27
- * Create a Web Search Agent instance.
28
- *
29
- * `account_id` is JWT-derived and never read from the request body.
30
- *
31
- * @deprecated
29
+ * Create a Web Search Agent. Either pass `template` to materialize a pre-built
30
+ * template (its fields, goals, sources, and suggested questions are copied), or
31
+ * define the agent from scratch with `display_name`, `goals`, `sources`, and an
32
+ * optional `output_schema` for structured results.
32
33
  */
33
- create(body: TaskAgentCreateParams, options?: RequestOptions): APIPromise<TaskAgentCreateResponse> {
34
- return this._client.post('/v1/task-agents', { body, ...options });
34
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse> {
35
+ return this._client.post('/v2/agents', { body, ...options });
35
36
  }
36
37
 
37
38
  /**
38
- * Update Agent
39
- *
40
- * @deprecated
39
+ * Update an agent with a
40
+ * [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) document — an array
41
+ * of `{op, path, value}` operations applied to the agent, e.g.
42
+ * `[{"op": "replace", "path": "/display_name", "value": "My agent"}]`. Returns the
43
+ * updated agent.
41
44
  */
42
45
  update(
43
46
  agentID: string,
44
- params: TaskAgentUpdateParams,
47
+ params: AgentUpdateParams,
45
48
  options?: RequestOptions,
46
- ): APIPromise<TaskAgentUpdateResponse> {
49
+ ): APIPromise<AgentUpdateResponse> {
47
50
  const { body } = params;
48
- return this._client.patch(path`/v1/task-agents/${agentID}`, { body: body, ...options });
51
+ return this._client.patch(path`/v2/agents/${agentID}`, { body: body, ...options });
49
52
  }
50
53
 
51
54
  /**
52
- * List Web Search Agent instances.
53
- *
54
- * Callers are strictly scoped to their (account, workspace). If `workspace_id` is
55
- * omitted, the user's default workspace is used.
56
- *
57
- * @deprecated
55
+ * List the active Web Search Agents in your account. Results are scoped to the
56
+ * workspace resolved from your token (or the optional `workspace_id` query
57
+ * parameter) and paginated with `offset`/`limit`.
58
58
  */
59
59
  list(
60
- query: TaskAgentListParams | null | undefined = {},
60
+ query: AgentListParams | null | undefined = {},
61
61
  options?: RequestOptions,
62
- ): APIPromise<TaskAgentListResponse> {
63
- return this._client.get('/v1/task-agents', { query, ...options });
62
+ ): APIPromise<AgentListResponse> {
63
+ return this._client.get('/v2/agents', { query, ...options });
64
64
  }
65
65
 
66
66
  /**
67
- * Deactivate Agent
68
- *
69
- * @deprecated
67
+ * Deactivate an agent. This is a soft delete: the agent can no longer start new
68
+ * runs, but its existing runs and their results remain retrievable.
70
69
  */
71
- deactivate(agentID: string, options?: RequestOptions): APIPromise<void> {
72
- return this._client.delete(path`/v1/task-agents/${agentID}`, {
70
+ delete(agentID: string, options?: RequestOptions): APIPromise<void> {
71
+ return this._client.delete(path`/v2/agents/${agentID}`, {
73
72
  ...options,
74
73
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
75
74
  });
76
75
  }
77
76
 
78
77
  /**
79
- * Get Agent
80
- *
81
- * @deprecated
78
+ * Retrieve a single Web Search Agent by ID.
82
79
  */
83
- get(agentID: string, options?: RequestOptions): APIPromise<TaskAgentGetResponse> {
84
- return this._client.get(path`/v1/task-agents/${agentID}`, options);
85
- }
86
-
87
- /**
88
- * Create a research run for a Web Search Agent instance.
89
- *
90
- * @deprecated
91
- */
92
- run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
93
- return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
80
+ get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
81
+ return this._client.get(path`/v2/agents/${agentID}`, options);
94
82
  }
95
83
  }
96
84
 
97
- export interface TaskAgentCreateResponse {
85
+ export interface AgentCreateResponse {
98
86
  /**
99
87
  * Unique web search agent identifier (wsa\_<uuid>).
100
88
  */
@@ -128,7 +116,7 @@ export interface TaskAgentCreateResponse {
128
116
  /**
129
117
  * Ordered goals for the agent to follow.
130
118
  */
131
- goals: Array<TaskAgentCreateResponse.Goal>;
119
+ goals: Array<AgentCreateResponse.Goal>;
132
120
 
133
121
  /**
134
122
  * Icon identifier used when presenting the agent.
@@ -148,12 +136,12 @@ export interface TaskAgentCreateResponse {
148
136
  /**
149
137
  * Source guidance for the agent.
150
138
  */
151
- sources: TaskAgentCreateResponse.Sources;
139
+ sources: AgentCreateResponse.Sources;
152
140
 
153
141
  /**
154
142
  * Suggested prompts users can run with this agent.
155
143
  */
156
- suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
144
+ suggested_questions: Array<AgentCreateResponse.SuggestedQuestion>;
157
145
 
158
146
  /**
159
147
  * When the agent was last updated.
@@ -171,7 +159,7 @@ export interface TaskAgentCreateResponse {
171
159
  agent_name?: string | null;
172
160
  }
173
161
 
174
- export namespace TaskAgentCreateResponse {
162
+ export namespace AgentCreateResponse {
175
163
  export interface Goal {
176
164
  /**
177
165
  * Unique goal identifier (wsag\_<uuid>).
@@ -278,7 +266,7 @@ export namespace TaskAgentCreateResponse {
278
266
  }
279
267
  }
280
268
 
281
- export interface TaskAgentUpdateResponse {
269
+ export interface AgentUpdateResponse {
282
270
  /**
283
271
  * Unique web search agent identifier (wsa\_<uuid>).
284
272
  */
@@ -312,7 +300,7 @@ export interface TaskAgentUpdateResponse {
312
300
  /**
313
301
  * Ordered goals for the agent to follow.
314
302
  */
315
- goals: Array<TaskAgentUpdateResponse.Goal>;
303
+ goals: Array<AgentUpdateResponse.Goal>;
316
304
 
317
305
  /**
318
306
  * Icon identifier used when presenting the agent.
@@ -332,12 +320,12 @@ export interface TaskAgentUpdateResponse {
332
320
  /**
333
321
  * Source guidance for the agent.
334
322
  */
335
- sources: TaskAgentUpdateResponse.Sources;
323
+ sources: AgentUpdateResponse.Sources;
336
324
 
337
325
  /**
338
326
  * Suggested prompts users can run with this agent.
339
327
  */
340
- suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
328
+ suggested_questions: Array<AgentUpdateResponse.SuggestedQuestion>;
341
329
 
342
330
  /**
343
331
  * When the agent was last updated.
@@ -355,7 +343,7 @@ export interface TaskAgentUpdateResponse {
355
343
  agent_name?: string | null;
356
344
  }
357
345
 
358
- export namespace TaskAgentUpdateResponse {
346
+ export namespace AgentUpdateResponse {
359
347
  export interface Goal {
360
348
  /**
361
349
  * Unique goal identifier (wsag\_<uuid>).
@@ -462,11 +450,11 @@ export namespace TaskAgentUpdateResponse {
462
450
  }
463
451
  }
464
452
 
465
- export interface TaskAgentListResponse {
453
+ export interface AgentListResponse {
466
454
  /**
467
455
  * Items returned in this page.
468
456
  */
469
- items: Array<TaskAgentListResponse.Item>;
457
+ items: Array<AgentListResponse.Item>;
470
458
 
471
459
  /**
472
460
  * Maximum number of items returned.
@@ -484,7 +472,7 @@ export interface TaskAgentListResponse {
484
472
  total: number;
485
473
  }
486
474
 
487
- export namespace TaskAgentListResponse {
475
+ export namespace AgentListResponse {
488
476
  export interface Item {
489
477
  /**
490
478
  * Unique web search agent identifier (wsa\_<uuid>).
@@ -670,7 +658,7 @@ export namespace TaskAgentListResponse {
670
658
  }
671
659
  }
672
660
 
673
- export interface TaskAgentGetResponse {
661
+ export interface AgentGetResponse {
674
662
  /**
675
663
  * Unique web search agent identifier (wsa\_<uuid>).
676
664
  */
@@ -704,7 +692,7 @@ export interface TaskAgentGetResponse {
704
692
  /**
705
693
  * Ordered goals for the agent to follow.
706
694
  */
707
- goals: Array<TaskAgentGetResponse.Goal>;
695
+ goals: Array<AgentGetResponse.Goal>;
708
696
 
709
697
  /**
710
698
  * Icon identifier used when presenting the agent.
@@ -724,12 +712,12 @@ export interface TaskAgentGetResponse {
724
712
  /**
725
713
  * Source guidance for the agent.
726
714
  */
727
- sources: TaskAgentGetResponse.Sources;
715
+ sources: AgentGetResponse.Sources;
728
716
 
729
717
  /**
730
718
  * Suggested prompts users can run with this agent.
731
719
  */
732
- suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
720
+ suggested_questions: Array<AgentGetResponse.SuggestedQuestion>;
733
721
 
734
722
  /**
735
723
  * When the agent was last updated.
@@ -747,7 +735,7 @@ export interface TaskAgentGetResponse {
747
735
  agent_name?: string | null;
748
736
  }
749
737
 
750
- export namespace TaskAgentGetResponse {
738
+ export namespace AgentGetResponse {
751
739
  export interface Goal {
752
740
  /**
753
741
  * Unique goal identifier (wsag\_<uuid>).
@@ -854,81 +842,7 @@ export namespace TaskAgentGetResponse {
854
842
  }
855
843
  }
856
844
 
857
- export interface TaskAgentRunResponse {
858
- /**
859
- * Run identifier, format "task*run*{uuid}".
860
- */
861
- id: string;
862
-
863
- /**
864
- * When the run was created.
865
- */
866
- created_at: string;
867
-
868
- /**
869
- * Effort level used for the run.
870
- */
871
- effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
872
-
873
- /**
874
- * Interaction ID.
875
- */
876
- interaction_id: string;
877
-
878
- /**
879
- * True while status is 'queued' or 'running'.
880
- */
881
- is_active: boolean;
882
-
883
- /**
884
- * Current run status.
885
- */
886
- status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
887
-
888
- /**
889
- * Web Search Agent instance this run belongs to.
890
- */
891
- web_search_agent_id: string;
892
-
893
- /**
894
- * When the run completed.
895
- */
896
- completed_at?: string | null;
897
-
898
- /**
899
- * Error details when the run failed.
900
- */
901
- error?: TaskAgentRunResponse.Error | null;
902
-
903
- /**
904
- * Prompt submitted for the run.
905
- */
906
- prompt?: string | null;
907
-
908
- /**
909
- * When the run started executing.
910
- */
911
- started_at?: string | null;
912
- }
913
-
914
- export namespace TaskAgentRunResponse {
915
- /**
916
- * Error details when the run failed.
917
- */
918
- export interface Error {
919
- /**
920
- * Human-readable error description.
921
- */
922
- message: string;
923
-
924
- /**
925
- * Reference ID (equals the run id).
926
- */
927
- ref_id: string;
928
- }
929
- }
930
-
931
- export interface TaskAgentCreateParams {
845
+ export interface AgentCreateParams {
932
846
  /**
933
847
  * Stable agent name.
934
848
  */
@@ -977,7 +891,7 @@ export interface TaskAgentCreateParams {
977
891
  /**
978
892
  * Source guidance for the agent.
979
893
  */
980
- sources?: TaskAgentCreateParams.Sources;
894
+ sources?: AgentCreateParams.Sources;
981
895
 
982
896
  /**
983
897
  * Suggested prompts users can run with this agent.
@@ -996,7 +910,7 @@ export interface TaskAgentCreateParams {
996
910
  use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
997
911
  }
998
912
 
999
- export namespace TaskAgentCreateParams {
913
+ export namespace AgentCreateParams {
1000
914
  /**
1001
915
  * Source guidance for the agent.
1002
916
  */
@@ -1059,14 +973,14 @@ export namespace TaskAgentCreateParams {
1059
973
  }
1060
974
  }
1061
975
 
1062
- export interface TaskAgentUpdateParams {
976
+ export interface AgentUpdateParams {
1063
977
  /**
1064
978
  * A JSON Patch document per RFC 6902 — a JSON array of patch operations.
1065
979
  */
1066
- body: Array<TaskAgentUpdateParams.Body>;
980
+ body: Array<AgentUpdateParams.Body>;
1067
981
  }
1068
982
 
1069
- export namespace TaskAgentUpdateParams {
983
+ export namespace AgentUpdateParams {
1070
984
  /**
1071
985
  * A single JSON Patch operation per RFC 6902.
1072
986
  */
@@ -1081,7 +995,7 @@ export namespace TaskAgentUpdateParams {
1081
995
  }
1082
996
  }
1083
997
 
1084
- export interface TaskAgentListParams {
998
+ export interface AgentListParams {
1085
999
  limit?: number;
1086
1000
 
1087
1001
  offset?: number;
@@ -1089,121 +1003,18 @@ export interface TaskAgentListParams {
1089
1003
  workspace_id?: string | null;
1090
1004
  }
1091
1005
 
1092
- export interface TaskAgentRunParams {
1093
- /**
1094
- * User prompt or task instructions for the run.
1095
- */
1096
- input: string;
1097
-
1098
- /**
1099
- * Canonical effort tier names for the research graph.
1100
- */
1101
- effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
1102
-
1103
- /**
1104
- * Whether to stream run events when supported.
1105
- */
1106
- enable_events?: boolean;
1107
-
1108
- /**
1109
- * Existing records to ENRICH: a list of partial rows, or a single object,
1110
- * mirroring output_schema's shape.
1111
- */
1112
- input_data?: Array<{ [key: string]: unknown }> | { [key: string]: unknown } | null;
1113
-
1114
- /**
1115
- * JSON schema overriding the agent's default structured output for this run.
1116
- */
1117
- output_schema?: { [key: string]: unknown } | null;
1118
-
1119
- /**
1120
- * Previous interaction identifier used to continue a conversation.
1121
- */
1122
- previous_interaction_id?: string | null;
1123
-
1124
- /**
1125
- * Source guidance overriding the agent default.
1126
- */
1127
- sources?: TaskAgentRunParams.Sources | null;
1128
- }
1129
-
1130
- export namespace TaskAgentRunParams {
1131
- /**
1132
- * Source guidance overriding the agent default.
1133
- */
1134
- export interface Sources {
1135
- /**
1136
- * Source groups the agent is allowed to use.
1137
- */
1138
- allow?: Array<Sources.Allow>;
1139
-
1140
- /**
1141
- * Free-text guidance describing sources or domains to avoid.
1142
- */
1143
- avoid?: string | null;
1144
-
1145
- /**
1146
- * Source groups the agent should not use.
1147
- */
1148
- block?: Array<Sources.Block>;
1149
-
1150
- /**
1151
- * Free-text guidance describing sources or domains to prioritize.
1152
- */
1153
- prioritize?: string | null;
1154
- }
1155
-
1156
- export namespace Sources {
1157
- export interface Allow {
1158
- /**
1159
- * Domains included in this source group.
1160
- */
1161
- domains: Array<string>;
1162
-
1163
- /**
1164
- * Source group title.
1165
- */
1166
- title: string;
1167
-
1168
- /**
1169
- * Zero-based source group position.
1170
- */
1171
- order?: number;
1172
- }
1173
-
1174
- export interface Block {
1175
- /**
1176
- * Domains included in this source group.
1177
- */
1178
- domains: Array<string>;
1179
-
1180
- /**
1181
- * Source group title.
1182
- */
1183
- title: string;
1184
-
1185
- /**
1186
- * Zero-based source group position.
1187
- */
1188
- order?: number;
1189
- }
1190
- }
1191
- }
1192
-
1193
- TaskAgent.Templates = Templates;
1194
- TaskAgent.Runs = Runs;
1006
+ Agents.Templates = Templates;
1007
+ Agents.Runs = Runs;
1195
1008
 
1196
- export declare namespace TaskAgent {
1009
+ export declare namespace Agents {
1197
1010
  export {
1198
- type TaskAgentCreateResponse as TaskAgentCreateResponse,
1199
- type TaskAgentUpdateResponse as TaskAgentUpdateResponse,
1200
- type TaskAgentListResponse as TaskAgentListResponse,
1201
- type TaskAgentGetResponse as TaskAgentGetResponse,
1202
- type TaskAgentRunResponse as TaskAgentRunResponse,
1203
- type TaskAgentCreateParams as TaskAgentCreateParams,
1204
- type TaskAgentUpdateParams as TaskAgentUpdateParams,
1205
- type TaskAgentListParams as TaskAgentListParams,
1206
- type TaskAgentRunParams as TaskAgentRunParams,
1011
+ type AgentCreateResponse as AgentCreateResponse,
1012
+ type AgentUpdateResponse as AgentUpdateResponse,
1013
+ type AgentListResponse as AgentListResponse,
1014
+ type AgentGetResponse as AgentGetResponse,
1015
+ type AgentCreateParams as AgentCreateParams,
1016
+ type AgentUpdateParams as AgentUpdateParams,
1017
+ type AgentListParams as AgentListParams,
1207
1018
  };
1208
1019
 
1209
1020
  export {
@@ -1215,12 +1026,14 @@ export declare namespace TaskAgent {
1215
1026
 
1216
1027
  export {
1217
1028
  Runs as Runs,
1029
+ type RunCreateResponse as RunCreateResponse,
1218
1030
  type RunListResponse as RunListResponse,
1219
1031
  type RunGetResponse as RunGetResponse,
1220
- type RunGetResultResponse as RunGetResultResponse,
1032
+ type RunResultResponse as RunResultResponse,
1033
+ type RunCreateParams as RunCreateParams,
1221
1034
  type RunListParams as RunListParams,
1222
1035
  type RunGetParams as RunGetParams,
1223
- type RunGetResultParams as RunGetResultParams,
1036
+ type RunResultParams as RunResultParams,
1224
1037
  type RunStreamEventsParams as RunStreamEventsParams,
1225
1038
  };
1226
1039
  }
@@ -1,27 +1,27 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export {
4
+ Agents,
5
+ type AgentCreateResponse,
6
+ type AgentUpdateResponse,
7
+ type AgentListResponse,
8
+ type AgentGetResponse,
9
+ type AgentCreateParams,
10
+ type AgentUpdateParams,
11
+ type AgentListParams,
12
+ } from './agents';
3
13
  export {
4
14
  Runs,
15
+ type RunCreateResponse,
5
16
  type RunListResponse,
6
17
  type RunGetResponse,
7
- type RunGetResultResponse,
18
+ type RunResultResponse,
19
+ type RunCreateParams,
8
20
  type RunListParams,
9
21
  type RunGetParams,
10
- type RunGetResultParams,
22
+ type RunResultParams,
11
23
  type RunStreamEventsParams,
12
24
  } from './runs';
13
- export {
14
- TaskAgent,
15
- type TaskAgentCreateResponse,
16
- type TaskAgentUpdateResponse,
17
- type TaskAgentListResponse,
18
- type TaskAgentGetResponse,
19
- type TaskAgentRunResponse,
20
- type TaskAgentCreateParams,
21
- type TaskAgentUpdateParams,
22
- type TaskAgentListParams,
23
- type TaskAgentRunParams,
24
- } from './task-agent';
25
25
  export {
26
26
  Templates,
27
27
  type TemplateListResponse,