fluxflow-cli 3.14.1 → 3.14.2

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 +68 -44
  2. package/package.json +2 -2
package/dist/fluxflow.js CHANGED
@@ -3309,31 +3309,32 @@ var init_text = __esm({
3309
3309
  return result;
3310
3310
  };
3311
3311
  TOOL_LABELS = {
3312
- "write_file": "WriteFile",
3313
- "update_file": "UpdateFile",
3314
- "read_folder": "ReadFolder",
3315
- "view_file": "ViewFile",
3316
- "exec_command": "ExecuteCommand",
3317
- "web_search": "WebSearch",
3318
- "web_scrape": "ReadSite",
3319
- "search_keyword": "SearchKeyword",
3320
- "write_pdf": "CreatePDF",
3321
- "write_docx": "CreateDocument",
3322
- "generate_image": "GenerateImage",
3323
- // PascalCase Support
3324
- "WriteFile": "WriteFile",
3325
- "PatchFile": "PatchFile",
3326
- "ReadFolder": "ReadFolder",
3327
- "ReadFile": "ReadFile",
3328
- "Run": "RunCommand",
3329
- "WebSearch": "WebSearch",
3330
- "WebScrape": "WebScrape",
3331
- "SearchKeyword": "SearchKeyword",
3332
- "WritePDF": "WritePDF",
3333
- "WriteDoc": "WriteDoc",
3334
- "Memory": "Memory",
3335
- "Chat": "Chat",
3336
- "GenerateImage": "GenerateImage"
3312
+ // DEPRECATED LABELS
3313
+ // 'write_file': 'WriteFile',
3314
+ // 'update_file': 'UpdateFile',
3315
+ // 'read_folder': 'ReadFolder',
3316
+ // 'view_file': 'ViewFile',
3317
+ // 'exec_command': 'ExecuteCommand',
3318
+ // 'web_search': 'WebSearch',
3319
+ // 'web_scrape': 'ReadSite',
3320
+ // 'search_keyword': 'SearchKeyword',
3321
+ // 'write_pdf': 'CreatePDF',
3322
+ // 'write_docx': 'CreateDocument',
3323
+ // 'generate_image': 'GenerateImage',
3324
+ // // PascalCase Support
3325
+ // 'WriteFile': 'WriteFile',
3326
+ // 'PatchFile': 'PatchFile',
3327
+ // 'ReadFolder': 'ReadFolder',
3328
+ // 'ReadFile': 'ReadFile',
3329
+ // 'Run': 'RunCommand',
3330
+ // 'WebSearch': 'WebSearch',
3331
+ // 'WebScrape': 'WebScrape',
3332
+ // 'SearchKeyword': 'SearchKeyword',
3333
+ // 'WritePDF': 'WritePDF',
3334
+ // 'WriteDoc': 'WriteDoc',
3335
+ // 'Memory': 'Memory',
3336
+ // 'Chat': 'Chat',
3337
+ // 'GenerateImage': 'GenerateImage'
3337
3338
  };
3338
3339
  REGEX_INITIAL_THINK = /<\/think>(\r?\n){2}/gi;
3339
3340
  REGEX_INITIAL_TOOL = /(\r?\n){2}(?=\[?(?:tool:functions|tool\.functions|agent:generalist|agent\.generalist|\s*turn\s*:))/gi;
@@ -6703,7 +6704,7 @@ Tool calls: ONLY use [tool:functions.ToolName(args)]
6703
6704
 
6704
6705
  **TOOL USAGE POLICY:**
6705
6706
  - MAX 4 TOOL CALLS/TURN${mode === "Flux" ? " (Todo: 4+, Run: max 1 or 2 consecutive)" : ""}
6706
- ${mode === "Flux" ? "- Same file, many edits? Prefer multi search-replace in Patch \u2190 **HIGHLY RECOMMENDED**\n- Tool denied?Use `Ask` immediately for user guidance \u2190 ** MANDATORY **\n- FileMap > ReadFile for efficient file understanding\n- Need specific text ? SearchKeyword > Guessing/ReadFile\n- Huge files ? SearchKeyword > Full Read\n- **Update Todos from realtime progress EVERY TURN**\n" : ""}
6707
+ ${mode === "Flux" ? '- **Escape quotes: \\" for code strings **\n- ** Literal escapes: Double - escape sequences(e.g., \\\\n) **\n- ** File structure: Real newlines for code formatting**\n- Same file, many edits? Prefer multi search-replace in Patch \u2190 **HIGHLY RECOMMENDED**\n- Tool denied?Use `Ask` immediately for user guidance \u2190 ** MANDATORY **\n- FileMap > ReadFile for efficient file understanding\n- Need specific text ? SearchKeyword > Guessing/ReadFile\n- Huge files ? SearchKeyword > Full Read\n- **Update Todos from realtime progress EVERY TURN**\n' : ""}
6707
6708
  - COMMUNICATION TOOLS -
6708
6709
  1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity: MUST for path divergence, security risk. Ask, don't finish/guess. Suggest best options; no preferences. Keep options short
6709
6710
 
@@ -6712,13 +6713,13 @@ ${mode === "Flux" ? "- Same file, many edits? Prefer multi search-replace in Pat
6712
6713
  2. [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api
6713
6714
 
6714
6715
  ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative; FIRST ARGUMENT, path separator: '/') -
6715
- 1. [tool:functions.ReadFile(path="...", startLine="integer", endLine="integer")]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs` : ``}` : `Supports images/docs`}
6716
+ 1. [tool:functions.ReadFile(path="...", startLine="integer", endLine="integer")]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs` : ""}` : `Supports images/docs`}
6716
6717
  2. [tool:functions.ReadFolder(path="...", recurse="integer 0-4 optional, default: 0")]. Detailed DIR stats including File Sizes
6717
6718
  3. [tool:functions.FileMap(path="file")]. Shows file structure
6718
- 4. [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX 15)]. Surgical patchs, TARGET SMALLEST SNIPPETS/SUB-STRINGS. allowMultiple: Replace all matches. Use replaceContent2/newContent2... for multi blocks. Verify DIFFs
6719
+ 4. [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX 15)]. Surgical patchs, TARGET SMALLEST LINES/SUB-STRINGS. allowMultiple: Replace all matches. Use replaceContent2/newContent2... for multi blocks. Verify DIFFs
6719
6720
  5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile
