@nodetool-ai/node-sdk 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/base-node.d.ts +141 -0
- package/dist/base-node.d.ts.map +1 -0
- package/dist/base-node.js +225 -0
- package/dist/base-node.js.map +1 -0
- package/dist/decorators.d.ts +19 -0
- package/dist/decorators.d.ts.map +1 -0
- package/dist/decorators.js +42 -0
- package/dist/decorators.js.map +1 -0
- package/dist/docs/index.d.ts +4 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +4 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/nodes.d.ts +10 -0
- package/dist/docs/nodes.d.ts.map +1 -0
- package/dist/docs/nodes.js +99 -0
- package/dist/docs/nodes.js.map +1 -0
- package/dist/docs/overview.d.ts +6 -0
- package/dist/docs/overview.d.ts.map +1 -0
- package/dist/docs/overview.js +71 -0
- package/dist/docs/overview.js.map +1 -0
- package/dist/docs/workflows.d.ts +10 -0
- package/dist/docs/workflows.d.ts.map +1 -0
- package/dist/docs/workflows.js +112 -0
- package/dist/docs/workflows.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/metadata.d.ts +76 -0
- package/dist/metadata.d.ts.map +1 -0
- package/dist/metadata.js +247 -0
- package/dist/metadata.js.map +1 -0
- package/dist/node-metadata.d.ts +16 -0
- package/dist/node-metadata.d.ts.map +1 -0
- package/dist/node-metadata.js +266 -0
- package/dist/node-metadata.js.map +1 -0
- package/dist/nodes/test-nodes.d.ts +215 -0
- package/dist/nodes/test-nodes.d.ts.map +1 -0
- package/dist/nodes/test-nodes.js +436 -0
- package/dist/nodes/test-nodes.js.map +1 -0
- package/dist/package-registry-client.d.ts +12 -0
- package/dist/package-registry-client.d.ts.map +1 -0
- package/dist/package-registry-client.js +40 -0
- package/dist/package-registry-client.js.map +1 -0
- package/dist/python-package-scan.d.ts +45 -0
- package/dist/python-package-scan.d.ts.map +1 -0
- package/dist/python-package-scan.js +158 -0
- package/dist/python-package-scan.js.map +1 -0
- package/dist/registry.d.ts +55 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +188 -0
- package/dist/registry.js.map +1 -0
- package/dist/search.d.ts +58 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +127 -0
- package/dist/search.js.map +1 -0
- package/dist/validation.d.ts +63 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +138 -0
- package/dist/validation.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { prop } from "../decorators.js";
|
|
8
|
+
import { BaseNode } from "../base-node.js";
|
|
9
|
+
export class Passthrough extends BaseNode {
|
|
10
|
+
static nodeType = "nodetool.test.Passthrough";
|
|
11
|
+
static title = "Passthrough";
|
|
12
|
+
static description = "Passes input value through unchanged";
|
|
13
|
+
async process() {
|
|
14
|
+
return { output: this.value };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
prop({ type: "any", default: null })
|
|
19
|
+
], Passthrough.prototype, "value", void 0);
|
|
20
|
+
export class Add extends BaseNode {
|
|
21
|
+
static nodeType = "nodetool.test.Add";
|
|
22
|
+
static title = "Add";
|
|
23
|
+
static description = "Adds two numbers";
|
|
24
|
+
static isDynamic = true;
|
|
25
|
+
async process() {
|
|
26
|
+
const values = [this.a, this.b, ...Array.from(this.dynamicProps.values())];
|
|
27
|
+
const sum = values.reduce((acc, value) => {
|
|
28
|
+
return acc + Number(value ?? 0);
|
|
29
|
+
}, 0);
|
|
30
|
+
return { result: sum };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
prop({ type: "int", default: 0 })
|
|
35
|
+
], Add.prototype, "a", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
prop({ type: "int", default: 0 })
|
|
38
|
+
], Add.prototype, "b", void 0);
|
|
39
|
+
export class Multiply extends BaseNode {
|
|
40
|
+
static nodeType = "nodetool.test.Multiply";
|
|
41
|
+
static title = "Multiply";
|
|
42
|
+
static description = "Multiplies two numbers";
|
|
43
|
+
async process() {
|
|
44
|
+
const a = (this.a ?? 1);
|
|
45
|
+
const b = (this.b ?? 1);
|
|
46
|
+
return { result: a * b };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
prop({ type: "int", default: 1 })
|
|
51
|
+
], Multiply.prototype, "a", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
prop({ type: "int", default: 1 })
|
|
54
|
+
], Multiply.prototype, "b", void 0);
|
|
55
|
+
export class Constant extends BaseNode {
|
|
56
|
+
static nodeType = "nodetool.test.Constant";
|
|
57
|
+
static title = "Constant";
|
|
58
|
+
static description = "Outputs a constant value";
|
|
59
|
+
async process() {
|
|
60
|
+
return { value: this.value };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
__decorate([
|
|
64
|
+
prop({ type: "any", default: null })
|
|
65
|
+
], Constant.prototype, "value", void 0);
|
|
66
|
+
export class StringConcat extends BaseNode {
|
|
67
|
+
static nodeType = "nodetool.test.StringConcat";
|
|
68
|
+
static title = "String Concat";
|
|
69
|
+
static description = "Concatenates strings";
|
|
70
|
+
static isDynamic = true;
|
|
71
|
+
async process() {
|
|
72
|
+
const sep = String(this.separator ?? "");
|
|
73
|
+
const values = [this.a, this.b, ...Array.from(this.dynamicProps.values())].map((value) => String(value ?? ""));
|
|
74
|
+
return { result: values.join(sep) };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
__decorate([
|
|
78
|
+
prop({ type: "str", default: "" })
|
|
79
|
+
], StringConcat.prototype, "a", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
prop({ type: "str", default: "" })
|
|
82
|
+
], StringConcat.prototype, "b", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
prop({ type: "str", default: "" })
|
|
85
|
+
], StringConcat.prototype, "separator", void 0);
|
|
86
|
+
export class FormatText extends BaseNode {
|
|
87
|
+
static nodeType = "nodetool.test.FormatText";
|
|
88
|
+
static title = "Format Text";
|
|
89
|
+
static description = "Formats text by replacing {{ text }} in a template";
|
|
90
|
+
async process() {
|
|
91
|
+
const template = String(this.template ?? "{{ text }}");
|
|
92
|
+
const text = String(this.text ?? "");
|
|
93
|
+
return { result: template.replace(/\{\{\s*text\s*\}\}/g, text) };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
__decorate([
|
|
97
|
+
prop({ type: "str", default: "Hello, {{ text }}" })
|
|
98
|
+
], FormatText.prototype, "template", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
prop({ type: "str", default: "" })
|
|
101
|
+
], FormatText.prototype, "text", void 0);
|
|
102
|
+
export class ThresholdProcessor extends BaseNode {
|
|
103
|
+
static nodeType = "nodetool.test.ThresholdProcessor";
|
|
104
|
+
static title = "Threshold Processor";
|
|
105
|
+
static description = "Checks if a value exceeds a threshold";
|
|
106
|
+
static isControlled = true;
|
|
107
|
+
async process() {
|
|
108
|
+
const value = (this.value ?? 0);
|
|
109
|
+
const threshold = (this.threshold ?? 0.5);
|
|
110
|
+
const mode = String(this.mode ?? "normal");
|
|
111
|
+
const exceeds = mode === "strict" ? value > threshold : value >= threshold;
|
|
112
|
+
return {
|
|
113
|
+
result: `value=${value}, threshold=${threshold}, mode=${mode}, exceeds=${exceeds}`
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
__decorate([
|
|
118
|
+
prop({ type: "int", default: 0 })
|
|
119
|
+
], ThresholdProcessor.prototype, "value", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
prop({ type: "float", default: 0.5 })
|
|
122
|
+
], ThresholdProcessor.prototype, "threshold", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
prop({ type: "str", default: "normal" })
|
|
125
|
+
], ThresholdProcessor.prototype, "mode", void 0);
|
|
126
|
+
export class ErrorNode extends BaseNode {
|
|
127
|
+
static nodeType = "nodetool.test.ErrorNode";
|
|
128
|
+
static title = "Error Node";
|
|
129
|
+
static description = "Always throws an error";
|
|
130
|
+
async process() {
|
|
131
|
+
throw new Error(String(this.message ?? "Node error"));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
__decorate([
|
|
135
|
+
prop({ type: "str", default: "Node error" })
|
|
136
|
+
], ErrorNode.prototype, "message", void 0);
|
|
137
|
+
export class SlowNode extends BaseNode {
|
|
138
|
+
static nodeType = "nodetool.test.SlowNode";
|
|
139
|
+
static title = "Slow Node";
|
|
140
|
+
static description = "Delays for a given number of milliseconds";
|
|
141
|
+
async process() {
|
|
142
|
+
await new Promise((r) => setTimeout(r, this.delayMs ?? 100));
|
|
143
|
+
return { result: "completed" };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
__decorate([
|
|
147
|
+
prop({ type: "int", default: 100 })
|
|
148
|
+
], SlowNode.prototype, "delayMs", void 0);
|
|
149
|
+
export class StreamingCounter extends BaseNode {
|
|
150
|
+
static nodeType = "nodetool.test.StreamingCounter";
|
|
151
|
+
static title = "Streaming Counter";
|
|
152
|
+
static description = "Streams integers from 0 to count-1";
|
|
153
|
+
static isStreamingOutput = true;
|
|
154
|
+
async process() {
|
|
155
|
+
return {};
|
|
156
|
+
}
|
|
157
|
+
async *genProcess() {
|
|
158
|
+
const count = this.count ?? 3;
|
|
159
|
+
const start = this.start ?? 0;
|
|
160
|
+
for (let i = 0; i < count; i++) {
|
|
161
|
+
yield { value: start + i };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
__decorate([
|
|
166
|
+
prop({ type: "int", default: 3 })
|
|
167
|
+
], StreamingCounter.prototype, "count", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
prop({ type: "int", default: 0 })
|
|
170
|
+
], StreamingCounter.prototype, "start", void 0);
|
|
171
|
+
export class IntAccumulator extends BaseNode {
|
|
172
|
+
static nodeType = "nodetool.test.IntAccumulator";
|
|
173
|
+
static title = "Int Accumulator";
|
|
174
|
+
static description = "Accumulates integer inputs and tracks execution count";
|
|
175
|
+
_execCount = 0;
|
|
176
|
+
_accumulated = [];
|
|
177
|
+
async process() {
|
|
178
|
+
this._execCount++;
|
|
179
|
+
const value = (this.value ?? 0);
|
|
180
|
+
this._accumulated.push(value);
|
|
181
|
+
return {
|
|
182
|
+
count: this._execCount,
|
|
183
|
+
value,
|
|
184
|
+
values: [...this._accumulated]
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
__decorate([
|
|
189
|
+
prop({ type: "int", default: 0 })
|
|
190
|
+
], IntAccumulator.prototype, "value", void 0);
|
|
191
|
+
// ---------------------------------------------------------------------------
|
|
192
|
+
// Controller nodes (emit control events via __control__ handle)
|
|
193
|
+
// ---------------------------------------------------------------------------
|
|
194
|
+
/**
|
|
195
|
+
* Source node that emits a single RunEvent on its __control__ output handle.
|
|
196
|
+
* Connect via a control edge (edge_type: "control") to a controlled node.
|
|
197
|
+
*/
|
|
198
|
+
export class SimpleController extends BaseNode {
|
|
199
|
+
static nodeType = "nodetool.test.SimpleController";
|
|
200
|
+
static title = "Simple Controller";
|
|
201
|
+
static description = "Emits one RunEvent via __control__ handle";
|
|
202
|
+
static isStreamingOutput = true;
|
|
203
|
+
async process() {
|
|
204
|
+
return {};
|
|
205
|
+
}
|
|
206
|
+
async *genProcess() {
|
|
207
|
+
yield {
|
|
208
|
+
__control__: {
|
|
209
|
+
event_type: "run",
|
|
210
|
+
properties: {
|
|
211
|
+
threshold: this.threshold ?? 0.8,
|
|
212
|
+
mode: this.mode ?? "normal"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
__decorate([
|
|
219
|
+
prop({ type: "float", default: 0.8 })
|
|
220
|
+
], SimpleController.prototype, "threshold", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
prop({ type: "str", default: "normal" })
|
|
223
|
+
], SimpleController.prototype, "mode", void 0);
|
|
224
|
+
/**
|
|
225
|
+
* Source node that emits N RunEvents on its __control__ output handle.
|
|
226
|
+
*/
|
|
227
|
+
export class MultiTriggerController extends BaseNode {
|
|
228
|
+
static nodeType = "nodetool.test.MultiTriggerController";
|
|
229
|
+
static title = "Multi Trigger Controller";
|
|
230
|
+
static description = "Emits N RunEvents via __control__ handle";
|
|
231
|
+
static isStreamingOutput = true;
|
|
232
|
+
async process() {
|
|
233
|
+
return {};
|
|
234
|
+
}
|
|
235
|
+
async *genProcess() {
|
|
236
|
+
const count = this.count ?? 3;
|
|
237
|
+
for (let i = 0; i < count; i++) {
|
|
238
|
+
yield {
|
|
239
|
+
__control__: {
|
|
240
|
+
event_type: "run",
|
|
241
|
+
properties: {
|
|
242
|
+
threshold: this.threshold ?? 0.5,
|
|
243
|
+
index: i
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
__decorate([
|
|
251
|
+
prop({ type: "int", default: 3 })
|
|
252
|
+
], MultiTriggerController.prototype, "count", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
prop({ type: "float", default: 0.5 })
|
|
255
|
+
], MultiTriggerController.prototype, "threshold", void 0);
|
|
256
|
+
/**
|
|
257
|
+
* Source node that emits a StopEvent on its __control__ handle,
|
|
258
|
+
* causing the controlled node to stop immediately.
|
|
259
|
+
*/
|
|
260
|
+
export class StopEventController extends BaseNode {
|
|
261
|
+
static nodeType = "nodetool.test.StopEventController";
|
|
262
|
+
static title = "Stop Event Controller";
|
|
263
|
+
static description = "Emits a StopEvent via __control__ handle";
|
|
264
|
+
static isStreamingOutput = true;
|
|
265
|
+
async process() {
|
|
266
|
+
return {};
|
|
267
|
+
}
|
|
268
|
+
async *genProcess() {
|
|
269
|
+
yield { __control__: { event_type: "stop" } };
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// Streaming nodes
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
/**
|
|
276
|
+
* Node with is_streaming_input: true.
|
|
277
|
+
* Called once with empty inputs by the actor.
|
|
278
|
+
*/
|
|
279
|
+
export class StreamingInputProcessor extends BaseNode {
|
|
280
|
+
static nodeType = "nodetool.test.StreamingInputProcessor";
|
|
281
|
+
static title = "Streaming Input Processor";
|
|
282
|
+
static description = "Streaming input node – called once with empty inputs";
|
|
283
|
+
static isStreamingInput = true;
|
|
284
|
+
async process() {
|
|
285
|
+
return { result: "processed" };
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Node with both is_streaming_input and is_streaming_output set.
|
|
290
|
+
* Called once with empty inputs (streaming input takes priority in actor).
|
|
291
|
+
*/
|
|
292
|
+
export class FullStreamingNode extends BaseNode {
|
|
293
|
+
static nodeType = "nodetool.test.FullStreamingNode";
|
|
294
|
+
static title = "Full Streaming Node";
|
|
295
|
+
static description = "Both streaming input and output";
|
|
296
|
+
static isStreamingInput = true;
|
|
297
|
+
static isStreamingOutput = true;
|
|
298
|
+
async process() {
|
|
299
|
+
return { result: "full-streaming" };
|
|
300
|
+
}
|
|
301
|
+
async *genProcess() {
|
|
302
|
+
const count = this.count ?? 2;
|
|
303
|
+
for (let i = 0; i < count; i++) {
|
|
304
|
+
yield { value: i };
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
__decorate([
|
|
309
|
+
prop({ type: "int", default: 2 })
|
|
310
|
+
], FullStreamingNode.prototype, "count", void 0);
|
|
311
|
+
// ---------------------------------------------------------------------------
|
|
312
|
+
// Data processing nodes
|
|
313
|
+
// ---------------------------------------------------------------------------
|
|
314
|
+
/**
|
|
315
|
+
* Accepts a list of numbers and emits their sum.
|
|
316
|
+
*/
|
|
317
|
+
export class ListSumProcessor extends BaseNode {
|
|
318
|
+
static nodeType = "nodetool.test.ListSumProcessor";
|
|
319
|
+
static title = "List Sum Processor";
|
|
320
|
+
static description = "Sums an array of numbers";
|
|
321
|
+
async process() {
|
|
322
|
+
const values = (this.values ?? []);
|
|
323
|
+
const sum = Array.isArray(values)
|
|
324
|
+
? values.reduce((a, b) => a + b, 0)
|
|
325
|
+
: 0;
|
|
326
|
+
return { sum };
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
__decorate([
|
|
330
|
+
prop({ type: "list[int]", default: [] })
|
|
331
|
+
], ListSumProcessor.prototype, "values", void 0);
|
|
332
|
+
/**
|
|
333
|
+
* Throws if shouldFail input or prop is true.
|
|
334
|
+
*/
|
|
335
|
+
export class ConditionalErrorProcessor extends BaseNode {
|
|
336
|
+
static nodeType = "nodetool.test.ConditionalErrorProcessor";
|
|
337
|
+
static title = "Conditional Error Processor";
|
|
338
|
+
static description = "Throws only if shouldFail is true";
|
|
339
|
+
async process() {
|
|
340
|
+
const shouldFail = (this.shouldFail ?? false);
|
|
341
|
+
if (shouldFail) {
|
|
342
|
+
throw new Error(String(this.message ?? "conditional error"));
|
|
343
|
+
}
|
|
344
|
+
return { result: "ok" };
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
__decorate([
|
|
348
|
+
prop({ type: "bool", default: false })
|
|
349
|
+
], ConditionalErrorProcessor.prototype, "shouldFail", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
prop({ type: "str", default: "conditional error" })
|
|
352
|
+
], ConditionalErrorProcessor.prototype, "message", void 0);
|
|
353
|
+
/**
|
|
354
|
+
* Runs successfully but emits no output values.
|
|
355
|
+
*/
|
|
356
|
+
export class SilentNode extends BaseNode {
|
|
357
|
+
static nodeType = "nodetool.test.SilentNode";
|
|
358
|
+
static title = "Silent Node";
|
|
359
|
+
static description = "Runs but emits no output";
|
|
360
|
+
async process() {
|
|
361
|
+
return {};
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// ---------------------------------------------------------------------------
|
|
365
|
+
// Typed input source nodes (run as actors, emit their prop value)
|
|
366
|
+
// ---------------------------------------------------------------------------
|
|
367
|
+
export class IntInput extends BaseNode {
|
|
368
|
+
static nodeType = "nodetool.test.IntInput";
|
|
369
|
+
static title = "Int Input";
|
|
370
|
+
static description = "Source node that emits an integer";
|
|
371
|
+
async process() {
|
|
372
|
+
return { value: this.value ?? 0 };
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
__decorate([
|
|
376
|
+
prop({ type: "int", default: 0 })
|
|
377
|
+
], IntInput.prototype, "value", void 0);
|
|
378
|
+
export class FloatInput extends BaseNode {
|
|
379
|
+
static nodeType = "nodetool.test.FloatInput";
|
|
380
|
+
static title = "Float Input";
|
|
381
|
+
static description = "Source node that emits a float";
|
|
382
|
+
async process() {
|
|
383
|
+
return { value: this.value ?? 0.0 };
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
__decorate([
|
|
387
|
+
prop({ type: "int", default: 0.0 })
|
|
388
|
+
], FloatInput.prototype, "value", void 0);
|
|
389
|
+
export class StringInput extends BaseNode {
|
|
390
|
+
static nodeType = "nodetool.test.StringInput";
|
|
391
|
+
static title = "String Input";
|
|
392
|
+
static description = "Source node that emits a string";
|
|
393
|
+
async process() {
|
|
394
|
+
return { value: this.value ?? "" };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
__decorate([
|
|
398
|
+
prop({ type: "str", default: "" })
|
|
399
|
+
], StringInput.prototype, "value", void 0);
|
|
400
|
+
// ---------------------------------------------------------------------------
|
|
401
|
+
// Node arrays for bulk registration
|
|
402
|
+
// ---------------------------------------------------------------------------
|
|
403
|
+
/** All original test nodes */
|
|
404
|
+
export const ALL_TEST_NODES = [
|
|
405
|
+
Passthrough,
|
|
406
|
+
Add,
|
|
407
|
+
Multiply,
|
|
408
|
+
Constant,
|
|
409
|
+
StringConcat,
|
|
410
|
+
FormatText,
|
|
411
|
+
ThresholdProcessor,
|
|
412
|
+
ErrorNode,
|
|
413
|
+
SlowNode,
|
|
414
|
+
StreamingCounter,
|
|
415
|
+
IntAccumulator
|
|
416
|
+
];
|
|
417
|
+
/** Additional E2E-focused test nodes */
|
|
418
|
+
export const ALL_CONTROLLER_NODES = [
|
|
419
|
+
SimpleController,
|
|
420
|
+
MultiTriggerController,
|
|
421
|
+
StopEventController,
|
|
422
|
+
StreamingInputProcessor,
|
|
423
|
+
FullStreamingNode,
|
|
424
|
+
ListSumProcessor,
|
|
425
|
+
ConditionalErrorProcessor,
|
|
426
|
+
SilentNode,
|
|
427
|
+
IntInput,
|
|
428
|
+
FloatInput,
|
|
429
|
+
StringInput
|
|
430
|
+
];
|
|
431
|
+
/** Combined: all test nodes including controller/e2e nodes */
|
|
432
|
+
export const ALL_E2E_NODES = [
|
|
433
|
+
...ALL_TEST_NODES,
|
|
434
|
+
...ALL_CONTROLLER_NODES
|
|
435
|
+
];
|
|
436
|
+
//# sourceMappingURL=test-nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-nodes.js","sourceRoot":"","sources":["../../src/nodes/test-nodes.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,MAAM,CAAU,QA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G,EAAE,CAAC;IACtC,CAAC;;AAJO;IADP,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;yCACjB;AAOrB,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,MAAM,CAAU,QAAQ,GAAG,2BAA2B,CAAC;IACvD,MAAM,CAAU,KAAK,GAAG,cAAc,CAAC;IACvC,MAAM,CAAU,WAAW,GAAG,iCAAiC,CAAC;IAIhE,KAAK,CAAC,OAAO;QACX,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;IACrC,CAAC;;AAJO;IADP,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;0CAChB;AAOrB,8EAA8E;AAC9E,oCAAoC;AACpC,8EAA8E;AAE9E,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,WAAW;IACX,GAAG;IACH,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,kBAAkB;IAClB,SAAS;IACT,QAAQ;IACR,gBAAgB;IAChB,cAAc;CACN,CAAC;AAEX,wCAAwC;AACxC,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,iBAAiB;IACjB,gBAAgB;IAChB,yBAAyB;IACzB,UAAU;IACV,QAAQ;IACR,UAAU;IACV,WAAW;CACH,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,cAAc;IACjB,GAAG,oBAAoB;CACf,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AvailablePackage {
|
|
2
|
+
name: string;
|
|
3
|
+
repo_id: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PACKAGE_REGISTRY_URL: string;
|
|
7
|
+
/**
|
|
8
|
+
* Fetch the package index. Returns [] on network or parse failure
|
|
9
|
+
* (logged to stderr). Never throws.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fetchAvailablePackages(): Promise<AvailablePackage[]>;
|
|
12
|
+
//# sourceMappingURL=package-registry-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registry-client.d.ts","sourceRoot":"","sources":["../src/package-registry-client.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,oBAAoB,QAEkD,CAAC;AAapF;;;GAGG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAwB1E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const PACKAGE_REGISTRY_URL = process.env["NODETOOL_PACKAGE_REGISTRY_URL"] ??
|
|
2
|
+
"https://raw.githubusercontent.com/nodetool-ai/nodetool-registry/main/index.json";
|
|
3
|
+
function isAvailablePackage(value) {
|
|
4
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
5
|
+
return false;
|
|
6
|
+
const record = value;
|
|
7
|
+
return (typeof record["name"] === "string" &&
|
|
8
|
+
typeof record["repo_id"] === "string" &&
|
|
9
|
+
(record["description"] === undefined ||
|
|
10
|
+
typeof record["description"] === "string"));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Fetch the package index. Returns [] on network or parse failure
|
|
14
|
+
* (logged to stderr). Never throws.
|
|
15
|
+
*/
|
|
16
|
+
export async function fetchAvailablePackages() {
|
|
17
|
+
try {
|
|
18
|
+
const res = await fetch(PACKAGE_REGISTRY_URL);
|
|
19
|
+
if (!res.ok) {
|
|
20
|
+
console.error(`Failed to fetch package registry: HTTP ${res.status} ${res.statusText}`);
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const parsed = await res.json();
|
|
24
|
+
const list = Array.isArray(parsed)
|
|
25
|
+
? parsed
|
|
26
|
+
: parsed && typeof parsed === "object" && Array.isArray(parsed["packages"])
|
|
27
|
+
? parsed["packages"]
|
|
28
|
+
: null;
|
|
29
|
+
if (!list) {
|
|
30
|
+
console.error("Package registry response has no packages array");
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
return list.filter(isAvailablePackage);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error(`Failed to fetch package registry: ${String(error)}`);
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=package-registry-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-registry-client.js","sourceRoot":"","sources":["../src/package-registry-client.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,oBAAoB,GAC/B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAC5C,iFAAiF,CAAC;AAEpF,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9E,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,OAAO,CACL,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ;QAClC,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,QAAQ;QACrC,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,SAAS;YAClC,OAAO,MAAM,CAAC,aAAa,CAAC,KAAK,QAAQ,CAAC,CAC7C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CACX,0CAA0C,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CACzE,CAAC;YACF,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,MAAM,GAAY,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAChC,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,MAAkC,CAAC,UAAU,CAAC,CAAC;gBACtG,CAAC,CAAG,MAAkC,CAAC,UAAU,CAAe;gBAChE,CAAC,CAAC,IAAI,CAAC;QACX,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YACjE,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,qCAAqC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scan a nodetool Python node package by invoking `nodetool.package_tools`
|
|
3
|
+
* (shipped inside `nodetool-core`) as a one-shot subprocess.
|
|
4
|
+
*
|
|
5
|
+
* Produces a `PackageMetadata` (same shape as what `loadPythonPackageMetadata`
|
|
6
|
+
* reads back from disk). Does not require a running server.
|
|
7
|
+
*/
|
|
8
|
+
import type { PackageMetadata } from "./metadata.js";
|
|
9
|
+
export interface PythonScanOptions {
|
|
10
|
+
/** Path to the Python package (must contain pyproject.toml). */
|
|
11
|
+
packageDir: string;
|
|
12
|
+
/** Python executable. Default: env NODETOOL_PYTHON, else auto-detected. */
|
|
13
|
+
python?: string;
|
|
14
|
+
/** Fetch HF model metadata for recommended models (slow). */
|
|
15
|
+
enrich?: boolean;
|
|
16
|
+
/** Also write the JSON into the package's own package_metadata dir. */
|
|
17
|
+
write?: boolean;
|
|
18
|
+
/** Forwarded to the Python process. */
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
/** Called for each `SCAN ...` line on stderr. */
|
|
21
|
+
onProgress?: (line: string) => void;
|
|
22
|
+
/** AbortSignal to cancel. */
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
}
|
|
25
|
+
export interface PythonScanResult {
|
|
26
|
+
metadata: PackageMetadata;
|
|
27
|
+
stderr: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class PythonScanError extends Error {
|
|
30
|
+
readonly exitCode: number | null;
|
|
31
|
+
readonly stderr: string;
|
|
32
|
+
constructor(message: string, exitCode: number | null, stderr: string);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Run `python -m nodetool.package_tools scan` and return the parsed result.
|
|
36
|
+
*
|
|
37
|
+
* Requires `nodetool-core` to be installed in the target Python environment.
|
|
38
|
+
*/
|
|
39
|
+
export declare function scanPythonPackage(opts: PythonScanOptions): Promise<PythonScanResult>;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve a Python executable, matching the convention used by
|
|
42
|
+
* `PythonStdioBridge` in `@nodetool-ai/runtime`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolvePythonBin(): string;
|
|
45
|
+
//# sourceMappingURL=python-package-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python-package-scan.d.ts","sourceRoot":"","sources":["../src/python-package-scan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,eAAgB,SAAQ,KAAK;aAGtB,QAAQ,EAAE,MAAM,GAAG,IAAI;aACvB,MAAM,EAAE,MAAM;gBAF9B,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,MAAM;CAKjC;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAqG3B;AAUD;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAkBzC"}
|