@mindstudio-ai/agent 0.1.68 → 0.1.69

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.
@@ -5477,6 +5477,8 @@ function buildReferenceDocs(data) {
5477
5477
 
5478
5478
  Task agents: For multi-step tasks requiring autonomous tool use, use \`runTask()\`. Provide a prompt, input, SDK action names as tools (with optional default overrides), a \`structuredOutputExample\`, and a model. The platform runs a tool-use loop and returns structured output. Tools can include any SDK action \u2014 e.g. \`['searchGoogle', 'fetchUrl', { method: 'generateImage', defaults: { imageModelOverride: { model: 'seedream-4.5' } } }]\`. Supports SSE streaming via \`onEvent\` callback.
5479
5479
 
5480
+ Uploading files / getting a hosted URL: There are TWO ways to upload a file to the MindStudio CDN, depending on context. (1) From app backend code, call \`await mindstudio.uploadFile(bytes, { extension: 'png', type?: 'image/png' })\` \u2192 returns \`{ url }\` (a permanent public URL); \`bytes\` is a \`Buffer\`/\`Uint8Array\`, so read/fetch the content first. (2) From the terminal \u2014 e.g. you generated an icon or asset locally and just need its URL \u2014 run \`mindstudio upload <filepath>\` (alias: \`mindstudio upload-file\`). It prints the public URL to stdout. IMPORTANT: to host a one-off local file, use the CLI command directly \u2014 do NOT write a throwaway app method that calls \`uploadFile\` just to trigger it. The CLI does this in one step. More generally: some SDK capabilities are exposed as \`mindstudio\` CLI commands (upload, list-actions, run-agent, exec, batch, \u2026), not only as code \u2014 reach for the CLI for one-off operations instead of writing and running code.
5481
+
5480
5482
  Reporting bugs / ideas (\`reportIssue\`): For building an in-app "Report a bug" or feedback feature, use \`mindstudio.reportIssue({ title, body?, kind?, reporter? })\` (also importable directly as \`reportIssue\`). It files an issue into the app's issue tracker \u2014 visible to the app's team in the dashboard and pickup-able by the Remy agent. Backend only: wire it as frontend UI \u2192 app backend method \u2192 \`reportIssue\` (a browser can't call it; it uses the app's hook token, and the app id is derived server-side). \`kind\` is \`'bug'\` (default) or \`'idea'\`. \`reporter\` is a free-form display label (a name, email, or ticket id) \u2014 NOT an identity check and not tied to a user; pass the current user's email if you have it, or omit for anonymous. It returns the created issue \u2014 show \`result.number\` to confirm "Reported as #42". Rate limited per app (20/min): catch \`MindStudioError\` with \`code === 'rate_limited'\` and show a graceful "try again shortly" message, and debounce the submit button (every call creates a new issue \u2014 no dedupe).
5481
5483
 
5482
5484
  Table options: \`db.defineTable<T>(name, { unique, defaults })\`.
@@ -6065,7 +6067,7 @@ async function startMcpServer(options) {
6065
6067
  capabilities: { tools: {} },
6066
6068
  serverInfo: {
6067
6069
  name: "mindstudio-agent",
6068
- version: "0.1.68"
6070
+ version: "0.1.69"
6069
6071
  },
6070
6072
  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.'
6071
6073
  });
@@ -6941,7 +6943,7 @@ function isNewerVersion(current, latest) {
6941
6943
  return false;
6942
6944
  }
6943
6945
  async function checkForUpdate() {
6944
- const currentVersion = "0.1.68";
6946
+ const currentVersion = "0.1.69";
6945
6947
  if (!currentVersion) return null;
6946
6948
  try {
6947
6949
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -6970,7 +6972,7 @@ async function checkForUpdate() {
6970
6972
  }
6971
6973
  }
6972
6974
  function printUpdateNotice(latestVersion) {
6973
- const currentVersion = "0.1.68";
6975
+ const currentVersion = "0.1.69";
6974
6976
  process.stderr.write(
6975
6977
  `
6976
6978
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -6983,7 +6985,7 @@ function isStandaloneBinary() {
6983
6985
  return !argv1.includes("node_modules");
6984
6986
  }
6985
6987
  async function cmdUpdate() {
6986
- const currentVersion = "0.1.68";
6988
+ const currentVersion = "0.1.69";
6987
6989
  process.stderr.write(
6988
6990
  ` ${ansi2.gray("Current version:")} ${currentVersion}
6989
6991
  `
@@ -7098,7 +7100,7 @@ async function cmdLogin(options) {
7098
7100
  process.stderr.write("\n");
7099
7101
  printLogo();
7100
7102
  process.stderr.write("\n");
7101
- const ver = "0.1.68";
7103
+ const ver = "0.1.69";
7102
7104
  process.stderr.write(
7103
7105
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
7104
7106
  `
@@ -7409,7 +7411,7 @@ async function main() {
7409
7411
  try {
7410
7412
  if (command === "version" || command === "-v") {
7411
7413
  process.stdout.write(
7412
- "0.1.68\n"
7414
+ "0.1.69\n"
7413
7415
  );
7414
7416
  return;
7415
7417
  }
@@ -7599,20 +7601,22 @@ async function main() {
7599
7601
  });
7600
7602
  return;
7601
7603
  }
7602
- if (command === "upload") {
7604
+ if (command === "upload" || command === "upload-file") {
7603
7605
  const filePath = positionals[1];
7604
7606
  if (!filePath)
7605
7607
  usageBlock([
7606
- "upload \u2014 Upload a file to the MindStudio CDN",
7608
+ "upload \u2014 Upload a file to the MindStudio CDN (alias: upload-file)",
7607
7609
  "",
7608
7610
  "Usage:",
7609
7611
  " mindstudio upload <filepath>",
7610
7612
  "",
7611
7613
  "Returns the permanent public URL for the uploaded file.",
7614
+ "Use this to host a local file (e.g. a generated icon) and get a",
7615
+ "URL \u2014 no need to write or trigger an app method.",
7612
7616
  "",
7613
7617
  "Examples:",
7614
7618
  " mindstudio upload photo.png",
7615
- " mindstudio upload /path/to/document.pdf"
7619
+ " mindstudio upload-file /path/to/document.pdf"
7616
7620
  ]);
7617
7621
  await cmdUpload(filePath, {
7618
7622
  apiKey: values["api-key"],
@@ -7882,7 +7886,7 @@ Account:
7882
7886
  whoami Show current user and organization
7883
7887
  change-name <name> Update your display name
7884
7888
  change-profile-picture <url> Update your profile picture
7885
- upload <filepath> Upload a file to the MindStudio CDN
7889
+ upload <filepath> Upload a file to the CDN, print its URL (alias: upload-file)
7886
7890
  update Update to the latest version
7887
7891
 
7888
7892
  OAuth integrations:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.68",
3
+ "version": "0.1.69",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",