@octonodes/sdk 0.1.0 → 0.1.7

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 (76) hide show
  1. package/PLUGINS.md +289 -91
  2. package/dist/constants.d.ts +1 -0
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +2 -1
  5. package/dist/constants.js.map +1 -1
  6. package/dist/gen/types.gen.d.ts +240 -1
  7. package/dist/gen/types.gen.d.ts.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/plugins/schema/plugin.d.ts +475 -16
  13. package/dist/plugins/schema/plugin.d.ts.map +1 -1
  14. package/dist/plugins/schema/plugin.js +105 -8
  15. package/dist/plugins/schema/plugin.js.map +1 -1
  16. package/dist/plugins/sdk/definitions/compiler/catalog.d.ts +3 -0
  17. package/dist/plugins/sdk/definitions/compiler/catalog.d.ts.map +1 -0
  18. package/dist/plugins/sdk/definitions/compiler/catalog.js +166 -0
  19. package/dist/plugins/sdk/definitions/compiler/catalog.js.map +1 -0
  20. package/dist/plugins/sdk/definitions/compiler/constants.d.ts +6 -0
  21. package/dist/plugins/sdk/definitions/compiler/constants.d.ts.map +1 -0
  22. package/dist/plugins/sdk/definitions/compiler/constants.js +10 -0
  23. package/dist/plugins/sdk/definitions/compiler/constants.js.map +1 -0
  24. package/dist/plugins/sdk/definitions/compiler/index.d.ts +7 -0
  25. package/dist/plugins/sdk/definitions/compiler/index.d.ts.map +1 -0
  26. package/dist/plugins/sdk/definitions/compiler/index.js +490 -0
  27. package/dist/plugins/sdk/definitions/compiler/index.js.map +1 -0
  28. package/dist/plugins/sdk/definitions/compiler/literals.d.ts +5 -0
  29. package/dist/plugins/sdk/definitions/compiler/literals.d.ts.map +1 -0
  30. package/dist/plugins/sdk/definitions/compiler/literals.js +78 -0
  31. package/dist/plugins/sdk/definitions/compiler/literals.js.map +1 -0
  32. package/dist/plugins/sdk/definitions/compiler/schemas.d.ts +4 -0
  33. package/dist/plugins/sdk/definitions/compiler/schemas.d.ts.map +1 -0
  34. package/dist/plugins/sdk/definitions/compiler/schemas.js +95 -0
  35. package/dist/plugins/sdk/definitions/compiler/schemas.js.map +1 -0
  36. package/dist/plugins/sdk/definitions/compiler/types.d.ts +23 -0
  37. package/dist/plugins/sdk/definitions/compiler/types.d.ts.map +1 -0
  38. package/dist/plugins/sdk/definitions/compiler/types.js +3 -0
  39. package/dist/plugins/sdk/definitions/compiler/types.js.map +1 -0
  40. package/dist/plugins/sdk/definitions/index.d.ts +7 -0
  41. package/dist/plugins/sdk/definitions/index.d.ts.map +1 -0
  42. package/dist/plugins/sdk/definitions/index.js +16 -0
  43. package/dist/plugins/sdk/definitions/index.js.map +1 -0
  44. package/dist/plugins/sdk/definitions/npm/emit/js.d.ts +4 -0
  45. package/dist/plugins/sdk/definitions/npm/emit/js.d.ts.map +1 -0
  46. package/dist/plugins/sdk/definitions/npm/emit/js.js +190 -0
  47. package/dist/plugins/sdk/definitions/npm/emit/js.js.map +1 -0
  48. package/dist/plugins/sdk/definitions/npm/types.d.ts +63 -0
  49. package/dist/plugins/sdk/definitions/npm/types.d.ts.map +1 -0
  50. package/dist/plugins/sdk/definitions/npm/types.js +3 -0
  51. package/dist/plugins/sdk/definitions/npm/types.js.map +1 -0
  52. package/dist/plugins/sdk/definitions/types.d.ts +46 -0
  53. package/dist/plugins/sdk/definitions/types.d.ts.map +1 -0
  54. package/dist/plugins/sdk/definitions/types.js +3 -0
  55. package/dist/plugins/sdk/definitions/types.js.map +1 -0
  56. package/dist/plugins/sdk/nodes/index.d.ts +5 -0
  57. package/dist/plugins/sdk/nodes/index.d.ts.map +1 -0
  58. package/dist/plugins/sdk/nodes/index.js +12 -0
  59. package/dist/plugins/sdk/nodes/index.js.map +1 -0
  60. package/dist/plugins/sdk/plugin/index.d.ts +3 -0
  61. package/dist/plugins/sdk/plugin/index.d.ts.map +1 -0
  62. package/dist/plugins/sdk/plugin/index.js +8 -0
  63. package/dist/plugins/sdk/plugin/index.js.map +1 -0
  64. package/dist/plugins/sdk/plugin.js +1 -1
  65. package/dist/plugins/sdk/plugin.js.map +1 -1
  66. package/dist/plugins/sdk/plugins/define-node.js +1 -1
  67. package/dist/plugins/sdk/plugins/define-node.js.map +1 -1
  68. package/dist/plugins/sdk/plugins/index.js +1 -1
  69. package/dist/plugins/sdk/plugins/index.js.map +1 -1
  70. package/dist/plugins/sdk/project/index.d.ts +5 -0
  71. package/dist/plugins/sdk/project/index.d.ts.map +1 -0
  72. package/dist/plugins/sdk/project/index.js +10 -0
  73. package/dist/plugins/sdk/project/index.js.map +1 -0
  74. package/dist/plugins/sdk/runner.js +1 -1
  75. package/dist/plugins/sdk/runner.js.map +1 -1
  76. package/package.json +45 -1
