@nimble-way/nimble-js 0.19.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 (82) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.json +1 -1
  3. package/resources/agent.d.mts +9 -26
  4. package/resources/agent.d.mts.map +1 -1
  5. package/resources/agent.d.ts +9 -26
  6. package/resources/agent.d.ts.map +1 -1
  7. package/resources/agent.js +4 -21
  8. package/resources/agent.js.map +1 -1
  9. package/resources/agent.mjs +4 -21
  10. package/resources/agent.mjs.map +1 -1
  11. package/resources/jobs/jobs.d.mts +18 -6
  12. package/resources/jobs/jobs.d.mts.map +1 -1
  13. package/resources/jobs/jobs.d.ts +18 -6
  14. package/resources/jobs/jobs.d.ts.map +1 -1
  15. package/resources/jobs/jobs.js +12 -0
  16. package/resources/jobs/jobs.js.map +1 -1
  17. package/resources/jobs/jobs.mjs +12 -0
  18. package/resources/jobs/jobs.mjs.map +1 -1
  19. package/resources/jobs/runs/artifacts.d.mts +11 -13
  20. package/resources/jobs/runs/artifacts.d.mts.map +1 -1
  21. package/resources/jobs/runs/artifacts.d.ts +11 -13
  22. package/resources/jobs/runs/artifacts.d.ts.map +1 -1
  23. package/resources/jobs/runs/artifacts.js +8 -0
  24. package/resources/jobs/runs/artifacts.js.map +1 -1
  25. package/resources/jobs/runs/artifacts.mjs +8 -0
  26. package/resources/jobs/runs/artifacts.mjs.map +1 -1
  27. package/resources/jobs/runs/runs.d.mts +12 -6
  28. package/resources/jobs/runs/runs.d.mts.map +1 -1
  29. package/resources/jobs/runs/runs.d.ts +12 -6
  30. package/resources/jobs/runs/runs.d.ts.map +1 -1
  31. package/resources/jobs/runs/runs.js +6 -0
  32. package/resources/jobs/runs/runs.js.map +1 -1
  33. package/resources/jobs/runs/runs.mjs +6 -0
  34. package/resources/jobs/runs/runs.mjs.map +1 -1
  35. package/resources/task-agent/index.d.mts +1 -1
  36. package/resources/task-agent/index.d.mts.map +1 -1
  37. package/resources/task-agent/index.d.ts +1 -1
  38. package/resources/task-agent/index.d.ts.map +1 -1
  39. package/resources/task-agent/index.js.map +1 -1
  40. package/resources/task-agent/index.mjs.map +1 -1
  41. package/resources/task-agent/runs.d.mts +246 -110
  42. package/resources/task-agent/runs.d.mts.map +1 -1
  43. package/resources/task-agent/runs.d.ts +246 -110
  44. package/resources/task-agent/runs.d.ts.map +1 -1
  45. package/resources/task-agent/runs.js +12 -14
  46. package/resources/task-agent/runs.js.map +1 -1
  47. package/resources/task-agent/runs.mjs +12 -14
  48. package/resources/task-agent/runs.mjs.map +1 -1
  49. package/resources/task-agent/task-agent.d.mts +557 -65
  50. package/resources/task-agent/task-agent.d.mts.map +1 -1
  51. package/resources/task-agent/task-agent.d.ts +557 -65
  52. package/resources/task-agent/task-agent.d.ts.map +1 -1
  53. package/resources/task-agent/task-agent.js +12 -0
  54. package/resources/task-agent/task-agent.js.map +1 -1
  55. package/resources/task-agent/task-agent.mjs +12 -0
  56. package/resources/task-agent/task-agent.mjs.map +1 -1
  57. package/resources/task-agent/templates.d.mts +167 -13
  58. package/resources/task-agent/templates.d.mts.map +1 -1
  59. package/resources/task-agent/templates.d.ts +167 -13
  60. package/resources/task-agent/templates.d.ts.map +1 -1
  61. package/resources/task-agent/templates.js +4 -0
  62. package/resources/task-agent/templates.js.map +1 -1
  63. package/resources/task-agent/templates.mjs +4 -0
  64. package/resources/task-agent/templates.mjs.map +1 -1
  65. package/resources/top-level.d.mts +0 -6
  66. package/resources/top-level.d.mts.map +1 -1
  67. package/resources/top-level.d.ts +0 -6
  68. package/resources/top-level.d.ts.map +1 -1
  69. package/src/resources/agent.ts +10 -27
  70. package/src/resources/jobs/jobs.ts +18 -6
  71. package/src/resources/jobs/runs/artifacts.ts +11 -13
  72. package/src/resources/jobs/runs/runs.ts +12 -6
  73. package/src/resources/task-agent/index.ts +0 -2
  74. package/src/resources/task-agent/runs.ts +251 -129
  75. package/src/resources/task-agent/task-agent.ts +559 -79
  76. package/src/resources/task-agent/templates.ts +170 -15
  77. package/src/resources/top-level.ts +0 -5
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -3,7 +3,6 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as RunsAPI from './runs';
5
5
  import {
6
- RunCancelParams,
7
6
  RunGetParams,
8
7
  RunGetResponse,
9
8
  RunGetResultParams,
@@ -11,7 +10,6 @@ import {
11
10
  RunListParams,
12
11
  RunListResponse,
13
12
  RunStreamEventsParams,
14
- RunStreamEventsResponse,
15
13
  Runs,
16
14
  } from './runs';
17
15
  import * as TemplatesAPI from './templates';
@@ -29,6 +27,8 @@ export class TaskAgent extends APIResource {
29
27
  * Create a Web Search Agent instance.
30
28
  *
31
29
  * `account_id` is JWT-derived and never read from the request body.
30
+ *
31
+ * @deprecated
32
32
  */
33
33
  create(body: TaskAgentCreateParams, options?: RequestOptions): APIPromise<TaskAgentCreateResponse> {
34
34
  return this._client.post('/v1/task-agents', { body, ...options });
@@ -36,6 +36,8 @@ export class TaskAgent extends APIResource {
36
36
 
37
37
  /**
38
38
  * Update Agent
39
+ *
40
+ * @deprecated
39
41
  */
40
42
  update(
41
43
  agentID: string,
@@ -51,6 +53,8 @@ export class TaskAgent extends APIResource {
51
53
  *
52
54
  * Callers are strictly scoped to their (account, workspace). If `workspace_id` is
53
55
  * omitted, the user's default workspace is used.
56
+ *
57
+ * @deprecated
54
58
  */
55
59
  list(
56
60
  query: TaskAgentListParams | null | undefined = {},
@@ -61,6 +65,8 @@ export class TaskAgent extends APIResource {
61
65
 
62
66
  /**
63
67
  * Deactivate Agent
68
+ *
69
+ * @deprecated
64
70
  */
65
71
  deactivate(agentID: string, options?: RequestOptions): APIPromise<void> {
66
72
  return this._client.delete(path`/v1/task-agents/${agentID}`, {
@@ -71,6 +77,8 @@ export class TaskAgent extends APIResource {
71
77
 
72
78
  /**
73
79
  * Get Agent
80
+ *
81
+ * @deprecated
74
82
  */
75
83
  get(agentID: string, options?: RequestOptions): APIPromise<TaskAgentGetResponse> {
76
84
  return this._client.get(path`/v1/task-agents/${agentID}`, options);
@@ -78,6 +86,8 @@ export class TaskAgent extends APIResource {
78
86
 
79
87
  /**
80
88
  * Create a research run for a Web Search Agent instance.
89
+ *
90
+ * @deprecated
81
91
  */
82
92
  run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
83
93
  return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
@@ -85,411 +95,783 @@ export class TaskAgent extends APIResource {
85
95
  }
86
96
 
87
97
  export interface TaskAgentCreateResponse {
98
+ /**
99
+ * Unique web search agent identifier (wsa\_<uuid>).
100
+ */
88
101
  id: string;
89
102
 
103
+ /**
104
+ * When the agent was created.
105
+ */
90
106
  created_at: string;
91
107
 
108
+ /**
109
+ * Agent description shown to users.
110
+ */
92
111
  description: string;
93
112
 
113
+ /**
114
+ * Human-friendly agent name shown to users.
115
+ */
94
116
  display_name: string;
95
117
 
118
+ /**
119
+ * Domain expertise or operating context for the agent.
120
+ */
96
121
  domain_expertise: string;
97
122
 
98
123
  /**
99
- * Canonical effort tier names for the research graph.
124
+ * Default effort level for this agent's runs.
100
125
  */
101
126
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
102
127
 
128
+ /**
129
+ * Ordered goals for the agent to follow.
130
+ */
103
131
  goals: Array<TaskAgentCreateResponse.Goal>;
104
132
 
133
+ /**
134
+ * Icon identifier used when presenting the agent.
135
+ */
105
136
  icon: string;
106
137
 
138
+ /**
139
+ * Whether the agent can be used to start new runs.
140
+ */
107
141
  is_active: boolean;
108
142
 
143
+ /**
144
+ * JSON schema describing the structured output the agent should produce.
145
+ */
109
146
  output_schema: { [key: string]: unknown } | null;
110
147
 
111
148
  /**
112
- * Response variant of AgentSources — preserves per-row id on allow rows.
149
+ * Source guidance for the agent.
113
150
  */
114
151
  sources: TaskAgentCreateResponse.Sources;
115
152
 
153
+ /**
154
+ * Suggested prompts users can run with this agent.
155
+ */
116
156
  suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
117
157
 
158
+ /**
159
+ * When the agent was last updated.
160
+ */
118
161
  updated_at: string;
119
162
 
163
+ /**
164
+ * Primary use case supported by the agent.
165
+ */
120
166
  use_case: 'research' | 'enrichment' | 'dataset_building';
121
167
 
122
- account_id?: string | null;
123
-
168
+ /**
169
+ * Stable agent name.
170
+ */
124
171
  agent_name?: string | null;
125
-
126
- workspace_id?: string | null;
127
172
  }
128
173
 
129
174
  export namespace TaskAgentCreateResponse {
130
175
  export interface Goal {
176
+ /**
177
+ * Unique goal identifier (wsag\_<uuid>).
178
+ */
131
179
  id: string;
132
180
 
181
+ /**
182
+ * Goal text.
183
+ */
133
184
  goal: string;
134
185
 
186
+ /**
187
+ * Zero-based goal position.
188
+ */
135
189
  order: number;
136
190
  }
137
191
 
138
192
  /**
139
- * Response variant of AgentSources — preserves per-row id on allow rows.
193
+ * Source guidance for the agent.
140
194
  */
141
195
  export interface Sources {
196
+ /**
197
+ * Source groups the agent is allowed to use.
198
+ */
142
199
  allow?: Array<Sources.Allow>;
143
200
 
201
+ /**
202
+ * Free-text guidance describing sources or domains to avoid.
203
+ */
144
204
  avoid?: string | null;
145
205
 
206
+ /**
207
+ * Source groups the agent should not use.
208
+ */
146
209
  block?: Array<Sources.Block>;
147
210
 
211
+ /**
212
+ * Free-text guidance describing sources or domains to prioritize.
213
+ */
148
214
  prioritize?: string | null;
149
215
  }
150
216
 
151
217
  export namespace Sources {
152
218
  export interface Allow {
219
+ /**
220
+ * Unique source group identifier (wsas\_<uuid>).
221
+ */
153
222
  id: string;
154
223
 
224
+ /**
225
+ * Domains included in this source group.
226
+ */
155
227
  domains: Array<string>;
156
228
 
229
+ /**
230
+ * Zero-based source group position.
231
+ */
157
232
  order: number;
158
233
 
234
+ /**
235
+ * Source group title.
236
+ */
159
237
  title: string;
160
238
  }
161
239
 
162
- /**
163
- * Lenient response shape — domains are plain strings (no re-validation).
164
- */
165
240
  export interface Block {
241
+ /**
242
+ * Unique source group identifier (wsas\_<uuid>).
243
+ */
244
+ id: string;
245
+
246
+ /**
247
+ * Domains included in this source group.
248
+ */
166
249
  domains: Array<string>;
167
250
 
251
+ /**
252
+ * Zero-based source group position.
253
+ */
168
254
  order: number;
169
255
 
256
+ /**
257
+ * Source group title.
258
+ */
170
259
  title: string;
171
260
  }
172
261
  }
173
262
 
174
263
  export interface SuggestedQuestion {
264
+ /**
265
+ * Unique suggested question identifier (wsasq\_<uuid>).
266
+ */
175
267
  id: string;
176
268
 
269
+ /**
270
+ * Zero-based suggested question position.
271
+ */
177
272
  order: number;
178
273
 
274
+ /**
275
+ * Suggested prompt text.
276
+ */
179
277
  question: string;
180
278
  }
181
279
  }
182
280
 
183
281
  export interface TaskAgentUpdateResponse {
282
+ /**
283
+ * Unique web search agent identifier (wsa\_<uuid>).
284
+ */
184
285
  id: string;
185
286
 
287
+ /**
288
+ * When the agent was created.
289
+ */
186
290
  created_at: string;
187
291
 
292
+ /**
293
+ * Agent description shown to users.
294
+ */
188
295
  description: string;
189
296
 
297
+ /**
298
+ * Human-friendly agent name shown to users.
299
+ */
190
300
  display_name: string;
191
301
 
302
+ /**
303
+ * Domain expertise or operating context for the agent.
304
+ */
192
305
  domain_expertise: string;
193
306
 
194
307
  /**
195
- * Canonical effort tier names for the research graph.
308
+ * Default effort level for this agent's runs.
196
309
  */
197
310
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
198
311
 
312
+ /**
313
+ * Ordered goals for the agent to follow.
314
+ */
199
315
  goals: Array<TaskAgentUpdateResponse.Goal>;
200
316
 
317
+ /**
318
+ * Icon identifier used when presenting the agent.
319
+ */
201
320
  icon: string;
202
321
 
322
+ /**
323
+ * Whether the agent can be used to start new runs.
324
+ */
203
325
  is_active: boolean;
204
326
 
327
+ /**
328
+ * JSON schema describing the structured output the agent should produce.
329
+ */
205
330
  output_schema: { [key: string]: unknown } | null;
206
331
 
207
332
  /**
208
- * Response variant of AgentSources — preserves per-row id on allow rows.
333
+ * Source guidance for the agent.
209
334
  */
210
335
  sources: TaskAgentUpdateResponse.Sources;
211
336
 
337
+ /**
338
+ * Suggested prompts users can run with this agent.
339
+ */
212
340
  suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
213
341
 
342
+ /**
343
+ * When the agent was last updated.
344
+ */
214
345
  updated_at: string;
215
346
 
347
+ /**
348
+ * Primary use case supported by the agent.
349
+ */
216
350
  use_case: 'research' | 'enrichment' | 'dataset_building';
217
351
 
218
- account_id?: string | null;
219
-
352
+ /**
353
+ * Stable agent name.
354
+ */
220
355
  agent_name?: string | null;
221
-
222
- workspace_id?: string | null;
223
356
  }
224
357
 
225
358
  export namespace TaskAgentUpdateResponse {
226
359
  export interface Goal {
360
+ /**
361
+ * Unique goal identifier (wsag\_<uuid>).
362
+ */
227
363
  id: string;
228
364
 
365
+ /**
366
+ * Goal text.
367
+ */
229
368
  goal: string;
230
369
 
370
+ /**
371
+ * Zero-based goal position.
372
+ */
231
373
  order: number;
232
374
  }
233
375
 
234
376
  /**
235
- * Response variant of AgentSources — preserves per-row id on allow rows.
377
+ * Source guidance for the agent.
236
378
  */
237
379
  export interface Sources {
380
+ /**
381
+ * Source groups the agent is allowed to use.
382
+ */
238
383
  allow?: Array<Sources.Allow>;
239
384
 
385
+ /**
386
+ * Free-text guidance describing sources or domains to avoid.
387
+ */
240
388
  avoid?: string | null;
241
389
 
390
+ /**
391
+ * Source groups the agent should not use.
392
+ */
242
393
  block?: Array<Sources.Block>;
243
394
 
395
+ /**
396
+ * Free-text guidance describing sources or domains to prioritize.
397
+ */
244
398
  prioritize?: string | null;
245
399
  }
246
400
 
247
401
  export namespace Sources {
248
402
  export interface Allow {
403
+ /**
404
+ * Unique source group identifier (wsas\_<uuid>).
405
+ */
249
406
  id: string;
250
407
 
408
+ /**
409
+ * Domains included in this source group.
410
+ */
251
411
  domains: Array<string>;
252
412
 
413
+ /**
414
+ * Zero-based source group position.
415
+ */
253
416
  order: number;
254
417
 
418
+ /**
419
+ * Source group title.
420
+ */
255
421
  title: string;
256
422
  }
257
423
 
258
- /**
259
- * Lenient response shape — domains are plain strings (no re-validation).
260
- */
261
424
  export interface Block {
425
+ /**
426
+ * Unique source group identifier (wsas\_<uuid>).
427
+ */
428
+ id: string;
429
+
430
+ /**
431
+ * Domains included in this source group.
432
+ */
262
433
  domains: Array<string>;
263
434
 
435
+ /**
436
+ * Zero-based source group position.
437
+ */
264
438
  order: number;
265
439
 
440
+ /**
441
+ * Source group title.
442
+ */
266
443
  title: string;
267
444
  }
268
445
  }
269
446
 
270
447
  export interface SuggestedQuestion {
448
+ /**
449
+ * Unique suggested question identifier (wsasq\_<uuid>).
450
+ */
271
451
  id: string;
272
452
 
453
+ /**
454
+ * Zero-based suggested question position.
455
+ */
273
456
  order: number;
274
457
 
458
+ /**
459
+ * Suggested prompt text.
460
+ */
275
461
  question: string;
276
462
  }
277
463
  }
278
464
 
279
- export type TaskAgentListResponse = Array<TaskAgentListResponse.TaskAgentListResponseItem>;
465
+ export interface TaskAgentListResponse {
466
+ /**
467
+ * Items returned in this page.
468
+ */
469
+ items: Array<TaskAgentListResponse.Item>;
470
+
471
+ /**
472
+ * Maximum number of items returned.
473
+ */
474
+ limit: number;
475
+
476
+ /**
477
+ * Number of items skipped before this page.
478
+ */
479
+ offset: number;
480
+
481
+ /**
482
+ * Total number of items matching the query.
483
+ */
484
+ total: number;
485
+ }
280
486
 
281
487
  export namespace TaskAgentListResponse {
282
- export interface TaskAgentListResponseItem {
488
+ export interface Item {
489
+ /**
490
+ * Unique web search agent identifier (wsa\_<uuid>).
491
+ */
283
492
  id: string;
284
493
 
494
+ /**
495
+ * When the agent was created.
496
+ */
285
497
  created_at: string;
286
498
 
499
+ /**
500
+ * Agent description shown to users.
501
+ */
287
502
  description: string;
288
503
 
504
+ /**
505
+ * Human-friendly agent name shown to users.
506
+ */
289
507
  display_name: string;
290
508
 
509
+ /**
510
+ * Domain expertise or operating context for the agent.
511
+ */
291
512
  domain_expertise: string;
292
513
 
293
514
  /**
294
- * Canonical effort tier names for the research graph.
515
+ * Default effort level for this agent's runs.
295
516
  */
296
517
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
297
518
 
298
- goals: Array<TaskAgentListResponseItem.Goal>;
519
+ /**
520
+ * Ordered goals for the agent to follow.
521
+ */
522
+ goals: Array<Item.Goal>;
299
523
 
524
+ /**
525
+ * Icon identifier used when presenting the agent.
526
+ */
300
527
  icon: string;
301
528
 
529
+ /**
530
+ * Whether the agent can be used to start new runs.
531
+ */
302
532
  is_active: boolean;
303
533
 
534
+ /**
535
+ * JSON schema describing the structured output the agent should produce.
536
+ */
304
537
  output_schema: { [key: string]: unknown } | null;
305
538
 
306
539
  /**
307
- * Response variant of AgentSources — preserves per-row id on allow rows.
540
+ * Source guidance for the agent.
308
541
  */
309
- sources: TaskAgentListResponseItem.Sources;
542
+ sources: Item.Sources;
310
543
 
311
- suggested_questions: Array<TaskAgentListResponseItem.SuggestedQuestion>;
544
+ /**
545
+ * Suggested prompts users can run with this agent.
546
+ */
547
+ suggested_questions: Array<Item.SuggestedQuestion>;
312
548
 
549
+ /**
550
+ * When the agent was last updated.
551
+ */
313
552
  updated_at: string;
314
553
 
554
+ /**
555
+ * Primary use case supported by the agent.
556
+ */
315
557
  use_case: 'research' | 'enrichment' | 'dataset_building';
316
558
 
317
- account_id?: string | null;
318
-
559
+ /**
560
+ * Stable agent name.
561
+ */
319
562
  agent_name?: string | null;
320
-
321
- workspace_id?: string | null;
322
563
  }
323
564
 
324
- export namespace TaskAgentListResponseItem {
565
+ export namespace Item {
325
566
  export interface Goal {
567
+ /**
568
+ * Unique goal identifier (wsag\_<uuid>).
569
+ */
326
570
  id: string;
327
571
 
572
+ /**
573
+ * Goal text.
574
+ */
328
575
  goal: string;
329
576
 
577
+ /**
578
+ * Zero-based goal position.
579
+ */
330
580
  order: number;
331
581
  }
332
582
 
333
583
  /**
334
- * Response variant of AgentSources — preserves per-row id on allow rows.
584
+ * Source guidance for the agent.
335
585
  */
336
586
  export interface Sources {
587
+ /**
588
+ * Source groups the agent is allowed to use.
589
+ */
337
590
  allow?: Array<Sources.Allow>;
338
591
 
592
+ /**
593
+ * Free-text guidance describing sources or domains to avoid.
594
+ */
339
595
  avoid?: string | null;
340
596
 
597
+ /**
598
+ * Source groups the agent should not use.
599
+ */
341
600
  block?: Array<Sources.Block>;
342
601
 
602
+ /**
603
+ * Free-text guidance describing sources or domains to prioritize.
604
+ */
343
605
  prioritize?: string | null;
344
606
  }
345
607
 
346
608
  export namespace Sources {
347
609
  export interface Allow {
610
+ /**
611
+ * Unique source group identifier (wsas\_<uuid>).
612
+ */
348
613
  id: string;
349
614
 
615
+ /**
616
+ * Domains included in this source group.
617
+ */
350
618
  domains: Array<string>;
351
619
 
620
+ /**
621
+ * Zero-based source group position.
622
+ */
352
623
  order: number;
353
624
 
625
+ /**
626
+ * Source group title.
627
+ */
354
628
  title: string;
355
629
  }
356
630
 
357
- /**
358
- * Lenient response shape — domains are plain strings (no re-validation).
359
- */
360
631
  export interface Block {
632
+ /**
633
+ * Unique source group identifier (wsas\_<uuid>).
634
+ */
635
+ id: string;
636
+
637
+ /**
638
+ * Domains included in this source group.
639
+ */
361
640
  domains: Array<string>;
362
641
 
642
+ /**
643
+ * Zero-based source group position.
644
+ */
363
645
  order: number;
364
646
 
647
+ /**
648
+ * Source group title.
649
+ */
365
650
  title: string;
366
651
  }
367
652
  }
368
653
 
369
654
  export interface SuggestedQuestion {
655
+ /**
656
+ * Unique suggested question identifier (wsasq\_<uuid>).
657
+ */
370
658
  id: string;
371
659
 
660
+ /**
661
+ * Zero-based suggested question position.
662
+ */
372
663
  order: number;
373
664
 
665
+ /**
666
+ * Suggested prompt text.
667
+ */
374
668
  question: string;
375
669
  }
376
670
  }
377
671
  }
378
672
 
379
673
  export interface TaskAgentGetResponse {
674
+ /**
675
+ * Unique web search agent identifier (wsa\_<uuid>).
676
+ */
380
677
  id: string;
381
678
 
679
+ /**
680
+ * When the agent was created.
681
+ */
382
682
  created_at: string;
383
683
 
684
+ /**
685
+ * Agent description shown to users.
686
+ */
384
687
  description: string;
385
688
 
689
+ /**
690
+ * Human-friendly agent name shown to users.
691
+ */
386
692
  display_name: string;
387
693
 
694
+ /**
695
+ * Domain expertise or operating context for the agent.
696
+ */
388
697
  domain_expertise: string;
389
698
 
390
699
  /**
391
- * Canonical effort tier names for the research graph.
700
+ * Default effort level for this agent's runs.
392
701
  */
393
702
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
394
703
 
704
+ /**
705
+ * Ordered goals for the agent to follow.
706
+ */
395
707
  goals: Array<TaskAgentGetResponse.Goal>;
396
708
 
709
+ /**
710
+ * Icon identifier used when presenting the agent.
711
+ */
397
712
  icon: string;
398
713
 
714
+ /**
715
+ * Whether the agent can be used to start new runs.
716
+ */
399
717
  is_active: boolean;
400
718
 
719
+ /**
720
+ * JSON schema describing the structured output the agent should produce.
721
+ */
401
722
  output_schema: { [key: string]: unknown } | null;
402
723
 
403
724
  /**
404
- * Response variant of AgentSources — preserves per-row id on allow rows.
725
+ * Source guidance for the agent.
405
726
  */
406
727
  sources: TaskAgentGetResponse.Sources;
407
728
 
729
+ /**
730
+ * Suggested prompts users can run with this agent.
731
+ */
408
732
  suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
409
733
 
734
+ /**
735
+ * When the agent was last updated.
736
+ */
410
737
  updated_at: string;
411
738
 
739
+ /**
740
+ * Primary use case supported by the agent.
741
+ */
412
742
  use_case: 'research' | 'enrichment' | 'dataset_building';
413
743
 
414
- account_id?: string | null;
415
-
744
+ /**
745
+ * Stable agent name.
746
+ */
416
747
  agent_name?: string | null;
417
-
418
- workspace_id?: string | null;
419
748
  }
420
749
 
421
750
  export namespace TaskAgentGetResponse {
422
751
  export interface Goal {
752
+ /**
753
+ * Unique goal identifier (wsag\_<uuid>).
754
+ */
423
755
  id: string;
424
756
 
757
+ /**
758
+ * Goal text.
759
+ */
425
760
  goal: string;
426
761
 
762
+ /**
763
+ * Zero-based goal position.
764
+ */
427
765
  order: number;
428
766
  }
429
767
 
430
768
  /**
431
- * Response variant of AgentSources — preserves per-row id on allow rows.
769
+ * Source guidance for the agent.
432
770
  */
433
771
  export interface Sources {
772
+ /**
773
+ * Source groups the agent is allowed to use.
774
+ */
434
775
  allow?: Array<Sources.Allow>;
435
776
 
777
+ /**
778
+ * Free-text guidance describing sources or domains to avoid.
779
+ */
436
780
  avoid?: string | null;
437
781
 
782
+ /**
783
+ * Source groups the agent should not use.
784
+ */
438
785
  block?: Array<Sources.Block>;
439
786
 
787
+ /**
788
+ * Free-text guidance describing sources or domains to prioritize.
789
+ */
440
790
  prioritize?: string | null;
441
791
  }
442
792
 
443
793
  export namespace Sources {
444
794
  export interface Allow {
795
+ /**
796
+ * Unique source group identifier (wsas\_<uuid>).
797
+ */
445
798
  id: string;
446
799
 
800
+ /**
801
+ * Domains included in this source group.
802
+ */
447
803
  domains: Array<string>;
448
804
 
805
+ /**
806
+ * Zero-based source group position.
807
+ */
449
808
  order: number;
450
809
 
810
+ /**
811
+ * Source group title.
812
+ */
451
813
  title: string;
452
814
  }
453
815
 
454
- /**
455
- * Lenient response shape — domains are plain strings (no re-validation).
456
- */
457
816
  export interface Block {
817
+ /**
818
+ * Unique source group identifier (wsas\_<uuid>).
819
+ */
820
+ id: string;
821
+
822
+ /**
823
+ * Domains included in this source group.
824
+ */
458
825
  domains: Array<string>;
459
826
 
827
+ /**
828
+ * Zero-based source group position.
829
+ */
460
830
  order: number;
461
831
 
832
+ /**
833
+ * Source group title.
834
+ */
462
835
  title: string;
463
836
  }
464
837
  }
465
838
 
466
839
  export interface SuggestedQuestion {
840
+ /**
841
+ * Unique suggested question identifier (wsasq\_<uuid>).
842
+ */
467
843
  id: string;
468
844
 
845
+ /**
846
+ * Zero-based suggested question position.
847
+ */
469
848
  order: number;
470
849
 
850
+ /**
851
+ * Suggested prompt text.
852
+ */
471
853
  question: string;
472
854
  }
473
855
  }
474
856
 
475
- /**
476
- * Task run status returned by list/create/get endpoints.
477
- */
478
857
  export interface TaskAgentRunResponse {
479
858
  /**
480
859
  * Run identifier, format "task*run*{uuid}".
481
860
  */
482
861
  id: string;
483
862
 
863
+ /**
864
+ * When the run was created.
865
+ */
484
866
  created_at: string;
485
867
 
486
868
  /**
487
- * Canonical effort tier names for the research graph.
869
+ * Effort level used for the run.
488
870
  */
489
871
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
490
872
 
491
873
  /**
492
- * Interaction ID — pass as previous_interaction_id to reuse context.
874
+ * Interaction ID.
493
875
  */
494
876
  interaction_id: string;
495
877
 
@@ -499,38 +881,39 @@ export interface TaskAgentRunResponse {
499
881
  is_active: boolean;
500
882
 
501
883
  /**
502
- * Lowercase status values used in API responses (distinct from the DB-level
503
- * TaskRunStatus enum).
884
+ * Current run status.
504
885
  */
505
886
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
506
887
 
507
888
  /**
508
- * Web Search Agent instance this run belongs to. Every task run is agent-bound
509
- * (see AGENTS-1666). Use this to build the nested URL
510
- * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
889
+ * Web Search Agent instance this run belongs to.
511
890
  */
512
891
  web_search_agent_id: string;
513
892
 
893
+ /**
894
+ * When the run completed.
895
+ */
514
896
  completed_at?: string | null;
515
897
 
516
898
  /**
517
- * Error detail for a failed run.
899
+ * Error details when the run failed.
518
900
  */
519
901
  error?: TaskAgentRunResponse.Error | null;
520
902
 
521
903
  /**
522
- * Original user prompt before enrichment. Populated for Web Search Agent runs.
904
+ * Prompt submitted for the run.
523
905
  */
524
906
  prompt?: string | null;
525
907
 
908
+ /**
909
+ * When the run started executing.
910
+ */
526
911
  started_at?: string | null;
527
-
528
- workspace_id?: string | null;
529
912
  }
530
913
 
531
914
  export namespace TaskAgentRunResponse {
532
915
  /**
533
- * Error detail for a failed run.
916
+ * Error details when the run failed.
534
917
  */
535
918
  export interface Error {
536
919
  /**
@@ -546,32 +929,59 @@ export namespace TaskAgentRunResponse {
546
929
  }
547
930
 
548
931
  export interface TaskAgentCreateParams {
932
+ /**
933
+ * Stable agent name.
934
+ */
549
935
  agent_name?: string | null;
550
936
 
937
+ /**
938
+ * Agent description shown to users.
939
+ */
551
940
  description?: string | null;
552
941
 
942
+ /**
943
+ * Human-friendly agent name shown to users.
944
+ */
553
945
  display_name?: string | null;
554
946
 
947
+ /**
948
+ * Domain expertise or operating context for the agent.
949
+ */
555
950
  domain_expertise?: string | null;
556
951
 
557
952
  /**
558
- * Canonical effort tier names for the research graph.
953
+ * Default effort level for this agent's runs.
559
954
  */
560
955
  effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max';
561
956
 
957
+ /**
958
+ * Ordered goals for the agent to follow.
959
+ */
562
960
  goals?: Array<string>;
563
961
 
962
+ /**
963
+ * Icon identifier used when presenting the agent.
964
+ */
564
965
  icon?: string | null;
565
966
 
967
+ /**
968
+ * Whether the agent can be used to start new runs.
969
+ */
566
970
  is_active?: boolean;
567
971
 
972
+ /**
973
+ * JSON schema describing the structured output the agent should produce.
974
+ */
568
975
  output_schema?: { [key: string]: unknown } | null;
569
976
 
570
977
  /**
571
- * Source preferences for a web search agent instance.
978
+ * Source guidance for the agent.
572
979
  */
573
980
  sources?: TaskAgentCreateParams.Sources;
574
981
 
982
+ /**
983
+ * Suggested prompts users can run with this agent.
984
+ */
575
985
  suggested_questions?: Array<string>;
576
986
 
577
987
  /**
@@ -580,39 +990,70 @@ export interface TaskAgentCreateParams {
580
990
  */
581
991
  template?: string | null;
582
992
 
993
+ /**
994
+ * Primary use case supported by the agent.
995
+ */
583
996
  use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
584
-
585
- workspace_id?: string | null;
586
997
  }
587
998
 
588
999
  export namespace TaskAgentCreateParams {
589
1000
  /**
590
- * Source preferences for a web search agent instance.
1001
+ * Source guidance for the agent.
591
1002
  */
592
1003
  export interface Sources {
1004
+ /**
1005
+ * Source groups the agent is allowed to use.
1006
+ */
593
1007
  allow?: Array<Sources.Allow>;
594
1008
 
1009
+ /**
1010
+ * Free-text guidance describing sources or domains to avoid.
1011
+ */
595
1012
  avoid?: string | null;
596
1013
 
1014
+ /**
1015
+ * Source groups the agent should not use.
1016
+ */
597
1017
  block?: Array<Sources.Block>;
598
1018
 
1019
+ /**
1020
+ * Free-text guidance describing sources or domains to prioritize.
1021
+ */
599
1022
  prioritize?: string | null;
600
1023
  }
601
1024
 
602
1025
  export namespace Sources {
603
1026
  export interface Allow {
1027
+ /**
1028
+ * Domains included in this source group.
1029
+ */
604
1030
  domains: Array<string>;
605
1031
 
1032
+ /**
1033
+ * Source group title.
1034
+ */
606
1035
  title: string;
607
1036
 
1037
+ /**
1038
+ * Zero-based source group position.
1039
+ */
608
1040
  order?: number;
609
1041
  }
610
1042
 
611
1043
  export interface Block {
1044
+ /**
1045
+ * Domains included in this source group.
1046
+ */
612
1047
  domains: Array<string>;
613
1048
 
1049
+ /**
1050
+ * Source group title.
1051
+ */
614
1052
  title: string;
615
1053
 
1054
+ /**
1055
+ * Zero-based source group position.
1056
+ */
616
1057
  order?: number;
617
1058
  }
618
1059
  }
@@ -641,13 +1082,6 @@ export namespace TaskAgentUpdateParams {
641
1082
  }
642
1083
 
643
1084
  export interface TaskAgentListParams {
644
- /**
645
- * Canonical effort tier names for the research graph.
646
- */
647
- filter_effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
648
-
649
- filter_use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
650
-
651
1085
  limit?: number;
652
1086
 
653
1087
  offset?: number;
@@ -656,6 +1090,9 @@ export interface TaskAgentListParams {
656
1090
  }
657
1091
 
658
1092
  export interface TaskAgentRunParams {
1093
+ /**
1094
+ * User prompt or task instructions for the run.
1095
+ */
659
1096
  input: string;
660
1097
 
661
1098
  /**
@@ -663,46 +1100,91 @@ export interface TaskAgentRunParams {
663
1100
  */
664
1101
  effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
665
1102
 
1103
+ /**
1104
+ * Whether to stream run events when supported.
1105
+ */
666
1106
  enable_events?: boolean;
667
1107
 
1108
+ /**
1109
+ * Existing records to ENRICH: a list of partial rows, or a single object,
1110
+ * mirroring output_schema's shape.
1111
+ */
1112
+ input_data?: Array<{ [key: string]: unknown }> | { [key: string]: unknown } | null;
1113
+
1114
+ /**
1115
+ * JSON schema overriding the agent's default structured output for this run.
1116
+ */
668
1117
  output_schema?: { [key: string]: unknown } | null;
669
1118
 
1119
+ /**
1120
+ * Previous interaction identifier used to continue a conversation.
1121
+ */
670
1122
  previous_interaction_id?: string | null;
671
1123
 
672
1124
  /**
673
- * Source preferences for a web search agent instance.
1125
+ * Source guidance overriding the agent default.
674
1126
  */
675
1127
  sources?: TaskAgentRunParams.Sources | null;
676
1128
  }
677
1129
 
678
1130
  export namespace TaskAgentRunParams {
679
1131
  /**
680
- * Source preferences for a web search agent instance.
1132
+ * Source guidance overriding the agent default.
681
1133
  */
682
1134
  export interface Sources {
1135
+ /**
1136
+ * Source groups the agent is allowed to use.
1137
+ */
683
1138
  allow?: Array<Sources.Allow>;
684
1139
 
1140
+ /**
1141
+ * Free-text guidance describing sources or domains to avoid.
1142
+ */
685
1143
  avoid?: string | null;
686
1144
 
1145
+ /**
1146
+ * Source groups the agent should not use.
1147
+ */
687
1148
  block?: Array<Sources.Block>;
688
1149
 
1150
+ /**
1151
+ * Free-text guidance describing sources or domains to prioritize.
1152
+ */
689
1153
  prioritize?: string | null;
690
1154
  }
691
1155
 
692
1156
  export namespace Sources {
693
1157
  export interface Allow {
1158
+ /**
1159
+ * Domains included in this source group.
1160
+ */
694
1161
  domains: Array<string>;
695
1162
 
1163
+ /**
1164
+ * Source group title.
1165
+ */
696
1166
  title: string;
697
1167
 
1168
+ /**
1169
+ * Zero-based source group position.
1170
+ */
698
1171
  order?: number;
699
1172
  }
700
1173
 
701
1174
  export interface Block {
1175
+ /**
1176
+ * Domains included in this source group.
1177
+ */
702
1178
  domains: Array<string>;
703
1179
 
1180
+ /**
1181
+ * Source group title.
1182
+ */
704
1183
  title: string;
705
1184
 
1185
+ /**
1186
+ * Zero-based source group position.
1187
+ */
706
1188
  order?: number;
707
1189
  }
708
1190
  }
@@ -736,9 +1218,7 @@ export declare namespace TaskAgent {
736
1218
  type RunListResponse as RunListResponse,
737
1219
  type RunGetResponse as RunGetResponse,
738
1220
  type RunGetResultResponse as RunGetResultResponse,
739
- type RunStreamEventsResponse as RunStreamEventsResponse,
740
1221
  type RunListParams as RunListParams,
741
- type RunCancelParams as RunCancelParams,
742
1222
  type RunGetParams as RunGetParams,
743
1223
  type RunGetResultParams as RunGetResultParams,
744
1224
  type RunStreamEventsParams as RunStreamEventsParams,