fluxflow-cli 1.18.10 → 1.18.12

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.
package/README.md CHANGED
@@ -107,6 +107,7 @@ fluxflow [options]
107
107
  - `--auto-del <1d|7d|30d>`: Set automated chat log deletion schedule.
108
108
  - `--auto-exec <on|off>`: Toggle autonomous command execution permission.
109
109
  - `--external-access <on|off>`: Toggle permission to let agent read files outside CWD.
110
+ - `--thinking <Fast|Medium|High|xHigh>`: Override default thinking level.
110
111
 
111
112
  ---
112
113
 
package/dist/fluxflow.js CHANGED
@@ -584,7 +584,8 @@ var init_ChatLayout = __esm({
584
584
  return /* @__PURE__ */ React3.createElement(Text3, { color, wrap: "anywhere" }, parts.map((part, j) => {
585
585
  if (!part) return null;
586
586
  if (part.startsWith("```") && part.endsWith("```")) {
587
- return /* @__PURE__ */ React3.createElement(CodeRenderer, { key: j, text: part });
587
+ const content = part.slice(3, -3);
588
+ return /* @__PURE__ */ React3.createElement(Text3, { key: j, color: "cyan", backgroundColor: "#003333" }, " ", content, " ");
588
589
  }
589
590
  if (part.startsWith("**") && part.endsWith("**")) {
590
591
  return /* @__PURE__ */ React3.createElement(Text3, { key: j, bold: true, color: "white" }, /* @__PURE__ */ React3.createElement(InlineMarkdown, { text: part.slice(2, -2), color: "white" }));
@@ -1118,7 +1119,8 @@ var init_arg_parser = __esm({
1118
1119
  import { execSync } from "child_process";
1119
1120
  var _isPsAvailable, isPsAvailable, TOOL_PROTOCOL;
1120
1121
  var init_main_tools = __esm({
1121
- "src/data/main_tools.js"() {
1122
+ async "src/data/main_tools.js"() {
1123
+ await init_exec_command();
1122
1124
  _isPsAvailable = null;
1123
1125
  isPsAvailable = () => {
1124
1126
  if (process.platform !== "win32") return false;
@@ -1148,10 +1150,10 @@ Suggest best options; don't ask for preferences
1148
1150
  ${mode === "Flux" ? `- PROJECT TOOLS (path = relative to CWD) -
1149
1151
  1. [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. Supports images/docs. User gives image/doc: VIEW FIRST
1150
1152
  2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats
1151
- 3. [tool:functions.PatchFile(path="...", replaceContent1="exact string", newContent1="...", ...MAX 8)]. Surgical Patch. Unsure? ReadFile > guessing. Multiple blocks same file? Use replaceContent2, newContent2 etc.
1153
+ 3. [tool:functions.PatchFile(path="...", replaceContent1="exact string", newContent1="...", ...MAX 8)]. Surgical Patch. Unsure? ReadFile > guessing. Multiple patch same file? Use replaceContent2, newContent2 etc >>> tool spamming
1152
1154
  4. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile >> WriteFile. Verify Imports
1153
- 5. [tool:functions.SearchKeyword(keyword="...", file="path/to/file")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file
1154
- 6. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? "WINDOWS POWERSHELL ONLY" : "WINDOWS CMD" : "Bash"} command. Destructive/Irreversible ops -> Ask user
1155
+ 5. [tool:functions.SearchKeyword(keyword="...", file="optional")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file
1156
+ 6. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `${isPtyAvailable ? "Interactive " : ""}WINDOWS POWERSHELL ONLY` : `${isPtyAvailable ? "Interactive " : ""}WINDOWS CMD` : `${isPtyAvailable ? "Interactive " : ""}BASH`} command. Destructive/Irreversible ops -> Ask user
1155
1157
  7. [tool:functions.GenerateImage(path="... png", prompt="detailed", ratio="16:9, 9:16, 1:1")]. Usage: Mockups, PDF thumbnails, any visual content
1156
1158
  8. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout (100vh/vw)
1157
1159
  9. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
@@ -1174,7 +1176,7 @@ var pty, isPtyAvailable, stripAnsi, activeChildProcess, isActiveCommandPty, writ
1174
1176
  var init_exec_command = __esm({
1175
1177
  async "src/tools/exec_command.js"() {
1176
1178
  init_arg_parser();
1177
- init_main_tools();
1179
+ await init_main_tools();
1178
1180
  pty = null;
1179
1181
  try {
1180
1182
  const ptyModule = await import("node-pty");
@@ -1524,11 +1526,22 @@ var init_exec_command = __esm({
1524
1526
  activeChildProcess = ptyProcess;
1525
1527
  isActiveCommandPty = true;
1526
1528
  let output = "";
1529
+ let isResolved = false;
1527
1530
  ptyProcess.onData((data) => {
1528
- output += data;
1529
- if (onChunk) onChunk(data);
1531
+ if (!isResolved) {
1532
+ output += data;
1533
+ if (onChunk) onChunk(data);
1534
+ const cleanOut = stripAnsi(output);
1535
+ if (/(?:Network:\s+use\s+--host\s+to|Network:\s+Type\s+--host\s+to|Local:\s+http:\/\/localhost:\d+|ready in \d+\s*ms|Compiled successfully|Development server is running|Listening on:)/i.test(cleanOut)) {
1536
+ isResolved = true;
1537
+ setTimeout(() => resolve(`SUCCESS: Dev server started successfully in background.
1538
+
1539
+ ${cleanOut}`), 500);
1540
+ }
1541
+ }
1530
1542
  });
1531
1543
  ptyProcess.onExit(({ exitCode }) => {
1544
+ if (isResolved) return;
1532
1545
  activeChildProcess = null;
1533
1546
  const normalizedOutput = (output || "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
1534
1547
  const finalOutput = stripAnsi(normalizedOutput) || "Command executed with no output.";
@@ -1588,17 +1601,30 @@ ${finalOutput}`);
1588
1601
  }
1589
1602
  let stdout = "";
1590
1603
  let stderr = "";
1604
+ let isResolved = false;
1591
1605
  child.stdout.on("data", (data) => {
1592
- const chunk = data.toString();
1593
- stdout += chunk;
1594
- if (onChunk) onChunk(chunk);
1606
+ if (!isResolved) {
1607
+ const chunk = data.toString();
1608
+ stdout += chunk;
1609
+ if (onChunk) onChunk(chunk);
1610
+ const cleanOut = stripAnsi(stdout);
1611
+ if (/(?:Network:\s+use\s+--host\s+to|Network:\s+Type\s+--host\s+to|Local:\s+http:\/\/localhost:\d+|ready in \d+\s*ms|Compiled successfully|Development server is running|Listening on:)/i.test(cleanOut)) {
1612
+ isResolved = true;
1613
+ setTimeout(() => resolve(`SUCCESS: Dev server started successfully in background.
1614
+
1615
+ ${cleanOut}`), 500);
1616
+ }
1617
+ }
1595
1618
  });
1596
1619
  child.stderr.on("data", (data) => {
1597
- const chunk = data.toString();
1598
- stderr += chunk;
1599
- if (onChunk) onChunk(chunk);
1620
+ if (!isResolved) {
1621
+ const chunk = data.toString();
1622
+ stderr += chunk;
1623
+ if (onChunk) onChunk(chunk);
1624
+ }
1600
1625
  });
1601
1626
  child.on("close", (code) => {
1627
+ if (isResolved) return;
1602
1628
  activeChildProcess = null;
1603
1629
  const result = [];
1604
1630
  if (stdout) result.push(`STDOUT:
@@ -2331,8 +2357,8 @@ var init_thinking_prompts = __esm({
2331
2357
  import fs4 from "fs";
2332
2358
  var getMemoryPrompt, getSystemInstruction, getJanitorInstruction;
2333
2359
  var init_prompts = __esm({
2334
- "src/utils/prompts.js"() {
2335
- init_main_tools();
2360
+ async "src/utils/prompts.js"() {
2361
+ await init_main_tools();
2336
2362
  init_janitor_tools();
2337
2363
  init_thinking_prompts();
2338
2364
  getMemoryPrompt = (tempMemories = "", userMemories = "", isMemoryEnabled = true, isContext32k = false) => {
@@ -2392,7 +2418,7 @@ Identity: Flux Flow (by Kushal Roy Chowdhury). Sassy${mode === "Flux" ? ", No Fl
2392
2418
  Mode: ${mode}${thinkingLevel !== "Fast" ? " (Thinking Mode)" : ""}. ${mode === "Flux" ? "Logical, Highly Detailed, Task-Driven. Prioritizes scalable file/folder structures, modular architecture, clean code abstractions, step-by-step execution. Industry standard latest coding practices/libraries, clean code, Double Check Imports, Client-Server Sync" : "Conversational, Concise"}
2393
2419
 
2394
2420
  -- AGENT LOOP RULES (PRIORITY: HIGH) --
2395
- - **MUST END WITH [turn: continue] to continue loop OR [turn: finish] to END loop**
2421
+ - **MUST END WITH [turn: continue] to CONTINUE loop OR [turn: finish] to END loop**
2396
2422
  - Tool Called? No post tool response until [turn: continue]
2397
2423
  - NEVER USE [turn: continue] [turn:finish] together
2398
2424
 
@@ -4791,7 +4817,7 @@ import fs16 from "fs";
4791
4817
  var client, TERMINATION_SIGNAL, stripAnsi2, signalTermination, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, detectToolCalls, initAI, consolidatePastMemories, getAIStream;
4792
4818
  var init_ai = __esm({
4793
4819
  async "src/utils/ai.js"() {
4794
- init_prompts();
4820
+ await init_prompts();
4795
4821
  init_history();
4796
4822
  init_usage();
4797
4823
  await init_tools();
@@ -5826,7 +5852,7 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS CRITI
5826
5852
  } else if (isImage) {
5827
5853
  label = `\u{1F4F8} Viewed: ${targetPath2}`;
5828
5854
  } else {
5829
- label = `\u{1F4C4} Read: ${targetPath2} | ${sLine}-${actualEndLine} from ${totalLines} lines`;
5855
+ label = `\u{1F4C4} Read: ${targetPath2} \u2192 Lines ${sLine} - ${actualEndLine} of ${totalLines}`;
5830
5856
  }
5831
5857
  } else if (normToolName === "list_files" || normToolName === "read_folder") {
5832
5858
  const action = normToolName === "list_files" ? "List" : "Viewed";
@@ -6051,7 +6077,7 @@ ${boxBottom}` };
6051
6077
  matchCount = parseInt(m[1]);
6052
6078
  }
6053
6079
  }
6054
- const postLabel = `\u{1F50E} Searched: "${keyword}"${file ? ` in "${file}"` : " ./"} -> ${matchCount} Match${matchCount === 1 ? "" : "es"}`;
6080
+ const postLabel = `\u{1F50E} Searched: "${keyword}"${file ? ` in "${file}"` : " ./"} \u2192 ${matchCount} Match${matchCount === 1 ? "" : "es"}`;
6055
6081
  const boxWidth = Math.min(postLabel.length + 4, 115);
6056
6082
  const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
6057
6083
  const boxMid = `\u2502 ${postLabel.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
@@ -6795,6 +6821,19 @@ function App({ args = [] }) {
6795
6821
  } else if (arg === "--external-access" && args[i + 1]) {
6796
6822
  parsed.externalAccess = args[i + 1].toLowerCase();
6797
6823
  i++;
6824
+ } else if (arg === "--thinking" && args[i + 1]) {
6825
+ const val = args[i + 1];
6826
+ const lower = val.toLowerCase();
6827
+ if (["fast", "low", "medium", "high", "xhigh"].includes(lower)) {
6828
+ let mapped = "Medium";
6829
+ if (lower === "fast") mapped = "Fast";
6830
+ else if (lower === "low") mapped = "Low";
6831
+ else if (lower === "medium") mapped = "Medium";
6832
+ else if (lower === "high") mapped = "High";
6833
+ else if (lower === "xhigh") mapped = "xHigh";
6834
+ parsed.thinking = mapped;
6835
+ }
6836
+ i++;
6798
6837
  }
6799
6838
  }
6800
6839
  return parsed;
@@ -6952,6 +6991,7 @@ function App({ args = [] }) {
6952
6991
  const [queuedPrompt, setQueuedPrompt] = useState10(null);
6953
6992
  const [resolutionData, setResolutionData] = useState10(null);
6954
6993
  const [tempModelOverride, setTempModelOverride] = useState10(null);
6994
+ useEffect7(() => setEscPressCount(0), [input]);
6955
6995
  const [messages, setMessages] = useState10(() => {
6956
6996
  const logoMsg = { id: "logo-" + Date.now(), role: "system", text: FLUX_LOGO, isLogo: true, isMeta: true };
6957
6997
  const welcomeMsg = { id: "welcome", role: "system", text: "\u{1F30A}\u26A1 Welcome to Flux Flow! Type /help for commands.", isMeta: true };
@@ -7112,7 +7152,7 @@ function App({ args = [] }) {
7112
7152
  const nextCount = prev + 1;
7113
7153
  if (nextCount === 1) {
7114
7154
  if (escDoubleTimerRef.current) clearTimeout(escDoubleTimerRef.current);
7115
- escDoubleTimerRef.current = setTimeout(() => setEscPressCount(0), 1e3);
7155
+ escDoubleTimerRef.current = setTimeout(() => setEscPressCount(0), 2e3);
7116
7156
  } else if (nextCount === 2) {
7117
7157
  if (escDoubleTimerRef.current) clearTimeout(escDoubleTimerRef.current);
7118
7158
  setEscPressCount(0);
@@ -7191,7 +7231,11 @@ function App({ args = [] }) {
7191
7231
  }
7192
7232
  const saved = await loadSettings();
7193
7233
  setMode(saved.mode);
7194
- setThinkingLevel(saved.thinkingLevel);
7234
+ if (parsedArgs.thinking) {
7235
+ setThinkingLevel(parsedArgs.thinking);
7236
+ } else {
7237
+ setThinkingLevel(saved.thinkingLevel);
7238
+ }
7195
7239
  persistedModelRef.current = saved.activeModel;
7196
7240
  if (parsedArgs.model) {
7197
7241
  setActiveModel(parsedArgs.model);
@@ -8954,7 +8998,7 @@ Selection: ${val}`,
8954
8998
  }
8955
8999
  )));
8956
9000
  default:
8957
- return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, null, statusText ? /* @__PURE__ */ React13.createElement(Box13, null, isSpinnerActive && /* @__PURE__ */ React13.createElement(StatusSpinner, null), /* @__PURE__ */ React13.createElement(Text13, { color: "magenta", bold: true, italic: true }, isSpinnerActive ? " " : "", statusText.toUpperCase())) : /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", dimColor: true, italic: true }, "READY FOR COMMAND...")), /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, "[ "), /* @__PURE__ */ React13.createElement(Text13, { color: "white" }, tempModelOverride || activeModel), /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, " ]"))), /* @__PURE__ */ React13.createElement(
9001
+ return /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React13.createElement(Box13, null, statusText ? /* @__PURE__ */ React13.createElement(Box13, null, isSpinnerActive && /* @__PURE__ */ React13.createElement(StatusSpinner, null), /* @__PURE__ */ React13.createElement(Text13, { color: "magenta", bold: true, italic: true }, isSpinnerActive ? " " : "", statusText.toUpperCase())) : /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", dimColor: true, italic: true }, " ", input.length > 0 && escPressCount ? "Press ESC again to clear input" : "READY FOR COMMAND...")), /* @__PURE__ */ React13.createElement(Box13, null, /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, "[ "), /* @__PURE__ */ React13.createElement(Text13, { color: "white" }, tempModelOverride || activeModel), /* @__PURE__ */ React13.createElement(Text13, { color: "gray", bold: true }, " ]"))), /* @__PURE__ */ React13.createElement(
8958
9002
  Box13,
8959
9003
  {
8960
9004
  borderStyle: "round",
@@ -8980,7 +9024,7 @@ Selection: ${val}`,
8980
9024
  newline: (key) => key.return && key.shift || key.return && key.ctrl || key.return && key.leftAlt || key.return && key.rightAlt
8981
9025
  }
8982
9026
  }
8983
- )))) : /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React13.createElement(Box13, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React13.createElement(Text13, { color: isProcessing ? "magenta" : "cyan", bold: true }, isProcessing ? "\u2726 " : "\u{1F4A0} ")), /* @__PURE__ */ React13.createElement(Box13, { flexGrow: 1 }, /* @__PURE__ */ React13.createElement(Box13, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React13.createElement(Box13, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React13.createElement(Text13, { color: "yellow" }, isTerminalWaitingForInput ? " Terminal is waiting for USER input, Press TAB to interact" : " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React13.createElement(Text13, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : escPressCount === 1 ? /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React13.createElement(Text13, { color: "gray" }, escPressed ? " Press ESC again to cancel the request." : !isProcessing ? ` Send message or /cmd... (${terminalEnv.shortcut} for newline)` : " Enter a prompt to steer the agent.")), /* @__PURE__ */ React13.createElement(
9027
+ )))) : /* @__PURE__ */ React13.createElement(Box13, { flexDirection: "row", width: "100%", paddingY: 0 }, /* @__PURE__ */ React13.createElement(Box13, { flexShrink: 0, width: 4 }, /* @__PURE__ */ React13.createElement(Text13, { color: isProcessing ? "magenta" : "cyan", bold: true }, isProcessing ? "\u2726 " : "\u{1F4A0} ")), /* @__PURE__ */ React13.createElement(Box13, { flexGrow: 1 }, /* @__PURE__ */ React13.createElement(Box13, { flexGrow: 1, position: "relative" }, input === "" && /* @__PURE__ */ React13.createElement(Box13, { position: "absolute", paddingLeft: 0 }, activeCommand && !isTerminalFocused ? /* @__PURE__ */ React13.createElement(Text13, { color: "yellow" }, isTerminalWaitingForInput ? " Terminal is waiting for user input. Press TAB to interact" : " Press TAB to interact with terminal...") : activeCommand && isTerminalFocused ? /* @__PURE__ */ React13.createElement(Text13, { color: "yellow", bold: true }, " [ TERMINAL FOCUSED ] Type to interact, press TAB to exit...") : escPressCount === 1 ? /* @__PURE__ */ React13.createElement(Text13, { color: "cyan", bold: true }, " Press ESC again to ", input.length > 0 ? "clear input" : "revert codebase to checkpoint", "...") : /* @__PURE__ */ React13.createElement(Text13, { color: "gray" }, escPressed ? " Press ESC again to cancel the request." : !isProcessing ? ` Send message or /cmd... (${terminalEnv.shortcut} for newline)` : " Enter a prompt to steer the agent.")), /* @__PURE__ */ React13.createElement(
8984
9028
  MultilineInput,
8985
9029
  {
8986
9030
  key: `input-${inputKey}`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.18.10",
4
- "date": "2026-05-30",
3
+ "version": "1.18.12",
4
+ "date": "2026-05-31",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [
7
7
  "ai",