@mindstudio-ai/agent 0.1.42 → 0.1.43
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 +11 -7
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +11 -7
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -3489,6 +3489,9 @@ function resolveStepType(name) {
|
|
|
3489
3489
|
return meta ? meta.stepType : name;
|
|
3490
3490
|
}
|
|
3491
3491
|
function resolveToken(provided, config) {
|
|
3492
|
+
const rctx = getRequestContext();
|
|
3493
|
+
if (rctx?.callbackToken)
|
|
3494
|
+
return { token: rctx.callbackToken, authType: "internal" };
|
|
3492
3495
|
if (process.env.CALLBACK_TOKEN)
|
|
3493
3496
|
return { token: process.env.CALLBACK_TOKEN, authType: "internal" };
|
|
3494
3497
|
if (provided) return { token: provided, authType: "apiKey" };
|
|
@@ -3592,7 +3595,8 @@ var init_client = __esm({
|
|
|
3592
3595
|
constructor(options = {}) {
|
|
3593
3596
|
const config = loadConfig();
|
|
3594
3597
|
const { token, authType } = resolveToken(options.apiKey, config);
|
|
3595
|
-
const
|
|
3598
|
+
const rctx = getRequestContext();
|
|
3599
|
+
const baseUrl = options.baseUrl ?? rctx?.remoteHostname ?? process.env.MINDSTUDIO_BASE_URL ?? process.env.REMOTE_HOSTNAME ?? config.baseUrl ?? DEFAULT_BASE_URL;
|
|
3596
3600
|
this._reuseThreadId = options.reuseThreadId ?? /^(true|1)$/i.test(process.env.MINDSTUDIO_REUSE_THREAD_ID ?? "");
|
|
3597
3601
|
this._appId = options.appId ?? process.env.MINDSTUDIO_APP_ID ?? void 0;
|
|
3598
3602
|
this._authType = authType;
|
|
@@ -5193,7 +5197,7 @@ async function startMcpServer(options) {
|
|
|
5193
5197
|
capabilities: { tools: {} },
|
|
5194
5198
|
serverInfo: {
|
|
5195
5199
|
name: "mindstudio-agent",
|
|
5196
|
-
version: "0.1.
|
|
5200
|
+
version: "0.1.43"
|
|
5197
5201
|
},
|
|
5198
5202
|
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.'
|
|
5199
5203
|
});
|
|
@@ -6054,7 +6058,7 @@ function isNewerVersion(current, latest) {
|
|
|
6054
6058
|
return false;
|
|
6055
6059
|
}
|
|
6056
6060
|
async function checkForUpdate() {
|
|
6057
|
-
const currentVersion = "0.1.
|
|
6061
|
+
const currentVersion = "0.1.43";
|
|
6058
6062
|
if (!currentVersion) return null;
|
|
6059
6063
|
try {
|
|
6060
6064
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -6083,7 +6087,7 @@ async function checkForUpdate() {
|
|
|
6083
6087
|
}
|
|
6084
6088
|
}
|
|
6085
6089
|
function printUpdateNotice(latestVersion) {
|
|
6086
|
-
const currentVersion = "0.1.
|
|
6090
|
+
const currentVersion = "0.1.43";
|
|
6087
6091
|
process.stderr.write(
|
|
6088
6092
|
`
|
|
6089
6093
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -6096,7 +6100,7 @@ function isStandaloneBinary() {
|
|
|
6096
6100
|
return !argv1.includes("node_modules");
|
|
6097
6101
|
}
|
|
6098
6102
|
async function cmdUpdate() {
|
|
6099
|
-
const currentVersion = "0.1.
|
|
6103
|
+
const currentVersion = "0.1.43";
|
|
6100
6104
|
process.stderr.write(
|
|
6101
6105
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
6102
6106
|
`
|
|
@@ -6211,7 +6215,7 @@ async function cmdLogin(options) {
|
|
|
6211
6215
|
process.stderr.write("\n");
|
|
6212
6216
|
printLogo();
|
|
6213
6217
|
process.stderr.write("\n");
|
|
6214
|
-
const ver = "0.1.
|
|
6218
|
+
const ver = "0.1.43";
|
|
6215
6219
|
process.stderr.write(
|
|
6216
6220
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
6217
6221
|
`
|
|
@@ -6522,7 +6526,7 @@ async function main() {
|
|
|
6522
6526
|
try {
|
|
6523
6527
|
if (command === "version" || command === "-v") {
|
|
6524
6528
|
process.stdout.write(
|
|
6525
|
-
"0.1.
|
|
6529
|
+
"0.1.43\n"
|
|
6526
6530
|
);
|
|
6527
6531
|
return;
|
|
6528
6532
|
}
|