@mindstudio-ai/agent 0.1.23 → 0.1.24

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
@@ -4806,7 +4806,7 @@ async function startMcpServer(options) {
4806
4806
  capabilities: { tools: {} },
4807
4807
  serverInfo: {
4808
4808
  name: "mindstudio-agent",
4809
- version: "0.1.23"
4809
+ version: "0.1.24"
4810
4810
  },
4811
4811
  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.'
4812
4812
  });
@@ -5291,6 +5291,7 @@ Options:
5291
5291
  --thread-id <id> Thread ID for state persistence
5292
5292
  --output-key <key> Extract a single field from the result
5293
5293
  --no-meta Strip $-prefixed metadata from output
5294
+ --json-logs Stream debug logs as JSONL to stderr
5294
5295
  --workflow <name> Workflow to execute (run-agent only)
5295
5296
  --version <ver> App version, e.g. "draft" (run-agent only)
5296
5297
  --json Output as JSON
@@ -5504,15 +5505,25 @@ async function cmdExec(method, input, options) {
5504
5505
  `Unknown action: ${method}. Run 'mindstudio list-actions' to see available actions.`
5505
5506
  );
5506
5507
  }
5507
- const result = await agent.executeStep(meta.stepType, input, {
5508
- appId: options.appId,
5509
- threadId: options.threadId,
5510
- onLog: process.stderr.isTTY ? (log) => {
5508
+ let onLog;
5509
+ if (options.jsonLogs) {
5510
+ onLog = (log) => {
5511
+ process.stderr.write(
5512
+ JSON.stringify({ type: "log", value: log.value, tag: log.tag, ts: log.ts }) + "\n"
5513
+ );
5514
+ };
5515
+ } else if (process.stderr.isTTY) {
5516
+ onLog = (log) => {
5511
5517
  process.stderr.write(
5512
5518
  ` ${ansi2.cyan("\u27E1")} ${ansi2.gray(log.value)}
5513
5519
  `
5514
5520
  );
5515
- } : void 0
5521
+ };
5522
+ }
5523
+ const result = await agent.executeStep(meta.stepType, input, {
5524
+ appId: options.appId,
5525
+ threadId: options.threadId,
5526
+ onLog
5516
5527
  });
5517
5528
  if (options.outputKey) {
5518
5529
  const val = result[options.outputKey];
@@ -5747,7 +5758,7 @@ function isNewerVersion(current, latest) {
5747
5758
  return false;
5748
5759
  }
5749
5760
  async function checkForUpdate() {
5750
- const currentVersion = "0.1.23";
5761
+ const currentVersion = "0.1.24";
5751
5762
  if (!currentVersion) return null;
5752
5763
  try {
5753
5764
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -5776,7 +5787,7 @@ async function checkForUpdate() {
5776
5787
  }
5777
5788
  }
5778
5789
  function printUpdateNotice(latestVersion) {
5779
- const currentVersion = "0.1.23";
5790
+ const currentVersion = "0.1.24";
5780
5791
  process.stderr.write(
5781
5792
  `
5782
5793
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -5789,7 +5800,7 @@ function isStandaloneBinary() {
5789
5800
  return !argv1.includes("node_modules");
5790
5801
  }
5791
5802
  async function cmdUpdate() {
5792
- const currentVersion = "0.1.23";
5803
+ const currentVersion = "0.1.24";
5793
5804
  process.stderr.write(
5794
5805
  ` ${ansi2.gray("Current version:")} ${currentVersion}
5795
5806
  `
@@ -5924,7 +5935,7 @@ async function cmdLogin(options) {
5924
5935
  process.stderr.write("\n");
5925
5936
  printLogo();
5926
5937
  process.stderr.write("\n");
5927
- const ver = "0.1.23";
5938
+ const ver = "0.1.24";
5928
5939
  process.stderr.write(
5929
5940
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
5930
5941
  `
@@ -6205,6 +6216,7 @@ async function main() {
6205
6216
  "thread-id": { type: "string" },
6206
6217
  "output-key": { type: "string" },
6207
6218
  "no-meta": { type: "boolean", default: false },
6219
+ "json-logs": { type: "boolean", default: false },
6208
6220
  workflow: { type: "string" },
6209
6221
  version: { type: "string" },
6210
6222
  type: { type: "string" },
@@ -6237,7 +6249,7 @@ async function main() {
6237
6249
  try {
6238
6250
  if (command === "version" || command === "-v") {
6239
6251
  process.stdout.write(
6240
- "0.1.23\n"
6252
+ "0.1.24\n"
6241
6253
  );
6242
6254
  return;
6243
6255
  }
@@ -6658,7 +6670,8 @@ async function main() {
6658
6670
  appId: values["app-id"],
6659
6671
  threadId: values["thread-id"],
6660
6672
  outputKey: values["output-key"],
6661
- noMeta: values["no-meta"]
6673
+ noMeta: values["no-meta"],
6674
+ jsonLogs: values["json-logs"]
6662
6675
  });
6663
6676
  } catch (err) {
6664
6677
  const message = err instanceof Error ? err.message : String(err);