fluxflow-cli 1.18.11 → 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
@@ -1119,7 +1119,8 @@ var init_arg_parser = __esm({
1119
1119
  import { execSync } from "child_process";
1120
1120
  var _isPsAvailable, isPsAvailable, TOOL_PROTOCOL;
1121
1121
  var init_main_tools = __esm({
1122
- "src/data/main_tools.js"() {
1122
+ async "src/data/main_tools.js"() {
1123
+ await init_exec_command();
1123
1124
  _isPsAvailable = null;
1124
1125
  isPsAvailable = () => {
1125
1126
  if (process.platform !== "win32") return false;
@@ -1149,10 +1150,10 @@ Suggest best options; don't ask for preferences
1149
1150
  ${mode === "Flux" ? `- PROJECT TOOLS (path = relative to CWD) -
1150
1151
  1. [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. Supports images/docs. User gives image/doc: VIEW FIRST
1151
1152
  2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats
1152
- 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
1153
1154
  4. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile >> WriteFile. Verify Imports
1154
- 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
1155
- 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
1156
1157
  7. [tool:functions.GenerateImage(path="... png", prompt="detailed", ratio="16:9, 9:16, 1:1")]. Usage: Mockups, PDF thumbnails, any visual content
1157
1158
  8. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout (100vh/vw)
1158
1159
  9. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
@@ -1175,7 +1176,7 @@ var pty, isPtyAvailable, stripAnsi, activeChildProcess, isActiveCommandPty, writ
1175
1176
  var init_exec_command = __esm({
1176
1177
  async "src/tools/exec_command.js"() {
1177
1178
  init_arg_parser();
1178
- init_main_tools();
1179
+ await init_main_tools();
1179
1180
  pty = null;
1180
1181
  try {
1181
1182
  const ptyModule = await import("node-pty");
@@ -1525,11 +1526,22 @@ var init_exec_command = __esm({
1525
1526
  activeChildProcess = ptyProcess;
1526
1527
  isActiveCommandPty = true;
1527
1528
  let output = "";
1529
+ let isResolved = false;
1528
1530
  ptyProcess.onData((data) => {
1529
- output += data;
1530
- 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
+ }
1531
1542
  });
1532
1543
  ptyProcess.onExit(({ exitCode }) => {
1544
+ if (isResolved) return;
1533
1545
  activeChildProcess = null;
1534
1546
  const normalizedOutput = (output || "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
1535
1547
  const finalOutput = stripAnsi(normalizedOutput) || "Command executed with no output.";
@@ -1589,17 +1601,30 @@ ${finalOutput}`);
1589
1601
  }
1590
1602
  let stdout = "";
1591
1603
  let stderr = "";
1604
+ let isResolved = false;
1592
1605
  child.stdout.on("data", (data) => {
1593
- const chunk = data.toString();
1594
- stdout += chunk;
1595
- 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
+ }
1596
1618
  });
1597
1619
  child.stderr.on("data", (data) => {
1598
- const chunk = data.toString();
1599
- stderr += chunk;
1600
- if (onChunk) onChunk(chunk);
1620
+ if (!isResolved) {
1621
+ const chunk = data.toString();
1622
+ stderr += chunk;
1623
+ if (onChunk) onChunk(chunk);
1624
+ }
1601
1625
  });
1602
1626
  child.on("close", (code) => {
1627
+ if (isResolved) return;
1603
1628
  activeChildProcess = null;
1604
1629
  const result = [];
1605
1630
  if (stdout) result.push(`STDOUT:
@@ -2332,8 +2357,8 @@ var init_thinking_prompts = __esm({
2332
2357
  import fs4 from "fs";
2333
2358
  var getMemoryPrompt, getSystemInstruction, getJanitorInstruction;
2334
2359
  var init_prompts = __esm({
2335
- "src/utils/prompts.js"() {
2336
- init_main_tools();
2360
+ async "src/utils/prompts.js"() {
2361
+ await init_main_tools();
2337
2362
  init_janitor_tools();
2338
2363
  init_thinking_prompts();
2339
2364
  getMemoryPrompt = (tempMemories = "", userMemories = "", isMemoryEnabled = true, isContext32k = false) => {
@@ -2393,7 +2418,7 @@ Identity: Flux Flow (by Kushal Roy Chowdhury). Sassy${mode === "Flux" ? ", No Fl
2393
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"}
2394
2419
 
2395
2420
  -- AGENT LOOP RULES (PRIORITY: HIGH) --
2396
- - **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**
2397
2422
  - Tool Called? No post tool response until [turn: continue]
2398
2423
  - NEVER USE [turn: continue] [turn:finish] together
2399
2424
 
@@ -4792,7 +4817,7 @@ import fs16 from "fs";
4792
4817
  var client, TERMINATION_SIGNAL, stripAnsi2, signalTermination, TOOL_LABELS2, getToolDetail, runJanitorTask, getActiveToolContext, getContextSafeText, contextSafeReplace, getSanitizedText, detectToolCalls, initAI, consolidatePastMemories, getAIStream;
4793
4818
  var init_ai = __esm({
4794
4819
  async "src/utils/ai.js"() {
4795
- init_prompts();
4820
+ await init_prompts();
4796
4821
  init_history();
4797
4822
  init_usage();
4798
4823
  await init_tools();
@@ -6796,6 +6821,19 @@ function App({ args = [] }) {
6796
6821
  } else if (arg === "--external-access" && args[i + 1]) {
6797
6822
  parsed.externalAccess = args[i + 1].toLowerCase();
6798
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++;
6799
6837
  }
6800
6838
  }
6801
6839
  return parsed;
@@ -7193,7 +7231,11 @@ function App({ args = [] }) {
7193
7231
  }
7194
7232
  const saved = await loadSettings();
7195
7233
  setMode(saved.mode);
7196
- setThinkingLevel(saved.thinkingLevel);
7234
+ if (parsedArgs.thinking) {
7235
+ setThinkingLevel(parsedArgs.thinking);
7236
+ } else {
7237
+ setThinkingLevel(saved.thinkingLevel);
7238
+ }
7197
7239
  persistedModelRef.current = saved.activeModel;
7198
7240
  if (parsedArgs.model) {
7199
7241
  setActiveModel(parsedArgs.model);
@@ -8982,7 +9024,7 @@ Selection: ${val}`,
8982
9024
  newline: (key) => key.return && key.shift || key.return && key.ctrl || key.return && key.leftAlt || key.return && key.rightAlt
8983
9025
  }
8984
9026
  }
8985
- )))) : /* @__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(
8986
9028
  MultilineInput,
8987
9029
  {
8988
9030
  key: `input-${inputKey}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.18.11",
3
+ "version": "1.18.12",
4
4
  "date": "2026-05-31",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [