@nomad-e/bluma-cli 0.1.68 → 0.1.69

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 +0 -56
  2. package/package.json +2 -1
package/dist/main.js CHANGED
@@ -14204,51 +14204,6 @@ async function createApiContextWindow(fullHistory, currentAnchor, compressedTurn
14204
14204
  };
14205
14205
  }
14206
14206
 
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
14207
  // src/app/agent/core/llm/llm.ts
14253
14208
  init_runtime_config();
14254
14209
  import os23 from "os";
@@ -15524,17 +15479,6 @@ ${editData.error.display}`;
15524
15479
  this.sessionAnchor = newAnchor;
15525
15480
  this.compressedTurnSliceCount = newCompressedTurnSliceCount;
15526
15481
  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
15482
  const llmService = this.llm;
15539
15483
  if (typeof llmService.chatCompletionStream === "function") {
15540
15484
  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.69",
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",