@nomad-e/bluma-cli 0.1.35 → 0.1.37

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.
Files changed (2) hide show
  1. package/dist/main.js +15 -33
  2. package/package.json +2 -1
package/dist/main.js CHANGED
@@ -4558,8 +4558,8 @@ var ToolInvoker = class {
4558
4558
  async initialize() {
4559
4559
  try {
4560
4560
  const __filename = fileURLToPath(import.meta.url);
4561
- const __dirname2 = path13.dirname(__filename);
4562
- const configPath = path13.resolve(__dirname2, "config", "native_tools.json");
4561
+ const __dirname = path13.dirname(__filename);
4562
+ const configPath = path13.resolve(__dirname, "config", "native_tools.json");
4563
4563
  const fileContent = await fs11.readFile(configPath, "utf-8");
4564
4564
  const config2 = JSON.parse(fileContent);
4565
4565
  this.toolDefinitions = config2.nativeTools;
@@ -4650,8 +4650,8 @@ var MCPClient = class {
4650
4650
  });
4651
4651
  }
4652
4652
  const __filename = fileURLToPath2(import.meta.url);
4653
- const __dirname2 = path14.dirname(__filename);
4654
- const defaultConfigPath = path14.resolve(__dirname2, "config", "bluma-mcp.json");
4653
+ const __dirname = path14.dirname(__filename);
4654
+ const defaultConfigPath = path14.resolve(__dirname, "config", "bluma-mcp.json");
4655
4655
  const userConfigPath = path14.join(os8.homedir(), ".bluma", "bluma-mcp.json");
4656
4656
  const defaultConfig = await this.loadMcpConfig(defaultConfigPath, "Default");
4657
4657
  const userConfig = await this.loadMcpConfig(userConfigPath, "User");
@@ -5033,8 +5033,8 @@ var SkillLoader = class _SkillLoader {
5033
5033
  this.bundledSkillsDir = bundledDir || _SkillLoader.resolveBundledDir();
5034
5034
  }
5035
5035
  /**
5036
- * Resolve o diretório de skills nativas relativo ao binário (dist/config/skills).
5037
- * Funciona tanto em ESM como quando executado a partir de dist/.
5036
+ * Resolve o diretório de skills nativas: relativas ao binário/pacote BluMa em execução.
5037
+ * Nunca usa cwd/dist ou cwd/node_modules isso misturava "nativas" com pastas do projeto.
5038
5038
  */
5039
5039
  static resolveBundledDir() {
5040
5040
  if (process.env.JEST_WORKER_ID !== void 0 || process.env.NODE_ENV === "test") {
@@ -5047,6 +5047,7 @@ var SkillLoader = class _SkillLoader {
5047
5047
  candidates.push(abs);
5048
5048
  }
5049
5049
  };
5050
+ let argvBundled = null;
5050
5051
  try {
5051
5052
  const bundleDir = path16.dirname(fileURLToPath3(import.meta.url));
5052
5053
  push(path16.join(bundleDir, "config", "skills"));
@@ -5062,26 +5063,11 @@ var SkillLoader = class _SkillLoader {
5062
5063
  resolved = path16.resolve(process.cwd(), argv1);
5063
5064
  }
5064
5065
  const scriptDir = path16.dirname(resolved);
5065
- push(path16.join(scriptDir, "config", "skills"));
5066
+ argvBundled = path16.join(scriptDir, "config", "skills");
5067
+ push(argvBundled);
5066
5068
  } catch {
5067
5069
  }
5068
5070
  }
5069
- push(path16.join(process.cwd(), "dist", "config", "skills"));
5070
- push(
5071
- path16.join(
5072
- process.cwd(),
5073
- "node_modules",
5074
- "@nomad-e",
5075
- "bluma-cli",
5076
- "dist",
5077
- "config",
5078
- "skills"
5079
- )
5080
- );
5081
- if (typeof __dirname !== "undefined") {
5082
- push(path16.join(__dirname, "config", "skills"));
5083
- push(path16.join(__dirname, "..", "..", "..", "config", "skills"));
5084
- }
5085
5071
  for (const abs of candidates) {
5086
5072
  if (fs14.existsSync(abs)) {
5087
5073
  return abs;
@@ -5090,7 +5076,10 @@ var SkillLoader = class _SkillLoader {
5090
5076
  try {
5091
5077
  return path16.join(path16.dirname(fileURLToPath3(import.meta.url)), "config", "skills");
5092
5078
  } catch {
5093
- return path16.join(process.cwd(), "dist", "config", "skills");
5079
+ if (argvBundled) {
5080
+ return argvBundled;
5081
+ }
5082
+ return path16.join(os10.homedir(), ".bluma", "__bundled_skills_unresolved__");
5094
5083
  }
5095
5084
  }
5096
5085
  /**
@@ -8768,15 +8757,9 @@ import { Box as Box13, Text as Text12 } from "ink";
8768
8757
  import Spinner from "ink-spinner";
8769
8758
  import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
8770
8759
  var SessionInfoConnectingMCP = ({
8771
- sessionId,
8772
8760
  workdir,
8773
8761
  statusMessage
8774
8762
  }) => /* @__PURE__ */ jsx13(ChatBlock, { marginBottom: 1, children: /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 1, children: [
8775
- /* @__PURE__ */ jsxs12(Text12, { children: [
8776
- /* @__PURE__ */ jsx13(Text12, { bold: true, color: BLUMA_TERMINAL.brandBlue, children: "session" }),
8777
- /* @__PURE__ */ jsx13(Text12, { dimColor: true, children: " \xB7 " }),
8778
- /* @__PURE__ */ jsx13(Text12, { color: BLUMA_TERMINAL.brandMagenta, children: sessionId.slice(0, 12) })
8779
- ] }),
8780
8763
  /* @__PURE__ */ jsxs12(Text12, { dimColor: true, children: [
8781
8764
  /* @__PURE__ */ jsx13(Text12, { color: BLUMA_TERMINAL.brandMagenta, children: "\u2514 " }),
8782
8765
  workdir
@@ -9043,8 +9026,8 @@ async function checkForUpdates() {
9043
9026
  }
9044
9027
  if (!pkg) {
9045
9028
  const __filename = fileURLToPath4(import.meta.url);
9046
- const __dirname2 = path20.dirname(__filename);
9047
- pkg = findBlumaPackageJson(__dirname2);
9029
+ const __dirname = path20.dirname(__filename);
9030
+ pkg = findBlumaPackageJson(__dirname);
9048
9031
  }
9049
9032
  if (!pkg) {
9050
9033
  return null;
@@ -9732,7 +9715,6 @@ Please use command_status to check the result and report back to the user.`;
9732
9715
  return /* @__PURE__ */ jsx20(
9733
9716
  SessionInfoConnectingMCP_default,
9734
9717
  {
9735
- sessionId,
9736
9718
  workdir,
9737
9719
  statusMessage
9738
9720
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",
@@ -18,6 +18,7 @@
18
18
  "@types/update-notifier": "^6.0.8",
19
19
  "@types/uuid": "^9.0.8",
20
20
  "babel-jest": "^30.0.5",
21
+ "babel-plugin-transform-import-meta": "^2.3.3",
21
22
  "esbuild": "^0.27.2",
22
23
  "esbuild-plugin-node-externals": "^1.0.1",
23
24
  "ink-testing-library": "^4.0.0",