@nodetool-ai/cli-workflow 0.0.0-stage → 0.8.9-beta.1

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.
Files changed (71) hide show
  1. package/README.md +14 -2
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/api-client.d.ts +580 -0
  4. package/dist/api-client.d.ts.map +1 -0
  5. package/dist/api-client.js +34 -0
  6. package/dist/api-client.js.map +1 -0
  7. package/dist/commands/collections.d.ts +10 -0
  8. package/dist/commands/collections.d.ts.map +1 -0
  9. package/dist/commands/collections.js +257 -0
  10. package/dist/commands/collections.js.map +1 -0
  11. package/dist/commands/costs.d.ts +15 -0
  12. package/dist/commands/costs.d.ts.map +1 -0
  13. package/dist/commands/costs.js +201 -0
  14. package/dist/commands/costs.js.map +1 -0
  15. package/dist/commands/debug.d.ts +13 -0
  16. package/dist/commands/debug.d.ts.map +1 -0
  17. package/dist/commands/debug.js +149 -0
  18. package/dist/commands/debug.js.map +1 -0
  19. package/dist/commands/errors.d.ts +11 -0
  20. package/dist/commands/errors.d.ts.map +1 -0
  21. package/dist/commands/errors.js +177 -0
  22. package/dist/commands/errors.js.map +1 -0
  23. package/dist/commands/generate.d.ts +17 -0
  24. package/dist/commands/generate.d.ts.map +1 -0
  25. package/dist/commands/generate.js +326 -0
  26. package/dist/commands/generate.js.map +1 -0
  27. package/dist/commands/generations.d.ts +17 -0
  28. package/dist/commands/generations.d.ts.map +1 -0
  29. package/dist/commands/generations.js +408 -0
  30. package/dist/commands/generations.js.map +1 -0
  31. package/dist/commands/install-missing-packs.d.ts +21 -0
  32. package/dist/commands/install-missing-packs.d.ts.map +1 -0
  33. package/dist/commands/install-missing-packs.js +48 -0
  34. package/dist/commands/install-missing-packs.js.map +1 -0
  35. package/dist/commands/node.d.ts +10 -0
  36. package/dist/commands/node.d.ts.map +1 -0
  37. package/dist/commands/node.js +130 -0
  38. package/dist/commands/node.js.map +1 -0
  39. package/dist/commands/projects.d.ts +11 -0
  40. package/dist/commands/projects.d.ts.map +1 -0
  41. package/dist/commands/projects.js +145 -0
  42. package/dist/commands/projects.js.map +1 -0
  43. package/dist/commands/resource-read.d.ts +28 -0
  44. package/dist/commands/resource-read.d.ts.map +1 -0
  45. package/dist/commands/resource-read.js +314 -0
  46. package/dist/commands/resource-read.js.map +1 -0
  47. package/dist/commands/runs.d.ts +7 -0
  48. package/dist/commands/runs.d.ts.map +1 -0
  49. package/dist/commands/runs.js +302 -0
  50. package/dist/commands/runs.js.map +1 -0
  51. package/dist/commands/validate.d.ts +24 -0
  52. package/dist/commands/validate.d.ts.map +1 -0
  53. package/dist/commands/validate.js +132 -0
  54. package/dist/commands/validate.js.map +1 -0
  55. package/dist/index.d.ts +16 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +1034 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/nodetool.d.ts +3 -0
  60. package/dist/nodetool.d.ts.map +1 -0
  61. package/dist/nodetool.js +4 -0
  62. package/dist/nodetool.js.map +1 -0
  63. package/dist/packs/command-service.d.ts +3 -0
  64. package/dist/packs/command-service.d.ts.map +1 -0
  65. package/dist/packs/command-service.js +9 -0
  66. package/dist/packs/command-service.js.map +1 -0
  67. package/dist/workflow-packs.d.ts +7 -0
  68. package/dist/workflow-packs.d.ts.map +1 -0
  69. package/dist/workflow-packs.js +31 -0
  70. package/dist/workflow-packs.js.map +1 -0
  71. package/package.json +73 -4
