@nodetool-ai/node-sdk 0.7.0-rc.23 → 0.8.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 (157) hide show
  1. package/README.md +34 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/base-node.d.ts +253 -13
  4. package/dist/base-node.d.ts.map +1 -1
  5. package/dist/base-node.js +337 -49
  6. package/dist/base-node.js.map +1 -1
  7. package/dist/class-name-to-title.d.ts +26 -0
  8. package/dist/class-name-to-title.d.ts.map +1 -0
  9. package/dist/class-name-to-title.js +59 -0
  10. package/dist/class-name-to-title.js.map +1 -0
  11. package/dist/code-analysis.d.ts +222 -0
  12. package/dist/code-analysis.d.ts.map +1 -0
  13. package/dist/code-analysis.js +803 -0
  14. package/dist/code-analysis.js.map +1 -0
  15. package/dist/code-body.d.ts +61 -0
  16. package/dist/code-body.d.ts.map +1 -0
  17. package/dist/code-body.js +288 -0
  18. package/dist/code-body.js.map +1 -0
  19. package/dist/code-node-validation.d.ts +67 -0
  20. package/dist/code-node-validation.d.ts.map +1 -0
  21. package/dist/code-node-validation.js +540 -0
  22. package/dist/code-node-validation.js.map +1 -0
  23. package/dist/content-card.d.ts +30 -0
  24. package/dist/content-card.d.ts.map +1 -0
  25. package/dist/content-card.js +68 -0
  26. package/dist/content-card.js.map +1 -0
  27. package/dist/correlation-validation.d.ts +19 -0
  28. package/dist/correlation-validation.d.ts.map +1 -0
  29. package/dist/correlation-validation.js +101 -0
  30. package/dist/correlation-validation.js.map +1 -0
  31. package/dist/cost-estimate.d.ts +244 -0
  32. package/dist/cost-estimate.d.ts.map +1 -0
  33. package/dist/cost-estimate.js +636 -0
  34. package/dist/cost-estimate.js.map +1 -0
  35. package/dist/decorators.d.ts.map +1 -1
  36. package/dist/decorators.js +4 -1
  37. package/dist/decorators.js.map +1 -1
  38. package/dist/docs/nodes.d.ts.map +1 -1
  39. package/dist/docs/nodes.js +3 -2
  40. package/dist/docs/nodes.js.map +1 -1
  41. package/dist/docs/overview.d.ts.map +1 -1
  42. package/dist/docs/overview.js +4 -3
  43. package/dist/docs/overview.js.map +1 -1
  44. package/dist/docs/workflows.d.ts.map +1 -1
  45. package/dist/docs/workflows.js +10 -9
  46. package/dist/docs/workflows.js.map +1 -1
  47. package/dist/field-classification.d.ts +31 -0
  48. package/dist/field-classification.d.ts.map +1 -0
  49. package/dist/field-classification.js +58 -0
  50. package/dist/field-classification.js.map +1 -0
  51. package/dist/graph-validation.d.ts +239 -0
  52. package/dist/graph-validation.d.ts.map +1 -0
  53. package/dist/graph-validation.js +1165 -0
  54. package/dist/graph-validation.js.map +1 -0
  55. package/dist/index.d.ts +27 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +29 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/js-script-link.d.ts +53 -0
  60. package/dist/js-script-link.d.ts.map +1 -0
  61. package/dist/js-script-link.js +58 -0
  62. package/dist/js-script-link.js.map +1 -0
  63. package/dist/js-script-materialize.d.ts +52 -0
  64. package/dist/js-script-materialize.d.ts.map +1 -0
  65. package/dist/js-script-materialize.js +24 -0
  66. package/dist/js-script-materialize.js.map +1 -0
  67. package/dist/manifest-node-values.d.ts +106 -0
  68. package/dist/manifest-node-values.d.ts.map +1 -0
  69. package/dist/manifest-node-values.js +195 -0
  70. package/dist/manifest-node-values.js.map +1 -0
  71. package/dist/metadata.d.ts +73 -3
  72. package/dist/metadata.d.ts.map +1 -1
  73. package/dist/metadata.js +132 -49
  74. package/dist/metadata.js.map +1 -1
  75. package/dist/node-metadata.d.ts.map +1 -1
  76. package/dist/node-metadata.js +58 -56
  77. package/dist/node-metadata.js.map +1 -1
  78. package/dist/node-type-inventory.d.ts +51 -0
  79. package/dist/node-type-inventory.d.ts.map +1 -0
  80. package/dist/node-type-inventory.js +121 -0
  81. package/dist/node-type-inventory.js.map +1 -0
  82. package/dist/nodes/test-nodes.d.ts +77 -30
  83. package/dist/nodes/test-nodes.d.ts.map +1 -1
  84. package/dist/nodes/test-nodes.js +2 -34
  85. package/dist/nodes/test-nodes.js.map +1 -1
  86. package/dist/pack-loader.d.ts +202 -0
  87. package/dist/pack-loader.d.ts.map +1 -0
  88. package/dist/pack-loader.js +529 -0
  89. package/dist/pack-loader.js.map +1 -0
  90. package/dist/package-registry-client.d.ts.map +1 -1
  91. package/dist/package-registry-client.js +15 -6
  92. package/dist/package-registry-client.js.map +1 -1
  93. package/dist/port-types.d.ts +15 -0
  94. package/dist/port-types.d.ts.map +1 -0
  95. package/dist/port-types.js +72 -0
  96. package/dist/port-types.js.map +1 -0
  97. package/dist/pricing-bundle.d.ts +83 -0
  98. package/dist/pricing-bundle.d.ts.map +1 -0
  99. package/dist/pricing-bundle.js +82 -0
  100. package/dist/pricing-bundle.js.map +1 -0
  101. package/dist/pricing-params.d.ts +59 -0
  102. package/dist/pricing-params.d.ts.map +1 -0
  103. package/dist/pricing-params.js +282 -0
  104. package/dist/pricing-params.js.map +1 -0
  105. package/dist/python-package-scan.d.ts +8 -0
  106. package/dist/python-package-scan.d.ts.map +1 -1
  107. package/dist/python-package-scan.js +21 -8
  108. package/dist/python-package-scan.js.map +1 -1
  109. package/dist/registry.d.ts +105 -2
  110. package/dist/registry.d.ts.map +1 -1
  111. package/dist/registry.js +393 -30
  112. package/dist/registry.js.map +1 -1
  113. package/dist/sandbox-bridge-packs.d.ts +39 -0
  114. package/dist/sandbox-bridge-packs.d.ts.map +1 -0
  115. package/dist/sandbox-bridge-packs.js +249 -0
  116. package/dist/sandbox-bridge-packs.js.map +1 -0
  117. package/dist/sandbox-catalog-host.d.ts +31 -0
  118. package/dist/sandbox-catalog-host.d.ts.map +1 -0
  119. package/dist/sandbox-catalog-host.js +78 -0
  120. package/dist/sandbox-catalog-host.js.map +1 -0
  121. package/dist/sandbox-module-catalog.d.ts +14 -0
  122. package/dist/sandbox-module-catalog.d.ts.map +1 -0
  123. package/dist/sandbox-module-catalog.js +402 -0
  124. package/dist/sandbox-module-catalog.js.map +1 -0
  125. package/dist/sandbox-npm-artifacts.d.ts +56 -0
  126. package/dist/sandbox-npm-artifacts.d.ts.map +1 -0
  127. package/dist/sandbox-npm-artifacts.js +17 -0
  128. package/dist/sandbox-npm-artifacts.js.map +1 -0
  129. package/dist/sandbox-pack-discovery.d.ts +93 -0
  130. package/dist/sandbox-pack-discovery.d.ts.map +1 -0
  131. package/dist/sandbox-pack-discovery.js +807 -0
  132. package/dist/sandbox-pack-discovery.js.map +1 -0
  133. package/dist/search.d.ts +29 -1
  134. package/dist/search.d.ts.map +1 -1
  135. package/dist/search.js +136 -9
  136. package/dist/search.js.map +1 -1
  137. package/dist/type-compat.d.ts +36 -0
  138. package/dist/type-compat.d.ts.map +1 -0
  139. package/dist/type-compat.js +98 -0
  140. package/dist/type-compat.js.map +1 -0
  141. package/dist/type-predicates.d.ts +25 -0
  142. package/dist/type-predicates.d.ts.map +1 -0
  143. package/dist/type-predicates.js +31 -0
  144. package/dist/type-predicates.js.map +1 -0
  145. package/dist/validation.d.ts +18 -0
  146. package/dist/validation.d.ts.map +1 -1
  147. package/dist/validation.js +70 -11
  148. package/dist/validation.js.map +1 -1
  149. package/dist/workflow-document-tools.d.ts +34 -0
  150. package/dist/workflow-document-tools.d.ts.map +1 -0
  151. package/dist/workflow-document-tools.js +357 -0
  152. package/dist/workflow-document-tools.js.map +1 -0
  153. package/dist/workflow-interface.d.ts +62 -0
  154. package/dist/workflow-interface.d.ts.map +1 -0
  155. package/dist/workflow-interface.js +351 -0
  156. package/dist/workflow-interface.js.map +1 -0
  157. package/package.json +67 -10
