@mindstudio-ai/agent 0.1.147 → 0.1.148
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/dist/cli.js +21 -26
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -18
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +21 -26
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10877,7 +10877,7 @@ interface StepMethods {
|
|
|
10877
10877
|
* - `variables` overrides the composition's `data-composition-variables` defaults, which it reads with `window.__hyperframes.getVariables()`
|
|
10878
10878
|
* - Whatever the composition loads itself (fonts, scripts, images, video) is fetched as it renders, so each is in the project or at a public URL; a private app file needs a signed URL
|
|
10879
10879
|
* - fps 24, 30 or 60 (default 30); quality draft, standard or high (default standard); format mp4 (default), webm or mov (both keep transparency), or gif
|
|
10880
|
-
* -
|
|
10880
|
+
* - An mp4, webm or mov renders in chunks of about 10 seconds side by side, so a long video takes little longer than a short one; a call finishes within about 30 minutes, and reports its progress as it goes. A gif renders whole, within 15 minutes
|
|
10881
10881
|
* - A composition HyperFrames can't render fails with HyperFrames' own reason
|
|
10882
10882
|
*
|
|
10883
10883
|
* @example
|
package/dist/index.js
CHANGED
|
@@ -4856,7 +4856,7 @@ var stepMetadata = {
|
|
|
4856
4856
|
"renderVideoFromHtmlComposition": {
|
|
4857
4857
|
stepType: "renderVideoFromHtmlComposition",
|
|
4858
4858
|
description: "Render an HTML composition (HTML, CSS, media and seekable animation on a timeline) to a video file",
|
|
4859
|
-
usageNotes: "- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.97, in Chrome off the app's own sandbox; author for that version\n- Pass the composition as `html`, the page itself (up to 10 MB), or as `project`, the URL of a zip of a project's folder (`index.html` at its root, or the file `entryFile` names) or of one HTML file, up to 2 GiB: an app file or any public URL\n- `variables` overrides the composition's `data-composition-variables` defaults, which it reads with `window.__hyperframes.getVariables()`\n- Whatever the composition loads itself (fonts, scripts, images, video) is fetched as it renders, so each is in the project or at a public URL; a private app file needs a signed URL\n- fps 24, 30 or 60 (default 30); quality draft, standard or high (default standard); format mp4 (default), webm or mov (both keep transparency), or gif\n-
|
|
4859
|
+
usageNotes: "- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.97, in Chrome off the app's own sandbox; author for that version\n- Pass the composition as `html`, the page itself (up to 10 MB), or as `project`, the URL of a zip of a project's folder (`index.html` at its root, or the file `entryFile` names) or of one HTML file, up to 2 GiB: an app file or any public URL\n- `variables` overrides the composition's `data-composition-variables` defaults, which it reads with `window.__hyperframes.getVariables()`\n- Whatever the composition loads itself (fonts, scripts, images, video) is fetched as it renders, so each is in the project or at a public URL; a private app file needs a signed URL\n- fps 24, 30 or 60 (default 30); quality draft, standard or high (default standard); format mp4 (default), webm or mov (both keep transparency), or gif\n- An mp4, webm or mov renders in chunks of about 10 seconds side by side, so a long video takes little longer than a short one; a call finishes within about 30 minutes, and reports its progress as it goes. A gif renders whole, within 15 minutes\n- A composition HyperFrames can't render fails with HyperFrames' own reason",
|
|
4860
4860
|
inputSchema: { "type": "object", "properties": { "html": { "type": "string", "description": "The composition's HTML, up to 10 MB; give this or project" }, "project": { "type": "string", "description": "URL of a zip of the project's folder, or of one self-contained HTML file; give this or html" }, "entryFile": { "type": "string", "description": "The entry HTML inside the zip, relative to its root; index.html when omitted" }, "variables": { "type": "object", "properties": {}, "required": [], "description": "Values over the composition's declared variables" }, "fps": { "enum": [24, 30, 60], "type": "number", "description": "Frames per second: 24, 30 (default) or 60" }, "quality": { "enum": ["draft", "standard", "high"], "type": "string", "description": "Encode quality: draft, standard (default) or high" }, "format": { "enum": ["mp4", "webm", "mov", "gif"], "type": "string", "description": "mp4 (default), webm or mov (both keep transparency), or gif" }, "intermediateAsset": { "type": "boolean", "description": "When true, the asset is created but hidden from the user's gallery (tagged as intermediate)" } } },
|
|
4861
4861
|
outputSchema: { "type": "object", "properties": { "videoUrl": { "type": "string", "description": "URL of the rendered video" }, "durationSec": { "type": "number", "description": "Its length in seconds" }, "frames": { "type": "number", "description": "How many frames it has" } }, "required": ["videoUrl", "durationSec", "frames"] }
|
|
4862
4862
|
},
|
|
@@ -6495,6 +6495,12 @@ var toStepLogEvent = (event) => ({
|
|
|
6495
6495
|
...event.ephemeral === true ? { ephemeral: true } : {},
|
|
6496
6496
|
...typeof event.progress === "number" ? { progress: event.progress } : {}
|
|
6497
6497
|
});
|
|
6498
|
+
var stepFailure = (stepType, failure) => new MindStudioError(
|
|
6499
|
+
`[${stepType}] ${typeof failure.error === "string" && failure.error || "Step execution failed."}`,
|
|
6500
|
+
errorCodeFrom(failure, "step_error"),
|
|
6501
|
+
typeof failure.code === "number" ? failure.code : 500,
|
|
6502
|
+
failure
|
|
6503
|
+
);
|
|
6498
6504
|
var MindStudioAgent = class {
|
|
6499
6505
|
/** @internal */
|
|
6500
6506
|
_httpConfig;
|
|
@@ -6685,11 +6691,7 @@ var MindStudioAgent = class {
|
|
|
6685
6691
|
continue;
|
|
6686
6692
|
}
|
|
6687
6693
|
if (poll.status === "error") {
|
|
6688
|
-
throw
|
|
6689
|
-
`[${stepType}] ${poll.error ?? "Step execution failed."}`,
|
|
6690
|
-
"step_error",
|
|
6691
|
-
500
|
|
6692
|
-
);
|
|
6694
|
+
throw stepFailure(stepType, poll);
|
|
6693
6695
|
}
|
|
6694
6696
|
let output;
|
|
6695
6697
|
if (poll.output != null) {
|
|
@@ -6817,11 +6819,7 @@ var MindStudioAgent = class {
|
|
|
6817
6819
|
billingEvents: event.billingEvents
|
|
6818
6820
|
};
|
|
6819
6821
|
} else if (event.type === "error") {
|
|
6820
|
-
throw
|
|
6821
|
-
`[${stepType}] ${event.error || "Step execution failed"}`,
|
|
6822
|
-
"step_error",
|
|
6823
|
-
500
|
|
6824
|
-
);
|
|
6822
|
+
throw stepFailure(stepType, event);
|
|
6825
6823
|
}
|
|
6826
6824
|
} catch (err) {
|
|
6827
6825
|
if (err instanceof MindStudioError) {
|
|
@@ -6841,11 +6839,7 @@ var MindStudioAgent = class {
|
|
|
6841
6839
|
billingEvents: event.billingEvents
|
|
6842
6840
|
};
|
|
6843
6841
|
} else if (event.type === "error") {
|
|
6844
|
-
throw
|
|
6845
|
-
event.error || "Step execution failed",
|
|
6846
|
-
"step_error",
|
|
6847
|
-
500
|
|
6848
|
-
);
|
|
6842
|
+
throw stepFailure(stepType, event);
|
|
6849
6843
|
} else if (event.type === "log") {
|
|
6850
6844
|
options.onLog(toStepLogEvent(event));
|
|
6851
6845
|
}
|
|
@@ -6975,8 +6969,9 @@ var MindStudioAgent = class {
|
|
|
6975
6969
|
if (poll.status === "error") {
|
|
6976
6970
|
throw new MindStudioError(
|
|
6977
6971
|
poll.error ?? "Batch execution failed.",
|
|
6978
|
-
"batch_execution_error",
|
|
6979
|
-
500
|
|
6972
|
+
errorCodeFrom(poll, "batch_execution_error"),
|
|
6973
|
+
typeof poll.code === "number" ? poll.code : 500,
|
|
6974
|
+
poll
|
|
6980
6975
|
);
|
|
6981
6976
|
}
|
|
6982
6977
|
const results = await Promise.all(
|