@@ -0,0 +1,302 @@
1
+ import { setTimeout as delay } from "node:timers/promises";
2
+ import { TRPCClientError } from "@trpc/client";
3
+ import { listRuns, getRun, getRunTrace, getRunLogs, readRunUpdates } from "@nodetool-ai/execution";
4
+ import { runGetOptionsSchema, runListOptionsSchema, runTraceOptionsSchema, runLogsOptionsSchema, runUpdatesOptionsSchema, TRACE_SPAN_LIMIT, TRACE_EVENT_LIMIT } from "@nodetool-ai/protocol";
5
+ import { createApiClient } from "../api-client.js";
6
+ import { printCommandError } from "@nodetool-ai/pack-manager/command-errors";
7
+ import { asJson, printKv, printTable } from "@nodetool-ai/cli-common/commands/output";
8
+ const TERMINAL_DRAIN_IDLE_MS = 1_000;
9
+ const TERMINAL_DRAIN_MAX_MS = 5_000;
10
+ async function reader(apiUrl, deps) {
11
+ if (apiUrl) {
12
+ const client = createApiClient(apiUrl);
13
+ return {
14
+ list: (options) => client.runs.list.query(options), get: (id, options) => client.runs.get.query({ id, ...options }),
15
+ trace: (id, options) => client.runs.trace.query({ id, ...options }),
16
+ logs: (id, options) => client.runs.logs.query({ id, ...options }),
17
+ updates: (id, options, signal) => client.runs.updates.query({ id, ...options }, { signal })
18
+ };
19
+ }
20
+ await deps.ensureDb();
21
+ return {
22
+ list: (options) => listRuns(deps.localUserId, options), get: (id, options) => getRun(deps.localUserId, id, options),
23
+ trace: (id, options) => getRunTrace(deps.localUserId, id, options),
24
+ logs: (id, options) => getRunLogs(deps.localUserId, id, options),
25
+ updates: (id, options) => readRunUpdates(deps.localUserId, id, options)
26
+ };
27
+ }
28
+ function integer(value, option, minimum, maximum) {
29
+ const parsed = Number(value);
30
+ if (!/^\d+$/.test(value) || !Number.isSafeInteger(parsed) || parsed < minimum || parsed > maximum) {
31
+ throw new Error(`${option} must be an integer between ${minimum} and ${maximum}`);
32
+ }
33
+ return parsed;
34
+ }
35
+ function attr(attributes, key) { const value = attributes[key]; return value === undefined || value === null || value === "" ? undefined : String(value); }
36
+ function clip(text, max) { const flat = text.replace(/\s+/g, " "); return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat; }
37
+ /** The most identifying attribute of a span: the node for node spans, provider/model for LLM spans. */
38
+ function spanDetail(attributes) {
39
+ const node = attr(attributes, "node.id");
40
+ const type = attr(attributes, "node.type");
41
+ if (node) {
42
+ return clip(type ? `${node} (${type})` : node, 48);
43
+ }
44
+ const provider = attr(attributes, "llm.provider");
45
+ const model = attr(attributes, "llm.model");
46
+ return provider || model ? clip([provider, model].filter(Boolean).join("/"), 48) : "";
47
+ }
48
+ function fail(error, json) { process.exitCode = printCommandError(error, json); }
49
+ function common(command) {
50
+ return command.option("--api-url <url>", "Read a server instead of the local database", process.env["NODETOOL_API_URL"])
51
+ .option("--json", "JSON result; tail emits NDJSON");
52
+ }
53
+ /** Follow coalesced durable snapshots. Event frames are emitted once per stable identity. */
54
+ async function tail(reader, id, options) {
55
+ let cursor = integer(options.cursor, "--cursor", 0, Number.MAX_SAFE_INTEGER);
56
+ const limit = integer(options.limit, "--limit", 1, 500);
57
+ const interval = integer(options.pollInterval, "--poll-interval", 10, 5_000);
58
+ const timeout = options.timeout === undefined ? null : integer(options.timeout, "--timeout", 1, 86_400) * 1_000;
59
+ const controller = new AbortController();
60
+ const interrupt = () => { controller.abort("interrupt"); };
61
+ process.once("SIGINT", interrupt);
62
+ const timer = timeout === null ? null : setTimeout(() => { controller.abort("timeout"); }, timeout);
63
+ const seenSpans = new Map();
64
+ const seenEvents = new Set();
65
+ const emit = (value, text) => {
66
+ if (options.json) {
67
+ console.log(JSON.stringify(value));
68
+ }
69
+ else {
70
+ console.log(text);
71
+ }
72
+ };
73
+ let first = true;
74
+ let terminalDrainStarted = null;
75
+ let lastProgressAt = Date.now();
76
+ let dedupLimitReported = false;
77
+ const dedupLimit = () => {
78
+ if (dedupLimitReported) {
79
+ return;
80
+ }
81
+ dedupLimitReported = true;
82
+ emit({ type: "gap", cursor, reason: "dedup_limit" }, "Deduplication capacity reached. Later replay may repeat records.");
83
+ };
84
+ try {
85
+ while (!controller.signal.aborted) {
86
+ let page;
87
+ try {
88
+ page = await reader.updates(id, runUpdatesOptionsSchema.parse({ cursor, limit, include_content: options.includeContent ?? false }), controller.signal);
89
+ }
90
+ catch (error) {
91
+ if (!options.apiUrl || !(error instanceof TRPCClientError) || error.data) {
92
+ throw error;
93
+ }
94
+ emit({ type: "reconnecting", cursor }, `Connection lost. Retrying from cursor ${cursor}.`);
95
+ await delay(interval, undefined, { signal: controller.signal });
96
+ continue;
97
+ }
98
+ controller.signal.throwIfAborted();
99
+ if (first || page.records.length > 0) {
100
+ emit({ type: "resnapshot", run_id: page.run.id, after_cursor: cursor, cursor: page.cursor, resnapshot_required: page.resnapshot_required,
101
+ content_state: page.content_state, content_expired: page.content_expired, truncated: page.truncated, incomplete: page.incomplete, limited: page.limited }, `Run ${page.run.id}: latest snapshots after cursor ${cursor} (intermediate updates may be coalesced).`);
102
+ first = false;
103
+ }
104
+ for (const update of page.records) {
105
+ if ((seenSpans.get(update.record.span_id) ?? -1) >= update.cursor) {
106
+ continue;
107
+ }
108
+ if (seenSpans.has(update.record.span_id) || seenSpans.size < TRACE_SPAN_LIMIT + 1) {
109
+ seenSpans.set(update.record.span_id, update.cursor);
110
+ }
111
+ else {
112
+ dedupLimit();
113
+ }
114
+ emit({ type: "span", ...update }, `${update.cursor} ${update.record.name} ${update.record.span_id} ${update.record.status.code}`);
115
+ for (const [index, event] of update.record.events.entries()) {
116
+ const eventId = event.id ?? `${update.record.span_id}:${index}`;
117
+ const key = `${update.record.span_id}:${eventId}`;
118
+ if (seenEvents.has(key)) {
119
+ continue;
120
+ }
121
+ if (seenEvents.size < TRACE_EVENT_LIMIT) {
122
+ seenEvents.add(key);
123
+ }
124
+ else {
125
+ dedupLimit();
126
+ }
127
+ emit({ type: "event", run_id: update.run_id, span_id: update.record.span_id, cursor: update.cursor, event: { ...event, id: eventId } }, `${event.time_ms} ${event.name} ${JSON.stringify(event.attributes ?? {})}`);
128
+ }
129
+ }
130
+ if (page.cursor > cursor) {
131
+ lastProgressAt = Date.now();
132
+ }
133
+ cursor = Math.max(cursor, page.cursor);
134
+ if (page.has_more) {
135
+ continue;
136
+ }
137
+ if (page.run.status !== "running") {
138
+ const now = Date.now();
139
+ if (terminalDrainStarted === null) {
140
+ terminalDrainStarted = now;
141
+ lastProgressAt = now;
142
+ }
143
+ if (page.trace_settled || now - lastProgressAt >= TERMINAL_DRAIN_IDLE_MS || now - terminalDrainStarted >= TERMINAL_DRAIN_MAX_MS) {
144
+ if (!page.trace_settled) {
145
+ emit({ type: "gap", cursor, reason: "terminal_trace_incomplete" }, "Run ended before all final span snapshots were stored. Resume from this cursor to check later.");
146
+ }
147
+ emit({ type: "terminal", run: page.run, cursor, trace_settled: page.trace_settled }, `Run ${page.run.id} ${page.run.status}. Cursor ${cursor}.`);
148
+ return;
149
+ }
150
+ }
151
+ await delay(interval, undefined, { signal: controller.signal });
152
+ }
153
+ }
154
+ catch (error) {
155
+ if (!controller.signal.aborted) {
156
+ throw error;
157
+ }
158
+ }
159
+ finally {
160
+ process.removeListener("SIGINT", interrupt);
161
+ if (timer !== null) {
162
+ clearTimeout(timer);
163
+ }
164
+ }
165
+ if (controller.signal.reason === "interrupt") {
166
+ emit({ type: "interrupted", cursor }, `Stopped following at cursor ${cursor}.`);
167
+ process.exitCode = 130;
168
+ return;
169
+ }
170
+ throw new Error(`Timed out following run ${id} at cursor ${cursor}`);
171
+ }
172
+ export function registerRunsCommands(program, deps) {
173
+ const runs = program.command("runs").description("Inspect durable app runs, workflow jobs and chat turns");
174
+ common(runs.command("list").description("List owned runs, newest first")
175
+ .option("--kind <kind>", "app, workflow or chat").option("--app-id <id>", "App filter")
176
+ .option("--instance-id <id>", "Instance filter").option("--workflow-id <id>", "Workflow filter")
177
+ .option("--thread-id <id>", "Chat thread filter").option("--status <status>", "running, completed, failed or cancelled")
178
+ .option("--origin <origin>", "ui, agent, cli, debug or public").option("--since <iso>", "Inclusive start time")
179
+ .option("--until <iso>", "Exclusive end time").option("--limit <n>", "Results, 1–100", "20")
180
+ .option("--cursor <cursor>", "Opaque next_cursor from the previous page"))
181
+ .action(async (options) => {
182
+ try {
183
+ const query = runListOptionsSchema.parse({ kind: options.kind, app_id: options.appId, instance_id: options.instanceId,
184
+ workflow_id: options.workflowId, thread_id: options.threadId, status: options.status, origin: options.origin,
185
+ since: options.since, until: options.until, limit: integer(options.limit, "--limit", 1, 100), cursor: options.cursor });
186
+ const result = await (await reader(options.apiUrl, deps)).list(query);
187
+ if (options.json) {
188
+ asJson(result);
189
+ }
190
+ else {
191
+ printTable(result.runs, ["id", "kind", "status", "origin", "started_at", "cost_usd"]);
192
+ if (result.next_cursor) {
193
+ console.log(`next_cursor: ${result.next_cursor}`);
194
+ }
195
+ }
196
+ }
197
+ catch (error) {
198
+ fail(error, options.json);
199
+ }
200
+ });
201
+ common(runs.command("show <id>").description("Read the run and bounded diagnostic summary")
202
+ .option("--include-content", "Read capped app run inputs and outputs"))
203
+ .action(async (id, options) => {
204
+ try {
205
+ const query = runGetOptionsSchema.parse({ include_content: options.includeContent ?? false });
206
+ const result = await (await reader(options.apiUrl, deps)).get(id, query);
207
+ if (options.json) {
208
+ asJson(result);
209
+ return;
210
+ }
211
+ printKv({ id: result.run.id, kind: result.run.kind, status: result.run.status, error: result.run.error,
212
+ cost_usd: result.run.cost_usd, first_failed_span_id: result.summary.first_failed_span_id,
213
+ content_state: result.summary.content_state, truncated: result.summary.truncated, incomplete: result.summary.incomplete });
214
+ if (result.summary.failure_path.length > 0) {
215
+ printTable(result.summary.failure_path, ["span_id", "name", "status", "duration_ms", "error"]);
216
+ }
217
+ if (options.includeContent && result.run.app) {
218
+ asJson(result.run.app);
219
+ }
220
+ }
221
+ catch (error) {
222
+ fail(error, options.json);
223
+ }
224
+ });
225
+ common(runs.command("trace <id>").description("Read the span tree")
226
+ .option("--depth <n>", "Tree depth, 0–64", "4").option("--focus <span-id>", "Focus a full 16-character span ID")
227
+ .option("--name <name>", "Span name filter").option("--errors-only", "Only failed spans and their ancestors")
228
+ .option("--limit <n>", "Spans, 1–500", "100").option("--include-content", "Read capped content on the focused span"))
229
+ .action(async (id, options) => {
230
+ try {
231
+ const query = runTraceOptionsSchema.parse({ depth: integer(options.depth, "--depth", 0, 64), focus_span_id: options.focus,
232
+ name: options.name, errors_only: options.errorsOnly ?? false, limit: integer(options.limit, "--limit", 1, 500), include_content: options.includeContent ?? false });
233
+ const result = await (await reader(options.apiUrl, deps)).trace(id, query);
234
+ if (options.json) {
235
+ asJson(result);
236
+ }
237
+ else {
238
+ printTable(result.nodes.map(({ record, depth }) => ({ span_id: record.span_id, name: `${" ".repeat(depth)}${record.name}`, status: record.status.code, duration_ms: record.duration_ms, detail: spanDetail(record.attributes) })));
239
+ printKv({ content_state: result.content_state, truncated: result.truncated, incomplete: result.incomplete, limited: result.limited });
240
+ if (options.includeContent) {
241
+ asJson(result.nodes.map(({ record }) => record));
242
+ }
243
+ }
244
+ }
245
+ catch (error) {
246
+ fail(error, options.json);
247
+ }
248
+ });
249
+ common(runs.command("logs <id>").description("Read stored span events, oldest first")
250
+ .option("--level <level>", "Log level filter").option("--source <source>", "Source filter").option("--span <span-id>", "Full span ID filter")
251
+ .option("--since-ms <time>", "Inclusive event timestamp in milliseconds").option("--until-ms <time>", "Exclusive event timestamp in milliseconds")
252
+ .option("--limit <n>", "Events, 1–500", "100").option("--cursor <cursor>", "Opaque next_cursor from previous page")
253
+ .option("--include-content", "Read capped event content"))
254
+ .action(async (id, options) => {
255
+ try {
256
+ const query = runLogsOptionsSchema.parse({ level: options.level, source: options.source, span_id: options.span,
257
+ since_ms: options.sinceMs === undefined ? undefined : Number(options.sinceMs), until_ms: options.untilMs === undefined ? undefined : Number(options.untilMs),
258
+ limit: integer(options.limit, "--limit", 1, 500), cursor: options.cursor, include_content: options.includeContent ?? false });
259
+ const result = await (await reader(options.apiUrl, deps)).logs(id, query);
260
+ if (options.json) {
261
+ asJson(result);
262
+ }
263
+ else {
264
+ if (options.includeContent) {
265
+ printTable(result.logs.map((event) => ({ ...event, message: clip(attr(event.attributes, "log.message") ?? "", 80), arguments: clip(attr(event.attributes, "log.arguments") ?? "", 40) })), ["time_ms", "level", "source", "span_id", "message", "arguments"]);
266
+ }
267
+ else {
268
+ printTable(result.logs, ["time_ms", "level", "source", "span_id", "name"]);
269
+ if (result.logs.length > 0) {
270
+ console.log("Messages are excluded. Pass --include-content to read them.");
271
+ }
272
+ }
273
+ printKv({ content_state: result.content_state, truncated: result.truncated, incomplete: result.incomplete, limited: result.limited });
274
+ if (result.next_cursor) {
275
+ console.log(`next_cursor: ${result.next_cursor}`);
276
+ }
277
+ }
278
+ }
279
+ catch (error) {
280
+ fail(error, options.json);
281
+ }
282
+ });
283
+ common(runs.command("tail <id>").description("Follow durable span snapshots and events until the run ends")
284
+ .option("--cursor <n>", "Resume after a durable cursor", "0").option("--limit <n>", "Snapshots per page, 1–500", "100")
285
+ .option("--poll-interval <ms>", "Polling interval, 10–5000 ms", "250").option("--timeout <seconds>", "Stop waiting after 1–86400 seconds")
286
+ .option("--include-content", "Read capped owner content"))
287
+ .action(async (id, options) => {
288
+ try {
289
+ await tail(await reader(options.apiUrl, deps), id, options);
290
+ }
291
+ catch (error) {
292
+ if (options.json) {
293
+ console.log(JSON.stringify({ type: "error", error: error instanceof Error ? error.message : String(error) }));
294
+ process.exitCode = 1;
295
+ }
296
+ else {
297
+ fail(error);
298
+ }
299
+ }
300
+ });
301
+ }
302
+ //# sourceMappingURL=runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EACL,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iBAAiB,EAIrJ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AA0BtF,MAAM,sBAAsB,GAAG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AAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `nodetool validate` — static workflow validator.
3
+ *
4
+ * Loads a workflow (DB id, JSON file, or DSL .ts file) and checks it against
5
+ * the node registry without running it: unknown node types, missing required
6
+ * properties, unselected models, dangling/mis-typed edges. Returns in well
7
+ * under a second, so it's the fast pre-flight before an expensive `debug` run.
8
+ * Heavy deps are imported lazily so command registration stays light.
9
+ */
10
+ import type { Command } from "commander";
11
+ import { type GraphValidationReport } from "@nodetool-ai/node-sdk";
12
+ type SecretLookup = (key: string) => Promise<string | null | undefined> | string | null | undefined;
13
+ /** Resolve declared node settings exactly as BaseNode secret injection does. */
14
+ export declare function collectAvailableSecrets(keys: readonly string[], getSecret: SecretLookup): Promise<Set<string>>;
15
+ export declare function registerValidateCommand(program: Command): void;
16
+ /** Install-only validation failures share exit 3 with missing runtime libraries. */
17
+ export declare function validationFailureExitCode(report: GraphValidationReport, warningsAsErrors?: boolean): 1 | 3;
18
+ /**
19
+ * Human-readable report: headline, one line per issue, then a legend for the
20
+ * codes that occurred. Pure so it can be asserted on directly.
21
+ */
22
+ export declare function renderValidation(report: GraphValidationReport): string[];
23
+ export {};
24
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAQ/B,KAAK,YAAY,GAAG,CAClB,GAAG,EAAE,MAAM,KACR,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAEpE,gFAAgF;AAChF,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAOtB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyD9D;AAED,oFAAoF;AACpF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,UAAQ,GAAG,CAAC,GAAG,CAAC,CAGxG;AAwCD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAqBxE"}
@@ -0,0 +1,132 @@
1
+ import { validationHeadline } from "@nodetool-ai/node-sdk";
2
+ import { printCommandError } from "@nodetool-ai/pack-manager/command-errors";
3
+ /** Resolve declared node settings exactly as BaseNode secret injection does. */
4
+ export async function collectAvailableSecrets(keys, getSecret) {
5
+ const found = new Set();
6
+ for (const key of keys) {
7
+ const value = await getSecret(key);
8
+ if (value)
9
+ found.add(key);
10
+ }
11
+ return found;
12
+ }
13
+ export function registerValidateCommand(program) {
14
+ program
15
+ .command("validate <workflow_id_or_file>")
16
+ .description("Validate a workflow against the node registry without running it (unknown nodes, missing props, bad edges)")
17
+ .option("--json", "Print the full validation report as JSON")
18
+ .option("--warnings-as-errors", "Exit non-zero when there are warnings (not just errors)")
19
+ .action(async (ref, opts) => {
20
+ try {
21
+ const { runValidate } = await import("@nodetool-ai/cli-execution/validate/index");
22
+ // Only a DB-id target needs the database; file/DSL targets validate
23
+ // with no DB at all, so initialize it lazily on first lookup.
24
+ let dbReady = false;
25
+ const ensureDb = async () => {
26
+ if (!dbReady) {
27
+ const { initDb } = await import("@nodetool-ai/models");
28
+ const { getDefaultDbPath } = await import("@nodetool-ai/config");
29
+ initDb(getDefaultDbPath());
30
+ dbReady = true;
31
+ }
32
+ };
33
+ const { target, report } = await runValidate(ref, {
34
+ loadFromDb: async (id) => {
35
+ await ensureDb();
36
+ const { Workflow } = await import("@nodetool-ai/models");
37
+ return Workflow.get(id);
38
+ },
39
+ // Node required settings use exact names. Provider aliases are
40
+ // resolved separately by the run preflight.
41
+ availableSecrets: async (keys) => {
42
+ await ensureDb();
43
+ const { getSecret } = await import("@nodetool-ai/models");
44
+ return collectAvailableSecrets(keys, (key) => getSecret(key, "1"));
45
+ }
46
+ });
47
+ if (opts.json) {
48
+ console.log(JSON.stringify({ target, report }, null, 2));
49
+ }
50
+ else {
51
+ console.log(renderValidation(report).join("\n"));
52
+ }
53
+ const failed = !report.ok ||
54
+ (opts.warningsAsErrors === true && report.counts.warnings > 0);
55
+ process.exit(failed ? validationFailureExitCode(report, opts.warningsAsErrors) : 0);
56
+ }
57
+ catch (e) {
58
+ process.exit(printCommandError(e, opts.json));
59
+ }
60
+ });
61
+ }
62
+ /** Install-only validation failures share exit 3 with missing runtime libraries. */
63
+ export function validationFailureExitCode(report, warningsAsErrors = false) {
64
+ const errors = report.issues.filter((issue) => issue.severity === "error" || (warningsAsErrors && issue.severity === "warning"));
65
+ return errors.length > 0 && errors.every((issue) => issue.code === "pack_not_installed") ? 3 : 1;
66
+ }
67
+ /**
68
+ * One line per issue code, printed as a legend under the issues so the report
69
+ * explains itself without a trip to the docs.
70
+ */
71
+ const CODE_LEGEND = {
72
+ invalid_graph: "the graph's nodes or edges is not an array",
73
+ unknown_node: "node type is not in the registry",
74
+ pack_not_installed: "node metadata is known but its owning pack is not installed",
75
+ duplicate_id: "two nodes share an id",
76
+ property: "property is missing, empty, or the wrong shape",
77
+ dangling_edge: "edge references a node the graph does not contain",
78
+ unknown_handle: "edge references a handle the node does not have",
79
+ type_mismatch: "the two ends of an edge carry different types",
80
+ fan_in: "several edges target one input that takes a single value",
81
+ untyped_dynamic_slot: "edge targets a dynamic input with no declared type, so the connection is not type-checked — expected on workflows saved before typed slots, one per dynamic edge; informational, never a failure",
82
+ dynamic_type_mismatch: "inline value of a dynamic input does not match the type the slot declares",
83
+ unknown_provider: "a model property names a provider the runtime cannot build",
84
+ missing_secret: "a node declares a credential this install cannot resolve — the run may fail when the node executes",
85
+ slot_type_alias: "a dynamic slot is typed with a JSON-Schema/TypeScript name instead of NodeTool's, so the handle will not connect",
86
+ code_syntax: "a Code node's body is not valid JavaScript",
87
+ code_module: "a Code node's body uses `export`, a dynamic import, or an import the sandbox loader cannot serve",
88
+ code_undefined_name: "a Code node reads a name that is neither a sandbox API nor one of its inputs",
89
+ code_no_return: "a Code node can finish without returning its outputs",
90
+ code_return_shape: "a Code node returns something other than an output object",
91
+ code_missing_output: "a return path leaves a declared output unset",
92
+ code_undeclared_output: "a Code node returns a key it does not declare as an output handle",
93
+ code_unused_input: "a Code node input the body never reads"
94
+ };
95
+ /**
96
+ * Human-readable report: headline, one line per issue, then a legend for the
97
+ * codes that occurred. Pure so it can be asserted on directly.
98
+ */
99
+ export function renderValidation(report) {
100
+ const mark = report.ok ? (report.counts.warnings ? "⚠️" : "✅") : "❌";
101
+ const lines = ["", `${mark} ${validationHeadline(report)}`];
102
+ if (report.issues.length === 0)
103
+ return lines;
104
+ lines.push("");
105
+ for (const issue of report.issues) {
106
+ lines.push(` ${formatIssue(issue)}`);
107
+ }
108
+ const codes = [...new Set(report.issues.map((i) => i.code))]
109
+ .filter((code) => code in CODE_LEGEND)
110
+ .sort();
111
+ if (codes.length > 0) {
112
+ lines.push("", " Codes:");
113
+ for (const code of codes) {
114
+ lines.push(` ${code} — ${CODE_LEGEND[code]}`);
115
+ }
116
+ }
117
+ return lines;
118
+ }
119
+ function formatIssue(issue) {
120
+ const tag = issue.severity === "error"
121
+ ? "error"
122
+ : issue.severity === "info"
123
+ ? "info "
124
+ : "warn ";
125
+ const where = issue.nodeId != null
126
+ ? ` [${issue.nodeType ?? "node"} ${issue.nodeId}]`
127
+ : issue.edgeId != null
128
+ ? ` [edge ${issue.edgeId}]`
129
+ : "";
130
+ return `${tag} ${issue.message}${where} (${issue.code})`;
131
+ }
132
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAUA,OA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H,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,KAA2B;IAC9C,MAAM,GAAG,GACP,KAAK,CAAC,QAAQ,KAAK,OAAO;QACxB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,KAAK,CAAC,QAAQ,KAAK,MAAM;YACzB,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,OAAO,CAAC;IAChB,MAAM,KAAK,GACT,KAAK,CAAC,MAAM,IAAI,IAAI;QAClB,CAAC,CAAC,KAAK,KAAK,CAAC,QAAQ,IAAI,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG;QAClD,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI;YACpB,CAAC,CAAC,UAAU,KAAK,CAAC,MAAM,GAAG;YAC3B,CAAC,CAAC,EAAE,CAAC;IACX,OAAO,GAAG,GAAG,IAAI,KAAK,CAAC,OAAO,GAAG,KAAK,KAAK,KAAK,CAAC,IAAI,GAAG,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { resolveWorkflowPacks } from "./workflow-packs.js";
2
+ import { Command as CommanderCommand } from "commander";
3
+ export declare function createProgram(): Promise<CommanderCommand>;
4
+ export declare function run(argv: readonly string[]): Promise<void>;
5
+ export declare const feature: {
6
+ descriptor: {
7
+ id: string;
8
+ apiVersion: number;
9
+ requires: string[];
10
+ capabilities: string[];
11
+ };
12
+ run: typeof run;
13
+ resolveWorkflowPacks: typeof resolveWorkflowPacks;
14
+ };
15
+ export default feature;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAK3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAgB,MAAM,WAAW,CAAC;AA0FtE,wBAAsB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAmuC/D;AACD,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhE;AACD,eAAO,MAAM,OAAO;;QAEhB,EAAE;QACF,UAAU;QACV,QAAQ;QACR,YAAY;;;;CAIf,CAAC;eACa,OAAO"}