fluxflow-cli 1.10.8 → 1.10.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/fluxflow.js +11 -2
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -3507,6 +3507,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
3507
3507
  let isDedupeActive = false;
3508
3508
  while (retryCount <= MAX_RETRIES && inStreamRetryCount <= MAX_RETRIES && !success && !TERMINATION_SIGNAL) {
3509
3509
  try {
3510
+ turnText = "";
3510
3511
  if (isInitialAttempt) {
3511
3512
  if (process.stdout.isTTY) {
3512
3513
  process.stdout.write(`\x1B]0;Working...\x07`);
@@ -3623,7 +3624,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
3623
3624
  turnText += chunk.text;
3624
3625
  yield { type: "text", content: chunk.text };
3625
3626
  }
3626
- const signalSafeText2 = getSanitizedText(turnText);
3627
+ const signalSafeText3 = getSanitizedText(turnText);
3627
3628
  const toolContext = getActiveToolContext(turnText);
3628
3629
  if (toolContext.inside) {
3629
3630
  if (!lastToolEventTime) lastToolEventTime = Date.now();
@@ -3717,7 +3718,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
3717
3718
  await new Promise((resolve) => setTimeout(resolve, 3e3));
3718
3719
  break;
3719
3720
  }
3720
- const responseContent = signalSafeText2.trim();
3721
+ const responseContent = signalSafeText3.trim();
3721
3722
  const respSentences = responseContent.split(/[.!?]\s+/);
3722
3723
  const uniqueRespSentences = new Set(respSentences);
3723
3724
  const respRepetitionRatio = respSentences.length > 10 ? (respSentences.length - uniqueRespSentences.size) / respSentences.length : 0;
@@ -3993,6 +3994,13 @@ ${boxBottom}` };
3993
3994
  dedupeBuffer = "";
3994
3995
  }
3995
3996
  if (TERMINATION_SIGNAL) break;
3997
+ const signalSafeText2 = (turnText || "").trim();
3998
+ const hasFinish2 = /\[\s*(turn\s*:)?\s*finish\s*\]/i.test(signalSafeText2.toLowerCase());
3999
+ const hasContinue = /\[\s*(turn\s*:)?\s*continue\s*\]/i.test(signalSafeText2.toLowerCase());
4000
+ const didCallTool = toolResults.length > 0 || lastToolSniffed !== null;
4001
+ if (!hasFinish2 && !hasContinue && !didCallTool && signalSafeText2.length > 0) {
4002
+ throw new Error("Silent stream cutoff (500): Model stream closed cleanly but missing turn finish/continue signals.");
4003
+ }
3996
4004
  success = true;
3997
4005
  await incrementUsage("agent");
3998
4006
  } catch (err) {
@@ -4021,6 +4029,7 @@ ${boxBottom}` };
4021
4029
  const agentErrDir = path15.join(LOGS_DIR, "agent");
4022
4030
  if (!fs16.existsSync(agentErrDir)) fs16.mkdirSync(agentErrDir, { recursive: true });
4023
4031
  fs16.appendFileSync(path15.join(agentErrDir, "error.log"), `ERROR [${date}]: ${errLog}
4032
+ DEBUG STATE: turnText='${turnText}', length=${turnText.trim().length}, inStreamRetryCount=${inStreamRetryCount}, retryCount=${retryCount}, isDedupeActive=${isDedupeActive}, dedupeBuffer='${dedupeBuffer}'
4024
4033
 
4025
4034
  ----------------------------------------------------------------------
4026
4035
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.10.8",
3
+ "version": "1.10.10",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",