@mindstudio-ai/agent 0.1.157 → 0.1.158

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.
@@ -8937,6 +8937,8 @@ function buildReferenceDocs(data) {
8937
8937
 
8938
8938
  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).
8939
8939
 
8940
+ HTTP responses of the method's own (\`respond\`): A method normally returns data, which every caller gets and the API interface sends as JSON. A method whose answer is HTTP itself (TwiML for Twilio, a plain-text challenge echo for a webhook verification, a feed, a CSV, a redirect, a stored file) returns \`respond(...)\` (\`import { respond } from '@mindstudio-ai/agent'\`): \`respond({ status?, headers?, body? })\` (body a string or bytes, at most 5 MB), \`respond.text(body, { status?, headers? })\`, \`respond.json(value, { status?, headers? })\`, \`respond.redirect(url, status = 302)\`, \`respond.file(storedFile, { headers? })\`. Only the API and webhook interfaces send it; returned to any other caller (frontend method calls, MCP, agent/voice tools, crons, a streamed call) it's a method error \`http_response_not_sent\`, so keep such a method HTTP-only and wrap a shared function where the data is needed elsewhere. Headers are the app's except \`X-Remy-*\`, connection headers, \`Content-Length\` and platform cookies (\`__ms_*\`); a bad one fails as \`invalid_http_response\`. \`respond.file\` takes a store's \`put\`/\`get\`/\`list\` result and serves the file at the request's own URL straight from storage (any size, range requests work, missing \u2192 404). Failures are still thrown \`MindStudioError\`s.
8941
+
8940
8942
  Table options: \`db.defineTable<T>(name, { unique, defaults })\`.
8941
8943
  - \`unique: [['email'], ['userId', 'orgId']]\` \u2014 declares unique constraints (SDK communicates to platform, enables upsert).
8942
8944
  - \`defaults: { status: 'pending' }\` \u2014 client-side defaults applied in push() and upsert().
@@ -9547,7 +9549,7 @@ async function startMcpServer(options) {
9547
9549
  capabilities: { tools: {} },
9548
9550
  serverInfo: {
9549
9551
  name: "mindstudio-agent",
9550
- version: "0.1.157"
9552
+ version: "0.1.158"
9551
9553
  },
9552
9554
  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.'
9553
9555
  });
@@ -10468,7 +10470,7 @@ function isNewerVersion(current, latest) {
10468
10470
  return false;
10469
10471
  }
10470
10472
  async function checkForUpdate() {
10471
- const currentVersion = "0.1.157";
10473
+ const currentVersion = "0.1.158";
10472
10474
  if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
10473
10475
  return null;
10474
10476
  }
@@ -10503,7 +10505,7 @@ async function checkForUpdate() {
10503
10505
  }
10504
10506
  }
10505
10507
  function printUpdateNotice(latestVersion) {
10506
- const currentVersion = "0.1.157";
10508
+ const currentVersion = "0.1.158";
10507
10509
  process.stderr.write(
10508
10510
  `
10509
10511
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -10516,7 +10518,7 @@ function isStandaloneBinary() {
10516
10518
  return !argv1.includes("node_modules");
10517
10519
  }
10518
10520
  async function cmdUpdate() {
10519
- const currentVersion = "0.1.157";
10521
+ const currentVersion = "0.1.158";
10520
10522
  process.stderr.write(
10521
10523
  ` ${ansi2.gray("Current version:")} ${currentVersion}
10522
10524
  `
@@ -10637,7 +10639,7 @@ async function cmdLogin(options) {
10637
10639
  process.stderr.write("\n");
10638
10640
  printLogo();
10639
10641
  process.stderr.write("\n");
10640
- const ver = "0.1.157";
10642
+ const ver = "0.1.158";
10641
10643
  process.stderr.write(
10642
10644
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
10643
10645
  `
@@ -10949,7 +10951,7 @@ async function main() {
10949
10951
  const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
10950
10952
  try {
10951
10953
  if (command === "version" || command === "-v") {
10952
- process.stdout.write("0.1.157\n");
10954
+ process.stdout.write("0.1.158\n");
10953
10955
  return;
10954
10956
  }
10955
10957
  if (command === "login") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindstudio-ai/agent",
3
- "version": "0.1.157",
3
+ "version": "0.1.158",
4
4
  "description": "TypeScript SDK for MindStudio direct step execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",