@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
@@ -12,6 +12,8 @@ export class Runs extends APIResource {
12
12
  *
13
13
  * `status` accepts a lowercase `TaskRunStatusValue` (e.g. "completed") or a
14
14
  * comma-separated list of them (e.g. "queued,running").
15
+ *
16
+ * @deprecated
15
17
  */
16
18
  list(
17
19
  agentID: string,
@@ -21,26 +23,14 @@ export class Runs extends APIResource {
21
23
  return this._client.get(path`/v1/task-agents/${agentID}/runs`, { query, ...options });
22
24
  }
23
25
 
24
- /**
25
- * Cancel an in-progress or queued run.
26
- *
27
- * Verb is POST + `/cancel` action segment per the AGENTS-1666 spec (replaces the
28
- * old `DELETE …/runs/{run_id}`).
29
- */
30
- cancel(runID: string, params: RunCancelParams, options?: RequestOptions): APIPromise<void> {
31
- const { agent_id } = params;
32
- return this._client.post(path`/v1/task-agents/${agent_id}/runs/${runID}/cancel`, {
33
- ...options,
34
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
35
- });
36
- }
37
-
38
26
  /**
39
27
  * Fetch a run by id, scoped to the instance.
40
28
  *
41
29
  * A run resolves only when (run_id, agent_id) match — otherwise 404. This means a
42
30
  * stale URL with a swapped agent_id won't leak runs across instances even if the
43
31
  * run_id is real.
32
+ *
33
+ * @deprecated
44
34
  */
45
35
  get(runID: string, params: RunGetParams, options?: RequestOptions): APIPromise<RunGetResponse> {
46
36
  const { agent_id } = params;
@@ -56,6 +46,8 @@ export class Runs extends APIResource {
56
46
  * - 408 when the run is still active.
57
47
  * - 422 (with TaskRunFailedResult body) when the run failed or was cancelled.
58
48
  * - 200 (with TaskRunResult body) on success.
49
+ *
50
+ * @deprecated
59
51
  */
60
52
  getResult(
61
53
  runID: string,
@@ -68,45 +60,59 @@ export class Runs extends APIResource {
68
60
 
69
61
  /**
70
62
  * SSE stream of real-time progress events for a run on this instance.
63
+ *
64
+ * @deprecated
71
65
  */
72
- streamEvents(runID: string, params: RunStreamEventsParams, options?: RequestOptions): APIPromise<unknown> {
66
+ streamEvents(runID: string, params: RunStreamEventsParams, options?: RequestOptions): APIPromise<void> {
73
67
  const { agent_id } = params;
74
- return this._client.get(path`/v1/task-agents/${agent_id}/runs/${runID}/events`, options);
68
+ return this._client.get(path`/v1/task-agents/${agent_id}/runs/${runID}/events`, {
69
+ ...options,
70
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
71
+ });
75
72
  }
76
73
  }
77
74
 
78
- /**
79
- * Paginated list of task runs for GET /tasks/runs.
80
- */
81
75
  export interface RunListResponse {
76
+ /**
77
+ * Items returned in this page.
78
+ */
82
79
  items: Array<RunListResponse.Item>;
83
80
 
84
- total: number;
81
+ /**
82
+ * Maximum number of items returned.
83
+ */
84
+ limit: number;
85
85
 
86
- limit?: number;
86
+ /**
87
+ * Number of items skipped before this page.
88
+ */
89
+ offset: number;
87
90
 
88
- offset?: number;
91
+ /**
92
+ * Total number of items matching the query.
93
+ */
94
+ total: number;
89
95
  }
90
96
 
91
97
  export namespace RunListResponse {
92
- /**
93
- * Task run status returned by list/create/get endpoints.
94
- */
95
98
  export interface Item {
96
99
  /**
97
100
  * Run identifier, format "task*run*{uuid}".
98
101
  */
99
102
  id: string;
100
103
 
104
+ /**
105
+ * When the run was created.
106
+ */
101
107
  created_at: string;
102
108
 
103
109
  /**
104
- * Canonical effort tier names for the research graph.
110
+ * Effort level used for the run.
105
111
  */
106
112
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
107
113
 
108
114
  /**
109
- * Interaction ID — pass as previous_interaction_id to reuse context.
115
+ * Interaction ID.
110
116
  */
111
117
  interaction_id: string;
112
118
 
@@ -116,38 +122,39 @@ export namespace RunListResponse {
116
122
  is_active: boolean;
117
123
 
118
124
  /**
119
- * Lowercase status values used in API responses (distinct from the DB-level
120
- * TaskRunStatus enum).
125
+ * Current run status.
121
126
  */
122
127
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
123
128
 
124
129
  /**
125
- * Web Search Agent instance this run belongs to. Every task run is agent-bound
126
- * (see AGENTS-1666). Use this to build the nested URL
127
- * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
130
+ * Web Search Agent instance this run belongs to.
128
131
  */
129
132
  web_search_agent_id: string;
130
133
 
134
+ /**
135
+ * When the run completed.
136
+ */
131
137
  completed_at?: string | null;
132
138
 
133
139
  /**
134
- * Error detail for a failed run.
140
+ * Error details when the run failed.
135
141
  */
136
142
  error?: Item.Error | null;
137
143
 
138
144
  /**
139
- * Original user prompt before enrichment. Populated for Web Search Agent runs.
145
+ * Prompt submitted for the run.
140
146
  */
141
147
  prompt?: string | null;
142
148
 
149
+ /**
150
+ * When the run started executing.
151
+ */
143
152
  started_at?: string | null;
144
-
145
- workspace_id?: string | null;
146
153
  }
147
154
 
148
155
  export namespace Item {
149
156
  /**
150
- * Error detail for a failed run.
157
+ * Error details when the run failed.
151
158
  */
152
159
  export interface Error {
153
160
  /**
@@ -163,24 +170,24 @@ export namespace RunListResponse {
163
170
  }
164
171
  }
165
172
 
166
- /**
167
- * Task run status returned by list/create/get endpoints.
168
- */
169
173
  export interface RunGetResponse {
170
174
  /**
171
175
  * Run identifier, format "task*run*{uuid}".
172
176
  */
173
177
  id: string;
174
178
 
179
+ /**
180
+ * When the run was created.
181
+ */
175
182
  created_at: string;
176
183
 
177
184
  /**
178
- * Canonical effort tier names for the research graph.
185
+ * Effort level used for the run.
179
186
  */
180
187
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
181
188
 
182
189
  /**
183
- * Interaction ID — pass as previous_interaction_id to reuse context.
190
+ * Interaction ID.
184
191
  */
185
192
  interaction_id: string;
186
193
 
@@ -190,38 +197,39 @@ export interface RunGetResponse {
190
197
  is_active: boolean;
191
198
 
192
199
  /**
193
- * Lowercase status values used in API responses (distinct from the DB-level
194
- * TaskRunStatus enum).
200
+ * Current run status.
195
201
  */
196
202
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
197
203
 
198
204
  /**
199
- * Web Search Agent instance this run belongs to. Every task run is agent-bound
200
- * (see AGENTS-1666). Use this to build the nested URL
201
- * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
205
+ * Web Search Agent instance this run belongs to.
202
206
  */
203
207
  web_search_agent_id: string;
204
208
 
209
+ /**
210
+ * When the run completed.
211
+ */
205
212
  completed_at?: string | null;
206
213
 
207
214
  /**
208
- * Error detail for a failed run.
215
+ * Error details when the run failed.
209
216
  */
210
217
  error?: RunGetResponse.Error | null;
211
218
 
212
219
  /**
213
- * Original user prompt before enrichment. Populated for Web Search Agent runs.
220
+ * Prompt submitted for the run.
214
221
  */
215
222
  prompt?: string | null;
216
223
 
224
+ /**
225
+ * When the run started executing.
226
+ */
217
227
  started_at?: string | null;
218
-
219
- workspace_id?: string | null;
220
228
  }
221
229
 
222
230
  export namespace RunGetResponse {
223
231
  /**
224
- * Error detail for a failed run.
232
+ * Error details when the run failed.
225
233
  */
226
234
  export interface Error {
227
235
  /**
@@ -236,72 +244,111 @@ export namespace RunGetResponse {
236
244
  }
237
245
  }
238
246
 
239
- /**
240
- * Response for GET /tasks/runs/{run_id}/result — status 'completed'.
241
- */
242
247
  export type RunGetResultResponse =
243
- | RunGetResultResponse.TaskRunResult
244
- | RunGetResultResponse.TaskRunFailedResult;
248
+ | RunGetResultResponse.TaskRunResultPublicV1
249
+ | RunGetResultResponse.TaskRunFailedResultPublicV1;
245
250
 
246
251
  export namespace RunGetResultResponse {
247
- /**
248
- * Response for GET /tasks/runs/{run_id}/result — status 'completed'.
249
- */
250
- export interface TaskRunResult {
252
+ export interface TaskRunResultPublicV1 {
251
253
  /**
252
254
  * Output from the completed task.
253
255
  */
254
- output: TaskRunResult.TaskRunTextOutput | TaskRunResult.TaskRunJsonOutput;
256
+ output: TaskRunResultPublicV1.TaskRunTextOutputPublicV1 | TaskRunResultPublicV1.TaskRunJsonOutputPublicV1;
255
257
 
256
258
  /**
257
259
  * Task run object with status 'completed'.
258
260
  */
259
- run: TaskRunResult.Run;
261
+ run: TaskRunResultPublicV1.Run;
260
262
  }
261
263
 
262
- export namespace TaskRunResult {
263
- /**
264
- * Text output from a completed task.
265
- */
266
- export interface TaskRunTextOutput {
264
+ export namespace TaskRunResultPublicV1 {
265
+ export interface TaskRunTextOutputPublicV1 {
267
266
  /**
268
267
  * The final prose answer.
269
268
  */
270
269
  content: string;
271
270
 
272
- trust: TaskRunTextOutput.Trust;
271
+ /**
272
+ * Trust and citation metadata for the output.
273
+ */
274
+ trust: TaskRunTextOutputPublicV1.Trust;
273
275
 
276
+ /**
277
+ * Output content type.
278
+ */
274
279
  type?: 'text';
275
280
  }
276
281
 
277
- export namespace TaskRunTextOutput {
282
+ export namespace TaskRunTextOutputPublicV1 {
283
+ /**
284
+ * Trust and citation metadata for the output.
285
+ */
278
286
  export interface Trust {
287
+ /**
288
+ * Per-claim trust, keyed by callout markers in the answer text.
289
+ */
279
290
  claims: Array<Trust.Claim>;
280
291
 
281
- confidence: 'high' | 'medium' | 'low';
292
+ /**
293
+ * Overall confidence in the answer.
294
+ */
295
+ confidence: 'high' | 'medium' | 'low' | 'pre_existing';
282
296
 
297
+ /**
298
+ * Why this confidence level was assigned.
299
+ */
283
300
  reasoning: string;
284
301
 
302
+ /**
303
+ * Sources consulted while producing the answer.
304
+ */
285
305
  sources: Array<Trust.Source>;
286
306
  }
287
307
 
288
308
  export namespace Trust {
309
+ /**
310
+ * Trust metadata for one claim in a prose answer, keyed by callout marker.
311
+ */
289
312
  export interface Claim {
313
+ /**
314
+ * Callout marker number referencing this claim in the answer text.
315
+ */
290
316
  callout: number;
291
317
 
318
+ /**
319
+ * Citations backing this claim.
320
+ */
292
321
  citations: Array<Claim.Citation>;
293
322
 
294
- confidence: 'high' | 'medium' | 'low';
323
+ /**
324
+ * Confidence in this claim.
325
+ */
326
+ confidence: 'high' | 'medium' | 'low' | 'pre_existing';
295
327
 
328
+ /**
329
+ * Why this confidence level was assigned.
330
+ */
296
331
  reasoning: string;
297
332
  }
298
333
 
299
334
  export namespace Claim {
335
+ /**
336
+ * A citation backing a specific claim in the answer.
337
+ */
300
338
  export interface Citation {
339
+ /**
340
+ * URL of the cited page.
341
+ */
301
342
  url: string;
302
343
 
344
+ /**
345
+ * Verbatim excerpts supporting the claim.
346
+ */
303
347
  excerpts?: Array<string> | null;
304
348
 
349
+ /**
350
+ * Extract template used to read the source, when one was used.
351
+ */
305
352
  extract_template_name?: string | null;
306
353
 
307
354
  /**
@@ -328,17 +375,35 @@ export namespace RunGetResultResponse {
328
375
  */
329
376
  source_intent?: 'official' | 'news' | 'social' | 'academic' | 'aggregator' | 'other' | null;
330
377
 
378
+ /**
379
+ * How authoritative the source is: 'primary' or 'secondary'.
380
+ */
331
381
  source_type?: 'primary' | 'secondary' | null;
332
382
 
383
+ /**
384
+ * Title of the cited page.
385
+ */
333
386
  title?: string | null;
334
387
  }
335
388
  }
336
389
 
390
+ /**
391
+ * A source consulted while producing the answer.
392
+ */
337
393
  export interface Source {
394
+ /**
395
+ * How authoritative the source is: 'primary' or 'secondary'.
396
+ */
338
397
  type: 'primary' | 'secondary';
339
398
 
399
+ /**
400
+ * URL of the source page.
401
+ */
340
402
  url: string;
341
403
 
404
+ /**
405
+ * Extract template used to read the source, when one was used.
406
+ */
342
407
  extract_template_name?: string | null;
343
408
 
344
409
  /**
@@ -365,55 +430,101 @@ export namespace RunGetResultResponse {
365
430
  */
366
431
  source_intent?: 'official' | 'news' | 'social' | 'academic' | 'aggregator' | 'other' | null;
367
432
 
433
+ /**
434
+ * Title of the source page.
435
+ */
368
436
  title?: string | null;
369
437
  }
370
438
  }
371
439
  }
372
440
 
373
- /**
374
- * Structured JSON output from a completed task, produced when
375
- * task_spec.output_schema.type is 'json'.
376
- */
377
- export interface TaskRunJsonOutput {
441
+ export interface TaskRunJsonOutputPublicV1 {
378
442
  /**
379
- * Data conforming to the caller-supplied JSON schema. A dict for object schemas; a
380
- * list for array schemas.
443
+ * The final structured output.
381
444
  */
382
445
  content: { [key: string]: unknown } | Array<unknown>;
383
446
 
384
- trust: TaskRunJsonOutput.Trust;
447
+ /**
448
+ * Trust and citation metadata for the output.
449
+ */
450
+ trust: TaskRunJsonOutputPublicV1.Trust;
385
451
 
452
+ /**
453
+ * Output content type.
454
+ */
386
455
  type?: 'json';
387
456
  }
388
457
 
389
- export namespace TaskRunJsonOutput {
458
+ export namespace TaskRunJsonOutputPublicV1 {
459
+ /**
460
+ * Trust and citation metadata for the output.
461
+ */
390
462
  export interface Trust {
463
+ /**
464
+ * Per-value trust, keyed by JSON path in the structured output.
465
+ */
391
466
  claims: Array<Trust.Claim>;
392
467
 
393
- confidence: 'high' | 'medium' | 'low';
468
+ /**
469
+ * Overall confidence in the answer.
470
+ */
471
+ confidence: 'high' | 'medium' | 'low' | 'pre_existing';
394
472
 
473
+ /**
474
+ * Why this confidence level was assigned.
475
+ */
395
476
  reasoning: string;
396
477
 
478
+ /**
479
+ * Sources consulted while producing the answer.
480
+ */
397
481
  sources: Array<Trust.Source>;
398
482
  }
399
483
 
400
484
  export namespace Trust {
485
+ /**
486
+ * Trust metadata for one value in a structured (JSON) answer, keyed by JSON path.
487
+ */
401
488
  export interface Claim {
489
+ /**
490
+ * Citations backing this value.
491
+ */
402
492
  citations: Array<Claim.Citation>;
403
493
 
404
- confidence: 'high' | 'medium' | 'low';
494
+ /**
495
+ * Confidence in this value.
496
+ */
497
+ confidence: 'high' | 'medium' | 'low' | 'pre_existing';
405
498
 
499
+ /**
500
+ * JSON path of the value in the structured output this claim refers to.
501
+ */
406
502
  path: string;
407
503
 
504
+ /**
505
+ * Why this confidence level was assigned.
506
+ */
408
507
  reasoning: string;
409
508
  }
410
509
 
411
510
  export namespace Claim {
511
+ /**
512
+ * A citation backing a specific claim in the answer.
513
+ */
412
514
  export interface Citation {
515
+ /**
516
+ * URL of the cited page.
517
+ */
413
518
  url: string;
414
519
 
520
+ /**
521
+ * Verbatim excerpts supporting the claim.
522
+ */
415
523
  excerpts?: Array<string> | null;
416
524
 
525
+ /**
526
+ * Extract template used to read the source, when one was used.
527
+ */
417
528
  extract_template_name?: string | null;
418
529
 
419
530
  /**
@@ -440,17 +551,35 @@ export namespace RunGetResultResponse {
440
551
  */
441
552
  source_intent?: 'official' | 'news' | 'social' | 'academic' | 'aggregator' | 'other' | null;
442
553
 
554
+ /**
555
+ * How authoritative the source is: 'primary' or 'secondary'.
556
+ */
443
557
  source_type?: 'primary' | 'secondary' | null;
444
558
 
559
+ /**
560
+ * Title of the cited page.
561
+ */
445
562
  title?: string | null;
446
563
  }
447
564
  }
448
565
 
566
+ /**
567
+ * A source consulted while producing the answer.
568
+ */
449
569
  export interface Source {
570
+ /**
571
+ * How authoritative the source is: 'primary' or 'secondary'.
572
+ */
450
573
  type: 'primary' | 'secondary';
451
574
 
575
+ /**
576
+ * URL of the source page.
577
+ */
452
578
  url: string;
453
579
 
580
+ /**
581
+ * Extract template used to read the source, when one was used.
582
+ */
454
583
  extract_template_name?: string | null;
455
584
 
456
585
  /**
@@ -477,6 +606,9 @@ export namespace RunGetResultResponse {
477
606
  */
478
607
  source_intent?: 'official' | 'news' | 'social' | 'academic' | 'aggregator' | 'other' | null;
479
608
 
609
+ /**
610
+ * Title of the source page.
611
+ */
480
612
  title?: string | null;
481
613
  }
482
614
  }
@@ -491,15 +623,18 @@ export namespace RunGetResultResponse {
491
623
  */
492
624
  id: string;
493
625
 
626
+ /**
627
+ * When the run was created.
628
+ */
494
629
  created_at: string;
495
630
 
496
631
  /**
497
- * Canonical effort tier names for the research graph.
632
+ * Effort level used for the run.
498
633
  */
499
634
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
500
635
 
501
636
  /**
502
- * Interaction ID — pass as previous_interaction_id to reuse context.
637
+ * Interaction ID.
503
638
  */
504
639
  interaction_id: string;
505
640
 
@@ -509,38 +644,39 @@ export namespace RunGetResultResponse {
509
644
  is_active: boolean;
510
645
 
511
646
  /**
512
- * Lowercase status values used in API responses (distinct from the DB-level
513
- * TaskRunStatus enum).
647
+ * Current run status.
514
648
  */
515
649
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
516
650
 
517
651
  /**
518
- * Web Search Agent instance this run belongs to. Every task run is agent-bound
519
- * (see AGENTS-1666). Use this to build the nested URL
520
- * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
652
+ * Web Search Agent instance this run belongs to.
521
653
  */
522
654
  web_search_agent_id: string;
523
655
 
656
+ /**
657
+ * When the run completed.
658
+ */
524
659
  completed_at?: string | null;
525
660
 
526
661
  /**
527
- * Error detail for a failed run.
662
+ * Error details when the run failed.
528
663
  */
529
664
  error?: Run.Error | null;
530
665
 
531
666
  /**
532
- * Original user prompt before enrichment. Populated for Web Search Agent runs.
667
+ * Prompt submitted for the run.
533
668
  */
534
669
  prompt?: string | null;
535
670
 
671
+ /**
672
+ * When the run started executing.
673
+ */
536
674
  started_at?: string | null;
537
-
538
- workspace_id?: string | null;
539
675
  }
540
676
 
541
677
  export namespace Run {
542
678
  /**
543
- * Error detail for a failed run.
679
+ * Error details when the run failed.
544
680
  */
545
681
  export interface Error {
546
682
  /**
@@ -556,25 +692,19 @@ export namespace RunGetResultResponse {
556
692
  }
557
693
  }
558
694
 
559
- /**
560
- * Response for GET /tasks/runs/{run_id}/result when the run failed.
561
- *
562
- * Returned with HTTP 422 so callers can distinguish a failed run from a missing
563
- * one (404) or an active one (408).
564
- */
565
- export interface TaskRunFailedResult {
695
+ export interface TaskRunFailedResultPublicV1 {
566
696
  /**
567
697
  * Structured error detail.
568
698
  */
569
- error: TaskRunFailedResult.Error;
699
+ error: TaskRunFailedResultPublicV1.Error;
570
700
 
571
701
  /**
572
702
  * Task run object with status 'failed'.
573
703
  */
574
- run: TaskRunFailedResult.Run;
704
+ run: TaskRunFailedResultPublicV1.Run;
575
705
  }
576
706
 
577
- export namespace TaskRunFailedResult {
707
+ export namespace TaskRunFailedResultPublicV1 {
578
708
  /**
579
709
  * Structured error detail.
580
710
  */
@@ -599,15 +729,18 @@ export namespace RunGetResultResponse {
599
729
  */
600
730
  id: string;
601
731
 
732
+ /**
733
+ * When the run was created.
734
+ */
602
735
  created_at: string;
603
736
 
604
737
  /**
605
- * Canonical effort tier names for the research graph.
738
+ * Effort level used for the run.
606
739
  */
607
740
  effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
608
741
 
609
742
  /**
610
- * Interaction ID — pass as previous_interaction_id to reuse context.
743
+ * Interaction ID.
611
744
  */
612
745
  interaction_id: string;
613
746
 
@@ -617,38 +750,39 @@ export namespace RunGetResultResponse {
617
750
  is_active: boolean;
618
751
 
619
752
  /**
620
- * Lowercase status values used in API responses (distinct from the DB-level
621
- * TaskRunStatus enum).
753
+ * Current run status.
622
754
  */
623
755
  status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
624
756
 
625
757
  /**
626
- * Web Search Agent instance this run belongs to. Every task run is agent-bound
627
- * (see AGENTS-1666). Use this to build the nested URL
628
- * /api/v2/web-search-agents/{web_search_agent_id}/runs/{id}.
758
+ * Web Search Agent instance this run belongs to.
629
759
  */
630
760
  web_search_agent_id: string;
631
761
 
762
+ /**
763
+ * When the run completed.
764
+ */
632
765
  completed_at?: string | null;
633
766
 
634
767
  /**
635
- * Error detail for a failed run.
768
+ * Error details when the run failed.
636
769
  */
637
770
  error?: Run.Error | null;
638
771
 
639
772
  /**
640
- * Original user prompt before enrichment. Populated for Web Search Agent runs.
773
+ * Prompt submitted for the run.
641
774
  */
642
775
  prompt?: string | null;
643
776
 
777
+ /**
778
+ * When the run started executing.
779
+ */
644
780
  started_at?: string | null;
645
-
646
- workspace_id?: string | null;
647
781
  }
648
782
 
649
783
  export namespace Run {
650
784
  /**
651
- * Error detail for a failed run.
785
+ * Error details when the run failed.
652
786
  */
653
787
  export interface Error {
654
788
  /**
@@ -665,20 +799,10 @@ export namespace RunGetResultResponse {
665
799
  }
666
800
  }
667
801
 
668
- export type RunStreamEventsResponse = unknown;
669
-
670
802
  export interface RunListParams {
671
803
  limit?: number;
672
804
 
673
805
  offset?: number;
674
-
675
- q?: string | null;
676
-
677
- status?: string | null;
678
- }
679
-
680
- export interface RunCancelParams {
681
- agent_id: string;
682
806
  }
683
807
 
684
808
  export interface RunGetParams {
@@ -698,9 +822,7 @@ export declare namespace Runs {
698
822
  type RunListResponse as RunListResponse,
699
823
  type RunGetResponse as RunGetResponse,
700
824
  type RunGetResultResponse as RunGetResultResponse,
701
- type RunStreamEventsResponse as RunStreamEventsResponse,
702
825
  type RunListParams as RunListParams,
703
- type RunCancelParams as RunCancelParams,
704
826
  type RunGetParams as RunGetParams,
705
827
  type RunGetResultParams as RunGetResultParams,
706
828
  type RunStreamEventsParams as RunStreamEventsParams,