@nomad-e/bluma-cli 0.1.20 → 0.1.22

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 +32 -12
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -4077,13 +4077,25 @@ var SkillLoader = class _SkillLoader {
4077
4077
  return { content: raw };
4078
4078
  }
4079
4079
  const frontmatter = {};
4080
+ let currentKey = "";
4081
+ let currentValue = "";
4080
4082
  for (let i = 1; i < endIndex; i++) {
4081
4083
  const line = lines[i];
4084
+ const isIndented = line.startsWith(" ") || line.startsWith(" ");
4085
+ if (isIndented && currentKey) {
4086
+ currentValue += " " + line.trim();
4087
+ frontmatter[currentKey] = currentValue;
4088
+ continue;
4089
+ }
4082
4090
  const colonIndex = line.indexOf(":");
4083
4091
  if (colonIndex > 0) {
4084
- const key = line.slice(0, colonIndex).trim();
4085
- const value = line.slice(colonIndex + 1).trim();
4086
- frontmatter[key] = value;
4092
+ currentKey = line.slice(0, colonIndex).trim();
4093
+ let value = line.slice(colonIndex + 1).trim();
4094
+ if (value === ">" || value === "|") {
4095
+ value = "";
4096
+ }
4097
+ currentValue = value;
4098
+ frontmatter[currentKey] = currentValue;
4087
4099
  }
4088
4100
  }
4089
4101
  const content = lines.slice(endIndex + 1).join("\n");
@@ -5102,7 +5114,16 @@ var BluMaAgent = class {
5102
5114
  skillLoader: this.skillLoader
5103
5115
  });
5104
5116
  if (this.history.length === 0) {
5117
+ const dirs = this.skillLoader.getSkillsDirs();
5118
+ this.eventBus.emit("backend_message", {
5119
+ type: "info",
5120
+ message: `Skills dirs \u2014 bundled: ${dirs.bundled} | project: ${dirs.project} | global: ${dirs.global}`
5121
+ });
5105
5122
  const availableSkills = this.skillLoader.listAvailable();
5123
+ this.eventBus.emit("backend_message", {
5124
+ type: "info",
5125
+ message: `Skills loaded: ${availableSkills.length} \u2014 ${availableSkills.map((s) => `${s.name} (${s.source})`).join(", ") || "none"}`
5126
+ });
5106
5127
  if (this.skillLoader.hasConflicts()) {
5107
5128
  for (const warning of this.skillLoader.formatConflictWarnings()) {
5108
5129
  this.eventBus.emit("backend_message", {
@@ -7735,6 +7756,12 @@ async function runAgentMode() {
7735
7756
  process.exit(1);
7736
7757
  return;
7737
7758
  }
7759
+ if (envelope.metadata?.sandbox === true) {
7760
+ process.env.BLUMA_SANDBOX = "true";
7761
+ if (envelope.metadata?.sandbox_name) {
7762
+ process.env.BLUMA_SANDBOX_NAME = String(envelope.metadata.sandbox_name);
7763
+ }
7764
+ }
7738
7765
  const eventBus = new EventEmitter2();
7739
7766
  const sessionId = envelope.message_id || uuidv43();
7740
7767
  let lastAssistantMessage = null;
@@ -7797,12 +7824,6 @@ async function runAgentMode() {
7797
7824
  });
7798
7825
  });
7799
7826
  eventBus.on("stream_reasoning_chunk", (payload) => {
7800
- writeJsonl({
7801
- event_type: "backend_message",
7802
- backend_type: "reasoning_delta",
7803
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
7804
- payload: { type: "reasoning_delta", delta: payload?.delta }
7805
- });
7806
7827
  reasoningBuffer = (reasoningBuffer || "") + (payload?.delta || "");
7807
7828
  });
7808
7829
  writeJsonl({
@@ -7822,11 +7843,10 @@ async function runAgentMode() {
7822
7843
  await agent.initialize();
7823
7844
  const userContent = JSON.stringify({
7824
7845
  message_id: envelope.message_id || sessionId,
7825
- from_agent: envelope.from_agent || "sandbox-api",
7846
+ from_agent: envelope.from_agent || "unknown",
7826
7847
  to_agent: envelope.to_agent || "bluma",
7827
7848
  action: envelope.action || "unknown",
7828
- context: envelope.context || {},
7829
- metadata: envelope.metadata || {}
7849
+ context: envelope.context || {}
7830
7850
  });
7831
7851
  await agent.processTurn({ content: userContent });
7832
7852
  if (!resultEmitted) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",