fluxflow-cli 1.8.24 → 1.8.25

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 +18 -17
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -740,7 +740,7 @@ var init_janitor_tools = __esm({
740
740
  JANITOR_TOOLS_PROTOCOL = (isMemoryEnabled = true, needTitle = true) => `
741
741
  ${needTitle ? `-- START CHAT MANAGEMENT TOOLS --
742
742
  1. YOU MUST UPDATE CHAT TITLE (URGENT PRIORITY):
743
- tool:functions.chat(title='<short creative title of FULL conversation in 3-5 words>')
743
+ tool:functions.chat(title='<short creative title of FULL conversation in 3-5 words>') // consider full chat context to generate title NOT just latest message.
744
744
  -- END CHAT MANAGEMENT TOOLS --
745
745
 
746
746
  ` : ""}
@@ -2486,18 +2486,17 @@ var init_ai = __esm({
2486
2486
  janitorContents.push({ role: "user", parts: [{ text: janitorPrompt }] });
2487
2487
  let finalSynthesis = "";
2488
2488
  let attempts = 0;
2489
- const MAX_JANITOR_RETRIES = 2;
2489
+ const MAX_JANITOR_RETRIES = 4;
2490
2490
  while (attempts <= MAX_JANITOR_RETRIES) {
2491
2491
  try {
2492
2492
  if (!await checkQuota("background", settings)) {
2493
- console.warn("Quota Exhausted for Background Model. Skipping refinement.");
2494
2493
  return;
2495
2494
  }
2496
2495
  let fullContent = "";
2497
2496
  let lastUsage = null;
2498
2497
  try {
2499
2498
  const timeoutPromise = new Promise(
2500
- (_, reject) => setTimeout(() => reject(new Error("JANITOR_TIMEOUT")), attempts === 1 ? 25e3 : attempts === 2 ? 2e4 : 3e4)
2499
+ (_, reject) => setTimeout(() => reject(new Error("JANITOR_TIMEOUT")), 6e4)
2501
2500
  );
2502
2501
  const streamPromise = (async () => {
2503
2502
  const stream = await client.models.generateContentStream({
@@ -2537,9 +2536,6 @@ var init_ai = __esm({
2537
2536
  }
2538
2537
  }
2539
2538
  } catch (e) {
2540
- if (e.message === "JANITOR_TIMEOUT") {
2541
- console.error("Janitor API Timeout: No tokens received within 30s.");
2542
- }
2543
2539
  throw e;
2544
2540
  }
2545
2541
  if (fullContent) {
@@ -2582,7 +2578,7 @@ DEBUG [${date}]: ${finalSynthesis}
2582
2578
 
2583
2579
  `);
2584
2580
  if (attempts > MAX_JANITOR_RETRIES) break;
2585
- const backoff = Math.min(1e3 * Math.pow(2, attempts - 1), 5e3);
2581
+ const backoff = Math.min(1e3 * Math.pow(2, attempts - 1), 8e3);
2586
2582
  await new Promise((resolve) => setTimeout(resolve, backoff));
2587
2583
  }
2588
2584
  }
@@ -2799,7 +2795,7 @@ DEBUG [${date}]: ${finalSynthesis}
2799
2795
  modifiedHistory.push({ role: "user", text: firstUserMsg });
2800
2796
  let lastUsage = null;
2801
2797
  const MAX_LOOPS = mode === "Flux" ? 50 : 7;
2802
- const MAX_RETRIES = 8;
2798
+ const MAX_RETRIES = 16;
2803
2799
  yield { type: "status", content: "Connecting..." };
2804
2800
  TERMINATION_SIGNAL = false;
2805
2801
  let fullAgentResponseChunks = [];
@@ -2865,10 +2861,10 @@ DEBUG [${date}]: ${finalSynthesis}
2865
2861
  throw new Error("Error: Daily Quota Exausted for Agent");
2866
2862
  }
2867
2863
  let targetModel = modelName;
