@mindstudio-ai/agent 0.1.49 → 0.1.50
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 +27 -9
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +27 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
5
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
6
|
+
}) : x)(function(x) {
|
|
7
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
8
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
9
|
+
});
|
|
4
10
|
var __esm = (fn, res) => function __init() {
|
|
5
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
12
|
};
|
|
@@ -1287,15 +1293,27 @@ var init_http = __esm({
|
|
|
1287
1293
|
});
|
|
1288
1294
|
|
|
1289
1295
|
// src/context.ts
|
|
1290
|
-
|
|
1296
|
+
function getAls() {
|
|
1297
|
+
if (!als) {
|
|
1298
|
+
try {
|
|
1299
|
+
const { AsyncLocalStorage } = __require("async_hooks");
|
|
1300
|
+
als = new AsyncLocalStorage();
|
|
1301
|
+
} catch {
|
|
1302
|
+
als = {
|
|
1303
|
+
getStore: () => void 0,
|
|
1304
|
+
run: (_store, fn) => fn()
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
return als;
|
|
1309
|
+
}
|
|
1291
1310
|
function getRequestContext() {
|
|
1292
|
-
return
|
|
1311
|
+
return getAls().getStore();
|
|
1293
1312
|
}
|
|
1294
1313
|
var als;
|
|
1295
1314
|
var init_context = __esm({
|
|
1296
1315
|
"src/context.ts"() {
|
|
1297
1316
|
"use strict";
|
|
1298
|
-
als = new AsyncLocalStorage();
|
|
1299
1317
|
}
|
|
1300
1318
|
});
|
|
1301
1319
|
|
|
@@ -5559,7 +5577,7 @@ async function startMcpServer(options) {
|
|
|
5559
5577
|
capabilities: { tools: {} },
|
|
5560
5578
|
serverInfo: {
|
|
5561
5579
|
name: "mindstudio-agent",
|
|
5562
|
-
version: "0.1.
|
|
5580
|
+
version: "0.1.50"
|
|
5563
5581
|
},
|
|
5564
5582
|
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.'
|
|
5565
5583
|
});
|
|
@@ -6516,7 +6534,7 @@ function isNewerVersion(current, latest) {
|
|
|
6516
6534
|
return false;
|
|
6517
6535
|
}
|
|
6518
6536
|
async function checkForUpdate() {
|
|
6519
|
-
const currentVersion = "0.1.
|
|
6537
|
+
const currentVersion = "0.1.50";
|
|
6520
6538
|
if (!currentVersion) return null;
|
|
6521
6539
|
try {
|
|
6522
6540
|
const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
|
|
@@ -6545,7 +6563,7 @@ async function checkForUpdate() {
|
|
|
6545
6563
|
}
|
|
6546
6564
|
}
|
|
6547
6565
|
function printUpdateNotice(latestVersion) {
|
|
6548
|
-
const currentVersion = "0.1.
|
|
6566
|
+
const currentVersion = "0.1.50";
|
|
6549
6567
|
process.stderr.write(
|
|
6550
6568
|
`
|
|
6551
6569
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -6558,7 +6576,7 @@ function isStandaloneBinary() {
|
|
|
6558
6576
|
return !argv1.includes("node_modules");
|
|
6559
6577
|
}
|
|
6560
6578
|
async function cmdUpdate() {
|
|
6561
|
-
const currentVersion = "0.1.
|
|
6579
|
+
const currentVersion = "0.1.50";
|
|
6562
6580
|
process.stderr.write(
|
|
6563
6581
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
6564
6582
|
`
|
|
@@ -6693,7 +6711,7 @@ async function cmdLogin(options) {
|
|
|
6693
6711
|
process.stderr.write("\n");
|
|
6694
6712
|
printLogo();
|
|
6695
6713
|
process.stderr.write("\n");
|
|
6696
|
-
const ver = "0.1.
|
|
6714
|
+
const ver = "0.1.50";
|
|
6697
6715
|
process.stderr.write(
|
|
6698
6716
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
6699
6717
|
`
|
|
@@ -7020,7 +7038,7 @@ async function main() {
|
|
|
7020
7038
|
try {
|
|
7021
7039
|
if (command === "version" || command === "-v") {
|
|
7022
7040
|
process.stdout.write(
|
|
7023
|
-
"0.1.
|
|
7041
|
+
"0.1.50\n"
|
|
7024
7042
|
);
|
|
7025
7043
|
return;
|
|
7026
7044
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
1
8
|
// src/errors.ts
|
|
2
9
|
var MindStudioError = class extends Error {
|
|
3
10
|
constructor(message, code, status, details) {
|
|
@@ -81,13 +88,26 @@ function sleep(ms) {
|
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
// src/context.ts
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
var als;
|
|
92
|
+
function getAls() {
|
|
93
|
+
if (!als) {
|
|
94
|
+
try {
|
|
95
|
+
const { AsyncLocalStorage } = __require("async_hooks");
|
|
96
|
+
als = new AsyncLocalStorage();
|
|
97
|
+
} catch {
|
|
98
|
+
als = {
|
|
99
|
+
getStore: () => void 0,
|
|
100
|
+
run: (_store, fn) => fn()
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return als;
|
|
105
|
+
}
|
|
86
106
|
function getRequestContext() {
|
|
87
|
-
return
|
|
107
|
+
return getAls().getStore();
|
|
88
108
|
}
|
|
89
109
|
function runWithContext(ctx, fn) {
|
|
90
|
-
return
|
|
110
|
+
return getAls().run(ctx, fn);
|
|
91
111
|
}
|
|
92
112
|
|
|
93
113
|
// src/rate-limit.ts
|