ugcinc 4.1.21 → 4.1.23

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 (75) hide show
  1. package/dist/automations/nodes/branch.d.ts +7 -4
  2. package/dist/automations/nodes/branch.js +25 -4
  3. package/dist/automations/nodes/index.d.ts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/package.json +1 -1
  6. package/dist/automations.d.ts +0 -173
  7. package/dist/automations.js +0 -194
  8. package/dist/node-runtime.d.ts +0 -57
  9. package/dist/node-runtime.js +0 -6
  10. package/dist/nodes/account.d.ts +0 -7
  11. package/dist/nodes/account.js +0 -29
  12. package/dist/nodes/auto-caption.d.ts +0 -17
  13. package/dist/nodes/auto-caption.js +0 -46
  14. package/dist/nodes/auto-post.d.ts +0 -21
  15. package/dist/nodes/auto-post.js +0 -54
  16. package/dist/nodes/branch.d.ts +0 -12
  17. package/dist/nodes/branch.js +0 -50
  18. package/dist/nodes/collect.d.ts +0 -6
  19. package/dist/nodes/collect.js +0 -56
  20. package/dist/nodes/compose-workflow.d.ts +0 -21
  21. package/dist/nodes/compose-workflow.js +0 -42
  22. package/dist/nodes/create-dm.d.ts +0 -40
  23. package/dist/nodes/create-dm.js +0 -88
  24. package/dist/nodes/custom-model.d.ts +0 -19
  25. package/dist/nodes/custom-model.js +0 -52
  26. package/dist/nodes/deduplicate.d.ts +0 -8
  27. package/dist/nodes/deduplicate.js +0 -36
  28. package/dist/nodes/destructure.d.ts +0 -25
  29. package/dist/nodes/destructure.js +0 -65
  30. package/dist/nodes/for-each.d.ts +0 -23
  31. package/dist/nodes/for-each.js +0 -84
  32. package/dist/nodes/generate-image.d.ts +0 -16
  33. package/dist/nodes/generate-image.js +0 -45
  34. package/dist/nodes/generate-video.d.ts +0 -16
  35. package/dist/nodes/generate-video.js +0 -45
  36. package/dist/nodes/if.d.ts +0 -22
  37. package/dist/nodes/if.js +0 -44
  38. package/dist/nodes/image-composer.d.ts +0 -14
  39. package/dist/nodes/image-composer.js +0 -95
  40. package/dist/nodes/index.d.ts +0 -20
  41. package/dist/nodes/index.js +0 -93
  42. package/dist/nodes/llm.d.ts +0 -27
  43. package/dist/nodes/llm.js +0 -85
  44. package/dist/nodes/manual-trigger.d.ts +0 -16
  45. package/dist/nodes/manual-trigger.js +0 -32
  46. package/dist/nodes/media.d.ts +0 -17
  47. package/dist/nodes/media.js +0 -40
  48. package/dist/nodes/not.d.ts +0 -6
  49. package/dist/nodes/not.js +0 -35
  50. package/dist/nodes/output.d.ts +0 -9
  51. package/dist/nodes/output.js +0 -32
  52. package/dist/nodes/random-route.d.ts +0 -3
  53. package/dist/nodes/random-route.js +0 -50
  54. package/dist/nodes/random.d.ts +0 -3
  55. package/dist/nodes/random.js +0 -48
  56. package/dist/nodes/recurrence.d.ts +0 -3
  57. package/dist/nodes/recurrence.js +0 -45
  58. package/dist/nodes/save-to-media.d.ts +0 -3
  59. package/dist/nodes/save-to-media.js +0 -26
  60. package/dist/nodes/screenshot-animation.d.ts +0 -7
  61. package/dist/nodes/screenshot-animation.js +0 -36
  62. package/dist/nodes/social-audio.d.ts +0 -3
  63. package/dist/nodes/social-audio.js +0 -26
  64. package/dist/nodes/text.d.ts +0 -3
  65. package/dist/nodes/text.js +0 -38
  66. package/dist/nodes/transcript.d.ts +0 -3
  67. package/dist/nodes/transcript.js +0 -42
  68. package/dist/nodes/types.d.ts +0 -146
  69. package/dist/nodes/types.js +0 -22
  70. package/dist/nodes/video-composer.d.ts +0 -3
  71. package/dist/nodes/video-composer.js +0 -67
  72. package/dist/nodes/video-import.d.ts +0 -3
  73. package/dist/nodes/video-import.js +0 -35
  74. package/dist/ports.d.ts +0 -54
  75. package/dist/ports.js +0 -327
