@mindstudio-ai/agent 0.1.79 → 0.1.80
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 +16 -9
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +16 -9
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -4118,6 +4118,9 @@ var init_client = __esm({
|
|
|
4118
4118
|
_db;
|
|
4119
4119
|
/** @internal Auth type — 'internal' for CALLBACK_TOKEN (managed mode), 'apiKey' otherwise. */
|
|
4120
4120
|
_authType;
|
|
4121
|
+
/** @internal Usage source sent on step executions (from MINDSTUDIO_REQUEST_SOURCE).
|
|
4122
|
+
* Only set for api-key (CLI) auth so in-app/managed runtime is unaffected. */
|
|
4123
|
+
_requestSource;
|
|
4121
4124
|
/**
|
|
4122
4125
|
* @internal Resolve the current auth token. Checks ALS request context
|
|
4123
4126
|
* first, then CALLBACK_TOKEN env var, then static config token.
|
|
@@ -4173,6 +4176,7 @@ var init_client = __esm({
|
|
|
4173
4176
|
this._reuseThreadId = options.reuseThreadId ?? /^(true|1)$/i.test(process.env.MINDSTUDIO_REUSE_THREAD_ID ?? "");
|
|
4174
4177
|
this._appId = options.appId ?? process.env.MINDSTUDIO_APP_ID ?? void 0;
|
|
4175
4178
|
this._authType = authType;
|
|
4179
|
+
this._requestSource = authType === "apiKey" ? process.env.MINDSTUDIO_REQUEST_SOURCE || void 0 : void 0;
|
|
4176
4180
|
this._httpConfig = {
|
|
4177
4181
|
baseUrl,
|
|
4178
4182
|
token,
|
|
@@ -4206,7 +4210,8 @@ var init_client = __esm({
|
|
|
4206
4210
|
step,
|
|
4207
4211
|
...options?.appId != null && { appId: options.appId },
|
|
4208
4212
|
...threadId != null && { threadId },
|
|
4209
|
-
...this._currentStreamId != null && { streamId: this._currentStreamId }
|
|
4213
|
+
...this._currentStreamId != null && { streamId: this._currentStreamId },
|
|
4214
|
+
...this._requestSource != null && { requestSource: this._requestSource }
|
|
4210
4215
|
});
|
|
4211
4216
|
const remaining = headers.get("x-ratelimit-remaining");
|
|
4212
4217
|
const returnedThreadId = asyncData.threadId ?? "";
|
|
@@ -4289,7 +4294,8 @@ var init_client = __esm({
|
|
|
4289
4294
|
step,
|
|
4290
4295
|
...options.appId != null && { appId: options.appId },
|
|
4291
4296
|
...threadId != null && { threadId },
|
|
4292
|
-
...this._currentStreamId != null && { streamId: this._currentStreamId }
|
|
4297
|
+
...this._currentStreamId != null && { streamId: this._currentStreamId },
|
|
4298
|
+
...this._requestSource != null && { requestSource: this._requestSource }
|
|
4293
4299
|
};
|
|
4294
4300
|
await this._httpConfig.rateLimiter.acquire();
|
|
4295
4301
|
let res;
|
|
@@ -4475,7 +4481,8 @@ var init_client = __esm({
|
|
|
4475
4481
|
stepType: resolveStepType2(s.stepType)
|
|
4476
4482
|
})),
|
|
4477
4483
|
...options?.appId != null && { appId: options.appId },
|
|
4478
|
-
...threadId != null && { threadId }
|
|
4484
|
+
...threadId != null && { threadId },
|
|
4485
|
+
...this._requestSource != null && { requestSource: this._requestSource }
|
|
4479
4486
|
});
|
|
4480
4487
|
const pollUrl = `${this._currentHttpConfig.baseUrl}/developer/v2/steps/execute-batch-async/poll/${asyncData.batchToken}`;
|
|
4481
4488
|
let pollDelay = 300;
|
|
@@ -6224,7 +6231,7 @@ async function startMcpServer(options) {
|
|
|
6224
6231
|
capabilities: { tools: {} },
|
|
6225
6232
|
serverInfo: {
|
|
6226
6233
|
name: "mindstudio-agent",
|
|
6227
|
-
version: "0.1.
|
|
6234
|
+
version: "0.1.80"
|
|
6228
6235
|
},
|
|
6229
6236
|
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.'
|
|
6230
6237
|
});
|
|
@@ -7100,7 +7107,7 @@ function isNewerVersion(current, latest) {
|
|
|
7100
7107
|
return false;
|
|
7101
7108
|
}
|
|
7102
7109
|
async function checkForUpdate() {
|
|
7103
|
-
const currentVersion = "0.1.
|
|
7110
|
+
const currentVersion = "0.1.80";
|
|
7104
7111
|
if (!currentVersion) return null;
|
|
7105
7112
|
try {
|
|
7106
7113
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -7129,7 +7136,7 @@ async function checkForUpdate() {
|
|
|
7129
7136
|
}
|
|
7130
7137
|
}
|
|
7131
7138
|
function printUpdateNotice(latestVersion) {
|
|
7132
|
-
const currentVersion = "0.1.
|
|
7139
|
+
const currentVersion = "0.1.80";
|
|
7133
7140
|
process.stderr.write(
|
|
7134
7141
|
`
|
|
7135
7142
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -7142,7 +7149,7 @@ function isStandaloneBinary() {
|
|
|
7142
7149
|
return !argv1.includes("node_modules");
|
|
7143
7150
|
}
|
|
7144
7151
|
async function cmdUpdate() {
|
|
7145
|
-
const currentVersion = "0.1.
|
|
7152
|
+
const currentVersion = "0.1.80";
|
|
7146
7153
|
process.stderr.write(
|
|
7147
7154
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
7148
7155
|
`
|
|
@@ -7257,7 +7264,7 @@ async function cmdLogin(options) {
|
|
|
7257
7264
|
process.stderr.write("\n");
|
|
7258
7265
|
printLogo();
|
|
7259
7266
|
process.stderr.write("\n");
|
|
7260
|
-
const ver = "0.1.
|
|
7267
|
+
const ver = "0.1.80";
|
|
7261
7268
|
process.stderr.write(
|
|
7262
7269
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
7263
7270
|
`
|
|
@@ -7568,7 +7575,7 @@ async function main() {
|
|
|
7568
7575
|
try {
|
|
7569
7576
|
if (command === "version" || command === "-v") {
|
|
7570
7577
|
process.stdout.write(
|
|
7571
|
-
"0.1.
|
|
7578
|
+
"0.1.80\n"
|
|
7572
7579
|
);
|
|
7573
7580
|
return;
|
|
7574
7581
|
}
|