@nomad-e/bluma-cli 0.1.78 → 0.1.80

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 +14 -6
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -14871,6 +14871,7 @@ async function createApiContextWindow(fullHistory, currentAnchor, compressedTurn
14871
14871
 
14872
14872
  // src/app/agent/core/llm/llm.ts
14873
14873
  init_runtime_config();
14874
+ init_sandbox_policy();
14874
14875
  import os23 from "os";
14875
14876
  import OpenAI from "openai";
14876
14877
 
@@ -14985,10 +14986,17 @@ function buildVllmReasoningPayload(effort) {
14985
14986
  }
14986
14987
  };
14987
14988
  }
14989
+ function resolveReasoningEffortForRequest(params, runtimeConfig = getRuntimeConfig()) {
14990
+ const policy = getSandboxPolicy();
14991
+ if (policy.isSandbox) {
14992
+ return "low";
14993
+ }
14994
+ return params.reasoning?.effort ?? runtimeConfig.reasoningEffort;
14995
+ }
14988
14996
  function buildChatCompletionRequestBody(params, runtimeConfig = getRuntimeConfig(), stream = false) {
14989
14997
  const tools = params.tools;
14990
14998
  const hasTools = Array.isArray(tools) && tools.length > 0;
14991
- const effort = params.reasoning?.effort ?? runtimeConfig.reasoningEffort;
14999
+ const effort = resolveReasoningEffortForRequest(params, runtimeConfig);
14992
15000
  const reasoningPayload = buildVllmReasoningPayload(effort);
14993
15001
  return {
14994
15002
  model: params.model || runtimeConfig.model || "auto",
@@ -15628,7 +15636,7 @@ var BluMaAgent = class _BluMaAgent {
15628
15636
  emptyAssistantReplySteps = 0;
15629
15637
  /** Reintentos consecutivos por tool call inválido. */
15630
15638
  invalidToolCallRetrySteps = 0;
15631
- /** Deduplicação de reasoning chunks no streaming — evita repetição. */
15639
+ /** Último snapshot de reasoning visto no streaming. */
15632
15640
  lastReasoningChunkRef = "";
15633
15641
  constructor(sessionId, eventBus, llm, mcpClient, feedbackSystem) {
15634
15642
  this.sessionId = sessionId;
@@ -16346,10 +16354,10 @@ ${editData.error.display}`;
16346
16354
  this.eventBus.emit("stream_start", {});
16347
16355
  hasEmittedStart = true;
16348
16356
  }
16349
- const reasoningKey = chunk.reasoning.trim().replace(/\s+/g, " ");
16350
- if (reasoningKey !== this.lastReasoningChunkRef) {
16351
- this.lastReasoningChunkRef = reasoningKey;
16352
- this.eventBus.emit("stream_reasoning_chunk", { delta: chunk.reasoning });
16357
+ const reasoningDelta = extractStreamingDelta(this.lastReasoningChunkRef, chunk.reasoning);
16358
+ this.lastReasoningChunkRef = chunk.reasoning;
16359
+ if (reasoningDelta) {
16360
+ this.eventBus.emit("stream_reasoning_chunk", { delta: reasoningDelta });
16353
16361
  }
16354
16362
  }
16355
16363
  if (chunk.delta) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",