@@ -1,84 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const types_1 = require("./types");
4
- const definition = (0, types_1.defineNode)({
5
- nodeId: 'for-each',
6
- label: 'For Each',
7
- description: 'Iterate over an array, executing downstream nodes for each item',
8
- type: 'generator',
9
- category: 'Control Flow',
10
- outputModes: ['per-input', 'single'],
11
- selectionModes: null,
12
- defaults: {
13
- outputProperties: [],
14
- inputPorts: [],
15
- exposeItem: false,
16
- exposeIndex: false,
17
- outputMode: 'per-input',
18
- selectionMode: null,
19
- },
20
- computePorts: ({ config, getConnectedOutput }) => {
21
- const outputProperties = config?.outputProperties ?? [];
22
- const inputPorts = config?.inputPorts ?? [];
23
- const exposeItem = config?.exposeItem ?? false;
24
- const exposeIndex = config?.exposeIndex ?? false;
25
- // Inputs: array + passthrough inputs
26
- const inputs = [
27
- { id: 'array', type: 'object', isArray: false, required: true },
28
- ];
29
- for (const port of inputPorts) {
30
- inputs.push({
31
- id: port.id,
32
- type: port.type,
33
- isArray: port.isArray,
34
- required: false,
35
- });
36
- }
37
- // Outputs
38
- const outputs = [];
39
- // Determine item type from connected array input
40
- let itemType = 'object';
41
- if (getConnectedOutput) {
42
- const connectedOutput = getConnectedOutput('array');
43
- if (connectedOutput?.objectSchema) {
44
- // Has objectSchema - it's an object array, use object type
45
- itemType = 'object';
46
- }
47
- else if (connectedOutput?.type && connectedOutput.isArray) {
48
- // Connected to an array type - extract the base type
49
- const connType = connectedOutput.type;
50
- if (!Array.isArray(connType)) {
51
- itemType = connType;
52
- }
53
- }
54
- }
55
- // Add item output if exposed
56
- if (exposeItem) {
57
- outputs.push({ id: 'item', type: itemType, isArray: false, required: true });
58
- }
59
- // Add index output if exposed
60
- if (exposeIndex) {
61
- outputs.push({ id: 'index', type: 'number', isArray: false, required: true });
62
- }
63
- // Add configured property outputs
64
- for (const prop of outputProperties) {
65
- outputs.push({
66
- id: prop.portId,
67
- type: prop.type,
68
- isArray: prop.isArray,
69
- required: true,
70
- });
71
- }
72
- // Add passthrough outputs (same value for all iterations)
73
- for (const port of inputPorts) {
74
- outputs.push({
75
- id: port.id,
76
- type: port.type,
77
- isArray: port.isArray,
78
- required: true,
79
- });
80
- }
81
- return { inputs, outputs };
82
- },
83
- });
84
- exports.default = definition;
@@ -1,16 +0,0 @@
1
- type ImageGenerationTextModel = 'fal-ai/gemini-3-pro-image-preview' | 'fal-ai/nano-banana-pro' | 'fal-ai/nano-banana' | 'fal-ai/gpt-image-1/text-to-image';
2
- type ImageGenerationEditModel = 'fal-ai/gemini-3-pro-image-preview/edit' | 'fal-ai/nano-banana-pro/edit' | 'fal-ai/nano-banana/edit' | 'fal-ai/gpt-image-1/edit-image';
3
- type ImageGenerationModel = ImageGenerationTextModel | ImageGenerationEditModel;
4
- declare function isEditModel(model: ImageGenerationModel): model is ImageGenerationEditModel;
5
- declare const definition: import("./types").NodeDefinition<"generator", {
6
- model: ImageGenerationModel;
7
- aspectRatio: string;
8
- numImages: number;
9
- apiKey: string | undefined;
10
- outputMode: "per-input";
11
- selectionMode: null;
12
- }>;
13
- export default definition;
14
- export { isEditModel };
15
- export type { ImageGenerationTextModel, ImageGenerationEditModel, ImageGenerationModel };
16
- export type GenerateImageConfig = typeof definition.defaults;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEditModel = isEditModel;
4
- const types_1 = require("./types");
5
- function isEditModel(model) {
6
- return model.includes('/edit') || model.includes('/edit-image');
7
- }
8
- const definition = (0, types_1.defineNode)({
9
- nodeId: 'generate-image',
10
- label: 'Generate Image',
11
- description: 'Generate images with AI',
12
- type: 'generator',
13
- category: 'AI Generation',
14
- outputModes: ['per-input', 'single'],
15
- selectionModes: null,
16
- defaults: {
17
- model: 'fal-ai/nano-banana',
18
- aspectRatio: '1:1',
19
- numImages: 1,
20
- apiKey: undefined,
21
- outputMode: 'per-input',
22
- selectionMode: null,
23
- },
24
- computePorts: ({ config }) => {
25
- const model = (config?.model ?? 'fal-ai/nano-banana');
26
- const inputs = [
27
- { id: 'prompt', type: 'text', isArray: false, required: true },
28
- ];
29
- if (isEditModel(model)) {
30
- inputs.push({ id: 'image', type: 'image', isArray: false, required: true });
31
- }
32
- return {
33
- inputs,
34
- outputs: [
35
- {
36
- id: 'output',
37
- type: 'image',
38
- isArray: false,
39
- required: true,
40
- },
41
- ],
42
- };
43
- },
44
- });
45
- exports.default = definition;
@@ -1,16 +0,0 @@
1
- type VideoGenerationTextToVideoModel = 'fal-ai/veo3.1' | 'fal-ai/veo3' | 'fal-ai/veo3/fast' | 'fal-ai/kling-video/v2.6/pro/text-to-video' | 'fal-ai/kling-video/v2.5/pro/text-to-video' | 'fal-ai/luma-dream-machine/ray-2' | 'fal-ai/luma-dream-machine/ray-2-flash' | 'fal-ai/minimax/hailuo-2.3/pro/text-to-video' | 'wan/v2.6/text-to-video' | 'fal-ai/sora-2/text-to-video';
2
- type VideoGenerationImageToVideoModel = 'fal-ai/veo3.1/image-to-video' | 'fal-ai/veo3/image-to-video' | 'fal-ai/kling-video/v2.6/pro/image-to-video' | 'fal-ai/kling-video/v2.5/pro/image-to-video' | 'fal-ai/luma-dream-machine/ray-2/image-to-video' | 'fal-ai/luma-dream-machine/ray-2-flash/image-to-video' | 'fal-ai/minimax/hailuo-2.3/pro/image-to-video' | 'wan/v2.6/image-to-video' | 'fal-ai/sora-2/image-to-video/pro';
3
- type VideoGenerationModel = VideoGenerationTextToVideoModel | VideoGenerationImageToVideoModel;
4
- declare function isImageToVideoModel(model: VideoGenerationModel): model is VideoGenerationImageToVideoModel;
5
- declare const definition: import("./types").NodeDefinition<"generator", {
6
- model: VideoGenerationModel;
7
- aspectRatio: string;
8
- duration: number;
9
- apiKey: string | undefined;
10
- outputMode: "per-input";
11
- selectionMode: null;
12
- }>;
13
- export default definition;
14
- export { isImageToVideoModel };
15
- export type { VideoGenerationTextToVideoModel, VideoGenerationImageToVideoModel, VideoGenerationModel };
16
- export type GenerateVideoConfig = typeof definition.defaults;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isImageToVideoModel = isImageToVideoModel;
4
- const types_1 = require("./types");
5
- function isImageToVideoModel(model) {
6
- return model.includes('/image-to-video');
7
- }
8
- const definition = (0, types_1.defineNode)({
9
- nodeId: 'generate-video',
10
- label: 'Generate Video',
11
- description: 'Generate videos with AI',
12
- type: 'generator',
13
- category: 'AI Generation',
14
- outputModes: ['per-input', 'single'],
15
- selectionModes: null,
16
- defaults: {
17
- model: 'fal-ai/kling-video/v2.6/pro/text-to-video',
18
- aspectRatio: '16:9',
19
- duration: 5,
20
- apiKey: undefined,
21
- outputMode: 'per-input',
22
- selectionMode: null,
23
- },
24
- computePorts: ({ config }) => {
25
- const model = (config?.model ?? 'fal-ai/kling-video/v2.6/pro/text-to-video');
26
- const inputs = [
27
- { id: 'prompt', type: 'text', isArray: false, required: true },
28
- ];
29
- if (isImageToVideoModel(model)) {
30
- inputs.push({ id: 'image', type: 'image', isArray: false, required: true });
31
- }
32
- return {
33
- inputs,
34
- outputs: [
35
- {
36
- id: 'output',
37
- type: 'video',
38
- isArray: false,
39
- required: true,
40
- },
41
- ],
42
- };
43
- },
44
- });
45
- exports.default = definition;
@@ -1,22 +0,0 @@
1
- import type { BasePortType } from '../types';
2
- declare const IfLogicOperators: readonly ["and", "or", "xor", "nor"];
3
- type IfLogicOperator = typeof IfLogicOperators[number];
4
- interface IfBooleanInput {
5
- id: string;
6
- }
7
- interface IfPassthroughInput {
8
- id: string;
9
- type: BasePortType;
10
- isArray: boolean;
11
- }
12
- declare const definition: import("./types").NodeDefinition<"generator", {
13
- logicOperator: IfLogicOperator;
14
- booleanInputs: IfBooleanInput[];
15
- passthroughInputs: IfPassthroughInput[];
16
- outputMode: "per-input";
17
- selectionMode: null;
18
- }>;
19
- export default definition;
20
- export { IfLogicOperators };
21
- export type { IfLogicOperator, IfBooleanInput, IfPassthroughInput };
22
- export type IfConfig = typeof definition.defaults;
package/dist/nodes/if.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IfLogicOperators = void 0;
4
- const types_1 = require("./types");
5
- const IfLogicOperators = ['and', 'or', 'xor', 'nor'];
6
- exports.IfLogicOperators = IfLogicOperators;
7
- const definition = (0, types_1.defineNode)({
8
- nodeId: 'if',
9
- label: 'If',
10
- description: 'Conditional branching based on boolean logic',
11
- type: 'generator',
12
- category: 'Control Flow',
13
- outputModes: ['per-input', 'single'],
14
- selectionModes: null,
15
- defaults: {
16
- logicOperator: 'and',
17
- booleanInputs: [{ id: 'condition-1' }],
18
- passthroughInputs: [{
19
- id: 'value',
20
- type: 'image',
21
- isArray: false,
22
- }],
23
- outputMode: 'per-input',
24
- selectionMode: null,
25
- },
26
- computePorts: ({ config }) => {
27
- const booleanInputs = config?.booleanInputs ?? [];
28
- const passthroughInputs = config?.passthroughInputs ?? [];
29
- const inputs = [];
30
- const outputs = [];
31
- // Boolean condition inputs
32
- for (const boolInput of booleanInputs) {
33
- inputs.push({ id: boolInput.id, type: 'boolean', isArray: false, required: true });
34
- }
35
- // Passthrough inputs and true/false outputs
36
- for (const passthrough of passthroughInputs) {
37
- inputs.push({ id: passthrough.id, type: passthrough.type, isArray: passthrough.isArray, required: true });
38
- outputs.push({ id: `true-${passthrough.id}`, type: passthrough.type, isArray: passthrough.isArray, required: true });
39
- outputs.push({ id: `false-${passthrough.id}`, type: passthrough.type, isArray: passthrough.isArray, required: true });
40
- }
41
- return { inputs, outputs };
42
- },
43
- });
44
- exports.default = definition;
@@ -1,14 +0,0 @@
1
- declare const definition: import("./types").NodeDefinition<"generator", {
2
- imageEditor: {
3
- width: number;
4
- height: number;
5
- aspectRatio: string;
6
- dimensionPreset: string;
7
- backgroundType: string;
8
- elements: never[];
9
- };
10
- outputMode: "per-input";
11
- selectionMode: null;
12
- }>;
13
- export default definition;
14
- export type ImageComposerConfig = typeof definition.defaults;
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const types_1 = require("./types");
4
- const definition = (0, types_1.defineNode)({
5
- nodeId: 'image-composer',
6
- label: 'Image Composer',
7
- description: 'Create templated images',
8
- type: 'generator',
9
- category: 'Generation',
10
- outputModes: ['per-input', 'single'],
11
- selectionModes: null,
12
- defaults: {
13
- imageEditor: {
14
- width: 1080,
15
- height: 1920,
16
- aspectRatio: '9:16',
17
- dimensionPreset: '9:16',
18
- backgroundType: 'image',
19
- elements: [],
20
- },
21
- outputMode: 'per-input',
22
- selectionMode: null,
23
- },
24
- computePorts: ({ config }) => {
25
- const editorConfig = config?.imageEditor;
26
- const inputs = [];
27
- if (editorConfig) {
28
- // Add background input if backgroundType is not 'color'
29
- if (editorConfig.backgroundType !== 'color') {
30
- inputs.push({
31
- id: 'background',
32
- type: 'image',
33
- isArray: false,
34
- required: true,
35
- });
36
- }
37
- // Add inputs for each element with inputId or textInputId
38
- editorConfig.elements.forEach(elem => {
39
- if (elem.type === 'image' && elem.inputId) {
40
- inputs.push({
41
- id: elem.inputId,
42
- type: 'image',
43
- isArray: false,
44
- required: true,
45
- });
46
- }
47
- else if (elem.type === 'text' && elem.textInputId) {
48
- inputs.push({
49
- id: elem.textInputId,
50
- type: 'text',
51
- isArray: false,
52
- required: true,
53
- });
54
- }
55
- });
56
- // Build enum options from element IDs for crop boundary inputs
57
- const elementEnumOptions = editorConfig.elements.map(elem => ({
58
- label: elem.id,
59
- value: elem.id,
60
- }));
61
- // Add crop boundary inputs as enum type (not required)
62
- const addedCropInputs = new Set();
63
- const cropConfig = editorConfig.dynamicCrop;
64
- [
65
- cropConfig?.vertical?.startBoundary?.inputRef,
66
- cropConfig?.vertical?.endBoundary?.inputRef,
67
- cropConfig?.horizontal?.startBoundary?.inputRef,
68
- cropConfig?.horizontal?.endBoundary?.inputRef,
69
- ].forEach(inputRef => {
70
- if (inputRef && !addedCropInputs.has(inputRef)) {
71
- addedCropInputs.add(inputRef);
72
- inputs.push({
73
- id: inputRef,
74
- type: 'enum',
75
- isArray: false,
76
- required: false,
77
- enumOptions: elementEnumOptions,
78
- });
79
- }
80
- });
81
- }
82
- return {
83
- inputs,
84
- outputs: [
85
- {
86
- id: 'output',
87
- type: 'image',
88
- isArray: false,
89
- required: true,
90
- },
91
- ],
92
- };
93
- },
94
- });
95
- exports.default = definition;
@@ -1,20 +0,0 @@
1
- import type { UserCreatableNodeType } from '../types';
2
- import type { NodeDefinition } from './types';
3
- type AnyNodeDefinition = NodeDefinition<any, any>;
4
- /**
5
- * Registry of all user-creatable node definitions.
6
- * This is the single source of truth for node types.
7
- *
8
- * Note: Internal executor types like 'for-each-value' are not included here
9
- * as they are created dynamically during execution, not by users.
10
- */
11
- export declare const nodeDefinitions: Record<UserCreatableNodeType, AnyNodeDefinition>;
12
- /**
13
- * Get all node definitions as an array
14
- */
15
- export declare function getAllNodeDefinitions(): AnyNodeDefinition[];
16
- /**
17
- * Get a node definition by its nodeId
18
- */
19
- export declare function getNodeDefinition(nodeId: UserCreatableNodeType): AnyNodeDefinition | undefined;
20
- export {};
@@ -1,93 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.nodeDefinitions = void 0;
7
- exports.getAllNodeDefinitions = getAllNodeDefinitions;
8
- exports.getNodeDefinition = getNodeDefinition;
9
- // Import all node definitions
10
- const account_1 = __importDefault(require("./account"));
11
- const auto_caption_1 = __importDefault(require("./auto-caption"));
12
- const auto_post_1 = __importDefault(require("./auto-post"));
13
- const branch_1 = __importDefault(require("./branch"));
14
- const collect_1 = __importDefault(require("./collect"));
15
- const compose_workflow_1 = __importDefault(require("./compose-workflow"));
16
- const create_dm_1 = __importDefault(require("./create-dm"));
17
- const custom_model_1 = __importDefault(require("./custom-model"));
18
- const deduplicate_1 = __importDefault(require("./deduplicate"));
19
- const destructure_1 = __importDefault(require("./destructure"));
20
- const for_each_1 = __importDefault(require("./for-each"));
21
- const generate_image_1 = __importDefault(require("./generate-image"));
22
- const generate_video_1 = __importDefault(require("./generate-video"));
23
- const if_1 = __importDefault(require("./if"));
24
- const image_composer_1 = __importDefault(require("./image-composer"));
25
- const llm_1 = __importDefault(require("./llm"));
26
- const manual_trigger_1 = __importDefault(require("./manual-trigger"));
27
- const media_1 = __importDefault(require("./media"));
28
- const not_1 = __importDefault(require("./not"));
29
- const output_1 = __importDefault(require("./output"));
30
- const random_1 = __importDefault(require("./random"));
31
- const random_route_1 = __importDefault(require("./random-route"));
32
- const recurrence_1 = __importDefault(require("./recurrence"));
33
- const save_to_media_1 = __importDefault(require("./save-to-media"));
34
- const screenshot_animation_1 = __importDefault(require("./screenshot-animation"));
35
- const social_audio_1 = __importDefault(require("./social-audio"));
36
- const text_1 = __importDefault(require("./text"));
37
- const transcript_1 = __importDefault(require("./transcript"));
38
- const video_composer_1 = __importDefault(require("./video-composer"));
39
- const video_import_1 = __importDefault(require("./video-import"));
40
- /**
41
- * Registry of all user-creatable node definitions.
42
- * This is the single source of truth for node types.
43
- *
44
- * Note: Internal executor types like 'for-each-value' are not included here
45
- * as they are created dynamically during execution, not by users.
46
- */
47
- exports.nodeDefinitions = {
48
- 'account': account_1.default,
49
- 'auto-caption': auto_caption_1.default,
50
- 'auto-post': auto_post_1.default,
51
- 'branch': branch_1.default,
52
- 'collect': collect_1.default,
53
- 'compose-workflow': compose_workflow_1.default,
54
- 'create-dm': create_dm_1.default,
55
- 'custom-model': custom_model_1.default,
56
- 'deduplicate': deduplicate_1.default,
57
- 'destructure': destructure_1.default,
58
- 'for-each': for_each_1.default,
59
- 'generate-image': generate_image_1.default,
60
- 'generate-video': generate_video_1.default,
61
- 'if': if_1.default,
62
- 'image-composer': image_composer_1.default,
63
- 'llm': llm_1.default,
64
- 'manual-trigger': manual_trigger_1.default,
65
- 'media': media_1.default,
66
- 'not': not_1.default,
67
- 'output': output_1.default,
68
- 'random': random_1.default,
69
- 'random-route': random_route_1.default,
70
- 'recurrence': recurrence_1.default,
71
- 'save-to-media': save_to_media_1.default,
72
- 'screenshot-animation': screenshot_animation_1.default,
73
- 'social-audio': social_audio_1.default,
74
- 'text': text_1.default,
75
- 'transcript': transcript_1.default,
76
- 'video-composer': video_composer_1.default,
77
- 'video-import': video_import_1.default,
78
- };
79
- // =============================================================================
80
- // Getters
81
- // =============================================================================
82
- /**
83
- * Get all node definitions as an array
84
- */
85
- function getAllNodeDefinitions() {
86
- return Object.values(exports.nodeDefinitions);
87
- }
88
- /**
89
- * Get a node definition by its nodeId
90
- */
91
- function getNodeDefinition(nodeId) {
92
- return exports.nodeDefinitions[nodeId];
93
- }
@@ -1,27 +0,0 @@
1
- import { type ObjectSchemaField } from './types';
2
- declare const LLMProviders: readonly ["groq", "openai", "claude", "gemini"];
3
- type LLMProvider = typeof LLMProviders[number];
4
- interface LLMApiKeys {
5
- openai?: string;
6
- claude?: string;
7
- gemini?: string;
8
- groq?: string;
9
- }
10
- declare const definition: import("./types").NodeDefinition<"generator", {
11
- provider: LLMProvider;
12
- model: string;
13
- temperature: number;
14
- maxTokens: number | undefined;
15
- systemPrompt: string;
16
- outputFields: ObjectSchemaField[];
17
- useStructuredOutput: boolean;
18
- imageInputRefs: string[];
19
- videoInputRefs: string[];
20
- apiKeys: LLMApiKeys | undefined;
21
- outputMode: "per-input";
22
- selectionMode: null;
23
- }>;
24
- export default definition;
25
- export { LLMProviders };
26
- export type { LLMProvider, LLMApiKeys };
27
- export type LLMConfig = typeof definition.defaults;
package/dist/nodes/llm.js DELETED
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LLMProviders = void 0;
4
- const internal_utils_1 = require("../internal-utils");
5
- const types_1 = require("./types");
6
- const LLMProviders = ['groq', 'openai', 'claude', 'gemini'];
7
- exports.LLMProviders = LLMProviders;
8
- const definition = (0, types_1.defineNode)({
9
- nodeId: 'llm',
10
- label: 'LLM',
11
- description: 'Generate LLM output',
12
- type: 'generator',
13
- category: 'AI Generation',
14
- outputModes: ['per-input', 'single'],
15
- selectionModes: null,
16
- defaults: {
17
- provider: 'claude',
18
- model: 'claude-sonnet-4-5',
19
- temperature: 0.7,
20
- maxTokens: undefined,
21
- systemPrompt: '',
22
- outputFields: [{ name: 'output', type: 'string' }],
23
- useStructuredOutput: true,
24
- imageInputRefs: [],
25
- videoInputRefs: [],
26
- apiKeys: undefined,
27
- outputMode: 'per-input',
28
- selectionMode: null,
29
- },
30
- computePorts: ({ config }) => {
31
- // Input ports from template variables + media refs
32
- const systemPrompt = config?.systemPrompt ?? '';
33
- const variables = (0, internal_utils_1.extractTemplateVariables)([systemPrompt]);
34
- const imageInputRefs = config?.imageInputRefs ?? [];
35
- const videoInputRefs = config?.videoInputRefs ?? [];
36
- const inputs = [
37
- ...variables.map(v => ({
38
- id: v,
39
- type: ['text', 'object', 'boolean'],
40
- isArray: false,
41
- required: true,
42
- })),
43
- ...imageInputRefs.map(ref => ({
44
- id: ref,
45
- type: 'image',
46
- isArray: false,
47
- required: true,
48
- })),
49
- ...videoInputRefs.map(ref => ({
50
- id: ref,
51
- type: 'video',
52
- isArray: false,
53
- required: true,
54
- })),
55
- ];
56
- // Output ports from outputFields
57
- const outputFields = (config?.outputFields ?? [{ name: 'output', type: 'string' }]);
58
- const outputs = outputFields.map(f => {
59
- let pType;
60
- let pIsArray;
61
- if (f.type === 'array') {
62
- pType = f.items === 'object' ? 'object' : 'text';
63
- pIsArray = true;
64
- }
65
- else if (f.type === 'object') {
66
- pType = 'object';
67
- pIsArray = false;
68
- }
69
- else {
70
- pType = 'text';
71
- pIsArray = false;
72
- }
73
- return {
74
- id: f.name,
75
- type: pType,
76
- isArray: pIsArray,
77
- required: f.required ?? true,
78
- // Include objectSchema for object/array-of-object types
79
- ...(f.objectSchema && { objectSchema: f.objectSchema }),
80
- };
81
- });
82
- return { inputs, outputs };
83
- },
84
- });
85
- exports.default = definition;
@@ -1,16 +0,0 @@
1
- import type { EnumOption } from '../types';
2
- import { type ObjectSchemaField } from './types';
3
- interface ManualTriggerOutput {
4
- id: string;
5
- type: string;
6
- isArray?: boolean;
7
- objectSchema?: ObjectSchemaField[];
8
- enumOptions?: EnumOption[];
9
- }
10
- declare const definition: import("./types").NodeDefinition<"trigger", {
11
- outputs: ManualTriggerOutput[];
12
- outputMode: null;
13
- selectionMode: null;
14
- }>;
15
- export default definition;
16
- export type ManualTriggerConfig = typeof definition.defaults;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const types_1 = require("./types");
4
- const definition = (0, types_1.defineNode)({
5
- nodeId: 'manual-trigger',
6
- label: 'Manual Trigger',
7
- description: 'Trigger manually',
8
- type: 'trigger',
9
- category: 'Triggers',
10
- outputModes: null,
11
- selectionModes: null,
12
- defaults: {
13
- outputs: [{ id: 'input-1', type: 'image' }],
14
- outputMode: null,
15
- selectionMode: null,
16
- },
17
- computePorts: ({ config }) => {
18
- const configOutputs = config?.outputs ?? [];
19
- const outputs = configOutputs.map(output => ({
20
- id: output.id,
21
- type: output.type,
22
- isArray: output.isArray ?? false,
23
- required: true,
24
- ...(output.type === 'enum' && output.enumOptions ? { enumOptions: output.enumOptions } : {}),
25
- }));
26
- return {
27
- inputs: [],
28
- outputs,
29
- };
30
- },
31
- });
32
- exports.default = definition;