@nimble-way/nimble-js 0.19.0 → 1.0.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 +20 -0
- package/README.md +10 -10
- package/client.d.mts +10 -39
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -39
- package/client.d.ts.map +1 -1
- package/client.js +8 -43
- package/client.js.map +1 -1
- package/client.mjs +8 -43
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +811 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +811 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +67 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +62 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.mts +4 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +4 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/{task-agent → agents}/index.js +3 -3
- package/resources/agents/index.js.map +1 -0
- package/resources/{task-agent → agents}/index.mjs +1 -1
- package/resources/agents/index.mjs.map +1 -0
- package/resources/{task-agent → agents}/runs.d.mts +413 -128
- package/resources/agents/runs.d.mts.map +1 -0
- package/resources/{task-agent → agents}/runs.d.ts +413 -128
- package/resources/agents/runs.d.ts.map +1 -0
- package/resources/agents/runs.js +63 -0
- package/resources/agents/runs.js.map +1 -0
- package/resources/agents/runs.mjs +59 -0
- package/resources/agents/runs.mjs.map +1 -0
- package/resources/agents/templates.d.mts +258 -0
- package/resources/agents/templates.d.mts.map +1 -0
- package/resources/agents/templates.d.ts +258 -0
- package/resources/agents/templates.d.ts.map +1 -0
- package/resources/{task-agent → agents}/templates.js +5 -4
- package/resources/agents/templates.js.map +1 -0
- package/resources/agents/templates.mjs +19 -0
- package/resources/agents/templates.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/{task-agent.js → agents.js} +2 -2
- package/resources/agents.js.map +1 -0
- package/resources/{task-agent.mjs → agents.mjs} +2 -2
- package/resources/agents.mjs.map +1 -0
- package/resources/batches.js +3 -3
- package/resources/batches.mjs +3 -3
- package/resources/crawl.js +4 -4
- package/resources/crawl.mjs +4 -4
- package/resources/domain-knowledge.js +1 -1
- package/resources/domain-knowledge.mjs +1 -1
- package/resources/extract/extract.d.mts +1243 -0
- package/resources/extract/extract.d.mts.map +1 -0
- package/resources/extract/extract.d.ts +1243 -0
- package/resources/extract/extract.d.ts.map +1 -0
- package/resources/extract/extract.js +52 -0
- package/resources/extract/extract.js.map +1 -0
- package/resources/extract/extract.mjs +47 -0
- package/resources/extract/extract.mjs.map +1 -0
- package/resources/extract/index.d.mts +3 -0
- package/resources/extract/index.d.mts.map +1 -0
- package/resources/extract/index.d.ts +3 -0
- package/resources/extract/index.d.ts.map +1 -0
- package/resources/extract/index.js +9 -0
- package/resources/extract/index.js.map +1 -0
- package/resources/extract/index.mjs +4 -0
- package/resources/extract/index.mjs.map +1 -0
- package/resources/extract/templates/generations.d.mts +364 -0
- package/resources/extract/templates/generations.d.mts.map +1 -0
- package/resources/extract/templates/generations.d.ts +364 -0
- package/resources/extract/templates/generations.d.ts.map +1 -0
- package/resources/extract/templates/generations.js +39 -0
- package/resources/extract/templates/generations.js.map +1 -0
- package/resources/extract/templates/generations.mjs +35 -0
- package/resources/extract/templates/generations.mjs.map +1 -0
- package/resources/extract/templates/index.d.mts +4 -0
- package/resources/extract/templates/index.d.mts.map +1 -0
- package/resources/extract/templates/index.d.ts +4 -0
- package/resources/extract/templates/index.d.ts.map +1 -0
- package/resources/extract/templates/index.js +11 -0
- package/resources/extract/templates/index.js.map +1 -0
- package/resources/extract/templates/index.mjs +5 -0
- package/resources/extract/templates/index.mjs.map +1 -0
- package/resources/{agent.d.ts → extract/templates/templates.d.mts} +475 -263
- package/resources/extract/templates/templates.d.mts.map +1 -0
- package/resources/{agent.d.mts → extract/templates/templates.d.ts} +475 -263
- package/resources/extract/templates/templates.d.ts.map +1 -0
- package/resources/extract/templates/templates.js +120 -0
- package/resources/extract/templates/templates.js.map +1 -0
- package/resources/extract/templates/templates.mjs +115 -0
- package/resources/extract/templates/templates.mjs.map +1 -0
- package/resources/extract/templates/versions.d.mts +226 -0
- package/resources/extract/templates/versions.d.mts.map +1 -0
- package/resources/extract/templates/versions.d.ts +226 -0
- package/resources/extract/templates/versions.d.ts.map +1 -0
- package/resources/extract/templates/versions.js +42 -0
- package/resources/extract/templates/versions.js.map +1 -0
- package/resources/extract/templates/versions.mjs +38 -0
- package/resources/extract/templates/versions.mjs.map +1 -0
- package/resources/extract/templates.d.mts +2 -0
- package/resources/extract/templates.d.mts.map +1 -0
- package/resources/extract/templates.d.ts +2 -0
- package/resources/extract/templates.d.ts.map +1 -0
- package/resources/extract/templates.js +6 -0
- package/resources/extract/templates.js.map +1 -0
- package/resources/extract/templates.mjs +3 -0
- package/resources/extract/templates.mjs.map +1 -0
- package/resources/extract.d.mts +2 -0
- package/resources/extract.d.mts.map +1 -0
- package/resources/extract.d.ts +2 -0
- package/resources/extract.d.ts.map +1 -0
- package/resources/extract.js +6 -0
- package/resources/extract.js.map +1 -0
- package/resources/extract.mjs +3 -0
- package/resources/extract.mjs.map +1 -0
- package/resources/fast-serp.js +1 -1
- package/resources/fast-serp.mjs +1 -1
- package/resources/index.d.mts +4 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/jobs/index.d.mts +2 -2
- package/resources/jobs/index.d.mts.map +1 -1
- package/resources/jobs/index.d.ts +2 -2
- package/resources/jobs/index.d.ts.map +1 -1
- package/resources/jobs/index.js.map +1 -1
- package/resources/jobs/index.mjs.map +1 -1
- package/resources/jobs/jobs.d.mts +34 -90
- package/resources/jobs/jobs.d.mts.map +1 -1
- package/resources/jobs/jobs.d.ts +34 -90
- package/resources/jobs/jobs.d.ts.map +1 -1
- package/resources/jobs/jobs.js +10 -16
- package/resources/jobs/jobs.js.map +1 -1
- package/resources/jobs/jobs.mjs +11 -17
- package/resources/jobs/jobs.mjs.map +1 -1
- package/resources/jobs/runs/artifacts.d.mts +7 -17
- package/resources/jobs/runs/artifacts.d.mts.map +1 -1
- package/resources/jobs/runs/artifacts.d.ts +7 -17
- package/resources/jobs/runs/artifacts.d.ts.map +1 -1
- package/resources/jobs/runs/artifacts.js +8 -8
- package/resources/jobs/runs/artifacts.mjs +8 -8
- package/resources/jobs/runs/index.d.mts +1 -1
- package/resources/jobs/runs/index.d.mts.map +1 -1
- package/resources/jobs/runs/index.d.ts +1 -1
- package/resources/jobs/runs/index.d.ts.map +1 -1
- package/resources/jobs/runs/index.js.map +1 -1
- package/resources/jobs/runs/index.mjs.map +1 -1
- package/resources/jobs/runs/runs.d.mts +59 -21
- package/resources/jobs/runs/runs.d.mts.map +1 -1
- package/resources/jobs/runs/runs.d.ts +59 -21
- package/resources/jobs/runs/runs.d.ts.map +1 -1
- package/resources/jobs/runs/runs.js +12 -6
- package/resources/jobs/runs/runs.js.map +1 -1
- package/resources/jobs/runs/runs.mjs +12 -6
- package/resources/jobs/runs/runs.mjs.map +1 -1
- package/resources/media.js +2 -2
- package/resources/media.mjs +2 -2
- package/resources/serp.js +3 -3
- package/resources/serp.mjs +3 -3
- package/resources/tasks.js +3 -3
- package/resources/tasks.mjs +3 -3
- package/resources/top-level.d.mts +1 -1208
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +1 -1208
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +41 -123
- package/src/resources/agents/agents.ts +1039 -0
- package/src/resources/agents/index.ts +30 -0
- package/src/resources/{task-agent → agents}/runs.ts +450 -154
- package/src/resources/agents/templates.ts +324 -0
- package/src/resources/{task-agent.ts → agents.ts} +1 -1
- package/src/resources/batches.ts +3 -3
- package/src/resources/crawl.ts +4 -4
- package/src/resources/domain-knowledge.ts +1 -1
- package/src/resources/extract/extract.ts +5182 -0
- package/src/resources/extract/index.ts +25 -0
- package/src/resources/extract/templates/generations.ts +435 -0
- package/src/resources/extract/templates/index.ts +29 -0
- package/src/resources/extract/templates/templates.ts +1176 -0
- package/src/resources/extract/templates/versions.ts +284 -0
- package/src/resources/extract/templates.ts +3 -0
- package/src/resources/extract.ts +3 -0
- package/src/resources/fast-serp.ts +1 -1
- package/src/resources/index.ts +16 -36
- package/src/resources/jobs/index.ts +1 -1
- package/src/resources/jobs/jobs.ts +49 -112
- package/src/resources/jobs/runs/artifacts.ts +11 -21
- package/src/resources/jobs/runs/index.ts +1 -0
- package/src/resources/jobs/runs/runs.ts +74 -24
- package/src/resources/media.ts +2 -2
- package/src/resources/serp.ts +3 -3
- package/src/resources/tasks.ts +3 -3
- package/src/resources/top-level.ts +88 -5192
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/agent.d.mts.map +0 -1
- package/resources/agent.d.ts.map +0 -1
- package/resources/agent.js +0 -101
- package/resources/agent.js.map +0 -1
- package/resources/agent.mjs +0 -97
- package/resources/agent.mjs.map +0 -1
- package/resources/task-agent/index.d.mts +0 -4
- package/resources/task-agent/index.d.mts.map +0 -1
- package/resources/task-agent/index.d.ts +0 -4
- package/resources/task-agent/index.d.ts.map +0 -1
- package/resources/task-agent/index.js.map +0 -1
- package/resources/task-agent/index.mjs.map +0 -1
- package/resources/task-agent/runs.d.mts.map +0 -1
- package/resources/task-agent/runs.d.ts.map +0 -1
- package/resources/task-agent/runs.js +0 -65
- package/resources/task-agent/runs.js.map +0 -1
- package/resources/task-agent/runs.mjs +0 -61
- package/resources/task-agent/runs.mjs.map +0 -1
- package/resources/task-agent/task-agent.d.mts +0 -481
- package/resources/task-agent/task-agent.d.mts.map +0 -1
- package/resources/task-agent/task-agent.d.ts +0 -481
- package/resources/task-agent/task-agent.d.ts.map +0 -1
- package/resources/task-agent/task-agent.js +0 -68
- package/resources/task-agent/task-agent.js.map +0 -1
- package/resources/task-agent/task-agent.mjs +0 -63
- package/resources/task-agent/task-agent.mjs.map +0 -1
- package/resources/task-agent/templates.d.mts +0 -107
- package/resources/task-agent/templates.d.mts.map +0 -1
- package/resources/task-agent/templates.d.ts +0 -107
- package/resources/task-agent/templates.d.ts.map +0 -1
- package/resources/task-agent/templates.js.map +0 -1
- package/resources/task-agent/templates.mjs +0 -18
- package/resources/task-agent/templates.mjs.map +0 -1
- package/resources/task-agent.d.mts +0 -2
- package/resources/task-agent.d.mts.map +0 -1
- package/resources/task-agent.d.ts +0 -2
- package/resources/task-agent.d.ts.map +0 -1
- package/resources/task-agent.js.map +0 -1
- package/resources/task-agent.mjs.map +0 -1
- package/src/resources/agent.ts +0 -952
- package/src/resources/task-agent/index.ts +0 -32
- package/src/resources/task-agent/task-agent.ts +0 -746
- package/src/resources/task-agent/templates.ts +0 -172
|
@@ -1,746 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as RunsAPI from './runs';
|
|
5
|
-
import {
|
|
6
|
-
RunCancelParams,
|
|
7
|
-
RunGetParams,
|
|
8
|
-
RunGetResponse,
|
|
9
|
-
RunGetResultParams,
|
|
10
|
-
RunGetResultResponse,
|
|
11
|
-
RunListParams,
|
|
12
|
-
RunListResponse,
|
|
13
|
-
RunStreamEventsParams,
|
|
14
|
-
RunStreamEventsResponse,
|
|
15
|
-
Runs,
|
|
16
|
-
} from './runs';
|
|
17
|
-
import * as TemplatesAPI from './templates';
|
|
18
|
-
import { TemplateGetResponse, TemplateListParams, TemplateListResponse, Templates } from './templates';
|
|
19
|
-
import { APIPromise } from '../../core/api-promise';
|
|
20
|
-
import { buildHeaders } from '../../internal/headers';
|
|
21
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
22
|
-
import { path } from '../../internal/utils/path';
|
|
23
|
-
|
|
24
|
-
export class TaskAgent extends APIResource {
|
|
25
|
-
templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
|
|
26
|
-
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Create a Web Search Agent instance.
|
|
30
|
-
*
|
|
31
|
-
* `account_id` is JWT-derived and never read from the request body.
|
|
32
|
-
*/
|
|
33
|
-
create(body: TaskAgentCreateParams, options?: RequestOptions): APIPromise<TaskAgentCreateResponse> {
|
|
34
|
-
return this._client.post('/v1/task-agents', { body, ...options });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Update Agent
|
|
39
|
-
*/
|
|
40
|
-
update(
|
|
41
|
-
agentID: string,
|
|
42
|
-
params: TaskAgentUpdateParams,
|
|
43
|
-
options?: RequestOptions,
|
|
44
|
-
): APIPromise<TaskAgentUpdateResponse> {
|
|
45
|
-
const { body } = params;
|
|
46
|
-
return this._client.patch(path`/v1/task-agents/${agentID}`, { body: body, ...options });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* List Web Search Agent instances.
|
|
51
|
-
*
|
|
52
|
-
* Callers are strictly scoped to their (account, workspace). If `workspace_id` is
|
|
53
|
-
* omitted, the user's default workspace is used.
|
|
54
|
-
*/
|
|
55
|
-
list(
|
|
56
|
-
query: TaskAgentListParams | null | undefined = {},
|
|
57
|
-
options?: RequestOptions,
|
|
58
|
-
): APIPromise<TaskAgentListResponse> {
|
|
59
|
-
return this._client.get('/v1/task-agents', { query, ...options });
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Deactivate Agent
|
|
64
|
-
*/
|
|
65
|
-
deactivate(agentID: string, options?: RequestOptions): APIPromise<void> {
|
|
66
|
-
return this._client.delete(path`/v1/task-agents/${agentID}`, {
|
|
67
|
-
...options,
|
|
68
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Get Agent
|
|
74
|
-
*/
|
|
75
|
-
get(agentID: string, options?: RequestOptions): APIPromise<TaskAgentGetResponse> {
|
|
76
|
-
return this._client.get(path`/v1/task-agents/${agentID}`, options);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Create a research run for a Web Search Agent instance.
|
|
81
|
-
*/
|
|
82
|
-
run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
|
|
83
|
-
return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface TaskAgentCreateResponse {
|
|
88
|
-
id: string;
|
|
89
|
-
|
|
90
|
-
created_at: string;
|
|
91
|
-
|
|
92
|
-
description: string;
|
|
93
|
-
|
|
94
|
-
display_name: string;
|
|
95
|
-
|
|
96
|
-
domain_expertise: string;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Canonical effort tier names for the research graph.
|
|
100
|
-
*/
|
|
101
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
102
|
-
|
|
103
|
-
goals: Array<TaskAgentCreateResponse.Goal>;
|
|
104
|
-
|
|
105
|
-
icon: string;
|
|
106
|
-
|
|
107
|
-
is_active: boolean;
|
|
108
|
-
|
|
109
|
-
output_schema: { [key: string]: unknown } | null;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
113
|
-
*/
|
|
114
|
-
sources: TaskAgentCreateResponse.Sources;
|
|
115
|
-
|
|
116
|
-
suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
|
|
117
|
-
|
|
118
|
-
updated_at: string;
|
|
119
|
-
|
|
120
|
-
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
121
|
-
|
|
122
|
-
account_id?: string | null;
|
|
123
|
-
|
|
124
|
-
agent_name?: string | null;
|
|
125
|
-
|
|
126
|
-
workspace_id?: string | null;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export namespace TaskAgentCreateResponse {
|
|
130
|
-
export interface Goal {
|
|
131
|
-
id: string;
|
|
132
|
-
|
|
133
|
-
goal: string;
|
|
134
|
-
|
|
135
|
-
order: number;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
140
|
-
*/
|
|
141
|
-
export interface Sources {
|
|
142
|
-
allow?: Array<Sources.Allow>;
|
|
143
|
-
|
|
144
|
-
avoid?: string | null;
|
|
145
|
-
|
|
146
|
-
block?: Array<Sources.Block>;
|
|
147
|
-
|
|
148
|
-
prioritize?: string | null;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export namespace Sources {
|
|
152
|
-
export interface Allow {
|
|
153
|
-
id: string;
|
|
154
|
-
|
|
155
|
-
domains: Array<string>;
|
|
156
|
-
|
|
157
|
-
order: number;
|
|
158
|
-
|
|
159
|
-
title: string;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Lenient response shape — domains are plain strings (no re-validation).
|
|
164
|
-
*/
|
|
165
|
-
export interface Block {
|
|
166
|
-
domains: Array<string>;
|
|
167
|
-
|
|
168
|
-
order: number;
|
|
169
|
-
|
|
170
|
-
title: string;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export interface SuggestedQuestion {
|
|
175
|
-
id: string;
|
|
176
|
-
|
|
177
|
-
order: number;
|
|
178
|
-
|
|
179
|
-
question: string;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface TaskAgentUpdateResponse {
|
|
184
|
-
id: string;
|
|
185
|
-
|
|
186
|
-
created_at: string;
|
|
187
|
-
|
|
188
|
-
description: string;
|
|
189
|
-
|
|
190
|
-
display_name: string;
|
|
191
|
-
|
|
192
|
-
domain_expertise: string;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Canonical effort tier names for the research graph.
|
|
196
|
-
*/
|
|
197
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
198
|
-
|
|
199
|
-
goals: Array<TaskAgentUpdateResponse.Goal>;
|
|
200
|
-
|
|
201
|
-
icon: string;
|
|
202
|
-
|
|
203
|
-
is_active: boolean;
|
|
204
|
-
|
|
205
|
-
output_schema: { [key: string]: unknown } | null;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
209
|
-
*/
|
|
210
|
-
sources: TaskAgentUpdateResponse.Sources;
|
|
211
|
-
|
|
212
|
-
suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
|
|
213
|
-
|
|
214
|
-
updated_at: string;
|
|
215
|
-
|
|
216
|
-
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
217
|
-
|
|
218
|
-
account_id?: string | null;
|
|
219
|
-
|
|
220
|
-
agent_name?: string | null;
|
|
221
|
-
|
|
222
|
-
workspace_id?: string | null;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export namespace TaskAgentUpdateResponse {
|
|
226
|
-
export interface Goal {
|
|
227
|
-
id: string;
|
|
228
|
-
|
|
229
|
-
goal: string;
|
|
230
|
-
|
|
231
|
-
order: number;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
236
|
-
*/
|
|
237
|
-
export interface Sources {
|
|
238
|
-
allow?: Array<Sources.Allow>;
|
|
239
|
-
|
|
240
|
-
avoid?: string | null;
|
|
241
|
-
|
|
242
|
-
block?: Array<Sources.Block>;
|
|
243
|
-
|
|
244
|
-
prioritize?: string | null;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export namespace Sources {
|
|
248
|
-
export interface Allow {
|
|
249
|
-
id: string;
|
|
250
|
-
|
|
251
|
-
domains: Array<string>;
|
|
252
|
-
|
|
253
|
-
order: number;
|
|
254
|
-
|
|
255
|
-
title: string;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Lenient response shape — domains are plain strings (no re-validation).
|
|
260
|
-
*/
|
|
261
|
-
export interface Block {
|
|
262
|
-
domains: Array<string>;
|
|
263
|
-
|
|
264
|
-
order: number;
|
|
265
|
-
|
|
266
|
-
title: string;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export interface SuggestedQuestion {
|
|
271
|
-
id: string;
|
|
272
|
-
|
|
273
|
-
order: number;
|
|
274
|
-
|
|
275
|
-
question: string;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export type TaskAgentListResponse = Array<TaskAgentListResponse.TaskAgentListResponseItem>;
|
|
280
|
-
|
|
281
|
-
export namespace TaskAgentListResponse {
|
|
282
|
-
export interface TaskAgentListResponseItem {
|
|
283
|
-
id: string;
|
|
284
|
-
|
|
285
|
-
created_at: string;
|
|
286
|
-
|
|
287
|
-
description: string;
|
|
288
|
-
|
|
289
|
-
display_name: string;
|
|
290
|
-
|
|
291
|
-
domain_expertise: string;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Canonical effort tier names for the research graph.
|
|
295
|
-
*/
|
|
296
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
297
|
-
|
|
298
|
-
goals: Array<TaskAgentListResponseItem.Goal>;
|
|
299
|
-
|
|
300
|
-
icon: string;
|
|
301
|
-
|
|
302
|
-
is_active: boolean;
|
|
303
|
-
|
|
304
|
-
output_schema: { [key: string]: unknown } | null;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
308
|
-
*/
|
|
309
|
-
sources: TaskAgentListResponseItem.Sources;
|
|
310
|
-
|
|
311
|
-
suggested_questions: Array<TaskAgentListResponseItem.SuggestedQuestion>;
|
|
312
|
-
|
|
313
|
-
updated_at: string;
|
|
314
|
-
|
|
315
|
-
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
316
|
-
|
|
317
|
-
account_id?: string | null;
|
|
318
|
-
|
|
319
|
-
agent_name?: string | null;
|
|
320
|
-
|
|
321
|
-
workspace_id?: string | null;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export namespace TaskAgentListResponseItem {
|
|
325
|
-
export interface Goal {
|
|
326
|
-
id: string;
|
|
327
|
-
|
|
328
|
-
goal: string;
|
|
329
|
-
|
|
330
|
-
order: number;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
335
|
-
*/
|
|
336
|
-
export interface Sources {
|
|
337
|
-
allow?: Array<Sources.Allow>;
|
|
338
|
-
|
|
339
|
-
avoid?: string | null;
|
|
340
|
-
|
|
341
|
-
block?: Array<Sources.Block>;
|
|
342
|
-
|
|
343
|
-
prioritize?: string | null;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
export namespace Sources {
|
|
347
|
-
export interface Allow {
|
|
348
|
-
id: string;
|
|
349
|
-
|
|
350
|
-
domains: Array<string>;
|
|
351
|
-
|
|
352
|
-
order: number;
|
|
353
|
-
|
|
354
|
-
title: string;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Lenient response shape — domains are plain strings (no re-validation).
|
|
359
|
-
*/
|
|
360
|
-
export interface Block {
|
|
361
|
-
domains: Array<string>;
|
|
362
|
-
|
|
363
|
-
order: number;
|
|
364
|
-
|
|
365
|
-
title: string;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export interface SuggestedQuestion {
|
|
370
|
-
id: string;
|
|
371
|
-
|
|
372
|
-
order: number;
|
|
373
|
-
|
|
374
|
-
question: string;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export interface TaskAgentGetResponse {
|
|
380
|
-
id: string;
|
|
381
|
-
|
|
382
|
-
created_at: string;
|
|
383
|
-
|
|
384
|
-
description: string;
|
|
385
|
-
|
|
386
|
-
display_name: string;
|
|
387
|
-
|
|
388
|
-
domain_expertise: string;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Canonical effort tier names for the research graph.
|
|
392
|
-
*/
|
|
393
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
394
|
-
|
|
395
|
-
goals: Array<TaskAgentGetResponse.Goal>;
|
|
396
|
-
|
|
397
|
-
icon: string;
|
|
398
|
-
|
|
399
|
-
is_active: boolean;
|
|
400
|
-
|
|
401
|
-
output_schema: { [key: string]: unknown } | null;
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
405
|
-
*/
|
|
406
|
-
sources: TaskAgentGetResponse.Sources;
|
|
407
|
-
|
|
408
|
-
suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
|
|
409
|
-
|
|
410
|
-
updated_at: string;
|
|
411
|
-
|
|
412
|
-
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
413
|
-
|
|
414
|
-
account_id?: string | null;
|
|
415
|
-
|
|
416
|
-
agent_name?: string | null;
|
|
417
|
-
|
|
418
|
-
workspace_id?: string | null;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
export namespace TaskAgentGetResponse {
|
|
422
|
-
export interface Goal {
|
|
423
|
-
id: string;
|
|
424
|
-
|
|
425
|
-
goal: string;
|
|
426
|
-
|
|
427
|
-
order: number;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Response variant of AgentSources — preserves per-row id on allow rows.
|
|
432
|
-
*/
|
|
433
|
-
export interface Sources {
|
|
434
|
-
allow?: Array<Sources.Allow>;
|
|
435
|
-
|
|
436
|
-
avoid?: string | null;
|
|
437
|
-
|
|
438
|
-
block?: Array<Sources.Block>;
|
|
439
|
-
|
|
440
|
-
prioritize?: string | null;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
export namespace Sources {
|
|
444
|
-
export interface Allow {
|
|
445
|
-
id: string;
|
|
446
|
-
|
|
447
|
-
domains: Array<string>;
|
|
448
|
-
|
|
449
|
-
order: number;
|
|
450
|
-
|
|
451
|
-
title: string;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Lenient response shape — domains are plain strings (no re-validation).
|
|
456
|
-
*/
|
|
457
|
-
export interface Block {
|
|
458
|
-
domains: Array<string>;
|
|
459
|
-
|
|
460
|
-
order: number;
|
|
461
|
-
|
|
462
|
-
title: string;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
export interface SuggestedQuestion {
|
|
467
|
-
id: string;
|
|
468
|
-
|
|
469
|
-
order: number;
|
|
470
|
-
|
|
471
|
-
question: string;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Task run status returned by list/create/get endpoints.
|
|
477
|
-
*/
|
|
478
|
-
export interface TaskAgentRunResponse {
|
|
479
|
-
/**
|
|
480
|
-
* Run identifier, format "task*run*{uuid}".
|
|
481
|
-
*/
|
|
482
|
-
id: string;
|
|
483
|
-
|
|
484
|
-
created_at: string;
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Canonical effort tier names for the research graph.
|
|
488
|
-
*/
|
|
489
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* Interaction ID — pass as previous_interaction_id to reuse context.
|
|
493
|
-
*/
|
|
494
|
-
interaction_id: string;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* True while status is 'queued' or 'running'.
|
|
498
|
-
*/
|
|
499
|
-
is_active: boolean;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Lowercase status values used in API responses (distinct from the DB-level
|
|
503
|
-
* TaskRunStatus enum).
|
|
504
|
-
*/
|
|
505
|
-
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
506
|
-
|
|
507
|
-
/**
|
|
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}.
|
|
511
|
-
*/
|
|
512
|
-
web_search_agent_id: string;
|
|
513
|
-
|
|
514
|
-
completed_at?: string | null;
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Error detail for a failed run.
|
|
518
|
-
*/
|
|
519
|
-
error?: TaskAgentRunResponse.Error | null;
|
|
520
|
-
|
|
521
|
-
/**
|
|
522
|
-
* Original user prompt before enrichment. Populated for Web Search Agent runs.
|
|
523
|
-
*/
|
|
524
|
-
prompt?: string | null;
|
|
525
|
-
|
|
526
|
-
started_at?: string | null;
|
|
527
|
-
|
|
528
|
-
workspace_id?: string | null;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
export namespace TaskAgentRunResponse {
|
|
532
|
-
/**
|
|
533
|
-
* Error detail for a failed run.
|
|
534
|
-
*/
|
|
535
|
-
export interface Error {
|
|
536
|
-
/**
|
|
537
|
-
* Human-readable error description.
|
|
538
|
-
*/
|
|
539
|
-
message: string;
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Reference ID (equals the run id).
|
|
543
|
-
*/
|
|
544
|
-
ref_id: string;
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
export interface TaskAgentCreateParams {
|
|
549
|
-
agent_name?: string | null;
|
|
550
|
-
|
|
551
|
-
description?: string | null;
|
|
552
|
-
|
|
553
|
-
display_name?: string | null;
|
|
554
|
-
|
|
555
|
-
domain_expertise?: string | null;
|
|
556
|
-
|
|
557
|
-
/**
|
|
558
|
-
* Canonical effort tier names for the research graph.
|
|
559
|
-
*/
|
|
560
|
-
effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
561
|
-
|
|
562
|
-
goals?: Array<string>;
|
|
563
|
-
|
|
564
|
-
icon?: string | null;
|
|
565
|
-
|
|
566
|
-
is_active?: boolean;
|
|
567
|
-
|
|
568
|
-
output_schema?: { [key: string]: unknown } | null;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* Source preferences for a web search agent instance.
|
|
572
|
-
*/
|
|
573
|
-
sources?: TaskAgentCreateParams.Sources;
|
|
574
|
-
|
|
575
|
-
suggested_questions?: Array<string>;
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Template name to materialize this instance from. When set, the scalar fields and
|
|
579
|
-
* child rows are copied from the template.
|
|
580
|
-
*/
|
|
581
|
-
template?: string | null;
|
|
582
|
-
|
|
583
|
-
use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
|
|
584
|
-
|
|
585
|
-
workspace_id?: string | null;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
export namespace TaskAgentCreateParams {
|
|
589
|
-
/**
|
|
590
|
-
* Source preferences for a web search agent instance.
|
|
591
|
-
*/
|
|
592
|
-
export interface Sources {
|
|
593
|
-
allow?: Array<Sources.Allow>;
|
|
594
|
-
|
|
595
|
-
avoid?: string | null;
|
|
596
|
-
|
|
597
|
-
block?: Array<Sources.Block>;
|
|
598
|
-
|
|
599
|
-
prioritize?: string | null;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
export namespace Sources {
|
|
603
|
-
export interface Allow {
|
|
604
|
-
domains: Array<string>;
|
|
605
|
-
|
|
606
|
-
title: string;
|
|
607
|
-
|
|
608
|
-
order?: number;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
export interface Block {
|
|
612
|
-
domains: Array<string>;
|
|
613
|
-
|
|
614
|
-
title: string;
|
|
615
|
-
|
|
616
|
-
order?: number;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
export interface TaskAgentUpdateParams {
|
|
622
|
-
/**
|
|
623
|
-
* A JSON Patch document per RFC 6902 — a JSON array of patch operations.
|
|
624
|
-
*/
|
|
625
|
-
body: Array<TaskAgentUpdateParams.Body>;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
export namespace TaskAgentUpdateParams {
|
|
629
|
-
/**
|
|
630
|
-
* A single JSON Patch operation per RFC 6902.
|
|
631
|
-
*/
|
|
632
|
-
export interface Body {
|
|
633
|
-
op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
|
|
634
|
-
|
|
635
|
-
path: string;
|
|
636
|
-
|
|
637
|
-
from?: string | null;
|
|
638
|
-
|
|
639
|
-
value?: unknown;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
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
|
-
limit?: number;
|
|
652
|
-
|
|
653
|
-
offset?: number;
|
|
654
|
-
|
|
655
|
-
workspace_id?: string | null;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
export interface TaskAgentRunParams {
|
|
659
|
-
input: string;
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Canonical effort tier names for the research graph.
|
|
663
|
-
*/
|
|
664
|
-
effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
|
|
665
|
-
|
|
666
|
-
enable_events?: boolean;
|
|
667
|
-
|
|
668
|
-
output_schema?: { [key: string]: unknown } | null;
|
|
669
|
-
|
|
670
|
-
previous_interaction_id?: string | null;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Source preferences for a web search agent instance.
|
|
674
|
-
*/
|
|
675
|
-
sources?: TaskAgentRunParams.Sources | null;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
export namespace TaskAgentRunParams {
|
|
679
|
-
/**
|
|
680
|
-
* Source preferences for a web search agent instance.
|
|
681
|
-
*/
|
|
682
|
-
export interface Sources {
|
|
683
|
-
allow?: Array<Sources.Allow>;
|
|
684
|
-
|
|
685
|
-
avoid?: string | null;
|
|
686
|
-
|
|
687
|
-
block?: Array<Sources.Block>;
|
|
688
|
-
|
|
689
|
-
prioritize?: string | null;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
export namespace Sources {
|
|
693
|
-
export interface Allow {
|
|
694
|
-
domains: Array<string>;
|
|
695
|
-
|
|
696
|
-
title: string;
|
|
697
|
-
|
|
698
|
-
order?: number;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
export interface Block {
|
|
702
|
-
domains: Array<string>;
|
|
703
|
-
|
|
704
|
-
title: string;
|
|
705
|
-
|
|
706
|
-
order?: number;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
TaskAgent.Templates = Templates;
|
|
712
|
-
TaskAgent.Runs = Runs;
|
|
713
|
-
|
|
714
|
-
export declare namespace TaskAgent {
|
|
715
|
-
export {
|
|
716
|
-
type TaskAgentCreateResponse as TaskAgentCreateResponse,
|
|
717
|
-
type TaskAgentUpdateResponse as TaskAgentUpdateResponse,
|
|
718
|
-
type TaskAgentListResponse as TaskAgentListResponse,
|
|
719
|
-
type TaskAgentGetResponse as TaskAgentGetResponse,
|
|
720
|
-
type TaskAgentRunResponse as TaskAgentRunResponse,
|
|
721
|
-
type TaskAgentCreateParams as TaskAgentCreateParams,
|
|
722
|
-
type TaskAgentUpdateParams as TaskAgentUpdateParams,
|
|
723
|
-
type TaskAgentListParams as TaskAgentListParams,
|
|
724
|
-
type TaskAgentRunParams as TaskAgentRunParams,
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
export {
|
|
728
|
-
Templates as Templates,
|
|
729
|
-
type TemplateListResponse as TemplateListResponse,
|
|
730
|
-
type TemplateGetResponse as TemplateGetResponse,
|
|
731
|
-
type TemplateListParams as TemplateListParams,
|
|
732
|
-
};
|
|
733
|
-
|
|
734
|
-
export {
|
|
735
|
-
Runs as Runs,
|
|
736
|
-
type RunListResponse as RunListResponse,
|
|
737
|
-
type RunGetResponse as RunGetResponse,
|
|
738
|
-
type RunGetResultResponse as RunGetResultResponse,
|
|
739
|
-
type RunStreamEventsResponse as RunStreamEventsResponse,
|
|
740
|
-
type RunListParams as RunListParams,
|
|
741
|
-
type RunCancelParams as RunCancelParams,
|
|
742
|
-
type RunGetParams as RunGetParams,
|
|
743
|
-
type RunGetResultParams as RunGetResultParams,
|
|
744
|
-
type RunStreamEventsParams as RunStreamEventsParams,
|
|
745
|
-
};
|
|
746
|
-
}
|