fluxflow-cli 1.4.1 → 1.4.3
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 +27 -11
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -583,8 +583,10 @@ ${mode === "Flux" ? `
|
|
|
583
583
|
3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory.
|
|
584
584
|
4. Write File: tool:functions.write_file(path="path", content="content"). Creates/Overwrites. NO CODE BLOCKS. RETURNS: Disk verification + original content (if overwritten) for 100% reversibility.
|
|
585
585
|
5. Update File: tool:functions.update_file(path="relative/path", content_to_replace="old", content_to_add="new"). Surgical patching. RETURNS: High-fidelity visual diff and old code block. You MUST verify that the change specifically matches your intent using the returned diff. PREFFER UPDATE FILE OVER WRITE FILE if file already exists for better reversal tracking (if a file has 500+ lines, try to stick with update_file over full-rewrite). DONT WRAP UPDATE FILE CALL CONTENT IN MARKDOWN CODE BLOCKS.
|
|
586
|
-
6. Execution: tool:functions.exec_command(command="terminal command"). Runs a shell command
|
|
587
|
-
|
|
586
|
+
6. Execution: tool:functions.exec_command(command="terminal command"). Runs a shell command.
|
|
587
|
+
|
|
588
|
+
**NOTE:** WHEN WRITING/UPDATING FILES, USE ACTUAL NEW LINE CHARACTER FOR LINE BREAKS RATHER THAN STRING '\\n'`.trim() : `
|
|
589
|
+
- DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
|
|
588
590
|
-----------------
|
|
589
591
|
Results will be provided in the next loop as: [TOOL_RESULT]: [content]
|
|
590
592
|
WHEN CALLING TOOLS, YOU **MUST** end your response with '[turn: continue]'. NEVER use '[turn: finish]' in the same turn as a tool call. After receiving the [TOOL_RESULT], acknowledge the output and verify if the goal is met; only then may you use '[turn: finish]', otherwise use '[turn: continue]'.
|
|
@@ -629,8 +631,8 @@ var thinking_prompts_default;
|
|
|
629
631
|
var init_thinking_prompts = __esm({
|
|
630
632
|
"src/data/thinking_prompts.json"() {
|
|
631
633
|
thinking_prompts_default = {
|
|
632
|
-
Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN
|
|
633
|
-
High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN
|
|
634
|
+
Max: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MAX\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 12**, **MAX 15**. EACH HEADING SHOULD HAVE MIN 12, MAX 16 SENTENCES OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & NUANCES. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
635
|
+
High: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: HIGH\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 8**, **MAX 11**. EACH HEADING SHOULD HAVE MIN 8, MAX 12 SENTENCES OF INTERNAL MONOLOGUE. EXPLORE EDGE CASES & THINK LONGER before responding. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
634
636
|
Medium: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: MEDIUM\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 3**, **MAX 5**. EACH HEADING SHOULD HAVE MIN 4, MAX 8 SENTENCES OF INTERNAL MONOLOGUE. THINK LONGER FOR COMPLEX QUERIES. Dynamic Thinking preferred based on query.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --",
|
|
635
637
|
Minimal: "-- START THINKING INSTRUCTIONS --\nEFFORT_LEVEL: LOW\nThink Step by Step in Chain-of-Thought. Provide the thinking in <think>...</think> block, length given. Thinking should be structured in this format:\n\n<think>\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\n\\n\\n\n**Heading**\n\\n\\n\nSelf MONOLOGUE\ncontinue.\n\\n\\n\n</think>\\n\\n\n\n(MUST START THE RESPONSE IN NEW LINE AFTER ENDING THINKING BLOCK)\n\n**CRITICAL**: Heading blocks: **MIN 0**, **MAX 2**. EACH HEADING SHOULD HAVE MIN 1, MAX 3 SENTENCES OF INTERNAL MONOLOGUE. No Thinking is preferred if query is simple.\nNEVER WRITE FUNCTION CALLS IN THINKING BLOCK WITH 'tool:' PREFIX AND NEVER WRITE '[turn: ...]' INSIDE THINKING BLOCK.\nConverge Thinking & Avoid running into thinking Loops. YOU MUST NOT EXCEED ALLOTTED THINKING BUDGET. COMPLETE YOUR THINKING WITHIN LIMITS AND START YOUR RESPONSE. DEFINE YOUR DYNAMIC THINKING BUDGET BASED ON THE QUERY COMPLEXITY. DO NOT OVERTHINK SIMPLE ONES.\n-- END THINKING INSTRUCTIONS --"
|
|
636
638
|
};
|
|
@@ -1854,7 +1856,7 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
1854
1856
|
label = `EXECUTING ${toolCall.toolName}`.toUpperCase();
|
|
1855
1857
|
}
|
|
1856
1858
|
if (label) {
|
|
1857
|
-
const boxWidth = Math.min(label.length + 4,
|
|
1859
|
+
const boxWidth = Math.min(label.length + 4, 115);
|
|
1858
1860
|
const boxTop = `\u256D${"\u2500".repeat(boxWidth)}\u256E`;
|
|
1859
1861
|
const boxMid = `\u2502 ${label.padEnd(boxWidth - 2).substring(0, boxWidth - 2)} \u2502`;
|
|
1860
1862
|
const boxBottom = `\u2570${"\u2500".repeat(boxWidth)}\u256F`;
|
|
@@ -1954,12 +1956,17 @@ ${boxBottom}
|
|
|
1954
1956
|
} catch (logErr) {
|
|
1955
1957
|
}
|
|
1956
1958
|
const cleanResultForAI = result.split(/\r?\n/).filter((line) => !line.includes("[UI_CONTEXT]")).join("\n");
|
|
1957
|
-
|
|
1959
|
+
const aiContent = `[TOOL_RESULT]: ${cleanResultForAI}`;
|
|
1960
|
+
toolResults.push(aiContent);
|
|
1958
1961
|
let uiContent = `[TOOL_RESULT]: ${result}`;
|
|
1959
1962
|
if (toolCall.toolName === "view_file" || toolCall.toolName === "web_scrape") {
|
|
1960
1963
|
uiContent = `[TOOL_RESULT]: ${label} (Context Locked for UI Clarity)`;
|
|
1961
1964
|
}
|
|
1962
|
-
yield {
|
|
1965
|
+
yield {
|
|
1966
|
+
type: "tool_result",
|
|
1967
|
+
content: uiContent,
|
|
1968
|
+
aiContent
|
|
1969
|
+
};
|
|
1963
1970
|
if (toolCall.toolName === "memory" && result.includes("SUCCESS")) {
|
|
1964
1971
|
yield { type: "memory_updated" };
|
|
1965
1972
|
}
|
|
@@ -2909,7 +2916,10 @@ ${timestamp}` };
|
|
|
2909
2916
|
try {
|
|
2910
2917
|
const cleanHistoryForAI = [...messages, userMessage].filter(
|
|
2911
2918
|
(m) => m.role !== "think" && !String(m.id).startsWith("welcome")
|
|
2912
|
-
)
|
|
2919
|
+
).map((m) => ({
|
|
2920
|
+
...m,
|
|
2921
|
+
text: m.fullText || m.text
|
|
2922
|
+
}));
|
|
2913
2923
|
const stream = getAIStream(
|
|
2914
2924
|
activeModel,
|
|
2915
2925
|
cleanHistoryForAI,
|
|
@@ -3051,7 +3061,13 @@ Selection: ${val}`,
|
|
|
3051
3061
|
continue;
|
|
3052
3062
|
}
|
|
3053
3063
|
if (packet.type === "tool_result") {
|
|
3054
|
-
setMessages((prev) => [...prev, {
|
|
3064
|
+
setMessages((prev) => [...prev, {
|
|
3065
|
+
id: "tool-" + Date.now(),
|
|
3066
|
+
role: "system",
|
|
3067
|
+
text: packet.content,
|
|
3068
|
+
fullText: packet.aiContent
|
|
3069
|
+
// Preserve raw data for next turn
|
|
3070
|
+
}]);
|
|
3055
3071
|
continue;
|
|
3056
3072
|
}
|
|
3057
3073
|
let chunkText = packet.content;
|
|
@@ -3781,8 +3797,8 @@ var init_app = __esm({
|
|
|
3781
3797
|
init_exec_command();
|
|
3782
3798
|
SESSION_START_TIME = Date.now();
|
|
3783
3799
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
3784
|
-
versionFluxflow = "1.4.
|
|
3785
|
-
updatedOn = "2026-04-
|
|
3800
|
+
versionFluxflow = "1.4.3";
|
|
3801
|
+
updatedOn = "2026-04-30";
|
|
3786
3802
|
ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task (turn: finish) before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
|
|
3787
3803
|
CommandMenu,
|
|
3788
3804
|
{
|