@mindstudio-ai/agent 0.1.168 → 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 +12 -0
- package/dist/cli.js +29 -27
- package/dist/index.d.ts +10 -4
- package/dist/index.js +16 -19
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +29 -27
- package/package.json +2 -2
package/dist/postinstall.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __esm = (fn, res) => function __init() {
|
|
5
|
-
|
|
4
|
+
var __esm = (fn, res, err) => function __init() {
|
|
5
|
+
if (err) throw err[0];
|
|
6
|
+
try {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw err = [e], e;
|
|
10
|
+
}
|
|
6
11
|
};
|
|
7
12
|
var __export = (target, all) => {
|
|
8
13
|
for (var name in all)
|
|
@@ -3882,7 +3887,7 @@ var init_table = __esm({
|
|
|
3882
3887
|
(item) => this._config.defaults ? { ...this._config.defaults, ...item } : item
|
|
3883
3888
|
);
|
|
3884
3889
|
const build = () => items.map((item) => {
|
|
3885
|
-
this.
|
|
3890
|
+
this._checkApiKeyWrite(item);
|
|
3886
3891
|
return buildInsert(
|
|
3887
3892
|
this._config.tableName,
|
|
3888
3893
|
item,
|
|
@@ -3914,7 +3919,7 @@ var init_table = __esm({
|
|
|
3914
3919
|
*/
|
|
3915
3920
|
update(id, data) {
|
|
3916
3921
|
const build = () => {
|
|
3917
|
-
this.
|
|
3922
|
+
this._checkApiKeyWrite(data);
|
|
3918
3923
|
return [
|
|
3919
3924
|
buildUpdate(this._config.tableName, id, data, this._config.columns)
|
|
3920
3925
|
];
|
|
@@ -4021,7 +4026,7 @@ var init_table = __esm({
|
|
|
4021
4026
|
}
|
|
4022
4027
|
}
|
|
4023
4028
|
const build = () => {
|
|
4024
|
-
this.
|
|
4029
|
+
this._checkApiKeyWrite(withDefaults);
|
|
4025
4030
|
return [
|
|
4026
4031
|
buildUpsert(
|
|
4027
4032
|
this._config.tableName,
|
|
@@ -4050,22 +4055,19 @@ var init_table = __esm({
|
|
|
4050
4055
|
// -------------------------------------------------------------------------
|
|
4051
4056
|
// Internal helpers
|
|
4052
4057
|
// -------------------------------------------------------------------------
|
|
4053
|
-
/**
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
const
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
400
|
|
4067
|
-
);
|
|
4068
|
-
}
|
|
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
|
+
);
|
|
4069
4071
|
}
|
|
4070
4072
|
}
|
|
4071
4073
|
/**
|
|
@@ -9467,7 +9469,7 @@ async function startMcpServer(options) {
|
|
|
9467
9469
|
capabilities: { tools: {} },
|
|
9468
9470
|
serverInfo: {
|
|
9469
9471
|
name: "mindstudio-agent",
|
|
9470
|
-
version: "0.1.
|
|
9472
|
+
version: "0.1.170"
|
|
9471
9473
|
},
|
|
9472
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.'
|
|
9473
9475
|
});
|
|
@@ -10409,7 +10411,7 @@ function isNewerVersion(current, latest) {
|
|
|
10409
10411
|
return false;
|
|
10410
10412
|
}
|
|
10411
10413
|
async function checkForUpdate() {
|
|
10412
|
-
const currentVersion = "0.1.
|
|
10414
|
+
const currentVersion = "0.1.170";
|
|
10413
10415
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10414
10416
|
return null;
|
|
10415
10417
|
}
|
|
@@ -10444,7 +10446,7 @@ async function checkForUpdate() {
|
|
|
10444
10446
|
}
|
|
10445
10447
|
}
|
|
10446
10448
|
function printUpdateNotice(latestVersion) {
|
|
10447
|
-
const currentVersion = "0.1.
|
|
10449
|
+
const currentVersion = "0.1.170";
|
|
10448
10450
|
process.stderr.write(
|
|
10449
10451
|
`
|
|
10450
10452
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -10457,7 +10459,7 @@ function isStandaloneBinary() {
|
|
|
10457
10459
|
return !argv1.includes("node_modules");
|
|
10458
10460
|
}
|
|
10459
10461
|
async function cmdUpdate() {
|
|
10460
|
-
const currentVersion = "0.1.
|
|
10462
|
+
const currentVersion = "0.1.170";
|
|
10461
10463
|
process.stderr.write(
|
|
10462
10464
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
10463
10465
|
`
|
|
@@ -10578,7 +10580,7 @@ async function cmdLogin(options) {
|
|
|
10578
10580
|
process.stderr.write("\n");
|
|
10579
10581
|
printLogo();
|
|
10580
10582
|
process.stderr.write("\n");
|
|
10581
|
-
const ver = "0.1.
|
|
10583
|
+
const ver = "0.1.170";
|
|
10582
10584
|
process.stderr.write(
|
|
10583
10585
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
10584
10586
|
`
|
|
@@ -10890,7 +10892,7 @@ async function main() {
|
|
|
10890
10892
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
10891
10893
|
try {
|
|
10892
10894
|
if (command === "version" || command === "-v") {
|
|
10893
|
-
process.stdout.write("0.1.
|
|
10895
|
+
process.stdout.write("0.1.170\n");
|
|
10894
10896
|
return;
|
|
10895
10897
|
}
|
|
10896
10898
|
if (command === "login") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindstudio-ai/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.170",
|
|
4
4
|
"description": "TypeScript SDK for MindStudio direct step execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
70
70
|
"esbuild": "^0.28.2",
|
|
71
71
|
"fast-check": "^4.10.2",
|
|
72
|
-
"tsup": "^
|
|
72
|
+
"tsup": "^9",
|
|
73
73
|
"tsx": "^4.23.15",
|
|
74
74
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
75
75
|
"vitest": "^5.0.3"
|