@nimble-way/nimble-js 0.20.0 → 1.1.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 +18 -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} +80 -86
  13. package/resources/agents/agents.d.mts.map +1 -0
  14. package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +80 -86
  15. package/resources/agents/agents.d.ts.map +1 -0
  16. package/resources/agents/agents.js +74 -0
  17. package/resources/agents/agents.js.map +1 -0
  18. package/resources/agents/agents.mjs +69 -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 +11 -14
  37. package/resources/agents/templates.d.mts.map +1 -0
  38. package/resources/{task-agent → agents}/templates.d.ts +11 -14
  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 +43 -121
  179. package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +108 -110
  180. package/src/resources/{task-agent → agents}/index.ts +16 -14
  181. package/src/resources/{task-agent → agents}/runs.ts +228 -54
  182. package/src/resources/{task-agent → agents}/templates.ts +15 -18
  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 -34
  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,76 @@ 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);
80
+ get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
81
+ return this._client.get(path`/v2/agents/${agentID}`, options);
85
82
  }
86
83
 
87
84
  /**
88
- * Create a research run for a Web Search Agent instance.
89
- *
90
- * @deprecated
85
+ * Creates a minimal persistent Web Search Agent and starts a run for it. The
86
+ * response includes `web_search_agent_id` for later agent and run queries.
91
87
  */
92
- run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
93
- return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
88
+ run(body: AgentRunParams, options?: RequestOptions): APIPromise<AgentRunResponse> {
89
+ return this._client.post('/v2/agents/runs', { body, ...options });
94
90
  }
95
91
  }
96
92
 