6720
6721
  6. [tool:functions.SearchKeyword(keyword="...", path="optional, target directory/filename", subString="bool optional, default: false", regex="bool optional, default: auto")]. path limits scope to a file/dir. Find definitions/logic without full reads. Locate relevant code
6721
- 7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
6722
+ 7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
6722
6723
  8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASKS])]. Task list, no Markdown in arrays. Analyze request: if long multi-task, break it down & create Todos BEFORE starting. \`tasks\` & \`markDone\` optional with \`get\`. Use \`get + markDone\` to complete tasks, or \`create + markDone\` to create completed tasks. **UPDATE EVERY TURN**${enableSubAgents ? '\n9. [tool:functions.Await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s' : ""}
6723
6724
  ${_cachedAdvanceRollback ? `
6724
6725
  - EMERGENCY SAFETY TOOLS -
@@ -6736,12 +6737,7 @@ Invocations:
6736
6737
  3. [agent:generalist.Cancel(id="...")]. Cancel async task ONLY if stalled (2m+) or clearly incorrect` : ""}`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
6737
6738
  1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout, stable margins & headers/footers, NO WATERMARKS
6738
6739
  2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document, NO WATERMARKS, stable margins & headers/footers
6739
- - WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
6740
-
6741
- - VERIFY TOOL RESULT CONTENTS. Fix errors. No hallucinations
6742
- - **Escape quotes: \\" for code strings**
6743
- - **Literal escapes: Double-escape sequences (e.g., \\\\n)**
6744
- - **File structure: Real newlines for code formatting**`.trim();
6740
+ - WORKSPACE & SUB AGENT TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}`.trim();
6745
6741
  };
6746
6742
  }
6747
6743
  });
