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