@nodetool-ai/minimax-nodes 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.
@@ -0,0 +1,31 @@
1
+ import { BaseNode } from "@nodetool-ai/node-sdk";
2
+ import type { NodeClass } from "@nodetool-ai/node-sdk";
3
+ import type { ProcessingContext } from "@nodetool-ai/runtime";
4
+ /** Output handles MinimaxTextToVideoNode.process() emits. */
5
+ type MinimaxTextToVideoNodeOutputs = {
6
+ output: {
7
+ type: string;
8
+ data: string;
9
+ };
10
+ };
11
+ export declare class MinimaxTextToVideoNode extends BaseNode {
12
+ static readonly nodeType = "minimax.TextToVideo";
13
+ static readonly body = "content_card";
14
+ static readonly title = "MiniMax Text to Video";
15
+ static readonly description: string;
16
+ static readonly metadataOutputTypes: {
17
+ output: string;
18
+ };
19
+ static readonly inlineFields: string[];
20
+ static readonly inputFields: string[];
21
+ static readonly requiredSettings: string[];
22
+ static readonly autoSaveAsset = true;
23
+ model: any;
24
+ prompt: any;
25
+ duration: any;
26
+ resolution: any;
27
+ process(context?: ProcessingContext): Promise<MinimaxTextToVideoNodeOutputs>;
28
+ }
29
+ export declare const TEXT_TO_VIDEO_NODES: readonly NodeClass[];
30
+ export {};
31
+ //# sourceMappingURL=text-to-video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-to-video.d.ts","sourceRoot":"","sources":["../../src/nodes/text-to-video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAW9D,6DAA6D;AAC7D,KAAK,6BAA6B,GAAG;IACnC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC,CAAC;AAEF,qBAAa,sBAAuB,SAAQ,QAAQ;IAClD,MAAM,CAAC,QAAQ,CAAC,QAAQ,yBAAyB;IACjD,MAAM,CAAC,QAAQ,CAAC,IAAI,kBAAkB;IACtC,MAAM,CAAC,QAAQ,CAAC,KAAK,2BAA2B;IAChD,MAAM,CAAC,QAAQ,CAAC,WAAW,SAOc;IACzC,MAAM,CAAC,QAAQ,CAAC,mBAAmB;QAAK,MAAM;MAAY;IAC1D,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAM;IAC5C,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAc;IACnD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,WAAuB;IACvD,MAAM,CAAC,QAAQ,CAAC,aAAa,QAAQ;IAS7B,KAAK,EAAE,GAAG,CAAC;IAUX,MAAM,EAAE,GAAG,CAAC;IASZ,QAAQ,EAAE,GAAG,CAAC;IASd,UAAU,EAAE,GAAG,CAAC;IAElB,OAAO,CACX,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,6BAA6B,CAAC,CAqBxC;CACF;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,SAAS,EAEnD,CAAC"}
@@ -0,0 +1,81 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { BaseNode, prop } from "@nodetool-ai/node-sdk";
8
+ import { generateVideo, getMinimaxApiKey, MINIMAX_T2V_MODELS, MINIMAX_VIDEO_DURATIONS, MINIMAX_VIDEO_RESOLUTIONS, videoRefFromBytes, videoRenderSettings } from "../minimax-base.js";
9
+ export class MinimaxTextToVideoNode extends BaseNode {
10
+ static nodeType = "minimax.TextToVideo";
11
+ static body = "content_card";
12
+ static title = "MiniMax Text to Video";
13
+ static description = "Generate video from a text prompt using MiniMax Hailuo and Director " +
14
+ "models.\n" +
15
+ "video, generation, text-to-video, t2v, hailuo, minimax\n\n" +
16
+ "Use cases:\n" +
17
+ "- Create short cinematic clips from a description\n" +
18
+ "- Prototype motion concepts\n" +
19
+ "- Generate B-roll and social content";
20
+ static metadataOutputTypes = { output: "video" };
21
+ static inlineFields = [];
22
+ static inputFields = ["prompt"];
23
+ static requiredSettings = ["MINIMAX_API_KEY"];
24
+ static autoSaveAsset = true;
25
+ async process(context) {
26
+ const apiKey = getMinimaxApiKey(this._secrets);
27
+ const prompt = String(this.prompt ?? "");
28
+ if (!prompt)
29
+ throw new Error("Prompt is required");
30
+ const model = String(this.model ?? "MiniMax-Hailuo-02");
31
+ const body = {
32
+ model,
33
+ prompt,
34
+ ...videoRenderSettings(model, Number(this.duration ?? 6), String(this.resolution ?? "768P"))
35
+ };
36
+ const bytes = await generateVideo(apiKey, body, {
37
+ signal: context?.signal
38
+ });
39
+ return { output: videoRefFromBytes(bytes) };
40
+ }
41
+ }
42
+ __decorate([
43
+ prop({
44
+ type: "enum",
45
+ default: "MiniMax-Hailuo-02",
46
+ title: "Model",
47
+ description: "The MiniMax video model to use.",
48
+ values: MINIMAX_T2V_MODELS
49
+ })
50
+ ], MinimaxTextToVideoNode.prototype, "model", void 0);
51
+ __decorate([
52
+ prop({
53
+ type: "str",
54
+ default: "A cat playing with a ball of yarn",
55
+ title: "Prompt",
56
+ description: "Text prompt describing the video. Director models support camera " +
57
+ "moves like [Push in], [Pan left], [Truck left]."
58
+ })
59
+ ], MinimaxTextToVideoNode.prototype, "prompt", void 0);
60
+ __decorate([
61
+ prop({
62
+ type: "int",
63
+ default: 6,
64
+ title: "Duration",
65
+ description: "Video duration in seconds.",
66
+ values: MINIMAX_VIDEO_DURATIONS
67
+ })
68
+ ], MinimaxTextToVideoNode.prototype, "duration", void 0);
69
+ __decorate([
70
+ prop({
71
+ type: "enum",
72
+ default: "768P",
73
+ title: "Resolution",
74
+ description: "Output resolution.",
75
+ values: MINIMAX_VIDEO_RESOLUTIONS
76
+ })
77
+ ], MinimaxTextToVideoNode.prototype, "resolution", void 0);
78
+ export const TEXT_TO_VIDEO_NODES = [
79
+ MinimaxTextToVideoNode
80
+ ];
81
+ //# sourceMappingURL=text-to-video.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-to-video.js","sourceRoot":"","sources":["../../src/nodes/text-to-video.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAO5B,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IAClD,MAAM,CAAU,QAAQ,GAAG,qBAAqB,CAAC;IACjD,MAAM,CAAU,IAAI,GAAG,cAAc,CAAC;IACtC,MAAM,CAAU,KAAK,GAAG,uBAAuB,CAAC;IAChD,MAAM,CAAU,WAAW,GACzB,sEAAsE;QACtE,WAAW;QACX,4DAA4D;QAC5D,cAAc;QACd,qDAAqD;QACrD,+BAA+B;QAC/B,sCAAsC,CAAC;IACzC,MAAM,CAAU,mBAAmB,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC1D,MAAM,CAAU,YAAY,GAAa,EAAE,CAAC;IAC5C,MAAM,CAAU,WAAW,GAAa,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,CAAU,gBAAgB,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACvD,MAAM,CAAU,aAAa,GAAG,IAAI,CAAC;IAuCrC,KAAK,CAAC,OAAO,CAC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P,IAAI,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,oBAAoB;QACjC,MAAM,EAAE,yBAAyB;KAClC,CAAC;0DACsB;AA4B1B,MAAM,CAAC,MAAM,mBAAmB,GAAyB;IACvD,sBAAsB;CACvB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { BaseNode } from "@nodetool-ai/node-sdk";
2
+ import type { NodeClass } from "@nodetool-ai/node-sdk";
3
+ /** Output handles MinimaxVoiceNode.process() emits. */
4
+ type MinimaxVoiceNodeOutputs = {
5
+ voice_id: string;
6
+ };
7
+ export declare class MinimaxVoiceNode extends BaseNode {
8
+ static readonly nodeType = "minimax.Voice";
9
+ static readonly body = "small";
10
+ static readonly title = "MiniMax Voice";
11
+ static readonly description: string;
12
+ static readonly metadataOutputTypes: {
13
+ voice_id: string;
14
+ };
15
+ static readonly inlineFields: string[];
16
+ static readonly inputFields: string[];
17
+ voice: any;
18
+ process(): Promise<MinimaxVoiceNodeOutputs>;
19
+ }
20
+ export declare const VOICE_NODES: readonly NodeClass[];
21
+ export {};
22
+ //# sourceMappingURL=voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../../src/nodes/voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,uDAAuD;AACvD,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,MAAM,CAAC,QAAQ,CAAC,QAAQ,mBAAmB;IAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,WAAW;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,mBAAmB;IACxC,MAAM,CAAC,QAAQ,CAAC,WAAW,SAMkB;IAC7C,MAAM,CAAC,QAAQ,CAAC,mBAAmB;QAAK,QAAQ;MAAU;IAC1D,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAa;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAM;IASnC,KAAK,EAAE,GAAG,CAAC;IAEb,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAGhD;CACF;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAuB,CAAC"}
@@ -0,0 +1,37 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { BaseNode, prop } from "@nodetool-ai/node-sdk";
8
+ import { DEFAULT_VOICE, MINIMAX_VOICES } from "../minimax-base.js";
9
+ export class MinimaxVoiceNode extends BaseNode {
10
+ static nodeType = "minimax.Voice";
11
+ static body = "small";
12
+ static title = "MiniMax Voice";
13
+ static description = "Select a MiniMax system voice and output its voice ID.\n" +
14
+ "audio, tts, speech, voice, voice-id, minimax\n\n" +
15
+ "Use cases:\n" +
16
+ "- Pick a built-in MiniMax voice by name\n" +
17
+ "- Feed a voice ID into the MiniMax Text to Speech node\n" +
18
+ "- Reuse the same voice across a workflow";
19
+ static metadataOutputTypes = { voice_id: "str" };
20
+ static inlineFields = ["voice"];
21
+ static inputFields = [];
22
+ async process() {
23
+ const voice = String(this.voice ?? DEFAULT_VOICE);
24
+ return { voice_id: voice };
25
+ }
26
+ }
27
+ __decorate([
28
+ prop({
29
+ type: "enum",
30
+ default: DEFAULT_VOICE,
31
+ title: "Voice",
32
+ description: "MiniMax system voice to use.",
33
+ values: MINIMAX_VOICES
34
+ })
35
+ ], MinimaxVoiceNode.prototype, "voice", void 0);
36
+ export const VOICE_NODES = [MinimaxVoiceNode];
37
+ //# sourceMappingURL=voice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voice.js","sourceRoot":"","sources":["../../src/nodes/voice.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOnE,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IAC5C,MAAM,CAAU,QAAQ,GAAG,eAAe,CAAC;IAC3C,MAAM,CAAU,IAAI,GAAG,OAAO,CAAC;IAC/B,MAAM,CAAU,KAAK,GAAG,eAAe,CAAC;IACxC,MAAM,CAAU,WAAW,GACzB,0DAA0D;QAC1D,kDAAkD;QAClD,cAAc;QACd,2CAA2C;QAC3C,0DAA0D;QAC1D,0CAA0C,CAAC;IAC7C,MAAM,CAAU,mBAAmB,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC1D,MAAM,CAAU,YAAY,GAAa,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,CAAU,WAAW,GAAa,EAAE,CAAC;IAW3C,KAAK,CAAC,OAAO;QACX,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,aAAa,CAAC,CAAC;QAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;CACF;AANS;IAPP,IAAI,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,8BAA8B;QAC3C,MAAM,EAAE,cAAc;KACvB,CAAC;+CACiB;AAQrB,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,gBAAgB,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@nodetool-ai/minimax-nodes",
3
+ "type": "module",
4
+ "engines": {
5
+ "node": ">=22.0.0"
6
+ },
7
+ "version": "0.8.1",
8
+ "description": "MiniMax AI nodes for nodetool",
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "scripts": {
12
+ "build": "node ../../scripts/build-typescript-workspace.mjs",
13
+ "test": "node ../../scripts/run-vitest.mjs run",
14
+ "test:watch": "node ../../scripts/run-vitest.mjs",
15
+ "lint": "node ../../scripts/run-tsc.mjs --noEmit"
16
+ },
17
+ "dependencies": {
18
+ "@nodetool-ai/node-sdk": "^0.8.1",
19
+ "@nodetool-ai/runtime": "^0.8.1"
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^22.0.0",
23
+ "typescript": "npm:@typescript/typescript6@6.0.2",
24
+ "vitest": "^5.0.1"
25
+ },
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/index.d.ts",
29
+ "import": "./dist/index.js",
30
+ "default": "./dist/index.js"
31
+ }
32
+ },
33
+ "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/nodetool-ai/nodetool.git",
37
+ "directory": "packages/minimax-nodes"
38
+ },
39
+ "homepage": "https://nodetool.ai",
40
+ "bugs": {
41
+ "url": "https://github.com/nodetool-ai/nodetool/issues"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "README.md"
49
+ ],
50
+ "keywords": [
51
+ "nodetool",
52
+ "ai",
53
+ "workflow",
54
+ "workflow-automation",
55
+ "typescript",
56
+ "ai-nodes",
57
+ "no-code",
58
+ "visual-programming",
59
+ "workflow-nodes",
60
+ "minimax",
61
+ "text-to-speech",
62
+ "text-to-image",
63
+ "text-to-video",
64
+ "music-generation"
65
+ ]
66
+ }