@mindstudio-ai/agent 0.1.169 → 0.1.170
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/CHANGELOG.md +6 -0
- package/dist/cli.js +22 -25
- package/dist/index.d.ts +8 -3
- package/dist/index.js +16 -19
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +22 -25
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -3887,7 +3887,7 @@ var init_table = __esm({
|
|
|
3887
3887
|
(item) => this._config.defaults ? { ...this._config.defaults, ...item } : item
|
|
3888
3888
|
);
|
|
3889
3889
|
const build = () => items.map((item) => {
|
|
3890
|
-
this.
|
|
3890
|
+
this._checkApiKeyWrite(item);
|
|
3891
3891
|
return buildInsert(
|
|
3892
3892
|
this._config.tableName,
|
|
3893
3893
|
item,
|
|
@@ -3919,7 +3919,7 @@ var init_table = __esm({
|
|
|
3919
3919
|
*/
|
|
3920
3920
|
update(id, data) {
|
|
3921
3921
|
const build = () => {
|
|
3922
|
-
this.
|
|
3922
|
+
this._checkApiKeyWrite(data);
|
|
3923
3923
|
return [
|
|
3924
3924
|
buildUpdate(this._config.tableName, id, data, this._config.columns)
|
|
3925
3925
|
];
|
|
@@ -4026,7 +4026,7 @@ var init_table = __esm({
|
|
|
4026
4026
|
}
|
|
4027
4027
|
}
|
|
4028
4028
|
const build = () => {
|
|
4029
|
-
this.
|
|
4029
|
+
this._checkApiKeyWrite(withDefaults);
|
|
4030
4030
|
return [
|
|
4031
4031
|
buildUpsert(
|
|
4032
4032
|
this._config.tableName,
|
|
@@ -4055,22 +4055,19 @@ var init_table = __esm({
|
|
|
4055
4055
|
// -------------------------------------------------------------------------
|
|
4056
4056
|
// Internal helpers
|
|
4057
4057
|
// -------------------------------------------------------------------------
|
|
4058
|
-
/**
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
400
|
|
4072
|
-
);
|
|
4073
|
-
}
|
|
4058
|
+
/**
|
|
4059
|
+
* @internal Throw if data writes the auth table's API key column, which holds
|
|
4060
|
+
* the masked key the platform issued. The other mapped columns are the app's
|
|
4061
|
+
* to write.
|
|
4062
|
+
*/
|
|
4063
|
+
_checkApiKeyWrite(data) {
|
|
4064
|
+
const column = this._config.managedColumns?.apiKey;
|
|
4065
|
+
if (column && Object.keys(data).includes(column)) {
|
|
4066
|
+
throw new MindStudioError(
|
|
4067
|
+
`Cannot write to "${column}" \u2014 this column is managed by auth. Use the auth API to issue or revoke a user's API key.`,
|
|
4068
|
+
"managed_column_write",
|
|
4069
|
+
400
|
|
4070
|
+
);
|
|
4074
4071
|
}
|
|
4075
4072
|
}
|
|
4076
4073
|
/**
|
|
@@ -9472,7 +9469,7 @@ async function startMcpServer(options) {
|
|
|
9472
9469
|
capabilities: { tools: {} },
|
|
9473
9470
|
serverInfo: {
|
|
9474
9471
|
name: "mindstudio-agent",
|
|
9475
|
-
version: "0.1.
|
|
9472
|
+
version: "0.1.170"
|
|
9476
9473
|
},
|
|
9477
9474
|
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.'
|
|
9478
9475
|
});
|
|
@@ -10414,7 +10411,7 @@ function isNewerVersion(current, latest) {
|
|
|
10414
10411
|
return false;
|
|
10415
10412
|
}
|
|
10416
10413
|
async function checkForUpdate() {
|
|
10417
|
-
const currentVersion = "0.1.
|
|
10414
|
+
const currentVersion = "0.1.170";
|
|
10418
10415
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10419
10416
|
return null;
|
|
10420
10417
|
}
|
|
@@ -10449,7 +10446,7 @@ async function checkForUpdate() {
|
|
|
10449
10446
|
}
|
|
10450
10447
|
}
|
|
10451
10448
|
function printUpdateNotice(latestVersion) {
|
|
10452
|
-
const currentVersion = "0.1.
|
|
10449
|
+
const currentVersion = "0.1.170";
|
|
10453
10450
|
process.stderr.write(
|
|
10454
10451
|
`
|
|
10455
10452
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -10462,7 +10459,7 @@ function isStandaloneBinary() {
|
|
|
10462
10459
|
return !argv1.includes("node_modules");
|
|
10463
10460
|
}
|
|
10464
10461
|
async function cmdUpdate() {
|
|
10465
|
-
const currentVersion = "0.1.
|
|
10462
|
+
const currentVersion = "0.1.170";
|
|
10466
10463
|
process.stderr.write(
|
|
10467
10464
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
10468
10465
|
`
|
|
@@ -10583,7 +10580,7 @@ async function cmdLogin(options) {
|
|
|
10583
10580
|
process.stderr.write("\n");
|
|
10584
10581
|
printLogo();
|
|
10585
10582
|
process.stderr.write("\n");
|
|
10586
|
-
const ver = "0.1.
|
|
10583
|
+
const ver = "0.1.170";
|
|
10587
10584
|
process.stderr.write(
|
|
10588
10585
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
10589
10586
|
`
|
|
@@ -10895,7 +10892,7 @@ async function main() {
|
|
|
10895
10892
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
10896
10893
|
try {
|
|
10897
10894
|
if (command === "version" || command === "-v") {
|
|
10898
|
-
process.stdout.write("0.1.
|
|
10895
|
+
process.stdout.write("0.1.170\n");
|
|
10899
10896
|
return;
|
|
10900
10897
|
}
|
|
10901
10898
|
if (command === "login") {
|