@mindstudio-ai/agent 0.1.6 → 0.1.7

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 CHANGED
@@ -2274,7 +2274,7 @@ async function startMcpServer(options) {
2274
2274
  capabilities: { tools: {} },
2275
2275
  serverInfo: {
2276
2276
  name: "mindstudio-agent",
2277
- version: "0.1.6"
2277
+ version: "0.1.7"
2278
2278
  },
2279
2279
  instructions: "Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `listAgents` to verify your connection and see available agents.\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. This helps users identify your requests in their logs.\n4. 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."
2280
2280
  });
@@ -2327,8 +2327,11 @@ async function startMcpServer(options) {
2327
2327
  } else if (toolName === "listConnections") {
2328
2328
  result = await getAgent().listConnections();
2329
2329
  } else if (toolName === "estimateActionCost") {
2330
+ const meta = await getMetadata();
2331
+ const rawType = args.stepType;
2332
+ const resolved = meta[rawType]?.stepType ?? rawType;
2330
2333
  result = await getAgent().estimateStepCost(
2331
- args.stepType,
2334
+ resolved,
2332
2335
  args.step,
2333
2336
  {
2334
2337
  appId: args.appId,
@@ -3179,7 +3182,7 @@ function isNewerVersion(current, latest) {
3179
3182
  return false;
3180
3183
  }
3181
3184
  async function checkForUpdate() {
3182
- const currentVersion = "0.1.6";
3185
+ const currentVersion = "0.1.7";
3183
3186
  if (!currentVersion) return null;
3184
3187
  try {
3185
3188
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -3208,7 +3211,7 @@ async function checkForUpdate() {
3208
3211
  }
3209
3212
  }
3210
3213
  function printUpdateNotice(latestVersion) {
3211
- const currentVersion = "0.1.6";
3214
+ const currentVersion = "0.1.7";
3212
3215
  process.stderr.write(
3213
3216
  `
3214
3217
  ${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
@@ -3283,7 +3286,7 @@ async function cmdLogin(options) {
3283
3286
  process.stderr.write("\n");
3284
3287
  printLogo();
3285
3288
  process.stderr.write("\n");
3286
- const ver = "0.1.6";
3289
+ const ver = "0.1.7";
3287
3290
  process.stderr.write(
3288
3291
  ` ${ansi.bold("MindStudio Agent")} ${ver ? " " + ansi.gray("v" + ver) : ""}
3289
3292
  `
@@ -3823,6 +3826,10 @@ async function main() {
3823
3826
  "",
3824
3827
  'Tip: run "mindstudio list-actions" to see available actions.'
3825
3828
  ]);
3829
+ const allKeys2 = await getAllMethodKeys();
3830
+ const resolvedMethod = resolveMethodOrFail(stepMethod, allKeys2);
3831
+ const { stepMetadata: stepMetadata2 } = await Promise.resolve().then(() => (init_metadata(), metadata_exports));
3832
+ const meta = stepMetadata2[resolvedMethod];
3826
3833
  const costArgv = positionals.slice(2);
3827
3834
  let costInput;
3828
3835
  const firstArg = costArgv[0];
@@ -3835,7 +3842,7 @@ async function main() {
3835
3842
  } else {
3836
3843
  costInput = parseStepFlags(costArgv);
3837
3844
  }
3838
- await cmdEstimateStepCost(stepMethod, costInput, {
3845
+ await cmdEstimateStepCost(meta.stepType, costInput, {
3839
3846
  apiKey: values["api-key"],
3840
3847
  baseUrl: values["base-url"]
3841
3848
  });