fluxflow-cli 1.7.17 → 1.7.18

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 +22 -21
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -725,9 +725,9 @@ tool:functions.tool_name(arguments)
725
725
  2. Web Scrape: tool:functions.web_scrape(url="<url>"). provides detail from a URL.
726
726
  ${mode === "Flux" ? `
727
727
  - DEV & FILE TOOLS (Available in FLUX MODE ONLY) -
728
- 1. View File: tool:functions.view_file(path="relative/path", start_line=number, end_line=number). Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided. YOU CAN ALSO USE THIS TOOL TO SEE IMAGES AND DOCUMENTS IN A FOLDER. IF USER ASK HOW TO SHARE A IMAGE TELL THEM TO PASTE THE IMAGE IN THE CURRENT FOLDER.
728
+ 1. View File: tool:functions.view_file(path="relative/path", start_line=number, end_line=number). Reads file content. Auto-truncates at 500 lines unless start_line and end_line are provided. YOU CAN ALSO USE THIS TOOL TO SEE IMAGES AND DOCUMENTS IN A FOLDER. IF USER ASK HOW TO SHARE A IMAGE TELL THEM TO PASTE THE IMAGE IN THE CURRENT FOLDER. IF USER GIVES A IMAGE/DOCUMENT, YOU MUST SEE IT FIRST BEFORE DOING ANYTHING.
729
729
  2. List Files: tool:functions.list_files(path="relative/path"). Lists content of a directory.
730
- 3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory.
730
+ 3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory. Prefer this one over list_files.
731
731
  4. Write File: tool:functions.write_file(path="path", content="content"). Creates/Overwrites. NO CODE BLOCKS. RETURNS: Disk verification + original content (if overwritten) for 100% reversibility. Escape your double quotes '"' using backslash.
732
732
  5. Update File: tool:functions.update_file(path="relative/path", content_to_replace="old", content_to_add="new"). Surgical patching. RETURNS: High-fidelity visual diff and old code block. You MUST verify that the change specifically matches your intent using the returned diff. PREFFER UPDATE FILE OVER WRITE FILE if file already exists for better reversal tracking (if a file has 500+ lines, try to stick with update_file over full-rewrite). DONT WRAP UPDATE FILE CALL CONTENT IN MARKDOWN CODE BLOCKS.
733
733
  6. Write PDF: tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait/landscape"). Generates a professional PDF document. Orientation are optional. A4 size page will be used, so any multi-page PDFs calculate your alightment and page breaks to not mess up A4 page layout. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT, USE full 100vh & 100vw for page area. ENSURE THE CONTENT IS NEVER BROKEN IN BETWEEN PAGES, USE PAGE BREAKS PROACTIVELY FOR A A4 PAGE LAYOUT. Keep generous margins for better redability.
@@ -739,9 +739,9 @@ ${mode === "Flux" ? `
739
739
  - Supported Styles: background-color, color, font-family, font-size (use 'pt'), font-style (italic), font-weight (bold), margin, text-align, text-shadow.
740
740
  9. Execution: tool:functions.exec_command(command="terminal command"). Runs a shell command. Use ask tool to confirm before executing any destructive or irreversible operations.
741
741
 
742
- AFTER GETTING THE TOOL RESULT, YOU MUST VERIFY THAT ITS A SUCCESS, IF IT GIVES A ERROR, TELL THE USER AND TRY TO FIX IF YOU CAN. DO NOT HALLUCINATE SUCCESS IF TOOL RETURNS ERROR.
743
-
744
- **CRITICAL POLICY: WHEN WRITING/UPDATING FILES, ALWAYS USE ACTUAL NEW LINE CONTROL CHARACTER (LF) FOR LINE BREAKS.**`.trim() : `
742
+ AFTER GETTING THE TOOL RESULT, YOU MUST VERIFY THAT ITS A SUCCESS, IF IT GIVES A ERROR, TELL THE USER AND TRY TO FIX IF YOU CAN. DO NOT HALLUCINATE SUCCESS IF TOOL RETURNS ERROR.
743
+ NEVER GUESS A CODE, IF UNSURE READ THE FILE FIRST BEFORE EDITING IT.
744
+ **CRITICAL POLICY: WHEN WRITING/UPDATING FILES, ALWAYS USE ACTUAL NEW LINE CONTROL CHARACTER (LF) FOR LINE BREAKS.**`.trim() : `
745
745
  - DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
746
746
  -----------------
747
747
 
@@ -789,9 +789,9 @@ var thinking_prompts_default;
789
789
  var init_thinking_prompts = __esm({
790
790
  "src/data/thinking_prompts.json"() {
791
791
  thinking_prompts_default = {
792
- Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nRULES OF THINKING: -HEADING COUNT SHOULD BE 12 - 20. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES **MUST** BE **8 - 12** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n- SHOULD PLAN ARCHITECHTURALLY.\n- SHOULD PLAN LOGICALLY.\n\n-- END THINKING INSTRUCTIONS --",
793
- High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 8 - 12. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES **MUST** BE **6 - 8** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n\n-- END THINKING INSTRUCTIONS --",
794
- Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 2 - 4. SELF-MONOLOGUE SHOULD BE SHORT YET THROROUGH. MONOLOGUES **MUST** BE **4 - 6** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- LITTLE TO NO THINKING IS PREFFERED IF QUERY IS CONVERSATIONAL AND SIMPLE.\n\n-- END THINKING INSTRUCTIONS --",
792
+ Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nRULES OF THINKING: -HEADING COUNT SHOULD BE 8 - 16. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES **MUST** BE **8 - 10** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n- SHOULD PLAN ARCHITECHTURALLY.\n- SHOULD PLAN LOGICALLY.\n\n-- END THINKING INSTRUCTIONS --",
793
+ High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 4 - 8. SELF-MONOLOGUE SHOULD BE DETAILED AND THROROUGH. MONOLOGUES **MUST** BE **4 - 8** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- CONSIDER ABOUT EDGE CASES BEFORE COMMITING.\n\n-- END THINKING INSTRUCTIONS --",
794
+ Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 2 - 4. SELF-MONOLOGUE SHOULD BE SHORT YET THROROUGH. MONOLOGUES **MUST** BE **2 - 4** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- LITTLE TO NO THINKING IS PREFFERED IF QUERY IS CONVERSATIONAL AND SIMPLE.\n\n-- END THINKING INSTRUCTIONS --",
795
795
  Minimal: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: LOW\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSELF-MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\n\nnRULES OF THINKING: -HEADING COUNT SHOULD BE 0 - 2. SELF-MONOLOGUE SHOULD BE SHORT AND CONCISE. MONOLOGUES **MUST** BE **1 - 2** LINES EACH REGARDLESS OF QUERY COMPLEXITY.\n- YOU MUST **NOT** EXCREED YOUR ALLOTED THINKING BUDGET UNDER **ANY** CIRCUMSTANCES.\n- IF THE QUERY IS SIMPLE, YOU CAN KEEP HEADING COUNT LESS THAN MIN COUNT.\n- NO THINKING IS PREFFERED IF QUERY IS CONVERSATIONAL AND SIMPLE.\n\n-- END THINKING INSTRUCTIONS --"
796
796
  };
797
797
  }
@@ -1317,7 +1317,7 @@ Snippet: ${snippet}`;
1317
1317
  const finalResults = results.join("\n\n");
1318
1318
  const toolLogDir = path6.join(LOGS_DIR, "tools");
1319
1319
  if (!fs6.existsSync(toolLogDir)) fs6.mkdirSync(toolLogDir, { recursive: true });
1320
- fs6.appendFileSync(path6.join(toolLogDir, "search-results.log"), `SEARCH ${(/* @__PURE__ */ new Date()).toISOString()} - Query: [${query}]. Count: ${results.length}.
1320
+ fs6.appendFileSync(path6.join(toolLogDir, "search-results.log"), `SEARCH ${(/* @__PURE__ */ new Date()).toLocaleString()} - Query: [${query}]. Count: ${results.length}.
1321
1321
  Content:
1322
1322
  ${finalResults}
1323
1323
 
@@ -1415,7 +1415,7 @@ var init_web_scrape = __esm({
1415
1415
  const cleanedHtml = htmlContent.replace(/\s+/g, " ").replace(/>\s+</g, "><").trim().substring(0, 3e4);
1416
1416
  const toolLogDir = path7.join(LOGS_DIR, "tools");
1417
1417
  if (!fs7.existsSync(toolLogDir)) fs7.mkdirSync(toolLogDir, { recursive: true });
1418
- fs7.appendFileSync(path7.join(toolLogDir, "search-scraped.log"), `PUPPETEER ${(/* @__PURE__ */ new Date()).toISOString()} - URL: [${url}]. Length: ${cleanedHtml.length}.
1418
+ fs7.appendFileSync(path7.join(toolLogDir, "search-scraped.log"), `PUPPETEER ${(/* @__PURE__ */ new Date()).toLocaleString()} - URL: [${url}]. Length: ${cleanedHtml.length}.
1419
1419
  Content:
1420
1420
  ${cleanedHtml}${htmlContent.length > 3e4 ? "\n\n[TRUNCATED AT 30K CHARS]" : ""}
1421
1421
 
@@ -1463,7 +1463,7 @@ var init_memory = __esm({
1463
1463
  if (!content) return "ERROR: Missing 'content' for temp memory.";
1464
1464
  const tempStorage = readEncryptedJson(TEMP_MEM_FILE, {});
1465
1465
  if (!tempStorage[chatId]) tempStorage[chatId] = [];
1466
- const MAX_CHARS = 5e3 * 4;
1466
+ const MAX_CHARS = 2500 * 4;
1467
1467
  let currentTotalLength = tempStorage[chatId].reduce((acc, m) => acc + m.length, 0);
1468
1468
  while (tempStorage[chatId].length > 0 && currentTotalLength + content.length > MAX_CHARS) {
1469
1469
  const removed = tempStorage[chatId].shift();
@@ -1477,7 +1477,7 @@ var init_memory = __esm({
1477
1477
  const memories = readEncryptedJson(MEMORIES_FILE, []);
1478
1478
  if (method === "add") {
1479
1479
  if (!content) return "ERROR: Missing 'content' for memory addition.";
1480
- const MAX_CHARS = 3e3 * 4;
1480
+ const MAX_CHARS = 2e3 * 4;
1481
1481
  let currentTotalLength = memories.reduce((acc, m) => acc + (m.memory?.length || 0), 0);
1482
1482
  while (memories.length > 0 && currentTotalLength + content.length > MAX_CHARS) {
1483
1483
  const removed = memories.shift();
@@ -2463,6 +2463,7 @@ USER_PROMPT: ${agentText}`.trim();
2463
2463
  }
2464
2464
  if (TERMINATION_SIGNAL) {
2465
2465
  yield { type: "status", content: "Termination Signal Received." };
2466
+ await new Promise((resolve) => setTimeout(resolve, 1500));
2466
2467
  break;
2467
2468
  }
2468
2469
  if (steeringCallback) {
@@ -2500,10 +2501,10 @@ USER_PROMPT: ${agentText}`.trim();
2500
2501
  let targetModel = modelName;
2501
2502
  if (retryCount === 5) {
2502
2503
  targetModel = "gemini-3-flash-preview";
2503
- yield { type: "model_update", content: "Trying with fallback model (v3)" };
2504
+ yield { type: "model_update", content: "Trying with fallback model" };
2504
2505
  } else if (retryCount >= 6) {
2505
2506
  targetModel = "gemini-3.1-flash-lite-preview";
2506
- yield { type: "model_update", content: "Trying with fallback model (v3.1)" };
2507
+ yield { type: "model_update", content: "Trying with fallback model lite" };
2507
2508
  } else if (retryCount > 0) {
2508
2509
  yield { type: "model_update", content: null };
2509
2510
  }
@@ -2522,7 +2523,7 @@ USER_PROMPT: ${agentText}`.trim();
2522
2523
  yield { type: "status", content: "Working..." };
2523
2524
  } catch (err) {
2524
2525
  const errMsg = err.status || err.error && err.error.message || String(err);
2525
- const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " ");
2526
+ const date = (/* @__PURE__ */ new Date()).toLocaleString();
2526
2527
  const agentErrDir = path16.join(LOGS_DIR, "agent");
2527
2528
  if (!fs16.existsSync(agentErrDir)) fs16.mkdirSync(agentErrDir, { recursive: true });
2528
2529
  fs16.appendFileSync(path16.join(agentErrDir, "error.log"), `ERROR [${date}]: ${errMsg}
@@ -2742,7 +2743,7 @@ ${boxBottom}
2742
2743
  const hasFinish = /\[\s*(turn\s*:)?\s*finish\s*\]/i.test(turnText.toLowerCase());
2743
2744
  const shouldContinue = toolCallPointer > 0;
2744
2745
  yield { type: "status", content: "Working..." };
2745
- const cleanedTurnText = turnText.replace(/<think>[\s\S]*?<\/think>/g, "").replace(/\[\s*(turn\s*:)?\s*(continue|finish)\s*\]/gi, "").trim();
2746
+ const cleanedTurnText = turnText.replace(/\[\s*(turn\s*:)?\s*(continue|finish)\s*\]/gi, "").trim();
2746
2747
  let isActuallyFinished = hasFinish && !shouldContinue;
2747
2748
  if (isActuallyFinished) {
2748
2749
  yield { type: "status", content: "Finalizing..." };
@@ -2779,7 +2780,7 @@ ${boxBottom}
2779
2780
  const parts = janitorResult.candidates?.[0]?.content?.parts;
2780
2781
  if (parts && parts[1]?.text) {
2781
2782
  finalSynthesis = parts[1].text;
2782
- const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " ");
2783
+ const date = (/* @__PURE__ */ new Date()).toLocaleString();
2783
2784
  const janitorLogDir = path16.join(LOGS_DIR, "janitor");
2784
2785
  if (!fs16.existsSync(janitorLogDir)) {
2785
2786
  fs16.mkdirSync(janitorLogDir, { recursive: true });
@@ -2798,7 +2799,7 @@ ${boxBottom}
2798
2799
  for (const janitorToolCall of janitorToolCalls) {
2799
2800
  const toolContext = { chatId, sessionId: chatId, history };
2800
2801
  const result = await dispatchTool(janitorToolCall.toolName, janitorToolCall.args, toolContext);
2801
- const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " ");
2802
+ const date = (/* @__PURE__ */ new Date()).toLocaleString();
2802
2803
  const janitorLogDir = path16.join(LOGS_DIR, "janitor");
2803
2804
  fs16.appendFileSync(path16.join(janitorLogDir, "debug.log"), `DEBUG [${date}]: RESULT [${janitorToolCall.toolName}]: ${result}
2804
2805
  `);
@@ -2807,7 +2808,7 @@ ${boxBottom}
2807
2808
  }
2808
2809
  }
2809
2810
  } catch (janitorErr) {
2810
- const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace("T", " ");
2811
+ const date = (/* @__PURE__ */ new Date()).toLocaleString();
2811
2812
  const janitorErrDir = path16.join(LOGS_DIR, "janitor");
2812
2813
  if (!fs16.existsSync(janitorErrDir)) {
2813
2814
  fs16.mkdirSync(janitorErrDir, { recursive: true });
@@ -4732,8 +4733,8 @@ var init_app = __esm({
4732
4733
  init_text();
4733
4734
  SESSION_START_TIME = Date.now();
4734
4735
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4735
- versionFluxflow = "1.7.17";
4736
- updatedOn = "2026-05-05";
4736
+ versionFluxflow = "1.7.18";
4737
+ updatedOn = "2026-05-06";
4737
4738
  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(
4738
4739
  CommandMenu,
4739
4740
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.7.17",
3
+ "version": "1.7.18",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",