2868
- if (retryCount === 7) {
2864
+ if (retryCount === MAX_RETRIES - 1) {
2869
2865
  targetModel = "gemini-3-flash-preview";
2870
2866
  yield { type: "model_update", content: "Trying with fallback model" };
2871
- } else if (retryCount >= 8) {
2867
+ } else if (retryCount === MAX_RETRIES) {
2872
2868
  targetModel = "gemini-3.1-flash-lite-preview";
2873
2869
  yield { type: "model_update", content: "Trying with fallback model lite" };
2874
2870
  } else if (retryCount > 0) {
@@ -3198,15 +3194,17 @@ ${boxBottom}
3198
3194
  if (turnText.trim().length > 0) {
3199
3195
  if (inStreamRetryCount <= MAX_RETRIES) {
3200
3196
  inStreamRetryCount++;
3201
- const waitTime = Math.min(1e3 * Math.pow(2, inStreamRetryCount - 1), 16e3);
3197
+ const waitTime = Math.min(1e3 * Math.pow(2, inStreamRetryCount - 1), 24e3);
3202
3198
  modifiedHistory.push({ role: "agent", text: turnText });
3203
3199
  if (toolResults.length > 0) {
3204
3200
  toolResults.forEach((tr) => modifiedHistory.push(tr));
3205
3201
  }
3206
3202
  modifiedHistory.push({ role: "user", text: "[SYSTEM] Response got cut for internal error, continue from checkpoint seamlessly and DON'T repeat what you already said!" });
3207
3203
  accumulatedContext += turnText;
3208
- yield { type: "status", content: `Error Occured. Recovering Stream (${inStreamRetryCount}/${MAX_RETRIES}) [${(waitTime / 1e3).toFixed(0)}s]...` };
3209
- await new Promise((resolve) => setTimeout(resolve, waitTime));
3204
+ for (let i = waitTime / 1e3; i > 0; i--) {
3205
+ yield { type: "status", content: `Error Occured. Recovering Stream (${inStreamRetryCount}/${MAX_RETRIES}) [${i}s]...` };
3206
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
3207
+ }
3210
3208
  yield { type: "status", content: `Error Occured. Recovering Stream...` };
3211
3209
  } else {
3212
3210
  throw new Error(`Stream collapsed too many times. (Failed to resolve ${MAX_RETRIES} times)
@@ -3215,10 +3213,13 @@ Error Log can be found in ${path16.join(LOGS_DIR, "agent", "error.log")}`);
3215
3213
  } else {
3216
3214
  if (retryCount <= MAX_RETRIES) {
3217
3215
  retryCount++;
3218
- const waitTime = Math.min(1e3 * Math.pow(2, retryCount - 1), 16e3);
3216
+ const waitTime = Math.min(1e3 * Math.pow(2, retryCount - 1), 32e3);
3219
3217
  isInitialAttempt = true;
3220
3218
  yield { type: "status", content: `Retrying Connection (${retryCount}/${MAX_RETRIES}) [${(waitTime / 1e3).toFixed(0)}s]...` };
3221
- await new Promise((resolve) => setTimeout(resolve, waitTime));
3219
+ for (let i = waitTime / 1e3; i > 0; i--) {
3220
+ yield { type: "status", content: `Retrying Connection (${retryCount}/${MAX_RETRIES}) [${i}s]...` };
3221
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
3222
+ }
3222
3223
  yield { type: "status", content: `Retrying Connection...` };
3223
3224
  } else {
3224
3225
  throw new Error(`Model cannot be reached. (Failed ${MAX_RETRIES} times)
@@ -5232,7 +5233,7 @@ var init_app = __esm({
5232
5233
  init_text();
5233
5234
  SESSION_START_TIME = Date.now();
5234
5235
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
5235
- versionFluxflow = "1.8.24";
5236
+ versionFluxflow = "1.8.25";
5236
5237
  updatedOn = "2026-05-11";
5237
5238
  ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
5238
5239
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.8.24",
3
+ "version": "1.8.25",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",