@mindstudio-ai/agent 0.1.174 → 0.1.175
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 +7 -0
- package/dist/cli.js +30 -6
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +30 -6
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -1368,6 +1368,26 @@ var init_context = __esm({
|
|
|
1368
1368
|
}
|
|
1369
1369
|
});
|
|
1370
1370
|
|
|
1371
|
+
// src/db/scanHints.ts
|
|
1372
|
+
function warnTableScans(scans) {
|
|
1373
|
+
if (!Array.isArray(scans)) {
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
for (const scan of scans) {
|
|
1377
|
+
if (typeof scan?.table !== "string" || typeof scan?.ms !== "number" || !Number.isFinite(scan.ms)) {
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
console.warn(
|
|
1381
|
+
`[mindstudio] A query read every row of '${scan.table}' (${Math.round(scan.ms)} ms). An index on the columns it filters or sorts by (defineTable's indexes) would make it a lookup.`
|
|
1382
|
+
);
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
var init_scanHints = __esm({
|
|
1386
|
+
"src/db/scanHints.ts"() {
|
|
1387
|
+
"use strict";
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
|
|
1371
1391
|
// src/db-ws.ts
|
|
1372
1392
|
function isReadOnlySql(sql) {
|
|
1373
1393
|
const head = sql.trimStart().slice(0, 8).toUpperCase();
|
|
@@ -1435,6 +1455,7 @@ function deliver(self, msg) {
|
|
|
1435
1455
|
)
|
|
1436
1456
|
);
|
|
1437
1457
|
} else {
|
|
1458
|
+
warnTableScans(msg.scans);
|
|
1438
1459
|
p.resolve(msg.results);
|
|
1439
1460
|
}
|
|
1440
1461
|
}
|
|
@@ -1629,6 +1650,7 @@ var DB_WS_SUBPROTOCOL, WS_ACK_TIMEOUT_MS, WS_IDLE_TIMEOUT_MS, WS_OPEN_TIMEOUT_MS
|
|
|
1629
1650
|
var init_db_ws = __esm({
|
|
1630
1651
|
"src/db-ws.ts"() {
|
|
1631
1652
|
"use strict";
|
|
1653
|
+
init_scanHints();
|
|
1632
1654
|
init_errors();
|
|
1633
1655
|
DB_WS_SUBPROTOCOL = "ms-db-v2";
|
|
1634
1656
|
WS_ACK_TIMEOUT_MS = 2e4;
|
|
@@ -7604,6 +7626,7 @@ var init_client = __esm({
|
|
|
7604
7626
|
init_sql();
|
|
7605
7627
|
init_time();
|
|
7606
7628
|
init_readBatching();
|
|
7629
|
+
init_scanHints();
|
|
7607
7630
|
init_files();
|
|
7608
7631
|
init_datasources();
|
|
7609
7632
|
init_voice();
|
|
@@ -9084,6 +9107,7 @@ var init_client = __esm({
|
|
|
9084
9107
|
throw new MindStudioError(`[db] ${message}`, code, res.status);
|
|
9085
9108
|
}
|
|
9086
9109
|
const data = await res.json();
|
|
9110
|
+
warnTableScans(data.scans);
|
|
9087
9111
|
return data.results;
|
|
9088
9112
|
}
|
|
9089
9113
|
/**
|
|
@@ -10043,7 +10067,7 @@ async function startMcpServer(options) {
|
|
|
10043
10067
|
capabilities: { tools: {} },
|
|
10044
10068
|
serverInfo: {
|
|
10045
10069
|
name: "mindstudio-agent",
|
|
10046
|
-
version: "0.1.
|
|
10070
|
+
version: "0.1.175"
|
|
10047
10071
|
},
|
|
10048
10072
|
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.'
|
|
10049
10073
|
});
|
|
@@ -10985,7 +11009,7 @@ function isNewerVersion(current, latest) {
|
|
|
10985
11009
|
return false;
|
|
10986
11010
|
}
|
|
10987
11011
|
async function checkForUpdate() {
|
|
10988
|
-
const currentVersion = "0.1.
|
|
11012
|
+
const currentVersion = "0.1.175";
|
|
10989
11013
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10990
11014
|
return null;
|
|
10991
11015
|
}
|
|
@@ -11020,7 +11044,7 @@ async function checkForUpdate() {
|
|
|
11020
11044
|
}
|
|
11021
11045
|
}
|
|
11022
11046
|
function printUpdateNotice(latestVersion) {
|
|
11023
|
-
const currentVersion = "0.1.
|
|
11047
|
+
const currentVersion = "0.1.175";
|
|
11024
11048
|
process.stderr.write(
|
|
11025
11049
|
`
|
|
11026
11050
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -11033,7 +11057,7 @@ function isStandaloneBinary() {
|
|
|
11033
11057
|
return !argv1.includes("node_modules");
|
|
11034
11058
|
}
|
|
11035
11059
|
async function cmdUpdate() {
|
|
11036
|
-
const currentVersion = "0.1.
|
|
11060
|
+
const currentVersion = "0.1.175";
|
|
11037
11061
|
process.stderr.write(
|
|
11038
11062
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
11039
11063
|
`
|
|
@@ -11154,7 +11178,7 @@ async function cmdLogin(options) {
|
|
|
11154
11178
|
process.stderr.write("\n");
|
|
11155
11179
|
printLogo();
|
|
11156
11180
|
process.stderr.write("\n");
|
|
11157
|
-
const ver = "0.1.
|
|
11181
|
+
const ver = "0.1.175";
|
|
11158
11182
|
process.stderr.write(
|
|
11159
11183
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
11160
11184
|
`
|
|
@@ -11466,7 +11490,7 @@ async function main() {
|
|
|
11466
11490
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
11467
11491
|
try {
|
|
11468
11492
|
if (command === "version" || command === "-v") {
|
|
11469
|
-
process.stdout.write("0.1.
|
|
11493
|
+
process.stdout.write("0.1.175\n");
|
|
11470
11494
|
return;
|
|
11471
11495
|
}
|
|
11472
11496
|
if (command === "login") {
|