@mindstudio-ai/agent 0.1.111 → 0.1.112

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
@@ -1807,7 +1807,7 @@ var init_auth = __esm({
1807
1807
  constructor(ctx) {
1808
1808
  this.userId = ctx.userId;
1809
1809
  this._roleAssignments = ctx.roleAssignments;
1810
- this.roles = ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
1810
+ this.roles = ctx.userId == null ? [] : ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
1811
1811
  }
1812
1812
  /**
1813
1813
  * Check if the current user has **any** of the given roles.
@@ -7674,6 +7674,11 @@ var init_client = __esm({
7674
7674
  * page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
7675
7675
  * array) to purge every snapshot for the app.
7676
7676
  *
7677
+ * `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
7678
+ * served on. If another app mounts this one under a path prefix, the copies
7679
+ * cached at that prefix are purged too — no need to know or pass the mount
7680
+ * path.
7681
+ *
7677
7682
  * Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
7678
7683
  * token. Backend / managed-context only.
7679
7684
  *
@@ -8685,7 +8690,7 @@ async function startMcpServer(options) {
8685
8690
  capabilities: { tools: {} },
8686
8691
  serverInfo: {
8687
8692
  name: "mindstudio-agent",
8688
- version: "0.1.111"
8693
+ version: "0.1.112"
8689
8694
  },
8690
8695
  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.'
8691
8696
  });
@@ -9670,7 +9675,7 @@ function isNewerVersion(current, latest) {
9670
9675
  return false;
9671
9676
  }
9672
9677
  async function checkForUpdate() {
9673
- const currentVersion = "0.1.111";
9678
+ const currentVersion = "0.1.112";
9674
9679
  if (!currentVersion) return null;
9675
9680
  try {
9676
9681
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -9699,7 +9704,7 @@ async function checkForUpdate() {
9699
9704
  }
9700
9705
  }
9701
9706
  function printUpdateNotice(latestVersion) {
9702
- const currentVersion = "0.1.111";
9707
+ const currentVersion = "0.1.112";
9703
9708
  process.stderr.write(
9704
9709
  `
9705
9710
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -9712,7 +9717,7 @@ function isStandaloneBinary() {
9712
9717
  return !argv1.includes("node_modules");
9713
9718
  }
9714
9719
  async function cmdUpdate() {
9715
- const currentVersion = "0.1.111";
9720
+ const currentVersion = "0.1.112";
9716
9721
  process.stderr.write(
9717
9722
  ` ${ansi2.gray("Current version:")} ${currentVersion}
9718
9723
  `
@@ -9847,7 +9852,7 @@ async function cmdLogin(options) {
9847
9852
  process.stderr.write("\n");
9848
9853
  printLogo();
9849
9854
  process.stderr.write("\n");
9850
- const ver = "0.1.111";
9855
+ const ver = "0.1.112";
9851
9856
  process.stderr.write(
9852
9857
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
9853
9858
  `
@@ -10174,7 +10179,7 @@ async function main() {
10174
10179
  try {
10175
10180
  if (command === "version" || command === "-v") {
10176
10181
  process.stdout.write(
10177
- "0.1.111\n"
10182
+ "0.1.112\n"
10178
10183
  );
10179
10184
  return;
10180
10185
  }
package/dist/index.d.ts CHANGED
@@ -4157,6 +4157,11 @@ declare class MindStudioAgent$1 {
4157
4157
  * page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
4158
4158
  * array) to purge every snapshot for the app.
4159
4159
  *
4160
+ * `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
4161
+ * served on. If another app mounts this one under a path prefix, the copies
4162
+ * cached at that prefix are purged too — no need to know or pass the mount
4163
+ * path.
4164
+ *
4160
4165
  * Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
4161
4166
  * token. Backend / managed-context only.
4162
4167
  *
@@ -11544,6 +11549,9 @@ declare const reportIssue: (input: ReportIssueInput) => Promise<ReportedIssue>;
11544
11549
  * on their next visit. Bound to the default singleton. Backend / managed-context
11545
11550
  * only. Omit `paths` (or pass an empty array) to purge every snapshot.
11546
11551
  *
11552
+ * Pass this app's own route paths; snapshots of those routes cached under
11553
+ * another app's mount prefix are purged along with them.
11554
+ *
11547
11555
  * @example
11548
11556
  * ```ts
11549
11557
  * import { prerender } from '@mindstudio-ai/agent';
package/dist/index.js CHANGED
@@ -478,7 +478,7 @@ var AuthContext = class {
478
478
  constructor(ctx) {
479
479
  this.userId = ctx.userId;
480
480
  this._roleAssignments = ctx.roleAssignments;
481
- this.roles = ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
481
+ this.roles = ctx.userId == null ? [] : ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
482
482
  }
483
483
  /**
484
484
  * Check if the current user has **any** of the given roles.
@@ -7398,6 +7398,11 @@ var MindStudioAgent = class {
7398
7398
  * page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
7399
7399
  * array) to purge every snapshot for the app.
7400
7400
  *
7401
+ * `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
7402
+ * served on. If another app mounts this one under a path prefix, the copies
7403
+ * cached at that prefix are purged too — no need to know or pass the mount
7404
+ * path.
7405
+ *
7401
7406
  * Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
7402
7407
  * token. Backend / managed-context only.
7403
7408
  *