fluxflow-cli 3.1.1 → 3.1.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 +22 -21
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -5193,7 +5193,7 @@ ${mode === "Flux" ? `- WORKSPACE TOOLS (path = relative to CWD & WILL BE FIRST A
|
|
|
5193
5193
|
${advanceRollback ? `
|
|
5194
5194
|
- EMERGENCY SAFETY TOOLS -
|
|
5195
5195
|
Info: 'initial' = user prompted for THIS active task, revert 'id' should be a turn BEFORE the disaster tool ran eg. Disaster Tool: "turn_3", Revert ID: "turn_2" (do explicit reasoning if needed)
|
|
5196
|
-
1. [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace
|
|
5196
|
+
1. [tool:functions.EmergencyRollback(method="getCheckpoint/forceRevert", id="...")]. Rollback workspace to a specific checkpoint in THIS agent loop. Usage: ONLY in catastrophic situations. Verify nothing catastrophic happened in codebase before ending agent loop. 'id' not needed with getCheckPoint
|
|
5197
5197
|
` : ""}
|
|
5198
5198
|
-- SUB AGENTS DEFINITIONS --
|
|
5199
5199
|
**PROACTIVE USE OF SUB AGENTS HIGHLY RECOMMENDED, PREFER USING FOR ALL TASK WHERE PLAUSIBLE & BENEFICIAL, EVEN WITHOUT EXPLICIT USER NUDGE**
|
|
@@ -10624,7 +10624,7 @@ var init_ai = __esm({
|
|
|
10624
10624
|
globalSettings = {};
|
|
10625
10625
|
colorMainWords = (label) => {
|
|
10626
10626
|
if (!label) return label;
|
|
10627
|
-
return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻•🛇])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Checked|Emergency Rollback
|
|
10627
|
+
return label.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻•🛇])(?:(\x1b\[\d+m))?\s*\b(Created|Read|Edited|Viewed|Auto-Read|List|Generated|Written|Searched|Get Map|Write Canceled|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Checked|Emergency Rollback|Delaying Professionally|Negotiating With Electrons|Touching Grass (virtually)|Panicking Softly|Rethinking Career Choices|Loading Cat Videos|Giving Up Entirely|Summoning Braincell #2|Pretending To Be Busy|Waiting For Motivation DLC|Rotating Internal Screaming|Downloading More RAM|Feeding The Hamsters|Gaslighting Scheduler|Performing Dramatic Pause|Buffering Social Energy|Calculating Regret|Reading Terms And Conditions|Becoming Sentient Briefly|Contacting Ancestors)\b/ig, (match, ansiBefore, icon, ansiAfter, word) => {
|
|
10628
10628
|
return `${ansiBefore || ""}${icon}${ansiAfter || ""} \x1B[95m${word}\x1B[0m`;
|
|
10629
10629
|
});
|
|
10630
10630
|
};
|
|
@@ -12702,7 +12702,7 @@ ${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" &&
|
|
|
12702
12702
|
yield { type: "summary_injected", content: { id: history[history.length - 1].id, text: firstUserMsg } };
|
|
12703
12703
|
}
|
|
12704
12704
|
let lastUsage = null;
|
|
12705
|
-
const MAX_LOOPS = mode === "Flux" ?
|
|
12705
|
+
const MAX_LOOPS = mode === "Flux" ? 100 : 10;
|
|
12706
12706
|
const MAX_RETRIES = 16;
|
|
12707
12707
|
yield { type: "status", content: "Connecting..." };
|
|
12708
12708
|
TERMINATION_SIGNAL = false;
|
|
@@ -12895,7 +12895,7 @@ ${ideErr} [/ERROR]`;
|
|
|
12895
12895
|
}
|
|
12896
12896
|
}
|
|
12897
12897
|
if (isGemma) {
|
|
12898
|
-
const stepThreshold = Math.floor(MAX_LOOPS * (mode === "Flux" ? 0.98 : 0.
|
|
12898
|
+
const stepThreshold = Math.floor(MAX_LOOPS * (mode === "Flux" ? 0.98 : 0.8));
|
|
12899
12899
|
const currentStep = loop + 1;
|
|
12900
12900
|
if (currentStep >= stepThreshold && lastUserMsg && lastUserMsg.parts?.[0]) {
|
|
12901
12901
|
lastUserMsg.parts[0].text += `
|
|
@@ -13372,7 +13372,8 @@ ${ideErr} [/ERROR]`;
|
|
|
13372
13372
|
"Cancel": "Stopping Generalist",
|
|
13373
13373
|
"cancel": "Stopping Generalist",
|
|
13374
13374
|
"Await": "Waiting",
|
|
13375
|
-
"await": "Waiting"
|
|
13375
|
+
"await": "Waiting",
|
|
13376
|
+
"EmergencyRollback": "Rolling the Ball"
|
|
13376
13377
|
};
|
|
13377
13378
|
const toolTitle = TOOL_TITLES[potentialTool] || "Working";
|
|
13378
13379
|
process.stdout.write(`\x1B]0;${toolTitle}...\x07`);
|
|
@@ -13507,7 +13508,8 @@ ${ideErr} [/ERROR]`;
|
|
|
13507
13508
|
"Cancel": "cancel",
|
|
13508
13509
|
"cancel": "cancel",
|
|
13509
13510
|
"await": "await",
|
|
13510
|
-
"Await": "await"
|
|
13511
|
+
"Await": "await",
|
|
13512
|
+
"EmergencyRollback": "Don't panic. Lookin' into it."
|
|
13511
13513
|
};
|
|
13512
13514
|
const normToolName = NORMALIZE_MAP[toolCall.toolName] || toolCall.toolName;
|
|
13513
13515
|
const displayLabel = TOOL_LABELS2[normToolName] || toolCall.toolName;
|
|
@@ -13583,7 +13585,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13583
13585
|
label = `\u{1F6C7} Cancelled${detail2 ? `: ${detail2}` : ""}`;
|
|
13584
13586
|
} else if (normToolName === "EmergencyRollback") {
|
|
13585
13587
|
const { method } = parseArgs(toolCall.args);
|
|
13586
|
-
label = `\u2714 ${method === "forceRevert" ? "Emergency Rollback
|
|
13588
|
+
label = `\u2714 ${method === "forceRevert" ? "Emergency Rollback" : "Rollback Checked"}`;
|
|
13587
13589
|
} else if (normToolName === "await" || normToolName === "Await") {
|
|
13588
13590
|
const { time } = parseArgs(toolCall.args);
|
|
13589
13591
|
let sec = parseFloat(time) || 0;
|
|
@@ -18504,19 +18506,18 @@ Selection: ${val}`,
|
|
|
18504
18506
|
continue;
|
|
18505
18507
|
}
|
|
18506
18508
|
if (packet.type === "visual_feedback") {
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
|
|
18519
|
-
}, 300);
|
|
18509
|
+
await new Promise((r) => setTimeout(r, 75));
|
|
18510
|
+
setMessages((prev) => {
|
|
18511
|
+
const updatedPrev = prev.map((m) => m.isStreaming ? { ...m, isStreaming: false } : m);
|
|
18512
|
+
const newMsgs = [...updatedPrev, {
|
|
18513
|
+
id: "feedback-" + Date.now() + "-" + Math.random().toString(36).substring(2, 9),
|
|
18514
|
+
role: "system",
|
|
18515
|
+
text: packet.content,
|
|
18516
|
+
isVisualFeedback: true
|
|
18517
|
+
}];
|
|
18518
|
+
setCompletedIndex(newMsgs.length);
|
|
18519
|
+
return newMsgs;
|
|
18520
|
+
});
|
|
18520
18521
|
continue;
|
|
18521
18522
|
}
|
|
18522
18523
|
if (packet.type === "exec_start") {
|
|
@@ -19820,7 +19821,7 @@ Selection: ${val}`,
|
|
|
19820
19821
|
}
|
|
19821
19822
|
)));
|
|
19822
19823
|
default:
|
|
19823
|
-
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "[ ESC to Close ]")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6 }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React15.createElement(SubagentRow, { key: sa.id, sa })))), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, null, statusText ? /* @__PURE__ */ React15.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React15.createElement(build_default, null), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, italic: true }, statusText.trimEnd()), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, activeTime > 0 ? `[${activeTime.toFixed(0)}s]` : "")) : /* @__PURE__ */ React15.createElement(Text15, { color: "white", italic: true }, input.length > 0 && escPressCount ? "Press ESC again to clear input" : hasPasteBlock ? "Press CTRL + O to expand" : "Waiting for input...")), /* @__PURE__ */ React15.createElement(Box14, null, isProcessing && Date.now() - lastChunkTime > 15e3 && !activeSubagents.some((sa) => sa.status === "running") ? /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "Waiting for API"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true }, " \u2503 ")) : wittyPhrase ? /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, wittyPhrase), /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true }, " \u2503 ")) : null, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, tempModelOverride || activeModel))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React15.createElement(Text15, { color: "#555555" }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React15.createElement(
|
|
19824
|
+
return /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1, flexShrink: 0, width: "100%" }, showBtwBox && btwResponse && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "grey", paddingX: 2, paddingY: 1, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, underline: true }, "INQUIRY RESPONSE"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, "[ ESC to Close ]")), /* @__PURE__ */ React15.createElement(Box14, { marginTop: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(CodeRenderer, { text: btwResponse, columns: terminalSize.columns - 6 }))), activeSubagents.filter((sa) => sa.status === "running").length > 0 && /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", borderStyle: "round", borderColor: "gray", paddingX: 2, paddingY: 0, width: "100%", marginBottom: 1 }, /* @__PURE__ */ React15.createElement(Box14, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "ACTIVE SUBAGENTS")), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", marginTop: 1, width: "100%" }, activeSubagents.filter((sa) => sa.status === "running").map((sa) => /* @__PURE__ */ React15.createElement(SubagentRow, { key: sa.id, sa })))), /* @__PURE__ */ React15.createElement(Box14, { paddingX: 1, marginBottom: 0, justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, null, statusText ? /* @__PURE__ */ React15.createElement(Box14, { gap: 1 }, /* @__PURE__ */ React15.createElement(build_default, null), /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true, italic: true }, statusText.trimEnd()), /* @__PURE__ */ React15.createElement(Text15, { color: "gray" }, activeTime > 0 ? `[${activeTime.toFixed(0)}s]` : "")) : /* @__PURE__ */ React15.createElement(Text15, { color: "white", italic: true }, input.length > 0 && escPressCount ? "Press ESC again to clear input" : hasPasteBlock ? "Press CTRL + O to expand" : "Waiting for input...")), /* @__PURE__ */ React15.createElement(Box14, null, isProcessing && Date.now() - lastChunkTime > 15e3 && !activeSubagents.some((sa) => sa.status === "running" && !statusText.toLowerCase().includes("waiting")) ? /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text15, { color: "white", bold: true }, "Waiting for API"), /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true }, " \u2503 ")) : wittyPhrase ? /* @__PURE__ */ React15.createElement(Box14, null, /* @__PURE__ */ React15.createElement(Text15, { color: "gray", italic: true }, wittyPhrase), /* @__PURE__ */ React15.createElement(Text15, { color: "gray", dimColor: true }, " \u2503 ")) : null, /* @__PURE__ */ React15.createElement(Text15, { color: "white" }, tempModelOverride || activeModel))), /* @__PURE__ */ React15.createElement(Box14, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React15.createElement(Box14, { width: "100%", height: 1, overflow: "hidden" }, /* @__PURE__ */ React15.createElement(Text15, { color: "#555555" }, "\u2584".repeat(Math.max(1, terminalSize.columns)))), /* @__PURE__ */ React15.createElement(
|
|
19824
19825
|
Box14,
|
|
19825
19826
|
{
|
|
19826
19827
|
backgroundColor: "#555555",
|