fluxflow-cli 3.16.3 → 3.16.5

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 +45 -39
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -6811,9 +6811,16 @@ var init_main_tools = __esm({
6811
6811
  Tool calls: ONLY use [tool:functions.ToolName(args)]
6812
6812
  **NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
6813
6813
 
6814
- **CRITICAL TOOL USAGE RULES:**
6814
+ **TOOL CALLS POLICY:**
6815
6815
  - MAX 4 TOOL CALLS/TURN${mode === "Flux" ? " (Todo: 4+, Run: max 1 or 2 consecutive)" : ""}
6816
- ${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, MULTIPLE edits? Use ONE PatchFile call with up to 15 blocks \u2190 **PRIORITY**\n- Tool denied? Use `Ask` immediately for user guidance \u2190 **MANDATORY**\n- Need specific text ? SearchKeyword > Guessing/ReadFile\n- Huge files ? SearchKeyword > Full Read\n- **Update Todos from realtime progress every turn when created**\n' : ""}
6816
+ ${mode === "Flux" ? `- Escape quotes: \\" for code strings
6817
+ - Double-escape literal sequences (eg. \\\\n)
6818
+ - Use real newlines for code formatting
6819
+ - SAME file, MULTIPLE edits? ONE PatchFile (\u226415 blocks) \u2190 PRIORITY
6820
+ - Tool denied? Ask for guidance \u2190 MANDATORY
6821
+ - Need text or huge files? SearchKeyword > Full Read
6822
+ - Update Todos from realtime progress each turn
6823
+ ` : ""}
6817
6824
  - COMMUNICATION WITH USER -
6818
6825
  - [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
6819
6826
 
@@ -6823,23 +6830,22 @@ ${mode === "Flux" ? '- **Escape quotes: \\" for code strings **\n- ** Literal es
6823
6830
 
6824
6831
  ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative; FIRST ARGUMENT, path separator: '/') -
6825
6832
  - [tool:functions.ReadFile(path="...", startLine="integer", endLine="integer")]. ${aiProvider !== "Google" ? `${isMultiModal ? `Supports images/docs` : ""}` : `Supports images/docs`}
6826
- - [tool:functions.ReadFolder(path="...", recurse="integer 1-3 optional, default: 1")]. DIR Contents + File Size. Minimize recursion
6827
- - [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX 15)]. Surgical patchs, TARGET SMALLEST LINES. allowMultiple: Replace all matches ONLY WHEN SURE. Use replaceContent2/newContent2... for multi blocks. Verify DIFFs
6833
+ - [tool:functions.ReadFolder(path="...", recurse="integer 1-3 optional, default: 1")]. DIR Contents + File Size. Last resort. Minimize recursion
6834
+ - [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX15)]. TARGET MINIMAL DIFF. allowMultiple: Replace all matches ONLY WHEN SURE. Multi-blocks: replaceContent2/newContent2... Verify diffs
6828
6835
  - [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile
6829
- - [tool:functions.SearchKeyword(keyword="...", path="optional, dir/file/glob/regex", fuzzy="bool optional, default: false", regex="bool optional, default: auto")]. path limits search scope. Find definitions/logic without full reads. Locate relevant code
6830
- - [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
6836
+ - [tool:functions.SearchKeyword(keyword="...", path="optional, dir/file/glob/regex", fuzzy="bool optional, default: false", regex="bool optional, default: auto")]. path scopes search. Find definitions, logic, relevant code
6837
+ - [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
6831
6838
  - [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASKS])]. Task list, no Markdown in arrays. Analyze request: ONLY if long multi-task, break it down & create Todos BEFORE starting. \`tasks\` & \`markDone\` optional with \`get\`. Use \`get + markDone\` to complete tasks. **UPDATE EVERY TURN WHEN CREATED**${enableSubAgents ? '\n- [tool:functions.Await(time="integer 15-180")]. For waiting without exiting agent loop' : ""}
6832
6839
  ${_cachedAdvanceRollback ? `
6833
6840
  - EMERGENCY SAFETY TOOLS -
6834
- Info: \`initial\` = user prompt for current task. Revert \`id\` = turn BEFORE the disaster tool (e.g. disaster:\`turn_3\` \u2192 revert:\`turn_2\`). Reason explicitly
6835
- - [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace to a checkpoint in THIS agent loop.
6836
- Use ONLY for catastrophic/codebase corruption. Before ending loop, verify no catastrophe. \`id\` not required with \`getCheckPoint\`.
6841
+ Info: \`initial\` = current task prompt. Revert \`id\` = turn before disaster (eg. disaster: \`turn_3\` \u2192 revert: \`turn_2\`). Reason explicitly
6842
+ - [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace in THIS agent loop. ONLY for catastrophic corruption. Before ending, verify no catastrophe. \`id\` omitted for \`getCheckpoint\`
6837
6843
  ` : ""}${enableSubAgents ? `
6838
6844
  - SUB AGENT TOOLS -
6839
6845
  **PROACTIVE sub-agent use HIGHLY RECOMMENDED. Prefer for any task with even slight benefit, no user nudge needed**
6840
6846
  Invocations:
6841
- - Invoke (async/background, \u22647 parallel). Parallelize long tasks. NEVER repeat while active, meantime, do your OWN work
6842
- - InvokeSync (sync/blocking). Sequential, repetitive or delegated tasks. Saves tokens/cost
6847
+ \u2022 Invoke (async/background, \u22647 parallel). Parallelize long tasks. NEVER repeat while active, meantime, do your OWN work
6848
+ \u2022 InvokeSync (sync/blocking). Sequential, repetitive or delegated tasks. Saves tokens/cost
6843
6849
  - [agent:generalist.InvokeSync/Invoke(title="...", task="...")]. Task must be detailed: exact file paths, imports/exports, dependencies & folder structure
6844
6850
  - [agent:generalist.GetProgress(id="...")]. Poll \`getProgress\` sparingly (exp backoff Await); **NO IMMEDIATE FIRST POLL**
6845
6851
  - [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: '/') -
@@ -8425,11 +8431,11 @@ var thinking_prompts_default;
8425
8431
  var init_thinking_prompts = __esm({
8426
8432
  "src/data/thinking_prompts.json"() {
8427
8433
  thinking_prompts_default = {
8428
- xHigh: "EFFORT LEVEL: HIGH\nChallenge assumptions. Verify before concluding\nPrefer the simplest correct solution\nAssess architecture, scalability & trade-offs\nVerify dependencies, regressions, failure modes & modularity\nPlan implementation: files, modules, interfaces & tests\nRULES:\n- Continuous analytical flow\n- Verify via first principles\n- Actively seek failure paths\n- Verify imports & system stability, avoid syntax errors, recheck tool results\n- MANDATORY THINKING: Full technical verification",
8429
- High: "EFFORT LEVEL: HIGH\nThink in a rigorous monologue\nPrefer the simplest correct solution\nAssess architecture, performance & maintainability\nVerify error handling, assumptions, edge cases, dependencies & regressions\nPlan: files, functions, logic & interactions\nRULES:\n- Continuous analytical flow\n- Verify via first principles\n- Actively seek failure paths\n- Verify imports & system stability, avoid syntax errors, recheck tool results\n- MANDATORY THINKING: Full technical verification",
8430
- Medium: "EFFORT LEVEL: MEDIUM\nThink in a focused, technical monologue\nFind the simplest solution meeting requirements\nScan for missing error handling, invalid assumptions, edge cases & dependencies\nVerify cohesive, modular changes\nOutline changes: files, functions & key logic\nRULES:\n- Clean logical flow\n- Efficient, deliberate, implementation-focused\n- Verify imports & system stability, avoid syntax errors, recheck tool results\n- MANDATORY THINKING: Brief verification for technical tasks/greetings",
8431
- Minimal: "EFFORT LEVEL: LOW\nThink in a quick, focused monologue. Verify Basics:\nConfirm intent & complexity\nIdentify required tools/files/actions\nVerify before acting\nRULES:\n- Brief thoughts\n- Think only enough to avoid obvious mistakes\n- Verify imports & system stability, avoid syntax errors, recheck tool results",
8432
- Off: "EFFORT LEVEL: LOWEST\nNo thinking. Immediate response\nRULES:\n- Verify imports & system stability, avoid syntax errors, recheck tool results"
8434
+ xHigh: "EFFORT: HIGH\nChallenge assumptions, verify before concluding, prefer the simplest correct solution, assess architecture, scalability & trade-offs, verify dependencies, regressions, failure modes & modular design, plan: files, modules, interfaces & tests\nRULES:\nContinuous analysis, verify from first principles, seek failure paths, verify imports, tool results & system stability; avoid syntax errors\nMANDATORY: Full technical verification",
8435
+ High: "EFFORT: HIGH\nRigorous thinking, prefer the simplest correct solution, assess architecture, performance & maintainability, verify error handling, assumptions, edge cases, dependencies & regressions, plan: files, functions, logic & interactions\nRULES:\nContinuous analysis, verify from first principles, seek failure paths, verify imports, tool results & system stability; avoid syntax errors\nMANDATORY: Full technical verification",
8436
+ Medium: "EFFORT: MEDIUM\nFocused, technical thinking, find the simplest solution meeting requirements, check error handling, assumptions, edge cases & dependencies, verify cohesive, modular changes, outline: files, functions & key logic\nRULES:\nLogical, implementation-focused, efficient, deliberate, verify imports, tool results & system stability; avoid syntax errors\nMANDATORY: Brief verification for technical tasks/greetings",
8437
+ Minimal: "EFFORT: LOW\nQuick, focused thinking, intent & complexity, required tools/files/actions, before acting\nRULES:\nBrief thoughts, think only enough to avoid mistakes, verify imports, tool results & system stability; avoid syntax errors",
8438
+ Off: "EFFORT: LOWEST\nNo thinking. Immediate response\nRULES:\nverify imports, tool results & system stability; avoid syntax errors"
8433
8439
  };
8434
8440
  }
8435
8441
  });
@@ -8505,11 +8511,11 @@ ${tempMemories}` : "";
8505
8511
  "Max": "HIGH"
8506
8512
  };
8507
8513
  thinkingConfig = thinking_prompts_default["xHigh"];
8508
- thinkingConfig = thinkingConfig.replace("EFFORT LEVEL: HIGH", `EFFORT LEVEL: ${MAP_FOR_NON_GOOGLE_OR_GEMINI[thinkingLevel]}`).replace("\n- MANDATORY THINKING: Full technical verification", "");
8514
+ thinkingConfig = thinkingConfig.replace("EFFORT: HIGH", `EFFORT: ${MAP_FOR_NON_GOOGLE_OR_GEMINI[thinkingLevel]}`).replace("\nMANDATORY: Full technical verification", "");
8509
8515
  if (thinkingLevel === "Fast") {
8510
- thinkingConfig = "EFFORT LEVEL: LOWEST\nNo thinking. Immediate response\nRULES:\n- Verify imports & system stability, avoid syntax errors, recheck tool results";
8516
+ thinkingConfig = "EFFORT: LOWEST\nNo thinking. Immediate response\nRULES:\nVerify imports, tool results & system stability; avoid syntax errors";
8511
8517
  } else if (thinkingLevel === "Low") {
8512
- thinkingConfig = "EFFORT LEVEL: LOW\nConfirm intent & complexity\nIdentify required tools/files/actions\nVerify before acting\nRULES:\n- Brief thoughts\n- Think only enough to avoid obvious mistakes\n- Verify imports & system stability, avoid syntax errors, recheck tool results";
8518
+ thinkingConfig = "EFFORT: LOW\nQuick, focused thinking, intent & complexity, required tools/files/actions, before acting\nRULES:\nBrief thoughts, think only enough to avoid mistakes, verify imports, tool results & system stability; avoid syntax errors";
8513
8519
  }
8514
8520
  }
8515
8521
  const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
@@ -8557,7 +8563,10 @@ Check these first; These Files > Training Data. Safety rules apply
8557
8563
  const projectContextBlock = cachedProjectContextBlock;
8558
8564
  return `=== SYSTEM PROMPT ===
8559
8565
  Identity: Flux Flow. Sassy, CLI Agent
8560
- ${mode === "Flux" ? "Logical, detailed, task-driven. Prioritize scalable project structure, modular architecture, clean abstractions, stepwise execution. Use latest industry-standard practices/libraries, clean code, verify imports, run automated tests" : `Mode: ${mode}. Concise, Conversational, Sassy, Friendly, Humorous, Sarcastic`}
8566
+ ${mode === "Flux" ? "Logical, task-driven. Prioritize scalable, modular architecture, clean abstractions, stepwise execution. Use latest practices/libraries, verify imports, run automated tests" : `Mode: ${mode}. Concise, Conversational, Sassy, Friendly, Humorous, Sarcastic`}
8567
+
8568
+ - RESOLVE FILES AND PATHS FROM THE PROVIDED DIRECTORY STRUCTURE
8569
+ - USE RELATIVE TIME REFERENCE eg. few mins ago
8561
8570
 
8562
8571
  -- THINKING GUIDANCE --
8563
8572
  ${aiProvider === "Mistral" || aiProvider === "Google" && !isGemini ? `${thinkingConfig}
@@ -8565,9 +8574,6 @@ ${forcedReasoning || thinkingLevel !== "Fast" && (aiProvider === "Mistral" || th
8565
8574
  - Use <think> ... </think> for reasoning before responding, even with simple queries/greetings
8566
8575
  ` : ""}` : `${thinkingConfig}
8567
8576
  `}
8568
- - **USE PROVIDED DIRECTORY STRUCTURE FOR FILES/PATHS**
8569
- - RELATIVE TIME REFERENCE eg. few mins ago
8570
-
8571
8577
  ${TOOL_PROTOCOL(mode, osDetected, aiProvider.toLowerCase() === "deepseek" ? false : isMultiModal, aiProvider, systemSettings?.advanceRollback, systemSettings?.subAgents !== false)}
8572
8578
  ${projectContextBlock}${isMemoryEnabled ? `
8573
8579
  -- MEMORY RULES --
@@ -8579,7 +8585,7 @@ ${projectContextBlock}${isMemoryEnabled ? `
8579
8585
  -- CHAT FORMATTING --
8580
8586
  - GFM Markdown ONLY
8581
8587
  - Same Language as User Query
8582
- - Before tool calls, emit one brief current update. After tool calls, emit no further text this turn
8588
+ - Before tool calls, briefly state intent. After, emit no chat
8583
8589
  - On completion: summarize changes (why) + edited files${mode === "Flux" ? "" : "\n- Use Kaomojis HEAVILY"}
8584
8590
  === END SYSTEM PROMPT ===
8585
8591
 
@@ -16047,12 +16053,13 @@ ${ideCtx.warnings}
16047
16053
  }
16048
16054
  const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
16049
16055
  const cleanPromptForModel = cleanAgentText.replace(/\\(@\[[^\]]+\])/g, "$1");
16050
- const firstUserMsg = `[METADATA, Chat Context > Metadata]
16056
+ const firstUserMsg = `[SYSTEM METADATA, Chat Context > Metadata]
16051
16057
  Time: ${dateTimeStr}
16052
- OS: ${osDetected}${systemSettings?.dynamicDirAwareness ? dirStructure : ""}${cwdMismatch ? `WARNING: CWD Mismatch! Previous Path: "${lastCwd}" WRITE the change in chat to aviod path mismatch later
16058
+ OS: ${osDetected}${systemSettings?.dynamicDirAwareness ? dirStructure : ""}${cwdMismatch ? `
16059
+ WARNING: CWD Changed from previous: "${lastCwd}" to current: "${process.cwd()}", write change in chat to avoid future path mismatches
16053
16060
  ` : ""}${memoryPrompt}${ideBlock}
16054
16061
  [/METADATA]
16055
- ${activeSummaryBlock}${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && aiProvider === "Google") ? `${aiProvider === "Mistral" || modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[SYSTEM Priority: HIGH] ONLY use the system prompt tool schema. eg: [tool:functions.ReadFolder(path=".")] [/SYSTEM]
16062
+ ${activeSummaryBlock}${thinkingLevel !== "Fast" && (aiProvider === "Mistral" || thinkingLevel !== "xHigh" && aiProvider === "Google") ? `${aiProvider === "Mistral" || modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>** [/SYSTEM]\n" : ""}` : ""}[SYSTEM Priority: HIGH] ONLY use the system prompt tool schema [tool:functions.ToolName(...)] [/SYSTEM]
16056
16063
  ${taggedContextStr}[USER PROMPT]
16057
16064
  ${cleanPromptForModel.trim()}
16058
16065
  [/USER PROMPT]`.trim();
@@ -18248,11 +18255,14 @@ TO ACCESS TOOLS **STRICTLY USE THE EXACT FORMAT IN CHAT OUTPUT:** [tool:function
18248
18255
  **NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
18249
18256
 
18250
18257
  TOOL POLICY:
18251
- - MAX 3 TOOL CALLS PER TURN
18252
- - Same file, many edits? Prefer multi search-replace in Patch \u2190 **HIGHLY RECOMMENDED**
18253
- - Need specific text OR huge file ? SearchKeyword > ReadFile
18254
- - Tool denied? Use \`Ask\` immediately for user guidance \u2190 **MANDATORY**
18255
- - Restricted Shell Access, NO DELETION
18258
+ - Escape quotes: \\" for code strings
18259
+ - Double-escape literal sequences (eg. \\\\n)
18260
+ - Use real newlines for code formatting
18261
+ - SAME file, MULTIPLE edits? ONE PatchFile (\u226415 blocks) \u2190 PRIORITY
18262
+ - Tool denied? Ask for guidance \u2190 MANDATORY
18263
+ - Need text or huge files? SearchKeyword > Full Read
18264
+ - Update Todos from realtime progress each turn
18265
+ - Restricted Shell Access, No Deletion
18256
18266
 
18257
18267
  **PROVIDED TOOLS**
18258
18268
  -- Communication with USER --
@@ -18263,16 +18273,12 @@ TOOL POLICY:
18263
18273
  - [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api
18264
18274
 
18265
18275
  -- Workspace Tools --
18266
- - [tool:functions.SearchKeyword(keyword="...", path="optional, dir/file/glob/regex", fuzzy="bool optional, default: false", regex="bool optional, default: auto")]. path limits search scope. Find definitions/logic without full reads. Locate relevant code
18276
+ - [tool:functions.SearchKeyword(keyword="...", path="optional, dir/file/glob/regex", fuzzy="bool optional, default: false", regex="bool optional, default: auto")]. path scopes search. Find definitions, logic, relevant code
18267
18277
  - [tool:functions.ReadFolder(path="...", recurse="integer 1-3 optional, default: 1")]. DIR Contents + File Size. Minimize recursion
18268
18278
  - [tool:functions.ReadFile(path="...", startLine="integer", endLine="integer")]. View files
18269
- - [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX 15)]. Surgical patchs, TARGET SMALLEST LINES. allowMultiple: Replace all matches ONLY WHERE SURE. Use replaceContent2/newContent2... for multi blocks. Verify DIFFs
18279
+ - [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...MAX15)]. TARGET MINIMAL DIFF. allowMultiple: Replace all matches ONLY WHEN SURE. Multi-blocks: replaceContent2/newContent2... Verify diffs
18270
18280
  - [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. VERIFY IMPORTS
18271
- - [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
18272
-
18273
- - **Escape quotes: \\" for code strings**
18274
- - **Literal escapes: Double-escape sequences (e.g., \\\\n)**
18275
- - **File structure: Real newlines for code formatting**`.trim();
18281
+ - [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user`.trim();
18276
18282
  const systemInstruction = `=== START SYSTEM PROMPT ===
18277
18283
  You are a subagent helping the main FluxFlow CLI agent
18278
18284
  Your task is: "${task}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "3.16.3",
3
+ "version": "3.16.5",
4
4
  "date": "2026-08-02",
5
5
  "description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
6
6
  "keywords": [