package/dist/registry.js CHANGED
@@ -1,15 +1,33 @@
1
+ import { supportsPlatform } from "@nodetool-ai/protocol";
2
+ import { hasStreamingOutput } from "./base-node.js";
1
3
  import { loadPythonPackageMetadata } from "./metadata.js";
2
4
  import { getNodeMetadata } from "./node-metadata.js";
5
+ import { NodeSearchIndex } from "./search.js";
3
6
  export class NodeRegistry {
4
7
  _classes = new Map();
5
8
  _loadedMetadataByType = new Map();
6
9
  _registeredMetadataByType = new Map();
10
+ _loadedMetadataSourceByType = new Map();
11
+ _registeredMetadataSourceByType = new Map();
12
+ _loadedPackageIdByType = new Map();
13
+ _registeredPackageIdByType = new Map();
14
+ _activePackageId;
7
15
  _strictMetadata;
16
+ _revision = 0;
17
+ // Memoized derived views of the metadata maps above. Both are O(n) to build,
18
+ // and `listMetadata`/`searchMetadata` are called many times per graph build
19
+ // (the planner searches the same registry 5–10× per attempt). They are
20
+ // rebuilt lazily and invalidated by every mutation (`register`, `unregister`,
21
+ // `clear`, `loadMetadata`, `loadPythonMetadata`).
22
+ _mergedMetadataCache = null;
23
+ _searchIndexCache = null;
8
24
  constructor(options = {}) {
25
+ // Stryker disable next-line LogicalOperator,BooleanLiteral: _strictMetadata only gated the (unreachable) strict-throw branch, so its value has no observable effect — the default is inert (equivalent).
9
26
  this._strictMetadata = options.strictMetadata ?? false;
10
27
  if (options.metadataByType) {
11
28
  for (const [nodeType, metadata] of options.metadataByType.entries()) {
12
29
  this._loadedMetadataByType.set(nodeType, metadata);
30
+ this._loadedMetadataSourceByType.set(nodeType, "loaded-metadata");
13
31
  }
14
32
  }
15
33
  }
@@ -17,17 +35,81 @@ export class NodeRegistry {
17
35
  if (!nodeClass.nodeType) {
18
36
  throw new Error(`Cannot register node class without nodeType: ${nodeClass.name}`);
19
37
  }
38
+ // Last write wins (needed for hot reload), but warn so accidental node
39
+ // type collisions between packages don't go unnoticed.
40
+ const existing = this._classes.get(nodeClass.nodeType);
41
+ if (existing && existing !== nodeClass) {
42
+ console.warn(
43
+ // Stryker disable next-line StringLiteral: operator diagnostic text only.
44
+ `[NodeRegistry] Replacing existing registration for node type: ${nodeClass.nodeType}`);
45
+ }
20
46
  // TS class definitions are the source of truth for TS nodes.
21
47
  // Python metadata is NOT merged — it is only used for Python-only
22
48
  // node packs (huggingface, mlx, etc.) that have no TS class.
23
49
  const metadata = options.metadata ?? getNodeMetadata(nodeClass);
50
+ // Stryker disable ConditionalExpression,BlockStatement,StringLiteral: getNodeMetadata always returns a populated object for a valid class, so `metadata` is always truthy and the strict-mode else branch is unreachable dead defensive code.
24
51
  if (metadata) {
25
52
  this._registeredMetadataByType.set(nodeClass.nodeType, metadata);
53
+ this._registeredMetadataSourceByType.set(nodeClass.nodeType, options.source ?? "typescript");
54
+ const packageId = options.packageId ?? this._activePackageId;
55
+ if (packageId?.trim()) {
56
+ this._registeredPackageIdByType.set(nodeClass.nodeType, packageId.trim());
57
+ }
58
+ else {
59
+ this._registeredPackageIdByType.delete(nodeClass.nodeType);
60
+ }
26
61
  }
27
62
  else if (this._strictMetadata) {
28
63
  throw new Error(`Missing resolved metadata for node type: ${nodeClass.nodeType}`);
29
64
  }
65
+ // Stryker restore ConditionalExpression,BlockStatement,StringLiteral
30
66
  this._classes.set(nodeClass.nodeType, nodeClass);
67
+ this.invalidateMetadataCaches();
68
+ }
69
+ /**
70
+ * Drop the memoized metadata array and search index. Called by every
71
+ * mutation so the next read rebuilds from the current maps.
72
+ */
73
+ invalidateMetadataCaches() {
74
+ this._mergedMetadataCache = null;
75
+ this._searchIndexCache = null;
76
+ this._revision++;
77
+ }
78
+ /**
79
+ * Attribute synchronous registrar calls to an explicit package identity.
80
+ * Package registration functions are synchronous by contract.
81
+ */
82
+ registerPackage(packageId, registrar) {
83
+ const previous = this._activePackageId;
84
+ this._activePackageId = packageId.trim() || undefined;
85
+ try {
86
+ registrar(this);
87
+ }
88
+ finally {
89
+ this._activePackageId = previous;
90
+ }
91
+ }
92
+ /** Monotonic metadata revision used to invalidate derived contract caches. */
93
+ get revision() {
94
+ return this._revision;
95
+ }
96
+ /**
97
+ * Merged metadata for every node (loaded Python metadata first, registered TS
98
+ * metadata last so a TS class wins on a node_type collision). Built once and
99
+ * memoized; callers that mutate the result must copy it first.
100
+ */
101
+ mergedMetadata() {
102
+ if (this._mergedMetadataCache === null) {
103
+ const merged = new Map();
104
+ for (const [nodeType, metadata] of this._loadedMetadataByType.entries()) {
105
+ merged.set(nodeType, metadata);
106
+ }
107
+ for (const [nodeType, metadata] of this._registeredMetadataByType.entries()) {
108
+ merged.set(nodeType, metadata);
109
+ }
110
+ this._mergedMetadataCache = [...merged.values()];
111
+ }
112
+ return this._mergedMetadataCache;
31
113
  }
32
114
  /**
33
115
  * Validate a node descriptor against its registered class's @prop schema.
@@ -43,7 +125,9 @@ export class NodeRegistry {
43
125
  const properties = descriptor.properties ?? {};
44
126
  return NodeClass.validateProperties(properties, {
45
127
  connectedHandles,
46
- nodeId: descriptor.id
128
+ nodeId: descriptor.id,
129
+ dynamicSlots: descriptor.dynamic_inputs,
130
+ dynamicValues: descriptor.dynamic_properties
47
131
  });
48
132
  }
49
133
  /**
@@ -54,16 +138,90 @@ export class NodeRegistry {
54
138
  createNodeValidator() {
55
139
  return (descriptor, connectedHandles) => this.validateNode(descriptor, connectedHandles);
56
140
  }
141
+ /**
142
+ * Return a new NodeRegistry containing only the node classes that declare
143
+ * support for `target`. Loaded (Python) metadata is copied across when the
144
+ * matching class is included.
145
+ *
146
+ * Used at bundle / deployment time to construct a registry tailored to the
147
+ * active platform — the workflow runner then naturally fails on any graph
148
+ * referencing an unsupported node type.
149
+ */
150
+ forPlatform(target) {
151
+ // Stryker disable next-line ObjectLiteral: _strictMetadata only gated the unreachable strict-throw, so propagating it (vs {}) has no observable effect (equivalent).
152
+ const filtered = new NodeRegistry({
153
+ strictMetadata: this._strictMetadata
154
+ });
155
+ for (const [nodeType, nodeClass] of this._classes) {
156
+ if (!supportsPlatform(nodeClass.platforms, target))
157
+ continue;
158
+ const metadata = this._registeredMetadataByType.get(nodeType);
159
+ const source = this._registeredMetadataSourceByType.get(nodeType) ?? "typescript";
160
+ const packageId = this._registeredPackageIdByType.get(nodeType);
161
+ const registration = { source };
162
+ if (metadata) {
163
+ registration.metadata = metadata;
164
+ }
165
+ if (packageId) {
166
+ registration.packageId = packageId;
167
+ }
168
+ filtered.register(nodeClass, registration);
169
+ const loaded = this._loadedMetadataByType.get(nodeType);
170
+ // Stryker disable next-line ConditionalExpression: every kept node is re-registered with derived metadata above (which getMetadata returns first), so copying the loaded entry is unobservable (equivalent).
171
+ if (loaded) {
172
+ filtered._loadedMetadataByType.set(nodeType, loaded);
173
+ filtered._loadedMetadataSourceByType.set(nodeType, this._loadedMetadataSourceByType.get(nodeType) ?? "loaded-metadata");
174
+ const loadedPackageId = this._loadedPackageIdByType.get(nodeType);
175
+ if (loadedPackageId) {
176
+ filtered._loadedPackageIdByType.set(nodeType, loadedPackageId);
177
+ }
178
+ }
179
+ }
180
+ return filtered;
181
+ }
182
+ /**
183
+ * Validator that rejects nodes not supporting `target`. Compose with
184
+ * {@link createNodeValidator} when enforcing platform constraints in a
185
+ * registry that contains nodes for multiple platforms.
186
+ */
187
+ createPlatformValidator(target) {
188
+ return (descriptor) => {
189
+ const nodeClass = this._classes.get(descriptor.type);
190
+ const platforms = nodeClass?.platforms ??
191
+ this.resolveMetadata(descriptor.type)?.platforms;
192
+ if (supportsPlatform(platforms, target))
193
+ return [];
194
+ const supported = platforms && platforms.length > 0 ? platforms.join(", ") : "node";
195
+ return [
196
+ {
197
+ nodeId: descriptor.id,
198
+ nodeType: descriptor.type,
199
+ property: "*",
200
+ code: "unsupported_platform",
201
+ message: `Node ${descriptor.type} is not supported on platform '${target}' (supports: ${supported})`
202
+ }
203
+ ];
204
+ };
205
+ }
57
206
  resolve(descriptor) {
58
207
  const NodeClass = this._classes.get(descriptor.type);
59
208
  if (!NodeClass) {
60
209
  throw new Error(`Unknown node type: ${descriptor.type}`);
61
210
  }
62
- const instance = new NodeClass(descriptor.properties ?? {});
211
+ const properties = descriptor.properties ?? {};
212
+ // Slot declarations must be visible to `assign()` before it stores the
213
+ // dynamic values, so they can be coerced against their declared type.
214
+ const instance = new NodeClass(descriptor.dynamic_inputs
215
+ ? { _dynamic_inputs: descriptor.dynamic_inputs, ...properties }
216
+ : properties);
63
217
  instance.__node_id = descriptor.id;
64
218
  instance.__node_name = descriptor.name ?? descriptor.type;
219
+ // Stryker disable next-line ConditionalExpression: forcing this true assigns _dynamic_outputs = undefined, which reads back identically to leaving it unset (equivalent).
65
220
  if (descriptor.dynamic_outputs) {
66
- instance._dynamic_outputs = descriptor.dynamic_outputs;
221
+ Reflect.set(instance, "_dynamic_outputs", descriptor.dynamic_outputs);
222
+ }
223
+ if (descriptor.dynamic_inputs) {
224
+ Reflect.set(instance, "_dynamic_inputs", descriptor.dynamic_inputs);
67
225
  }
68
226
  return instance.toExecutor();
69
227
  }
@@ -80,6 +238,37 @@ export class NodeRegistry {
80
238
  return (this._registeredMetadataByType.get(nodeType) ??
81
239
  this._loadedMetadataByType.get(nodeType));
82
240
  }
241
+ getMetadataSource(nodeType) {
242
+ return (this._registeredMetadataSourceByType.get(nodeType) ??
243
+ this._loadedMetadataSourceByType.get(nodeType));
244
+ }
245
+ /**
246
+ * Exact package identity recorded by the loader or registrar for this node.
247
+ * Undefined means package provenance is not authoritative.
248
+ */
249
+ getNodePackageId(nodeType) {
250
+ if (this._registeredMetadataByType.has(nodeType)) {
251
+ return this._registeredPackageIdByType.get(nodeType);
252
+ }
253
+ return this._loadedPackageIdByType.get(nodeType);
254
+ }
255
+ /** Exact package identities represented by the current registry. */
256
+ listNodePackageIds() {
257
+ const ids = new Set();
258
+ for (const nodeType of this._registeredMetadataByType.keys()) {
259
+ const id = this._registeredPackageIdByType.get(nodeType);
260
+ if (id)
261
+ ids.add(id);
262
+ }
263
+ for (const nodeType of this._loadedMetadataByType.keys()) {
264
+ if (this._registeredMetadataByType.has(nodeType))
265
+ continue;
266
+ const id = this._loadedPackageIdByType.get(nodeType);
267
+ if (id)
268
+ ids.add(id);
269
+ }
270
+ return [...ids].sort();
271
+ }
83
272
  resolveMetadata(nodeType) {
84
273
  const exact = this.getMetadata(nodeType);
85
274
  if (exact)
@@ -90,33 +279,86 @@ export class NodeRegistry {
90
279
  return undefined;
91
280
  }
92
281
  listMetadata() {
93
- const merged = new Map();
94
- for (const [nodeType, metadata] of this._loadedMetadataByType.entries()) {
95
- merged.set(nodeType, metadata);
96
- }
97
- for (const [nodeType, metadata] of this._registeredMetadataByType.entries()) {
98
- merged.set(nodeType, metadata);
282
+ // Fresh copy each call: some callers (http-api, tRPC nodes router) sort the
283
+ // result in place, which must not reorder the shared cache.
284
+ return [...this.mergedMetadata()];
285
+ }
286
+ /**
287
+ * Rank registered nodes against `terms` using a memoized search index.
288
+ *
289
+ * Equivalent to `rankNodeMetadata(this.listMetadata(), terms, options)` but
290
+ * reuses a precomputed index across calls — the planner's inner loop. The
291
+ * index is invalidated whenever the registry changes.
292
+ */
293
+ searchMetadata(terms, options = {}) {
294
+ if (this._searchIndexCache === null) {
295
+ this._searchIndexCache = new NodeSearchIndex(this.mergedMetadata());
99
296
  }
100
- return [...merged.values()];
297
+ return this._searchIndexCache.rank(terms, options);
101
298
  }
102
299
  listRegisteredNodeTypesWithoutMetadata() {
300
+ // Stryker disable next-line ArrowFunction,ConditionalExpression: register() always stores derived metadata, so getMetadata is never undefined for a registered type — this filter always yields [] regardless of the predicate (equivalent).
103
301
  return this.list().filter((nodeType) => this.getMetadata(nodeType) === undefined);
104
302
  }
105
303
  /** Add or replace metadata for a node type (e.g. from Python bridge). */
106
- loadMetadata(nodeType, metadata) {
304
+ loadMetadata(nodeType, metadata, options = {}) {
107
305
  this._loadedMetadataByType.set(nodeType, metadata);
306
+ this._loadedMetadataSourceByType.set(nodeType, options.source ?? "loaded-metadata");
307
+ if (options.packageId?.trim()) {
308
+ this._loadedPackageIdByType.set(nodeType, options.packageId.trim());
309
+ }
310
+ else {
311
+ this._loadedPackageIdByType.delete(nodeType);
312
+ }
313
+ this.invalidateMetadataCaches();
108
314
  }
109
315
  loadPythonMetadata(options = {}) {
110
316
  const loaded = loadPythonPackageMetadata(options);
317
+ const packageIdByType = new Map();
318
+ for (const pkg of loaded.packages) {
319
+ for (const node of pkg.nodes ?? []) {
320
+ if (node?.node_type)
321
+ packageIdByType.set(node.node_type, pkg.name);
322
+ }
323
+ }
111
324
  for (const [nodeType, metadata] of loaded.nodesByType.entries()) {
112
325
  this._loadedMetadataByType.set(nodeType, metadata);
326
+ this._loadedMetadataSourceByType.set(nodeType, "python-package");
327
+ const packageId = packageIdByType.get(nodeType);
328
+ if (packageId) {
329
+ this._loadedPackageIdByType.set(nodeType, packageId);
330
+ }
331
+ else {
332
+ this._loadedPackageIdByType.delete(nodeType);
333
+ }
113
334
  }
335
+ this.invalidateMetadataCaches();
114
336
  return loaded;
115
337
  }
338
+ /**
339
+ * Remove a node type from the registry.
340
+ * Returns true if the node type was present and removed.
341
+ */
342
+ unregister(nodeType) {
343
+ const hadClass = this._classes.delete(nodeType);
344
+ this._loadedMetadataByType.delete(nodeType);
345
+ this._registeredMetadataByType.delete(nodeType);
346
+ this._loadedMetadataSourceByType.delete(nodeType);
347
+ this._registeredMetadataSourceByType.delete(nodeType);
348
+ this._loadedPackageIdByType.delete(nodeType);
349
+ this._registeredPackageIdByType.delete(nodeType);
350
+ this.invalidateMetadataCaches();
351
+ return hadClass;
352
+ }
116
353
  clear() {
117
354
  this._classes.clear();
118
355
  this._loadedMetadataByType.clear();
119
356
  this._registeredMetadataByType.clear();
357
+ this._loadedMetadataSourceByType.clear();
358
+ this._registeredMetadataSourceByType.clear();
359
+ this._loadedPackageIdByType.clear();
360
+ this._registeredPackageIdByType.clear();
361
+ this.invalidateMetadataCaches();
120
362
  }
121
363
  static global = new NodeRegistry();
122
364
  }
@@ -124,6 +366,7 @@ export function register(nodeClass) {
124
366
  NodeRegistry.global.register(nodeClass);
125
367
  }
126
368
  function typeMetadataToString(typeMeta) {
369
+ // Stryker disable next-line MethodExpression: .filter(Boolean) only drops empty renderings, which valid type metadata never produces (equivalent).
127
370
  const args = (typeMeta.type_args ?? [])
128
371
  .map(typeMetadataToString)
129
372
  .filter(Boolean);
@@ -131,10 +374,97 @@ function typeMetadataToString(typeMeta) {
131
374
  ? `${typeMeta.type}[${args.join(", ")}]`
132
375
  : typeMeta.type;
133
376
  }
377
+ /**
378
+ * Stamp streaming/control flags from the registry onto graph descriptors.
379
+ * Graphs arriving from a client carry only `type` and `properties`, and the
380
+ * kernel actor trusts `node.is_streaming_input` to pick run() over a one-shot
381
+ * process() — without this every streaming node "completes" instantly with
382
+ * empty outputs. The full-fat equivalent (which also resolves property/output
383
+ * types and drops unknown node types) is `Graph.loadFromDict` with
384
+ * `createGraphNodeTypeResolver`; this is the lightweight synchronous version
385
+ * for runners that only need correct execution semantics.
386
+ *
387
+ * Flags are resolved from the node's registered TS class when present, else
388
+ * from its loaded metadata (Python nodes have no TS class — they live only as
389
+ * metadata loaded from the worker's `package_metadata`, so `getClass` returns
390
+ * undefined and we must consult `resolveMetadata` or a streaming Python node
391
+ * read from a saved graph silently runs one-shot). This mirrors
392
+ * `Graph.loadFromDict`, which already reads the Python flag from metadata.
393
+ * `is_streaming_output` is derived from a TS class via `hasStreamingOutput`
394
+ * (purely structural: a `genProcess` override or iteration/forward/chunk
395
+ * correlation — ForEach, Collection, RepeatCount), and from the metadata's
396
+ * already-resolved boolean otherwise. Node types the registry doesn't know at
397
+ * all keep their own flags, defaulted to false (resolveExecutor reports
398
+ * unknown types loudly).
399
+ */
400
+ export function hydrateGraphNodeFlags(graph, registry) {
401
+ const nodes = graph.nodes.map((node) => {
402
+ const cls = registry.getClass(node.type);
403
+ // Fall back to loaded metadata only for class-less (Python) nodes.
404
+ const meta = cls ? undefined : registry.resolveMetadata(node.type);
405
+ return {
406
+ ...node,
407
+ // `??`, not `||`: a registered class always carries explicit booleans
408
+ // (BaseNode defaults them to false), so the registry corrects a stale
409
+ // saved `true` when a node type migrates away from streaming/control.
410
+ // OR let the saved value win forever. Saved flags apply only when the
411
+ // registry has no opinion (unknown type, or metadata omitting the flag).
412
+ // A class may also decide streaming input per instance, from the node's
413
+ // own properties (`resolveStreamingInput` — the Code node, where the body
414
+ // decides). It is consulted ahead of the static and re-read on every
415
+ // hydration, so it cannot go stale.
416
+ is_streaming_input: (cls
417
+ ? (cls.resolveStreamingInput?.(node) ?? cls.isStreamingInput)
418
+ : meta?.is_streaming_input) ??
419
+ node.is_streaming_input ??
420
+ false,
421
+ is_streaming_output: (cls ? hasStreamingOutput(cls) : meta?.is_streaming_output) ??
422
+ node.is_streaming_output ??
423
+ false,
424
+ is_controlled: (cls ? cls.isControlled : meta?.is_controlled) ??
425
+ node.is_controlled ??
426
+ false,
427
+ is_join_node: (cls ? cls.isJoinNode : meta?.is_join_node) ??
428
+ node.is_join_node ??
429
+ false,
430
+ is_trigger: (cls ? cls.isTrigger : meta?.is_trigger) ?? node.is_trigger ?? false,
431
+ // No `?? node.retry_safe` here, unlike every flag around it: whether
432
+ // re-running a node duplicates a payment or a publish is a property of
433
+ // its implementation, not of a saved file. A graph asserting
434
+ // `retry_safe: true` for a node nobody classified would hand the
435
+ // supervisor a retry on a side-effecting node — the asymmetric failure
436
+ // docs/workflow-supervisor-design.md §5.3 exists to prevent.
437
+ retry_safe: (cls ? cls.retrySafe : meta?.retry_safe) ?? false,
438
+ always_emit_output_updates: (cls
439
+ ? cls.alwaysEmitOutputUpdates
440
+ : meta?.always_emit_output_updates) ??
441
+ node.always_emit_output_updates ??
442
+ false,
443
+ input_mode: (cls ? cls.inputMode : meta?.input_mode) ?? node.input_mode,
444
+ output_correlation: (cls ? cls.outputCorrelation : meta?.output_correlation) ??
445
+ node.output_correlation
446
+ };
447
+ });
448
+ return { nodes, edges: [...graph.edges] };
449
+ }
134
450
  function deriveNamespace(nodeType) {
135
451
  const lastDot = nodeType.lastIndexOf(".");
452
+ // Stryker disable next-line EqualityOperator: at lastDot === 0 both arms yield "" (slice(0,0) === the else ""), so > 0 vs >= 0 are indistinguishable (equivalent).
136
453
  return lastDot > 0 ? nodeType.slice(0, lastDot) : "";
137
454
  }
455
+ /**
456
+ * The declared input types of one node type, as a `propertyTypes`-shaped map
457
+ * (`{[property]: "list[image]" | "str" | …}`). This is the kernel's authority
458
+ * on list-ness — correlation analysis and multi-edge fan-in read it — so
459
+ * hydration paths that do not go through `Graph.loadFromDict` stamp it from
460
+ * here rather than re-deriving the rendering.
461
+ */
462
+ export function propertyTypesForMetadata(metadata) {
463
+ return Object.fromEntries((metadata.properties ?? []).map((prop) => [
464
+ prop.name,
465
+ typeMetadataToString(prop.type)
466
+ ]));
467
+ }
138
468
  export function createGraphNodeTypeResolver(registry, options = {}) {
139
469
  return {
140
470
  resolveNodeType: async (nodeType) => {
@@ -148,37 +478,70 @@ export function createGraphNodeTypeResolver(registry, options = {}) {
148
478
  }
149
479
  if (!metadata)
150
480
  return null;
151
- const propertyTypes = Object.fromEntries((metadata.properties ?? []).map((prop) => [
152
- prop.name,
153
- typeMetadataToString(prop.type)
154
- ]));
155
- const propertyMeta = Object.fromEntries((metadata.properties ?? [])
481
+ // Per-instance streaming-input resolution, when the class declares it.
482
+ // Metadata carries one boolean per type and cannot answer for a node
483
+ // whose mode lives in its own properties, so the closure travels to the
484
+ // merge site instead. Absent for every class without the hook, which
485
+ // keeps `Graph.loadFromDict` on exactly today's path.
486
+ const cls = registry.getClass(nodeType);
487
+ const resolveStreamingInput = cls?.resolveStreamingInput;
488
+ const propertyTypes = propertyTypesForMetadata(metadata);
489
+ const propertyMeta = Object.fromEntries(
490
+ // Stryker disable next-line ArrayDeclaration: a bogus seed element lacks description/min/max, so the .filter below drops it — the result is unchanged (equivalent).
491
+ (metadata.properties ?? [])
156
492
  .filter((p) => p.description || p.min != null || p.max != null)
157
- .map((p) => [
158
- p.name,
159
- {
160
- ...(p.description ? { description: p.description } : {}),
161
- ...(p.min != null ? { min: p.min } : {}),
162
- ...(p.max != null ? { max: p.max } : {})
493
+ .map((p) => {
494
+ const meta = {};
495
+ if (p.description) {
496
+ meta.description = p.description;
163
497
  }
164
- ]));
498
+ if (p.min != null) {
499
+ meta.min = p.min;
500
+ }
501
+ if (p.max != null) {
502
+ meta.max = p.max;
503
+ }
504
+ return [p.name, meta];
505
+ }));
165
506
  const outputs = Object.fromEntries((metadata.outputs ?? []).map((output) => [
166
507
  output.name,
167
508
  typeMetadataToString(output.type)
168
509
  ]));
169
- const NodeClass = registry.getClass(nodeType);
170
- const syncMode = NodeClass?.syncMode;
171
510
  return {
172
511
  nodeType: metadata.node_type,
173
512
  propertyTypes,
174
513
  outputs,
175
- isDynamic: metadata.is_dynamic ?? false,
514
+ supportsDynamicInputs: metadata.supports_dynamic_inputs ?? false,
515
+ ...(resolveStreamingInput && {
516
+ resolveInstanceFlags: (node) => ({ is_streaming_input: resolveStreamingInput(node) })
517
+ }),
176
518
  descriptorDefaults: {
177
519
  name: metadata.title,
178
- ...(metadata.is_streaming_input && { is_streaming_input: true }),
179
- ...(metadata.is_streaming_output && { is_streaming_output: true }),
180
- ...(metadata.is_controlled && { is_controlled: true }),
181
- ...(syncMode !== undefined && { sync_mode: syncMode }),
520
+ // Explicit booleans, never omitted: Graph.loadFromDict resolves each
521
+ // flag as `descriptorDefaults.flag ?? saved ?? false`, so an omitted
522
+ // false here would let a stale saved `true` survive a node type's
523
+ // migration away from streaming/control. Metadata is built from the
524
+ // class statics (BaseNode defaults false), so absent means false.
525
+ is_streaming_input: metadata.is_streaming_input ?? false,
526
+ is_streaming_output: metadata.is_streaming_output ?? false,
527
+ is_controlled: metadata.is_controlled ?? false,
528
+ is_join_node: metadata.is_join_node ?? false,
529
+ // Same reason as the flags above, and the one that was missing:
530
+ // `actor.ts` gates the trigger entry point on this, and saved
531
+ // workflow JSON never carries it. Omitted here, every
532
+ // resolver-hydrated graph read `is_trigger: false`, so a delivered
533
+ // webhook/manual/file-watch event was accepted and silently
534
+ // dropped — the node fell through to `genProcess()` and emitted
535
+ // nothing.
536
+ is_trigger: metadata.is_trigger ?? false,
537
+ retry_safe: metadata.retry_safe ?? false,
538
+ ...(metadata.input_mode && { input_mode: metadata.input_mode }),
539
+ ...(metadata.output_correlation && {
540
+ output_correlation: metadata.output_correlation
541
+ }),
542
+ ...(metadata.always_emit_output_updates && {
543
+ always_emit_output_updates: true
544
+ }),
182
545
  ...(Object.keys(propertyMeta).length > 0 && { propertyM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UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC;oBAC/D,GAAG,CAAC,QAAQ,CAAC,kBAAkB,IAAI;wBACjC,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB;qBAChD,CAAC;oBACF,GAAG,CAAC,QAAQ,CAAC,0BAA0B,IAAI;wBACzC,0BAA0B,EAAE,IAAI;qBACjC,CAAC;oBACF,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;iBAC9D;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The library packs NodeTool ships, by specifier.
3
+ *
4
+ * Presence is never assumed. A workflow can declare `@nodetool-ai/sandbox-yaml`
5
+ * on a machine where nobody installed it, and the catalog answers "not
6
+ * installed" — true, and useless. This table is what turns that answer into the
7
+ * next step: install this package. It is a list of names, not a resolution
8
+ * path — nothing here loads, resolves, or vouches for a pack.
9
+ */
10
+ /** A pack this repo ships as a sandbox module. */
11
+ export interface BridgePack {
12
+ /** The import specifier guest code uses. */
13
+ readonly specifier: string;
14
+ /** The npm package to install, which for a single-module pack is the same string. */
15
+ readonly packName: string;
16
+ /** The npm library behind the module. */
17
+ readonly library: string;
18
+ /**
19
+ * Where the library runs.
20
+ *
21
+ * `guest` — compiled into the QuickJS guest by the sandbox compiler.
22
+ * `host` — a NodeTool-implemented host function set behind a generated
23
+ * facade, because the library needs what the guest lacks, or carries a limit
24
+ * the guest could not enforce.
25
+ */
26
+ readonly runs: "guest" | "host";
27
+ /** Authored guest code rather than a compiled npm dependency. */
28
+ readonly source?: "authored";
29
+ }
30
+ export declare const BRIDGE_PACKS: readonly BridgePack[];
31
+ /** The bridge pack a specifier names, or undefined for anything else. */
32
+ export declare function bridgePackFor(specifier: string): BridgePack | undefined;
33
+ /**
34
+ * What to do about a specifier no installed pack offers, when NodeTool ships one
35
+ * under that name. Anything else gets no hint — a guess at a package name is
36
+ * worse than silence.
37
+ */
38
+ export declare function installHintFor(specifier: string): string | undefined;
39
+ //# sourceMappingURL=sandbox-bridge-packs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox-bridge-packs.d.ts","sourceRoot":"","sources":["../src/sandbox-bridge-packs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,kDAAkD;AAClD,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAgO7C,CAAC;AAIF,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGpE"}