@nodetool-ai/cli-workflow 0.0.0-stage → 0.8.9-beta.2
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/README.md +14 -2
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/api-client.d.ts +580 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +34 -0
- package/dist/api-client.js.map +1 -0
- package/dist/commands/collections.d.ts +10 -0
- package/dist/commands/collections.d.ts.map +1 -0
- package/dist/commands/collections.js +257 -0
- package/dist/commands/collections.js.map +1 -0
- package/dist/commands/costs.d.ts +15 -0
- package/dist/commands/costs.d.ts.map +1 -0
- package/dist/commands/costs.js +201 -0
- package/dist/commands/costs.js.map +1 -0
- package/dist/commands/debug.d.ts +13 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +149 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/errors.d.ts +11 -0
- package/dist/commands/errors.d.ts.map +1 -0
- package/dist/commands/errors.js +177 -0
- package/dist/commands/errors.js.map +1 -0
- package/dist/commands/generate.d.ts +17 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +326 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/generations.d.ts +17 -0
- package/dist/commands/generations.d.ts.map +1 -0
- package/dist/commands/generations.js +408 -0
- package/dist/commands/generations.js.map +1 -0
- package/dist/commands/install-missing-packs.d.ts +21 -0
- package/dist/commands/install-missing-packs.d.ts.map +1 -0
- package/dist/commands/install-missing-packs.js +48 -0
- package/dist/commands/install-missing-packs.js.map +1 -0
- package/dist/commands/node.d.ts +10 -0
- package/dist/commands/node.d.ts.map +1 -0
- package/dist/commands/node.js +130 -0
- package/dist/commands/node.js.map +1 -0
- package/dist/commands/projects.d.ts +11 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +145 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/resource-read.d.ts +28 -0
- package/dist/commands/resource-read.d.ts.map +1 -0
- package/dist/commands/resource-read.js +314 -0
- package/dist/commands/resource-read.js.map +1 -0
- package/dist/commands/runs.d.ts +7 -0
- package/dist/commands/runs.d.ts.map +1 -0
- package/dist/commands/runs.js +302 -0
- package/dist/commands/runs.js.map +1 -0
- package/dist/commands/validate.d.ts +24 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +132 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1034 -0
- package/dist/index.js.map +1 -0
- package/dist/nodetool.d.ts +3 -0
- package/dist/nodetool.d.ts.map +1 -0
- package/dist/nodetool.js +4 -0
- package/dist/nodetool.js.map +1 -0
- package/dist/packs/command-service.d.ts +3 -0
- package/dist/packs/command-service.d.ts.map +1 -0
- package/dist/packs/command-service.js +9 -0
- package/dist/packs/command-service.js.map +1 -0
- package/dist/workflow-packs.d.ts +7 -0
- package/dist/workflow-packs.d.ts.map +1 -0
- package/dist/workflow-packs.js +31 -0
- package/dist/workflow-packs.js.map +1 -0
- package/package.json +73 -4
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Workflow commands
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Extended workflow execution, authored JavaScript/TypeScript workflows, debugging,
|
|
4
|
+
node tools and workflow resource operations. JSON execution also remains in the
|
|
5
|
+
default CLI.
|
|
6
|
+
|
|
7
|
+
Install this independent command feature through the default CLI:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
nodetool packs add cli-workflow --yes
|
|
11
|
+
nodetool debug --help
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Commands do not install missing features automatically. See the
|
|
15
|
+
[command reference](../../docs/cli.md#install-command-features).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2026-10-31T10:35:20.376Z
|
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
/** The command family's response contracts use the shared HTTP transport and protocol schemas. */
|
|
2
|
+
export declare function createApiClient(apiUrl: string): {
|
|
3
|
+
workflows: {
|
|
4
|
+
list: {
|
|
5
|
+
query: (input: unknown, options?: {
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
}) => Promise<{
|
|
8
|
+
workflows: {
|
|
9
|
+
id: string;
|
|
10
|
+
project_id?: string | undefined;
|
|
11
|
+
access: string;
|
|
12
|
+
created_at?: string | null | undefined;
|
|
13
|
+
updated_at?: string | null | undefined;
|
|
14
|
+
name: string;
|
|
15
|
+
tool_name: string | null;
|
|
16
|
+
description?: string | null | undefined;
|
|
17
|
+
tags?: string[] | null | undefined;
|
|
18
|
+
thumbnail: string | null;
|
|
19
|
+
thumbnail_url: string | null;
|
|
20
|
+
graph?: {
|
|
21
|
+
nodes: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
id: string;
|
|
24
|
+
type: string;
|
|
25
|
+
parent_id?: string | null | undefined;
|
|
26
|
+
data?: unknown;
|
|
27
|
+
ui_properties?: unknown;
|
|
28
|
+
dynamic_properties?: Record<string, unknown> | undefined;
|
|
29
|
+
dynamic_outputs?: Record<string, unknown> | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
edges: {
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
id?: string | null | undefined;
|
|
34
|
+
source: string;
|
|
35
|
+
sourceHandle: string;
|
|
36
|
+
target: string;
|
|
37
|
+
targetHandle: string;
|
|
38
|
+
ui_properties?: Record<string, string> | null | undefined;
|
|
39
|
+
edge_type?: string | undefined;
|
|
40
|
+
}[];
|
|
41
|
+
links?: {
|
|
42
|
+
id: string;
|
|
43
|
+
source: string;
|
|
44
|
+
target: string;
|
|
45
|
+
label?: string | null | undefined;
|
|
46
|
+
kind?: string | null | undefined;
|
|
47
|
+
}[] | undefined;
|
|
48
|
+
} | null | undefined;
|
|
49
|
+
input_schema: unknown;
|
|
50
|
+
output_schema: unknown;
|
|
51
|
+
settings?: Record<string, unknown> | null | undefined;
|
|
52
|
+
package_name: string | null;
|
|
53
|
+
path: string | null;
|
|
54
|
+
run_mode: string | null;
|
|
55
|
+
workspace_id: string | null;
|
|
56
|
+
required_providers: unknown;
|
|
57
|
+
required_models: unknown;
|
|
58
|
+
needs?: {
|
|
59
|
+
modelKinds: string[];
|
|
60
|
+
requiredSettings: string[];
|
|
61
|
+
} | null | undefined;
|
|
62
|
+
html_app: string | null;
|
|
63
|
+
app_doc?: Record<string, unknown> | null | undefined;
|
|
64
|
+
etag: string | null;
|
|
65
|
+
}[];
|
|
66
|
+
next: string | null;
|
|
67
|
+
}>;
|
|
68
|
+
};
|
|
69
|
+
get: {
|
|
70
|
+
query: (input: unknown, options?: {
|
|
71
|
+
signal?: AbortSignal;
|
|
72
|
+
}) => Promise<{
|
|
73
|
+
id: string;
|
|
74
|
+
project_id?: string | undefined;
|
|
75
|
+
access: string;
|
|
76
|
+
created_at?: string | null | undefined;
|
|
77
|
+
updated_at?: string | null | undefined;
|
|
78
|
+
name: string;
|
|
79
|
+
tool_name: string | null;
|
|
80
|
+
description?: string | null | undefined;
|
|
81
|
+
tags?: string[] | null | undefined;
|
|
82
|
+
thumbnail: string | null;
|
|
83
|
+
thumbnail_url: string | null;
|
|
84
|
+
graph?: {
|
|
85
|
+
nodes: {
|
|
86
|
+
[x: string]: unknown;
|
|
87
|
+
id: string;
|
|
88
|
+
type: string;
|
|
89
|
+
parent_id?: string | null | undefined;
|
|
90
|
+
data?: unknown;
|
|
91
|
+
ui_properties?: unknown;
|
|
92
|
+
dynamic_properties?: Record<string, unknown> | undefined;
|
|
93
|
+
dynamic_outputs?: Record<string, unknown> | undefined;
|
|
94
|
+
}[];
|
|
95
|
+
edges: {
|
|
96
|
+
[x: string]: unknown;
|
|
97
|
+
id?: string | null | undefined;
|
|
98
|
+
source: string;
|
|
99
|
+
sourceHandle: string;
|
|
100
|
+
target: string;
|
|
101
|
+
targetHandle: string;
|
|
102
|
+
ui_properties?: Record<string, string> | null | undefined;
|
|
103
|
+
edge_type?: string | undefined;
|
|
104
|
+
}[];
|
|
105
|
+
links?: {
|
|
106
|
+
id: string;
|
|
107
|
+
source: string;
|
|
108
|
+
target: string;
|
|
109
|
+
label?: string | null | undefined;
|
|
110
|
+
kind?: string | null | undefined;
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
} | null | undefined;
|
|
113
|
+
input_schema: unknown;
|
|
114
|
+
output_schema: unknown;
|
|
115
|
+
settings?: Record<string, unknown> | null | undefined;
|
|
116
|
+
package_name: string | null;
|
|
117
|
+
path: string | null;
|
|
118
|
+
run_mode: string | null;
|
|
119
|
+
workspace_id: string | null;
|
|
120
|
+
required_providers: unknown;
|
|
121
|
+
required_models: unknown;
|
|
122
|
+
needs?: {
|
|
123
|
+
modelKinds: string[];
|
|
124
|
+
requiredSettings: string[];
|
|
125
|
+
} | null | undefined;
|
|
126
|
+
html_app: string | null;
|
|
127
|
+
app_doc?: Record<string, unknown> | null | undefined;
|
|
128
|
+
etag: string | null;
|
|
129
|
+
}>;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
jobs: {
|
|
133
|
+
list: {
|
|
134
|
+
query: (input: unknown, options?: {
|
|
135
|
+
signal?: AbortSignal;
|
|
136
|
+
}) => Promise<{
|
|
137
|
+
jobs: {
|
|
138
|
+
id: string;
|
|
139
|
+
user_id: string;
|
|
140
|
+
project_id?: string | undefined;
|
|
141
|
+
job_type: "workflow";
|
|
142
|
+
status: string;
|
|
143
|
+
name: string | null;
|
|
144
|
+
workflow_id: string;
|
|
145
|
+
started_at: string | null;
|
|
146
|
+
finished_at: string | null;
|
|
147
|
+
error: string | null;
|
|
148
|
+
cost: number | null;
|
|
149
|
+
outputs: Record<string, unknown> | null;
|
|
150
|
+
}[];
|
|
151
|
+
next_start_key: string | null;
|
|
152
|
+
}>;
|
|
153
|
+
};
|
|
154
|
+
get: {
|
|
155
|
+
query: (input: unknown, options?: {
|
|
156
|
+
signal?: AbortSignal;
|
|
157
|
+
}) => Promise<{
|
|
158
|
+
id: string;
|
|
159
|
+
user_id: string;
|
|
160
|
+
project_id?: string | undefined;
|
|
161
|
+
job_type: "workflow";
|
|
162
|
+
status: string;
|
|
163
|
+
name: string | null;
|
|
164
|
+
workflow_id: string;
|
|
165
|
+
started_at: string | null;
|
|
166
|
+
finished_at: string | null;
|
|
167
|
+
error: string | null;
|
|
168
|
+
cost: number | null;
|
|
169
|
+
outputs: Record<string, unknown> | null;
|
|
170
|
+
}>;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
assets: {
|
|
174
|
+
list: {
|
|
175
|
+
query: (input: unknown, options?: {
|
|
176
|
+
signal?: AbortSignal;
|
|
177
|
+
}) => Promise<{
|
|
178
|
+
assets: {
|
|
179
|
+
id: string;
|
|
180
|
+
user_id: string;
|
|
181
|
+
workflow_id: string | null;
|
|
182
|
+
parent_id: string | null;
|
|
183
|
+
name: string;
|
|
184
|
+
content_type: string;
|
|
185
|
+
size: number | null;
|
|
186
|
+
metadata: Record<string, unknown> | null;
|
|
187
|
+
sketch_document_id: string | null;
|
|
188
|
+
created_at: string;
|
|
189
|
+
updated_at?: string | undefined;
|
|
190
|
+
get_url: string | null;
|
|
191
|
+
thumb_url: string | null;
|
|
192
|
+
duration: number | null;
|
|
193
|
+
node_id: string | null;
|
|
194
|
+
job_id: string | null;
|
|
195
|
+
timeline_id?: string | null | undefined;
|
|
196
|
+
project_id?: string | undefined;
|
|
197
|
+
favorite?: boolean | undefined;
|
|
198
|
+
offline?: boolean | undefined;
|
|
199
|
+
proxy_status?: "failed" | "none" | "queued" | "ready" | "running" | undefined;
|
|
200
|
+
proxy_url?: string | null | undefined;
|
|
201
|
+
}[];
|
|
202
|
+
next: string | null;
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
get: {
|
|
206
|
+
query: (input: unknown, options?: {
|
|
207
|
+
signal?: AbortSignal;
|
|
208
|
+
}) => Promise<{
|
|
209
|
+
id: string;
|
|
210
|
+
user_id: string;
|
|
211
|
+
workflow_id: string | null;
|
|
212
|
+
parent_id: string | null;
|
|
213
|
+
name: string;
|
|
214
|
+
content_type: string;
|
|
215
|
+
size: number | null;
|
|
216
|
+
metadata: Record<string, unknown> | null;
|
|
217
|
+
sketch_document_id: string | null;
|
|
218
|
+
created_at: string;
|
|
219
|
+
updated_at?: string | undefined;
|
|
220
|
+
get_url: string | null;
|
|
221
|
+
thumb_url: string | null;
|
|
222
|
+
duration: number | null;
|
|
223
|
+
node_id: string | null;
|
|
224
|
+
job_id: string | null;
|
|
225
|
+
timeline_id?: string | null | undefined;
|
|
226
|
+
project_id?: string | undefined;
|
|
227
|
+
favorite?: boolean | undefined;
|
|
228
|
+
offline?: boolean | undefined;
|
|
229
|
+
proxy_status?: "failed" | "none" | "queued" | "ready" | "running" | undefined;
|
|
230
|
+
proxy_url?: string | null | undefined;
|
|
231
|
+
}>;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
runs: {
|
|
235
|
+
list: {
|
|
236
|
+
query: (input: unknown, options?: {
|
|
237
|
+
signal?: AbortSignal;
|
|
238
|
+
}) => Promise<{
|
|
239
|
+
runs: {
|
|
240
|
+
id: string;
|
|
241
|
+
user_id: string;
|
|
242
|
+
kind: "app" | "chat" | "workflow";
|
|
243
|
+
source_id: string;
|
|
244
|
+
parent_run_id: string | null;
|
|
245
|
+
trace_id: string;
|
|
246
|
+
root_span_id: string | null;
|
|
247
|
+
origin: "agent" | "cli" | "debug" | "public" | "ui";
|
|
248
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
249
|
+
started_at: string;
|
|
250
|
+
ended_at: string | null;
|
|
251
|
+
cost_usd: number | null;
|
|
252
|
+
error: string | null;
|
|
253
|
+
content_expired: number;
|
|
254
|
+
truncated: number;
|
|
255
|
+
incomplete: number;
|
|
256
|
+
parents: {
|
|
257
|
+
kind: "app" | "app_run" | "instance" | "job" | "message" | "thread" | "workflow";
|
|
258
|
+
id: string;
|
|
259
|
+
}[];
|
|
260
|
+
parents_limited: boolean;
|
|
261
|
+
app?: {
|
|
262
|
+
instance_id: string | null;
|
|
263
|
+
operation_id: string;
|
|
264
|
+
app_version: number | null;
|
|
265
|
+
application_id: string | null;
|
|
266
|
+
actual_usd?: number | null | undefined;
|
|
267
|
+
cost_state?: "settled" | "unavailable" | "unsettled" | undefined;
|
|
268
|
+
result_reference?: {
|
|
269
|
+
type: "audio" | "image" | "video";
|
|
270
|
+
asset_id: string;
|
|
271
|
+
} | null | undefined;
|
|
272
|
+
inputs?: Record<string, unknown> | null | undefined;
|
|
273
|
+
outputs?: Record<string, unknown> | null | undefined;
|
|
274
|
+
content_limited?: boolean | undefined;
|
|
275
|
+
} | undefined;
|
|
276
|
+
}[];
|
|
277
|
+
next_cursor: string | null;
|
|
278
|
+
}>;
|
|
279
|
+
};
|
|
280
|
+
get: {
|
|
281
|
+
query: (input: unknown, options?: {
|
|
282
|
+
signal?: AbortSignal;
|
|
283
|
+
}) => Promise<{
|
|
284
|
+
run: {
|
|
285
|
+
id: string;
|
|
286
|
+
user_id: string;
|
|
287
|
+
kind: "app" | "chat" | "workflow";
|
|
288
|
+
source_id: string;
|
|
289
|
+
parent_run_id: string | null;
|
|
290
|
+
trace_id: string;
|
|
291
|
+
root_span_id: string | null;
|
|
292
|
+
origin: "agent" | "cli" | "debug" | "public" | "ui";
|
|
293
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
294
|
+
started_at: string;
|
|
295
|
+
ended_at: string | null;
|
|
296
|
+
cost_usd: number | null;
|
|
297
|
+
error: string | null;
|
|
298
|
+
content_expired: number;
|
|
299
|
+
truncated: number;
|
|
300
|
+
incomplete: number;
|
|
301
|
+
parents: {
|
|
302
|
+
kind: "app" | "app_run" | "instance" | "job" | "message" | "thread" | "workflow";
|
|
303
|
+
id: string;
|
|
304
|
+
}[];
|
|
305
|
+
parents_limited: boolean;
|
|
306
|
+
app?: {
|
|
307
|
+
instance_id: string | null;
|
|
308
|
+
operation_id: string;
|
|
309
|
+
app_version: number | null;
|
|
310
|
+
application_id: string | null;
|
|
311
|
+
actual_usd?: number | null | undefined;
|
|
312
|
+
cost_state?: "settled" | "unavailable" | "unsettled" | undefined;
|
|
313
|
+
result_reference?: {
|
|
314
|
+
type: "audio" | "image" | "video";
|
|
315
|
+
asset_id: string;
|
|
316
|
+
} | null | undefined;
|
|
317
|
+
inputs?: Record<string, unknown> | null | undefined;
|
|
318
|
+
outputs?: Record<string, unknown> | null | undefined;
|
|
319
|
+
content_limited?: boolean | undefined;
|
|
320
|
+
} | undefined;
|
|
321
|
+
};
|
|
322
|
+
summary: {
|
|
323
|
+
content_state: "absent" | "available" | "expired" | "public" | "suppressed";
|
|
324
|
+
content_expired: boolean;
|
|
325
|
+
truncated: boolean;
|
|
326
|
+
incomplete: boolean;
|
|
327
|
+
first_failed_span_id: string | null;
|
|
328
|
+
failure_path: {
|
|
329
|
+
span_id: string;
|
|
330
|
+
parent_span_id: string | null;
|
|
331
|
+
name: string;
|
|
332
|
+
status: "ERROR" | "OK" | "UNSET";
|
|
333
|
+
duration_ms: number;
|
|
334
|
+
error: string | null;
|
|
335
|
+
}[];
|
|
336
|
+
cost_by_provider: Record<string, number>;
|
|
337
|
+
slowest_spans: {
|
|
338
|
+
span_id: string;
|
|
339
|
+
parent_span_id: string | null;
|
|
340
|
+
name: string;
|
|
341
|
+
status: "ERROR" | "OK" | "UNSET";
|
|
342
|
+
duration_ms: number;
|
|
343
|
+
error: string | null;
|
|
344
|
+
}[];
|
|
345
|
+
counts_by_name: Record<string, number>;
|
|
346
|
+
span_count: number;
|
|
347
|
+
event_count: number;
|
|
348
|
+
generation_ids: string[];
|
|
349
|
+
document_ids: string[];
|
|
350
|
+
documents: {
|
|
351
|
+
kind: string;
|
|
352
|
+
id: string;
|
|
353
|
+
}[];
|
|
354
|
+
documents_limited: boolean;
|
|
355
|
+
summary_truncated: boolean;
|
|
356
|
+
};
|
|
357
|
+
}>;
|
|
358
|
+
};
|
|
359
|
+
trace: {
|
|
360
|
+
query: (input: unknown, options?: {
|
|
361
|
+
signal?: AbortSignal;
|
|
362
|
+
}) => Promise<{
|
|
363
|
+
content_state: "absent" | "available" | "expired" | "public" | "suppressed";
|
|
364
|
+
content_expired: boolean;
|
|
365
|
+
truncated: boolean;
|
|
366
|
+
incomplete: boolean;
|
|
367
|
+
run: {
|
|
368
|
+
id: string;
|
|
369
|
+
user_id: string;
|
|
370
|
+
kind: "app" | "chat" | "workflow";
|
|
371
|
+
source_id: string;
|
|
372
|
+
parent_run_id: string | null;
|
|
373
|
+
trace_id: string;
|
|
374
|
+
root_span_id: string | null;
|
|
375
|
+
origin: "agent" | "cli" | "debug" | "public" | "ui";
|
|
376
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
377
|
+
started_at: string;
|
|
378
|
+
ended_at: string | null;
|
|
379
|
+
cost_usd: number | null;
|
|
380
|
+
error: string | null;
|
|
381
|
+
content_expired: number;
|
|
382
|
+
truncated: number;
|
|
383
|
+
incomplete: number;
|
|
384
|
+
parents: {
|
|
385
|
+
kind: "app" | "app_run" | "instance" | "job" | "message" | "thread" | "workflow";
|
|
386
|
+
id: string;
|
|
387
|
+
}[];
|
|
388
|
+
parents_limited: boolean;
|
|
389
|
+
app?: {
|
|
390
|
+
instance_id: string | null;
|
|
391
|
+
operation_id: string;
|
|
392
|
+
app_version: number | null;
|
|
393
|
+
application_id: string | null;
|
|
394
|
+
actual_usd?: number | null | undefined;
|
|
395
|
+
cost_state?: "settled" | "unavailable" | "unsettled" | undefined;
|
|
396
|
+
result_reference?: {
|
|
397
|
+
type: "audio" | "image" | "video";
|
|
398
|
+
asset_id: string;
|
|
399
|
+
} | null | undefined;
|
|
400
|
+
inputs?: Record<string, unknown> | null | undefined;
|
|
401
|
+
outputs?: Record<string, unknown> | null | undefined;
|
|
402
|
+
content_limited?: boolean | undefined;
|
|
403
|
+
} | undefined;
|
|
404
|
+
};
|
|
405
|
+
nodes: {
|
|
406
|
+
record: {
|
|
407
|
+
trace_id: string;
|
|
408
|
+
span_id: string;
|
|
409
|
+
parent_span_id: string | null;
|
|
410
|
+
name: string;
|
|
411
|
+
kind: "CLIENT" | "CONSUMER" | "INTERNAL" | "PRODUCER" | "SERVER";
|
|
412
|
+
start_time_ms: number;
|
|
413
|
+
end_time_ms: number;
|
|
414
|
+
duration_ms: number;
|
|
415
|
+
status: {
|
|
416
|
+
code: "ERROR" | "OK" | "UNSET";
|
|
417
|
+
message?: string | undefined;
|
|
418
|
+
};
|
|
419
|
+
attributes: Record<string, unknown>;
|
|
420
|
+
events: {
|
|
421
|
+
id?: string | undefined;
|
|
422
|
+
name: string;
|
|
423
|
+
time_ms: number;
|
|
424
|
+
attributes?: Record<string, unknown> | undefined;
|
|
425
|
+
}[];
|
|
426
|
+
resource: Record<string, unknown>;
|
|
427
|
+
};
|
|
428
|
+
depth: number;
|
|
429
|
+
}[];
|
|
430
|
+
next_cursor: null;
|
|
431
|
+
limited: boolean;
|
|
432
|
+
}>;
|
|
433
|
+
};
|
|
434
|
+
logs: {
|
|
435
|
+
query: (input: unknown, options?: {
|
|
436
|
+
signal?: AbortSignal;
|
|
437
|
+
}) => Promise<{
|
|
438
|
+
content_state: "absent" | "available" | "expired" | "public" | "suppressed";
|
|
439
|
+
content_expired: boolean;
|
|
440
|
+
truncated: boolean;
|
|
441
|
+
incomplete: boolean;
|
|
442
|
+
run: {
|
|
443
|
+
id: string;
|
|
444
|
+
user_id: string;
|
|
445
|
+
kind: "app" | "chat" | "workflow";
|
|
446
|
+
source_id: string;
|
|
447
|
+
parent_run_id: string | null;
|
|
448
|
+
trace_id: string;
|
|
449
|
+
root_span_id: string | null;
|
|
450
|
+
origin: "agent" | "cli" | "debug" | "public" | "ui";
|
|
451
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
452
|
+
started_at: string;
|
|
453
|
+
ended_at: string | null;
|
|
454
|
+
cost_usd: number | null;
|
|
455
|
+
error: string | null;
|
|
456
|
+
content_expired: number;
|
|
457
|
+
truncated: number;
|
|
458
|
+
incomplete: number;
|
|
459
|
+
parents: {
|
|
460
|
+
kind: "app" | "app_run" | "instance" | "job" | "message" | "thread" | "workflow";
|
|
461
|
+
id: string;
|
|
462
|
+
}[];
|
|
463
|
+
parents_limited: boolean;
|
|
464
|
+
app?: {
|
|
465
|
+
instance_id: string | null;
|
|
466
|
+
operation_id: string;
|
|
467
|
+
app_version: number | null;
|
|
468
|
+
application_id: string | null;
|
|
469
|
+
actual_usd?: number | null | undefined;
|
|
470
|
+
cost_state?: "settled" | "unavailable" | "unsettled" | undefined;
|
|
471
|
+
result_reference?: {
|
|
472
|
+
type: "audio" | "image" | "video";
|
|
473
|
+
asset_id: string;
|
|
474
|
+
} | null | undefined;
|
|
475
|
+
inputs?: Record<string, unknown> | null | undefined;
|
|
476
|
+
outputs?: Record<string, unknown> | null | undefined;
|
|
477
|
+
content_limited?: boolean | undefined;
|
|
478
|
+
} | undefined;
|
|
479
|
+
};
|
|
480
|
+
logs: {
|
|
481
|
+
id: string;
|
|
482
|
+
span_id: string;
|
|
483
|
+
span_name: string;
|
|
484
|
+
time_ms: number;
|
|
485
|
+
name: string;
|
|
486
|
+
level: string | null;
|
|
487
|
+
source: string | null;
|
|
488
|
+
attributes: Record<string, unknown>;
|
|
489
|
+
}[];
|
|
490
|
+
next_cursor: string | null;
|
|
491
|
+
limited: boolean;
|
|
492
|
+
}>;
|
|
493
|
+
};
|
|
494
|
+
updates: {
|
|
495
|
+
query: (input: unknown, options?: {
|
|
496
|
+
signal?: AbortSignal;
|
|
497
|
+
}) => Promise<{
|
|
498
|
+
content_state: "absent" | "available" | "expired" | "public" | "suppressed";
|
|
499
|
+
content_expired: boolean;
|
|
500
|
+
truncated: boolean;
|
|
501
|
+
incomplete: boolean;
|
|
502
|
+
run: {
|
|
503
|
+
id: string;
|
|
504
|
+
user_id: string;
|
|
505
|
+
kind: "app" | "chat" | "workflow";
|
|
506
|
+
source_id: string;
|
|
507
|
+
parent_run_id: string | null;
|
|
508
|
+
trace_id: string;
|
|
509
|
+
root_span_id: string | null;
|
|
510
|
+
origin: "agent" | "cli" | "debug" | "public" | "ui";
|
|
511
|
+
status: "cancelled" | "completed" | "failed" | "running";
|
|
512
|
+
started_at: string;
|
|
513
|
+
ended_at: string | null;
|
|
514
|
+
cost_usd: number | null;
|
|
515
|
+
error: string | null;
|
|
516
|
+
content_expired: number;
|
|
517
|
+
truncated: number;
|
|
518
|
+
incomplete: number;
|
|
519
|
+
parents: {
|
|
520
|
+
kind: "app" | "app_run" | "instance" | "job" | "message" | "thread" | "workflow";
|
|
521
|
+
id: string;
|
|
522
|
+
}[];
|
|
523
|
+
parents_limited: boolean;
|
|
524
|
+
app?: {
|
|
525
|
+
instance_id: string | null;
|
|
526
|
+
operation_id: string;
|
|
527
|
+
app_version: number | null;
|
|
528
|
+
application_id: string | null;
|
|
529
|
+
actual_usd?: number | null | undefined;
|
|
530
|
+
cost_state?: "settled" | "unavailable" | "unsettled" | undefined;
|
|
531
|
+
result_reference?: {
|
|
532
|
+
type: "audio" | "image" | "video";
|
|
533
|
+
asset_id: string;
|
|
534
|
+
} | null | undefined;
|
|
535
|
+
inputs?: Record<string, unknown> | null | undefined;
|
|
536
|
+
outputs?: Record<string, unknown> | null | undefined;
|
|
537
|
+
content_limited?: boolean | undefined;
|
|
538
|
+
} | undefined;
|
|
539
|
+
};
|
|
540
|
+
records: {
|
|
541
|
+
kind: "span_ended" | "span_event" | "span_started" | "span_updated";
|
|
542
|
+
record: {
|
|
543
|
+
trace_id: string;
|
|
544
|
+
span_id: string;
|
|
545
|
+
parent_span_id: string | null;
|
|
546
|
+
name: string;
|
|
547
|
+
kind: "CLIENT" | "CONSUMER" | "INTERNAL" | "PRODUCER" | "SERVER";
|
|
548
|
+
start_time_ms: number;
|
|
549
|
+
end_time_ms: number;
|
|
550
|
+
duration_ms: number;
|
|
551
|
+
status: {
|
|
552
|
+
code: "ERROR" | "OK" | "UNSET";
|
|
553
|
+
message?: string | undefined;
|
|
554
|
+
};
|
|
555
|
+
attributes: Record<string, unknown>;
|
|
556
|
+
events: {
|
|
557
|
+
id?: string | undefined;
|
|
558
|
+
name: string;
|
|
559
|
+
time_ms: number;
|
|
560
|
+
attributes?: Record<string, unknown> | undefined;
|
|
561
|
+
}[];
|
|
562
|
+
resource: Record<string, unknown>;
|
|
563
|
+
};
|
|
564
|
+
run_id: string;
|
|
565
|
+
cursor: number;
|
|
566
|
+
content_expired: boolean;
|
|
567
|
+
truncated: boolean;
|
|
568
|
+
incomplete: boolean;
|
|
569
|
+
}[];
|
|
570
|
+
cursor: number;
|
|
571
|
+
has_more: boolean;
|
|
572
|
+
resnapshot_required: true;
|
|
573
|
+
limited: boolean;
|
|
574
|
+
trace_settled: boolean;
|
|
575
|
+
}>;
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
export type ApiClient = ReturnType<typeof createApiClient>;
|
|
580
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAaA,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM;IAU1C,SAAS;QACP,IAAI;2BAPG,OAAO,YACJ;gBAAE,MAAM,CAAC,EAAE,WAAW,CAAA;aAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAOlC,GAAG;2BARI,OAAO,YACJ;gBAAE,MAAM,CAAC,EAAE,WAAW,CAAA;aAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASpC,IAAI;QACF,IAAI;2BAXG,OAAO,YACJ;gBAAE,MAAM,CAAC,EAAE,WAAW,CAAA;aAAE;;;;;;;;;;;;;;;;;;QAWlC,GAAG;2BAZI,OAAO,YACJ;gBAAE,MAAM,CAAC,EAAE,WAAW,CAAA;aA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workflows.js";
|
|
3
|
+
import * as jobs from "@nodetool-ai/protocol/api-schemas/jobs.js";
|
|
4
|
+
import * as assets from "@nodetool-ai/protocol/api-schemas/assets.js";
|
|
5
|
+
import { listRunsResultSchema, getRunResultSchema, getRunTraceResultSchema, getRunLogsResultSchema, runUpdatesResultSchema } from "@nodetool-ai/protocol";
|
|
6
|
+
/** The command family's response contracts use the shared HTTP transport and protocol schemas. */
|
|
7
|
+
export function createApiClient(apiUrl) {
|
|
8
|
+
const client = createRpcClient(apiUrl);
|
|
9
|
+
const endpoint = (path, schema) => ({
|
|
10
|
+
query: async (input, options) => schema.parse(await client.query(path, input, options))
|
|
11
|
+
});
|
|
12
|
+
return {
|
|
13
|
+
workflows: {
|
|
14
|
+
list: endpoint("workflows.list", workflows.listOutput),
|
|
15
|
+
get: endpoint("workflows.get", workflows.workflowResponse)
|
|
16
|
+
},
|
|
17
|
+
jobs: {
|
|
18
|
+
list: endpoint("jobs.list", jobs.listOutput),
|
|
19
|
+
get: endpoint("jobs.get", jobs.jobResponse)
|
|
20
|
+
},
|
|
21
|
+
assets: {
|
|
22
|
+
list: endpoint("assets.list", assets.listOutput),
|
|
23
|
+
get: endpoint("assets.get", assets.assetResponse)
|
|
24
|
+
},
|
|
25
|
+
runs: {
|
|
26
|
+
list: endpoint("runs.list", listRunsResultSchema),
|
|
27
|
+
get: endpoint("runs.get", getRunResultSchema),
|
|
28
|
+
trace: endpoint("runs.trace", getRunTraceResultSchema),
|
|
29
|
+
logs: endpoint("runs.logs", getRunLogsResultSchema),
|
|
30
|
+
updates: endpoint("runs.updates", runUpdatesResultSchema)
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=api-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAA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AAE,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;YACtD,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;YACnD,OAAO,EAAE,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `nodetool collections` — manage RAG vector-store collections.
|
|
3
|
+
*
|
|
4
|
+
* Runs in-process against the default vector provider (sqlite-vec unless
|
|
5
|
+
* NODETOOL_VECTOR_PROVIDER points elsewhere), so it works without a running
|
|
6
|
+
* server. Indexing chunks documents with the same splitter the server uses.
|
|
7
|
+
*/
|
|
8
|
+
import type { Command } from "commander";
|
|
9
|
+
export declare function registerCollectionCommands(program: Command): void;
|
|
10
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/commands/collections.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqCzC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoPjE"}
|