@nodetool-ai/protocol 0.7.0-rc.11
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/dist/agent-protocol.d.ts +217 -0
- package/dist/agent-protocol.d.ts.map +1 -0
- package/dist/agent-protocol.js +85 -0
- package/dist/agent-protocol.js.map +1 -0
- package/dist/api-schemas/api-error-code.d.ts +21 -0
- package/dist/api-schemas/api-error-code.d.ts.map +1 -0
- package/dist/api-schemas/api-error-code.js +20 -0
- package/dist/api-schemas/api-error-code.js.map +1 -0
- package/dist/api-schemas/assets.d.ts +162 -0
- package/dist/api-schemas/assets.d.ts.map +1 -0
- package/dist/api-schemas/assets.js +119 -0
- package/dist/api-schemas/assets.js.map +1 -0
- package/dist/api-schemas/collections.d.ts +64 -0
- package/dist/api-schemas/collections.d.ts.map +1 -0
- package/dist/api-schemas/collections.js +67 -0
- package/dist/api-schemas/collections.js.map +1 -0
- package/dist/api-schemas/costs.d.ts +168 -0
- package/dist/api-schemas/costs.d.ts.map +1 -0
- package/dist/api-schemas/costs.js +90 -0
- package/dist/api-schemas/costs.js.map +1 -0
- package/dist/api-schemas/error-helpers.d.ts +19 -0
- package/dist/api-schemas/error-helpers.d.ts.map +1 -0
- package/dist/api-schemas/error-helpers.js +7 -0
- package/dist/api-schemas/error-helpers.js.map +1 -0
- package/dist/api-schemas/files.d.ts +38 -0
- package/dist/api-schemas/files.d.ts.map +1 -0
- package/dist/api-schemas/files.js +25 -0
- package/dist/api-schemas/files.js.map +1 -0
- package/dist/api-schemas/fonts.d.ts +6 -0
- package/dist/api-schemas/fonts.d.ts.map +1 -0
- package/dist/api-schemas/fonts.js +8 -0
- package/dist/api-schemas/fonts.js.map +1 -0
- package/dist/api-schemas/index.d.ts +20 -0
- package/dist/api-schemas/index.d.ts.map +1 -0
- package/dist/api-schemas/index.js +20 -0
- package/dist/api-schemas/index.js.map +1 -0
- package/dist/api-schemas/jobs.d.ts +77 -0
- package/dist/api-schemas/jobs.d.ts.map +1 -0
- package/dist/api-schemas/jobs.js +60 -0
- package/dist/api-schemas/jobs.js.map +1 -0
- package/dist/api-schemas/mcp-config.d.ts +119 -0
- package/dist/api-schemas/mcp-config.d.ts.map +1 -0
- package/dist/api-schemas/mcp-config.js +59 -0
- package/dist/api-schemas/mcp-config.js.map +1 -0
- package/dist/api-schemas/messages.d.ts +77 -0
- package/dist/api-schemas/messages.d.ts.map +1 -0
- package/dist/api-schemas/messages.js +81 -0
- package/dist/api-schemas/messages.js.map +1 -0
- package/dist/api-schemas/models.d.ts +202 -0
- package/dist/api-schemas/models.d.ts.map +1 -0
- package/dist/api-schemas/models.js +135 -0
- package/dist/api-schemas/models.js.map +1 -0
- package/dist/api-schemas/nodes.d.ts +23 -0
- package/dist/api-schemas/nodes.d.ts.map +1 -0
- package/dist/api-schemas/nodes.js +20 -0
- package/dist/api-schemas/nodes.js.map +1 -0
- package/dist/api-schemas/settings.d.ts +75 -0
- package/dist/api-schemas/settings.d.ts.map +1 -0
- package/dist/api-schemas/settings.js +66 -0
- package/dist/api-schemas/settings.js.map +1 -0
- package/dist/api-schemas/skills.d.ts +19 -0
- package/dist/api-schemas/skills.d.ts.map +1 -0
- package/dist/api-schemas/skills.js +16 -0
- package/dist/api-schemas/skills.js.map +1 -0
- package/dist/api-schemas/storage.d.ts +46 -0
- package/dist/api-schemas/storage.d.ts.map +1 -0
- package/dist/api-schemas/storage.js +32 -0
- package/dist/api-schemas/storage.js.map +1 -0
- package/dist/api-schemas/threads.d.ts +58 -0
- package/dist/api-schemas/threads.d.ts.map +1 -0
- package/dist/api-schemas/threads.js +52 -0
- package/dist/api-schemas/threads.js.map +1 -0
- package/dist/api-schemas/users.d.ts +49 -0
- package/dist/api-schemas/users.d.ts.map +1 -0
- package/dist/api-schemas/users.js +44 -0
- package/dist/api-schemas/users.js.map +1 -0
- package/dist/api-schemas/workflows.d.ts +489 -0
- package/dist/api-schemas/workflows.d.ts.map +1 -0
- package/dist/api-schemas/workflows.js +248 -0
- package/dist/api-schemas/workflows.js.map +1 -0
- package/dist/api-schemas/workspace.d.ts +88 -0
- package/dist/api-schemas/workspace.d.ts.map +1 -0
- package/dist/api-schemas/workspace.js +65 -0
- package/dist/api-schemas/workspace.js.map +1 -0
- package/dist/api-types.d.ts +809 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api-types.js +9 -0
- package/dist/api-types.js.map +1 -0
- package/dist/graph.d.ts +75 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +15 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +334 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +71 -0
- package/dist/messages.js.map +1 -0
- package/dist/toolSchemas.d.ts +108 -0
- package/dist/toolSchemas.d.ts.map +1 -0
- package/dist/toolSchemas.js +205 -0
- package/dist/toolSchemas.js.map +1 -0
- package/dist/type-metadata.d.ts +39 -0
- package/dist/type-metadata.d.ts.map +1 -0
- package/dist/type-metadata.js +126 -0
- package/dist/type-metadata.js.map +1 -0
- package/dist/typecheck.d.ts +17 -0
- package/dist/typecheck.d.ts.map +1 -0
- package/dist/typecheck.js +63 -0
- package/dist/typecheck.js.map +1 -0
- package/dist/wrap-primitives.d.ts +18 -0
- package/dist/wrap-primitives.d.ts.map +1 -0
- package/dist/wrap-primitives.js +28 -0
- package/dist/wrap-primitives.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nodetool-ai/protocol – API Entity Types
|
|
3
|
+
*
|
|
4
|
+
* Plain interfaces for HTTP API request/response shapes.
|
|
5
|
+
* These mirror the database models but are transport-only (no class methods).
|
|
6
|
+
* Used by both the backend HTTP handlers and the frontend stores.
|
|
7
|
+
*/
|
|
8
|
+
import type { Edge } from "./graph.js";
|
|
9
|
+
export interface ImageRef {
|
|
10
|
+
type: "image";
|
|
11
|
+
uri?: string;
|
|
12
|
+
asset_id?: string | null;
|
|
13
|
+
temp_id?: string | null;
|
|
14
|
+
data?: unknown;
|
|
15
|
+
metadata?: Record<string, unknown> | null;
|
|
16
|
+
mimeType?: string;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface AudioRef {
|
|
21
|
+
type: "audio";
|
|
22
|
+
uri?: string;
|
|
23
|
+
asset_id?: string | null;
|
|
24
|
+
temp_id?: string | null;
|
|
25
|
+
duration?: number | null;
|
|
26
|
+
data?: unknown;
|
|
27
|
+
metadata?: Record<string, unknown> | null;
|
|
28
|
+
}
|
|
29
|
+
export interface VideoRef {
|
|
30
|
+
type: "video";
|
|
31
|
+
uri?: string;
|
|
32
|
+
asset_id?: string | null;
|
|
33
|
+
temp_id?: string | null;
|
|
34
|
+
duration?: number | null;
|
|
35
|
+
data?: unknown;
|
|
36
|
+
metadata?: Record<string, unknown> | null;
|
|
37
|
+
format?: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface TextRef {
|
|
40
|
+
type: "text";
|
|
41
|
+
uri?: string;
|
|
42
|
+
asset_id?: string | null;
|
|
43
|
+
temp_id?: string | null;
|
|
44
|
+
data?: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface DataframeRef {
|
|
47
|
+
type: "dataframe";
|
|
48
|
+
uri: string;
|
|
49
|
+
asset_id?: string | null;
|
|
50
|
+
temp_id?: string | null;
|
|
51
|
+
columns?: ColumnDef[] | null;
|
|
52
|
+
data?: unknown[][] | null;
|
|
53
|
+
}
|
|
54
|
+
export interface ColumnDef {
|
|
55
|
+
name: string;
|
|
56
|
+
data_type: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface Model3DRef {
|
|
60
|
+
type: "model_3d";
|
|
61
|
+
uri: string;
|
|
62
|
+
asset_id?: string | null;
|
|
63
|
+
temp_id?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export interface DocumentRef {
|
|
66
|
+
type: "document";
|
|
67
|
+
uri: string;
|
|
68
|
+
asset_id?: string | null;
|
|
69
|
+
temp_id?: string | null;
|
|
70
|
+
}
|
|
71
|
+
export interface FolderRef {
|
|
72
|
+
type: "folder";
|
|
73
|
+
uri: string;
|
|
74
|
+
asset_id?: string | null;
|
|
75
|
+
}
|
|
76
|
+
export interface FontRef {
|
|
77
|
+
type: "font";
|
|
78
|
+
uri: string;
|
|
79
|
+
asset_id?: string | null;
|
|
80
|
+
}
|
|
81
|
+
export interface AssetRef {
|
|
82
|
+
type: "asset" | "image" | "audio" | "video" | "document" | "text";
|
|
83
|
+
uri: string;
|
|
84
|
+
asset_id?: string | null;
|
|
85
|
+
temp_id?: string | null;
|
|
86
|
+
data?: unknown;
|
|
87
|
+
metadata?: Record<string, unknown> | null;
|
|
88
|
+
}
|
|
89
|
+
export interface WorkflowRef {
|
|
90
|
+
type: "workflow_ref";
|
|
91
|
+
id: string;
|
|
92
|
+
}
|
|
93
|
+
export interface NodeRef {
|
|
94
|
+
type: "node_ref";
|
|
95
|
+
id: string;
|
|
96
|
+
}
|
|
97
|
+
export interface NPArray {
|
|
98
|
+
type: "np_array";
|
|
99
|
+
uri: string;
|
|
100
|
+
asset_id?: string | null;
|
|
101
|
+
value?: unknown[];
|
|
102
|
+
dtype?: string;
|
|
103
|
+
shape?: number[];
|
|
104
|
+
}
|
|
105
|
+
export interface SVGElement {
|
|
106
|
+
type: "svg" | "svg_element";
|
|
107
|
+
name?: string;
|
|
108
|
+
value?: string;
|
|
109
|
+
attributes?: Record<string, string>;
|
|
110
|
+
content?: string | null;
|
|
111
|
+
children?: SVGElement[];
|
|
112
|
+
}
|
|
113
|
+
export interface PlotlyConfig {
|
|
114
|
+
type: "plotly_config";
|
|
115
|
+
data: unknown[];
|
|
116
|
+
layout?: Record<string, unknown>;
|
|
117
|
+
config?: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
export interface ChartSeries {
|
|
120
|
+
type?: string;
|
|
121
|
+
x_column?: string | null;
|
|
122
|
+
y_column?: string | null;
|
|
123
|
+
label?: string | null;
|
|
124
|
+
[key: string]: unknown;
|
|
125
|
+
}
|
|
126
|
+
export interface ChartData {
|
|
127
|
+
type: "chart_data";
|
|
128
|
+
series: ChartSeries[];
|
|
129
|
+
row?: string | null;
|
|
130
|
+
col?: string | null;
|
|
131
|
+
col_wrap?: number | null;
|
|
132
|
+
}
|
|
133
|
+
export interface ChartConfig {
|
|
134
|
+
type: "chart_config";
|
|
135
|
+
title?: string;
|
|
136
|
+
x_label?: string;
|
|
137
|
+
y_label?: string;
|
|
138
|
+
legend?: boolean;
|
|
139
|
+
data?: ChartData;
|
|
140
|
+
height?: number | null;
|
|
141
|
+
aspect?: number | null;
|
|
142
|
+
x_lim?: [number, number] | null;
|
|
143
|
+
y_lim?: [number, number] | null;
|
|
144
|
+
x_scale?: "linear" | "log" | null;
|
|
145
|
+
y_scale?: "linear" | "log" | null;
|
|
146
|
+
legend_position?: "auto" | "right" | "left" | "top" | "bottom";
|
|
147
|
+
palette?: string | null;
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}
|
|
150
|
+
export interface Datetime {
|
|
151
|
+
type: "datetime";
|
|
152
|
+
year: number;
|
|
153
|
+
month: number;
|
|
154
|
+
day: number;
|
|
155
|
+
hour?: number;
|
|
156
|
+
minute?: number;
|
|
157
|
+
second?: number;
|
|
158
|
+
microsecond?: number;
|
|
159
|
+
tzinfo?: string | null;
|
|
160
|
+
utc_offset?: number | null;
|
|
161
|
+
}
|
|
162
|
+
export interface CalendarEvent {
|
|
163
|
+
type: "calendar_event";
|
|
164
|
+
title: string;
|
|
165
|
+
start?: Datetime | null;
|
|
166
|
+
end?: Datetime | null;
|
|
167
|
+
description?: string;
|
|
168
|
+
location?: string;
|
|
169
|
+
all_day?: boolean;
|
|
170
|
+
/** Alias fields used by the frontend */
|
|
171
|
+
start_date?: Datetime | string | null;
|
|
172
|
+
end_date?: Datetime | string | null;
|
|
173
|
+
calendar?: string | null;
|
|
174
|
+
notes?: string | null;
|
|
175
|
+
}
|
|
176
|
+
export interface Asset {
|
|
177
|
+
id: string;
|
|
178
|
+
user_id: string;
|
|
179
|
+
parent_id: string;
|
|
180
|
+
name: string;
|
|
181
|
+
content_type: string;
|
|
182
|
+
size?: number | null;
|
|
183
|
+
duration?: number | null;
|
|
184
|
+
metadata?: Record<string, unknown> | null;
|
|
185
|
+
workflow_id: string | null;
|
|
186
|
+
node_id?: string | null;
|
|
187
|
+
job_id?: string | null;
|
|
188
|
+
created_at: string;
|
|
189
|
+
/** URL to download/access the asset (computed by API) */
|
|
190
|
+
get_url: string | null;
|
|
191
|
+
/** URL for thumbnail image (computed by API) */
|
|
192
|
+
thumb_url: string | null;
|
|
193
|
+
etag?: string | null;
|
|
194
|
+
}
|
|
195
|
+
export interface AssetList {
|
|
196
|
+
next: string | null;
|
|
197
|
+
assets: Asset[];
|
|
198
|
+
}
|
|
199
|
+
export interface AssetUpdateRequest {
|
|
200
|
+
name?: string;
|
|
201
|
+
parent_id?: string | null;
|
|
202
|
+
content_type?: string;
|
|
203
|
+
}
|
|
204
|
+
export interface WorkflowGraph {
|
|
205
|
+
nodes: Node[];
|
|
206
|
+
edges: Edge[];
|
|
207
|
+
}
|
|
208
|
+
export interface Workflow {
|
|
209
|
+
id: string;
|
|
210
|
+
user_id?: string;
|
|
211
|
+
name: string;
|
|
212
|
+
tool_name?: string | null;
|
|
213
|
+
description: string;
|
|
214
|
+
tags?: string[] | null;
|
|
215
|
+
thumbnail?: string | null;
|
|
216
|
+
thumbnail_url?: string | null;
|
|
217
|
+
graph: WorkflowGraph;
|
|
218
|
+
input_schema?: Record<string, unknown> | null;
|
|
219
|
+
output_schema?: Record<string, unknown> | null;
|
|
220
|
+
settings?: Record<string, string | number | boolean | null> | null;
|
|
221
|
+
package_name?: string | null;
|
|
222
|
+
path?: string | null;
|
|
223
|
+
run_mode?: string | null;
|
|
224
|
+
workspace_id?: string | null;
|
|
225
|
+
required_providers?: string[] | null;
|
|
226
|
+
required_models?: string[] | null;
|
|
227
|
+
html_app?: string | null;
|
|
228
|
+
receive_clipboard?: boolean | null;
|
|
229
|
+
access: string;
|
|
230
|
+
created_at: string;
|
|
231
|
+
updated_at: string;
|
|
232
|
+
etag?: string | null;
|
|
233
|
+
}
|
|
234
|
+
export interface WorkflowList {
|
|
235
|
+
next: string | null;
|
|
236
|
+
workflows: Workflow[];
|
|
237
|
+
}
|
|
238
|
+
export interface WorkflowRequest {
|
|
239
|
+
name: string;
|
|
240
|
+
tool_name?: string | null;
|
|
241
|
+
package_name?: string | null;
|
|
242
|
+
path?: string | null;
|
|
243
|
+
description?: string | null;
|
|
244
|
+
tags?: string[] | null;
|
|
245
|
+
access: string;
|
|
246
|
+
graph?: WorkflowGraph;
|
|
247
|
+
settings?: Record<string, string | number | boolean | null> | null;
|
|
248
|
+
run_mode?: string | null;
|
|
249
|
+
workspace_id?: string | null;
|
|
250
|
+
html_app?: string | null;
|
|
251
|
+
thumbnail?: string | null;
|
|
252
|
+
thumbnail_url?: string | null;
|
|
253
|
+
receive_clipboard?: boolean | null;
|
|
254
|
+
}
|
|
255
|
+
export interface WorkflowTool {
|
|
256
|
+
id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
tool_name: string;
|
|
259
|
+
description: string;
|
|
260
|
+
}
|
|
261
|
+
export interface WorkflowToolList {
|
|
262
|
+
tools: WorkflowTool[];
|
|
263
|
+
}
|
|
264
|
+
export interface Thread {
|
|
265
|
+
id: string;
|
|
266
|
+
user_id: string;
|
|
267
|
+
title: string | null;
|
|
268
|
+
created_at: string;
|
|
269
|
+
updated_at: string;
|
|
270
|
+
etag?: string | null;
|
|
271
|
+
}
|
|
272
|
+
export interface ThreadList {
|
|
273
|
+
next?: string | null;
|
|
274
|
+
threads: Thread[];
|
|
275
|
+
}
|
|
276
|
+
export interface ThreadCreateRequest {
|
|
277
|
+
title?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface ThreadUpdateRequest {
|
|
280
|
+
title: string;
|
|
281
|
+
}
|
|
282
|
+
export interface ThreadSummarizeRequest {
|
|
283
|
+
provider: string;
|
|
284
|
+
model: string;
|
|
285
|
+
content: string;
|
|
286
|
+
}
|
|
287
|
+
export interface MessageImageUrlContent {
|
|
288
|
+
type: "image_url";
|
|
289
|
+
image: ImageRef;
|
|
290
|
+
}
|
|
291
|
+
export interface MessageTextContent {
|
|
292
|
+
type: "text";
|
|
293
|
+
text: string;
|
|
294
|
+
}
|
|
295
|
+
export interface MessageImageContent {
|
|
296
|
+
type: "image_url";
|
|
297
|
+
image: ImageRef;
|
|
298
|
+
}
|
|
299
|
+
export interface MessageVideoContent {
|
|
300
|
+
type: "video";
|
|
301
|
+
video: VideoRef;
|
|
302
|
+
}
|
|
303
|
+
export interface MessageAudioContent {
|
|
304
|
+
type: "audio";
|
|
305
|
+
audio: AudioRef;
|
|
306
|
+
}
|
|
307
|
+
export interface MessageDocumentContent {
|
|
308
|
+
type: "document";
|
|
309
|
+
document: DocumentRef;
|
|
310
|
+
}
|
|
311
|
+
export interface MessageThoughtContent {
|
|
312
|
+
type: "thought";
|
|
313
|
+
text: string;
|
|
314
|
+
thought_signature?: string | null;
|
|
315
|
+
}
|
|
316
|
+
export type MessageContent = MessageTextContent | MessageImageContent | MessageImageUrlContent | MessageVideoContent | MessageAudioContent | MessageDocumentContent | MessageThoughtContent;
|
|
317
|
+
export interface ToolCall {
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
args: Record<string, unknown>;
|
|
321
|
+
result?: unknown;
|
|
322
|
+
step_id?: string | null;
|
|
323
|
+
message?: string | null;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Media-generation request metadata attached to chat messages.
|
|
327
|
+
* When `mode` is "image" or "video", the server interprets the message as a
|
|
328
|
+
* text-to-image / text-to-video request and invokes the provider's media
|
|
329
|
+
* generation API rather than a regular LLM round. The resulting assets are
|
|
330
|
+
* returned as MessageImageContent / MessageVideoContent in the assistant
|
|
331
|
+
* message and stored via the asset service.
|
|
332
|
+
*/
|
|
333
|
+
export type MediaGenerationMode = "chat" | "image" | "image_edit" | "video" | "image_to_video" | "audio" | "audio_to_video" | "retake" | "extend" | "motion_control";
|
|
334
|
+
export interface MediaGenerationRequest {
|
|
335
|
+
mode: MediaGenerationMode;
|
|
336
|
+
/** Provider id (e.g. "fal_ai", "openai", "replicate"). */
|
|
337
|
+
provider?: string | null;
|
|
338
|
+
/** Model id for the selected media model. */
|
|
339
|
+
model?: string | null;
|
|
340
|
+
/** Output width in pixels (image or video). */
|
|
341
|
+
width?: number | null;
|
|
342
|
+
/** Output height in pixels (image or video). */
|
|
343
|
+
height?: number | null;
|
|
344
|
+
/** Aspect ratio label, e.g. "16:9". */
|
|
345
|
+
aspect_ratio?: string | null;
|
|
346
|
+
/** Named resolution tier, e.g. "1K", "1080p". */
|
|
347
|
+
resolution?: string | null;
|
|
348
|
+
/** Number of variations to generate (images). */
|
|
349
|
+
variations?: number | null;
|
|
350
|
+
/** Duration in seconds (video). */
|
|
351
|
+
duration?: number | null;
|
|
352
|
+
/** Voice id for text-to-speech. */
|
|
353
|
+
voice?: string | null;
|
|
354
|
+
/** Speech rate for text-to-speech (0.25 - 4.0). */
|
|
355
|
+
speed?: number | null;
|
|
356
|
+
/** Output audio format (e.g. "mp3", "wav", "pcm"). */
|
|
357
|
+
audio_format?: string | null;
|
|
358
|
+
/** Strength for image-to-image edits (0..1). */
|
|
359
|
+
strength?: number | null;
|
|
360
|
+
/** Sampler steps for image-to-image edits. */
|
|
361
|
+
num_inference_steps?: number | null;
|
|
362
|
+
/** Source image asset id (image_edit / image_to_video). */
|
|
363
|
+
source_asset_id?: string | null;
|
|
364
|
+
/** Extra provider-specific params. */
|
|
365
|
+
extras?: Record<string, unknown> | null;
|
|
366
|
+
}
|
|
367
|
+
export interface Message {
|
|
368
|
+
type?: "message";
|
|
369
|
+
id?: string | null;
|
|
370
|
+
user_id?: string;
|
|
371
|
+
thread_id?: string | null;
|
|
372
|
+
role: string;
|
|
373
|
+
name?: string | null;
|
|
374
|
+
content?: string | MessageContent[] | Record<string, unknown> | null;
|
|
375
|
+
tool_calls?: ToolCall[] | null;
|
|
376
|
+
tool_call_id?: string | null;
|
|
377
|
+
input_files?: unknown[] | null;
|
|
378
|
+
output_files?: unknown[] | null;
|
|
379
|
+
provider?: string | null;
|
|
380
|
+
model?: string | null;
|
|
381
|
+
cost?: number | null;
|
|
382
|
+
workflow_id?: string | null;
|
|
383
|
+
graph?: Record<string, unknown> | null;
|
|
384
|
+
tools?: string[] | null;
|
|
385
|
+
collections?: string[] | null;
|
|
386
|
+
agent_mode?: boolean | null;
|
|
387
|
+
/**
|
|
388
|
+
* When `agent_mode` is true, selects which planner the server uses:
|
|
389
|
+
* - `"multi"` — TaskPlanner builds a parallel task DAG (one LLM step per
|
|
390
|
+
* task) and ParallelTaskExecutor runs them.
|
|
391
|
+
* - `"graph"` — GraphPlanner builds a workflow graph of nodes
|
|
392
|
+
* (TextToImage, AgentStep, etc.) and AgentWorkflowRunner executes it.
|
|
393
|
+
*
|
|
394
|
+
* If omitted, the server picks a default ("graph" when a NodeRegistry is
|
|
395
|
+
* wired, otherwise "multi") for backward compatibility.
|
|
396
|
+
*/
|
|
397
|
+
agent_planner?: "multi" | "graph" | null;
|
|
398
|
+
help_mode?: boolean | null;
|
|
399
|
+
agent_execution_id?: string | null;
|
|
400
|
+
execution_event_type?: string | null;
|
|
401
|
+
workflow_target?: string | null;
|
|
402
|
+
created_at?: string | null;
|
|
403
|
+
/**
|
|
404
|
+
* Media-generation metadata. When present with `mode !== "chat"` the server
|
|
405
|
+
* routes the prompt to the provider's media API instead of a regular LLM
|
|
406
|
+
* turn. Echoed back on assistant messages so the UI can render generation
|
|
407
|
+
* headers (model, variation count, resolution) alongside the output assets.
|
|
408
|
+
*/
|
|
409
|
+
media_generation?: MediaGenerationRequest | null;
|
|
410
|
+
}
|
|
411
|
+
export interface MessageCreateRequest {
|
|
412
|
+
role?: string;
|
|
413
|
+
name?: string;
|
|
414
|
+
content?: string | MessageContent[];
|
|
415
|
+
thread_id: string;
|
|
416
|
+
}
|
|
417
|
+
export interface MessageList {
|
|
418
|
+
next?: string | null;
|
|
419
|
+
messages: Message[];
|
|
420
|
+
}
|
|
421
|
+
export interface PropertyTypeMetadata {
|
|
422
|
+
type: string;
|
|
423
|
+
optional: boolean;
|
|
424
|
+
values?: Array<string | number> | null;
|
|
425
|
+
type_args: PropertyTypeMetadata[];
|
|
426
|
+
type_name?: string | null;
|
|
427
|
+
}
|
|
428
|
+
export interface Property {
|
|
429
|
+
name: string;
|
|
430
|
+
type: PropertyTypeMetadata;
|
|
431
|
+
default?: unknown;
|
|
432
|
+
title?: string | null;
|
|
433
|
+
description?: string | null;
|
|
434
|
+
min?: number | null;
|
|
435
|
+
max?: number | null;
|
|
436
|
+
values?: Array<string | number> | null;
|
|
437
|
+
json_schema_extra?: Record<string, unknown> | null;
|
|
438
|
+
required: boolean;
|
|
439
|
+
}
|
|
440
|
+
export interface OutputSlot {
|
|
441
|
+
type: PropertyTypeMetadata;
|
|
442
|
+
name: string;
|
|
443
|
+
stream: boolean;
|
|
444
|
+
}
|
|
445
|
+
export interface NodeMetadata {
|
|
446
|
+
title: string;
|
|
447
|
+
description: string;
|
|
448
|
+
namespace: string;
|
|
449
|
+
node_type: string;
|
|
450
|
+
layout: string;
|
|
451
|
+
properties: Property[];
|
|
452
|
+
outputs: OutputSlot[];
|
|
453
|
+
recommended_models: UnifiedModel[];
|
|
454
|
+
basic_fields: string[];
|
|
455
|
+
required_settings: string[];
|
|
456
|
+
is_dynamic: boolean;
|
|
457
|
+
is_streaming_output: boolean;
|
|
458
|
+
expose_as_tool: boolean;
|
|
459
|
+
supports_dynamic_outputs: boolean;
|
|
460
|
+
model_packs?: ModelPack[];
|
|
461
|
+
}
|
|
462
|
+
export interface IndexResponse {
|
|
463
|
+
node_metadata: NodeMetadata[];
|
|
464
|
+
}
|
|
465
|
+
export interface Node {
|
|
466
|
+
id: string;
|
|
467
|
+
parent_id?: string | null;
|
|
468
|
+
type: string;
|
|
469
|
+
data?: unknown;
|
|
470
|
+
ui_properties?: unknown;
|
|
471
|
+
dynamic_properties?: Record<string, unknown>;
|
|
472
|
+
dynamic_outputs?: Record<string, PropertyTypeMetadata>;
|
|
473
|
+
sync_mode: string;
|
|
474
|
+
[key: string]: unknown;
|
|
475
|
+
}
|
|
476
|
+
export interface Graph {
|
|
477
|
+
nodes: Node[];
|
|
478
|
+
edges: Edge[];
|
|
479
|
+
}
|
|
480
|
+
export interface JobResponse {
|
|
481
|
+
id: string;
|
|
482
|
+
user_id: string;
|
|
483
|
+
job_type: string;
|
|
484
|
+
workflow_id: string;
|
|
485
|
+
status: string | null;
|
|
486
|
+
error?: string | null;
|
|
487
|
+
started_at?: string | null;
|
|
488
|
+
finished_at?: string | null;
|
|
489
|
+
cost?: number | null;
|
|
490
|
+
suspended_node_id?: string | null;
|
|
491
|
+
suspension_reason?: string | null;
|
|
492
|
+
error_message?: string | null;
|
|
493
|
+
execution_strategy?: string | null;
|
|
494
|
+
is_resumable?: boolean;
|
|
495
|
+
etag?: string | null;
|
|
496
|
+
}
|
|
497
|
+
export interface JobListResponse {
|
|
498
|
+
jobs: JobResponse[];
|
|
499
|
+
next?: string | null;
|
|
500
|
+
}
|
|
501
|
+
export interface RunJobRequest {
|
|
502
|
+
type?: "run_job_request";
|
|
503
|
+
job_id?: string | null;
|
|
504
|
+
job_type?: string;
|
|
505
|
+
execution_strategy?: string;
|
|
506
|
+
workflow_id: string;
|
|
507
|
+
user_id?: string;
|
|
508
|
+
auth_token?: string;
|
|
509
|
+
api_url?: string | null;
|
|
510
|
+
params?: Record<string, unknown> | null;
|
|
511
|
+
messages?: Message[] | null;
|
|
512
|
+
env?: Record<string, unknown>;
|
|
513
|
+
graph?: WorkflowGraph;
|
|
514
|
+
explicit_types?: Record<string, string> | boolean;
|
|
515
|
+
resource_limits?: ResourceLimits | null;
|
|
516
|
+
}
|
|
517
|
+
export interface ResourceLimits {
|
|
518
|
+
max_jobs?: number;
|
|
519
|
+
max_duration_seconds?: number;
|
|
520
|
+
}
|
|
521
|
+
export type Provider = "openai" | "anthropic" | "google" | "ollama" | "huggingface" | "replicate" | "fal" | "elevenlabs" | "aime" | "local" | "empty" | string;
|
|
522
|
+
export type InferenceProvider = "cerebras" | "cohere" | "fal-ai" | "featherless-ai" | "fireworks-ai" | "groq" | "hf-inference" | "hyperbolic" | "nebius" | "novita" | "nscale" | "openai" | "replicate" | "sambanova" | "scaleway" | "together" | "zai-org" | string;
|
|
523
|
+
export interface ProviderInfo {
|
|
524
|
+
provider: Provider;
|
|
525
|
+
capabilities: string[];
|
|
526
|
+
}
|
|
527
|
+
export interface LanguageModel {
|
|
528
|
+
type: string;
|
|
529
|
+
id: string;
|
|
530
|
+
name: string;
|
|
531
|
+
provider: Provider;
|
|
532
|
+
path?: string | null;
|
|
533
|
+
supported_tasks?: string[];
|
|
534
|
+
/**
|
|
535
|
+
* Whether this model supports tool / function calling. `null` or omitted
|
|
536
|
+
* means unknown — callers should treat it as supported by default. Set
|
|
537
|
+
* explicitly to `false` for models the provider declares as
|
|
538
|
+
* non-tool-capable (e.g. HuggingFace inference models, Replicate, OpenAI
|
|
539
|
+
* `o1` family on OpenRouter).
|
|
540
|
+
*/
|
|
541
|
+
supports_tools?: boolean | null;
|
|
542
|
+
}
|
|
543
|
+
export interface EmbeddingModel {
|
|
544
|
+
type: string;
|
|
545
|
+
id: string;
|
|
546
|
+
name: string;
|
|
547
|
+
provider: Provider;
|
|
548
|
+
dimensions?: number;
|
|
549
|
+
}
|
|
550
|
+
export interface ImageModel {
|
|
551
|
+
type: string;
|
|
552
|
+
id: string;
|
|
553
|
+
name: string;
|
|
554
|
+
provider: Provider;
|
|
555
|
+
path?: string | null;
|
|
556
|
+
supported_tasks?: string[];
|
|
557
|
+
}
|
|
558
|
+
export interface TTSModel {
|
|
559
|
+
type: string;
|
|
560
|
+
id: string;
|
|
561
|
+
name: string;
|
|
562
|
+
provider: Provider;
|
|
563
|
+
path?: string | null;
|
|
564
|
+
voices?: string[];
|
|
565
|
+
selected_voice?: string;
|
|
566
|
+
}
|
|
567
|
+
export interface ASRModel {
|
|
568
|
+
type: string;
|
|
569
|
+
id: string;
|
|
570
|
+
name: string;
|
|
571
|
+
provider: Provider;
|
|
572
|
+
path?: string | null;
|
|
573
|
+
}
|
|
574
|
+
export interface VideoModel {
|
|
575
|
+
type: string;
|
|
576
|
+
id: string;
|
|
577
|
+
name: string;
|
|
578
|
+
provider: Provider;
|
|
579
|
+
path?: string | null;
|
|
580
|
+
supported_tasks?: string[];
|
|
581
|
+
}
|
|
582
|
+
export interface LlamaModel {
|
|
583
|
+
repo_id: string;
|
|
584
|
+
name?: string;
|
|
585
|
+
}
|
|
586
|
+
export interface HuggingFaceModel {
|
|
587
|
+
repo_id: string;
|
|
588
|
+
type?: string;
|
|
589
|
+
name?: string;
|
|
590
|
+
path?: string;
|
|
591
|
+
allow_patterns?: string[] | null;
|
|
592
|
+
ignore_patterns?: string[] | null;
|
|
593
|
+
downloaded?: boolean | null;
|
|
594
|
+
size_on_disk?: number | null;
|
|
595
|
+
pipeline_tag?: string | null;
|
|
596
|
+
supported_tasks?: string[] | null;
|
|
597
|
+
trending_score?: number | null;
|
|
598
|
+
image?: string | null;
|
|
599
|
+
description?: string | null;
|
|
600
|
+
tags?: string[] | null;
|
|
601
|
+
}
|
|
602
|
+
export interface UnifiedModel {
|
|
603
|
+
id: string;
|
|
604
|
+
name: string;
|
|
605
|
+
provider?: Provider;
|
|
606
|
+
type?: string | null;
|
|
607
|
+
repo_id?: string | null;
|
|
608
|
+
path?: string | null;
|
|
609
|
+
artifact_family?: string | null;
|
|
610
|
+
artifact_component?: string | null;
|
|
611
|
+
artifact_confidence?: number | null;
|
|
612
|
+
artifact_evidence?: string[] | null;
|
|
613
|
+
cache_path?: string | null;
|
|
614
|
+
allow_patterns?: string[] | null;
|
|
615
|
+
ignore_patterns?: string[] | null;
|
|
616
|
+
description?: string | null;
|
|
617
|
+
readme?: string | null;
|
|
618
|
+
downloaded?: boolean | null;
|
|
619
|
+
size_on_disk?: number | null;
|
|
620
|
+
pipeline_tag?: string | null;
|
|
621
|
+
tags?: string[] | null;
|
|
622
|
+
has_model_index?: boolean | null;
|
|
623
|
+
downloads?: number | null;
|
|
624
|
+
likes?: number | null;
|
|
625
|
+
supported_tasks?: string[] | null;
|
|
626
|
+
trending_score?: number | null;
|
|
627
|
+
image?: string | null;
|
|
628
|
+
/** See {@link LanguageModel.supports_tools}. Only meaningful for LLMs. */
|
|
629
|
+
supports_tools?: boolean | null;
|
|
630
|
+
/** Voice IDs supported by this model. Only meaningful for TTS models. */
|
|
631
|
+
voices?: string[] | null;
|
|
632
|
+
}
|
|
633
|
+
export interface ModelPack {
|
|
634
|
+
id?: string;
|
|
635
|
+
name?: string;
|
|
636
|
+
title?: string;
|
|
637
|
+
description?: string;
|
|
638
|
+
category?: string;
|
|
639
|
+
tags?: string[];
|
|
640
|
+
models: UnifiedModel[];
|
|
641
|
+
total_size?: number | null;
|
|
642
|
+
}
|
|
643
|
+
export interface SystemStats {
|
|
644
|
+
cpu_percent: number;
|
|
645
|
+
memory_percent: number;
|
|
646
|
+
memory_used?: number;
|
|
647
|
+
memory_total?: number;
|
|
648
|
+
memory_total_gb?: number;
|
|
649
|
+
memory_used_gb?: number;
|
|
650
|
+
disk_percent?: number;
|
|
651
|
+
gpu_percent?: number;
|
|
652
|
+
gpu_memory_percent?: number;
|
|
653
|
+
vram_total_gb?: number | null;
|
|
654
|
+
vram_used_gb?: number | null;
|
|
655
|
+
vram_percent?: number | null;
|
|
656
|
+
}
|
|
657
|
+
export interface SecretResponse {
|
|
658
|
+
id?: string | null;
|
|
659
|
+
user_id?: string | null;
|
|
660
|
+
key: string;
|
|
661
|
+
description?: string | null;
|
|
662
|
+
created_at?: string | null;
|
|
663
|
+
updated_at?: string | null;
|
|
664
|
+
is_configured: boolean;
|
|
665
|
+
is_unreadable?: boolean;
|
|
666
|
+
is_set?: boolean;
|
|
667
|
+
group?: string;
|
|
668
|
+
}
|
|
669
|
+
export interface Task {
|
|
670
|
+
id?: string;
|
|
671
|
+
name?: string;
|
|
672
|
+
title?: string;
|
|
673
|
+
description?: string;
|
|
674
|
+
instructions?: string;
|
|
675
|
+
status?: string;
|
|
676
|
+
steps?: Step[];
|
|
677
|
+
result?: unknown;
|
|
678
|
+
error?: string | null;
|
|
679
|
+
[key: string]: unknown;
|
|
680
|
+
}
|
|
681
|
+
export interface TaskPlan {
|
|
682
|
+
type?: "task_plan";
|
|
683
|
+
title?: string;
|
|
684
|
+
task?: Task;
|
|
685
|
+
tasks?: Task[];
|
|
686
|
+
steps?: Step[];
|
|
687
|
+
}
|
|
688
|
+
export interface Step {
|
|
689
|
+
id?: string;
|
|
690
|
+
name?: string;
|
|
691
|
+
instructions?: string;
|
|
692
|
+
status?: string;
|
|
693
|
+
tool?: string | null;
|
|
694
|
+
result?: unknown;
|
|
695
|
+
error?: string | null;
|
|
696
|
+
completed?: boolean;
|
|
697
|
+
start_time?: number;
|
|
698
|
+
[key: string]: unknown;
|
|
699
|
+
}
|
|
700
|
+
export interface FileInfo {
|
|
701
|
+
name: string;
|
|
702
|
+
path: string;
|
|
703
|
+
is_dir: boolean;
|
|
704
|
+
size: number;
|
|
705
|
+
modified_at: string;
|
|
706
|
+
}
|
|
707
|
+
export interface WorkspaceFileInfo {
|
|
708
|
+
name: string;
|
|
709
|
+
path: string;
|
|
710
|
+
is_dir: boolean;
|
|
711
|
+
size: number;
|
|
712
|
+
modified_at: string;
|
|
713
|
+
}
|
|
714
|
+
export interface RepoPath {
|
|
715
|
+
repo_id: string;
|
|
716
|
+
path: string;
|
|
717
|
+
downloaded: boolean;
|
|
718
|
+
}
|
|
719
|
+
export interface CollectionResponse {
|
|
720
|
+
name: string;
|
|
721
|
+
count: number;
|
|
722
|
+
metadata?: Record<string, unknown>;
|
|
723
|
+
workflow_name?: string | null;
|
|
724
|
+
}
|
|
725
|
+
export interface CollectionList {
|
|
726
|
+
collections: CollectionResponse[];
|
|
727
|
+
count?: number;
|
|
728
|
+
}
|
|
729
|
+
export interface CollectionCreate {
|
|
730
|
+
name: string;
|
|
731
|
+
embedding_model: string;
|
|
732
|
+
embedding_provider?: string | null;
|
|
733
|
+
metadata?: Record<string, unknown>;
|
|
734
|
+
}
|
|
735
|
+
export interface WorkspaceResponse {
|
|
736
|
+
id: string;
|
|
737
|
+
user_id: string;
|
|
738
|
+
name: string;
|
|
739
|
+
path: string;
|
|
740
|
+
is_default?: boolean;
|
|
741
|
+
is_accessible?: boolean;
|
|
742
|
+
description?: string;
|
|
743
|
+
created_at: string;
|
|
744
|
+
updated_at: string;
|
|
745
|
+
}
|
|
746
|
+
export interface WorkspaceListResponse {
|
|
747
|
+
workspaces: WorkspaceResponse[];
|
|
748
|
+
next?: string | null;
|
|
749
|
+
}
|
|
750
|
+
export interface WorkspaceCreateRequest {
|
|
751
|
+
name: string;
|
|
752
|
+
description?: string;
|
|
753
|
+
}
|
|
754
|
+
export interface WorkspaceUpdateRequest {
|
|
755
|
+
name?: string;
|
|
756
|
+
description?: string;
|
|
757
|
+
}
|
|
758
|
+
export type WorkflowVersionSaveType = "manual" | "autosave" | "checkpoint" | "restore";
|
|
759
|
+
export interface WorkflowVersion {
|
|
760
|
+
id: string;
|
|
761
|
+
workflow_id: string;
|
|
762
|
+
user_id?: string;
|
|
763
|
+
version: number;
|
|
764
|
+
created_at: string;
|
|
765
|
+
name: string;
|
|
766
|
+
description: string;
|
|
767
|
+
save_type: string;
|
|
768
|
+
autosave_metadata?: Record<string, unknown> | null;
|
|
769
|
+
is_pinned?: boolean;
|
|
770
|
+
graph: WorkflowGraph;
|
|
771
|
+
}
|
|
772
|
+
export interface WorkflowVersionList {
|
|
773
|
+
next: string | null;
|
|
774
|
+
versions: WorkflowVersion[];
|
|
775
|
+
}
|
|
776
|
+
export interface CreateWorkflowVersionRequest {
|
|
777
|
+
name?: string;
|
|
778
|
+
description?: string;
|
|
779
|
+
}
|
|
780
|
+
export interface AutosaveWorkflowRequest {
|
|
781
|
+
save_type?: string;
|
|
782
|
+
description?: string;
|
|
783
|
+
force?: boolean;
|
|
784
|
+
client_id?: string | null;
|
|
785
|
+
graph?: WorkflowGraph | null;
|
|
786
|
+
max_versions?: number | null;
|
|
787
|
+
}
|
|
788
|
+
export interface AutosaveResponse {
|
|
789
|
+
version?: WorkflowVersion | null;
|
|
790
|
+
message: string;
|
|
791
|
+
skipped?: boolean;
|
|
792
|
+
}
|
|
793
|
+
export interface SettingWithValue {
|
|
794
|
+
package_name: string;
|
|
795
|
+
env_var: string;
|
|
796
|
+
group: string;
|
|
797
|
+
description: string;
|
|
798
|
+
enum?: string[] | null;
|
|
799
|
+
value?: unknown;
|
|
800
|
+
is_secret: boolean;
|
|
801
|
+
}
|
|
802
|
+
export interface SettingsResponse {
|
|
803
|
+
settings: SettingWithValue[];
|
|
804
|
+
}
|
|
805
|
+
export interface SettingsUpdateRequest {
|
|
806
|
+
settings: Record<string, unknown>;
|
|
807
|
+
secrets?: Record<string, unknown>;
|
|
808
|
+
}
|
|
809
|
+
//# sourceMappingURL=api-types.d.ts.map
|