@mindstudio-ai/agent 0.1.144 → 0.1.145

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
@@ -6740,7 +6740,7 @@ function resolveToken(provided, config) {
6740
6740
  401
6741
6741
  );
6742
6742
  }
6743
- var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, MindStudioAgent;
6743
+ var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, toStepLogEvent, MindStudioAgent;
6744
6744
  var init_client = __esm({
6745
6745
  async "src/client.ts"() {
6746
6746
  "use strict";
@@ -6764,6 +6764,13 @@ var init_client = __esm({
6764
6764
  init_metadata();
6765
6765
  DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
6766
6766
  DEFAULT_MAX_RETRIES = 3;
6767
+ toStepLogEvent = (event) => ({
6768
+ value: event.value,
6769
+ tag: event.tag,
6770
+ ts: event.ts,
6771
+ ...event.ephemeral === true ? { ephemeral: true } : {},
6772
+ ...typeof event.progress === "number" ? { progress: event.progress } : {}
6773
+ });
6767
6774
  MindStudioAgent = class {
6768
6775
  /** @internal */
6769
6776
  _httpConfig;
@@ -7077,11 +7084,7 @@ var init_client = __esm({
7077
7084
  try {
7078
7085
  const event = JSON.parse(line.slice(6));
7079
7086
  if (event.type === "log") {
7080
- options.onLog({
7081
- value: event.value,
7082
- tag: event.tag,
7083
- ts: event.ts
7084
- });
7087
+ options.onLog(toStepLogEvent(event));
7085
7088
  } else if (event.type === "done") {
7086
7089
  doneEvent = {
7087
7090
  output: event.output,
@@ -7120,11 +7123,7 @@ var init_client = __esm({
7120
7123
  500
7121
7124
  );
7122
7125
  } else if (event.type === "log") {
7123
- options.onLog({
7124
- value: event.value,
7125
- tag: event.tag,
7126
- ts: event.ts
7127
- });
7126
+ options.onLog(toStepLogEvent(event));
7128
7127
  }
7129
7128
  } catch (err) {
7130
7129
  if (err instanceof MindStudioError) {
@@ -9520,7 +9519,7 @@ async function startMcpServer(options) {
9520
9519
  capabilities: { tools: {} },
9521
9520
  serverInfo: {
9522
9521
  name: "mindstudio-agent",
9523
- version: "0.1.144"
9522
+ version: "0.1.145"
9524
9523
  },
9525
9524
  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.'
9526
9525
  });
@@ -10263,6 +10262,9 @@ async function cmdExec(method, input, options) {
10263
10262
  let onLog;
10264
10263
  if (options.jsonLogs) {
10265
10264
  onLog = (log) => {
10265
+ if (log.ephemeral) {
10266
+ return;
10267
+ }
10266
10268
  process.stderr.write(
10267
10269
  JSON.stringify({
10268
10270
  type: "log",
@@ -10274,6 +10276,9 @@ async function cmdExec(method, input, options) {
10274
10276
  };
10275
10277
  } else if (process.stderr.isTTY) {
10276
10278
  onLog = (log) => {
10279
+ if (log.ephemeral) {
10280
+ return;
10281
+ }
10277
10282
  process.stderr.write(` ${ansi2.cyan("\u27E1")} ${ansi2.gray(log.value)}
10278
10283
  `);
10279
10284
  };
@@ -10532,7 +10537,7 @@ function isNewerVersion(current, latest) {
10532
10537
  return false;
10533
10538
  }
10534
10539
  async function checkForUpdate() {
10535
- const currentVersion = "0.1.144";
10540
+ const currentVersion = "0.1.145";
10536
10541
  if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
10537
10542
  return null;
10538
10543
  }
@@ -10567,7 +10572,7 @@ async function checkForUpdate() {
10567
10572
  }
10568
10573
  }
10569
10574
  function printUpdateNotice(latestVersion) {
10570
- const currentVersion = "0.1.144";
10575
+ const currentVersion = "0.1.145";
10571
10576
  process.stderr.write(
10572
10577
  `
10573
10578
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -10580,7 +10585,7 @@ function isStandaloneBinary() {
10580
10585
  return !argv1.includes("node_modules");
10581
10586
  }
10582
10587
  async function cmdUpdate() {
10583
- const currentVersion = "0.1.144";
10588
+ const currentVersion = "0.1.145";
10584
10589
  process.stderr.write(
10585
10590
  ` ${ansi2.gray("Current version:")} ${currentVersion}
10586
10591
  `
@@ -10721,7 +10726,7 @@ async function cmdLogin(options) {
10721
10726
  process.stderr.write("\n");
10722
10727
  printLogo();
10723
10728
  process.stderr.write("\n");
10724
- const ver = "0.1.144";
10729
+ const ver = "0.1.145";
10725
10730
  process.stderr.write(
10726
10731
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
10727
10732
  `
@@ -11049,7 +11054,7 @@ async function main() {
11049
11054
  const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
11050
11055
  try {
11051
11056
  if (command === "version" || command === "-v") {
11052
- process.stdout.write("0.1.144\n");
11057
+ process.stdout.write("0.1.145\n");
11053
11058
  return;
11054
11059
  }
11055
11060
  if (command === "login") {
package/dist/index.d.ts CHANGED
@@ -303,6 +303,13 @@ interface StepLogEvent {
303
303
  tag: string;
304
304
  /** Unix timestamp in milliseconds. */
305
305
  ts: number;
306
+ /**
307
+ * A passing status the next one replaces (how far a render or a model's
308
+ * queue is), rather than a line worth keeping.
309
+ */
310
+ ephemeral?: boolean;
311
+ /** How far the action is, 0 to 1, on a passing status, when it knows. */
312
+ progress?: number;
306
313
  }
307
314
  /** Options for a single step execution call. */
308
315
  interface StepExecutionOptions {
@@ -325,7 +332,9 @@ interface StepExecutionOptions {
325
332
  *
326
333
  * Log content and frequency varies by step type — image generation emits
327
334
  * 2-3 logs, scrape steps emit per-URL progress, LLM steps may emit model
328
- * selection and token info.
335
+ * selection and token info. A passing status is flagged `ephemeral`, and
336
+ * carries `progress` (0 to 1) when the action knows how far it is: a
337
+ * render's or a media job's.
329
338
  */
330
339
  onLog?: (event: StepLogEvent) => void;
331
340
  /**
package/dist/index.js CHANGED
@@ -6478,6 +6478,13 @@ function applyStepMethods(AgentClass) {
6478
6478
  // src/client.ts
6479
6479
  var DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
6480
6480
  var DEFAULT_MAX_RETRIES = 3;
6481
+ var toStepLogEvent = (event) => ({
6482
+ value: event.value,
6483
+ tag: event.tag,
6484
+ ts: event.ts,
6485
+ ...event.ephemeral === true ? { ephemeral: true } : {},
6486
+ ...typeof event.progress === "number" ? { progress: event.progress } : {}
6487
+ });
6481
6488
  var MindStudioAgent = class {
6482
6489
  /** @internal */
6483
6490
  _httpConfig;
@@ -6791,11 +6798,7 @@ var MindStudioAgent = class {
6791
6798
  try {
6792
6799
  const event = JSON.parse(line.slice(6));
6793
6800
  if (event.type === "log") {
6794
- options.onLog({
6795
- value: event.value,
6796
- tag: event.tag,
6797
- ts: event.ts
6798
- });
6801
+ options.onLog(toStepLogEvent(event));
6799
6802
  } else if (event.type === "done") {
6800
6803
  doneEvent = {
6801
6804
  output: event.output,
@@ -6834,11 +6837,7 @@ var MindStudioAgent = class {
6834
6837
  500
6835
6838
  );
6836
6839
  } else if (event.type === "log") {
6837
- options.onLog({
6838
- value: event.value,
6839
- tag: event.tag,
6840
- ts: event.ts
6841
- });
6840
+ options.onLog(toStepLogEvent(event));
6842
6841
  }
6843
6842
  } catch (err) {
6844
6843
  if (err instanceof MindStudioError) {