@nomad-e/bluma-cli 0.1.8 → 0.1.10

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 +19 -6
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -4229,7 +4229,6 @@ Run tests when modifying code. If a testing skill is listed in available_skills,
4229
4229
  - read_file_lines
4230
4230
  - count_file_lines
4231
4231
  - todo
4232
- - agent_end_turn
4233
4232
 
4234
4233
  ### Require Confirmation:
4235
4234
  - shell_command (except safe commands)
@@ -4605,6 +4604,20 @@ function isGitRepo(dir) {
4605
4604
  }
4606
4605
 
4607
4606
  // src/app/agent/core/context-api/context_manager.ts
4607
+ function isEndTurnToolCall(tc) {
4608
+ if (tc.function.name === "agent_end_turn") {
4609
+ return true;
4610
+ }
4611
+ if (tc.function.name === "message") {
4612
+ try {
4613
+ const args = JSON.parse(tc.function.arguments);
4614
+ return args.message_type === "result";
4615
+ } catch {
4616
+ return false;
4617
+ }
4618
+ }
4619
+ return false;
4620
+ }
4608
4621
  function createApiContextWindow(fullHistory, maxTurns) {
4609
4622
  if (!fullHistory.length) {
4610
4623
  return [];
@@ -4626,7 +4639,7 @@ function createApiContextWindow(fullHistory, maxTurns) {
4626
4639
  for (let i = conversationHistory.length - 1; i >= 0; i--) {
4627
4640
  const msg = conversationHistory[i];
4628
4641
  currentTurn.unshift(msg);
4629
- const endsWithAgentEnd = msg.role === "assistant" && msg.tool_calls?.some((tc) => tc.function.name === "agent_end_turn");
4642
+ const endsWithAgentEnd = msg.role === "assistant" && msg.tool_calls?.some((tc) => isEndTurnToolCall(tc));
4630
4643
  if (endsWithAgentEnd) {
4631
4644
  turns.unshift([...currentTurn]);
4632
4645
  currentTurn = [];
@@ -4638,7 +4651,7 @@ function createApiContextWindow(fullHistory, maxTurns) {
4638
4651
  }
4639
4652
  const prev = conversationHistory[i - 1];
4640
4653
  if (msg.role === "user" && !isDevOverlay(msg)) {
4641
- if (prev && prev.role === "assistant" && !prev.tool_calls?.some((tc) => tc.function.name === "agent_end_turn")) {
4654
+ if (prev && prev.role === "assistant" && !prev.tool_calls?.some((tc) => isEndTurnToolCall(tc))) {
4642
4655
  const hasNonOverlay = currentTurn.some((m) => m.role !== "user" || !isDevOverlay(m));
4643
4656
  if (hasNonOverlay) {
4644
4657
  turns.unshift([...currentTurn]);
@@ -4813,7 +4826,7 @@ var BluMaAgent = class {
4813
4826
  mcpClient;
4814
4827
  feedbackSystem;
4815
4828
  skillLoader;
4816
- maxContextTurns = 30;
4829
+ maxContextTurns = 5;
4817
4830
  isInterrupted = false;
4818
4831
  constructor(sessionId2, eventBus2, llm, model, mcpClient, feedbackSystem) {
4819
4832
  this.sessionId = sessionId2;
@@ -5054,9 +5067,9 @@ ${editData.error.display}`;
5054
5067
  let hasEmittedStart = false;
5055
5068
  let reasoningContent = "";
5056
5069
  const stream = llmService.chatCompletionStream({
5057
- model: "x-ai/grok-code-fast-1",
5070
+ model: this.model,
5058
5071
  messages: contextWindow,
5059
- temperature: 0.3,
5072
+ temperature: 0,
5060
5073
  tools: this.mcpClient.getAvailableTools(),
5061
5074
  tool_choice: "required",
5062
5075
  parallel_tool_calls: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",