@nimble-way/nimble-js 0.19.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 (255) hide show
  1. package/CHANGELOG.md +20 -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/agents/agents.d.mts +811 -0
  13. package/resources/agents/agents.d.mts.map +1 -0
  14. package/resources/agents/agents.d.ts +811 -0
  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 +413 -128
  29. package/resources/agents/runs.d.mts.map +1 -0
  30. package/resources/{task-agent → agents}/runs.d.ts +413 -128
  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/agents/templates.d.mts +258 -0
  37. package/resources/agents/templates.d.mts.map +1 -0
  38. package/resources/agents/templates.d.ts +258 -0
  39. package/resources/agents/templates.d.ts.map +1 -0
  40. package/resources/{task-agent → agents}/templates.js +5 -4
  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/{agent.d.ts → extract/templates/templates.d.mts} +475 -263
  91. package/resources/extract/templates/templates.d.mts.map +1 -0
  92. package/resources/{agent.d.mts → extract/templates/templates.d.ts} +475 -263
  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 +34 -90
  139. package/resources/jobs/jobs.d.mts.map +1 -1
  140. package/resources/jobs/jobs.d.ts +34 -90
  141. package/resources/jobs/jobs.d.ts.map +1 -1
  142. package/resources/jobs/jobs.js +10 -16
  143. package/resources/jobs/jobs.js.map +1 -1
  144. package/resources/jobs/jobs.mjs +11 -17
  145. package/resources/jobs/jobs.mjs.map +1 -1
  146. package/resources/jobs/runs/artifacts.d.mts +7 -17
  147. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  148. package/resources/jobs/runs/artifacts.d.ts +7 -17
  149. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  150. package/resources/jobs/runs/artifacts.js +8 -8
  151. package/resources/jobs/runs/artifacts.mjs +8 -8
  152. package/resources/jobs/runs/index.d.mts +1 -1
  153. package/resources/jobs/runs/index.d.mts.map +1 -1
  154. package/resources/jobs/runs/index.d.ts +1 -1
  155. package/resources/jobs/runs/index.d.ts.map +1 -1
  156. package/resources/jobs/runs/index.js.map +1 -1
  157. package/resources/jobs/runs/index.mjs.map +1 -1
  158. package/resources/jobs/runs/runs.d.mts +59 -21
  159. package/resources/jobs/runs/runs.d.mts.map +1 -1
  160. package/resources/jobs/runs/runs.d.ts +59 -21
  161. package/resources/jobs/runs/runs.d.ts.map +1 -1
  162. package/resources/jobs/runs/runs.js +12 -6
  163. package/resources/jobs/runs/runs.js.map +1 -1
  164. package/resources/jobs/runs/runs.mjs +12 -6
  165. package/resources/jobs/runs/runs.mjs.map +1 -1
  166. package/resources/media.js +2 -2
  167. package/resources/media.mjs +2 -2
  168. package/resources/serp.js +3 -3
  169. package/resources/serp.mjs +3 -3
  170. package/resources/tasks.js +3 -3
  171. package/resources/tasks.mjs +3 -3
  172. package/resources/top-level.d.mts +1 -1208
  173. package/resources/top-level.d.mts.map +1 -1
  174. package/resources/top-level.d.ts +1 -1208
  175. package/resources/top-level.d.ts.map +1 -1
  176. package/src/client.ts +41 -123
  177. package/src/resources/agents/agents.ts +1039 -0
  178. package/src/resources/agents/index.ts +30 -0
  179. package/src/resources/{task-agent → agents}/runs.ts +450 -154
  180. package/src/resources/agents/templates.ts +324 -0
  181. package/src/resources/{task-agent.ts → agents.ts} +1 -1
  182. package/src/resources/batches.ts +3 -3
  183. package/src/resources/crawl.ts +4 -4
  184. package/src/resources/domain-knowledge.ts +1 -1
  185. package/src/resources/extract/extract.ts +5182 -0
  186. package/src/resources/extract/index.ts +25 -0
  187. package/src/resources/extract/templates/generations.ts +435 -0
  188. package/src/resources/extract/templates/index.ts +29 -0
  189. package/src/resources/extract/templates/templates.ts +1176 -0
  190. package/src/resources/extract/templates/versions.ts +284 -0
  191. package/src/resources/extract/templates.ts +3 -0
  192. package/src/resources/extract.ts +3 -0
  193. package/src/resources/fast-serp.ts +1 -1
  194. package/src/resources/index.ts +16 -36
  195. package/src/resources/jobs/index.ts +1 -1
  196. package/src/resources/jobs/jobs.ts +49 -112
  197. package/src/resources/jobs/runs/artifacts.ts +11 -21
  198. package/src/resources/jobs/runs/index.ts +1 -0
  199. package/src/resources/jobs/runs/runs.ts +74 -24
  200. package/src/resources/media.ts +2 -2
  201. package/src/resources/serp.ts +3 -3
  202. package/src/resources/tasks.ts +3 -3
  203. package/src/resources/top-level.ts +88 -5192
  204. package/src/version.ts +1 -1
  205. package/version.d.mts +1 -1
  206. package/version.d.mts.map +1 -1
  207. package/version.d.ts +1 -1
  208. package/version.d.ts.map +1 -1
  209. package/version.js +1 -1
  210. package/version.js.map +1 -1
  211. package/version.mjs +1 -1
  212. package/version.mjs.map +1 -1
  213. package/resources/agent.d.mts.map +0 -1
  214. package/resources/agent.d.ts.map +0 -1
  215. package/resources/agent.js +0 -101
  216. package/resources/agent.js.map +0 -1
  217. package/resources/agent.mjs +0 -97
  218. package/resources/agent.mjs.map +0 -1
  219. package/resources/task-agent/index.d.mts +0 -4
  220. package/resources/task-agent/index.d.mts.map +0 -1
  221. package/resources/task-agent/index.d.ts +0 -4
  222. package/resources/task-agent/index.d.ts.map +0 -1
  223. package/resources/task-agent/index.js.map +0 -1
  224. package/resources/task-agent/index.mjs.map +0 -1
  225. package/resources/task-agent/runs.d.mts.map +0 -1
  226. package/resources/task-agent/runs.d.ts.map +0 -1
  227. package/resources/task-agent/runs.js +0 -65
  228. package/resources/task-agent/runs.js.map +0 -1
  229. package/resources/task-agent/runs.mjs +0 -61
  230. package/resources/task-agent/runs.mjs.map +0 -1
  231. package/resources/task-agent/task-agent.d.mts +0 -481
  232. package/resources/task-agent/task-agent.d.mts.map +0 -1
  233. package/resources/task-agent/task-agent.d.ts +0 -481
  234. package/resources/task-agent/task-agent.d.ts.map +0 -1
  235. package/resources/task-agent/task-agent.js +0 -68
  236. package/resources/task-agent/task-agent.js.map +0 -1
  237. package/resources/task-agent/task-agent.mjs +0 -63
  238. package/resources/task-agent/task-agent.mjs.map +0 -1
  239. package/resources/task-agent/templates.d.mts +0 -107
  240. package/resources/task-agent/templates.d.mts.map +0 -1
  241. package/resources/task-agent/templates.d.ts +0 -107
  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 -18
  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 -952
  253. package/src/resources/task-agent/index.ts +0 -32
  254. package/src/resources/task-agent/task-agent.ts +0 -746
  255. package/src/resources/task-agent/templates.ts +0 -172