@@ -0,0 +1,490 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.generateNodeCatalog = exports.DEFINITION_FILES = exports.NODES_FILENAME = exports.PLUGIN_FILENAME = exports.DEFINITION_FILENAME = void 0;
37
+ exports.compileDefinition = compileDefinition;
38
+ // Generated from packages/plugin-runtime/src/definitions/compiler/index.ts. Do not edit; run the Octonode SDK sync.
39
+ const ts = __importStar(require("typescript"));
40
+ const node_fs_1 = require("node:fs");
41
+ const node_path_1 = require("node:path");
42
+ const plugin_sdk_1 = require("../../../schema/plugin-sdk");
43
+ const constants_1 = require("./constants");
44
+ const literals_1 = require("./literals");
45
+ const schemas_1 = require("./schemas");
46
+ const catalog_1 = require("./catalog");
47
+ var constants_2 = require("./constants");
48
+ Object.defineProperty(exports, "DEFINITION_FILENAME", { enumerable: true, get: function () { return constants_2.DEFINITION_FILENAME; } });
49
+ Object.defineProperty(exports, "PLUGIN_FILENAME", { enumerable: true, get: function () { return constants_2.PLUGIN_FILENAME; } });
50
+ Object.defineProperty(exports, "NODES_FILENAME", { enumerable: true, get: function () { return constants_2.NODES_FILENAME; } });
51
+ Object.defineProperty(exports, "DEFINITION_FILES", { enumerable: true, get: function () { return constants_2.DEFINITION_FILES; } });
52
+ var catalog_2 = require("./catalog");
53
+ Object.defineProperty(exports, "generateNodeCatalog", { enumerable: true, get: function () { return catalog_2.generateNodeCatalog; } });
54
+ /** Build-time TypeScript config checking only; workflow lowering remains in the Rust parser. */
55
+ function compileDefinition(root, extraFiles = [], kind = "project") {
56
+ root = (0, node_fs_1.realpathSync)(root);
57
+ const filename = kind === "project" ? constants_1.DEFINITION_FILENAME : constants_1.PLUGIN_FILENAME;
58
+ const entry = (0, node_path_1.resolve)(root, filename);
59
+ const configPath = (0, node_fs_1.existsSync)((0, node_path_1.resolve)(root, "tsconfig.json")) ? (0, node_path_1.resolve)(root, "tsconfig.json") : undefined;
60
+ const config = configPath ? ts.readConfigFile(configPath, ts.sys.readFile) : { config: {} };
61
+ if (config.error)
62
+ throw new Error(ts.flattenDiagnosticMessageText(config.error.messageText, "\n"));
63
+ const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, configPath ? (0, node_path_1.dirname)(configPath) : root);
64
+ const configError = parsed.errors.find((diagnostic) => diagnostic.code !== 18003);
65
+ if (configError)
66
+ throw new Error(ts.flattenDiagnosticMessageText(configError.messageText, "\n"));
67
+ const options = {
68
+ ...parsed.options,
69
+ target: parsed.options.target ?? ts.ScriptTarget.ES2022,
70
+ module: parsed.options.module ?? ts.ModuleKind.Node16,
71
+ moduleResolution: parsed.options.moduleResolution ?? ts.ModuleResolutionKind.Node16,
72
+ strict: true,
73
+ noEmit: true,
74
+ skipLibCheck: true,
75
+ composite: false,
76
+ incremental: false,
77
+ rootDir: root,
78
+ };
79
+ const roots = [
80
+ ...new Set([
81
+ ...parsed.fileNames,
82
+ ...extraFiles.map((file) => (0, node_path_1.resolve)(root, file)),
83
+ ...((0, node_fs_1.existsSync)(entry) ? [entry] : []),
84
+ ]),
85
+ ];
86
+ if (!(0, node_fs_1.existsSync)(entry)) {
87
+ for (const file of roots) {
88
+ const text = ts.sys.readFile(file);
89
+ if (!constants_1.DEFINITION_FILES.includes((0, node_path_1.relative)(root, file)) &&
90
+ text &&
91
+ ts.preProcessFile(text, true, true).importedFiles.some((item) => constants_1.DEFINITION_MODULES.includes(item.fileName)))
92
+ throw new Error(`${(0, node_path_1.relative)(root, file)}: SDK definitions are only allowed in reserved Octonode files`);
93
+ }
94
+ return undefined;
95
+ }
96
+ const program = ts.createProgram(roots, options);
97
+ const catalog = program.getSourceFile((0, node_path_1.resolve)(root, constants_1.NODES_FILENAME));
98
+ if (catalog)
99
+ (0, catalog_1.generateNodeCatalog)(root, roots, true);
100
+ for (const file of program.getSourceFiles()) {
101
+ if (file.isDeclarationFile || file.fileName.includes("/node_modules/"))
102
+ continue;
103
+ if (!constants_1.DEFINITION_FILES.includes((0, node_path_1.relative)(root, file.fileName)) &&
104
+ ts.preProcessFile(file.text, true, true).importedFiles.some((item) => constants_1.DEFINITION_MODULES.includes(item.fileName)))
105
+ throw new Error(`${(0, node_path_1.relative)(root, file.fileName)}: SDK definitions are only allowed in reserved Octonode files`);
106
+ }
107
+ if ((0, node_fs_1.realpathSync)(entry) !== entry)
108
+ throw new Error(`${constants_1.DEFINITION_FILENAME} must not be a symlink`);
109
+ const source = program.getSourceFile(entry);
110
+ const checker = program.getTypeChecker();
111
+ const sdk = new Map();
112
+ const imports = new Map();
113
+ let definition;
114
+ for (const statement of source.statements) {
115
+ if (ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier)) {
116
+ const module = statement.moduleSpecifier.text;
117
+ const clause = statement.importClause;
118
+ if (!clause || clause.isTypeOnly)
119
+ throw new Error("Definition imports must be named value imports");
120
+ if (clause.name)
121
+ imports.set(clause.name.text, { module, name: "default" });
122
+ if (clause.namedBindings) {
123
+ if (!ts.isNamedImports(clause.namedBindings))
124
+ throw new Error(`Use named imports in ${filename}`);
125
+ for (const item of clause.namedBindings.elements) {
126
+ if (item.isTypeOnly)
127
+ throw new Error("Use value imports for node functions");
128
+ const name = (item.propertyName ?? item.name).text;
129
+ if (constants_1.DEFINITION_MODULES.includes(module)) {
130
+ if (!["defineNode", "defineProject", "definePlugin"].includes(name))
131
+ throw new Error(`Unknown definition helper: ${name}`);
132
+ sdk.set(item.name.text, name);
133
+ }
134
+ else
135
+ imports.set(item.name.text, { module, name });
136
+ }
137
+ }
138
+ }
139
+ else if (ts.isExportAssignment(statement) && !statement.isExportEquals && !definition)
140
+ definition = statement;
141
+ else
142
+ throw new Error(`${constants_1.DEFINITION_FILENAME} accepts imports and one default defineProject/definePlugin export only`);
143
+ }
144
+ const call = definition?.expression;
145
+ if (!call || !ts.isCallExpression(call) || !ts.isIdentifier(call.expression) || call.arguments.length !== 1)
146
+ throw new Error(`Default-export ${kind === "project" ? "defineProject" : "definePlugin"}({...}) from ${filename}`);
147
+ const wrapper = sdk.get(call.expression.text);
148
+ if (wrapper !== "defineProject" && wrapper !== "definePlugin")
149
+ throw new Error("The default export must use the SDK defineProject or definePlugin helper");
150
+ if (wrapper !== (kind === "project" ? "defineProject" : "definePlugin"))
151
+ throw new Error(`${filename} must default-export ${kind === "project" ? "defineProject" : "definePlugin"}; plugins belong in ${constants_1.PLUGIN_FILENAME}`);
152
+ const fields = new Map((0, literals_1.properties)(call.arguments[0]));
153
+ const nodesExpression = fields.get("nodes");
154
+ if (nodesExpression && !ts.isArrayLiteralExpression(nodesExpression))
155
+ throw new Error("nodes must be an inline array of defineNode calls");
156
+ const nodes = [];
157
+ const identities = new Set();
158
+ for (const item of nodesExpression ? nodesExpression.elements : []) {
159
+ if (!ts.isCallExpression(item) ||
160
+ !ts.isIdentifier(item.expression) ||
161
+ sdk.get(item.expression.text) !== "defineNode" ||
162
+ item.arguments.length < 1 ||
163
+ item.arguments.length > 2)
164
+ throw new Error("Each node must be defineNode(importedFunction, optionalOverrides)");
165
+ const handle = item.arguments[0];
166
+ if ((!ts.isPropertyAccessExpression(handle) && !ts.isElementAccessExpression(handle)) ||
167
+ !ts.isIdentifier(handle.expression))
168
+ throw new Error(`defineNode requires a nodes.name handle imported from ${constants_1.NODES_FILENAME}`);
169
+ const handleName = ts.isPropertyAccessExpression(handle) ? handle.name : handle.argumentExpression;
170
+ if ((!ts.isIdentifier(handleName) && !ts.isStringLiteral(handleName)) ||
171
+ (ts.isElementAccessExpression(handle) && !ts.isStringLiteral(handleName)))
172
+ throw new Error("Node handles require a literal name");
173
+ const catalogImport = imports.get(handle.expression.text);
174
+ const catalogPath = catalogImport &&
175
+ ts.resolveModuleName(catalogImport.module, entry, options, ts.sys).resolvedModule?.resolvedFileName;
176
+ if (!catalogPath || (0, node_path_1.resolve)(catalogPath) !== (0, node_path_1.resolve)(root, constants_1.NODES_FILENAME) || catalogImport?.name !== "nodes")
177
+ throw new Error(`Import nodes directly from ./${constants_1.NODES_FILENAME}`);
178
+ if ((0, node_fs_1.realpathSync)(catalogPath) !== (0, node_path_1.resolve)(catalogPath))
179
+ throw new Error(`${constants_1.NODES_FILENAME} must not be a symlink`);
180
+ const property = checker.getTypeAtLocation(handle.expression).getProperty(handleName.text)?.valueDeclaration;
181
+ if (!property || !ts.isPropertyAssignment(property))
182
+ throw new Error(`Unknown generated node: ${handleName.text}; regenerate ${constants_1.NODES_FILENAME}`);
183
+ if (ts.isCallExpression(property.initializer)) {
184
+ if (kind !== "plugin")
185
+ throw new Error("Generated adapter handles are only supported in octonode.plugin.ts");
186
+ const call = property.initializer;
187
+ if (ts.isIdentifier(call.expression) && call.expression.text === "workflowNode" && call.arguments.length === 1) {
188
+ const workflow = {
189
+ kind: "workflow",
190
+ ...(0, literals_1.literal)(call.arguments[0]),
191
+ };
192
+ const original = plugin_sdk_1.PluginNode.parse(workflow.definition);
193
+ if (typeof workflow.key !== "string" ||
194
+ !/^[a-f0-9]{24}$/.test(workflow.key) ||
195
+ !workflow.files ||
196
+ !workflow.dependencies)
197
+ throw new Error("Invalid workflow inventory; export the workflow again");
198
+ if (identities.has(workflow.key))
199
+ throw new Error(`Duplicate workflow: ${workflow.key}`);
200
+ identities.add(workflow.key);
201
+ const customization = plugin_sdk_1.PluginNode.omit({
202
+ command: true,
203
+ language: true,
204
+ inputs: true,
205
+ outputs: true,
206
+ implementation: true,
207
+ })
208
+ .partial()
209
+ .strict()
210
+ .parse(item.arguments[1] ? (0, literals_1.literal)(item.arguments[1]) : {});
211
+ const { command: _, language: __, inputs, outputs, ...defaults } = original;
212
+ if (customization.bindings)
213
+ throw new Error("SDK client bindings require npm handles");
214
+ nodes.push({
215
+ path: constants_1.NODES_FILENAME,
216
+ exportName: workflow.key,
217
+ symbol: original.id,
218
+ parameters: [],
219
+ customization: { ...defaults, ...customization },
220
+ inputs,
221
+ outputs,
222
+ workflow,
223
+ });
224
+ continue;
225
+ }
226
+ if (!ts.isIdentifier(call.expression) || call.expression.text !== "npmNode" || call.arguments.length !== 1)
227
+ throw new Error("Invalid generated npm node");
228
+ const npm = { kind: "npm", ...(0, literals_1.literal)(call.arguments[0]) };
229
+ if (!npm.packageName || !npm.packageVersion || !npm.descriptor || !Array.isArray(npm.descriptor.params))
230
+ throw new Error("Invalid npm inventory; regenerate from the package");
231
+ const moduleSpecifier = npm.descriptor.moduleSpecifier ?? npm.packageName;
232
+ if ((moduleSpecifier !== npm.packageName && !moduleSpecifier.startsWith(`${npm.packageName}/`)) ||
233
+ moduleSpecifier.split("/").some((part) => part === "." || part === "..") ||
234
+ /[\\%:]/.test(moduleSpecifier))
235
+ throw new Error("npm module must belong to the original package");
236
+ const identity = `${moduleSpecifier}:${npm.descriptor.generic ? "<call>" : npm.descriptor.exportName}`;
237
+ if (identities.has(identity))
238
+ throw new Error(`Duplicate node function: ${identity}`);
239
+ identities.add(identity);
240
+ const customization = plugin_sdk_1.PluginNode.omit({
241
+ command: true,
242
+ language: true,
243
+ inputs: true,
244
+ outputs: true,
245
+ implementation: true,
246
+ })
247
+ .partial()
248
+ .strict()
249
+ .parse(item.arguments[1] ? (0, literals_1.literal)(item.arguments[1]) : {});
250
+ const bound = new Set(Object.keys(customization.bindings ?? {}));
251
+ for (const name of bound) {
252
+ if (npm.descriptor.generic ||
253
+ npm.descriptor.permissive ||
254
+ !npm.descriptor.params.some((param) => param.name === name && !param.rest))
255
+ throw new Error(`SDK binding must name a declared non-rest parameter: ${name}`);
256
+ if (Object.hasOwn(customization.defaults ?? {}, name))
257
+ throw new Error(`Bound SDK parameter cannot have a public default: ${name}`);
258
+ }
259
+ const inputs = bound.size
260
+ ? {
261
+ ...npm.descriptor.inputsSchema,
262
+ properties: Object.fromEntries(Object.entries((npm.descriptor.inputsSchema.properties ?? {})).filter(([name]) => !bound.has(name))),
263
+ required: (npm.descriptor.inputsSchema.required ?? []).filter((name) => !bound.has(name)),
264
+ additionalProperties: false,
265
+ }
266
+ : npm.descriptor.inputsSchema;
267
+ nodes.push({
268
+ path: constants_1.NODES_FILENAME,
269
+ exportName: npm.descriptor.exportName,
270
+ symbol: npm.descriptor.id,
271
+ parameters: [],
272
+ customization: { description: npm.descriptor.description, ...customization },
273
+ inputs,
274
+ outputs: npm.descriptor.outputsSchema,
275
+ npm,
276
+ });
277
+ continue;
278
+ }
279
+ if (!ts.isIdentifier(property.initializer))
280
+ throw new Error("Generated nodes must reference imported functions");
281
+ const reference = property.initializer;
282
+ const binding = checker.getSymbolAtLocation(reference)?.declarations?.[0];
283
+ if (!binding || !ts.isImportSpecifier(binding))
284
+ throw new Error("Generated nodes must reference imported functions");
285
+ const importDeclaration = binding.parent.parent.parent;
286
+ if (!ts.isImportDeclaration(importDeclaration) || !ts.isStringLiteral(importDeclaration.moduleSpecifier))
287
+ throw new Error("Invalid generated node import");
288
+ const imported = {
289
+ module: importDeclaration.moduleSpecifier.text,
290
+ name: (binding.propertyName ?? binding.name).text,
291
+ };
292
+ if (!imported || !imported.module.startsWith("."))
293
+ throw new Error(`Import ${reference.text} from a local implementation file`);
294
+ const local = checker.getSymbolAtLocation(reference);
295
+ const symbol = local && (local.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(local) : local);
296
+ const declaration = symbol?.valueDeclaration;
297
+ if (!symbol || !declaration)
298
+ throw new Error(`Cannot resolve function ${reference.text}`);
299
+ const file = (0, node_fs_1.realpathSync)(declaration.getSourceFile().fileName);
300
+ const path = (0, node_path_1.relative)(root, file).replaceAll("\\", "/");
301
+ if (path.startsWith("../") ||
302
+ (0, node_path_1.isAbsolute)(path) ||
303
+ path.split("/").includes("node_modules") ||
304
+ declaration.getSourceFile().isDeclarationFile ||
305
+ path === constants_1.DEFINITION_FILENAME ||
306
+ !/\.[cm]?ts$/.test(path))
307
+ throw new Error(`Node implementation must be a TypeScript file inside the project: ${path}`);
308
+ const sourceName = (ts.isFunctionDeclaration(declaration) || ts.isVariableDeclaration(declaration)) &&
309
+ declaration.name &&
310
+ ts.isIdentifier(declaration.name)
311
+ ? declaration.name.text
312
+ : symbol.name;
313
+ const identity = `${path}:${sourceName}`;
314
+ if (identities.has(identity))
315
+ throw new Error(`Duplicate node function: ${identity}`);
316
+ identities.add(identity);
317
+ const signatures = checker.getTypeAtLocation(reference).getCallSignatures();
318
+ if (!signatures.length || (kind === "plugin" && (signatures.length !== 1 || signatures[0].typeParameters?.length)))
319
+ throw new Error(`Node ${reference.text} needs one non-generic function signature`);
320
+ const signature = signatures[0];
321
+ const params = kind === "plugin" ? signature.getParameters() : [];
322
+ const parameters = params.map((parameter) => {
323
+ const declaration = parameter.valueDeclaration;
324
+ if (!declaration ||
325
+ !ts.isParameter(declaration) ||
326
+ !ts.isIdentifier(declaration.name) ||
327
+ declaration.dotDotDotToken)
328
+ throw new Error(`Node ${reference.text} needs named parameters; destructuring and rest parameters are not supported`);
329
+ return declaration.name.text;
330
+ });
331
+ const overrides = item.arguments[1] ? (0, literals_1.literal)(item.arguments[1]) : {};
332
+ const customization = plugin_sdk_1.PluginNode.omit({
333
+ command: true,
334
+ language: true,
335
+ inputs: true,
336
+ outputs: true,
337
+ implementation: true,
338
+ })
339
+ .partial()
340
+ .strict()
341
+ .parse(overrides);
342
+ if (kind === "project" &&
343
+ Object.keys(customization).some((key) => !["label", "symbol", "description", "icon"].includes(key)))
344
+ throw new Error("Project node customization supports label, symbol, description and icon; identity and execution remain source-owned");
345
+ const node = { path, exportName: imported.name, symbol: sourceName, parameters, customization };
346
+ if (customization.bindings)
347
+ throw new Error("SDK client bindings require npm handles");
348
+ // Require direct imports so runtime exports and source identities refer to the same file.
349
+ const resolvedImport = ts.resolveModuleName(imported.module, entry, options, ts.sys).resolvedModule;
350
+ if (!resolvedImport)
351
+ throw new Error(`Cannot resolve ${imported.module}`);
352
+ if ((0, node_path_1.resolve)(resolvedImport.resolvedFileName) !== file)
353
+ throw new Error("Import node functions directly from their implementation file, not a re-export barrel");
354
+ if (kind === "plugin") {
355
+ const required = [];
356
+ const inputProperties = Object.fromEntries(params.map((parameter, index) => {
357
+ const declaration = parameter.valueDeclaration;
358
+ const type = checker.getTypeOfSymbolAtLocation(parameter, declaration);
359
+ const optional = !!declaration.questionToken || !!declaration.initializer;
360
+ if (!optional)
361
+ required.push(parameters[index]);
362
+ return [parameters[index], (0, schemas_1.schemaFor)(checker, type, new Set(), optional)];
363
+ }));
364
+ node.inputs = { type: "object", properties: inputProperties, required };
365
+ const result = checker.getAwaitedType(signature.getReturnType()) ?? signature.getReturnType();
366
+ node.outputs = result.flags & ts.TypeFlags.Void ? { type: "null" } : (0, schemas_1.schemaFor)(checker, result);
367
+ }
368
+ nodes.push(node);
369
+ }
370
+ const metadata = Object.fromEntries([...fields].filter(([key]) => key !== "nodes").map(([key, value]) => [key, (0, literals_1.literal)(value)]));
371
+ if (kind === "project" && Object.keys(metadata).length)
372
+ throw new Error("defineProject accepts only nodes");
373
+ const { assets = [], library, ...pluginMetadata } = metadata;
374
+ const npm = nodes.find((node) => node.npm)?.npm;
375
+ const npmOnly = nodes.length > 0 &&
376
+ nodes.every((node) => node.npm && node.npm.packageName === npm?.packageName && node.npm.packageVersion === npm.packageVersion);
377
+ if (kind === "plugin") {
378
+ const source = plugin_sdk_1.PluginManifest.innerType().shape.source.parse(pluginMetadata.source);
379
+ for (const node of nodes) {
380
+ const authority = node.customization.source ?? source;
381
+ if (authority &&
382
+ (authority.kind === "npm"
383
+ ? !node.npm || authority.package !== node.npm.packageName || authority.version !== node.npm.packageVersion
384
+ : !!node.npm))
385
+ throw new Error("Plugin source authority must match the generated node inventory");
386
+ node.customization = {
387
+ ...node.customization,
388
+ source: node.npm
389
+ ? { kind: "npm", package: node.npm.packageName, version: node.npm.packageVersion }
390
+ : { kind: "plugin" },
391
+ };
392
+ }
393
+ pluginMetadata.source =
394
+ source ??
395
+ (npmOnly && npm ? { kind: "npm", package: npm.packageName, version: npm.packageVersion } : { kind: "plugin" });
396
+ }
397
+ if (npm) {
398
+ const integration = pluginMetadata.integration && typeof pluginMetadata.integration === "object" ? pluginMetadata.integration : {};
399
+ const dependencies = nodes.flatMap((node) => node.npm
400
+ ? [
401
+ {
402
+ package: node.npm.packageName,
403
+ version: node.npm.packageVersion,
404
+ spec: node.npm.installSpec ?? `${node.npm.packageName}@${node.npm.packageVersion}`,
405
+ },
406
+ ]
407
+ : []);
408
+ const unique = [...new Map(dependencies.map((dependency) => [dependency.package, dependency])).values()];
409
+ if (dependencies.some((dependency) => unique.some((other) => other.package === dependency.package &&
410
+ (other.version !== dependency.version || other.spec !== dependency.spec))))
411
+ throw new Error("A plugin cannot require conflicting versions of the same npm dependency");
412
+ pluginMetadata.integration = {
413
+ ...integration,
414
+ ...(npmOnly ? { category: "npm", npm: unique[0] } : { npm: undefined }),
415
+ npmDependencies: unique,
416
+ };
417
+ }
418
+ let libraryEntry;
419
+ if (library !== undefined) {
420
+ if (!library ||
421
+ typeof library !== "object" ||
422
+ Array.isArray(library) ||
423
+ Object.keys(library).join() !== "entry" ||
424
+ typeof library.entry !== "string")
425
+ throw new Error("library must contain one literal entry path");
426
+ const path = library.entry;
427
+ if (!/^[a-zA-Z0-9_./-]+\.[cm]?ts$/.test(path) ||
428
+ path.startsWith("/") ||
429
+ path.split("/").some((part) => !part || part === ".." || part === "node_modules"))
430
+ throw new Error("Library entry must be a TypeScript file inside the plugin");
431
+ const absolute = (0, node_path_1.resolve)(root, path);
432
+ if ((0, node_fs_1.realpathSync)(absolute) !== absolute)
433
+ throw new Error("Library entry cannot be a symbolic link");
434
+ const libraryProgram = ts.createProgram([absolute], options);
435
+ const libraryChecker = libraryProgram.getTypeChecker();
436
+ const module = libraryProgram.getSourceFile(absolute);
437
+ const symbol = module && libraryChecker.getSymbolAtLocation(module);
438
+ const exports = symbol
439
+ ? libraryChecker
440
+ .getExportsOfModule(symbol)
441
+ .filter((item) => {
442
+ const value = item.flags & ts.SymbolFlags.Alias ? libraryChecker.getAliasedSymbol(item) : item;
443
+ return !!(value.flags & ts.SymbolFlags.Value);
444
+ })
445
+ .map((item) => item.name)
446
+ .sort()
447
+ : [];
448
+ if (!exports.length)
449
+ throw new Error("Library entry must expose named value exports");
450
+ if (exports.includes("default"))
451
+ throw new Error("Plugin libraries expose named exports; replace the default export with a named export");
452
+ pluginMetadata.library = { format: 1, entry: "library/index.js", types: "library/index.d.ts", exports };
453
+ libraryEntry = { entry: path };
454
+ }
455
+ if (!Array.isArray(assets) || assets.some((asset) => typeof asset !== "string"))
456
+ throw new Error("assets must contain literal paths");
457
+ const manifest = kind === "plugin"
458
+ ? plugin_sdk_1.PluginManifest.parse(plugin_sdk_1.PluginManifest.innerType()
459
+ .strict()
460
+ .parse({
461
+ ...pluginMetadata,
462
+ nodes: nodes.map((node) => ({
463
+ id: node.customization.id ?? node.symbol,
464
+ ...node.customization,
465
+ implementation: node.npm
466
+ ? {
467
+ module: node.npm.descriptor.moduleSpecifier ?? node.npm.packageName,
468
+ export: node.exportName,
469
+ parameters: node.npm.descriptor.params.map((param) => param.name),
470
+ }
471
+ : { module: node.path, export: node.exportName, parameters: node.parameters },
472
+ inputs: node.inputs,
473
+ outputs: node.outputs,
474
+ language: "typescript",
475
+ command: `node ${node.npm ? "--experimental-import-meta-resolve " : ""}dist/index.js ${node.customization.id ?? node.symbol}`,
476
+ })),
477
+ }))
478
+ : undefined;
479
+ const diagnostics = ts
480
+ .getPreEmitDiagnostics(program)
481
+ .filter((diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error);
482
+ if (diagnostics.length)
483
+ throw new Error(ts.formatDiagnostics(diagnostics, {
484
+ getCanonicalFileName: (file) => file,
485
+ getCurrentDirectory: () => root,
486
+ getNewLine: () => "\n",
487
+ }));
488
+ return { kind, nodes, manifest, assets: assets, ...(libraryEntry ? { library: libraryEntry } : {}) };
489
+ }
490
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/sdk/definit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M;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,QAAQ,EAAE,YAAY;gBACtB,OAAO,EAAE,QAAQ,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,qCAAqC,CAAC,CAAC,CAAC,EAAE,iBAAiB,IAAI,CAAC,aAAa,CAAC,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE;aAC9H,CAAC,CAAC;SACJ,CAAC,CACL;QACH,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,WAAW,GAAG,EAAE;SACnB,qBAAqB,CAAC,OAAO,CAAC;SAC9B,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/E,IAAI,WAAW,CAAC,MAAM;QACpB,MAAM,IAAI,KAAK,CACb,EAAE,CAAC,iBAAiB,CAAC,WAAW,EAAE;YAChC,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI;YACpC,mBAAmB,EAAE,GAAG,EAAE,CAAC,IAAI;YAC/B,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI;SACvB,CAAC,CACH,CAAC;IACJ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAkB,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACnH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as ts from "typescript";
2
+ /** Configuration is data: never evaluate a config or its imported application. */
3
+ export declare function literal(expression: ts.Expression): unknown;
4
+ export declare function properties(expression: ts.Expression): [string, ts.Expression][];
5
+ //# sourceMappingURL=literals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literals.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/sdk/definitions/compiler/literals.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,kFAAkF;AAClF,wBAAgB,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,OAAO,CAoB1D;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAY/E"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.literal = literal;
37
+ exports.properties = properties;
38
+ // Generated from packages/plugin-runtime/src/definitions/compiler/literals.ts. Do not edit; run the Octonode SDK sync.
39
+ const ts = __importStar(require("typescript"));
40
+ /** Configuration is data: never evaluate a config or its imported application. */
41
+ function literal(expression) {
42
+ if (ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression) || ts.isParenthesizedExpression(expression))
43
+ return literal(expression.expression);
44
+ if (ts.isStringLiteral(expression) || ts.isNoSubstitutionTemplateLiteral(expression))
45
+ return expression.text;
46
+ if (ts.isNumericLiteral(expression))
47
+ return Number(expression.text);
48
+ if (expression.kind === ts.SyntaxKind.TrueKeyword)
49
+ return true;
50
+ if (expression.kind === ts.SyntaxKind.FalseKeyword)
51
+ return false;
52
+ if (expression.kind === ts.SyntaxKind.NullKeyword)
53
+ return null;
54
+ if (ts.isPrefixUnaryExpression(expression) &&
55
+ expression.operator === ts.SyntaxKind.MinusToken &&
56
+ ts.isNumericLiteral(expression.operand))
57
+ return -Number(expression.operand.text);
58
+ if (ts.isArrayLiteralExpression(expression))
59
+ return expression.elements.map((item) => literal(item));
60
+ if (ts.isObjectLiteralExpression(expression))
61
+ return Object.fromEntries(properties(expression).map(([key, value]) => [key, literal(value)]));
62
+ throw new Error("Octonode definition metadata must use literals; calls, spreads and computed values are not supported");
63
+ }
64
+ function properties(expression) {
65
+ if (!ts.isObjectLiteralExpression(expression))
66
+ throw new Error("Expected an inline definition object");
67
+ const seen = new Set();
68
+ return expression.properties.map((property) => {
69
+ if (!ts.isPropertyAssignment(property) || (!ts.isIdentifier(property.name) && !ts.isStringLiteral(property.name)))
70
+ throw new Error("Definition properties must be explicit; spreads, methods and computed keys are not supported");
71
+ const key = property.name.text;
72
+ if (seen.has(key) || ["__proto__", "constructor", "prototype"].includes(key))
73
+ throw new Error(`Duplicate or reserved definition key: ${key}`);
74
+ seen.add(key);
75
+ return [key, property.initializer];
76
+ });
77
+ }
78
+ //# sourceMappingURL=literals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literals.js","sourceRoot":"","sources":["../../../../../src/plugins/sdk/definitions/compiler/literals.ts"],"names":[],"mappings":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CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as ts from "typescript";
2
+ /** Public plugin contracts must be finite JSON values, never silently widened to unknown. */
3
+ export declare function schemaFor(checker: ts.TypeChecker, type: ts.Type, seen?: Set<ts.Type>, optional?: boolean): Record<string, unknown>;
4
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/sdk/definitions/compiler/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC,6FAA6F;AAC7F,wBAAgB,SAAS,CACvB,OAAO,EAAE,EAAE,CAAC,WAAW,EACvB,IAAI,EAAE,EAAE,CAAC,IAAI,EACb,IAAI,eAAqB,EACzB,QAAQ,UAAQ,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqDzB"}