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