@mindstudio-ai/agent 0.1.174 → 0.1.176
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/CHANGELOG.md +14 -0
- package/dist/cli.js +55 -12
- package/dist/index.d.ts +24 -1
- package/dist/index.js +41 -5
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +55 -12
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -825,7 +825,7 @@ var init_metadata = __esm({
|
|
|
825
825
|
"renderVideoFromHtmlComposition": {
|
|
826
826
|
stepType: "renderVideoFromHtmlComposition",
|
|
827
827
|
description: "Render an HTML composition (HTML, CSS, media and seekable animation on a timeline) to a video file",
|
|
828
|
-
usageNotes: "- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.
|
|
828
|
+
usageNotes: "- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.186, 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",
|
|
829
829
|
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)" } } },
|
|
830
830
|
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"] }
|
|
831
831
|
},
|
|
@@ -1368,6 +1368,26 @@ var init_context = __esm({
|
|
|
1368
1368
|
}
|
|
1369
1369
|
});
|
|
1370
1370
|
|
|
1371
|
+
// src/db/scanHints.ts
|
|
1372
|
+
function warnTableScans(scans) {
|
|
1373
|
+
if (!Array.isArray(scans)) {
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
for (const scan of scans) {
|
|
1377
|
+
if (typeof scan?.table !== "string" || typeof scan?.ms !== "number" || !Number.isFinite(scan.ms)) {
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
console.warn(
|
|
1381
|
+
`[mindstudio] A query read every row of '${scan.table}' (${Math.round(scan.ms)} ms). An index on the columns it filters or sorts by (defineTable's indexes) would make it a lookup.`
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
var init_scanHints = __esm({
|
|
1386
|
+
"src/db/scanHints.ts"() {
|
|
1387
|
+
"use strict";
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
|
|
1371
1391
|
// src/db-ws.ts
|
|
1372
1392
|
function isReadOnlySql(sql) {
|
|
1373
1393
|
const head = sql.trimStart().slice(0, 8).toUpperCase();
|
|
@@ -1435,6 +1455,7 @@ function deliver(self, msg) {
|
|
|
1435
1455
|
)
|
|
1436
1456
|
);
|
|
1437
1457
|
} else {
|
|
1458
|
+
warnTableScans(msg.scans);
|
|
1438
1459
|
p.resolve(msg.results);
|
|
1439
1460
|
}
|
|
1440
1461
|
}
|
|
@@ -1629,6 +1650,7 @@ var DB_WS_SUBPROTOCOL, WS_ACK_TIMEOUT_MS, WS_IDLE_TIMEOUT_MS, WS_OPEN_TIMEOUT_MS
|
|
|
1629
1650
|
var init_db_ws = __esm({
|
|
1630
1651
|
"src/db-ws.ts"() {
|
|
1631
1652
|
"use strict";
|
|
1653
|
+
init_scanHints();
|
|
1632
1654
|
init_errors();
|
|
1633
1655
|
DB_WS_SUBPROTOCOL = "ms-db-v2";
|
|
1634
1656
|
WS_ACK_TIMEOUT_MS = 2e4;
|
|
@@ -7589,7 +7611,7 @@ function resolveToken(provided, config) {
|
|
|
7589
7611
|
401
|
|
7590
7612
|
);
|
|
7591
7613
|
}
|
|
7592
|
-
var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, toStepLogEvent, stepFailure, MindStudioAgent;
|
|
7614
|
+
var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, FILES_RATE_LIMIT_WAIT_MS, toStepLogEvent, stepFailure, MindStudioAgent;
|
|
7593
7615
|
var init_client = __esm({
|
|
7594
7616
|
async "src/client.ts"() {
|
|
7595
7617
|
"use strict";
|
|
@@ -7604,6 +7626,7 @@ var init_client = __esm({
|
|
|
7604
7626
|
init_sql();
|
|
7605
7627
|
init_time();
|
|
7606
7628
|
init_readBatching();
|
|
7629
|
+
init_scanHints();
|
|
7607
7630
|
init_files();
|
|
7608
7631
|
init_datasources();
|
|
7609
7632
|
init_voice();
|
|
@@ -7616,6 +7639,7 @@ var init_client = __esm({
|
|
|
7616
7639
|
init_metadata();
|
|
7617
7640
|
DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
|
|
7618
7641
|
DEFAULT_MAX_RETRIES = 3;
|
|
7642
|
+
FILES_RATE_LIMIT_WAIT_MS = 75e3;
|
|
7619
7643
|
toStepLogEvent = (event) => ({
|
|
7620
7644
|
value: event.value,
|
|
7621
7645
|
tag: event.tag,
|
|
@@ -8879,12 +8903,30 @@ var init_client = __esm({
|
|
|
8879
8903
|
/**
|
|
8880
8904
|
* @internal Transport for the `files` namespace — POST /_internal/v2/files/<op>
|
|
8881
8905
|
* with the raw hook token (mirrors `_executeDbBatch`).
|
|
8906
|
+
*
|
|
8907
|
+
* Waits out the platform's per-app limit on file calls: its 429 comes before
|
|
8908
|
+
* the call does anything, whatever the op, so the call is sent again every
|
|
8909
|
+
* few seconds for a little over the limit's one-minute window, and only then
|
|
8910
|
+
* throws `rate_limited`. An app moving files flat out runs at the limit
|
|
8911
|
+
* rather than failing past it.
|
|
8882
8912
|
*/
|
|
8883
8913
|
async _filesRequest(op, body) {
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8914
|
+
const giveUpAt = Date.now() + FILES_RATE_LIMIT_WAIT_MS;
|
|
8915
|
+
while (true) {
|
|
8916
|
+
try {
|
|
8917
|
+
return await this._brokeredRequest("files", op, body, {
|
|
8918
|
+
fallbackMessage: "File operation failed",
|
|
8919
|
+
fallbackCode: "file_error"
|
|
8920
|
+
});
|
|
8921
|
+
} catch (err) {
|
|
8922
|
+
if (!(err instanceof MindStudioError) || err.status !== 429 || Date.now() >= giveUpAt) {
|
|
8923
|
+
throw err;
|
|
8924
|
+
}
|
|
8925
|
+
await new Promise(
|
|
8926
|
+
(resolve) => setTimeout(resolve, 4e3 + Math.random() * 2e3)
|
|
8927
|
+
);
|
|
8928
|
+
}
|
|
8929
|
+
}
|
|
8888
8930
|
}
|
|
8889
8931
|
/**
|
|
8890
8932
|
* @internal Transport for the `dataSources` namespace —
|
|
@@ -9084,6 +9126,7 @@ var init_client = __esm({
|
|
|
9084
9126
|
throw new MindStudioError(`[db] ${message}`, code, res.status);
|
|
9085
9127
|
}
|
|
9086
9128
|
const data = await res.json();
|
|
9129
|
+
warnTableScans(data.scans);
|
|
9087
9130
|
return data.results;
|
|
9088
9131
|
}
|
|
9089
9132
|
/**
|
|
@@ -10043,7 +10086,7 @@ async function startMcpServer(options) {
|
|
|
10043
10086
|
capabilities: { tools: {} },
|
|
10044
10087
|
serverInfo: {
|
|
10045
10088
|
name: "mindstudio-agent",
|
|
10046
|
-
version: "0.1.
|
|
10089
|
+
version: "0.1.176"
|
|
10047
10090
|
},
|
|
10048
10091
|
instructions: 'Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `ask` with any question about the SDK \u2014 it knows every action, model, and connector and returns working code with real model IDs and config options. Examples: ask("generate an image with FLUX"), ask("what models support vision?"), ask("how do I send a Slack message?").\n2. Call `changeName` to set your display name \u2014 use your name or whatever your user calls you. This is how you\'ll appear in MindStudio request logs.\n3. If you have a profile picture, pass its public image URL to `changeProfilePicture`.\n4. For manual browsing, call `listActions` to discover all available actions.\n\nThen use the tools to generate text, images, video, audio, search the web, work with data sources, run agents, and more.\n\nImportant:\n- AI-powered actions (text generation, image generation, video, audio, etc.) cost money. Before running these, call `estimateActionCost` and confirm with the user before proceeding \u2014 unless they\'ve explicitly told you to go ahead.\n- Not all agents from `listAgents` are configured for API use. Do not try to run an agent just because it appears in the list \u2014 it will likely fail. Only run agents the user specifically asks you to run.'
|
|
10049
10092
|
});
|
|
@@ -10985,7 +11028,7 @@ function isNewerVersion(current, latest) {
|
|
|
10985
11028
|
return false;
|
|
10986
11029
|
}
|
|
10987
11030
|
async function checkForUpdate() {
|
|
10988
|
-
const currentVersion = "0.1.
|
|
11031
|
+
const currentVersion = "0.1.176";
|
|
10989
11032
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10990
11033
|
return null;
|
|
10991
11034
|
}
|
|
@@ -11020,7 +11063,7 @@ async function checkForUpdate() {
|
|
|
11020
11063
|
}
|
|
11021
11064
|
}
|
|
11022
11065
|
function printUpdateNotice(latestVersion) {
|
|
11023
|
-
const currentVersion = "0.1.
|
|
11066
|
+
const currentVersion = "0.1.176";
|
|
11024
11067
|
process.stderr.write(
|
|
11025
11068
|
`
|
|
11026
11069
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -11033,7 +11076,7 @@ function isStandaloneBinary() {
|
|
|
11033
11076
|
return !argv1.includes("node_modules");
|
|
11034
11077
|
}
|
|
11035
11078
|
async function cmdUpdate() {
|
|
11036
|
-
const currentVersion = "0.1.
|
|
11079
|
+
const currentVersion = "0.1.176";
|
|
11037
11080
|
process.stderr.write(
|
|
11038
11081
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
11039
11082
|
`
|
|
@@ -11154,7 +11197,7 @@ async function cmdLogin(options) {
|
|
|
11154
11197
|
process.stderr.write("\n");
|
|
11155
11198
|
printLogo();
|
|
11156
11199
|
process.stderr.write("\n");
|
|
11157
|
-
const ver = "0.1.
|
|
11200
|
+
const ver = "0.1.176";
|
|
11158
11201
|
process.stderr.write(
|
|
11159
11202
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
11160
11203
|
`
|
|
@@ -11466,7 +11509,7 @@ async function main() {
|
|
|
11466
11509
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
11467
11510
|
try {
|
|
11468
11511
|
if (command === "version" || command === "-v") {
|
|
11469
|
-
process.stdout.write("0.1.
|
|
11512
|
+
process.stdout.write("0.1.176\n");
|
|
11470
11513
|
return;
|
|
11471
11514
|
}
|
|
11472
11515
|
if (command === "login") {
|
package/llms.txt
CHANGED
|
@@ -723,7 +723,7 @@ Remove the background from an image using AI, producing a transparent PNG.
|
|
|
723
723
|
|
|
724
724
|
#### renderVideoFromHtmlComposition
|
|
725
725
|
Render an HTML composition (HTML, CSS, media and seekable animation on a timeline) to a video file
|
|
726
|
-
- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.
|
|
726
|
+
- Renders an HTML composition in HyperFrames' format (https://hyperframes.heygen.com) with HyperFrames 0.8.186, in Chrome off the app's own sandbox; author for that version
|
|
727
727
|
- 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
|
|
728
728
|
- `variables` overrides the composition's `data-composition-variables` defaults, which it reads with `window.__hyperframes.getVariables()`
|
|
729
729
|
- 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
|