@mindstudio-ai/agent 0.1.27 → 0.1.29
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 +22 -9
- package/dist/index.d.ts +6 -0
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +22 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3355,6 +3355,17 @@ var init_client = __esm({
|
|
|
3355
3355
|
_db;
|
|
3356
3356
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
3357
3357
|
_authType;
|
|
3358
|
+
/**
|
|
3359
|
+
* @internal Resolve the current auth token. For internal (CALLBACK_TOKEN)
|
|
3360
|
+
* auth, re-reads the env var each time so that long-lived singleton
|
|
3361
|
+
* instances pick up token rotations from the host process.
|
|
3362
|
+
*/
|
|
3363
|
+
get _token() {
|
|
3364
|
+
if (this._authType === "internal" && process.env.CALLBACK_TOKEN) {
|
|
3365
|
+
return process.env.CALLBACK_TOKEN;
|
|
3366
|
+
}
|
|
3367
|
+
return this._httpConfig.token;
|
|
3368
|
+
}
|
|
3358
3369
|
constructor(options = {}) {
|
|
3359
3370
|
const config = loadConfig();
|
|
3360
3371
|
const { token, authType } = resolveToken(options.apiKey, config);
|
|
@@ -3453,7 +3464,7 @@ var init_client = __esm({
|
|
|
3453
3464
|
res = await fetch(url, {
|
|
3454
3465
|
method: "POST",
|
|
3455
3466
|
headers: {
|
|
3456
|
-
Authorization: `Bearer ${this.
|
|
3467
|
+
Authorization: `Bearer ${this._token}`,
|
|
3457
3468
|
"Content-Type": "application/json",
|
|
3458
3469
|
"User-Agent": "@mindstudio-ai/agent",
|
|
3459
3470
|
Accept: "text/event-stream"
|
|
@@ -3874,7 +3885,7 @@ var init_client = __esm({
|
|
|
3874
3885
|
method: "POST",
|
|
3875
3886
|
headers: {
|
|
3876
3887
|
"Content-Type": "application/json",
|
|
3877
|
-
Authorization: this.
|
|
3888
|
+
Authorization: this._token
|
|
3878
3889
|
},
|
|
3879
3890
|
body: JSON.stringify(body)
|
|
3880
3891
|
});
|
|
@@ -4029,7 +4040,7 @@ var init_client = __esm({
|
|
|
4029
4040
|
method: "POST",
|
|
4030
4041
|
headers: {
|
|
4031
4042
|
"Content-Type": "application/json",
|
|
4032
|
-
Authorization: this.
|
|
4043
|
+
Authorization: this._token
|
|
4033
4044
|
},
|
|
4034
4045
|
body: JSON.stringify({ databaseId, queries })
|
|
4035
4046
|
});
|
|
@@ -4563,6 +4574,8 @@ async function buildSystemPrompt(agent) {
|
|
|
4563
4574
|
- **Popularity scores**: 1.0 = most used in its category, 0.5\u20130.9 = commonly used, 0.1\u20130.4 = niche, 0.0 = rarely used, null = new model with no data yet.
|
|
4564
4575
|
- **Prefer popular models as defaults** in code examples unless the caller has a reason to use something specific. A model with popularity 0.9 is a safer recommendation than one with 0.2.
|
|
4565
4576
|
- **Always recommend latest-generation models**: For Anthropic, this is Claude 4 family, GPT-5 for OpenAI, Gemini 3 for Google, etc. MindStudio supports a ton of different models, including legacy models - but they are there for niche uses or backward compatibility/existing user requirements - they should NOT be used for new projects.
|
|
4577
|
+
- Any image generation model that supports source images in its config supports "remixing" or "image editing". All flagship image models support image remixing and editing. Ignore the tags when recommending image models for editing - all of them support it, especially if their tags say things like "Source Image" etc.
|
|
4578
|
+
- For image generation/editing, prefer to recommend Seedream 4.5 or Google Gemini 3.1
|
|
4566
4579
|
</model_guidance>
|
|
4567
4580
|
|
|
4568
4581
|
<tools>
|
|
@@ -4807,7 +4820,7 @@ async function startMcpServer(options) {
|
|
|
4807
4820
|
capabilities: { tools: {} },
|
|
4808
4821
|
serverInfo: {
|
|
4809
4822
|
name: "mindstudio-agent",
|
|
4810
|
-
version: "0.1.
|
|
4823
|
+
version: "0.1.29"
|
|
4811
4824
|
},
|
|
4812
4825
|
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.'
|
|
4813
4826
|
});
|
|
@@ -5763,7 +5776,7 @@ function isNewerVersion(current, latest) {
|
|
|
5763
5776
|
return false;
|
|
5764
5777
|
}
|
|
5765
5778
|
async function checkForUpdate() {
|
|
5766
|
-
const currentVersion = "0.1.
|
|
5779
|
+
const currentVersion = "0.1.29";
|
|
5767
5780
|
if (!currentVersion) return null;
|
|
5768
5781
|
try {
|
|
5769
5782
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -5792,7 +5805,7 @@ async function checkForUpdate() {
|
|
|
5792
5805
|
}
|
|
5793
5806
|
}
|
|
5794
5807
|
function printUpdateNotice(latestVersion) {
|
|
5795
|
-
const currentVersion = "0.1.
|
|
5808
|
+
const currentVersion = "0.1.29";
|
|
5796
5809
|
process.stderr.write(
|
|
5797
5810
|
`
|
|
5798
5811
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -5805,7 +5818,7 @@ function isStandaloneBinary() {
|
|
|
5805
5818
|
return !argv1.includes("node_modules");
|
|
5806
5819
|
}
|
|
5807
5820
|
async function cmdUpdate() {
|
|
5808
|
-
const currentVersion = "0.1.
|
|
5821
|
+
const currentVersion = "0.1.29";
|
|
5809
5822
|
process.stderr.write(
|
|
5810
5823
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
5811
5824
|
`
|
|
@@ -5940,7 +5953,7 @@ async function cmdLogin(options) {
|
|
|
5940
5953
|
process.stderr.write("\n");
|
|
5941
5954
|
printLogo();
|
|
5942
5955
|
process.stderr.write("\n");
|
|
5943
|
-
const ver = "0.1.
|
|
5956
|
+
const ver = "0.1.29";
|
|
5944
5957
|
process.stderr.write(
|
|
5945
5958
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
5946
5959
|
`
|
|
@@ -6267,7 +6280,7 @@ async function main() {
|
|
|
6267
6280
|
try {
|
|
6268
6281
|
if (command === "version" || command === "-v") {
|
|
6269
6282
|
process.stdout.write(
|
|
6270
|
-
"0.1.
|
|
6283
|
+
"0.1.29\n"
|
|
6271
6284
|
);
|
|
6272
6285
|
return;
|
|
6273
6286
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1135,6 +1135,12 @@ declare class MindStudioAgent$1 {
|
|
|
1135
1135
|
private _db;
|
|
1136
1136
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
1137
1137
|
private _authType;
|
|
1138
|
+
/**
|
|
1139
|
+
* @internal Resolve the current auth token. For internal (CALLBACK_TOKEN)
|
|
1140
|
+
* auth, re-reads the env var each time so that long-lived singleton
|
|
1141
|
+
* instances pick up token rotations from the host process.
|
|
1142
|
+
*/
|
|
1143
|
+
private get _token();
|
|
1138
1144
|
constructor(options?: AgentOptions);
|
|
1139
1145
|
/**
|
|
1140
1146
|
* Execute any step by its type name. This is the low-level method that all
|
package/dist/index.js
CHANGED
|
@@ -2035,6 +2035,17 @@ var MindStudioAgent = class {
|
|
|
2035
2035
|
_db;
|
|
2036
2036
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
2037
2037
|
_authType;
|
|
2038
|
+
/**
|
|
2039
|
+
* @internal Resolve the current auth token. For internal (CALLBACK_TOKEN)
|
|
2040
|
+
* auth, re-reads the env var each time so that long-lived singleton
|
|
2041
|
+
* instances pick up token rotations from the host process.
|
|
2042
|
+
*/
|
|
2043
|
+
get _token() {
|
|
2044
|
+
if (this._authType === "internal" && process.env.CALLBACK_TOKEN) {
|
|
2045
|
+
return process.env.CALLBACK_TOKEN;
|
|
2046
|
+
}
|
|
2047
|
+
return this._httpConfig.token;
|
|
2048
|
+
}
|
|
2038
2049
|
constructor(options = {}) {
|
|
2039
2050
|
const config = loadConfig();
|
|
2040
2051
|
const { token, authType } = resolveToken(options.apiKey, config);
|
|
@@ -2133,7 +2144,7 @@ var MindStudioAgent = class {
|
|
|
2133
2144
|
res = await fetch(url, {
|
|
2134
2145
|
method: "POST",
|
|
2135
2146
|
headers: {
|
|
2136
|
-
Authorization: `Bearer ${this.
|
|
2147
|
+
Authorization: `Bearer ${this._token}`,
|
|
2137
2148
|
"Content-Type": "application/json",
|
|
2138
2149
|
"User-Agent": "@mindstudio-ai/agent",
|
|
2139
2150
|
Accept: "text/event-stream"
|
|
@@ -2554,7 +2565,7 @@ var MindStudioAgent = class {
|
|
|
2554
2565
|
method: "POST",
|
|
2555
2566
|
headers: {
|
|
2556
2567
|
"Content-Type": "application/json",
|
|
2557
|
-
Authorization: this.
|
|
2568
|
+
Authorization: this._token
|
|
2558
2569
|
},
|
|
2559
2570
|
body: JSON.stringify(body)
|
|
2560
2571
|
});
|
|
@@ -2709,7 +2720,7 @@ var MindStudioAgent = class {
|
|
|
2709
2720
|
method: "POST",
|
|
2710
2721
|
headers: {
|
|
2711
2722
|
"Content-Type": "application/json",
|
|
2712
|
-
Authorization: this.
|
|
2723
|
+
Authorization: this._token
|
|
2713
2724
|
},
|
|
2714
2725
|
body: JSON.stringify({ databaseId, queries })
|
|
2715
2726
|
});
|