@nimble-way/nimble-js 0.13.0 → 0.16.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 +52 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +17 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -2
- package/client.d.ts.map +1 -1
- package/client.js +24 -1
- package/client.js.map +1 -1
- package/client.mjs +24 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +22 -22
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/agent.d.mts +33 -26
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +33 -26
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +0 -8
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +0 -8
- package/resources/agent.mjs.map +1 -1
- package/resources/batches.d.mts +1 -1
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +1 -1
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.mjs.map +1 -1
- package/resources/crawl.d.mts +5 -1
- package/resources/crawl.d.mts.map +1 -1
- package/resources/crawl.d.ts +5 -1
- package/resources/crawl.d.ts.map +1 -1
- package/resources/crawl.mjs.map +1 -1
- package/resources/domain-knowledge.d.mts +50 -0
- package/resources/domain-knowledge.d.mts.map +1 -0
- package/resources/domain-knowledge.d.ts +50 -0
- package/resources/domain-knowledge.d.ts.map +1 -0
- package/resources/domain-knowledge.js +16 -0
- package/resources/domain-knowledge.js.map +1 -0
- package/resources/domain-knowledge.mjs +12 -0
- package/resources/domain-knowledge.mjs.map +1 -0
- package/resources/index.d.mts +6 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/jobs/index.d.mts +3 -0
- package/resources/jobs/index.d.mts.map +1 -0
- package/resources/jobs/index.d.ts +3 -0
- package/resources/jobs/index.d.ts.map +1 -0
- package/resources/jobs/index.js +9 -0
- package/resources/jobs/index.js.map +1 -0
- package/resources/jobs/index.mjs +4 -0
- package/resources/jobs/index.mjs.map +1 -0
- package/resources/jobs/jobs.d.mts +248 -0
- package/resources/jobs/jobs.d.mts.map +1 -0
- package/resources/jobs/jobs.d.ts +248 -0
- package/resources/jobs/jobs.d.ts.map +1 -0
- package/resources/jobs/jobs.js +58 -0
- package/resources/jobs/jobs.js.map +1 -0
- package/resources/jobs/jobs.mjs +53 -0
- package/resources/jobs/jobs.mjs.map +1 -0
- package/resources/jobs/runs/artifacts.d.mts +62 -0
- package/resources/jobs/runs/artifacts.d.mts.map +1 -0
- package/resources/jobs/runs/artifacts.d.ts +62 -0
- package/resources/jobs/runs/artifacts.d.ts.map +1 -0
- package/resources/jobs/runs/artifacts.js +37 -0
- package/resources/jobs/runs/artifacts.js.map +1 -0
- package/resources/jobs/runs/artifacts.mjs +33 -0
- package/resources/jobs/runs/artifacts.mjs.map +1 -0
- package/resources/jobs/runs/index.d.mts +3 -0
- package/resources/jobs/runs/index.d.mts.map +1 -0
- package/resources/jobs/runs/index.d.ts +3 -0
- package/resources/jobs/runs/index.d.ts.map +1 -0
- package/resources/jobs/runs/index.js +9 -0
- package/resources/jobs/runs/index.js.map +1 -0
- package/resources/jobs/runs/index.mjs +4 -0
- package/resources/jobs/runs/index.mjs.map +1 -0
- package/resources/jobs/runs/runs.d.mts +95 -0
- package/resources/jobs/runs/runs.d.mts.map +1 -0
- package/resources/jobs/runs/runs.d.ts +95 -0
- package/resources/jobs/runs/runs.d.ts.map +1 -0
- package/resources/jobs/runs/runs.js +36 -0
- package/resources/jobs/runs/runs.js.map +1 -0
- package/resources/jobs/runs/runs.mjs +31 -0
- package/resources/jobs/runs/runs.mjs.map +1 -0
- package/resources/jobs/runs.d.mts +2 -0
- package/resources/jobs/runs.d.mts.map +1 -0
- package/resources/jobs/runs.d.ts +2 -0
- package/resources/jobs/runs.d.ts.map +1 -0
- package/resources/jobs/runs.js +6 -0
- package/resources/jobs/runs.js.map +1 -0
- package/resources/jobs/runs.mjs +3 -0
- package/resources/jobs/runs.mjs.map +1 -0
- package/resources/jobs.d.mts +2 -0
- package/resources/jobs.d.mts.map +1 -0
- package/resources/jobs.d.ts +2 -0
- package/resources/jobs.d.ts.map +1 -0
- package/resources/jobs.js +6 -0
- package/resources/jobs.js.map +1 -0
- package/resources/jobs.mjs +3 -0
- package/resources/jobs.mjs.map +1 -0
- package/resources/media.d.mts +390 -0
- package/resources/media.d.mts.map +1 -0
- package/resources/media.d.ts +390 -0
- package/resources/media.d.ts.map +1 -0
- package/resources/media.js +35 -0
- package/resources/media.js.map +1 -0
- package/resources/media.mjs +31 -0
- package/resources/media.mjs.map +1 -0
- package/resources/serp.d.mts +714 -0
- package/resources/serp.d.mts.map +1 -0
- package/resources/serp.d.ts +714 -0
- package/resources/serp.d.ts.map +1 -0
- package/resources/serp.js +48 -0
- package/resources/serp.js.map +1 -0
- package/resources/serp.mjs +44 -0
- package/resources/serp.mjs.map +1 -0
- package/resources/task-agent/index.d.mts +4 -0
- package/resources/task-agent/index.d.mts.map +1 -0
- package/resources/task-agent/index.d.ts +4 -0
- package/resources/task-agent/index.d.ts.map +1 -0
- package/resources/task-agent/index.js +11 -0
- package/resources/task-agent/index.js.map +1 -0
- package/resources/task-agent/index.mjs +5 -0
- package/resources/task-agent/index.mjs.map +1 -0
- package/resources/task-agent/runs.d.mts +277 -0
- package/resources/task-agent/runs.d.mts.map +1 -0
- package/resources/task-agent/runs.d.ts +277 -0
- package/resources/task-agent/runs.d.ts.map +1 -0
- package/resources/task-agent/runs.js +50 -0
- package/resources/task-agent/runs.js.map +1 -0
- package/resources/task-agent/runs.mjs +46 -0
- package/resources/task-agent/runs.mjs.map +1 -0
- package/resources/task-agent/task-agent.d.mts +383 -0
- package/resources/task-agent/task-agent.d.mts.map +1 -0
- package/resources/task-agent/task-agent.d.ts +383 -0
- package/resources/task-agent/task-agent.d.ts.map +1 -0
- package/resources/task-agent/task-agent.js +70 -0
- package/resources/task-agent/task-agent.js.map +1 -0
- package/resources/task-agent/task-agent.mjs +65 -0
- package/resources/task-agent/task-agent.mjs.map +1 -0
- package/resources/task-agent/templates.d.mts +98 -0
- package/resources/task-agent/templates.d.mts.map +1 -0
- package/resources/task-agent/templates.d.ts +98 -0
- package/resources/task-agent/templates.d.ts.map +1 -0
- package/resources/task-agent/templates.js +22 -0
- package/resources/task-agent/templates.js.map +1 -0
- package/resources/task-agent/templates.mjs +18 -0
- package/resources/task-agent/templates.mjs.map +1 -0
- package/resources/task-agent.d.mts +2 -0
- package/resources/task-agent.d.mts.map +1 -0
- package/resources/task-agent.d.ts +2 -0
- package/resources/task-agent.d.ts.map +1 -0
- package/resources/task-agent.js +6 -0
- package/resources/task-agent.js.map +1 -0
- package/resources/task-agent.mjs +3 -0
- package/resources/task-agent.mjs.map +1 -0
- package/resources/tasks.d.mts +2 -2
- package/resources/tasks.d.mts.map +1 -1
- package/resources/tasks.d.ts +2 -2
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.mjs.map +1 -1
- package/resources/top-level.d.mts +32 -8
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +32 -8
- package/resources/top-level.d.ts.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +112 -5
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/agent.ts +21 -38
- package/src/resources/batches.ts +1 -1
- package/src/resources/crawl.ts +6 -1
- package/src/resources/domain-knowledge.ts +69 -0
- package/src/resources/index.ts +44 -2
- package/src/resources/jobs/index.ts +20 -0
- package/src/resources/jobs/jobs.ts +413 -0
- package/src/resources/jobs/runs/artifacts.ts +115 -0
- package/src/resources/jobs/runs/index.ts +19 -0
- package/src/resources/jobs/runs/runs.ts +177 -0
- package/src/resources/jobs/runs.ts +3 -0
- package/src/resources/jobs.ts +3 -0
- package/src/resources/media.ts +570 -0
- package/src/resources/serp.ts +1001 -0
- package/src/resources/task-agent/index.ts +32 -0
- package/src/resources/task-agent/runs.ts +416 -0
- package/src/resources/task-agent/task-agent.ts +652 -0
- package/src/resources/task-agent/templates.ts +163 -0
- package/src/resources/task-agent.ts +3 -0
- package/src/resources/tasks.ts +2 -2
- package/src/resources/top-level.ts +35 -8
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,652 @@
|
|
|
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 new workspace-scoped Web Search Agent. Pass `template` to clone from a
|
|
30
|
+
* named template.
|
|
31
|
+
*/
|
|
32
|
+
create(body: TaskAgentCreateParams, options?: RequestOptions): APIPromise<TaskAgentCreateResponse> {
|
|
33
|
+
return this._client.post('/v1/task-agents', { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Apply a JSON Patch document (`application/json-patch+json`) to an agent you own.
|
|
38
|
+
* Each operation must be a `replace` with path `/field_name`.
|
|
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}`, {
|
|
47
|
+
body: body,
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([{ 'Content-Type': 'application/json-patch+json' }, options?.headers]),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* List active Web Search Agents visible to the caller. Includes agents scoped to
|
|
55
|
+
* the caller's workspace.
|
|
56
|
+
*/
|
|
57
|
+
list(
|
|
58
|
+
query: TaskAgentListParams | null | undefined = {},
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): APIPromise<TaskAgentListResponse> {
|
|
61
|
+
return this._client.get('/v1/task-agents', { query, ...options });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Deactivate an agent you own. The agent is marked inactive but not deleted.
|
|
66
|
+
*/
|
|
67
|
+
deactivate(agentID: string, options?: RequestOptions): APIPromise<void> {
|
|
68
|
+
return this._client.delete(path`/v1/task-agents/${agentID}`, {
|
|
69
|
+
...options,
|
|
70
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Fetch a single Web Search Agent by id.
|
|
76
|
+
*/
|
|
77
|
+
get(agentID: string, options?: RequestOptions): APIPromise<TaskAgentGetResponse> {
|
|
78
|
+
return this._client.get(path`/v1/task-agents/${agentID}`, options);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Create and enqueue a research run for a Web Search Agent.
|
|
83
|
+
*/
|
|
84
|
+
run(agentID: string, body: TaskAgentRunParams, options?: RequestOptions): APIPromise<TaskAgentRunResponse> {
|
|
85
|
+
return this._client.post(path`/v1/task-agents/${agentID}/runs`, { body, ...options });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface TaskAgentCreateResponse {
|
|
90
|
+
id: string;
|
|
91
|
+
|
|
92
|
+
created_at: string;
|
|
93
|
+
|
|
94
|
+
description: string;
|
|
95
|
+
|
|
96
|
+
display_name: string;
|
|
97
|
+
|
|
98
|
+
domain_expertise: string;
|
|
99
|
+
|
|
100
|
+
effort: string;
|
|
101
|
+
|
|
102
|
+
goals: Array<TaskAgentCreateResponse.Goal>;
|
|
103
|
+
|
|
104
|
+
icon: string;
|
|
105
|
+
|
|
106
|
+
is_active: boolean;
|
|
107
|
+
|
|
108
|
+
output_schema: { [key: string]: unknown } | null;
|
|
109
|
+
|
|
110
|
+
sources: TaskAgentCreateResponse.Sources;
|
|
111
|
+
|
|
112
|
+
suggested_questions: Array<TaskAgentCreateResponse.SuggestedQuestion>;
|
|
113
|
+
|
|
114
|
+
updated_at: string;
|
|
115
|
+
|
|
116
|
+
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
117
|
+
|
|
118
|
+
account_id?: string | null;
|
|
119
|
+
|
|
120
|
+
agent_name?: string | null;
|
|
121
|
+
|
|
122
|
+
workspace_id?: string | null;
|
|
123
|
+
|
|
124
|
+
workspace_name?: string | null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export namespace TaskAgentCreateResponse {
|
|
128
|
+
export interface Goal {
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
goal: string;
|
|
132
|
+
|
|
133
|
+
order: number;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface Sources {
|
|
137
|
+
allow?: Array<Sources.Allow>;
|
|
138
|
+
|
|
139
|
+
avoid?: string | null;
|
|
140
|
+
|
|
141
|
+
block?: Array<Sources.Block>;
|
|
142
|
+
|
|
143
|
+
prioritize?: string | null;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export namespace Sources {
|
|
147
|
+
export interface Allow {
|
|
148
|
+
id: string;
|
|
149
|
+
|
|
150
|
+
domains: Array<string>;
|
|
151
|
+
|
|
152
|
+
order: number;
|
|
153
|
+
|
|
154
|
+
title: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface Block {
|
|
158
|
+
domains: Array<string>;
|
|
159
|
+
|
|
160
|
+
title: string;
|
|
161
|
+
|
|
162
|
+
order?: number;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface SuggestedQuestion {
|
|
167
|
+
id: string;
|
|
168
|
+
|
|
169
|
+
order: number;
|
|
170
|
+
|
|
171
|
+
question: string;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface TaskAgentUpdateResponse {
|
|
176
|
+
id: string;
|
|
177
|
+
|
|
178
|
+
created_at: string;
|
|
179
|
+
|
|
180
|
+
description: string;
|
|
181
|
+
|
|
182
|
+
display_name: string;
|
|
183
|
+
|
|
184
|
+
domain_expertise: string;
|
|
185
|
+
|
|
186
|
+
effort: string;
|
|
187
|
+
|
|
188
|
+
goals: Array<TaskAgentUpdateResponse.Goal>;
|
|
189
|
+
|
|
190
|
+
icon: string;
|
|
191
|
+
|
|
192
|
+
is_active: boolean;
|
|
193
|
+
|
|
194
|
+
output_schema: { [key: string]: unknown } | null;
|
|
195
|
+
|
|
196
|
+
sources: TaskAgentUpdateResponse.Sources;
|
|
197
|
+
|
|
198
|
+
suggested_questions: Array<TaskAgentUpdateResponse.SuggestedQuestion>;
|
|
199
|
+
|
|
200
|
+
updated_at: string;
|
|
201
|
+
|
|
202
|
+
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
203
|
+
|
|
204
|
+
account_id?: string | null;
|
|
205
|
+
|
|
206
|
+
agent_name?: string | null;
|
|
207
|
+
|
|
208
|
+
workspace_id?: string | null;
|
|
209
|
+
|
|
210
|
+
workspace_name?: string | null;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export namespace TaskAgentUpdateResponse {
|
|
214
|
+
export interface Goal {
|
|
215
|
+
id: string;
|
|
216
|
+
|
|
217
|
+
goal: string;
|
|
218
|
+
|
|
219
|
+
order: number;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface Sources {
|
|
223
|
+
allow?: Array<Sources.Allow>;
|
|
224
|
+
|
|
225
|
+
avoid?: string | null;
|
|
226
|
+
|
|
227
|
+
block?: Array<Sources.Block>;
|
|
228
|
+
|
|
229
|
+
prioritize?: string | null;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export namespace Sources {
|
|
233
|
+
export interface Allow {
|
|
234
|
+
id: string;
|
|
235
|
+
|
|
236
|
+
domains: Array<string>;
|
|
237
|
+
|
|
238
|
+
order: number;
|
|
239
|
+
|
|
240
|
+
title: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface Block {
|
|
244
|
+
domains: Array<string>;
|
|
245
|
+
|
|
246
|
+
title: string;
|
|
247
|
+
|
|
248
|
+
order?: number;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface SuggestedQuestion {
|
|
253
|
+
id: string;
|
|
254
|
+
|
|
255
|
+
order: number;
|
|
256
|
+
|
|
257
|
+
question: string;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type TaskAgentListResponse = Array<TaskAgentListResponse.TaskAgentListResponseItem>;
|
|
262
|
+
|
|
263
|
+
export namespace TaskAgentListResponse {
|
|
264
|
+
export interface TaskAgentListResponseItem {
|
|
265
|
+
id: string;
|
|
266
|
+
|
|
267
|
+
created_at: string;
|
|
268
|
+
|
|
269
|
+
description: string;
|
|
270
|
+
|
|
271
|
+
display_name: string;
|
|
272
|
+
|
|
273
|
+
domain_expertise: string;
|
|
274
|
+
|
|
275
|
+
effort: string;
|
|
276
|
+
|
|
277
|
+
goals: Array<TaskAgentListResponseItem.Goal>;
|
|
278
|
+
|
|
279
|
+
icon: string;
|
|
280
|
+
|
|
281
|
+
is_active: boolean;
|
|
282
|
+
|
|
283
|
+
output_schema: { [key: string]: unknown } | null;
|
|
284
|
+
|
|
285
|
+
sources: TaskAgentListResponseItem.Sources;
|
|
286
|
+
|
|
287
|
+
suggested_questions: Array<TaskAgentListResponseItem.SuggestedQuestion>;
|
|
288
|
+
|
|
289
|
+
updated_at: string;
|
|
290
|
+
|
|
291
|
+
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
292
|
+
|
|
293
|
+
account_id?: string | null;
|
|
294
|
+
|
|
295
|
+
agent_name?: string | null;
|
|
296
|
+
|
|
297
|
+
workspace_id?: string | null;
|
|
298
|
+
|
|
299
|
+
workspace_name?: string | null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export namespace TaskAgentListResponseItem {
|
|
303
|
+
export interface Goal {
|
|
304
|
+
id: string;
|
|
305
|
+
|
|
306
|
+
goal: string;
|
|
307
|
+
|
|
308
|
+
order: number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface Sources {
|
|
312
|
+
allow?: Array<Sources.Allow>;
|
|
313
|
+
|
|
314
|
+
avoid?: string | null;
|
|
315
|
+
|
|
316
|
+
block?: Array<Sources.Block>;
|
|
317
|
+
|
|
318
|
+
prioritize?: string | null;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export namespace Sources {
|
|
322
|
+
export interface Allow {
|
|
323
|
+
id: string;
|
|
324
|
+
|
|
325
|
+
domains: Array<string>;
|
|
326
|
+
|
|
327
|
+
order: number;
|
|
328
|
+
|
|
329
|
+
title: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface Block {
|
|
333
|
+
domains: Array<string>;
|
|
334
|
+
|
|
335
|
+
title: string;
|
|
336
|
+
|
|
337
|
+
order?: number;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface SuggestedQuestion {
|
|
342
|
+
id: string;
|
|
343
|
+
|
|
344
|
+
order: number;
|
|
345
|
+
|
|
346
|
+
question: string;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface TaskAgentGetResponse {
|
|
352
|
+
id: string;
|
|
353
|
+
|
|
354
|
+
created_at: string;
|
|
355
|
+
|
|
356
|
+
description: string;
|
|
357
|
+
|
|
358
|
+
display_name: string;
|
|
359
|
+
|
|
360
|
+
domain_expertise: string;
|
|
361
|
+
|
|
362
|
+
effort: string;
|
|
363
|
+
|
|
364
|
+
goals: Array<TaskAgentGetResponse.Goal>;
|
|
365
|
+
|
|
366
|
+
icon: string;
|
|
367
|
+
|
|
368
|
+
is_active: boolean;
|
|
369
|
+
|
|
370
|
+
output_schema: { [key: string]: unknown } | null;
|
|
371
|
+
|
|
372
|
+
sources: TaskAgentGetResponse.Sources;
|
|
373
|
+
|
|
374
|
+
suggested_questions: Array<TaskAgentGetResponse.SuggestedQuestion>;
|
|
375
|
+
|
|
376
|
+
updated_at: string;
|
|
377
|
+
|
|
378
|
+
use_case: 'research' | 'enrichment' | 'dataset_building';
|
|
379
|
+
|
|
380
|
+
account_id?: string | null;
|
|
381
|
+
|
|
382
|
+
agent_name?: string | null;
|
|
383
|
+
|
|
384
|
+
workspace_id?: string | null;
|
|
385
|
+
|
|
386
|
+
workspace_name?: string | null;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export namespace TaskAgentGetResponse {
|
|
390
|
+
export interface Goal {
|
|
391
|
+
id: string;
|
|
392
|
+
|
|
393
|
+
goal: string;
|
|
394
|
+
|
|
395
|
+
order: number;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface Sources {
|
|
399
|
+
allow?: Array<Sources.Allow>;
|
|
400
|
+
|
|
401
|
+
avoid?: string | null;
|
|
402
|
+
|
|
403
|
+
block?: Array<Sources.Block>;
|
|
404
|
+
|
|
405
|
+
prioritize?: string | null;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export namespace Sources {
|
|
409
|
+
export interface Allow {
|
|
410
|
+
id: string;
|
|
411
|
+
|
|
412
|
+
domains: Array<string>;
|
|
413
|
+
|
|
414
|
+
order: number;
|
|
415
|
+
|
|
416
|
+
title: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface Block {
|
|
420
|
+
domains: Array<string>;
|
|
421
|
+
|
|
422
|
+
title: string;
|
|
423
|
+
|
|
424
|
+
order?: number;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export interface SuggestedQuestion {
|
|
429
|
+
id: string;
|
|
430
|
+
|
|
431
|
+
order: number;
|
|
432
|
+
|
|
433
|
+
question: string;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface TaskAgentRunResponse {
|
|
438
|
+
/**
|
|
439
|
+
* Run identifier.
|
|
440
|
+
*/
|
|
441
|
+
id: string;
|
|
442
|
+
|
|
443
|
+
created_at: string;
|
|
444
|
+
|
|
445
|
+
effort: 'quickest' | 'quick' | 'research' | 'pro' | 'max';
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Interaction ID — pass as previous_interaction_id to reuse context.
|
|
449
|
+
*/
|
|
450
|
+
interaction_id: string;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* True while status is 'queued' or 'running'.
|
|
454
|
+
*/
|
|
455
|
+
is_active: boolean;
|
|
456
|
+
|
|
457
|
+
status: 'queued' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
458
|
+
|
|
459
|
+
completed_at?: string | null;
|
|
460
|
+
|
|
461
|
+
error?: TaskAgentRunResponse.Error | null;
|
|
462
|
+
|
|
463
|
+
prompt?: string | null;
|
|
464
|
+
|
|
465
|
+
started_at?: string | null;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Web Search Agent instance this run belongs to.
|
|
469
|
+
*/
|
|
470
|
+
web_search_agent_id?: string | null;
|
|
471
|
+
|
|
472
|
+
workspace_id?: string | null;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export namespace TaskAgentRunResponse {
|
|
476
|
+
export interface Error {
|
|
477
|
+
/**
|
|
478
|
+
* Human-readable error description.
|
|
479
|
+
*/
|
|
480
|
+
message: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Reference ID (equals the run id).
|
|
484
|
+
*/
|
|
485
|
+
ref_id: string;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface TaskAgentCreateParams {
|
|
490
|
+
agent_name?: string | null;
|
|
491
|
+
|
|
492
|
+
description?: string | null;
|
|
493
|
+
|
|
494
|
+
display_name?: string | null;
|
|
495
|
+
|
|
496
|
+
domain_expertise?: string | null;
|
|
497
|
+
|
|
498
|
+
effort?: string;
|
|
499
|
+
|
|
500
|
+
goals?: Array<string>;
|
|
501
|
+
|
|
502
|
+
icon?: string | null;
|
|
503
|
+
|
|
504
|
+
is_active?: boolean;
|
|
505
|
+
|
|
506
|
+
output_schema?: { [key: string]: unknown } | null;
|
|
507
|
+
|
|
508
|
+
sources?: TaskAgentCreateParams.Sources;
|
|
509
|
+
|
|
510
|
+
suggested_questions?: Array<string>;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Template name to materialise this instance from. When set, scalar fields and
|
|
514
|
+
* child rows are copied from the template.
|
|
515
|
+
*/
|
|
516
|
+
template?: string | null;
|
|
517
|
+
|
|
518
|
+
use_case?: 'research' | 'enrichment' | 'dataset_building' | null;
|
|
519
|
+
|
|
520
|
+
workspace_id?: string | null;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export namespace TaskAgentCreateParams {
|
|
524
|
+
export interface Sources {
|
|
525
|
+
allow?: Array<Sources.Allow>;
|
|
526
|
+
|
|
527
|
+
avoid?: string | null;
|
|
528
|
+
|
|
529
|
+
block?: Array<Sources.Block>;
|
|
530
|
+
|
|
531
|
+
prioritize?: string | null;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export namespace Sources {
|
|
535
|
+
export interface Allow {
|
|
536
|
+
domains: Array<string>;
|
|
537
|
+
|
|
538
|
+
title: string;
|
|
539
|
+
|
|
540
|
+
order?: number;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface Block {
|
|
544
|
+
domains: Array<string>;
|
|
545
|
+
|
|
546
|
+
title: string;
|
|
547
|
+
|
|
548
|
+
order?: number;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
export interface TaskAgentUpdateParams {
|
|
554
|
+
body: Array<TaskAgentUpdateParams.Body>;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export namespace TaskAgentUpdateParams {
|
|
558
|
+
export interface Body {
|
|
559
|
+
op: 'replace';
|
|
560
|
+
|
|
561
|
+
path: string;
|
|
562
|
+
|
|
563
|
+
value: unknown;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export interface TaskAgentListParams {
|
|
568
|
+
effort?: string | null;
|
|
569
|
+
|
|
570
|
+
limit?: number;
|
|
571
|
+
|
|
572
|
+
offset?: number;
|
|
573
|
+
|
|
574
|
+
use_case?: string | null;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface TaskAgentRunParams {
|
|
578
|
+
input: string;
|
|
579
|
+
|
|
580
|
+
enable_events?: boolean;
|
|
581
|
+
|
|
582
|
+
output_schema?: { [key: string]: unknown } | null;
|
|
583
|
+
|
|
584
|
+
sources?: TaskAgentRunParams.Sources | null;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export namespace TaskAgentRunParams {
|
|
588
|
+
export interface Sources {
|
|
589
|
+
allow?: Array<Sources.Allow>;
|
|
590
|
+
|
|
591
|
+
avoid?: string | null;
|
|
592
|
+
|
|
593
|
+
block?: Array<Sources.Block>;
|
|
594
|
+
|
|
595
|
+
prioritize?: string | null;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export namespace Sources {
|
|
599
|
+
export interface Allow {
|
|
600
|
+
domains: Array<string>;
|
|
601
|
+
|
|
602
|
+
title: string;
|
|
603
|
+
|
|
604
|
+
order?: number;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export interface Block {
|
|
608
|
+
domains: Array<string>;
|
|
609
|
+
|
|
610
|
+
title: string;
|
|
611
|
+
|
|
612
|
+
order?: number;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
TaskAgent.Templates = Templates;
|
|
618
|
+
TaskAgent.Runs = Runs;
|
|
619
|
+
|
|
620
|
+
export declare namespace TaskAgent {
|
|
621
|
+
export {
|
|
622
|
+
type TaskAgentCreateResponse as TaskAgentCreateResponse,
|
|
623
|
+
type TaskAgentUpdateResponse as TaskAgentUpdateResponse,
|
|
624
|
+
type TaskAgentListResponse as TaskAgentListResponse,
|
|
625
|
+
type TaskAgentGetResponse as TaskAgentGetResponse,
|
|
626
|
+
type TaskAgentRunResponse as TaskAgentRunResponse,
|
|
627
|
+
type TaskAgentCreateParams as TaskAgentCreateParams,
|
|
628
|
+
type TaskAgentUpdateParams as TaskAgentUpdateParams,
|
|
629
|
+
type TaskAgentListParams as TaskAgentListParams,
|
|
630
|
+
type TaskAgentRunParams as TaskAgentRunParams,
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
export {
|
|
634
|
+
Templates as Templates,
|
|
635
|
+
type TemplateListResponse as TemplateListResponse,
|
|
636
|
+
type TemplateGetResponse as TemplateGetResponse,
|
|
637
|
+
type TemplateListParams as TemplateListParams,
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
export {
|
|
641
|
+
Runs as Runs,
|
|
642
|
+
type RunListResponse as RunListResponse,
|
|
643
|
+
type RunGetResponse as RunGetResponse,
|
|
644
|
+
type RunGetResultResponse as RunGetResultResponse,
|
|
645
|
+
type RunStreamEventsResponse as RunStreamEventsResponse,
|
|
646
|
+
type RunListParams as RunListParams,
|
|
647
|
+
type RunCancelParams as RunCancelParams,
|
|
648
|
+
type RunGetParams as RunGetParams,
|
|
649
|
+
type RunGetResultParams as RunGetResultParams,
|
|
650
|
+
type RunStreamEventsParams as RunStreamEventsParams,
|
|
651
|
+
};
|
|
652
|
+
}
|