@mindstudio-ai/agent 0.1.12 → 0.1.13
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 +6 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +6 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3082,13 +3082,13 @@ function sleep2(ms) {
|
|
|
3082
3082
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3083
3083
|
}
|
|
3084
3084
|
function resolveToken(provided, config) {
|
|
3085
|
+
if (process.env.CALLBACK_TOKEN)
|
|
3086
|
+
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
3085
3087
|
if (provided) return { token: provided, authType: "apiKey" };
|
|
3086
3088
|
if (process.env.MINDSTUDIO_API_KEY)
|
|
3087
3089
|
return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
|
|
3088
3090
|
if (config?.apiKey)
|
|
3089
3091
|
return { token: config.apiKey, authType: "apiKey" };
|
|
3090
|
-
if (process.env.CALLBACK_TOKEN)
|
|
3091
|
-
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
3092
3092
|
throw new MindStudioError(
|
|
3093
3093
|
"No API key provided. Run `mindstudio login`, pass `apiKey` to the constructor, or set the MINDSTUDIO_API_KEY environment variable.",
|
|
3094
3094
|
"missing_api_key",
|
|
@@ -3892,7 +3892,7 @@ async function startMcpServer(options) {
|
|
|
3892
3892
|
capabilities: { tools: {} },
|
|
3893
3893
|
serverInfo: {
|
|
3894
3894
|
name: "mindstudio-agent",
|
|
3895
|
-
version: "0.1.
|
|
3895
|
+
version: "0.1.13"
|
|
3896
3896
|
},
|
|
3897
3897
|
instructions: "Welcome to MindStudio \u2014 a platform with 200+ AI models, 850+ third-party integrations, and pre-built agents.\n\nGetting started:\n1. Call `listAgents` to verify your connection and see available agents.\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. This helps users identify your requests in their logs.\n4. 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."
|
|
3898
3898
|
});
|
|
@@ -4800,7 +4800,7 @@ function isNewerVersion(current, latest) {
|
|
|
4800
4800
|
return false;
|
|
4801
4801
|
}
|
|
4802
4802
|
async function checkForUpdate() {
|
|
4803
|
-
const currentVersion = "0.1.
|
|
4803
|
+
const currentVersion = "0.1.13";
|
|
4804
4804
|
if (!currentVersion) return null;
|
|
4805
4805
|
try {
|
|
4806
4806
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -4829,7 +4829,7 @@ async function checkForUpdate() {
|
|
|
4829
4829
|
}
|
|
4830
4830
|
}
|
|
4831
4831
|
function printUpdateNotice(latestVersion) {
|
|
4832
|
-
const currentVersion = "0.1.
|
|
4832
|
+
const currentVersion = "0.1.13";
|
|
4833
4833
|
process.stderr.write(
|
|
4834
4834
|
`
|
|
4835
4835
|
${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
|
|
@@ -4904,7 +4904,7 @@ async function cmdLogin(options) {
|
|
|
4904
4904
|
process.stderr.write("\n");
|
|
4905
4905
|
printLogo();
|
|
4906
4906
|
process.stderr.write("\n");
|
|
4907
|
-
const ver = "0.1.
|
|
4907
|
+
const ver = "0.1.13";
|
|
4908
4908
|
process.stderr.write(
|
|
4909
4909
|
` ${ansi.bold("MindStudio Agent")} ${ver ? " " + ansi.gray("v" + ver) : ""}
|
|
4910
4910
|
`
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ interface AgentOptions {
|
|
|
3
3
|
/**
|
|
4
4
|
* MindStudio API key. Used as a Bearer token for authentication.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Note: `CALLBACK_TOKEN` (auto-set inside MindStudio) always takes
|
|
7
|
+
* priority over all other auth sources when present.
|
|
8
|
+
*
|
|
9
|
+
* If omitted (and no CALLBACK_TOKEN), the SDK checks (in order):
|
|
7
10
|
* 1. `MINDSTUDIO_API_KEY` environment variable
|
|
8
11
|
* 2. `~/.mindstudio/config.json` (set via `mindstudio login`)
|
|
9
|
-
* 3. `CALLBACK_TOKEN` environment variable (auto-set inside MindStudio custom functions)
|
|
10
12
|
*/
|
|
11
13
|
apiKey?: string;
|
|
12
14
|
/**
|
|
@@ -924,10 +926,10 @@ interface Db {
|
|
|
924
926
|
* ```
|
|
925
927
|
*
|
|
926
928
|
* Authentication is resolved in order:
|
|
927
|
-
* 1. `
|
|
928
|
-
* 2. `
|
|
929
|
-
* 3.
|
|
930
|
-
* 4. `
|
|
929
|
+
* 1. `CALLBACK_TOKEN` environment variable (auto-set inside MindStudio — always takes priority)
|
|
930
|
+
* 2. `apiKey` passed to the constructor
|
|
931
|
+
* 3. `MINDSTUDIO_API_KEY` environment variable
|
|
932
|
+
* 4. `~/.mindstudio/config.json` (set via `mindstudio login`)
|
|
931
933
|
*
|
|
932
934
|
* Base URL is resolved in order:
|
|
933
935
|
* 1. `baseUrl` passed to the constructor
|
package/dist/index.js
CHANGED
|
@@ -2545,13 +2545,13 @@ function sleep2(ms) {
|
|
|
2545
2545
|
}
|
|
2546
2546
|
applyStepMethods(MindStudioAgent);
|
|
2547
2547
|
function resolveToken(provided, config) {
|
|
2548
|
+
if (process.env.CALLBACK_TOKEN)
|
|
2549
|
+
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
2548
2550
|
if (provided) return { token: provided, authType: "apiKey" };
|
|
2549
2551
|
if (process.env.MINDSTUDIO_API_KEY)
|
|
2550
2552
|
return { token: process.env.MINDSTUDIO_API_KEY, authType: "apiKey" };
|
|
2551
2553
|
if (config?.apiKey)
|
|
2552
2554
|
return { token: config.apiKey, authType: "apiKey" };
|
|
2553
|
-
if (process.env.CALLBACK_TOKEN)
|
|
2554
|
-
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
2555
2555
|
throw new MindStudioError(
|
|
2556
2556
|
"No API key provided. Run `mindstudio login`, pass `apiKey` to the constructor, or set the MINDSTUDIO_API_KEY environment variable.",
|
|
2557
2557
|
"missing_api_key",
|