fluxflow-cli 3.0.3 → 3.0.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/TOOLS.md +2 -1
- package/dist/fluxflow.js +79 -27
- package/package.json +1 -1
package/TOOLS.md
CHANGED
|
@@ -8,12 +8,13 @@ Flux Flow provides a robust set of tools that allow the AI to interact with the
|
|
|
8
8
|
| :--- | :---: | :---: |
|
|
9
9
|
| **Communication (Ask)** | ✅ | ✅ |
|
|
10
10
|
| **Web Search & Scrape** | ✅ | ✅ |
|
|
11
|
+
| **Creative (PDF/DOCX/Image)** | ❌ | ✅ |
|
|
11
12
|
| **File System (Read/Write)** | ✅ | ❌ |
|
|
12
13
|
| **Terminal Execution** | ✅ | ❌ |
|
|
13
14
|
| **Search Keyword** | ✅ | ❌ |
|
|
14
15
|
| **File Map** | ✅ | ❌ |
|
|
15
16
|
| **Todo (Planning)** | ✅ | ❌ |
|
|
16
|
-
| **
|
|
17
|
+
| **Multi Agent (sync/async)** | ✅ | ❌ |
|
|
17
18
|
|
|
18
19
|
---
|
|
19
20
|
|
package/dist/fluxflow.js
CHANGED
|
@@ -5110,7 +5110,7 @@ Internal tools. **MUST use the EXACT syntax** [tool:functions.ToolName(args)]. *
|
|
|
5110
5110
|
- **MAX 3 TOOL CALLS PER TURN${mode === "Flux" ? " (EXCEPTION FOR Todo TOOL: 3+ CALLS ALLOWED, Run TOOL: Limit 1, OR 2 CONSECUTIVE Run TOOL)" : ""}. Next Turn, verify tool results, plan next**
|
|
5111
5111
|
${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 Read\n- No tool spamming\n- **MUST MARK DONE/APPEND Todos BASED ON REALTIME TASK PROGRESS ON *EVERY TURN***" : ""}
|
|
5112
5112
|
${mode === "Flux" ? "- **File Tools >> Code in chat**\n\n" : ""}- COMMUNICATION TOOLS -
|
|
5113
|
-
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
|
|
5113
|
+
1. [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences
|
|
5114
5114
|
|
|
5115
5115
|
- WEB TOOLS -
|
|
5116
5116
|
1. [tool:functions.WebSearch(query="...", limit=number)]. Limit 3-10. Proactive use for unknown info/docs
|
|
@@ -5125,13 +5125,13 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
|
|
|
5125
5125
|
6. [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false 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
|
|
5126
5126
|
7. [tool:functions.Run(command="...")]. Runs ${osDetected === "Windows" ? isPsAvailable() ? `WINDOWS POWERSHELL ONLY` : `WINDOWS CMD ONLY` : `BASH`} command. Destructive/Irreversible ops \u2192 Ask user
|
|
5127
5127
|
8. [tool:functions.Todo(method="create/append/get", tasks=[ARRAY OF STRINGS], markDone=[ARRAY OF TASK STRINGS])]. Task List, NO Markdown IN ARRAY. USAGE: ANALYZE USER REQUEST **IF** MULTIPLE TASK \u2192 BREAK DOWN TASK \u2192 CREATE TODO **BEFORE** DIVING IN. 'tasks' & 'markDone' OPTIONAL PARAMETERS WITH method 'get'. USE 'get' method WITH 'markDone' to mark task completed. **EVERY TURN UPDATE POLICY**
|
|
5128
|
-
9. [tool:functions.await(time="seconds")]. For waiting without exiting agent loop
|
|
5128
|
+
9. [tool:functions.await(time="seconds")]. For waiting without exiting agent loop, 15s - 180s
|
|
5129
5129
|
|
|
5130
|
-
-- SUB AGENTS --
|
|
5131
|
-
USE PROACTIVELY
|
|
5132
|
-
- Invocation Types: invoke (async, background worker for parallel tasks, upto 5 parallel agents, might take long time), invokeSync (sync, blocking main agent loop, task delegation, repeatetive work,
|
|
5133
|
-
1. [agent:generalist.
|
|
5134
|
-
2. [agent:generalist.getProgress(id="...")]. Usage: Check progress of async subagent task, taking time? await >>> spamming getProgress`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
|
|
5130
|
+
-- SUB AGENTS DEFINITIONS --
|
|
5131
|
+
USE PROACTIVELY TO PARALLELIZE TASK, HIGHLY RECOMMENDED
|
|
5132
|
+
- Invocation Types: invoke (async, usage: background worker for parallel tasks, upto 5 parallel agents (3+ calls allowed), might take long time), invokeSync (sync, usage: blocking main agent loop, task delegation, repeatetive work, sequential tasks)
|
|
5133
|
+
1. [agent:generalist.invokeSync/invoke(title="...", task="...")]. Task must me detailed, with file paths, imports/exports, dependency, folder structure
|
|
5134
|
+
2. [agent:generalist.getProgress(id="...")]. Usage: Check progress of async subagent task, taking time? do your own task OR await (exponentially longer after 2nd check) >>> spamming getProgress`.trim() : `- CREATIVE TOOLS (path = relative to CWD & WILL BE FIRST ARGUMENT, path separator: '/') -
|
|
5135
5135
|
1. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. PROACTIVE A4 PAGE BREAKS MUST IN CSS. HTML/CSS for PREMIUM layout
|
|
5136
5136
|
2. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word document
|
|
5137
5137
|
- WORKSPACE TOOLS ARE NOT AVAILABLE IN FLOW`.trim()}
|
|
@@ -11150,7 +11150,44 @@ ${originalTextProcessed.length > USER_CONTEXT_LENGTH ? "... (truncated) ...\n\n"
|
|
|
11150
11150
|
config: {
|
|
11151
11151
|
systemInstruction,
|
|
11152
11152
|
temperature,
|
|
11153
|
-
thinkingConfig:
|
|
11153
|
+
thinkingConfig: (() => {
|
|
11154
|
+
const modelLower = (model || "").toLowerCase();
|
|
11155
|
+
const isGemma4 = modelLower.includes("gemma-4") || modelLower.startsWith("gemma");
|
|
11156
|
+
const isGemini3 = modelLower.includes("gemini-3");
|
|
11157
|
+
if (isGemma4 || isGemini3) {
|
|
11158
|
+
if (isGemma4) {
|
|
11159
|
+
if (thinkingLevel.toLowerCase() !== "xhigh" || false) return { includeThoughts: false, thinkingLevel: ThinkingLevel.MINIMAL };
|
|
11160
|
+
else return { includeThoughts: true, thinkingLevel: ThinkingLevel.HIGH };
|
|
11161
|
+
}
|
|
11162
|
+
return {
|
|
11163
|
+
includeThoughts: true,
|
|
11164
|
+
thinkingLevel: {
|
|
11165
|
+
"Fast": modelLower.includes("pro") ? ThinkingLevel.LOW : ThinkingLevel.MINIMAL,
|
|
11166
|
+
"Low": ThinkingLevel.LOW,
|
|
11167
|
+
"Medium": ThinkingLevel.MEDIUM,
|
|
11168
|
+
"Standard": ThinkingLevel.MEDIUM,
|
|
11169
|
+
"High": ThinkingLevel.HIGH,
|
|
11170
|
+
"xHigh": ThinkingLevel.HIGH
|
|
11171
|
+
}[thinkingLevel] || ThinkingLevel.MEDIUM
|
|
11172
|
+
};
|
|
11173
|
+
} else {
|
|
11174
|
+
const budget = {
|
|
11175
|
+
"Fast": 0,
|
|
11176
|
+
"Low": 512,
|
|
11177
|
+
"Medium": 2048,
|
|
11178
|
+
"Standard": 2048,
|
|
11179
|
+
"High": 16384,
|
|
11180
|
+
"xHigh": 24576
|
|
11181
|
+
}[thinkingLevel] || 2048;
|
|
11182
|
+
if (budget === 0) {
|
|
11183
|
+
return { includeThoughts: false };
|
|
11184
|
+
}
|
|
11185
|
+
return {
|
|
11186
|
+
includeThoughts: true,
|
|
11187
|
+
thinkingBudget: budget
|
|
11188
|
+
};
|
|
11189
|
+
}
|
|
11190
|
+
})()
|
|
11154
11191
|
}
|
|
11155
11192
|
});
|
|
11156
11193
|
stream = genStream;
|
|
@@ -12843,8 +12880,8 @@ ${ideErr} [/ERROR]`;
|
|
|
12843
12880
|
} else if (normToolName === "await") {
|
|
12844
12881
|
const { time } = parseArgs(toolCall.args);
|
|
12845
12882
|
let sec = parseFloat(time) || 0;
|
|
12846
|
-
if (sec <
|
|
12847
|
-
if (sec >
|
|
12883
|
+
if (sec < 10) sec = 10;
|
|
12884
|
+
if (sec > 180) sec = 180;
|
|
12848
12885
|
const formatTime = (s) => {
|
|
12849
12886
|
if (s >= 60) {
|
|
12850
12887
|
const m = Math.floor(s / 60);
|
|
@@ -13927,28 +13964,43 @@ Error Log can be found in ${path19.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
13927
13964
|
const mergedSettings = { ...savedSettings, ...settings };
|
|
13928
13965
|
const targetModel = model || settings?.modelName || settings?.activeModel || savedSettings.activeModel;
|
|
13929
13966
|
const SUBAGENT_TOOL_DEFINITIONS = {
|
|
13930
|
-
"readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files, supports images/docs
|
|
13931
|
-
"readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed folder contents and stats
|
|
13932
|
-
"filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, classes, imports/exports
|
|
13933
|
-
"patchfile": '- [tool:functions.PatchFile(path="...", replaceContent1="...", newContent1="...")]. Surgical block replacement for editing files
|
|
13934
|
-
"writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates or overwrites a file
|
|
13935
|
-
"searchkeyword": '- [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false")]. Global project text search
|
|
13936
|
-
"
|
|
13937
|
-
"
|
|
13938
|
-
"
|
|
13939
|
-
"webscrape": '- [tool:functions.WebScrape(url="...")]. Web Scrape.'
|
|
13967
|
+
"readfile": '- [tool:functions.ReadFile(path="...", startLine=number, endLine=number)]. View files, supports images/docs',
|
|
13968
|
+
"readfolder": '- [tool:functions.ReadFolder(path="...")]. Detailed folder contents and stats',
|
|
13969
|
+
"filemap": '- [tool:functions.FileMap(path="path/file")]. Shows file structure, functions, classes, imports/exports',
|
|
13970
|
+
"patchfile": '- [tool:functions.PatchFile(path="...", replaceContent1="...", newContent1="...")]. Surgical block replacement for editing files',
|
|
13971
|
+
"writefile": '- [tool:functions.WriteFile(path="...", content="...")]. Creates or overwrites a file',
|
|
13972
|
+
"searchkeyword": '- [tool:functions.SearchKeyword(keyword="...", file="optional", subString="true/false")]. Global project text search',
|
|
13973
|
+
"websearch": '- [tool:functions.WebSearch(query="...", limit=number)]. Web Search',
|
|
13974
|
+
"webscrape": '- [tool:functions.WebScrape(url="...")]. Web Scrape',
|
|
13975
|
+
"ask": `- [tool:functions.Ask(question="...", optionA="option::description", ...MAX 4)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish/guess. Suggest best options; don't ask for preferences`
|
|
13940
13976
|
};
|
|
13941
|
-
const providedToolsSection =
|
|
13942
|
-
|
|
13943
|
-
|
|
13977
|
+
const providedToolsSection = `-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
|
|
13978
|
+
To call tools USE THIS EXACT SYNTAX: [tool:functions.ToolName(args)]. **NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
|
|
13979
|
+
TOOL POLICY:
|
|
13980
|
+
- MAX 3 TOOL CALLS PER TURN. Next Turn, verify tool results, plan next
|
|
13981
|
+
- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 HIGHLY RECOMMENDED
|
|
13982
|
+
- FileMap >>> ReadFile to understand file efficiently
|
|
13983
|
+
- Want spefific STRING across project/file? SearchKeyword >> Guessing/ReadFile
|
|
13984
|
+
- HUGE FILES? SearchKeyword >> FileMap/Full Read
|
|
13985
|
+
-- PROVIDED TOOLS --
|
|
13944
13986
|
${Object.values(SUBAGENT_TOOL_DEFINITIONS).join("\n")}`;
|
|
13945
|
-
const systemInstruction =
|
|
13987
|
+
const systemInstruction = `=== START SYSTEM PROMPT ===
|
|
13988
|
+
You are a subagent helping the main FluxFlow CLI agent
|
|
13946
13989
|
Your task is: "${task}"
|
|
13947
|
-
|
|
13990
|
+
|
|
13991
|
+
${providedToolsSection.trimEnd()}
|
|
13992
|
+
|
|
13993
|
+
-- THINKING POLICY --
|
|
13994
|
+
NO EXPLICIT THINKING REQUIRED. FOCUS ON COMPLETING THE TASK DIRECTLY
|
|
13995
|
+
|
|
13948
13996
|
Your main focus should be on tools and task, not chatting. Your Chat won't be visible to user
|
|
13949
|
-
Once you have fully completed the task, provide a
|
|
13997
|
+
Once you have fully completed the task, provide a detailed final structured summary preferebly in Tables/Bullet Points, if any task failed report back in detail, no hallucination
|
|
13998
|
+
|
|
13999
|
+
CWD: ${process.cwd()}
|
|
14000
|
+
Current Time: ${(/* @__PURE__ */ new Date()).toLocaleString("en-US", { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", hour12: true }).replace(/(\d+)\/(\d+)\/(\d+),/, "$3-$1-$2").replace(":", "-")}
|
|
14001
|
+
=== END SYSTEM PROMPT ===`;
|
|
13950
14002
|
const subagentHistory = [
|
|
13951
|
-
{ role: "user", text: `
|
|
14003
|
+
{ role: "user", text: `Complete this task: ${task}` }
|
|
13952
14004
|
];
|
|
13953
14005
|
let turn = 0;
|
|
13954
14006
|
let finalAnswer = "";
|