@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,811 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as RunsAPI from "./runs.mjs";
3
+ import { RunCreateParams, RunCreateResponse, RunGetParams, RunGetResponse, RunListParams, RunListResponse, RunResultParams, RunResultResponse, RunStreamEventsParams, Runs } from "./runs.mjs";
4
+ import * as TemplatesAPI from "./templates.mjs";
5
+ import { TemplateGetResponse, TemplateListParams, TemplateListResponse, Templates } from "./templates.mjs";
6
+ import { APIPromise } from "../../core/api-promise.mjs";
7
+ import { RequestOptions } from "../../internal/request-options.mjs";
8
+ export declare class Agents extends APIResource {
9
+ templates: TemplatesAPI.Templates;
10
+ runs: RunsAPI.Runs;
11
+ /**
12
+ * Create a Web Search Agent. Either pass `template` to materialize a pre-built
13
+ * template (its fields, goals, sources, and suggested questions are copied), or
14
+ * define the agent from scratch with `display_name`, `goals`, `sources`, and an
15
+ * optional `output_schema` for structured results.
16
+ */
17
+ create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse>;
18
+ /**
19
+ * Update an agent with a
20
+ * [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) document — an array
21
+ * of `{op, path, value}` operations applied to the agent, e.g.
22
+ * `[{"op": "replace", "path": "/display_name", "value": "My agent"}]`. Returns the
23
+ * updated agent.
24
+ */
25
+ update(agentID: string, params: AgentUpdateParams, options?: RequestOptions): APIPromise<AgentUpdateResponse>;
26
+ /**
27
+ * List the active Web Search Agents in your account. Results are scoped to the
28
+ * workspace resolved from your token (or the optional `workspace_id` query
29
+ * parameter) and paginated with `offset`/`limit`.
30
+ */
31
+ list(query?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
32
+ /**
33
+ * Deactivate an agent. This is a soft delete: the agent can no longer start new
34
+ * runs, but its existing runs and their results remain retrievable.
35
+ */
36
+ delete(agentID: string, options?: RequestOptions): APIPromise<void>;
37
+ /**
38
+ * Retrieve a single Web Search Agent by ID.
39
+ */
40
+ get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse>;
41
+ }
42
+ export interface AgentCreateResponse {
43
+ /**
44
+ * Unique web search agent identifier (wsa\_<uuid>).
45
+ */
46
+ id: string;
47
+ /**
48
+ * When the agent was created.
49
+ */
50
+ created_at: string;
51
+ /**
52
+ * Agent description shown to users.
53
+ */
54
+ description: string;
55
+ /**
56
+ * Human-friendly agent name shown to users.
57
+ */
58
+ display_name: string;
59
+ /**
60
+ * Domain expertise or operating context for the agent.
61
+ */
62
+ domain_expertise: string;
63
+ /**
64
+ * Default effort level for this agent's runs.
65
+ */
66
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
67
+ /**
68
+ * Ordered goals for the agent to follow.
69
+ */
70
+ goals: Array<AgentCreateResponse.Goal>;
71
+ /**
72
+ * Icon identifier used when presenting the agent.
73
+ */
74
+ icon: string;
75
+ /**
76
+ * Whether the agent can be used to start new runs.
77
+ */
78
+ is_active: boolean;
79
+ /**
80
+ * JSON schema describing the structured output the agent should produce.
81
+ */
82
+ output_schema: {
83
+ [key: string]: unknown;
84
+ } | null;
85
+ /**
86
+ * Source guidance for the agent.
87
+ */
88
+ sources: AgentCreateResponse.Sources;
89
+ /**
90
+ * Suggested prompts users can run with this agent.
91
+ */
92
+ suggested_questions: Array<AgentCreateResponse.SuggestedQuestion>;
93
+ /**
94
+ * When the agent was last updated.
95
+ */
96
+ updated_at: string;
97
+ /**
98
+ * Primary use case supported by the agent.
99
+ */
100
+ use_case: 'research' | 'enrichment' | 'dataset_building';
101
+ /**
102
+ * Stable agent name.
103
+ */
104
+ agent_name?: string | null;
105
+ }
106
+ export declare namespace AgentCreateResponse {
107
+ interface Goal {
108
+ /**
109
+ * Unique goal identifier (wsag\_<uuid>).
110
+ */
111
+ id: string;
112
+ /**
113
+ * Goal text.
114
+ */
115
+ goal: string;
116
+ /**
117
+ * Zero-based goal position.
118
+ */
119
+ order: number;
120
+ }
121
+ /**
122
+ * Source guidance for the agent.
123
+ */
124
+ interface Sources {
125
+ /**
126
+ * Source groups the agent is allowed to use.
127
+ */
128
+ allow?: Array<Sources.Allow>;
129
+ /**
130
+ * Free-text guidance describing sources or domains to avoid.
131
+ */
132
+ avoid?: string | null;
133
+ /**
134
+ * Source groups the agent should not use.
135
+ */
136
+ block?: Array<Sources.Block>;
137
+ /**
138
+ * Free-text guidance describing sources or domains to prioritize.
139
+ */
140
+ prioritize?: string | null;
141
+ }
142
+ namespace Sources {
143
+ interface Allow {
144
+ /**
145
+ * Unique source group identifier (wsas\_<uuid>).
146
+ */
147
+ id: string;
148
+ /**
149
+ * Domains included in this source group.
150
+ */
151
+ domains: Array<string>;
152
+ /**
153
+ * Zero-based source group position.
154
+ */
155
+ order: number;
156
+ /**
157
+ * Source group title.
158
+ */
159
+ title: string;
160
+ }
161
+ interface Block {
162
+ /**
163
+ * Unique source group identifier (wsas\_<uuid>).
164
+ */
165
+ id: string;
166
+ /**
167
+ * Domains included in this source group.
168
+ */
169
+ domains: Array<string>;
170
+ /**
171
+ * Zero-based source group position.
172
+ */
173
+ order: number;
174
+ /**
175
+ * Source group title.
176
+ */
177
+ title: string;
178
+ }
179
+ }
180
+ interface SuggestedQuestion {
181
+ /**
182
+ * Unique suggested question identifier (wsasq\_<uuid>).
183
+ */
184
+ id: string;
185
+ /**
186
+ * Zero-based suggested question position.
187
+ */
188
+ order: number;
189
+ /**
190
+ * Suggested prompt text.
191
+ */
192
+ question: string;
193
+ }
194
+ }
195
+ export interface AgentUpdateResponse {
196
+ /**
197
+ * Unique web search agent identifier (wsa\_<uuid>).
198
+ */
199
+ id: string;
200
+ /**
201
+ * When the agent was created.
202
+ */
203
+ created_at: string;
204
+ /**
205
+ * Agent description shown to users.
206
+ */
207
+ description: string;
208
+ /**
209
+ * Human-friendly agent name shown to users.
210
+ */
211
+ display_name: string;
212
+ /**
213
+ * Domain expertise or operating context for the agent.
214
+ */
215
+ domain_expertise: string;
216
+ /**
217
+ * Default effort level for this agent's runs.
218
+ */
219
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
220
+ /**
221
+ * Ordered goals for the agent to follow.
222
+ */
223
+ goals: Array<AgentUpdateResponse.Goal>;
224
+ /**
225
+ * Icon identifier used when presenting the agent.
226
+ */
227
+ icon: string;
228
+ /**
229
+ * Whether the agent can be used to start new runs.
230
+ */
231
+ is_active: boolean;
232
+ /**
233
+ * JSON schema describing the structured output the agent should produce.
234
+ */
235
+ output_schema: {
236
+ [key: string]: unknown;
237
+ } | null;
238
+ /**
239
+ * Source guidance for the agent.
240
+ */
241
+ sources: AgentUpdateResponse.Sources;
242
+ /**
243
+ * Suggested prompts users can run with this agent.
244
+ */
245
+ suggested_questions: Array<AgentUpdateResponse.SuggestedQuestion>;
246
+ /**
247
+ * When the agent was last updated.
248
+ */
249
+ updated_at: string;
250
+ /**
251
+ * Primary use case supported by the agent.
252
+ */
253
+ use_case: 'research' | 'enrichment' | 'dataset_building';
254
+ /**
255
+ * Stable agent name.
256
+ */
257
+ agent_name?: string | null;
258
+ }
259
+ export declare namespace AgentUpdateResponse {
260
+ interface Goal {
261
+ /**
262
+ * Unique goal identifier (wsag\_<uuid>).
263
+ */
264
+ id: string;
265
+ /**
266
+ * Goal text.
267
+ */
268
+ goal: string;
269
+ /**
270
+ * Zero-based goal position.
271
+ */
272
+ order: number;
273
+ }
274
+ /**
275
+ * Source guidance for the agent.
276
+ */
277
+ interface Sources {
278
+ /**
279
+ * Source groups the agent is allowed to use.
280
+ */
281
+ allow?: Array<Sources.Allow>;
282
+ /**
283
+ * Free-text guidance describing sources or domains to avoid.
284
+ */
285
+ avoid?: string | null;
286
+ /**
287
+ * Source groups the agent should not use.
288
+ */
289
+ block?: Array<Sources.Block>;
290
+ /**
291
+ * Free-text guidance describing sources or domains to prioritize.
292
+ */
293
+ prioritize?: string | null;
294
+ }
295
+ namespace Sources {
296
+ interface Allow {
297
+ /**
298
+ * Unique source group identifier (wsas\_<uuid>).
299
+ */
300
+ id: string;
301
+ /**
302
+ * Domains included in this source group.
303
+ */
304
+ domains: Array<string>;
305
+ /**
306
+ * Zero-based source group position.
307
+ */
308
+ order: number;
309
+ /**
310
+ * Source group title.
311
+ */
312
+ title: string;
313
+ }
314
+ interface Block {
315
+ /**
316
+ * Unique source group identifier (wsas\_<uuid>).
317
+ */
318
+ id: string;
319
+ /**
320
+ * Domains included in this source group.
321
+ */
322
+ domains: Array<string>;
323
+ /**
324
+ * Zero-based source group position.
325
+ */
326
+ order: number;
327
+ /**
328
+ * Source group title.
329
+ */
330
+ title: string;
331
+ }
332
+ }
333
+ interface SuggestedQuestion {
334
+ /**
335
+ * Unique suggested question identifier (wsasq\_<uuid>).
336
+ */
337
+ id: string;
338
+ /**
339
+ * Zero-based suggested question position.
340
+ */
341
+ order: number;
342
+ /**
343
+ * Suggested prompt text.
344
+ */
345
+ question: string;
346
+ }
347
+ }
348
+ export interface AgentListResponse {
349
+ /**
350
+ * Items returned in this page.
351
+ */
352
+ items: Array<AgentListResponse.Item>;
353
+ /**
354
+ * Maximum number of items returned.
355
+ */
356
+ limit: number;
357
+ /**
358
+ * Number of items skipped before this page.
359
+ */
360
+ offset: number;
361
+ /**
362
+ * Total number of items matching the query.
363
+ */
364
+ total: number;
365
+ }
366
+ export declare namespace AgentListResponse {
367
+ interface Item {
368
+ /**
369
+ * Unique web search agent identifier (wsa\_<uuid>).
370
+ */
371
+ id: string;
372
+ /**
373
+ * When the agent was created.
374
+ */
375
+ created_at: string;
376
+ /**
377
+ * Agent description shown to users.
378
+ */
379
+ description: string;
380
+ /**
381
+ * Human-friendly agent name shown to users.
382
+ */
383
+ display_name: string;
384
+ /**
385
+ * Domain expertise or operating context for the agent.
386
+ */
387
+ domain_expertise: string;
388
+ /**
389
+ * Default effort level for this agent's runs.
390
+ */
391
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
392
+ /**
393
+ * Ordered goals for the agent to follow.
394
+ */
395
+ goals: Array<Item.Goal>;
396
+ /**
397
+ * Icon identifier used when presenting the agent.
398
+ */
399
+ icon: string;
400
+ /**
401
+ * Whether the agent can be used to start new runs.
402
+ */
403
+ is_active: boolean;
404
+ /**
405
+ * JSON schema describing the structured output the agent should produce.
406
+ */
407
+ output_schema: {
408
+ [key: string]: unknown;
409
+ } | null;
410
+ /**
411
+ * Source guidance for the agent.
412
+ */
413
+ sources: Item.Sources;
414
+ /**
415
+ * Suggested prompts users can run with this agent.
416
+ */
417
+ suggested_questions: Array<Item.SuggestedQuestion>;
418
+ /**
419
+ * When the agent was last updated.
420
+ */
421
+ updated_at: string;
422
+ /**
423
+ * Primary use case supported by the agent.
424
+ */
425
+ use_case: 'research' | 'enrichment' | 'dataset_building';
426
+ /**
427
+ * Stable agent name.
428
+ */
429
+ agent_name?: string | null;
430
+ }
431
+ namespace Item {
432
+ interface Goal {
433
+ /**
434
+ * Unique goal identifier (wsag\_<uuid>).
435
+ */
436
+ id: string;
437
+ /**
438
+ * Goal text.
439
+ */
440
+ goal: string;
441
+ /**
442
+ * Zero-based goal position.
443
+ */
444
+ order: number;
445
+ }
446
+ /**
447
+ * Source guidance for the agent.
448
+ */
449
+ interface Sources {
450
+ /**
451
+ * Source groups the agent is allowed to use.
452
+ */
453
+ allow?: Array<Sources.Allow>;
454
+ /**
455
+ * Free-text guidance describing sources or domains to avoid.
456
+ */
457
+ avoid?: string | null;
458
+ /**
459
+ * Source groups the agent should not use.
460
+ */
461
+ block?: Array<Sources.Block>;
462
+ /**
463
+ * Free-text guidance describing sources or domains to prioritize.
464
+ */
465
+ prioritize?: string | null;
466
+ }
467
+ namespace Sources {
468
+ interface Allow {
469
+ /**
470
+ * Unique source group identifier (wsas\_<uuid>).
471
+ */
472
+ id: string;
473
+ /**
474
+ * Domains included in this source group.
475
+ */
476
+ domains: Array<string>;
477
+ /**
478
+ * Zero-based source group position.
479
+ */
480
+ order: number;
481
+ /**
482
+ * Source group title.
483
+ */
484
+ title: string;
485
+ }
486
+ interface Block {
487
+ /**
488
+ * Unique source group identifier (wsas\_<uuid>).
489
+ */
490
+ id: string;
491
+ /**
492
+ * Domains included in this source group.
493
+ */
494
+ domains: Array<string>;
495
+ /**
496
+ * Zero-based source group position.
497
+ */
498
+ order: number;
499
+ /**
500
+ * Source group title.
501
+ */
502
+ title: string;
503
+ }
504
+ }
505
+ interface SuggestedQuestion {
506
+ /**
507
+ * Unique suggested question identifier (wsasq\_<uuid>).
508
+ */
509
+ id: string;
510
+ /**
511
+ * Zero-based suggested question position.
512
+ */
513
+ order: number;
514
+ /**
515
+ * Suggested prompt text.
516
+ */
517
+ question: string;
518
+ }
519
+ }
520
+ }
521
+ export interface AgentGetResponse {
522
+ /**
523
+ * Unique web search agent identifier (wsa\_<uuid>).
524
+ */
525
+ id: string;
526
+ /**
527
+ * When the agent was created.
528
+ */
529
+ created_at: string;
530
+ /**
531
+ * Agent description shown to users.
532
+ */
533
+ description: string;
534
+ /**
535
+ * Human-friendly agent name shown to users.
536
+ */
537
+ display_name: string;
538
+ /**
539
+ * Domain expertise or operating context for the agent.
540
+ */
541
+ domain_expertise: string;
542
+ /**
543
+ * Default effort level for this agent's runs.
544
+ */
545
+ effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
546
+ /**
547
+ * Ordered goals for the agent to follow.
548
+ */
549
+ goals: Array<AgentGetResponse.Goal>;
550
+ /**
551
+ * Icon identifier used when presenting the agent.
552
+ */
553
+ icon: string;
554
+ /**
555
+ * Whether the agent can be used to start new runs.
556
+ */
557
+ is_active: boolean;
558
+ /**
559
+ * JSON schema describing the structured output the agent should produce.
560
+ */
561
+ output_schema: {
562
+ [key: string]: unknown;
563
+ } | null;
564
+ /**
565
+ * Source guidance for the agent.
566
+ */
567
+ sources: AgentGetResponse.Sources;
568
+ /**
569
+ * Suggested prompts users can run with this agent.
570
+ */
571
+ suggested_questions: Array<AgentGetResponse.SuggestedQuestion>;
572
+ /**
573
+ * When the agent was last updated.
574
+ */
575
+ updated_at: string;
576
+ /**
577
+ * Primary use case supported by the agent.
578
+ */
579
+ use_case: 'research' | 'enrichment' | 'dataset_building';
580
+ /**
581
+ * Stable agent name.
582
+ */
583
+ agent_name?: string | null;
584
+ }
585
+ export declare namespace AgentGetResponse {
586
+ interface Goal {
587
+ /**
588
+ * Unique goal identifier (wsag\_<uuid>).
589
+ */
590
+ id: string;
591
+ /**
592
+ * Goal text.
593
+ */
594
+ goal: string;
595
+ /**
596
+ * Zero-based goal position.
597
+ */
598
+ order: number;
599
+ }
600
+ /**
601
+ * Source guidance for the agent.
602
+ */
603
+ interface Sources {
604
+ /**
605
+ * Source groups the agent is allowed to use.
606
+ */
607
+ allow?: Array<Sources.Allow>;
608
+ /**
609
+ * Free-text guidance describing sources or domains to avoid.
610
+ */
611
+ avoid?: string | null;
612
+ /**
613
+ * Source groups the agent should not use.
614
+ */
615
+ block?: Array<Sources.Block>;
616
+ /**
617
+ * Free-text guidance describing sources or domains to prioritize.
618
+ */
619
+ prioritize?: string | null;
620
+ }
621
+ namespace Sources {
622
+ interface Allow {
623
+ /**
624
+ * Unique source group identifier (wsas\_<uuid>).
625
+ */
626
+ id: string;
627
+ /**
628
+ * Domains included in this source group.
629
+ */
630
+ domains: Array<string>;
631
+ /**
632
+ * Zero-based source group position.
633
+ */
634
+ order: number;
635
+ /**
636
+ * Source group title.
637
+ */
638
+ title: string;
639
+ }
640
+ interface Block {
641
+ /**
642
+ * Unique source group identifier (wsas\_<uuid>).
643
+ */
644
+ id: string;
645
+ /**
646
+ * Domains included in this source group.
647
+ */
648
+ domains: Array<string>;
649
+ /**
650
+ * Zero-based source group position.
651
+ */
652
+ order: number;
653
+ /**
654
+ * Source group title.
655
+ */
656
+ title: string;
657
+ }
658
+ }
659
+ interface SuggestedQuestion {
660
+ /**
661
+ * Unique suggested question identifier (wsasq\_<uuid>).
662
+ */
663
+ id: string;
664
+ /**
665
+ * Zero-based suggested question position.
666
+ */
667
+ order: number;
668
+ /**
669
+ * Suggested prompt text.
670
+ */
671
+ question: string;
672
+ }
673
+ }
674
+ export interface AgentCreateParams {
675
+ /**
676
+ * Stable agent name.
677
+ */
678
+ agent_name?: string | null;
679
+ /**
680
+ * Agent description shown to users.
681
+ */
682
+ description?: string | null;
683
+ /**
684
+ * Human-friendly agent name shown to users.
685
+ */
686
+ display_name?: string | null;
687
+ /**
688
+ * Domain expertise or operating context for the agent.
689
+ */
690
+ domain_expertise?: string | null;
691
+ /**
692
+ * Default effort level for this agent's runs.
693
+ */
694
+ effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max';
695
+ /**
696
+ * Ordered goals for the agent to follow.
697
+ */
698
+ goals?: Array<string>;
699
+ /**
700
+ * Icon identifier used when presenting the agent.
701
+ */
702
+ icon?: string | null;
703
+ /**
704
+ * Whether the agent can be used to start new runs.
705
+ */
706
+ is_active?: boolean;
707
+ /**
708
+ * JSON schema describing the structured output the agent should produce.
709
+ */
710
+ output_schema?: {
711
+ [key: string]: unknown;
712
+ } | null;
713
+ /**
714
+ * Source guidance for the agent.
715
+ */
716
+ sources?: AgentCreateParams.Sources;
717
+ /**
718
+ * Suggested prompts users can run with this agent.
719
+ */
720
+ suggested_questions?: Array<string>;
721
+ /**
722
+ * Template name to materialize this instance from. When set, the scalar fields and
723
+ * child rows are copied from the template.
724
+ */
725
+ template?: string | null;
726
+ /**
727
+ * Primary use case supported by the agent.
728
+ */
729
+ use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
730
+ }
731
+ export declare namespace AgentCreateParams {
732
+ /**
733
+ * Source guidance for the agent.
734
+ */
735
+ interface Sources {
736
+ /**
737
+ * Source groups the agent is allowed to use.
738
+ */
739
+ allow?: Array<Sources.Allow>;
740
+ /**
741
+ * Free-text guidance describing sources or domains to avoid.
742
+ */
743
+ avoid?: string | null;
744
+ /**
745
+ * Source groups the agent should not use.
746
+ */
747
+ block?: Array<Sources.Block>;
748
+ /**
749
+ * Free-text guidance describing sources or domains to prioritize.
750
+ */
751
+ prioritize?: string | null;
752
+ }
753
+ namespace Sources {
754
+ interface Allow {
755
+ /**
756
+ * Domains included in this source group.
757
+ */
758
+ domains: Array<string>;
759
+ /**
760
+ * Source group title.
761
+ */
762
+ title: string;
763
+ /**
764
+ * Zero-based source group position.
765
+ */
766
+ order?: number;
767
+ }
768
+ interface Block {
769
+ /**
770
+ * Domains included in this source group.
771
+ */
772
+ domains: Array<string>;
773
+ /**
774
+ * Source group title.
775
+ */
776
+ title: string;
777
+ /**
778
+ * Zero-based source group position.
779
+ */
780
+ order?: number;
781
+ }
782
+ }
783
+ }
784
+ export interface AgentUpdateParams {
785
+ /**
786
+ * A JSON Patch document per RFC 6902 — a JSON array of patch operations.
787
+ */
788
+ body: Array<AgentUpdateParams.Body>;
789
+ }
790
+ export declare namespace AgentUpdateParams {
791
+ /**
792
+ * A single JSON Patch operation per RFC 6902.
793
+ */
794
+ interface Body {
795
+ op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
796
+ path: string;
797
+ from?: string | null;
798
+ value?: unknown;
799
+ }
800
+ }
801
+ export interface AgentListParams {
802
+ limit?: number;
803
+ offset?: number;
804
+ workspace_id?: string | null;
805
+ }
806
+ export declare namespace Agents {
807
+ export { type AgentCreateResponse as AgentCreateResponse, type AgentUpdateResponse as AgentUpdateResponse, type AgentListResponse as AgentListResponse, type AgentGetResponse as AgentGetResponse, type AgentCreateParams as AgentCreateParams, type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, };
808
+ export { Templates as Templates, type TemplateListResponse as TemplateListResponse, type TemplateGetResponse as TemplateGetResponse, type TemplateListParams as TemplateListParams, };
809
+ export { Runs as Runs, type RunCreateResponse as RunCreateResponse, type RunListResponse as RunListResponse, type RunGetResponse as RunGetResponse, type RunResultResponse as RunResultResponse, type RunCreateParams as RunCreateParams, type RunListParams as RunListParams, type RunGetParams as RunGetParams, type RunResultParams as RunResultParams, type RunStreamEventsParams as RunStreamEventsParams, };
810
+ }
811
+ //# sourceMappingURL=agents.d.mts.map