@mindstudio-ai/agent 0.1.32 → 0.1.34
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 +15 -10
- package/dist/index.js +1133 -1129
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +15 -10
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -3295,6 +3295,10 @@ __export(client_exports, {
|
|
|
3295
3295
|
function sleep2(ms) {
|
|
3296
3296
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3297
3297
|
}
|
|
3298
|
+
function resolveStepType(name) {
|
|
3299
|
+
const meta = stepMetadata[name];
|
|
3300
|
+
return meta ? meta.stepType : name;
|
|
3301
|
+
}
|
|
3298
3302
|
function resolveToken(provided, config) {
|
|
3299
3303
|
if (process.env.CALLBACK_TOKEN)
|
|
3300
3304
|
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
@@ -3320,6 +3324,7 @@ var init_client = __esm({
|
|
|
3320
3324
|
init_auth();
|
|
3321
3325
|
init_db();
|
|
3322
3326
|
init_steps();
|
|
3327
|
+
init_metadata();
|
|
3323
3328
|
DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
|
|
3324
3329
|
DEFAULT_MAX_RETRIES = 3;
|
|
3325
3330
|
MindStudioAgent = class {
|
|
@@ -3616,7 +3621,7 @@ var init_client = __esm({
|
|
|
3616
3621
|
async executeStepBatch(steps, options) {
|
|
3617
3622
|
const threadId = options?.threadId ?? (this._reuseThreadId ? this._threadId : void 0);
|
|
3618
3623
|
const { data } = await request(this._httpConfig, "POST", "/steps/execute-batch", {
|
|
3619
|
-
steps,
|
|
3624
|
+
steps: steps.map((s) => ({ ...s, stepType: resolveStepType(s.stepType) })),
|
|
3620
3625
|
...options?.appId != null && { appId: options.appId },
|
|
3621
3626
|
...threadId != null && { threadId }
|
|
3622
3627
|
});
|
|
@@ -3849,7 +3854,7 @@ var init_client = __esm({
|
|
|
3849
3854
|
/** Estimate the cost of executing an action before running it. */
|
|
3850
3855
|
async estimateStepCost(stepType, step, options) {
|
|
3851
3856
|
const { data } = await request(this._httpConfig, "POST", "/helpers/step-cost-estimate", {
|
|
3852
|
-
step: { type: stepType, ...step },
|
|
3857
|
+
step: { type: resolveStepType(stepType), ...step },
|
|
3853
3858
|
...options
|
|
3854
3859
|
});
|
|
3855
3860
|
return data;
|
|
@@ -4570,7 +4575,7 @@ var init_instructions = __esm({
|
|
|
4570
4575
|
- **Never rank vendors** or claim one provider is better than another. Popularity reflects usage patterns, not quality judgments. Present options with their model IDs and let the caller choose. Never make assumptions about the capabilities of models, or suggest that a certain model is "good" at a specific task or better/worse than another at a task.
|
|
4571
4576
|
- **Prefer popular models as defaults** in code examples unless the caller has a reason to use something specific.
|
|
4572
4577
|
- **Always recommend latest-generation models**: For Anthropic, this is Claude 4 family, GPT-5 for OpenAI, Gemini 3 for Google, etc. MindStudio supports a ton of different models, including legacy models - but they are there for niche uses or backward compatibility/existing user requirements - they should NOT be used for new projects.
|
|
4573
|
-
- Use the names of model input objects to infer capabilities. For example, any image generation model that supports source images in its config supports "remixing" or "image editing". Any video model with a start and end frame option supports creating "looping" videos.
|
|
4578
|
+
- Use the names of model input objects to infer capabilities. For example, any image generation model that supports source images in its config supports "remixing" or "image editing". Any video model with a start and end frame option supports creating "looping" videos. Do not look at model tags or descriptions to determine capabilities.
|
|
4574
4579
|
|
|
4575
4580
|
## Explicit preferences
|
|
4576
4581
|
MindStudio has hundreds of models. Many of them are for niche use cases. In general, prefer to recommend the following models unless the user specifies otherwise.
|
|
@@ -4578,7 +4583,7 @@ var init_instructions = __esm({
|
|
|
4578
4583
|
Text generation:
|
|
4579
4584
|
- Google Gemini, Anthropic Claude, OpenAI GPT
|
|
4580
4585
|
Image generation:
|
|
4581
|
-
- Seedream 4.5, Google Gemini 3.1 Flash Image (Nano Banana Pro)
|
|
4586
|
+
- Seedream 4.5, Google Gemini 3.1 Flash Image (Nano Banana Pro). Never recommend things like Flux 1 or other models that have been superseded by later generations from the same provider.
|
|
4582
4587
|
Video generation:
|
|
4583
4588
|
- Grok Imagine, Kling O3, Google Veo 3.1
|
|
4584
4589
|
Text to speech:
|
|
@@ -4880,7 +4885,7 @@ async function startMcpServer(options) {
|
|
|
4880
4885
|
capabilities: { tools: {} },
|
|
4881
4886
|
serverInfo: {
|
|
4882
4887
|
name: "mindstudio-agent",
|
|
4883
|
-
version: "0.1.
|
|
4888
|
+
version: "0.1.34"
|
|
4884
4889
|
},
|
|
4885
4890
|
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 or icon, call `uploadFile` to upload it, then `changeProfilePicture` with the returned URL.\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.'
|
|
4886
4891
|
});
|
|
@@ -5740,7 +5745,7 @@ function isNewerVersion(current, latest) {
|
|
|
5740
5745
|
return false;
|
|
5741
5746
|
}
|
|
5742
5747
|
async function checkForUpdate() {
|
|
5743
|
-
const currentVersion = "0.1.
|
|
5748
|
+
const currentVersion = "0.1.34";
|
|
5744
5749
|
if (!currentVersion) return null;
|
|
5745
5750
|
try {
|
|
5746
5751
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -5769,7 +5774,7 @@ async function checkForUpdate() {
|
|
|
5769
5774
|
}
|
|
5770
5775
|
}
|
|
5771
5776
|
function printUpdateNotice(latestVersion) {
|
|
5772
|
-
const currentVersion = "0.1.
|
|
5777
|
+
const currentVersion = "0.1.34";
|
|
5773
5778
|
process.stderr.write(
|
|
5774
5779
|
`
|
|
5775
5780
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -5782,7 +5787,7 @@ function isStandaloneBinary() {
|
|
|
5782
5787
|
return !argv1.includes("node_modules");
|
|
5783
5788
|
}
|
|
5784
5789
|
async function cmdUpdate() {
|
|
5785
|
-
const currentVersion = "0.1.
|
|
5790
|
+
const currentVersion = "0.1.34";
|
|
5786
5791
|
process.stderr.write(
|
|
5787
5792
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
5788
5793
|
`
|
|
@@ -5897,7 +5902,7 @@ async function cmdLogin(options) {
|
|
|
5897
5902
|
process.stderr.write("\n");
|
|
5898
5903
|
printLogo();
|
|
5899
5904
|
process.stderr.write("\n");
|
|
5900
|
-
const ver = "0.1.
|
|
5905
|
+
const ver = "0.1.34";
|
|
5901
5906
|
process.stderr.write(
|
|
5902
5907
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
5903
5908
|
`
|
|
@@ -6208,7 +6213,7 @@ async function main() {
|
|
|
6208
6213
|
try {
|
|
6209
6214
|
if (command === "version" || command === "-v") {
|
|
6210
6215
|
process.stdout.write(
|
|
6211
|
-
"0.1.
|
|
6216
|
+
"0.1.34\n"
|
|
6212
6217
|
);
|
|
6213
6218
|
return;
|
|
6214
6219
|
}
|