@nomad-e/bluma-cli 0.1.68 → 0.1.70

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 +2 -56
  2. package/package.json +2 -1
package/dist/main.js CHANGED
@@ -13798,6 +13798,8 @@ Use **both** API **reasoning** (when available) **and** the \`message\` tool. Re
13798
13798
  - **Stay audible:** Your **default** in multi-step work is to call \`message\` with \`message_type: "info"\` **early and often** \u2014 not optional polish. **Bias toward sending \`info\`** after discoveries, failures, and before long tool chains; **several \`info\` calls per turn** is normal and expected. Do **not** hide behind tools or reasoning only; \`info\` is how the user follows along.
13799
13799
  - **Ask when uncertain:** Use \`ask_user_question\` when you encounter ambiguity, need clarification, or face multiple valid approaches. Do not assume \u2014 ask the user to make decisions about their preferences, requirements, or implementation choices. This tool is your primary mechanism for resolving uncertainty.
13800
13800
  - **Team-first mindset:** For any non-trivial task, prefer spawning parallel workers over doing it yourself. One AI is good; a coordinated team of 3-7 workers is exponentially better. Break work into research \u2192 implementation \u2192 verification phases, each handled by specialist workers. You are the PO \u2014 orchestrate, synthesize, verify, deliver.
13801
+ - **Engineer mindset \u2014 question anomalies:** When something seems wrong (memory loss, unexpected behavior, aggressive defaults), **investigate deeply**. Do not accept "it's working as designed". Trace the code, find the root cause, and **have courage to revert** if a feature breaks core functionality. Protect the session, memory, and stability above all.
13802
+ - **Courage to reverse:** If you discover a path is wrong (e.g., a "feature" that destroys context, a default that's too aggressive), **stop immediately**, explain why it's broken, and revert/remove it. Better to undo a bad change than to let it cause harm. This is what separates a **thinking engineer** from a **blind executor**.
13801
13803
  - Large efforts: \`todo\`; parallel subtasks: \`spawn_agent\` with a clear scope + \`wait_agent\` / \`list_agents\`.
13802
13804
  - Respect the existing repo, \`<workspace_snapshot>\`, README/BluMa.md \u2014 no generic greenfield templates.
13803
13805
  - \`coding_memory\` for stable facts; chat history may be compressed.
@@ -14204,51 +14206,6 @@ async function createApiContextWindow(fullHistory, currentAnchor, compressedTurn
14204
14206
  };
14205
14207
  }
14206
14208
 
14207
- // src/app/agent/core/prompt/reactive_compact.ts
14208
- var totalCompactions = 0;
14209
- var lastCompactTurn = 0;
14210
- function isReactiveCompactEnabled() {
14211
- const env = process.env.BLUMA_REACTIVE_COMPACT;
14212
- if (env === "false" || env === "0") return false;
14213
- return true;
14214
- }
14215
- function tryReactiveCompact(messages) {
14216
- if (!isReactiveCompactEnabled()) {
14217
- return null;
14218
- }
14219
- if (messages.length <= 5) {
14220
- return { compacted: false, summaryMessages: messages };
14221
- }
14222
- const systemMsgs = [];
14223
- let conversationStart = 0;
14224
- for (let i = 0; i < messages.length; i++) {
14225
- if (messages[i].role === "system") {
14226
- systemMsgs.push(messages[i]);
14227
- conversationStart = i + 1;
14228
- } else {
14229
- break;
14230
- }
14231
- }
14232
- const conversation = messages.slice(conversationStart);
14233
- if (conversation.length <= 6) {
14234
- return { compacted: false, summaryMessages: messages };
14235
- }
14236
- const KEEP_TURNS = 6;
14237
- const recentMessages = conversation.slice(-KEEP_TURNS);
14238
- const omittedCount = conversation.length - KEEP_TURNS;
14239
- const summaryMessage = {
14240
- role: "system",
14241
- content: `[Previous conversation summary: ${omittedCount} messages were compacted. The conversation covered various topics. Continue from the most recent context above.]`
14242
- };
14243
- const compacted = [...systemMsgs, summaryMessage, ...recentMessages];
14244
- totalCompactions++;
14245
- lastCompactTurn = totalCompactions;
14246
- return {
14247
- compacted: true,
14248
- summaryMessages: compacted
14249
- };
14250
- }
14251
-
14252
14209
  // src/app/agent/core/llm/llm.ts
14253
14210
  init_runtime_config();
14254
14211
  import os23 from "os";
@@ -15524,17 +15481,6 @@ ${editData.error.display}`;
15524
15481
  this.sessionAnchor = newAnchor;
15525
15482
  this.compressedTurnSliceCount = newCompressedTurnSliceCount;
15526
15483
  this.persistSession();
15527
- if (isReactiveCompactEnabled() && contextWindow.length > 20) {
15528
- const compactResult = tryReactiveCompact(contextWindow);
15529
- if (compactResult && compactResult.compacted) {
15530
- this.eventBus.emit("backend_message", {
15531
- type: "info",
15532
- message: `Context compacted: ${compactResult.summaryMessages.length} messages (was ${contextWindow.length})`
15533
- });
15534
- contextWindow.length = 0;
15535
- contextWindow.push(...compactResult.summaryMessages);
15536
- }
15537
- }
15538
15484
  const llmService = this.llm;
15539
15485
  if (typeof llmService.chatCompletionStream === "function") {
15540
15486
  await this._handleStreamingResponse(contextWindow);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomad-e/bluma-cli",
3
- "version": "0.1.68",
3
+ "version": "0.1.70",
4
4
  "description": "BluMa independent agent for automation and advanced software engineering.",
5
5
  "author": "Alex Fonseca",
6
6
  "license": "Apache-2.0",
@@ -50,6 +50,7 @@
50
50
  "keywords": [],
51
51
  "dependencies": {
52
52
  "@modelcontextprotocol/sdk": "^1.17.0",
53
+ "@nomad-e/bluma-cli": "^0.1.68",
53
54
  "chalk": "^5.5.0",
54
55
  "clipboardy": "^5.3.1",
55
56
  "diff": "^8.0.2",