mindforgeai-creator-tools 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MindForgeAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,102 @@
1
- # Temporary Holding Version
1
+ # MindForgeAI creator tools and practical guides
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Prepare a clear video prompt and catch unsupported input settings before opening [MindForgeAI](https://mindforgeai.app/). This small offline helper is for creators and e-commerce teams exploring short motion drafts.
4
+
5
+ **Release:** version 0.1.0. Check the [npm package page](https://www.npmjs.com/package/mindforgeai-creator-tools) for registry availability. The source and local-tarball procedures below work independently of registry publication. There is no public contact email in this project.
6
+
7
+ ## What this tool does
8
+
9
+ - Compose a scene prompt from subject, motion, setting, camera and style.
10
+ - Validate declared video parameters: text/image mode, prompt length, duration, orientation and reference-image metadata.
11
+ - Explain invalid fields with machine-readable errors and a useful CLI exit code.
12
+
13
+ It does **not** generate images or videos, call the website, authenticate users, upload files, check remaining quota, inspect actual image bytes or include model weights. It is not a MiniMax SDK or a replacement for the website's own validation. There are no dependencies, install hooks, telemetry or network requests.
14
+
15
+ ## Online tutorial center
16
+
17
+ Read the [public MindForgeAI tutorial center](https://frequent-option-c81.notion.site/MindForgeAI-Tutorials-Free-Video-Drafts-and-H3-Image-Workflows-4170d247536b81bc9eabcb44a853c4ed) for browser walkthroughs, free limits and practical troubleshooting. These are first-party tutorials, not independent reviews or evidence of search-engine indexing.
18
+
19
+ ## Start with a practical guide
20
+
21
+ | Your task | Guide |
22
+ | --- | --- |
23
+ | Understand the free entry points and prepare a first attempt | [Getting started](guides/getting-started.md) |
24
+ | Write a focused scene prompt | [Free text-to-video](guides/text-to-video.md) |
25
+ | Animate an authorized photo and check fidelity | [Photo-to-video](guides/photo-to-video.md) |
26
+ | Make or edit a still image using the separate free H3 Image tool | [H3 Image workflow](guides/h3-image.md) |
27
+ | Understand busy, failed and quota-limited attempts | [Troubleshooting](guides/troubleshooting.md) |
28
+
29
+ These guides describe the documented MindForgeAI web presets checked on 2026-11-13, not every capability of the underlying models. Suggested prompts are not evidence of newly generated results.
30
+
31
+ ## Free access and limits
32
+
33
+ The dedicated [free video tool](https://mindforgeai.app/free-ai-video) requires no sign-up, credit card or purchased credits. It offers about 5/10/15-second silent SD previews, 16:9 or 9:16 at 24 fps. MiniMax H3's preset is 896×512 landscape or 512×896 portrait; frame rounding can change exact duration. PinkCherry H3 v1.5 is a separate community fine-tune available in the form, not an official MiniMax release.
34
+
35
+ Video access is limited to 3 submissions per network per UTC day and 50 sitewide, shared across the free video entry points and both profiles. Shared capacity can be busy. These are submission allowances, not a promise of successful clips or unlimited/free-forever service. Paid models and the signed-in credit workspace are separate.
36
+
37
+ The separate [H3 Image generator](https://mindforgeai.app/minimax-h3-image) has its own image allowance. Do not assume that creating a free video gives access to paid images or that this helper checks live account entitlements.
38
+
39
+ ## Run from the independent repository
40
+
41
+ Requires Node.js 20 or newer. The independent repository is available at [cydiz/mindforgeai-creator-tools](https://github.com/cydiz/mindforgeai-creator-tools).
42
+
43
+ ```sh
44
+ git clone https://github.com/cydiz/mindforgeai-creator-tools.git
45
+ cd mindforgeai-creator-tools
46
+ ```
47
+
48
+ From that independent directory:
49
+
50
+ ```sh
51
+ npm test
52
+ node bin/cli.js prompt --subject "A ceramic cup" --motion "Steam rises slowly"
53
+ node bin/cli.js validate --json '{"prompt":"A cup with rising steam","duration":5,"ratio":"16:9"}'
54
+ npm pack
55
+ ```
56
+
57
+ Expected prompt output:
58
+
59
+ ```text
60
+ A ceramic cup. Steam rises slowly. Fixed camera.
61
+ ```
62
+
63
+ Expected validation output:
64
+
65
+ ```json
66
+ {"valid":true,"value":{"mode":"text","prompt":"A cup with rising steam","duration":5,"ratio":"16:9"}}
67
+ ```
68
+
69
+ After creating the tarball, install that exact file in a temporary project:
70
+
71
+ ```sh
72
+ npm install --ignore-scripts --no-audit --no-fund /absolute/path/to/mindforgeai-creator-tools-0.1.0.tgz
73
+ ```
74
+
75
+ Then, in an `.mjs` file in the temporary project:
76
+
77
+ ```js
78
+ import { buildVideoPrompt, validateVideoOptions } from 'mindforgeai-creator-tools';
79
+
80
+ const prompt = buildVideoPrompt({
81
+ subject: 'A ceramic cup',
82
+ motion: 'Steam rises slowly',
83
+ });
84
+ console.log(prompt);
85
+ console.log(validateVideoOptions({ prompt, duration: 5, ratio: '16:9' }));
86
+ ```
87
+
88
+ The package does not send this prompt anywhere. To try it, copy the text into the website and explicitly submit there.
89
+
90
+ ## Validation and CLI behavior
91
+
92
+ `validateVideoOptions(unknown)` returns either `{valid:true,value}` or `{valid:false,errors}`. Defaults are text mode, five seconds and 16:9. Unknown properties, unsupported durations and image metadata in text mode are errors. For image mode provide `{mime:'image/png',bytes:12345}`; metadata alone does not prove a file is valid.
93
+
94
+ `buildVideoPrompt` throws a TypeError for missing/invalid scene fields and a RangeError if the combined prompt is too long. CLI `validate` prints JSON and returns exit code 2 for invalid input; invalid JSON and unsupported commands also return 2. `--help` returns 0. Only ESM imports are supported in this release.
95
+
96
+ Use `node bin/cli.js profile` to inspect the dated offline constraints. If the web form has newer settings, follow the website rather than treating this snapshot as current service availability.
97
+
98
+ ## Relationship and rights
99
+
100
+ MindForgeAI is the website discussed by these guides. MiniMax and other model names identify third-party technology; this project does not claim partnership, ownership of those models or universal commercial-output rights. Review the [product facts](https://mindforgeai.app/product-facts) and [terms](https://mindforgeai.app/terms-of-service) before using outputs.
101
+
102
+ Only newly authored helper code, examples and tutorials are in this project. It contains no website implementation, commercial boilerplate, production configuration, user content, service workflow or weights. The original helper code, examples and tutorials in this repository are MIT licensed; see [LICENSE](LICENSE). This does not license the website implementation, templates, models or trademarks. Package availability can be checked on the npm package page linked above.
package/bin/cli.js ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ import {buildVideoPrompt, validateVideoOptions, videoProfile} from '../index.js';
3
+ const help = `Offline MindForgeAI creator tools — no generation or network requests.
4
+ Usage:
5
+ mindforgeai-tools prompt --subject "A ceramic cup" --motion "Steam rises slowly"
6
+ mindforgeai-tools validate --json '{"prompt":"A cup with rising steam"}'
7
+ mindforgeai-tools profile
8
+ Invalid input exits with code 2; --help exits with code 0.`;
9
+ function options(args) {
10
+ const result = Object.create(null);
11
+ for (let i = 0; i < args.length; i++) {
12
+ if (!args[i].startsWith('--')) throw new TypeError('Expected --name value.');
13
+ const equal = args[i].indexOf('=');
14
+ const key = args[i].slice(2, equal === -1 ? undefined : equal);
15
+ const value = equal === -1 ? args[++i] : args[i].slice(equal + 1);
16
+ if (!key || value === undefined || value.startsWith('--') || Object.hasOwn(result,key))
17
+ throw new TypeError('Missing value or duplicate option.');
18
+ result[key] = value;
19
+ }
20
+ return result;
21
+ }
22
+ try {
23
+ const [command,...args] = process.argv.slice(2);
24
+ if (command === '--help' || command === 'help' || command === undefined) console.log(help);
25
+ else if (command === 'profile') {
26
+ if (args.length) throw new TypeError('profile takes no arguments.');
27
+ console.log(JSON.stringify(videoProfile,null,2));
28
+ } else if (command === 'prompt') console.log(buildVideoPrompt(options(args)));
29
+ else if (command === 'validate') {
30
+ const flags = options(args);
31
+ if (Object.keys(flags).length !== 1 || !Object.hasOwn(flags,'json'))
32
+ throw new TypeError('validate requires only --json.');
33
+ const result = validateVideoOptions(JSON.parse(flags.json));
34
+ console.log(JSON.stringify(result,null,2));
35
+ if (!result.valid) process.exitCode = 2;
36
+ } else throw new TypeError('Unknown command. Use --help.');
37
+ } catch (error) { console.error(JSON.stringify({error:error.message})); process.exitCode = 2; }
@@ -0,0 +1,6 @@
1
+ {
2
+ "mode": "text",
3
+ "prompt": "A white ceramic cup on a wooden desk by a window. A thin ribbon of steam rises slowly. Fixed camera, soft morning light, one continuous shot.",
4
+ "duration": 5,
5
+ "ratio": "16:9"
6
+ }
@@ -0,0 +1,4 @@
1
+ import {buildVideoPrompt,validateVideoOptions} from 'mindforgeai-creator-tools';
2
+ const prompt = buildVideoPrompt({subject:'A ceramic cup',motion:'Steam rises slowly'});
3
+ console.log(prompt);
4
+ console.log(JSON.stringify(validateVideoOptions({prompt}),null,2));
@@ -0,0 +1,27 @@
1
+ # Start a free creative draft on MindForgeAI
2
+
3
+ Use this guide when you want to explore one shot before paying for a production workflow. You need a browser and a visual idea; the dedicated free tools do not ask you to register or provide a credit card.
4
+
5
+ ## Choose the right starting point
6
+
7
+ - [Free text-to-video](https://mindforgeai.app/free-text-to-video): describe a scene without uploading an image.
8
+ - [Free photo-to-video](https://mindforgeai.app/free-image-to-video): upload one image and describe movement.
9
+ - [Free H3 Image](https://mindforgeai.app/minimax-h3-image): generate or edit a still image, not a video.
10
+
11
+ The first two video pages share the same free allowance, not three additional attempts on each page. As checked on 2026-11-13, video access allows three submissions per network per UTC day and fifty across the site, subject to shared capacity. Other paid image/video models use a separate account and credit workflow.
12
+
13
+ ## Make one deliberate attempt
14
+
15
+ 1. Open the relevant tool, read its current limits and start with one subject.
16
+ 2. For video, choose MiniMax H3 or the separate PinkCherry H3 community profile. Begin with about five seconds and choose landscape or portrait.
17
+ 3. Enter a prompt such as: “A ceramic cup on a desk by a window. A thin ribbon of steam rises slowly. Fixed camera, soft morning light.” This is a suggestion, not a newly verified output example.
18
+ 4. Click **Generate free video** once. Keep the task page open and follow its status instead of repeatedly submitting.
19
+ 5. When complete, play the whole result. Check the beginning, middle and end, then use **Open / download video** to save a result you want to keep.
20
+
21
+ The free preset is a silent SD preview, not an automatically finished advertisement or an HD/2K deliverable. Add exact captions, music and edits separately if necessary. Generated faces, labels or product geometry can change.
22
+
23
+ ## Check your result, not just the completion label
24
+
25
+ A completed task means a file was produced; it does not establish product fidelity, suitability for commercial use or a successful creative outcome. Review [recorded H3 examples and their limitations](https://mindforgeai.app/h3-video-examples). This guide does not claim a new generation or guaranteed turnaround time.
26
+
27
+ If the tool is busy or an attempt fails, follow [troubleshooting](troubleshooting.md). Next, use [focused text prompts](text-to-video.md) or [prepare a photo](photo-to-video.md). Still-image needs belong in the [separate image workflow](h3-image.md).
@@ -0,0 +1,33 @@
1
+ # Create or edit a still image with the separate H3 Image tool
2
+
3
+ [MindForgeAI H3 Image](https://mindforgeai.app/minimax-h3-image) is a still-image generator and reference-guided editor. It is separate from the H3 video form, and the offline video helper in this repository does not validate all image-generator parameters.
4
+
5
+ ## Prepare your image task
6
+
7
+ You can start with text, or one authorized PNG/JPG/WebP reference up to 5 MB. For text-to-image, specify subject, composition, materials and light. For an edit, describe both the change and what should remain recognizable.
8
+
9
+ Suggested edit prompt:
10
+
11
+ ```text
12
+ Keep the unbranded green bottle, silver cap and stone plinth. Change the ivory paper background to midnight blue paper with soft studio light. One bottle, no text or logos.
13
+ ```
14
+
15
+ Use this only with your own suitable reference. It is a suggestion, not permission to upload someone else's image and not a guarantee of pixel-perfect preservation.
16
+
17
+ ## Generate a still image
18
+
19
+ 1. Open H3 Image and use **What would you like to create or change?** to enter your request.
20
+ 2. Optionally choose **Reference image (optional)** for reference-guided editing.
21
+ 3. Choose **Aspect ratio**. As checked on 2026-11-13, options are 1:1, 4:3, 3:4, 16:9 and 9:16.
22
+ 4. Review the displayed dimensions and image allowance, then click **Generate image** once.
23
+ 5. Wait for the result preview. Review the generated image and use its PNG download control to save it.
24
+
25
+ The preset outputs approximately 2K-area PNG images: square 2048×2048; 4:3 2368×1760; 3:4 1760×2368; 16:9 2720×1536; 9:16 1536×2720. It does not expose all capabilities of the underlying model, such as 4K or many reference images.
26
+
27
+ ## Allowance and quality review
28
+
29
+ The separate free image entry requires no sign-up or card and allows three image submissions per network per UTC day and fifty sitewide. Its image allowance is separate from the free video allowance, while processing capacity is shared. Neither allowance buys paid model credits.
30
+
31
+ Inspect label text, subject geometry, reflections and unwanted changes. The [tool page](https://mindforgeai.app/minimax-h3-image) includes a recorded bottle image with prompt and seed; only those labeled records should be treated as actual examples. This guide does not claim that its suggested prompt was newly run.
32
+
33
+ For a moving result, continue with [photo-to-video](photo-to-video.md) using an image you may process. For access or task issues, see [troubleshooting](troubleshooting.md).
@@ -0,0 +1,34 @@
1
+ # Animate an authorized photo and review what changed
2
+
3
+ Use [free image-to-video](https://mindforgeai.app/free-image-to-video) to explore motion from one still image. This creates new frames; it does not recover real footage from when the photo was taken.
4
+
5
+ ## Prepare the source
6
+
7
+ Choose one PNG, JPG or WebP up to 5 MB. Keep the subject clear, leave space around its edges and use an image you have permission to upload. Avoid confidential product material or personal photos that you are not authorized to process.
8
+
9
+ For an initial product draft, a stationary object with changing light is easier to review than a full rotation, splashing liquid and a scene change at once. A written movement description is required after uploading.
10
+
11
+ Suggested prompt, not a verified new output:
12
+
13
+ ```text
14
+ Keep the reference subject fully visible and stationary. Fixed camera; only a subtle change in background light. One continuous shot, no scene changes.
15
+ ```
16
+
17
+ ## Use the actual form
18
+
19
+ 1. Open the dedicated image-to-video page.
20
+ 2. Fill **Describe your video** with the motion request.
21
+ 3. Choose your file in **Upload image (required, PNG / JPG / WebP, up to 5 MB)**.
22
+ 4. Select the **Video model**, **Aspect ratio** and **About 5 seconds** initially.
23
+ 5. Review the shared allowance, then click **Generate free video** once.
24
+ 6. Wait for status and inspect the completed clip before choosing **Open / download video**.
25
+
26
+ No registration or card is required for this free form. The three submissions per network per UTC day and fifty sitewide are shared with text-to-video and both free model profiles. Silent SD and approximate 5/10/15-second settings apply; shared GPU capacity can refuse a request.
27
+
28
+ ## Compare before publishing
29
+
30
+ Compare the original photo against the beginning, middle and end of the video. Inspect faces, hands, bottle caps, silhouettes, packaging and text. A result that invents a label or changes a real product should be rejected or reworked; completion alone does not establish fidelity.
31
+
32
+ There is no validated free H3 product-image fidelity example claimed in this guide. A [separate recorded Seedance photo-to-video case](https://mindforgeai.app/blog/turn-photo-into-video-with-ai) uses a different paid workflow; it is not evidence of the free H3 result or free model quality.
33
+
34
+ If the source image itself needs a background change first, see the [still-image editing guide](h3-image.md). If you have no image, use [text-to-video](text-to-video.md). For busy and failed attempts, use [troubleshooting](troubleshooting.md).
@@ -0,0 +1,32 @@
1
+ # Turn a written scene into a free short video
2
+
3
+ This workflow is for a single generated shot: a moving scene from a prompt, rather than assembling a full script with voiceover and captions. Use [MindForgeAI free text-to-video](https://mindforgeai.app/free-text-to-video).
4
+
5
+ ## Prepare a specific scene
6
+
7
+ Write four elements: subject, setting, one action and camera. Restrained movement gives you fewer details to inspect than several simultaneous transformations. Avoid relying on generated lettering for exact product names or legal text.
8
+
9
+ Suggested prompt:
10
+
11
+ ```text
12
+ A white ceramic cup on a wooden desk beside a window. A thin ribbon of steam rises slowly. Fixed camera, soft morning light, the whole cup stays visible. One continuous shot.
13
+ ```
14
+
15
+ This is an editable suggestion, not proof the model will preserve framing. The website's recorded cup case has a known cropping limitation; inspect the [actual case notes](https://mindforgeai.app/h3-video-examples) before expecting identical results.
16
+
17
+ ## Generate and review
18
+
19
+ 1. Open the free text-to-video page. Fill **Describe your video**; do not upload a reference if you want a text-led shot.
20
+ 2. Choose **Video model**: MiniMax H3, or the separate PinkCherry H3 v1.5 community fine-tune.
21
+ 3. Choose **Aspect ratio**. Use 9:16 for a portrait draft or 16:9 for landscape.
22
+ 4. Choose **Video duration**. Begin with **About 5 seconds**; about 10 and 15 seconds are also offered. Frame rounding may change exact duration.
23
+ 5. Read the allowance and click **Generate free video** once. Wait for the page's status; do not interpret a long wait as successful completion.
24
+ 6. Play the finished clip and use **Open / download video**. Check continuous motion, cropping, accidental text and the full subject silhouette.
25
+
26
+ ## What is free here?
27
+
28
+ No sign-up, card or purchased credits are required for this dedicated entry. The allowance is three submissions per network per UTC day, fifty sitewide, shared with free photo-to-video and both video profiles. It is not an allowance for unlimited retries or a promise of three successful exports.
29
+
30
+ MiniMax H3's web preset produces silent SD footage at 24 fps: 896×512 landscape or 512×896 portrait in existing recorded files. The free form does not expose HD/2K or audio-reference controls. The current workflow adds no MindForgeAI branding overlay, but generated logo-like marks are still possible. Inspect the output.
31
+
32
+ The offline helper can compose a prompt and catch unsupported parameter values. It cannot generate a video or reserve free capacity. If you already have a source photo, switch to the [photo workflow](photo-to-video.md); for refusal, missing tasks or failed attempts, see [troubleshooting](troubleshooting.md).
@@ -0,0 +1,29 @@
1
+ # Troubleshoot a free attempt without submitting repeatedly
2
+
3
+ Use the dedicated [free video entry](https://mindforgeai.app/free-ai-video) or [H3 Image entry](https://mindforgeai.app/minimax-h3-image) and read its current status. This page explains the documented workflow; it is not a live service-health report.
4
+
5
+ ## The service is busy
6
+
7
+ The shared device admits one task at a time. A new request can be refused while it is busy. Try later rather than rapidly pressing Generate. There is no guaranteed completion time and no promise of unlimited queue space. This helper package cannot bypass or reserve capacity.
8
+
9
+ ## The daily allowance is exhausted
10
+
11
+ Each free video network allowance is shared across text/photo inputs and the available free video profiles. Visiting another tool page does not grant three more attempts. The separate image entry has its own image allowance, not general paid credits. Limits use the UTC date; the sitewide cap may also be reached. Follow the displayed message rather than creating additional accounts or attempting to evade restrictions.
12
+
13
+ ## A file or prompt is rejected
14
+
15
+ For video, enter 5–2000 characters and choose about 5, 10 or 15 seconds and 16:9 or 9:16. For a reference, choose PNG, JPEG or WebP up to 5 MB. The dedicated photo page requires a file; a filename alone is not an upload. The offline helper validates declared metadata only. It cannot confirm whether the file contents are a valid image or will pass the server's checks.
16
+
17
+ ## The task is slow or missing
18
+
19
+ Keep the task/status link private and follow the page's own status. A long wait is not proof that a file exists. A missing/lost task can indicate a backend interruption. Do not treat every network timeout as a safe opportunity to start a different request immediately; check the existing task first and follow any retry instructions.
20
+
21
+ ## The task completed, but the result is wrong
22
+
23
+ Play the whole clip or inspect the full image. Reject results that misrepresent faces, labels or product geometry. Try one subject and smaller movement next time. Free H3 video is silent SD; absence of audio or HD is an expected limit of this preset, not necessarily a processing error. Generated text or logo-like elements are possible even without a branding-overlay step.
24
+
25
+ ## A different tool asks for credits or sign-in
26
+
27
+ The main paid workspace and other models have separate conditions. Return to the dedicated free URL if you intended to use the limited free preview. Do not assume a free allowance pays for every model or grants commercial rights to any uploaded or generated content. Consult [product facts](https://mindforgeai.app/product-facts), [pricing](https://mindforgeai.app/pricing) and [terms](https://mindforgeai.app/terms-of-service).
28
+
29
+ Continue with [a first attempt](getting-started.md), [text prompts](text-to-video.md), [photo preparation](photo-to-video.md) or [still-image editing](h3-image.md).
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export interface Scene { subject: string; motion: string; setting?: string; camera?: string; style?: string }
2
+ export interface VideoOptions {
3
+ mode: 'text' | 'image'; prompt: string; duration: 5 | 10 | 15; ratio: '16:9' | '9:16';
4
+ image?: { mime: 'image/png' | 'image/jpeg' | 'image/webp'; bytes: number };
5
+ }
6
+ export type ValidationResult = { valid: true; value: VideoOptions } | { valid: false; errors: Array<{field:string;message:string}> };
7
+ export declare const videoProfile: Readonly<{ checkedOn: string; durations: readonly [5,10,15]; ratios: readonly ['16:9','9:16']; maxReferenceBytes: number; promptMinLength: number; promptMaxLength: number }>;
8
+ export declare function buildVideoPrompt(input: Scene): string;
9
+ export declare function validateVideoOptions(input: unknown): ValidationResult;
package/index.js ADDED
@@ -0,0 +1,60 @@
1
+ const allowed = (object, keys) => Object.keys(object).filter(key => !keys.includes(key));
2
+ const record = value => value !== null && typeof value === 'object' && !Array.isArray(value);
3
+ const imageTypes = ['image/png', 'image/jpeg', 'image/webp'];
4
+
5
+ /** Offline documentation snapshot; not a live entitlement or availability check. */
6
+ export const videoProfile = Object.freeze({
7
+ checkedOn: '2026-11-13',
8
+ durations: Object.freeze([5, 10, 15]),
9
+ ratios: Object.freeze(['16:9', '9:16']),
10
+ maxReferenceBytes: 5 * 1024 * 1024,
11
+ promptMinLength: 5,
12
+ promptMaxLength: 2000,
13
+ });
14
+
15
+ export function buildVideoPrompt(input) {
16
+ if (!record(input)) throw new TypeError('Provide a scene object.');
17
+ const keys = ['subject', 'setting', 'motion', 'camera', 'style'];
18
+ if (allowed(input, keys).length) throw new TypeError('Unknown scene field.');
19
+ for (const key of keys) {
20
+ if (input[key] !== undefined && (typeof input[key] !== 'string' || !input[key].trim()))
21
+ throw new TypeError(`${key} must be non-empty text.`);
22
+ }
23
+ if (!input.subject?.trim() || !input.motion?.trim())
24
+ throw new TypeError('subject and motion are required.');
25
+ const prompt = [input.subject, input.setting, input.motion, input.camera ?? 'Fixed camera', input.style]
26
+ .filter(value => value !== undefined).map(value => value.trim().replace(/[.!。]+$/u, '')).join('. ') + '.';
27
+ if (prompt.length < 5 || prompt.length > 2000)
28
+ throw new RangeError('The combined prompt must be 5–2000 characters.');
29
+ return prompt;
30
+ }
31
+
32
+ /** Checks declared parameters only; never reads, uploads or verifies image bytes. */
33
+ export function validateVideoOptions(input) {
34
+ const errors = [];
35
+ const add = (field, message) => errors.push({field, message});
36
+ if (!record(input)) return {valid:false, errors:[{field:'input', message:'Expected an object.'}]};
37
+ for (const key of allowed(input, ['mode', 'prompt', 'duration', 'ratio', 'image']))
38
+ add(key, 'Unknown field.');
39
+ const mode = input.mode === undefined ? 'text' : input.mode;
40
+ const duration = input.duration === undefined ? 5 : input.duration;
41
+ const ratio = input.ratio === undefined ? '16:9' : input.ratio;
42
+ if (!['text', 'image'].includes(mode)) add('mode', 'Choose text or image.');
43
+ if (!videoProfile.durations.includes(duration)) add('duration', 'Choose the number 5, 10 or 15.');
44
+ if (!videoProfile.ratios.includes(ratio)) add('ratio', 'Choose 16:9 or 9:16.');
45
+ if (typeof input.prompt !== 'string' || input.prompt.trim().length < 5 || input.prompt.length > 2000)
46
+ add('prompt', 'Enter 5–2000 characters of scene or movement text.');
47
+ if (mode === 'text' && input.image !== undefined) add('image', 'Text mode must not include image metadata.');
48
+ if (mode === 'image') {
49
+ if (!record(input.image)) add('image', 'Provide declared mime and bytes for one reference image.');
50
+ else {
51
+ for (const key of allowed(input.image, ['mime', 'bytes'])) add(`image.${key}`, 'Unknown image field.');
52
+ if (!imageTypes.includes(input.image.mime)) add('image.mime', 'Choose image/png, image/jpeg or image/webp.');
53
+ if (!Number.isSafeInteger(input.image.bytes) || input.image.bytes < 1 || input.image.bytes > videoProfile.maxReferenceBytes)
54
+ add('image.bytes', 'Expected an integer from 1 to 5242880 bytes.');
55
+ }
56
+ }
57
+ if (errors.length) return {valid:false, errors};
58
+ return {valid:true, value:{mode, prompt:input.prompt.trim(), duration, ratio,
59
+ ...(mode === 'image' ? {image:{mime:input.image.mime, bytes:input.image.bytes}} : {})}};
60
+ }
package/package.json CHANGED
@@ -1,6 +1,47 @@
1
1
  {
2
2
  "name": "mindforgeai-creator-tools",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Offline scene-prompt builder and input checks for documented MindForgeAI free video settings.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "homepage": "https://mindforgeai.app/",
8
+ "engines": {
9
+ "node": ">=20"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js"
15
+ }
16
+ },
17
+ "types": "./index.d.ts",
18
+ "bin": {
19
+ "mindforgeai-tools": "./bin/cli.js"
20
+ },
21
+ "files": [
22
+ "index.js",
23
+ "index.d.ts",
24
+ "bin/cli.js",
25
+ "guides/*.md",
26
+ "examples/*.json",
27
+ "examples/*.mjs",
28
+ "LICENSE"
29
+ ],
30
+ "scripts": {
31
+ "test": "node --test test/*.test.mjs"
32
+ },
33
+ "keywords": [
34
+ "video",
35
+ "prompt",
36
+ "validation",
37
+ "offline",
38
+ "mindforgeai"
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/cydiz/mindforgeai-creator-tools.git"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/cydiz/mindforgeai-creator-tools/issues"
46
+ }
47
+ }