@mindstudio-ai/agent 0.0.17 → 0.0.19

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
@@ -1184,34 +1184,32 @@ __export(config_exports, {
1184
1184
  import { readFileSync, writeFileSync, mkdirSync } from "fs";
1185
1185
  import { join } from "path";
1186
1186
  import { homedir } from "os";
1187
+ function configPaths() {
1188
+ const dir = join(homedir(), ".mindstudio");
1189
+ return { dir, file: join(dir, "config.json") };
1190
+ }
1187
1191
  function getConfigPath() {
1188
- return CONFIG_PATH;
1192
+ return configPaths().file;
1189
1193
  }
1190
1194
  function loadConfig() {
1191
1195
  try {
1192
- const raw = readFileSync(CONFIG_PATH, "utf-8");
1196
+ const raw = readFileSync(configPaths().file, "utf-8");
1193
1197
  return JSON.parse(raw);
1194
1198
  } catch {
1195
1199
  return {};
1196
1200
  }
1197
1201
  }
1198
1202
  function saveConfig(config) {
1199
- mkdirSync(CONFIG_DIR, { recursive: true });
1200
- writeFileSync(
1201
- CONFIG_PATH,
1202
- JSON.stringify(config, null, 2) + "\n",
1203
- "utf-8"
1204
- );
1203
+ const { dir, file } = configPaths();
1204
+ mkdirSync(dir, { recursive: true });
1205
+ writeFileSync(file, JSON.stringify(config, null, 2) + "\n", "utf-8");
1205
1206
  }
1206
1207
  function clearConfig() {
1207
1208
  saveConfig({});
1208
1209
  }
1209
- var CONFIG_DIR, CONFIG_PATH;
1210
1210
  var init_config = __esm({
1211
1211
  "src/config.ts"() {
1212
1212
  "use strict";
1213
- CONFIG_DIR = join(homedir(), ".mindstudio");
1214
- CONFIG_PATH = join(CONFIG_DIR, "config.json");
1215
1213
  }
1216
1214
  });
1217
1215
 
@@ -1924,7 +1922,7 @@ async function startMcpServer(options) {
1924
1922
  capabilities: { tools: {} },
1925
1923
  serverInfo: {
1926
1924
  name: "mindstudio-agent",
1927
- version: "0.0.17"
1925
+ version: "0.0.19"
1928
1926
  }
1929
1927
  });
1930
1928
  break;
@@ -2452,7 +2450,7 @@ function isNewerVersion(current, latest) {
2452
2450
  return false;
2453
2451
  }
2454
2452
  async function checkForUpdate() {
2455
- const currentVersion = "0.0.17";
2453
+ const currentVersion = "0.0.19";
2456
2454
  if (!currentVersion) return null;
2457
2455
  try {
2458
2456
  const { loadConfig: loadConfig2, saveConfig: saveConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
@@ -2481,7 +2479,7 @@ async function checkForUpdate() {
2481
2479
  }
2482
2480
  }
2483
2481
  function printUpdateNotice(latestVersion) {
2484
- const currentVersion = "0.0.17";
2482
+ const currentVersion = "0.0.19";
2485
2483
  process.stderr.write(
2486
2484
  `
2487
2485
  ${ansi.cyanBright("Update available")} ${ansi.gray(currentVersion + " \u2192")} ${ansi.cyanBold(latestVersion)}
@@ -2555,7 +2553,7 @@ async function cmdLogin(options) {
2555
2553
  process.stderr.write("\n");
2556
2554
  printLogo();
2557
2555
  process.stderr.write("\n");
2558
- const ver = "0.0.17";
2556
+ const ver = "0.0.19";
2559
2557
  process.stderr.write(
2560
2558
  ` ${ansi.bold("MindStudio")} ${ansi.gray("CLI")}${ver ? " " + ansi.gray("v" + ver) : ""}
2561
2559
  `
package/dist/index.js CHANGED
@@ -124,11 +124,13 @@ var RateLimiter = class {
124
124
  import { readFileSync, writeFileSync, mkdirSync } from "fs";
125
125
  import { join } from "path";
126
126
  import { homedir } from "os";
127
- var CONFIG_DIR = join(homedir(), ".mindstudio");
128
- var CONFIG_PATH = join(CONFIG_DIR, "config.json");
127
+ function configPaths() {
128
+ const dir = join(homedir(), ".mindstudio");
129
+ return { dir, file: join(dir, "config.json") };
130
+ }
129
131
  function loadConfig() {
130
132
  try {
131
- const raw = readFileSync(CONFIG_PATH, "utf-8");
133
+ const raw = readFileSync(configPaths().file, "utf-8");
132
134
  return JSON.parse(raw);
133
135
  } catch {
134
136
  return {};