@mindstudio-ai/agent 0.1.144 → 0.1.145
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 -17
- package/dist/index.d.ts +10 -1
- package/dist/index.js +9 -10
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +22 -17
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -6740,7 +6740,7 @@ function resolveToken(provided, config) {
|
|
|
6740
6740
|
401
|
|
6741
6741
|
);
|
|
6742
6742
|
}
|
|
6743
|
-
var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, MindStudioAgent;
|
|
6743
|
+
var DEFAULT_BASE_URL, DEFAULT_MAX_RETRIES, toStepLogEvent, MindStudioAgent;
|
|
6744
6744
|
var init_client = __esm({
|
|
6745
6745
|
async "src/client.ts"() {
|
|
6746
6746
|
"use strict";
|
|
@@ -6764,6 +6764,13 @@ var init_client = __esm({
|
|
|
6764
6764
|
init_metadata();
|
|
6765
6765
|
DEFAULT_BASE_URL = "https://v1.mindstudio-api.com";
|
|
6766
6766
|
DEFAULT_MAX_RETRIES = 3;
|
|
6767
|
+
toStepLogEvent = (event) => ({
|
|
6768
|
+
value: event.value,
|
|
6769
|
+
tag: event.tag,
|
|
6770
|
+
ts: event.ts,
|
|
6771
|
+
...event.ephemeral === true ? { ephemeral: true } : {},
|
|
6772
|
+
...typeof event.progress === "number" ? { progress: event.progress } : {}
|
|
6773
|
+
});
|
|
6767
6774
|
MindStudioAgent = class {
|
|
6768
6775
|
/** @internal */
|
|
6769
6776
|
_httpConfig;
|
|
@@ -7077,11 +7084,7 @@ var init_client = __esm({
|
|
|
7077
7084
|
try {
|
|
7078
7085
|
const event = JSON.parse(line.slice(6));
|
|
7079
7086
|
if (event.type === "log") {
|
|
7080
|
-
options.onLog(
|
|
7081
|
-
value: event.value,
|
|
7082
|
-
tag: event.tag,
|
|
7083
|
-
ts: event.ts
|
|
7084
|
-
});
|
|
7087
|
+
options.onLog(toStepLogEvent(event));
|
|
7085
7088
|
} else if (event.type === "done") {
|
|
7086
7089
|
doneEvent = {
|
|
7087
7090
|
output: event.output,
|
|
@@ -7120,11 +7123,7 @@ var init_client = __esm({
|
|
|
7120
7123
|
500
|
|
7121
7124
|
);
|
|
7122
7125
|
} else if (event.type === "log") {
|
|
7123
|
-
options.onLog(
|
|
7124
|
-
value: event.value,
|
|
7125
|
-
tag: event.tag,
|
|
7126
|
-
ts: event.ts
|
|
7127
|
-
});
|
|
7126
|
+
options.onLog(toStepLogEvent(event));
|
|
7128
7127
|
}
|
|
7129
7128
|
} catch (err) {
|
|
7130
7129
|
if (err instanceof MindStudioError) {
|
|
@@ -9520,7 +9519,7 @@ async function startMcpServer(options) {
|
|
|
9520
9519
|
capabilities: { tools: {} },
|
|
9521
9520
|
serverInfo: {
|
|
9522
9521
|
name: "mindstudio-agent",
|
|
9523
|
-
version: "0.1.
|
|
9522
|
+
version: "0.1.145"
|
|
9524
9523
|
},
|
|
9525
9524
|
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, pass its public image URL to `changeProfilePicture`.\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.'
|
|
9526
9525
|
});
|
|
@@ -10193,6 +10192,9 @@ async function cmdExec(method, input, options) {
|
|
|
10193
10192
|
let onLog;
|
|
10194
10193
|
if (options.jsonLogs) {
|
|
10195
10194
|
onLog = (log) => {
|
|
10195
|
+
if (log.ephemeral) {
|
|
10196
|
+
return;
|
|
10197
|
+
}
|
|
10196
10198
|
process.stderr.write(
|
|
10197
10199
|
JSON.stringify({
|
|
10198
10200
|
type: "log",
|
|
@@ -10204,6 +10206,9 @@ async function cmdExec(method, input, options) {
|
|
|
10204
10206
|
};
|
|
10205
10207
|
} else if (process.stderr.isTTY) {
|
|
10206
10208
|
onLog = (log) => {
|
|
10209
|
+
if (log.ephemeral) {
|
|
10210
|
+
return;
|
|
10211
|
+
}
|
|
10207
10212
|
process.stderr.write(` ${ansi2.cyan("\u27E1")} ${ansi2.gray(log.value)}
|
|
10208
10213
|
`);
|
|
10209
10214
|
};
|
|
@@ -10435,7 +10440,7 @@ function isNewerVersion(current, latest) {
|
|
|
10435
10440
|
return false;
|
|
10436
10441
|
}
|
|
10437
10442
|
async function checkForUpdate() {
|
|
10438
|
-
const currentVersion = "0.1.
|
|
10443
|
+
const currentVersion = "0.1.145";
|
|
10439
10444
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10440
10445
|
return null;
|
|
10441
10446
|
}
|
|
@@ -10470,7 +10475,7 @@ async function checkForUpdate() {
|
|
|
10470
10475
|
}
|
|
10471
10476
|
}
|
|
10472
10477
|
function printUpdateNotice(latestVersion) {
|
|
10473
|
-
const currentVersion = "0.1.
|
|
10478
|
+
const currentVersion = "0.1.145";
|
|
10474
10479
|
process.stderr.write(
|
|
10475
10480
|
`
|
|
10476
10481
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -10483,7 +10488,7 @@ function isStandaloneBinary() {
|
|
|
10483
10488
|
return !argv1.includes("node_modules");
|
|
10484
10489
|
}
|
|
10485
10490
|
async function cmdUpdate() {
|
|
10486
|
-
const currentVersion = "0.1.
|
|
10491
|
+
const currentVersion = "0.1.145";
|
|
10487
10492
|
process.stderr.write(
|
|
10488
10493
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
10489
10494
|
`
|
|
@@ -10604,7 +10609,7 @@ async function cmdLogin(options) {
|
|
|
10604
10609
|
process.stderr.write("\n");
|
|
10605
10610
|
printLogo();
|
|
10606
10611
|
process.stderr.write("\n");
|
|
10607
|
-
const ver = "0.1.
|
|
10612
|
+
const ver = "0.1.145";
|
|
10608
10613
|
process.stderr.write(
|
|
10609
10614
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
10610
10615
|
`
|
|
@@ -10916,7 +10921,7 @@ async function main() {
|
|
|
10916
10921
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
10917
10922
|
try {
|
|
10918
10923
|
if (command === "version" || command === "-v") {
|
|
10919
|
-
process.stdout.write("0.1.
|
|
10924
|
+
process.stdout.write("0.1.145\n");
|
|
10920
10925
|
return;
|
|
10921
10926
|
}
|
|
10922
10927
|
if (command === "login") {
|