fluxflow-cli 3.16.4 → 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.
- package/dist/fluxflow.js +42 -37
- 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
|
-
**
|
|
6814
|
+
**TOOL CALLS POLICY:**
|
|
6815
6815
|
- MAX 4 TOOL CALLS/TURN${mode === "Flux" ? " (Todo: 4+, Run: max 1 or 2 consecutive)" : ""}
|
|
6816
|
-
${mode === "Flux" ?
|
|
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="...", ...
|
|
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
|
|
6830
|
-
- [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `
|
|
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\` =
|
|
6835
|
-
- [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace
|
|
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
|
-
|
|
6842
|
-
|
|
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
|
|
8429
|
-
High: "EFFORT
|
|
8430
|
-
Medium: "EFFORT
|
|
8431
|
-
Minimal: "EFFORT
|
|
8432
|
-
Off: "EFFORT
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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,
|
|
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
|
|
|
@@ -16053,7 +16059,7 @@ OS: ${osDetected}${systemSettings?.dynamicDirAwareness ? dirStructure : ""}${cwd
|
|
|
16053
16059
|
WARNING: CWD Changed from previous: "${lastCwd}" to current: "${process.cwd()}", write change in chat to avoid future path mismatches
|
|
16054
16060
|
` : ""}${memoryPrompt}${ideBlock}
|
|
16055
16061
|
[/METADATA]
|
|
16056
|
-
${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
|
|
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]
|
|
16057
16063
|
${taggedContextStr}[USER PROMPT]
|
|
16058
16064
|
${cleanPromptForModel.trim()}
|
|
16059
16065
|
[/USER PROMPT]`.trim();
|
|
@@ -18249,11 +18255,14 @@ TO ACCESS TOOLS **STRICTLY USE THE EXACT FORMAT IN CHAT OUTPUT:** [tool:function
|
|
|
18249
18255
|
**NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
|
|
18250
18256
|
|
|
18251
18257
|
TOOL POLICY:
|
|
18252
|
-
-
|
|
18253
|
-
-
|
|
18254
|
-
-
|
|
18255
|
-
-
|
|
18256
|
-
-
|
|
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
|
|
18257
18266
|
|
|
18258
18267
|
**PROVIDED TOOLS**
|
|
18259
18268
|
-- Communication with USER --
|
|
@@ -18264,16 +18273,12 @@ TOOL POLICY:
|
|
|
18264
18273
|
- [tool:functions.WebScrape(url="...")]. Proactive use for specific webpage/docs/api
|
|
18265
18274
|
|
|
18266
18275
|
-- Workspace Tools --
|
|
18267
|
-
- [tool:functions.SearchKeyword(keyword="...", path="optional, dir/file/glob/regex", fuzzy="bool optional, default: false", regex="bool optional, default: auto")]. path
|
|
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
|
|
18268
18277
|
- [tool:functions.ReadFolder(path="...", recurse="integer 1-3 optional, default: 1")]. DIR Contents + File Size. Minimize recursion
|
|
18269
18278
|
- [tool:functions.ReadFile(path="...", startLine="integer", endLine="integer")]. View files
|
|
18270
|
-
- [tool:functions.PatchFile(path="...", allowMultiple="bool optional, default: false", replaceContent1="...", newContent1="...", ...
|
|
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
|
|
18271
18280
|
- [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? PatchFile > WriteFile. VERIFY IMPORTS
|
|
18272
|
-
- [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL` : `WINDOWS CMD` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
|
|
18273
|
-
|
|
18274
|
-
- **Escape quotes: \\" for code strings**
|
|
18275
|
-
- **Literal escapes: Double-escape sequences (e.g., \\\\n)**
|
|
18276
|
-
- **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();
|
|
18277
18282
|
const systemInstruction = `=== START SYSTEM PROMPT ===
|
|
18278
18283
|
You are a subagent helping the main FluxFlow CLI agent
|
|
18279
18284
|
Your task is: "${task}"
|