fluxflow-cli 2.11.5 → 2.11.7

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 +10 -8
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -2215,19 +2215,19 @@ var init_main_tools = __esm({
2215
2215
  Internal tools. MUST use the EXACT syntax '[tool:functions.ToolName(args)]'. **NO OTHER SYNTAX/MARKERS ALLOWED, BRACKETS SHOULD BE PROPERLY USED AS PER SCHEMA**
2216
2216
 
2217
2217
  **TOOL USAGE POLICY:**
2218
- - **MAX 3 TOOL CALLS PER TURN${mode === "Flux" ? " (EXCEPTION FOR Todo TOOL: 3+ CALLS ALLOWED, Run: Limit to 2 MAX)" : ""}. Next Turn, verify tool results, plan next**
2219
- ${mode === "Flux" ? "- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 **HIGHLY RECOMMENDED**\n- Tool execution denied? MUST use 'Ask' tool immediately for user reason/changes. NEVER END RESPONSE OR PROCEED BLINDLY \u2190 **MANDATORY**\n- FileMap >> ReadFile to understand file efficiently\n- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile\n- HUGE FILES? SearchKeyword >> FileMap/Full File read\n- **MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON *EACH TURN***" : ""}
2218
+ - **MAX 3 TOOL CALLS PER TURN${mode === "Flux" ? " (EXCEPTION FOR Todo TOOL: 3+ CALLS ALLOWED, Run: Limit 1 OR 2 CONSECUTIVE Run)" : ""}. Next Turn, verify tool results, plan next**
2219
+ ${mode === "Flux" ? "- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 **HIGHLY RECOMMENDED**\n- Tool execution denied? MUST use 'Ask' tool immediately for user reason/changes. NEVER END RESPONSE OR PROCEED BLINDLY \u2190 **MANDATORY**\n- FileMap >> ReadFile to understand file efficiently\n- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile\n- HUGE FILES? SearchKeyword >> FileMap/Full File read\n- **MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON *EACH TURN***" : ""}
2220
2220
  ${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION TOOLS -
2221
2221
  1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish. Suggest best options; don't ask for preferences
2222
2222
 
2223
2223
  - WEB TOOLS -
2224
- 1. [tool:functions.WebSearch(query="...", limit=number)]. Limit 3-10. Proactive use for unknown topics
2224
+ 1. [tool:functions.WebSearch(query="...", limit=number)]. Limit 3-10. Proactive use for unknown info/docs
2225
2225
  2. [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api
2226
2226
 
2227
2227
  ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
2228
2228
  1. [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs. **User gives image/doc: VIEW FIRST**` : `No Multimodal support`}` : `Supports images/docs. **User gives image/doc: VIEW FIRST**`}
2229
2229
  2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats including File Sizes
2230
- 3. [tool:functions.FileMap(path="path/file")]. Shows file structure, dependency, functions, variable maps
2230
+ 3. [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, class, import/export, variable
2231
2231
  4. [tool:functions.PatchFile(path="...", replaceContent1="full line/block", newContent1="...", ...MAX 6)]. Surgical Patch. **Multiple patch on same file/path? Use replaceContent2, newContent2 etc >>> multiple spams**. Unsure? ReadFile >> guessing. **MUST VERIFY DIFF**
2232
2232
  5. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. Verify Imports
2233
2233
  6. [tool:functions.SearchKeyword(keyword="...", file="optional")]. Global project search. If 'file' is provided, searches only that file. Finds definitions/logic without reading every file. Usage: Can search for relevent lines/logic area to read specifically for edit
@@ -5023,9 +5023,10 @@ ${lines.map((l, i) => `${i + 1} | ${l}`).join("\n")}
5023
5023
  }
5024
5024
  const strip = (t) => t.replace(/^```[\w]*\n?/, "").replace(/```\s*$/, "").replace(/\r\n/g, "\n").replace(/\r/g, "\n");
5025
5025
  const processedContent = strip(content);
5026
- const lineCount = processedContent.split(/\r?\n/).length;
5027
- const originalSize = Buffer.byteLength(processedContent, "utf8");
5028
- fs10.writeFileSync(absolutePath, processedContent, "utf8");
5026
+ const finalContent = processedContent.endsWith("\n") ? processedContent : processedContent + "\n";
5027
+ const lineCount = finalContent.split(/\r?\n/).length;
5028
+ const originalSize = Buffer.byteLength(finalContent, "utf8");
5029
+ fs10.writeFileSync(absolutePath, finalContent, "utf8");
5029
5030
  let verifiedContent = fs10.readFileSync(absolutePath, "utf8");
5030
5031
  const verifiedSize = Buffer.byteLength(verifiedContent, "utf8");
5031
5032
  const verifiedLines = verifiedContent.split(/\r?\n/);
@@ -9571,7 +9572,8 @@ ${boxBottom}` };
9571
9572
  diffOpened = true;
9572
9573
  await new Promise((r) => setTimeout(r, 50));
9573
9574
  } else if (normToolName === "write_file") {
9574
- const modifiedContent = toolArgs.content || toolArgs.newContent || "";
9575
+ const rawContent = toolArgs.content || toolArgs.newContent || "";
9576
+ const modifiedContent = rawContent.endsWith("\n") ? rawContent : rawContent + "\n";
9575
9577
  if (!fs20.existsSync(absPath)) {
9576
9578
  isNewFileCreated = true;
9577
9579
  fs20.mkdirSync(path19.dirname(absPath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "2.11.5",
3
+ "version": "2.11.7",
4
4
  "date": "2026-06-23",
5
5
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
6
6
  "keywords": [