@mindstudio-ai/agent 0.1.170 → 0.1.171
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 +15 -0
- package/dist/cli.js +21 -18
- package/dist/index.d.ts +50 -13
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +21 -18
- package/llms.txt +1 -0
- package/package.json +1 -1
package/dist/postinstall.js
CHANGED
|
@@ -299,7 +299,7 @@ var init_metadata = __esm({
|
|
|
299
299
|
"evaluateDecision": {
|
|
300
300
|
stepType: "evaluateDecision",
|
|
301
301
|
description: "Ask structured questions about text, JSON, or images and get calibrated answers from a decision model. The model returns a probability, a selected option, or a score. It does not write a reply. Each question is a noul (yes or no, as a probability from 0 to 1), a choice (one option from a set you define, with a probability for each), or a score (a rating against ordered levels). Put every question in the same call. The question id is yours: answers come back under the same ids. The model defaults to Jev (jev-latest).",
|
|
302
|
-
usageNotes: "- state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).\n- questions is a map. The key is an id you choose. It is not shown to the model. The answer comes back under the same id.\n- A noul asks a yes/no question and returns noul, a probability from 0 (no) to 1 (yes). Optional criteria.true and criteria.false say what a yes and a no mean.\n- A choice picks one option. criteria is a map of option id to a short description (or null). At most 255 options. The answer includes the winning choice, a probability for every option, and confidence.\n- A score rates the state on an ordered rubric. criteria is 2 to 10 level descriptions, low to high. The answer's score can land between levels, and includes a probability per level plus confidence.\n- An answer of type refusal means the model declined that question (GPT-6 Luna Decisions can).\n- instructions may be a string, or an object that keeps the question in one field and reference data in the others. Refer to those fields by name in backticks.\n- Send every question you need in one call. The model reads the state once and answers them together.\n- Probabilities from different models are not comparable: tune a threshold against the model, and the version, it will run on.\n- decisionModelOverride.model picks the model:\n - jev-latest (the default) is TypeSafe's current stable release, text only, up to 64k tokens. jev-preview tracks TypeSafe's newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version.\n - clef and clef-flash run Cloudflare Clef, which also reads up to 4 PNG, JPEG, or WebP images, each at most 4 MiB and 8 MiB together, and takes at most 64 questions, each id using only letters, digits, underscore, dot, and hyphen, up to 100 characters. clef is the larger model, clef-flash the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two.\n - mercury-decide runs Inception's Mercury Decide, which reads up to 64k tokens and up to 16 PNG, JPEG, WebP, or GIF images, each at most 10 MiB and 14 MiB together.\n - gpt-6-luna-decisions runs OpenAI's Decisions API (in beta), which reads up to 922k tokens and PNG, JPEG, WebP, or GIF images of up to 20 MB each. It takes up to 200 questions, and a choice needs at least 2 options. gpt-6-luna names it too.\n- images is for a model that reads them. Pass URLs or data URLs. A model that reads none refuses the call.\n- The response model field is the version that answered.\n- Billed per input token. Output tokens are free. Each model has its own rate, and GPT-6 Luna Decisions bills a prompt over 272k tokens at twice its rate.",
|
|
302
|
+
usageNotes: "- state is the content to judge: a string, or a JSON object or array (a record, a chat log, application state).\n- questions is a map. The key is an id you choose. It is not shown to the model. The answer comes back under the same id.\n- A noul asks a yes/no question and returns noul, a probability from 0 (no) to 1 (yes). Optional criteria.true and criteria.false say what a yes and a no mean.\n- A choice picks one option. criteria is a map of option id to a short description (or null). At most 255 options. The answer includes the winning choice, a probability for every option, and confidence.\n- A score rates the state on an ordered rubric. criteria is 2 to 10 level descriptions, low to high. The answer's score can land between levels, and includes a probability per level plus confidence.\n- An answer of type refusal means the model declined that question (GPT-6 Luna Decisions can).\n- instructions may be a string, or an object that keeps the question in one field and reference data in the others. Refer to those fields by name in backticks.\n- Send every question you need in one call. The model reads the state once and answers them together.\n- Probabilities from different models are not comparable: tune a threshold against the model, and the version, it will run on.\n- decisionModelOverride.model picks the model:\n - jev-latest (the default) is TypeSafe's current stable release, text only, up to 64k tokens. jev-preview tracks TypeSafe's newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version.\n - clef and clef-flash run Cloudflare Clef, which also reads up to 4 PNG, JPEG, or WebP images, each at most 4 MiB and 8 MiB together, and takes at most 64 questions, each id using only letters, digits, underscore, dot, and hyphen, up to 100 characters. clef is the larger model, clef-flash the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two.\n - mercury-decide runs Inception's Mercury Decide, which reads up to 64k tokens and up to 16 PNG, JPEG, WebP, or GIF images, each at most 10 MiB and 14 MiB together.\n - drex-max, drex-v2.0 and drex-v1.5 run Nace.AI's Drex, served by DeepInfra, and take at most 16 questions. drex-max reads up to 262k tokens and up to 4 PNG, JPEG, WebP, or GIF images, 9 MiB together. drex-v2.0 and drex-v1.5 read text only, up to 128k tokens. nace-ai/drex-max, nace-ai/drex-v2.0 and nace-ai/drex-v1.5 name the same three.\n - gpt-6-luna-decisions runs OpenAI's Decisions API (in beta), which reads up to 922k tokens and PNG, JPEG, WebP, or GIF images of up to 20 MB each. It takes up to 200 questions, and a choice needs at least 2 options. gpt-6-luna names it too.\n- images is for a model that reads them. Pass URLs or data URLs. A model that reads none refuses the call.\n- The response model field is the version that answered.\n- Billed per input token. Output tokens are free. Each model has its own rate, and GPT-6 Luna Decisions bills a prompt over 272k tokens at twice its rate.",
|
|
303
303
|
inputSchema: { "type": "object", "properties": { "state": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": {}, "required": [] }, { "type": "array", "items": {} }] }, "questions": { "type": "object", "properties": {}, "required": [], "description": "Questions to ask about the state, keyed by an id you choose." }, "images": { "type": "array", "items": { "type": "string" }, "description": "Images for a model that reads them (Clef, Clef Flash, GPT-6 Luna Decisions). Each entry is a URL or a data URL. A model that reads none refuses the call." }, "decisionModelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": "Decision model: a catalog id, its vendor's name for it (`@cf/cloudflare/clef`, `gpt-6-luna`), or a version it pins (`jev-1.13.0`)" }, "config": { "type": "object", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model"], "description": "Optional model override. Uses the workspace's default decision model (Jev) if not specified" } }, "required": ["state", "questions"] },
|
|
304
304
|
outputSchema: { "type": "object", "properties": { "model": { "type": "string", "description": "Versioned model id that answered, such as jev-1.13.0." }, "answers": { "type": "object", "properties": {}, "required": [], "description": "One answer per question, under the same ids." }, "usage": { "type": "object", "properties": { "input_tokens": { "type": "number" }, "output_tokens": { "type": "number" } }, "required": ["input_tokens", "output_tokens"], "description": "Token counts for the call. Input tokens are what the model bills." } }, "required": ["model", "answers", "usage"] }
|
|
305
305
|
},
|
|
@@ -1860,7 +1860,8 @@ function serializeParam(val) {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
function serializeColumnParam(val, columnName, columns) {
|
|
1862
1862
|
const col = columnsByName(columns).get(columnName);
|
|
1863
|
-
|
|
1863
|
+
const isUserColumn = col?.type === "user" || columnName === "last_updated_by";
|
|
1864
|
+
if (isUserColumn && typeof val === "string") {
|
|
1864
1865
|
return val.startsWith(USER_PREFIX) ? val : `${USER_PREFIX}${val}`;
|
|
1865
1866
|
}
|
|
1866
1867
|
return serializeParam(val);
|
|
@@ -2055,7 +2056,7 @@ function buildExists(table, where, whereParams, negate) {
|
|
|
2055
2056
|
};
|
|
2056
2057
|
}
|
|
2057
2058
|
function buildInsert(table, data, columns) {
|
|
2058
|
-
const filtered =
|
|
2059
|
+
const filtered = stripPlatformColumns(data);
|
|
2059
2060
|
const keys = Object.keys(filtered);
|
|
2060
2061
|
const placeholders = keys.map(() => "?").join(", ");
|
|
2061
2062
|
const params = keys.map((k) => serializeColumnParam(filtered[k], k, columns));
|
|
@@ -2065,7 +2066,7 @@ function buildInsert(table, data, columns) {
|
|
|
2065
2066
|
};
|
|
2066
2067
|
}
|
|
2067
2068
|
function buildUpdate(table, id, data, columns) {
|
|
2068
|
-
const filtered =
|
|
2069
|
+
const filtered = stripPlatformColumns(data);
|
|
2069
2070
|
const keys = Object.keys(filtered);
|
|
2070
2071
|
const assignments = keys.map((k) => `${k} = ?`).join(", ");
|
|
2071
2072
|
const params = [
|
|
@@ -2079,7 +2080,7 @@ function buildUpdate(table, id, data, columns) {
|
|
|
2079
2080
|
};
|
|
2080
2081
|
}
|
|
2081
2082
|
function buildUpsert(table, data, conflictColumns, columns) {
|
|
2082
|
-
const filtered =
|
|
2083
|
+
const filtered = stripPlatformColumns(data);
|
|
2083
2084
|
const keys = Object.keys(filtered);
|
|
2084
2085
|
const placeholders = keys.map(() => "?").join(", ");
|
|
2085
2086
|
const params = keys.map((k) => serializeColumnParam(filtered[k], k, columns));
|
|
@@ -2095,16 +2096,16 @@ function buildDelete(table, where, whereParams) {
|
|
|
2095
2096
|
}
|
|
2096
2097
|
return { sql, params: whereParams?.length ? whereParams : void 0 };
|
|
2097
2098
|
}
|
|
2098
|
-
function
|
|
2099
|
+
function stripPlatformColumns(data) {
|
|
2099
2100
|
const result = {};
|
|
2100
2101
|
for (const [key, value] of Object.entries(data)) {
|
|
2101
|
-
if (!
|
|
2102
|
+
if (!PLATFORM_COLUMNS.has(key)) {
|
|
2102
2103
|
result[key] = value;
|
|
2103
2104
|
}
|
|
2104
2105
|
}
|
|
2105
2106
|
return result;
|
|
2106
2107
|
}
|
|
2107
|
-
var USER_PREFIX, byNameCache, SQL_IDENTIFIER_RE,
|
|
2108
|
+
var USER_PREFIX, byNameCache, SQL_IDENTIFIER_RE, PLATFORM_COLUMNS;
|
|
2108
2109
|
var init_sql = __esm({
|
|
2109
2110
|
"src/db/sql.ts"() {
|
|
2110
2111
|
"use strict";
|
|
@@ -2112,13 +2113,10 @@ var init_sql = __esm({
|
|
|
2112
2113
|
USER_PREFIX = "@@user@@";
|
|
2113
2114
|
byNameCache = /* @__PURE__ */ new WeakMap();
|
|
2114
2115
|
SQL_IDENTIFIER_RE = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
2115
|
-
|
|
2116
|
+
PLATFORM_COLUMNS = /* @__PURE__ */ new Set([
|
|
2116
2117
|
"id",
|
|
2117
|
-
"created_at",
|
|
2118
2118
|
"createdAt",
|
|
2119
|
-
"updated_at",
|
|
2120
2119
|
"updatedAt",
|
|
2121
|
-
"last_updated_by",
|
|
2122
2120
|
"lastUpdatedBy"
|
|
2123
2121
|
]);
|
|
2124
2122
|
}
|
|
@@ -3916,6 +3914,9 @@ var init_table = __esm({
|
|
|
3916
3914
|
/**
|
|
3917
3915
|
* Update a row by ID. Only the provided fields are changed.
|
|
3918
3916
|
* Returns the updated row via `UPDATE ... RETURNING *`.
|
|
3917
|
+
*
|
|
3918
|
+
* The platform advances `updated_at` and stamps `last_updated_by` with the
|
|
3919
|
+
* signed-in user unless the data changes them itself.
|
|
3919
3920
|
*/
|
|
3920
3921
|
update(id, data) {
|
|
3921
3922
|
const build = () => {
|
|
@@ -4011,6 +4012,8 @@ var init_table = __esm({
|
|
|
4011
4012
|
* @param conflictKey - Column name(s) that form the unique constraint.
|
|
4012
4013
|
* Pass a single string for single-column unique, or an array for compound.
|
|
4013
4014
|
* @param data - Row data to insert (or update on conflict). Defaults apply.
|
|
4015
|
+
* A `created_at`, `updated_at` or `last_updated_by` it gives is written
|
|
4016
|
+
* either way; whichever it leaves out the platform fills in.
|
|
4014
4017
|
*/
|
|
4015
4018
|
upsert(conflictKey, data) {
|
|
4016
4019
|
const conflictColumns = Array.isArray(conflictKey) ? conflictKey : [conflictKey];
|
|
@@ -9469,7 +9472,7 @@ async function startMcpServer(options) {
|
|
|
9469
9472
|
capabilities: { tools: {} },
|
|
9470
9473
|
serverInfo: {
|
|
9471
9474
|
name: "mindstudio-agent",
|
|
9472
|
-
version: "0.1.
|
|
9475
|
+
version: "0.1.171"
|
|
9473
9476
|
},
|
|
9474
9477
|
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.'
|
|
9475
9478
|
});
|
|
@@ -10411,7 +10414,7 @@ function isNewerVersion(current, latest) {
|
|
|
10411
10414
|
return false;
|
|
10412
10415
|
}
|
|
10413
10416
|
async function checkForUpdate() {
|
|
10414
|
-
const currentVersion = "0.1.
|
|
10417
|
+
const currentVersion = "0.1.171";
|
|
10415
10418
|
if (!currentVersion || process.env.MINDSTUDIO_NO_UPDATE_CHECK) {
|
|
10416
10419
|
return null;
|
|
10417
10420
|
}
|
|
@@ -10446,7 +10449,7 @@ async function checkForUpdate() {
|
|
|
10446
10449
|
}
|
|
10447
10450
|
}
|
|
10448
10451
|
function printUpdateNotice(latestVersion) {
|
|
10449
|
-
const currentVersion = "0.1.
|
|
10452
|
+
const currentVersion = "0.1.171";
|
|
10450
10453
|
process.stderr.write(
|
|
10451
10454
|
`
|
|
10452
10455
|
${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
|
|
@@ -10459,7 +10462,7 @@ function isStandaloneBinary() {
|
|
|
10459
10462
|
return !argv1.includes("node_modules");
|
|
10460
10463
|
}
|
|
10461
10464
|
async function cmdUpdate() {
|
|
10462
|
-
const currentVersion = "0.1.
|
|
10465
|
+
const currentVersion = "0.1.171";
|
|
10463
10466
|
process.stderr.write(
|
|
10464
10467
|
` ${ansi2.gray("Current version:")} ${currentVersion}
|
|
10465
10468
|
`
|
|
@@ -10580,7 +10583,7 @@ async function cmdLogin(options) {
|
|
|
10580
10583
|
process.stderr.write("\n");
|
|
10581
10584
|
printLogo();
|
|
10582
10585
|
process.stderr.write("\n");
|
|
10583
|
-
const ver = "0.1.
|
|
10586
|
+
const ver = "0.1.171";
|
|
10584
10587
|
process.stderr.write(
|
|
10585
10588
|
` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
|
|
10586
10589
|
`
|
|
@@ -10892,7 +10895,7 @@ async function main() {
|
|
|
10892
10895
|
const updatePromise = command !== "mcp" && command !== "login" && command !== "update" ? checkForUpdate() : Promise.resolve(null);
|
|
10893
10896
|
try {
|
|
10894
10897
|
if (command === "version" || command === "-v") {
|
|
10895
|
-
process.stdout.write("0.1.
|
|
10898
|
+
process.stdout.write("0.1.171\n");
|
|
10896
10899
|
return;
|
|
10897
10900
|
}
|
|
10898
10901
|
if (command === "login") {
|
package/llms.txt
CHANGED
|
@@ -412,6 +412,7 @@ Ask structured questions about text, JSON, or images and get calibrated answers
|
|
|
412
412
|
- jev-latest (the default) is TypeSafe's current stable release, text only, up to 64k tokens. jev-preview tracks TypeSafe's newest release. Pin a version such as jev-1.13.0 when a threshold was tuned against that version.
|
|
413
413
|
- clef and clef-flash run Cloudflare Clef, which also reads up to 4 PNG, JPEG, or WebP images, each at most 4 MiB and 8 MiB together, and takes at most 64 questions, each id using only letters, digits, underscore, dot, and hyphen, up to 100 characters. clef is the larger model, clef-flash the faster one. @cf/cloudflare/clef and @cf/cloudflare/clef-flash name the same two.
|
|
414
414
|
- mercury-decide runs Inception's Mercury Decide, which reads up to 64k tokens and up to 16 PNG, JPEG, WebP, or GIF images, each at most 10 MiB and 14 MiB together.
|
|
415
|
+
- drex-max, drex-v2.0 and drex-v1.5 run Nace.AI's Drex, served by DeepInfra, and take at most 16 questions. drex-max reads up to 262k tokens and up to 4 PNG, JPEG, WebP, or GIF images, 9 MiB together. drex-v2.0 and drex-v1.5 read text only, up to 128k tokens. nace-ai/drex-max, nace-ai/drex-v2.0 and nace-ai/drex-v1.5 name the same three.
|
|
415
416
|
- gpt-6-luna-decisions runs OpenAI's Decisions API (in beta), which reads up to 922k tokens and PNG, JPEG, WebP, or GIF images of up to 20 MB each. It takes up to 200 questions, and a choice needs at least 2 options. gpt-6-luna names it too.
|
|
416
417
|
- images is for a model that reads them. Pass URLs or data URLs. A model that reads none refuses the call.
|
|
417
418
|
- The response model field is the version that answered.
|