fluxflow-cli 1.11.1 → 1.11.2

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/fluxflow.js +11 -4
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -1095,7 +1095,7 @@ ${TOOL_PROTOCOL(mode)}
1095
1095
  ${projectContextBlock}
1096
1096
 
1097
1097
  -- MEMORY RULES --
1098
- - Memory: ${isMemoryEnabled ? "Use to subtly personalize. Auto Saves" : "OFF. Decline Saves"}
1098
+ - Memory: ${isMemoryEnabled ? "Use to subtly personalize. Auto Saves" : "OFF. Decline saving new memories"}
1099
1099
  - Time: Logs are timestamped. RELATIVE TIME REFERENCE e.g. few mins ago
1100
1100
 
1101
1101
  -- SECURITY RULES --
@@ -1109,7 +1109,7 @@ ${projectContextBlock}
1109
1109
 
1110
1110
  -- RESPONSE RULES --
1111
1111
  - End with [turn: continue] for more steps or [turn: finish] when done
1112
- - Always end with [turn: continue] if called any tools
1112
+ - Tool Called? No post tool chat until [turn: continue]
1113
1113
  - Task Complete? End loop with [turn: finish]
1114
1114
  [/SYSTEM]`.trim();
1115
1115
  };
@@ -3799,6 +3799,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
3799
3799
  let toolCallPointer = 0;
3800
3800
  let isThinkingLoop = false;
3801
3801
  let isStutteringLoop = false;
3802
+ let isGeneralLoop = false;
3802
3803
  let isInitialAttempt = true;
3803
3804
  let accumulatedContext = "";
3804
3805
  let dedupeBuffer = "";
@@ -4023,6 +4024,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
4023
4024
  if (respRepetitionRatio > repetitionThresholdResponse) {
4024
4025
  yield { type: "status", content: `Response Loop Detected. Re-centering...` };
4025
4026
  isThinkingLoop = false;
4027
+ isGeneralLoop = true;
4026
4028
  await new Promise((resolve) => setTimeout(resolve, 3e3));
4027
4029
  break;
4028
4030
  }
@@ -4296,8 +4298,10 @@ ${boxBottom}` };
4296
4298
  const hasFinish2 = /\[\s*(turn\s*:)?\s*finish\s*\]/i.test(signalSafeText2.toLowerCase());
4297
4299
  const hasContinue = /\[\s*(turn\s*:)?\s*continue\s*\]/i.test(signalSafeText2.toLowerCase());
4298
4300
  const didCallTool = toolResults.length > 0 || lastToolSniffed !== null;
4299
- if (!hasFinish2 && !hasContinue && !didCallTool && signalSafeText2.length > 0) {
4300
- throw new Error("Silent stream cutoff (500): Model stream closed cleanly but missing turn finish/continue signals.");
4301
+ const pureOutputText = signalSafeText2.replace(/<think>[\s\S]*?<\/think>/gi, "").trim();
4302
+ const endsNormally = /[.!?}"'`’“”]$|```$/s.test(pureOutputText);
4303
+ if (!hasFinish2 && !hasContinue && !didCallTool && signalSafeText2.length > 0 && !endsNormally && !isThinkingLoop && !isStutteringLoop && !isGeneralLoop) {
4304
+ throw new Error("Silent stream cutoff (500): Model stream closed cleanly but cut off mid-sentence without signals.");
4301
4305
  }
4302
4306
  success = true;
4303
4307
  await incrementUsage("agent");
@@ -4376,6 +4380,8 @@ Error Log can be found in ${path15.join(LOGS_DIR, "agent", "error.log")}`);
4376
4380
  } else {
4377
4381
  if (retryCount <= MAX_RETRIES) {
4378
4382
  retryCount++;
4383
+ inStreamRetryCount = 1;
4384
+ accumulatedContext = "";
4379
4385
  const waitTime = Math.min(1e3 * Math.pow(2, retryCount - 1), 32e3);
4380
4386
  isInitialAttempt = true;
4381
4387
  yield { type: "status", content: `Retrying Connection (${retryCount}/${MAX_RETRIES}) [${(waitTime / 1e3).toFixed(0)}s]...` };
@@ -4438,6 +4444,7 @@ ${timestamp}`;
4438
4444
  modifiedHistory.push({ role: "user", text: `[SYSTEM] ${isStutteringLoop && !isThinkingLoop ? `STUTTERING DETECTED by Internal System. Re-calibrate your response & proceed.` : `${isThinkingLoop ? " OVER-THINKING" : " LOOP"} DETECTED by Internal System${isThinkingLoop ? " for current EFFORT_LEVEL" : ""}. ${isThinkingLoop ? "If you have planned the task, prioritize the execution/output. " : "If you have finished your task use [turn: finish] else continue."}`}` });
4439
4445
  isThinkingLoop = false;
4440
4446
  isStutteringLoop = false;
4447
+ isGeneralLoop = false;
4441
4448
  }
4442
4449
  }
4443
4450
  yield { type: "status", content: null };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",