@mindstudio-ai/agent 0.1.33 → 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 +13 -8
- package/dist/index.js +1133 -1129
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +13 -8
- 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;
|
|
@@ -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
|
}
|