@@ -10161,8 +10157,10 @@ var init_view_file = __esm({
10161
10157
  let { path: targetPath, StartLine, EndLine, start_line, end_line, startLine, endLine } = parseArgs(args);
10162
10158
  const sLine = parseInt(StartLine || start_line || startLine);
10163
10159
  const eLine = parseInt(EndLine || end_line || endLine);
10164
- const finalStart = sLine || 1;
10165
- const finalEnd = eLine || (sLine ? sLine + 800 : 800);
10160
+ const startProvided = !isNaN(sLine);
10161
+ const endProvided = !isNaN(eLine);
10162
+ let finalStart = sLine || 1;
10163
+ let finalEnd = eLine || (sLine ? sLine + 800 : 800);
10166
10164
  if (!targetPath) return 'ERROR: Missing "path" argument for view_file.';
10167
10165
  const absolutePath = path13.resolve(process.cwd(), targetPath);
10168
10166
  try {
@@ -10213,6 +10211,10 @@ var init_view_file = __esm({
10213
10211
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
10214
10212
  const lines = content.split("\n");
10215
10213
  const totalLines = lines.length;
10214
+ if (!startProvided && !endProvided && totalLines > 800) {
10215
+ finalStart = 1;
10216
+ finalEnd = 50;
10217
+ }
10216
10218
  const start = Math.max(0, finalStart - 1);
10217
10219
  const end = Math.min(totalLines, finalEnd);
10218
10220
  const resultLines = lines.slice(start, end);
@@ -15286,7 +15288,7 @@ ${currentSummary}
15286
15288
  const ideCtx = await getIDEContext();
15287
15289
  let ideBlock = "";
15288
15290
  if (isBridgeConnected()) {
15289
- ideBlock = "[IDE CONTEXT]\n";
15291
+ ideBlock = "[ADDITIONAL IDE CONTEXT]\n";
15290
15292
  if (ideCtx.file_focused !== "none") {
15291
15293
  const relFocused = path25.relative(process.cwd(), ideCtx.file_focused);
15292
15294
  const relOpened = (ideCtx.opened_editors || []).map((p) => {
@@ -15484,7 +15486,7 @@ ${ideCtx.warnings}
15484
15486
  lineCount = fs26.readFileSync(absPath, "utf8").split(/\r\n|\r|\n/).length;
15485
15487
  } catch (e) {
15486
15488
  }
15487
- if (lineCount > 550) {
15489
+ if (lineCount > 300) {
15488
15490
  const label = `\u21B7 Skipped (Too Large): ${path25.basename(filePath)}`;
15489
15491
  let terminalWidth = 115;
15490
15492
  if (process.stdout.isTTY) {
@@ -15498,9 +15500,9 @@ ${ideCtx.warnings}
15498
15500
  }
15499
15501
  }
15500
15502
  const finalStart = startLine !== null ? startLine : 1;
15501
- let finalEnd = endLine !== null ? endLine : startLine !== null ? startLine : finalStart + 499;
15502
- if (finalEnd - finalStart > 500) {
15503
- finalEnd = finalStart + 500;
15503
+ let finalEnd = endLine !== null ? endLine : startLine !== null ? startLine : finalStart + 299;
15504
+ if (finalEnd - finalStart > 300) {
15505
+ finalEnd = finalStart + 300;
15504
15506
  }
15505
15507
  const argsStr = `path=${JSON.stringify(filePath)}, startLine=${finalStart}, endLine=${finalEnd}`;
15506
15508
  const result = await view_file(argsStr, { isMultiModal: isSupported });
@@ -15555,7 +15557,7 @@ ${ideCtx.warnings}
15555
15557
  }
15556
15558
  let taggedContextStr = "";
15557
15559
  if (taggedContextBlocks.length > 0) {
15558
- taggedContextStr = "[TAGGED FILE CONTENTS] Auto Read, System Provided Context for User Tagged Files\n" + taggedContextBlocks.join("\n\n") + "\n[/TAGGED FILE CONTENTS]\n";
15560
+ taggedContextStr = "[TAGGED FILE CONTENTS] Auto Read User Tagged files by System, No need to re-read\n" + taggedContextBlocks.join("\n\n") + "\n[/TAGGED FILE CONTENTS]\n";
15559
15561
  }
15560
15562
  const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
15561
15563
  const cleanPromptForModel = cleanAgentText.replace(/\\(@\[[^\]]+\])/g, "$1");
@@ -16447,7 +16449,11 @@ ${ideErr} [/ERROR]`;
16447
16449
  const content = fs26.readFileSync(absPath, "utf8");
16448
16450
  const lines = content.split("\n").length;
16449
16451
  totalLines = lines;
16450
- actualEndLine = Math.min(eLine, lines);
16452
+ if (!rawStart && !rawEnd && lines > 800) {
16453
+ actualEndLine = Math.min(50, lines);
16454
+ } else {
16455
+ actualEndLine = Math.min(eLine, lines);
16456
+ }
16451
16457
  }
16452
16458
  } catch (e) {
16453
16459
  }
@@ -17780,6 +17786,11 @@ ${cleanResponse}
17780
17786
  label = `\u2714 \x1B[95mSearched\x1B[0m`;
17781
17787
  } else if (normalizedToolName === "web_scrape" || normalizedToolName === "webscrape") {
17782
17788
  label = `\u2714 \x1B[95mScraped\x1B[0m`;
17789
+ } else if (normalizedToolName === "search_keyword" || normalizedToolName === "searchkeyword") {
17790
+ const pArgs = parseArgs(toolCall.args);
17791
+ const keyword = pArgs.keyword || "";
17792
+ const keywordPath = pArgs.path || "";
17793
+ label = `${keyword ? "\u2714" : "\u2718"} \x1B[95mSearched\x1B[0m: ${keyword || "No Query"}${keywordPath ? ` \u2192 ${keywordPath}` : ""}`;
17783
17794
  } else if (normalizedToolName === "view_file" || normalizedToolName === "viewfile" || normalizedToolName === "readfile") {
17784
17795
  const path27 = parseArgs(toolCall.args).path || "";
17785
17796
  label = `\u2714 \x1B[95mRead\x1B[0m: ${path27}`;
@@ -19895,6 +19906,19 @@ function App({ args = [] }) {
19895
19906
  }
19896
19907
  }
19897
19908
  if (key.tab && activeView === "chat") {
19909
+ if (suggestions.length > 0) {
19910
+ const nextMatch = suggestions[selectedIndex] || suggestions[0];
19911
+ const parts = input.split(" ");
19912
+ if (parts.length === 1) {
19913
+ setInput(nextMatch.cmd + " ");
19914
+ } else {
19915
+ const parentParts = parts.slice(0, -1);
19916
+ setInput(parentParts.join(" ") + " " + nextMatch.cmd + " ");
19917
+ }
19918
+ setSelectedIndex(0);
19919
+ setInputKey((prev) => prev + 1);
19920
+ return;
19921
+ }
19898
19922
  }
19899
19923
  if (key.ctrl && inputText === "c" && activeView !== "exit") {
19900
19924
  if (input.length > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "3.14.1",
4
- "date": "2026-07-30",
3
+ "version": "3.14.2",
4
+ "date": "2026-07-31",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
6
6
  "keywords": [
7
7
  "ai",