@mindstudio-ai/agent 0.1.43 → 0.1.44

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 CHANGED
@@ -1541,6 +1541,12 @@ function deserializeRow(row, columns) {
1541
1541
  } else if (col?.type === "number" && typeof value === "string") {
1542
1542
  const num = Number(value);
1543
1543
  result[key] = Number.isNaN(num) ? value : num;
1544
+ } else if (!col && typeof value === "string" && (value[0] === "[" || value[0] === "{")) {
1545
+ try {
1546
+ result[key] = JSON.parse(value);
1547
+ } catch {
1548
+ result[key] = value;
1549
+ }
1544
1550
  } else {
1545
1551
  result[key] = value;
1546
1552
  }
@@ -4402,6 +4408,12 @@ var init_client = __esm({
4402
4408
  (d) => d.tables.some((t) => t.name === name)
4403
4409
  );
4404
4410
  }
4411
+ if (tableConfig.columns.length === 0 && targetDb) {
4412
+ const tableSchema = targetDb.tables.find((t) => t.name === name);
4413
+ if (tableSchema) {
4414
+ tableConfig.columns = tableSchema.schema;
4415
+ }
4416
+ }
4405
4417
  const databaseId = targetDb?.id ?? databases[0]?.id ?? "";
4406
4418
  return agent._executeDbBatch(databaseId, queries);
4407
4419
  }
@@ -5197,7 +5209,7 @@ async function startMcpServer(options) {
5197
5209
  capabilities: { tools: {} },
5198
5210
  serverInfo: {
5199
5211
  name: "mindstudio-agent",
5200
- version: "0.1.43"
5212
+ version: "0.1.44"
5201
5213
  },
5202
5214
  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.'
5203
5215
  });
@@ -6154,7 +6166,7 @@ function isNewerVersion(current, latest) {
6154
6166
  return false;
6155
6167
  }
6156
6168
  async function checkForUpdate() {
6157
- const currentVersion = "0.1.43";
6169
+ const currentVersion = "0.1.44";
6158
6170
  if (!currentVersion) return null;
6159
6171
  try {
6160
6172
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -6183,7 +6195,7 @@ async function checkForUpdate() {
6183
6195
  }
6184
6196
  }
6185
6197
  function printUpdateNotice(latestVersion) {
6186
- const currentVersion = "0.1.43";
6198
+ const currentVersion = "0.1.44";
6187
6199
  process.stderr.write(
6188
6200
  `
6189
6201
  ${ansi2.cyanBright("Update available")} ${ansi2.gray(currentVersion + " \u2192")} ${ansi2.cyanBold(latestVersion)}
@@ -6196,7 +6208,7 @@ function isStandaloneBinary() {
6196
6208
  return !argv1.includes("node_modules");
6197
6209
  }
6198
6210
  async function cmdUpdate() {
6199
- const currentVersion = "0.1.43";
6211
+ const currentVersion = "0.1.44";
6200
6212
  process.stderr.write(
6201
6213
  ` ${ansi2.gray("Current version:")} ${currentVersion}
6202
6214
  `
@@ -6331,7 +6343,7 @@ async function cmdLogin(options) {
6331
6343
  process.stderr.write("\n");
6332
6344
  printLogo();
6333
6345
  process.stderr.write("\n");
6334
- const ver = "0.1.43";
6346
+ const ver = "0.1.44";
6335
6347
  process.stderr.write(
6336
6348
  ` ${ansi2.bold("MindStudio Agent")} ${ver ? " " + ansi2.gray("v" + ver) : ""}
6337
6349
  `
@@ -6658,7 +6670,7 @@ async function main() {
6658
6670
  try {
6659
6671
  if (command === "version" || command === "-v") {
6660
6672
  process.stdout.write(
6661
- "0.1.43\n"
6673
+ "0.1.44\n"
6662
6674
  );
6663
6675
  return;
6664
6676
  }
package/dist/index.js CHANGED
@@ -296,6 +296,12 @@ function deserializeRow(row, columns) {
296
296
  } else if (col?.type === "number" && typeof value === "string") {
297
297
  const num = Number(value);
298
298
  result[key] = Number.isNaN(num) ? value : num;
299
+ } else if (!col && typeof value === "string" && (value[0] === "[" || value[0] === "{")) {
300
+ try {
301
+ result[key] = JSON.parse(value);
302
+ } catch {
303
+ result[key] = value;
304
+ }
299
305
  } else {
300
306
  result[key] = value;
301
307
  }
@@ -4230,6 +4236,12 @@ var MindStudioAgent = class {
4230
4236
  (d) => d.tables.some((t) => t.name === name)
4231
4237
  );
4232
4238
  }
4239
+ if (tableConfig.columns.length === 0 && targetDb) {
4240
+ const tableSchema = targetDb.tables.find((t) => t.name === name);
4241
+ if (tableSchema) {
4242
+ tableConfig.columns = tableSchema.schema;
4243
+ }
4244
+ }
4233
4245
  const databaseId = targetDb?.id ?? databases[0]?.id ?? "";
4234
4246
  return agent._executeDbBatch(databaseId, queries);
4235
4247
  }