@@ -0,0 +1,1039 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as RunsAPI from './runs';
5
+ import {
6
+ RunCreateParams,
7
+ RunCreateResponse,
8
+ RunGetParams,
9
+ RunGetResponse,
10
+ RunListParams,
11
+ RunListResponse,
12
+ RunResultParams,
13
+ RunResultResponse,
14
+ RunStreamEventsParams,
15
+ Runs,
16
+ } from './runs';
17
+ import * as TemplatesAPI from './templates';
18
+ import { TemplateGetResponse, TemplateListParams, TemplateListResponse, Templates } from './templates';
19
+ import { APIPromise } from '../../core/api-promise';
20
+ import { buildHeaders } from '../../internal/headers';
21
+ import { RequestOptions } from '../../internal/request-options';
22
+ import { path } from '../../internal/utils/path';
23
+
24
+ export class Agents extends APIResource {
25
+ templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
26
+ runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
27
+
28
+ /**
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.
33
+ */
34
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse> {
35
+ return this._client.post('/v2/agents', { body, ...options });
36
+ }
37
+
38
+ /**
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.
44
+ */
45
+ update(
46
+ agentID: string,
47
+ params: AgentUpdateParams,
48
+ options?: RequestOptions,
49
+ ): APIPromise<AgentUpdateResponse> {
50
+ const { body } = params;
51
+ return this._client.patch(path`/v2/agents/${agentID}`, { body: body, ...options });
52
+ }
53
+
54
+ /**
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
+ */
59
+ list(
60
+ query: AgentListParams | null | undefined = {},
61
+ options?: RequestOptions,
62
+ ): APIPromise<AgentListResponse> {
63
+ return this._client.get('/v2/agents', { query, ...options });
64
+ }
65
+
66
+ /**
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.
69
+ */
70
+ delete(agentID: string, options?: RequestOptions): APIPromise<void> {
71
+ return this._client.delete(path`/v2/agents/${agentID}`, {
72
+ ...options,
73
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
74
+ });
75
+ }
76
+
77
+ /**
78
+ * Retrieve a single Web Search Agent by ID.
79
+ */
80
+ get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
81
+ return this._client.get(path`/v2/agents/${agentID}`, options);
82
+ }
83
+ }
84
+
85
+ export interface AgentCreateResponse {
86
+ /**
87
+ * Unique web search agent identifier (wsa\_<uuid>).
88
+ */
89
+ id: string;
90
+
91
+ /**
92
+ * When the agent was created.
93
+ */
94
+ created_at: string;
95
+
96
+ /**
97
+ * Agent description shown to users.
98
+ */
99
+ description: string;
100
+
101
+ /**
102
+ * Human-friendly agent name shown to users.
103
+ */
104
+ display_name: string;
105
+
106
+ /**
107
+ * Domain expertise or operating context for the agent.
108
+ */
109
+ domain_expertise: string;
110
+
111
+ /**
112
+ * Default effort level for this agent's runs.
113
+ */
114
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
115
+
116
+ /**
117
+ * Ordered goals for the agent to follow.
118
+ */
119
+ goals: Array<AgentCreateResponse.Goal>;
120
+
121
+ /**
122
+ * Icon identifier used when presenting the agent.
123
+ */
124
+ icon: string;
125
+
126
+ /**
127
+ * Whether the agent can be used to start new runs.
128
+ */
129
+ is_active: boolean;
130
+
131
+ /**
132
+ * JSON schema describing the structured output the agent should produce.
133
+ */
134
+ output_schema: { [key: string]: unknown } | null;
135
+
136
+ /**
137
+ * Source guidance for the agent.
138
+ */
139
+ sources: AgentCreateResponse.Sources;
140
+
141
+ /**
142
+ * Suggested prompts users can run with this agent.
143
+ */
144
+ suggested_questions: Array<AgentCreateResponse.SuggestedQuestion>;
145
+
146
+ /**
147
+ * When the agent was last updated.
148
+ */
149
+ updated_at: string;
150
+
151
+ /**
152
+ * Primary use case supported by the agent.
153
+ */
154
+ use_case: 'research' | 'enrichment' | 'dataset_building';
155
+
156
+ /**
157
+ * Stable agent name.
158
+ */
159
+ agent_name?: string | null;
160
+ }
161
+
162
+ export namespace AgentCreateResponse {
163
+ export interface Goal {
164
+ /**
165
+ * Unique goal identifier (wsag\_<uuid>).
166
+ */
167
+ id: string;
168
+
169
+ /**
170
+ * Goal text.
171
+ */
172
+ goal: string;
173
+
174
+ /**
175
+ * Zero-based goal position.
176
+ */
177
+ order: number;
178
+ }
179
+
180
+ /**
181
+ * Source guidance for the agent.
182
+ */
183
+ export interface Sources {
184
+ /**
185
+ * Source groups the agent is allowed to use.
186
+ */
187
+ allow?: Array<Sources.Allow>;
188
+
189
+ /**
190
+ * Free-text guidance describing sources or domains to avoid.
191
+ */
192
+ avoid?: string | null;
193
+
194
+ /**
195
+ * Source groups the agent should not use.
196
+ */
197
+ block?: Array<Sources.Block>;
198
+
199
+ /**
200
+ * Free-text guidance describing sources or domains to prioritize.
201
+ */
202
+ prioritize?: string | null;
203
+ }
204
+
205
+ export namespace Sources {
206
+ export interface Allow {
207
+ /**
208
+ * Unique source group identifier (wsas\_<uuid>).
209
+ */
210
+ id: string;
211
+
212
+ /**
213
+ * Domains included in this source group.
214
+ */
215
+ domains: Array<string>;
216
+
217
+ /**
218
+ * Zero-based source group position.
219
+ */
220
+ order: number;
221
+
222
+ /**
223
+ * Source group title.
224
+ */
225
+ title: string;
226
+ }
227
+
228
+ export interface Block {
229
+ /**
230
+ * Unique source group identifier (wsas\_<uuid>).
231
+ */
232
+ id: string;
233
+
234
+ /**
235
+ * Domains included in this source group.
236
+ */
237
+ domains: Array<string>;
238
+
239
+ /**
240
+ * Zero-based source group position.
241
+ */
242
+ order: number;
243
+
244
+ /**
245
+ * Source group title.
246
+ */
247
+ title: string;
248
+ }
249
+ }
250
+
251
+ export interface SuggestedQuestion {
252
+ /**
253
+ * Unique suggested question identifier (wsasq\_<uuid>).
254
+ */
255
+ id: string;
256
+
257
+ /**
258
+ * Zero-based suggested question position.
259
+ */
260
+ order: number;
261
+
262
+ /**
263
+ * Suggested prompt text.
264
+ */
265
+ question: string;
266
+ }
267
+ }
268
+
269
+ export interface AgentUpdateResponse {
270
+ /**
271
+ * Unique web search agent identifier (wsa\_<uuid>).
272
+ */
273
+ id: string;
274
+
275
+ /**
276
+ * When the agent was created.
277
+ */
278
+ created_at: string;
279
+
280
+ /**
281
+ * Agent description shown to users.
282
+ */
283
+ description: string;
284
+
285
+ /**
286
+ * Human-friendly agent name shown to users.
287
+ */
288
+ display_name: string;
289
+
290
+ /**
291
+ * Domain expertise or operating context for the agent.
292
+ */
293
+ domain_expertise: string;
294
+
295
+ /**
296
+ * Default effort level for this agent's runs.
297
+ */
298
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
299
+
300
+ /**
301
+ * Ordered goals for the agent to follow.
302
+ */
303
+ goals: Array<AgentUpdateResponse.Goal>;
304
+
305
+ /**
306
+ * Icon identifier used when presenting the agent.
307
+ */
308
+ icon: string;
309
+
310
+ /**
311
+ * Whether the agent can be used to start new runs.
312
+ */
313
+ is_active: boolean;
314
+
315
+ /**
316
+ * JSON schema describing the structured output the agent should produce.
317
+ */
318
+ output_schema: { [key: string]: unknown } | null;
319
+
320
+ /**
321
+ * Source guidance for the agent.
322
+ */
323
+ sources: AgentUpdateResponse.Sources;
324
+
325
+ /**
326
+ * Suggested prompts users can run with this agent.
327
+ */
328
+ suggested_questions: Array<AgentUpdateResponse.SuggestedQuestion>;
329
+
330
+ /**
331
+ * When the agent was last updated.
332
+ */
333
+ updated_at: string;
334
+
335
+ /**
336
+ * Primary use case supported by the agent.
337
+ */
338
+ use_case: 'research' | 'enrichment' | 'dataset_building';
339
+
340
+ /**
341
+ * Stable agent name.
342
+ */
343
+ agent_name?: string | null;
344
+ }
345
+
346
+ export namespace AgentUpdateResponse {
347
+ export interface Goal {
348
+ /**
349
+ * Unique goal identifier (wsag\_<uuid>).
350
+ */
351
+ id: string;
352
+
353
+ /**
354
+ * Goal text.
355
+ */
356
+ goal: string;
357
+
358
+ /**
359
+ * Zero-based goal position.
360
+ */
361
+ order: number;
362
+ }
363
+
364
+ /**
365
+ * Source guidance for the agent.
366
+ */
367
+ export interface Sources {
368
+ /**
369
+ * Source groups the agent is allowed to use.
370
+ */
371
+ allow?: Array<Sources.Allow>;
372
+
373
+ /**
374
+ * Free-text guidance describing sources or domains to avoid.
375
+ */
376
+ avoid?: string | null;
377
+
378
+ /**
379
+ * Source groups the agent should not use.
380
+ */
381
+ block?: Array<Sources.Block>;
382
+
383
+ /**
384
+ * Free-text guidance describing sources or domains to prioritize.
385
+ */
386
+ prioritize?: string | null;
387
+ }
388
+
389
+ export namespace Sources {
390
+ export interface Allow {
391
+ /**
392
+ * Unique source group identifier (wsas\_<uuid>).
393
+ */
394
+ id: string;
395
+
396
+ /**
397
+ * Domains included in this source group.
398
+ */
399
+ domains: Array<string>;
400
+
401
+ /**
402
+ * Zero-based source group position.
403
+ */
404
+ order: number;
405
+
406
+ /**
407
+ * Source group title.
408
+ */
409
+ title: string;
410
+ }
411
+
412
+ export interface Block {
413
+ /**
414
+ * Unique source group identifier (wsas\_<uuid>).
415
+ */
416
+ id: string;
417
+
418
+ /**
419
+ * Domains included in this source group.
420
+ */
421
+ domains: Array<string>;
422
+
423
+ /**
424
+ * Zero-based source group position.
425
+ */
426
+ order: number;
427
+
428
+ /**
429
+ * Source group title.
430
+ */
431
+ title: string;
432
+ }
433
+ }
434
+
435
+ export interface SuggestedQuestion {
436
+ /**
437
+ * Unique suggested question identifier (wsasq\_<uuid>).
438
+ */
439
+ id: string;
440
+
441
+ /**
442
+ * Zero-based suggested question position.
443
+ */
444
+ order: number;
445
+
446
+ /**
447
+ * Suggested prompt text.
448
+ */
449
+ question: string;
450
+ }
451
+ }
452
+
453
+ export interface AgentListResponse {
454
+ /**
455
+ * Items returned in this page.
456
+ */
457
+ items: Array<AgentListResponse.Item>;
458
+
459
+ /**
460
+ * Maximum number of items returned.
461
+ */
462
+ limit: number;
463
+
464
+ /**
465
+ * Number of items skipped before this page.
466
+ */
467
+ offset: number;
468
+
469
+ /**
470
+ * Total number of items matching the query.
471
+ */
472
+ total: number;
473
+ }
474
+
475
+ export namespace AgentListResponse {
476
+ export interface Item {
477
+ /**
478
+ * Unique web search agent identifier (wsa\_<uuid>).
479
+ */
480
+ id: string;
481
+
482
+ /**
483
+ * When the agent was created.
484
+ */
485
+ created_at: string;
486
+
487
+ /**
488
+ * Agent description shown to users.
489
+ */
490
+ description: string;
491
+
492
+ /**
493
+ * Human-friendly agent name shown to users.
494
+ */
495
+ display_name: string;
496
+
497
+ /**
498
+ * Domain expertise or operating context for the agent.
499
+ */
500
+ domain_expertise: string;
501
+
502
+ /**
503
+ * Default effort level for this agent's runs.
504
+ */
505
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
506
+
507
+ /**
508
+ * Ordered goals for the agent to follow.
509
+ */
510
+ goals: Array<Item.Goal>;
511
+
512
+ /**
513
+ * Icon identifier used when presenting the agent.
514
+ */
515
+ icon: string;
516
+
517
+ /**
518
+ * Whether the agent can be used to start new runs.
519
+ */
520
+ is_active: boolean;
521
+
522
+ /**
523
+ * JSON schema describing the structured output the agent should produce.
524
+ */
525
+ output_schema: { [key: string]: unknown } | null;
526
+
527
+ /**
528
+ * Source guidance for the agent.
529
+ */
530
+ sources: Item.Sources;
531
+
532
+ /**
533
+ * Suggested prompts users can run with this agent.
534
+ */
535
+ suggested_questions: Array<Item.SuggestedQuestion>;
536
+
537
+ /**
538
+ * When the agent was last updated.
539
+ */
540
+ updated_at: string;
541
+
542
+ /**
543
+ * Primary use case supported by the agent.
544
+ */
545
+ use_case: 'research' | 'enrichment' | 'dataset_building';
546
+
547
+ /**
548
+ * Stable agent name.
549
+ */
550
+ agent_name?: string | null;
551
+ }
552
+
553
+ export namespace Item {
554
+ export interface Goal {
555
+ /**
556
+ * Unique goal identifier (wsag\_<uuid>).
557
+ */
558
+ id: string;
559
+
560
+ /**
561
+ * Goal text.
562
+ */
563
+ goal: string;
564
+
565
+ /**
566
+ * Zero-based goal position.
567
+ */
568
+ order: number;
569
+ }
570
+
571
+ /**
572
+ * Source guidance for the agent.
573
+ */
574
+ export interface Sources {
575
+ /**
576
+ * Source groups the agent is allowed to use.
577
+ */
578
+ allow?: Array<Sources.Allow>;
579
+
580
+ /**
581
+ * Free-text guidance describing sources or domains to avoid.
582
+ */
583
+ avoid?: string | null;
584
+
585
+ /**
586
+ * Source groups the agent should not use.
587
+ */
588
+ block?: Array<Sources.Block>;
589
+
590
+ /**
591
+ * Free-text guidance describing sources or domains to prioritize.
592
+ */
593
+ prioritize?: string | null;
594
+ }
595
+
596
+ export namespace Sources {
597
+ export interface Allow {
598
+ /**
599
+ * Unique source group identifier (wsas\_<uuid>).
600
+ */
601
+ id: string;
602
+
603
+ /**
604
+ * Domains included in this source group.
605
+ */
606
+ domains: Array<string>;
607
+
608
+ /**
609
+ * Zero-based source group position.
610
+ */
611
+ order: number;
612
+
613
+ /**
614
+ * Source group title.
615
+ */
616
+ title: string;
617
+ }
618
+
619
+ export interface Block {
620
+ /**
621
+ * Unique source group identifier (wsas\_<uuid>).
622
+ */
623
+ id: string;
624
+
625
+ /**
626
+ * Domains included in this source group.
627
+ */
628
+ domains: Array<string>;
629
+
630
+ /**
631
+ * Zero-based source group position.
632
+ */
633
+ order: number;
634
+
635
+ /**
636
+ * Source group title.
637
+ */
638
+ title: string;
639
+ }
640
+ }
641
+
642
+ export interface SuggestedQuestion {
643
+ /**
644
+ * Unique suggested question identifier (wsasq\_<uuid>).
645
+ */
646
+ id: string;
647
+
648
+ /**
649
+ * Zero-based suggested question position.
650
+ */
651
+ order: number;
652
+
653
+ /**
654
+ * Suggested prompt text.
655
+ */
656
+ question: string;
657
+ }
658
+ }
659
+ }
660
+
661
+ export interface AgentGetResponse {
662
+ /**
663
+ * Unique web search agent identifier (wsa\_<uuid>).
664
+ */
665
+ id: string;
666
+
667
+ /**
668
+ * When the agent was created.
669
+ */
670
+ created_at: string;
671
+
672
+ /**
673
+ * Agent description shown to users.
674
+ */
675
+ description: string;
676
+
677
+ /**
678
+ * Human-friendly agent name shown to users.
679
+ */
680
+ display_name: string;
681
+
682
+ /**
683
+ * Domain expertise or operating context for the agent.
684
+ */
685
+ domain_expertise: string;
686
+
687
+ /**
688
+ * Default effort level for this agent's runs.
689
+ */
690
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
691
+
692
+ /**
693
+ * Ordered goals for the agent to follow.
694
+ */
695
+ goals: Array<AgentGetResponse.Goal>;
696
+
697
+ /**
698
+ * Icon identifier used when presenting the agent.
699
+ */
700
+ icon: string;
701
+
702
+ /**
703
+ * Whether the agent can be used to start new runs.
704
+ */
705
+ is_active: boolean;
706
+
707
+ /**
708
+ * JSON schema describing the structured output the agent should produce.
709
+ */
710
+ output_schema: { [key: string]: unknown } | null;
711
+
712
+ /**
713
+ * Source guidance for the agent.
714
+ */
715
+ sources: AgentGetResponse.Sources;
716
+
717
+ /**
718
+ * Suggested prompts users can run with this agent.
719
+ */
720
+ suggested_questions: Array<AgentGetResponse.SuggestedQuestion>;
721
+
722
+ /**
723
+ * When the agent was last updated.
724
+ */
725
+ updated_at: string;
726
+
727
+ /**
728
+ * Primary use case supported by the agent.
729
+ */
730
+ use_case: 'research' | 'enrichment' | 'dataset_building';
731
+
732
+ /**
733
+ * Stable agent name.
734
+ */
735
+ agent_name?: string | null;
736
+ }
737
+
738
+ export namespace AgentGetResponse {
739
+ export interface Goal {
740
+ /**
741
+ * Unique goal identifier (wsag\_<uuid>).
742
+ */
743
+ id: string;
744
+
745
+ /**
746
+ * Goal text.
747
+ */
748
+ goal: string;
749
+
750
+ /**
751
+ * Zero-based goal position.
752
+ */
753
+ order: number;
754
+ }
755
+
756
+ /**
757
+ * Source guidance for the agent.
758
+ */
759
+ export interface Sources {
760
+ /**
761
+ * Source groups the agent is allowed to use.
762
+ */
763
+ allow?: Array<Sources.Allow>;
764
+
765
+ /**
766
+ * Free-text guidance describing sources or domains to avoid.
767
+ */
768
+ avoid?: string | null;
769
+
770
+ /**
771
+ * Source groups the agent should not use.
772
+ */
773
+ block?: Array<Sources.Block>;
774
+
775
+ /**
776
+ * Free-text guidance describing sources or domains to prioritize.
777
+ */
778
+ prioritize?: string | null;
779
+ }
780
+
781
+ export namespace Sources {
782
+ export interface Allow {
783
+ /**
784
+ * Unique source group identifier (wsas\_<uuid>).
785
+ */
786
+ id: string;
787
+
788
+ /**
789
+ * Domains included in this source group.
790
+ */
791
+ domains: Array<string>;
792
+
793
+ /**
794
+ * Zero-based source group position.
795
+ */
796
+ order: number;
797
+
798
+ /**
799
+ * Source group title.
800
+ */
801
+ title: string;
802
+ }
803
+
804
+ export interface Block {
805
+ /**
806
+ * Unique source group identifier (wsas\_<uuid>).
807
+ */
808
+ id: string;
809
+
810
+ /**
811
+ * Domains included in this source group.
812
+ */
813
+ domains: Array<string>;
814
+
815
+ /**
816
+ * Zero-based source group position.
817
+ */
818
+ order: number;
819
+
820
+ /**
821
+ * Source group title.
822
+ */
823
+ title: string;
824
+ }
825
+ }
826
+
827
+ export interface SuggestedQuestion {
828
+ /**
829
+ * Unique suggested question identifier (wsasq\_<uuid>).
830
+ */
831
+ id: string;
832
+
833
+ /**
834
+ * Zero-based suggested question position.
835
+ */
836
+ order: number;
837
+
838
+ /**
839
+ * Suggested prompt text.
840
+ */
841
+ question: string;
842
+ }
843
+ }
844
+
845
+ export interface AgentCreateParams {
846
+ /**
847
+ * Stable agent name.
848
+ */
849
+ agent_name?: string | null;
850
+
851
+ /**
852
+ * Agent description shown to users.
853
+ */
854
+ description?: string | null;
855
+
856
+ /**
857
+ * Human-friendly agent name shown to users.
858
+ */
859
+ display_name?: string | null;
860
+
861
+ /**
862
+ * Domain expertise or operating context for the agent.
863
+ */
864
+ domain_expertise?: string | null;
865
+
866
+ /**
867
+ * Default effort level for this agent's runs.
868
+ */
869
+ effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max';
870
+
871
+ /**
872
+ * Ordered goals for the agent to follow.
873
+ */
874
+ goals?: Array<string>;
875
+
876
+ /**
877
+ * Icon identifier used when presenting the agent.
878
+ */
879
+ icon?: string | null;
880
+
881
+ /**
882
+ * Whether the agent can be used to start new runs.
883
+ */
884
+ is_active?: boolean;
885
+
886
+ /**
887
+ * JSON schema describing the structured output the agent should produce.
888
+ */
889
+ output_schema?: { [key: string]: unknown } | null;
890
+
891
+ /**
892
+ * Source guidance for the agent.
893
+ */
894
+ sources?: AgentCreateParams.Sources;
895
+
896
+ /**
897
+ * Suggested prompts users can run with this agent.
898
+ */
899
+ suggested_questions?: Array<string>;
900
+
901
+ /**
902
+ * Template name to materialize this instance from. When set, the scalar fields and
903
+ * child rows are copied from the template.
904
+ */
905
+ template?: string | null;
906
+
907
+ /**
908
+ * Primary use case supported by the agent.
909
+ */
910
+ use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
911
+ }
912
+
913
+ export namespace AgentCreateParams {
914
+ /**
915
+ * Source guidance for the agent.
916
+ */
917
+ export interface Sources {
918
+ /**
919
+ * Source groups the agent is allowed to use.
920
+ */
921
+ allow?: Array<Sources.Allow>;
922
+
923
+ /**
924
+ * Free-text guidance describing sources or domains to avoid.
925
+ */
926
+ avoid?: string | null;
927
+
928
+ /**
929
+ * Source groups the agent should not use.
930
+ */
931
+ block?: Array<Sources.Block>;
932
+
933
+ /**
934
+ * Free-text guidance describing sources or domains to prioritize.
935
+ */
936
+ prioritize?: string | null;
937
+ }
938
+
939
+ export namespace Sources {
940
+ export interface Allow {
941
+ /**
942
+ * Domains included in this source group.
943
+ */
944
+ domains: Array<string>;
945
+
946
+ /**
947
+ * Source group title.
948
+ */
949
+ title: string;
950
+
951
+ /**
952
+ * Zero-based source group position.
953
+ */
954
+ order?: number;
955
+ }
956
+
957
+ export interface Block {
958
+ /**
959
+ * Domains included in this source group.
960
+ */
961
+ domains: Array<string>;
962
+
963
+ /**
964
+ * Source group title.
965
+ */
966
+ title: string;
967
+
968
+ /**
969
+ * Zero-based source group position.
970
+ */
971
+ order?: number;
972
+ }
973
+ }
974
+ }
975
+
976
+ export interface AgentUpdateParams {
977
+ /**
978
+ * A JSON Patch document per RFC 6902 — a JSON array of patch operations.
979
+ */
980
+ body: Array<AgentUpdateParams.Body>;
981
+ }
982
+
983
+ export namespace AgentUpdateParams {
984
+ /**
985
+ * A single JSON Patch operation per RFC 6902.
986
+ */
987
+ export interface Body {
988
+ op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
989
+
990
+ path: string;
991
+
992
+ from?: string | null;
993
+
994
+ value?: unknown;
995
+ }
996
+ }
997
+
998
+ export interface AgentListParams {
999
+ limit?: number;
1000
+
1001
+ offset?: number;
1002
+
1003
+ workspace_id?: string | null;
1004
+ }
1005
+
1006
+ Agents.Templates = Templates;
1007
+ Agents.Runs = Runs;
1008
+
1009
+ export declare namespace Agents {
1010
+ export {
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,
1018
+ };
1019
+
1020
+ export {
1021
+ Templates as Templates,
1022
+ type TemplateListResponse as TemplateListResponse,
1023
+ type TemplateGetResponse as TemplateGetResponse,
1024
+ type TemplateListParams as TemplateListParams,
1025
+ };
1026
+
1027
+ export {
1028
+ Runs as Runs,
1029
+ type RunCreateResponse as RunCreateResponse,
1030
+ type RunListResponse as RunListResponse,
1031
+ type RunGetResponse as RunGetResponse,
1032
+ type RunResultResponse as RunResultResponse,
1033
+ type RunCreateParams as RunCreateParams,
1034
+ type RunListParams as RunListParams,
1035
+ type RunGetParams as RunGetParams,
1036
+ type RunResultParams as RunResultParams,
1037
+ type RunStreamEventsParams as RunStreamEventsParams,
1038
+ };
1039
+ }