97
- export interface TaskAgentCreateResponse {
93
+ export interface AgentCreateResponse {
98
94
  /**
99
95
  * Unique web search agent identifier (wsa\_<uuid>).
100
96
  */
@@ -115,11 +111,6 @@ export interface TaskAgentCreateResponse {
115
111
  */
116
112
  display_name: string;
117
113
 
118
- /**
119
- * Domain expertise or operating context for the agent.
120
- */
121
- domain_expertise: string;
122
-
123
114
  /**
124
115
  * Default effort level for this agent's runs.
125
116
  */
@@ -128,7 +119,7 @@ export interface TaskAgentCreateResponse {
128
119
  /**
129
120
  * Ordered goals for the agent to follow.
130
121
  */
131
- goals: Array<TaskAgentCreateResponse.Goal>;
122
+ goals: Array<AgentCreateResponse.Goal>;
132
123
 
133
124
  /**
134
125
  * Icon identifier used when presenting the agent.
@@ -145,15 +136,20 @@ export interface TaskAgentCreateResponse {
145
136
  */
146
137
  output_schema: { [key: string]: unknown } | null;
147
138
 
139
+ /**
140
+ * Skill or operating context for the agent.
141
+ */
142
+ skill: string;
143
+
148
144
  /**
149
145
  * Source guidance for the agent.
150
146
  */
151
- sources: TaskAgentCreateResponse.Sources;
147
+ sources: AgentCreateResponse.Sources;
152
148
 
153
149
  /**
154
150
  * Suggested prompts users can run with this agent.
155
151
  */
156
- suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
152
+ suggested_questions: Array<AgentCreateResponse.SuggestedQuestion>;
157
153
 
158
154
  /**
159
155
  * When the agent was last updated.
@@ -171,7 +167,7 @@ export interface TaskAgentCreateResponse {
171
167
  agent_name?: string | null;
172
168
  }
173
169
 
174
- export namespace TaskAgentCreateResponse {
170
+ export namespace AgentCreateResponse {
175
171
  export interface Goal {
176
172
  /**
177
173
  * Unique goal identifier (wsag\_<uuid>).
@@ -278,7 +274,7 @@ export namespace TaskAgentCreateResponse {
278
274
  }
279
275
  }
280
276
 
281
- export interface TaskAgentUpdateResponse {
277
+ export interface AgentUpdateResponse {
282
278
  /**
283
279
  * Unique web search agent identifier (wsa\_<uuid>).
284
280
  */
@@ -299,11 +295,6 @@ export interface TaskAgentUpdateResponse {
299
295
  */
300
296
  display_name: string;
301
297
 
302
- /**
303
- * Domain expertise or operating context for the agent.
304
- */
305
- domain_expertise: string;
306
-
307
298
  /**
308
299
  * Default effort level for this agent's runs.
309
300
  */
@@ -312,7 +303,7 @@ export interface TaskAgentUpdateResponse {
312
303
  /**
313
304
  * Ordered goals for the agent to follow.
314
305
  */
315
- goals: Array<TaskAgentUpdateResponse.Goal>;
306
+ goals: Array<AgentUpdateResponse.Goal>;
316
307
 
317
308
  /**
318
309
  * Icon identifier used when presenting the agent.
@@ -329,15 +320,20 @@ export interface TaskAgentUpdateResponse {
329
320
  */
330
321
  output_schema: { [key: string]: unknown } | null;
331
322
 
323
+ /**
324
+ * Skill or operating context for the agent.
325
+ */
326
+ skill: string;
327
+
332
328
  /**
333
329
  * Source guidance for the agent.
334
330
  */
335
- sources: TaskAgentUpdateResponse.Sources;
331
+ sources: AgentUpdateResponse.Sources;
336
332
 
337
333
  /**
338
334
  * Suggested prompts users can run with this agent.
339
335
  */
340
- suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
336
+ suggested_questions: Array<AgentUpdateResponse.SuggestedQuestion>;
341
337
 
342
338
  /**
343
339
  * When the agent was last updated.
@@ -355,7 +351,7 @@ export interface TaskAgentUpdateResponse {
355
351
  agent_name?: string | null;
356
352
  }
357
353
 
358
- export namespace TaskAgentUpdateResponse {
354
+ export namespace AgentUpdateResponse {
359
355
  export interface Goal {
360
356
  /**
361
357
  * Unique goal identifier (wsag\_<uuid>).
@@ -462,11 +458,11 @@ export namespace TaskAgentUpdateResponse {
462
458
  }
463
459
  }
464
460
 
465
- export interface TaskAgentListResponse {
461
+ export interface AgentListResponse {
466
462
  /**
467
463
  * Items returned in this page.
468
464
  */
469
- items: Array<TaskAgentListResponse.Item>;
465
+ items: Array<AgentListResponse.Item>;
470
466
 
471
467
  /**
472
468
  * Maximum number of items returned.
@@ -484,7 +480,7 @@ export interface TaskAgentListResponse {
484
480
  total: number;
485
481
  }
486
482
 
487
- export namespace TaskAgentListResponse {
483
+ export namespace AgentListResponse {
488
484
  export interface Item {
489
485
  /**
490
486
  * Unique web search agent identifier (wsa\_<uuid>).
@@ -506,11 +502,6 @@ export namespace TaskAgentListResponse {
506
502
  */
507
503
  display_name: string;
508
504
 
509
- /**
510
- * Domain expertise or operating context for the agent.
511
- */
512
- domain_expertise: string;
513
-
514
505
  /**
515
506
  * Default effort level for this agent's runs.
516
507
  */
@@ -536,6 +527,11 @@ export namespace TaskAgentListResponse {
536
527
  */
537
528
  output_schema: { [key: string]: unknown } | null;
538
529
 
530
+ /**
531
+ * Skill or operating context for the agent.
532
+ */
533
+ skill: string;
534
+
539
535
  /**
540
536
  * Source guidance for the agent.
541
537
  */
@@ -670,7 +666,7 @@ export namespace TaskAgentListResponse {
670
666
  }
671
667
  }
672
668
 
673
- export interface TaskAgentGetResponse {
669
+ export interface AgentGetResponse {
674
670
  /**
675
671
  * Unique web search agent identifier (wsa\_<uuid>).
676
672
  */
@@ -691,11 +687,6 @@ export interface TaskAgentGetResponse {
691
687
  */
692
688
  display_name: string;
693
689
 
694
- /**
695
- * Domain expertise or operating context for the agent.
696
- */
697
- domain_expertise: string;
698
-
699
690
  /**
700
691
  * Default effort level for this agent's runs.
701
692
  */
@@ -704,7 +695,7 @@ export interface TaskAgentGetResponse {
704
695
  /**
705
696
  * Ordered goals for the agent to follow.
706
697
  */
707
- goals: Array<TaskAgentGetResponse.Goal>;
698
+ goals: Array<AgentGetResponse.Goal>;
708
699
 
709
700
  /**
710
701
  * Icon identifier used when presenting the agent.
@@ -721,15 +712,20 @@ export interface TaskAgentGetResponse {
721
712
  */
722
713
  output_schema: { [key: string]: unknown } | null;
723
714
 
715
+ /**
716
+ * Skill or operating context for the agent.
717
+ */
718
+ skill: string;
719
+
724
720
  /**
725
721
  * Source guidance for the agent.
726
722
  */
727
- sources: TaskAgentGetResponse.Sources;
723
+ sources: AgentGetResponse.Sources;
728
724
 
729
725
  /**
730
726
  * Suggested prompts users can run with this agent.
731
727
  */
732
- suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
728
+ suggested_questions: Array<AgentGetResponse.SuggestedQuestion>;
733
729
 
734
730
  /**
735
731
  * When the agent was last updated.
@@ -747,7 +743,7 @@ export interface TaskAgentGetResponse {
747
743
  agent_name?: string | null;
748
744
  }
749
745
 
750
- export namespace TaskAgentGetResponse {
746
+ export namespace AgentGetResponse {
751
747
  export interface Goal {
752
748
  /**
753
749
  * Unique goal identifier (wsag\_<uuid>).
@@ -854,7 +850,7 @@ export namespace TaskAgentGetResponse {
854
850
  }
855
851
  }
856
852
 
857
- export interface TaskAgentRunResponse {
853
+ export interface AgentRunResponse {
858
854
  /**
859
855
  * Run identifier, format "task*run*{uuid}".
860
856
  */
@@ -898,7 +894,7 @@ export interface TaskAgentRunResponse {
898
894
  /**
899
895
  * Error details when the run failed.
900
896
  */
901
- error?: TaskAgentRunResponse.Error | null;
897
+ error?: AgentRunResponse.Error | null;
902
898
 
903
899
  /**
904
900
  * Prompt submitted for the run.
@@ -911,7 +907,7 @@ export interface TaskAgentRunResponse {
911
907
  started_at?: string | null;
912
908
  }
913
909
 
914
- export namespace TaskAgentRunResponse {
910
+ export namespace AgentRunResponse {
915
911
  /**
916
912
  * Error details when the run failed.
917
913
  */
@@ -928,7 +924,7 @@ export namespace TaskAgentRunResponse {
928
924
  }
929
925
  }
930
926
 
931
- export interface TaskAgentCreateParams {
927
+ export interface AgentCreateParams {
932
928
  /**
933
929
  * Stable agent name.
934
930
  */
@@ -944,11 +940,6 @@ export interface TaskAgentCreateParams {
944
940
  */
945
941
  display_name?: string | null;
946
942
 
947
- /**
948
- * Domain expertise or operating context for the agent.
949
- */
950
- domain_expertise?: string | null;
951
-
952
943
  /**
953
944
  * Default effort level for this agent's runs.
954
945
  */
@@ -974,10 +965,15 @@ export interface TaskAgentCreateParams {
974
965
  */
975
966
  output_schema?: { [key: string]: unknown } | null;
976
967
 
968
+ /**
969
+ * Skill or operating context for the agent.
970
+ */
971
+ skill?: string | null;
972
+
977
973
  /**
978
974
  * Source guidance for the agent.
979
975
  */
980
- sources?: TaskAgentCreateParams.Sources;
976
+ sources?: AgentCreateParams.Sources;
981
977
 
982
978
  /**
983
979
  * Suggested prompts users can run with this agent.
@@ -996,7 +992,7 @@ export interface TaskAgentCreateParams {
996
992
  use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
997
993
  }
998
994
 
999
- export namespace TaskAgentCreateParams {
995
+ export namespace AgentCreateParams {
1000
996
  /**
1001
997
  * Source guidance for the agent.
1002
998
  */
@@ -1059,14 +1055,14 @@ export namespace TaskAgentCreateParams {
1059
1055
  }
1060
1056
  }
1061
1057
 
1062
- export interface TaskAgentUpdateParams {
1058
+ export interface AgentUpdateParams {
1063
1059
  /**
1064
1060
  * A JSON Patch document per RFC 6902 — a JSON array of patch operations.
1065
1061
  */
1066
- body: Array<TaskAgentUpdateParams.Body>;
1062
+ body: Array<AgentUpdateParams.Body>;
1067
1063
  }
1068
1064
 
1069
- export namespace TaskAgentUpdateParams {
1065
+ export namespace AgentUpdateParams {
1070
1066
  /**
1071
1067
  * A single JSON Patch operation per RFC 6902.
1072
1068
  */
@@ -1081,7 +1077,7 @@ export namespace TaskAgentUpdateParams {
1081
1077
  }
1082
1078
  }
1083
1079
 
1084
- export interface TaskAgentListParams {
1080
+ export interface AgentListParams {
1085
1081
  limit?: number;
1086
1082
 
1087
1083
  offset?: number;
@@ -1089,7 +1085,7 @@ export interface TaskAgentListParams {
1089
1085
  workspace_id?: string | null;
1090
1086
  }
1091
1087
 
1092
- export interface TaskAgentRunParams {
1088
+ export interface AgentRunParams {
1093
1089
  /**
1094
1090
  * User prompt or task instructions for the run.
1095
1091
  */
@@ -1124,10 +1120,10 @@ export interface TaskAgentRunParams {
1124
1120
  /**
1125
1121
  * Source guidance overriding the agent default.
1126
1122
  */
1127
- sources?: TaskAgentRunParams.Sources | null;
1123
+ sources?: AgentRunParams.Sources | null;
1128
1124
  }
1129
1125
 
1130
- export namespace TaskAgentRunParams {
1126
+ export namespace AgentRunParams {
1131
1127
  /**
1132
1128
  * Source guidance overriding the agent default.
1133
1129
  */
@@ -1190,20 +1186,20 @@ export namespace TaskAgentRunParams {
1190
1186
  }
1191
1187
  }
1192
1188
 
1193
- TaskAgent.Templates = Templates;
1194
- TaskAgent.Runs = Runs;
1189
+ Agents.Templates = Templates;
1190
+ Agents.Runs = Runs;
1195
1191
 
1196
- export declare namespace TaskAgent {
1192
+ export declare namespace Agents {
1197
1193
  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,
1194
+ type AgentCreateResponse as AgentCreateResponse,
1195
+ type AgentUpdateResponse as AgentUpdateResponse,
1196
+ type AgentListResponse as AgentListResponse,
1197
+ type AgentGetResponse as AgentGetResponse,
1198
+ type AgentRunResponse as AgentRunResponse,
1199
+ type AgentCreateParams as AgentCreateParams,
1200
+ type AgentUpdateParams as AgentUpdateParams,
1201
+ type AgentListParams as AgentListParams,
1202
+ type AgentRunParams as AgentRunParams,
1207
1203
  };
1208
1204
 
1209
1205
  export {
@@ -1215,12 +1211,14 @@ export declare namespace TaskAgent {
1215
1211
 
1216
1212
  export {
1217
1213
  Runs as Runs,
1214
+ type RunCreateResponse as RunCreateResponse,
1218
1215
  type RunListResponse as RunListResponse,
1219
1216
  type RunGetResponse as RunGetResponse,
1220
- type RunGetResultResponse as RunGetResultResponse,
1217
+ type RunResultResponse as RunResultResponse,
1218
+ type RunCreateParams as RunCreateParams,
1221
1219
  type RunListParams as RunListParams,
1222
1220
  type RunGetParams as RunGetParams,
1223
- type RunGetResultParams as RunGetResultParams,
1221
+ type RunResultParams as RunResultParams,
1224
1222
  type RunStreamEventsParams as RunStreamEventsParams,
1225
1223
  };
1226
1224
  }
@@ -1,27 +1,29 @@
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 AgentRunResponse,
10
+ type AgentCreateParams,
11
+ type AgentUpdateParams,
12
+ type AgentListParams,
13
+ type AgentRunParams,
14
+ } from './agents';
3
15
  export {
4
16
  Runs,
17
+ type RunCreateResponse,
5
18
  type RunListResponse,
6
19
  type RunGetResponse,
7
- type RunGetResultResponse,
20
+ type RunResultResponse,
21
+ type RunCreateParams,
8
22
  type RunListParams,
9
23
  type RunGetParams,
10
- type RunGetResultParams,
24
+ type RunResultParams,
11
25
  type RunStreamEventsParams,
12
26
  } 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
27
  export {
26
28
  Templates,
27
29
  type TemplateListResponse,