@mindstudio-ai/agent 0.1.27 → 0.1.28
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 +20 -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 +20 -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
|
});
|
|
@@ -4807,7 +4818,7 @@ async function startMcpServer(options) {
|
|
|
4807
4818
|
capabilities: { tools: {} },
|
|
4808
4819
|
serverInfo: {
|
|
4809
4820
|
name: "mindstudio-agent",
|
|
4810
|
-
version: "0.1.
|
|
4821
|
+
version: "0.1.28"
|
|
4811
4822
|
},
|
|
4812
4823
|
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
4824
|
});
|
|
@@ -5763,7 +5774,7 @@ function isNewerVersion(current, latest) {
|
|
|
5763
5774
|
return false;
|
|
5764
5775
|
}
|
|
5765
5776
|
async function checkForUpdate() {
|
|
5766
|
-
const currentVersion = "0.1.
|
|
5777
|
+
const currentVersion = "0.1.28";
|
|
5767
5778
|
if (!currentVersion) return null;
|
|
5768
5779
|
try {
|
|
5769
5780
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -5792,7 +5803,7 @@ async function checkForUpdate() {
|
|
|
5792
5803
|
}
|
|
5793
5804
|
}
|
|
5794
5805
|
function printUpdateNotice(latestVersion) {
|
|
5795
|
-
const currentVersion = "0.1.
|
|
5806
|
+
const currentVersion = "0.1.28";
|
|
5796
5807
|
process.stderr.write(
|
|
5797
5808
|
`
|
|
5798
5809
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -5805,7 +5816,7 @@ function isStandaloneBinary() {
|
|
|
5805
5816
|
return !argv1.includes("node_modules");
|
|
5806
5817
|
}
|
|
5807
5818
|
async function cmdUpdate() {
|
|
5808
|
-
const currentVersion = "0.1.
|
|
5819
|
+
const currentVersion = "0.1.28";
|
|
5809
5820
|
process.stderr.write(
|
|
5810
5821
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
5811
5822
|
`
|
|
@@ -5940,7 +5951,7 @@ async function cmdLogin(options) {
|
|
|
5940
5951
|
process.stderr.write("\n");
|
|
5941
5952
|
printLogo();
|
|
5942
5953
|
process.stderr.write("\n");
|
|
5943
|
-
const ver = "0.1.
|
|
5954
|
+
const ver = "0.1.28";
|
|
5944
5955
|
process.stderr.write(
|
|
5945
5956
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
5946
5957
|
`
|
|
@@ -6267,7 +6278,7 @@ async function main() {
|
|
|
6267
6278
|
try {
|
|
6268
6279
|
if (command === "version" || command === "-v") {
|
|
6269
6280
|
process.stdout.write(
|
|
6270
|
-
"0.1.
|
|
6281
|
+
"0.1.28\n"
|
|
6271
6282
|
);
|
|
6272
6283
|
return;
|
|
6273
6284
|
}
|
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
|
});
|