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