@nimble-way/nimble-js 0.20.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 +9 -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/{task-agent/task-agent.d.mts → agents/agents.d.mts} +51 -213
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/{task-agent/task-agent.d.ts → agents/agents.d.ts} +51 -213
- 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 +192 -43
- package/resources/agents/runs.d.mts.map +1 -0
- package/resources/{task-agent → agents}/runs.d.ts +192 -43
- 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/{task-agent → agents}/templates.d.mts +3 -6
- package/resources/agents/templates.d.mts.map +1 -0
- package/resources/{task-agent → agents}/templates.d.ts +3 -6
- package/resources/agents/templates.d.ts.map +1 -0
- package/resources/{task-agent → agents}/templates.js +5 -8
- 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/extract/templates/templates.d.mts +870 -0
- package/resources/extract/templates/templates.d.mts.map +1 -0
- package/resources/extract/templates/templates.d.ts +870 -0
- 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 +35 -103
- package/resources/jobs/jobs.d.mts.map +1 -1
- package/resources/jobs/jobs.d.ts +35 -103
- package/resources/jobs/jobs.d.ts.map +1 -1
- package/resources/jobs/jobs.js +10 -28
- package/resources/jobs/jobs.js.map +1 -1
- package/resources/jobs/jobs.mjs +11 -29
- package/resources/jobs/jobs.mjs.map +1 -1
- package/resources/jobs/runs/artifacts.d.mts +4 -12
- package/resources/jobs/runs/artifacts.d.mts.map +1 -1
- package/resources/jobs/runs/artifacts.d.ts +4 -12
- package/resources/jobs/runs/artifacts.d.ts.map +1 -1
- package/resources/jobs/runs/artifacts.js +8 -16
- package/resources/jobs/runs/artifacts.js.map +1 -1
- package/resources/jobs/runs/artifacts.mjs +8 -16
- package/resources/jobs/runs/artifacts.mjs.map +1 -1
- 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 +60 -28
- package/resources/jobs/runs/runs.d.mts.map +1 -1
- package/resources/jobs/runs/runs.d.ts +60 -28
- package/resources/jobs/runs/runs.d.ts.map +1 -1
- package/resources/jobs/runs/runs.js +12 -12
- package/resources/jobs/runs/runs.js.map +1 -1
- package/resources/jobs/runs/runs.mjs +12 -12
- 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 -1202
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +1 -1202
- package/resources/top-level.d.ts.map +1 -1
- package/src/client.ts +41 -123
- package/src/resources/{task-agent/task-agent.ts → agents/agents.ts} +71 -258
- package/src/resources/{task-agent → agents}/index.ts +14 -14
- package/src/resources/{task-agent → agents}/runs.ts +228 -54
- package/src/resources/{task-agent → agents}/templates.ts +5 -8
- 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 +50 -125
- package/src/resources/jobs/runs/artifacts.ts +8 -16
- package/src/resources/jobs/runs/index.ts +1 -0
- package/src/resources/jobs/runs/runs.ts +75 -31
- 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 +72 -5171
- 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 +0 -641
- package/resources/agent.d.mts.map +0 -1
- package/resources/agent.d.ts +0 -641
- package/resources/agent.d.ts.map +0 -1
- package/resources/agent.js +0 -84
- package/resources/agent.js.map +0 -1
- package/resources/agent.mjs +0 -80
- 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 -63
- package/resources/task-agent/runs.js.map +0 -1
- package/resources/task-agent/runs.mjs +0 -59
- package/resources/task-agent/runs.mjs.map +0 -1
- package/resources/task-agent/task-agent.d.mts.map +0 -1
- package/resources/task-agent/task-agent.d.ts.map +0 -1
- package/resources/task-agent/task-agent.js +0 -80
- package/resources/task-agent/task-agent.js.map +0 -1
- package/resources/task-agent/task-agent.mjs +0 -75
- package/resources/task-agent/task-agent.mjs.map +0 -1
- package/resources/task-agent/templates.d.mts.map +0 -1
- 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 -22
- 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 -935
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as RunsAPI from './runs';
|
|
5
5
|
import {
|
|
6
|
+
RunCreateParams,
|
|
7
|
+
RunCreateResponse,
|
|
6
8
|
RunGetParams,
|
|
7
9
|
RunGetResponse,
|
|
8
|
-
RunGetResultParams,
|
|
9
|
-
RunGetResultResponse,
|
|
10
10
|
RunListParams,
|
|
11
11
|
RunListResponse,
|
|
12
|
+
RunResultParams,
|
|
13
|
+
RunResultResponse,
|
|
12
14
|
RunStreamEventsParams,
|
|
13
15
|
Runs,
|
|
14
16
|
} from './runs';
|
|
@@ -19,82 +21,68 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
19
21
|
import { RequestOptions } from '../../internal/request-options';
|
|
20
22
|
import { path } from '../../internal/utils/path';
|
|
21
23
|
|
|
22
|
-
export class
|
|
24
|
+
export class Agents extends APIResource {
|
|
23
25
|
templates: TemplatesAPI.Templates = new TemplatesAPI.Templates(this._client);
|
|
24
26
|
runs: RunsAPI.Runs = new RunsAPI.Runs(this._client);
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
|
-
* Create a Web Search Agent
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @deprecated
|
|
29
|
+
* Create a Web Search Agent. Either pass `template` to materialize a pre-built
|
|
30
|
+
* template (its fields, goals, sources, and suggested questions are copied), or
|
|
31
|
+
* define the agent from scratch with `display_name`, `goals`, `sources`, and an
|
|
32
|
+
* optional `output_schema` for structured results.
|
|
32
33
|
*/
|
|
33
|
-
create(body:
|
|
34
|
-
return this._client.post('/
|
|
34
|
+
create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentCreateResponse> {
|
|
35
|
+
return this._client.post('/v2/agents', { body, ...options });
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
* Update
|
|
39
|
-
*
|
|
40
|
-
*
|
|
39
|
+
* Update an agent with a
|
|
40
|
+
* [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) document — an array
|
|
41
|
+
* of `{op, path, value}` operations applied to the agent, e.g.
|
|
42
|
+
* `[{"op": "replace", "path": "/display_name", "value": "My agent"}]`. Returns the
|
|
43
|
+
* updated agent.
|
|
41
44
|
*/
|
|
42
45
|
update(
|
|
43
46
|
agentID: string,
|
|
44
|
-
params:
|
|
47
|
+
params: AgentUpdateParams,
|
|
45
48
|
options?: RequestOptions,
|
|
46
|
-
): APIPromise<
|
|
49
|
+
): APIPromise<AgentUpdateResponse> {
|
|
47
50
|
const { body } = params;
|
|
48
|
-
return this._client.patch(path`/
|
|
51
|
+
return this._client.patch(path`/v2/agents/${agentID}`, { body: body, ...options });
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
/**
|
|
52
|
-
* List Web Search
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* omitted, the user's default workspace is used.
|
|
56
|
-
*
|
|
57
|
-
* @deprecated
|
|
55
|
+
* List the active Web Search Agents in your account. Results are scoped to the
|
|
56
|
+
* workspace resolved from your token (or the optional `workspace_id` query
|
|
57
|
+
* parameter) and paginated with `offset`/`limit`.
|
|
58
58
|
*/
|
|
59
59
|
list(
|
|
60
|
-
query:
|
|
60
|
+
query: AgentListParams | null | undefined = {},
|
|
61
61
|
options?: RequestOptions,
|
|
62
|
-
): APIPromise<
|
|
63
|
-
return this._client.get('/
|
|
62
|
+
): APIPromise<AgentListResponse> {
|
|
63
|
+
return this._client.get('/v2/agents', { query, ...options });
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Deactivate
|
|
68
|
-
*
|
|
69
|
-
* @deprecated
|
|
67
|
+
* Deactivate an agent. This is a soft delete: the agent can no longer start new
|
|
68
|
+
* runs, but its existing runs and their results remain retrievable.
|
|
70
69
|
*/
|
|
71
|
-
|
|
72
|
-
return this._client.delete(path`/
|
|
70
|
+
delete(agentID: string, options?: RequestOptions): APIPromise<void> {
|
|
71
|
+
return this._client.delete(path`/v2/agents/${agentID}`, {
|
|
73
72
|
...options,
|
|
74
73
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
75
74
|
});
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @deprecated
|
|
78
|
+
* Retrieve a single Web Search Agent by ID.
|
|
82
79
|
*/
|
|
83
|
-
get(agentID: string, options?: RequestOptions): APIPromise<
|
|
84
|
-
return this._client.get(path`/
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Create a research run for a Web Search Agent instance.
|
|
89
|
-
*
|
|
90
|
-
* @deprecated
|
|
91
|
-
*/
|
|
92
|
-
run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
|
|
93
|
-
return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
|
|
80
|
+
get(agentID: string, options?: RequestOptions): APIPromise<AgentGetResponse> {
|
|
81
|
+
return this._client.get(path`/v2/agents/${agentID}`, options);
|
|
94
82
|
}
|
|
95
83
|
}
|
|
96
84
|
|
|
97
|
-
export interface
|
|
85
|
+
export interface AgentCreateResponse {
|
|
98
86
|
/**
|
|
99
87
|
* Unique web search agent identifier (wsa\_<uuid>).
|
|
100
88
|
*/
|
|
@@ -128,7 +116,7 @@ export interface TaskAgentCreateResponse {
|
|
|
128
116
|
/**
|
|
129
117
|
* Ordered goals for the agent to follow.
|
|
130
118
|
*/
|
|
131
|
-
goals: Array<
|
|
119
|
+
goals: Array<AgentCreateResponse.Goal>;
|
|
132
120
|
|
|
133
121
|
/**
|
|
134
122
|
* Icon identifier used when presenting the agent.
|
|
@@ -148,12 +136,12 @@ export interface TaskAgentCreateResponse {
|
|
|
148
136
|
/**
|
|
149
137
|
* Source guidance for the agent.
|
|
150
138
|
*/
|
|
151
|
-
sources:
|
|
139
|
+
sources: AgentCreateResponse.Sources;
|
|
152
140
|
|
|
153
141
|
/**
|
|
154
142
|
* Suggested prompts users can run with this agent.
|
|
155
143
|
*/
|
|
156
|
-
suggested_questions: Array<
|
|
144
|
+
suggested_questions: Array<AgentCreateResponse.SuggestedQuestion>;
|
|
157
145
|
|
|
158
146
|
/**
|
|
159
147
|
* When the agent was last updated.
|
|
@@ -171,7 +159,7 @@ export interface TaskAgentCreateResponse {
|
|
|
171
159
|
agent_name?: string | null;
|
|
172
160
|
}
|
|
173
161
|
|
|
174
|
-
export namespace
|
|
162
|
+
export namespace AgentCreateResponse {
|
|
175
163
|
export interface Goal {
|
|
176
164
|
/**
|
|
177
165
|
* Unique goal identifier (wsag\_<uuid>).
|
|
@@ -278,7 +266,7 @@ export namespace TaskAgentCreateResponse {
|
|
|
278
266
|
}
|
|
279
267
|
}
|
|
280
268
|
|
|
281
|
-
export interface
|
|
269
|
+
export interface AgentUpdateResponse {
|
|
282
270
|
/**
|
|
283
271
|
* Unique web search agent identifier (wsa\_<uuid>).
|
|
284
272
|
*/
|
|
@@ -312,7 +300,7 @@ export interface TaskAgentUpdateResponse {
|
|
|
312
300
|
/**
|
|
313
301
|
* Ordered goals for the agent to follow.
|
|
314
302
|
*/
|
|
315
|
-
goals: Array<
|
|
303
|
+
goals: Array<AgentUpdateResponse.Goal>;
|
|
316
304
|
|
|
317
305
|
/**
|
|
318
306
|
* Icon identifier used when presenting the agent.
|
|
@@ -332,12 +320,12 @@ export interface TaskAgentUpdateResponse {
|
|
|
332
320
|
/**
|
|
333
321
|
* Source guidance for the agent.
|
|
334
322
|
*/
|
|
335
|
-
sources:
|
|
323
|
+
sources: AgentUpdateResponse.Sources;
|
|
336
324
|
|
|
337
325
|
/**
|
|
338
326
|
* Suggested prompts users can run with this agent.
|
|
339
327
|
*/
|
|
340
|
-
suggested_questions: Array<
|
|
328
|
+
suggested_questions: Array<AgentUpdateResponse.SuggestedQuestion>;
|
|
341
329
|
|
|
342
330
|
/**
|
|
343
331
|
* When the agent was last updated.
|
|
@@ -355,7 +343,7 @@ export interface TaskAgentUpdateResponse {
|
|
|
355
343
|
agent_name?: string | null;
|
|
356
344
|
}
|
|
357
345
|
|
|
358
|
-
export namespace
|
|
346
|
+
export namespace AgentUpdateResponse {
|
|
359
347
|
export interface Goal {
|
|
360
348
|
/**
|
|
361
349
|
* Unique goal identifier (wsag\_<uuid>).
|
|
@@ -462,11 +450,11 @@ export namespace TaskAgentUpdateResponse {
|
|
|
462
450
|
}
|
|
463
451
|
}
|
|
464
452
|
|
|
465
|
-
export interface
|
|
453
|
+
export interface AgentListResponse {
|
|
466
454
|
/**
|
|
467
455
|
* Items returned in this page.
|
|
468
456
|
*/
|
|
469
|
-
items: Array<
|
|
457
|
+
items: Array<AgentListResponse.Item>;
|
|
470
458
|
|
|
471
459
|
/**
|
|
472
460
|
* Maximum number of items returned.
|
|
@@ -484,7 +472,7 @@ export interface TaskAgentListResponse {
|
|
|
484
472
|
total: number;
|
|
485
473
|
}
|
|
486
474
|
|
|
487
|
-
export namespace
|
|
475
|
+
export namespace AgentListResponse {
|
|
488
476
|
export interface Item {
|
|
489
477
|
/**
|
|
490
478
|
* Unique web search agent identifier (wsa\_<uuid>).
|
|
@@ -670,7 +658,7 @@ export namespace TaskAgentListResponse {
|
|
|
670
658
|
}
|
|
671
659
|
}
|
|
672
660
|
|
|
673
|
-
export interface
|
|
661
|
+
export interface AgentGetResponse {
|
|
674
662
|
/**
|
|
675
663
|
* Unique web search agent identifier (wsa\_<uuid>).
|
|
676
664
|
*/
|
|
@@ -704,7 +692,7 @@ export interface TaskAgentGetResponse {
|
|
|
704
692
|
/**
|
|
705
693
|
* Ordered goals for the agent to follow.
|
|
706
694
|
*/
|
|
707
|
-
goals: Array<
|
|
695
|
+
goals: Array<AgentGetResponse.Goal>;
|
|
708
696
|
|
|
709
697
|
/**
|
|
710
698
|
* Icon identifier used when presenting the agent.
|
|
@@ -724,12 +712,12 @@ export interface TaskAgentGetResponse {
|
|
|
724
712
|
/**
|
|
725
713
|
* Source guidance for the agent.
|
|
726
714
|
*/
|
|
727
|
-
sources:
|
|
715
|
+
sources: AgentGetResponse.Sources;
|
|
728
716
|
|
|
729
717
|
/**
|
|
730
718
|
* Suggested prompts users can run with this agent.
|
|
731
719
|
*/
|
|
732
|
-
suggested_questions: Array<
|
|
720
|
+
suggested_questions: Array<AgentGetResponse.SuggestedQuestion>;
|
|
733
721
|
|
|
734
722
|
/**
|
|
735
723
|
* When the agent was last updated.
|
|
@@ -747,7 +735,7 @@ export interface TaskAgentGetResponse {
|
|
|
747
735
|
agent_name?: string | null;
|
|
748
736
|
}
|
|
749
737
|
|
|
750
|
-
export namespace
|
|
738
|
+
export namespace AgentGetResponse {
|
|
751
739
|
export interface Goal {
|
|
752
740
|
/**
|
|
753
741
|
* Unique goal identifier (wsag\_<uuid>).
|
|
@@ -854,81 +842,7 @@ export namespace TaskAgentGetResponse {
|
|
|
854
842
|
}
|
|
855
843
|
}
|
|
856
844
|
|
|
857
|
-
export interface
|
|
858
|
-
/**
|
|
859
|
-
* Run identifier, format "task*run*{uuid}".
|
|
860
|
-
*/
|
|
861
|
-
id: string;
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* When the run was created.
|
|
865
|
-
*/
|
|
866
|
-
created_at: string;
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
* Effort level used for the run.
|
|
870
|
-
*/
|
|
871
|
-
effort: 'low' | 'medium' | 'high' | 'x-high' | 'max';
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Interaction ID.
|
|
875
|
-
*/
|
|
876
|
-
interaction_id: string;
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* True while status is 'queued' or 'running'.
|
|
880
|
-
*/
|
|
881
|
-
is_active: boolean;
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* Current run status.
|
|
885
|
-
*/
|
|
886
|
-
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
887
|
-
|
|
888
|
-
/**
|
|
889
|
-
* Web Search Agent instance this run belongs to.
|
|
890
|
-
*/
|
|
891
|
-
web_search_agent_id: string;
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* When the run completed.
|
|
895
|
-
*/
|
|
896
|
-
completed_at?: string | null;
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* Error details when the run failed.
|
|
900
|
-
*/
|
|
901
|
-
error?: TaskAgentRunResponse.Error | null;
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* Prompt submitted for the run.
|
|
905
|
-
*/
|
|
906
|
-
prompt?: string | null;
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* When the run started executing.
|
|
910
|
-
*/
|
|
911
|
-
started_at?: string | null;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
export namespace TaskAgentRunResponse {
|
|
915
|
-
/**
|
|
916
|
-
* Error details when the run failed.
|
|
917
|
-
*/
|
|
918
|
-
export interface Error {
|
|
919
|
-
/**
|
|
920
|
-
* Human-readable error description.
|
|
921
|
-
*/
|
|
922
|
-
message: string;
|
|
923
|
-
|
|
924
|
-
/**
|
|
925
|
-
* Reference ID (equals the run id).
|
|
926
|
-
*/
|
|
927
|
-
ref_id: string;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export interface TaskAgentCreateParams {
|
|
845
|
+
export interface AgentCreateParams {
|
|
932
846
|
/**
|
|
933
847
|
* Stable agent name.
|
|
934
848
|
*/
|
|
@@ -977,7 +891,7 @@ export interface TaskAgentCreateParams {
|
|
|
977
891
|
/**
|
|
978
892
|
* Source guidance for the agent.
|
|
979
893
|
*/
|
|
980
|
-
sources?:
|
|
894
|
+
sources?: AgentCreateParams.Sources;
|
|
981
895
|
|
|
982
896
|
/**
|
|
983
897
|
* Suggested prompts users can run with this agent.
|
|
@@ -996,7 +910,7 @@ export interface TaskAgentCreateParams {
|
|
|
996
910
|
use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
|
|
997
911
|
}
|
|
998
912
|
|
|
999
|
-
export namespace
|
|
913
|
+
export namespace AgentCreateParams {
|
|
1000
914
|
/**
|
|
1001
915
|
* Source guidance for the agent.
|
|
1002
916
|
*/
|
|
@@ -1059,14 +973,14 @@ export namespace TaskAgentCreateParams {
|
|
|
1059
973
|
}
|
|
1060
974
|
}
|
|
1061
975
|
|
|
1062
|
-
export interface
|
|
976
|
+
export interface AgentUpdateParams {
|
|
1063
977
|
/**
|
|
1064
978
|
* A JSON Patch document per RFC 6902 — a JSON array of patch operations.
|
|
1065
979
|
*/
|
|
1066
|
-
body: Array<
|
|
980
|
+
body: Array<AgentUpdateParams.Body>;
|
|
1067
981
|
}
|
|
1068
982
|
|
|
1069
|
-
export namespace
|
|
983
|
+
export namespace AgentUpdateParams {
|
|
1070
984
|
/**
|
|
1071
985
|
* A single JSON Patch operation per RFC 6902.
|
|
1072
986
|
*/
|
|
@@ -1081,7 +995,7 @@ export namespace TaskAgentUpdateParams {
|
|
|
1081
995
|
}
|
|
1082
996
|
}
|
|
1083
997
|
|
|
1084
|
-
export interface
|
|
998
|
+
export interface AgentListParams {
|
|
1085
999
|
limit?: number;
|
|
1086
1000
|
|
|
1087
1001
|
offset?: number;
|
|
@@ -1089,121 +1003,18 @@ export interface TaskAgentListParams {
|
|
|
1089
1003
|
workspace_id?: string | null;
|
|
1090
1004
|
}
|
|
1091
1005
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
* User prompt or task instructions for the run.
|
|
1095
|
-
*/
|
|
1096
|
-
input: string;
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* Canonical effort tier names for the research graph.
|
|
1100
|
-
*/
|
|
1101
|
-
effort?: 'low' | 'medium' | 'high' | 'x-high' | 'max' | null;
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Whether to stream run events when supported.
|
|
1105
|
-
*/
|
|
1106
|
-
enable_events?: boolean;
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* Existing records to ENRICH: a list of partial rows, or a single object,
|
|
1110
|
-
* mirroring output_schema's shape.
|
|
1111
|
-
*/
|
|
1112
|
-
input_data?: Array<{ [key: string]: unknown }> | { [key: string]: unknown } | null;
|
|
1113
|
-
|
|
1114
|
-
/**
|
|
1115
|
-
* JSON schema overriding the agent's default structured output for this run.
|
|
1116
|
-
*/
|
|
1117
|
-
output_schema?: { [key: string]: unknown } | null;
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* Previous interaction identifier used to continue a conversation.
|
|
1121
|
-
*/
|
|
1122
|
-
previous_interaction_id?: string | null;
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* Source guidance overriding the agent default.
|
|
1126
|
-
*/
|
|
1127
|
-
sources?: TaskAgentRunParams.Sources | null;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
export namespace TaskAgentRunParams {
|
|
1131
|
-
/**
|
|
1132
|
-
* Source guidance overriding the agent default.
|
|
1133
|
-
*/
|
|
1134
|
-
export interface Sources {
|
|
1135
|
-
/**
|
|
1136
|
-
* Source groups the agent is allowed to use.
|
|
1137
|
-
*/
|
|
1138
|
-
allow?: Array<Sources.Allow>;
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* Free-text guidance describing sources or domains to avoid.
|
|
1142
|
-
*/
|
|
1143
|
-
avoid?: string | null;
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
* Source groups the agent should not use.
|
|
1147
|
-
*/
|
|
1148
|
-
block?: Array<Sources.Block>;
|
|
1149
|
-
|
|
1150
|
-
/**
|
|
1151
|
-
* Free-text guidance describing sources or domains to prioritize.
|
|
1152
|
-
*/
|
|
1153
|
-
prioritize?: string | null;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
export namespace Sources {
|
|
1157
|
-
export interface Allow {
|
|
1158
|
-
/**
|
|
1159
|
-
* Domains included in this source group.
|
|
1160
|
-
*/
|
|
1161
|
-
domains: Array<string>;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* Source group title.
|
|
1165
|
-
*/
|
|
1166
|
-
title: string;
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* Zero-based source group position.
|
|
1170
|
-
*/
|
|
1171
|
-
order?: number;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
export interface Block {
|
|
1175
|
-
/**
|
|
1176
|
-
* Domains included in this source group.
|
|
1177
|
-
*/
|
|
1178
|
-
domains: Array<string>;
|
|
1179
|
-
|
|
1180
|
-
/**
|
|
1181
|
-
* Source group title.
|
|
1182
|
-
*/
|
|
1183
|
-
title: string;
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* Zero-based source group position.
|
|
1187
|
-
*/
|
|
1188
|
-
order?: number;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
TaskAgent.Templates = Templates;
|
|
1194
|
-
TaskAgent.Runs = Runs;
|
|
1006
|
+
Agents.Templates = Templates;
|
|
1007
|
+
Agents.Runs = Runs;
|
|
1195
1008
|
|
|
1196
|
-
export declare namespace
|
|
1009
|
+
export declare namespace Agents {
|
|
1197
1010
|
export {
|
|
1198
|
-
type
|
|
1199
|
-
type
|
|
1200
|
-
type
|
|
1201
|
-
type
|
|
1202
|
-
type
|
|
1203
|
-
type
|
|
1204
|
-
type
|
|
1205
|
-
type TaskAgentListParams as TaskAgentListParams,
|
|
1206
|
-
type TaskAgentRunParams as TaskAgentRunParams,
|
|
1011
|
+
type AgentCreateResponse as AgentCreateResponse,
|
|
1012
|
+
type AgentUpdateResponse as AgentUpdateResponse,
|
|
1013
|
+
type AgentListResponse as AgentListResponse,
|
|
1014
|
+
type AgentGetResponse as AgentGetResponse,
|
|
1015
|
+
type AgentCreateParams as AgentCreateParams,
|
|
1016
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
1017
|
+
type AgentListParams as AgentListParams,
|
|
1207
1018
|
};
|
|
1208
1019
|
|
|
1209
1020
|
export {
|
|
@@ -1215,12 +1026,14 @@ export declare namespace TaskAgent {
|
|
|
1215
1026
|
|
|
1216
1027
|
export {
|
|
1217
1028
|
Runs as Runs,
|
|
1029
|
+
type RunCreateResponse as RunCreateResponse,
|
|
1218
1030
|
type RunListResponse as RunListResponse,
|
|
1219
1031
|
type RunGetResponse as RunGetResponse,
|
|
1220
|
-
type
|
|
1032
|
+
type RunResultResponse as RunResultResponse,
|
|
1033
|
+
type RunCreateParams as RunCreateParams,
|
|
1221
1034
|
type RunListParams as RunListParams,
|
|
1222
1035
|
type RunGetParams as RunGetParams,
|
|
1223
|
-
type
|
|
1036
|
+
type RunResultParams as RunResultParams,
|
|
1224
1037
|
type RunStreamEventsParams as RunStreamEventsParams,
|
|
1225
1038
|
};
|
|
1226
1039
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Agents,
|
|
5
|
+
type AgentCreateResponse,
|
|
6
|
+
type AgentUpdateResponse,
|
|
7
|
+
type AgentListResponse,
|
|
8
|
+
type AgentGetResponse,
|
|
9
|
+
type AgentCreateParams,
|
|
10
|
+
type AgentUpdateParams,
|
|
11
|
+
type AgentListParams,
|
|
12
|
+
} from './agents';
|
|
3
13
|
export {
|
|
4
14
|
Runs,
|
|
15
|
+
type RunCreateResponse,
|
|
5
16
|
type RunListResponse,
|
|
6
17
|
type RunGetResponse,
|
|
7
|
-
type
|
|
18
|
+
type RunResultResponse,
|
|
19
|
+
type RunCreateParams,
|
|
8
20
|
type RunListParams,
|
|
9
21
|
type RunGetParams,
|
|
10
|
-
type
|
|
22
|
+
type RunResultParams,
|
|
11
23
|
type RunStreamEventsParams,
|
|
12
24
|
} from './runs';
|
|
13
|
-
export {
|
|
14
|
-
TaskAgent,
|
|
15
|
-
type TaskAgentCreateResponse,
|
|
16
|
-
type TaskAgentUpdateResponse,
|
|
17
|
-
type TaskAgentListResponse,
|
|
18
|
-
type TaskAgentGetResponse,
|
|
19
|
-
type TaskAgentRunResponse,
|
|
20
|
-
type TaskAgentCreateParams,
|
|
21
|
-
type TaskAgentUpdateParams,
|
|
22
|
-
type TaskAgentListParams,
|
|
23
|
-
type TaskAgentRunParams,
|
|
24
|
-
} from './task-agent';
|
|
25
25
|
export {
|
|
26
26
|
Templates,
|
|
27
27
|
type TemplateListResponse,
|