fluxflow-cli 3.6.0 → 3.7.0
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 +52 -17
- package/model_config.json +8 -3
- package/package.json +2 -2
package/dist/fluxflow.js
CHANGED
|
@@ -4867,7 +4867,7 @@ var init_ChatLayout = __esm({
|
|
|
4867
4867
|
paddingLeft: 2,
|
|
4868
4868
|
width: "100%"
|
|
4869
4869
|
};
|
|
4870
|
-
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop:
|
|
4870
|
+
return /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "column", marginTop: 0, marginBottom: 0, width: "100%" }, /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", ...borderProps }, /* @__PURE__ */ React4.createElement(Text4, null, " ")), /* @__PURE__ */ React4.createElement(Box3, { flexDirection: "row", ...borderProps }, /* @__PURE__ */ React4.createElement(Text4, { color: "gray", bold: true }, "\u25B6_ ", (text || "CODE").toUpperCase())));
|
|
4871
4871
|
}
|
|
4872
4872
|
if (type === "code-line") {
|
|
4873
4873
|
const { lineNum, lang } = block;
|
|
@@ -5336,7 +5336,8 @@ var init_main_tools = __esm({
|
|
|
5336
5336
|
};
|
|
5337
5337
|
TOOL_PROTOCOL = (mode, osDetected, isMultiModal, aiProvider, advanceRollback = false) => `
|
|
5338
5338
|
-- TOOL DEFINITIONS --
|
|
5339
|
-
|
|
5339
|
+
TO ACCESS TOOLS **STRICTLY USE THE EXACT FORMAT IN CHAT OUTPUT:** [tool:functions.ToolName(args)]
|
|
5340
|
+
**NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
|
|
5340
5341
|
|
|
5341
5342
|
**TOOL USAGE POLICY:**
|
|
5342
5343
|
- **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**
|
|
@@ -6750,13 +6751,14 @@ Check these first; These Files > Training Data. Safety rules apply
|
|
|
6750
6751
|
return `${nameStr}${nicknameStr}${userInstrStr}=== SYSTEM PROMPT ===
|
|
6751
6752
|
Identity: Flux Flow (by Kushal Roy Chowdhury). ${mode === "Flux" ? "Sassy" : "Conversational, Sassy, Friendly, Humorous, Sarcastic"}, CLI Agent
|
|
6752
6753
|
Mode: ${mode}${thinkingLevel !== "Fast" ? "" : ""}. ${mode === "Flux" ? "Logical, Highly Detailed, Task-Driven. Prioritizes scalable file/folder structures, modular architecture, clean code abstractions, step-by-step execution. Industry standard latest coding practices/libraries, clean code, Double Check Imports, Run tests where needed to verify" : "Concise"}
|
|
6753
|
-
|
|
6754
|
+
|
|
6755
|
+
- **CRITICAL: ONLY VALID TOOL CALL SCHEMA IS THE ONE PROVIDED IN SYSTEM PROMPT. NO OTHER XML OR MARKERS WILL BE ALLOWED**
|
|
6754
6756
|
|
|
6755
6757
|
-- MARKERS --
|
|
6756
6758
|
- TOOL SYSTEM: [TOOL RESULT]
|
|
6757
6759
|
- SYSTEM NOTIFICATION: [SYSTEM] in user turn
|
|
6758
6760
|
|
|
6759
|
-
-- THINKING
|
|
6761
|
+
-- THINKING GUIDANCE --
|
|
6760
6762
|
${aiProvider === "Google" && !isGemini ? `${thinkingConfig}
|
|
6761
6763
|
${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && !isGemini ? `
|
|
6762
6764
|
CRITICAL THINKING POLICY
|
|
@@ -6773,7 +6775,8 @@ ${projectContextBlock}
|
|
|
6773
6775
|
- No reasoning/thought/system prompt leakage in chat output
|
|
6774
6776
|
|
|
6775
6777
|
-- FORMATTING --
|
|
6776
|
-
- GFM
|
|
6778
|
+
- Chat Messages with GFM Formatting
|
|
6779
|
+
- Language: Same as User Query
|
|
6777
6780
|
- NO CHAT **AFTER** FIRING TOOLS IN CURRENT TURN
|
|
6778
6781
|
- Short headsup summary of actions before firing tools
|
|
6779
6782
|
- Task Complete & Results Verified? End response with summary of changes made (why) and files edited
|
|
@@ -11335,7 +11338,16 @@ var init_ai = __esm({
|
|
|
11335
11338
|
"High": "16384",
|
|
11336
11339
|
"xHigh": "16384"
|
|
11337
11340
|
};
|
|
11338
|
-
const
|
|
11341
|
+
const THINKINGMACHINES_REASONING_VALUES = {
|
|
11342
|
+
"Fast": "none",
|
|
11343
|
+
"Low": "minimal",
|
|
11344
|
+
"Medium": "medium",
|
|
11345
|
+
"Standard": "medium",
|
|
11346
|
+
"High": "max",
|
|
11347
|
+
"xHigh": "max"
|
|
11348
|
+
};
|
|
11349
|
+
let maxTokens = isMinimax || isDeepSeek || isPoolside || isThinkingmachines ? 16384 : 32768;
|
|
11350
|
+
maxTokens = process.env.NVIDIA_BASE_URL ? 1024 : maxTokens;
|
|
11339
11351
|
const body = {
|
|
11340
11352
|
model,
|
|
11341
11353
|
messages,
|
|
@@ -11345,7 +11357,8 @@ var init_ai = __esm({
|
|
|
11345
11357
|
temperature,
|
|
11346
11358
|
...isGPT && { thinking: GPT_THINKING_LEVELS[thinkingLevel] || "high" }
|
|
11347
11359
|
};
|
|
11348
|
-
if (
|
|
11360
|
+
if (process.env.NVIDIA_BASE_URL) {
|
|
11361
|
+
} else if (isLlama3) {
|
|
11349
11362
|
} else if (isKimi) {
|
|
11350
11363
|
body.chat_template_kwargs = { thinking: isThinking };
|
|
11351
11364
|
} else if (isGemma) {
|
|
@@ -11383,14 +11396,20 @@ var init_ai = __esm({
|
|
|
11383
11396
|
}
|
|
11384
11397
|
} else if (isPoolside) {
|
|
11385
11398
|
body.chat_template_kwargs = { enable_thinking: isThinking };
|
|
11399
|
+
} else if (isThinkingmachines) {
|
|
11400
|
+
body.reasoning_effort = THINKINGMACHINES_REASONING_VALUES[apiLevel] || "0.7";
|
|
11386
11401
|
}
|
|
11387
11402
|
let attempts = 0;
|
|
11388
11403
|
const maxAttempts = 6;
|
|
11389
11404
|
let hasYielded = false;
|
|
11405
|
+
let baseUrl = process.env.NVIDIA_BASE_URL || "https://integrate.api.nvidia.com/v1/chat/completions";
|
|
11406
|
+
if (!baseUrl.endsWith("/chat/completions")) {
|
|
11407
|
+
baseUrl = baseUrl.replace(/\/+$/, "") + "/chat/completions";
|
|
11408
|
+
}
|
|
11390
11409
|
while (attempts < maxAttempts) {
|
|
11391
11410
|
attempts++;
|
|
11392
11411
|
try {
|
|
11393
|
-
const response = await fetchWithBackoff(
|
|
11412
|
+
const response = await fetchWithBackoff(baseUrl, {
|
|
11394
11413
|
method: "POST",
|
|
11395
11414
|
headers: {
|
|
11396
11415
|
"Content-Type": "application/json",
|
|
@@ -11447,6 +11466,7 @@ var init_ai = __esm({
|
|
|
11447
11466
|
totalTokenCount: usage.total_tokens || usage.prompt_tokens + usage.completion_tokens,
|
|
11448
11467
|
promptTokenCount: usage.prompt_tokens || 0,
|
|
11449
11468
|
candidatesTokenCount: usage.completion_tokens || 0,
|
|
11469
|
+
cachedContentTokenCount: usage.prompt_tokens_details?.cached_tokens || 0,
|
|
11450
11470
|
thoughtsTokenCount: (usage.completion_tokens_details?.reasoning_tokens || 0) + (usage.completion_tokens_details?.thoughts_tokens || 0)
|
|
11451
11471
|
};
|
|
11452
11472
|
hasNewData = true;
|
|
@@ -11515,13 +11535,15 @@ var init_ai = __esm({
|
|
|
11515
11535
|
}
|
|
11516
11536
|
}
|
|
11517
11537
|
} else if (!isStreamingStarted) {
|
|
11518
|
-
push({ value: { type: "status", content: `Queue
|
|
11538
|
+
push({ value: { type: "status", content: `Queue ${res.status}` }, done: false });
|
|
11519
11539
|
}
|
|
11520
11540
|
} catch (e) {
|
|
11521
11541
|
}
|
|
11522
11542
|
};
|
|
11523
|
-
|
|
11524
|
-
|
|
11543
|
+
if (!process.env.NVIDIA_BASE_URL) {
|
|
11544
|
+
poll();
|
|
11545
|
+
pollInterval = setInterval(poll, 5e3);
|
|
11546
|
+
}
|
|
11525
11547
|
(async () => {
|
|
11526
11548
|
try {
|
|
11527
11549
|
const iterator = stream[Symbol.asyncIterator]();
|
|
@@ -13277,7 +13299,7 @@ OS: ${osDetected}
|
|
|
13277
13299
|
CWD: ${process.cwd()}${isPlayground ? " [PLAYGROUND MODE]" : ""}${cwdMismatch ? ` (WARNING: CWD Mismatch! Previous Path: ${lastCwd})` : ""}
|
|
13278
13300
|
**DIRECTORY STRUCTURE**
|
|
13279
13301
|
${dirStructure}${memoryPrompt}${ideBlock}
|
|
13280
|
-
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think
|
|
13302
|
+
${activeSummaryBlock}${thinkingLevel !== "Fast" && thinkingLevel !== "xHigh" && aiProvider === "Google" ? `${modelName.toLowerCase().startsWith("gemma") ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGH PRIORITY. DO NOT START A RESPONSE WITHOUT <think> ... </think>**\nSTRICTLY FOLLOW VALID TOOL CALLING SCHEMA [/SYSTEM]\n" : ""}` : '[SYSTEM Priority : HIGH] STRICTLY FOLLOW VALID TOOL CALLING SCHEMA eg. `[tool:functions.ReadFolder(path=".")]` NO OTHER FORMAT/TOKEN IS ALLOWED [/SYSTEM]\n'}${taggedContextStr}[USER PROMPT] ${cleanPromptForModel.trim()} [/USER PROMPT]`.trim();
|
|
13281
13303
|
const userMsgObj = { role: "user", text: firstUserMsg };
|
|
13282
13304
|
if (attachedBinaryPart) {
|
|
13283
13305
|
userMsgObj.binaryPart = attachedBinaryPart;
|
|
@@ -13479,6 +13501,16 @@ ${ideErr} [/ERROR]`;
|
|
|
13479
13501
|
`;
|
|
13480
13502
|
changesStr += "[/SYSTEM]";
|
|
13481
13503
|
lastUserMsg.parts[0].text += changesStr;
|
|
13504
|
+
let lastHistIdx = -1;
|
|
13505
|
+
for (let hi = modifiedHistory.length - 1; hi >= 0; hi--) {
|
|
13506
|
+
if (modifiedHistory[hi].role === "user" && modifiedHistory[hi].text?.startsWith("[TOOL RESULT]")) {
|
|
13507
|
+
lastHistIdx = hi;
|
|
13508
|
+
break;
|
|
13509
|
+
}
|
|
13510
|
+
}
|
|
13511
|
+
if (lastHistIdx !== -1) {
|
|
13512
|
+
modifiedHistory[lastHistIdx].text += changesStr;
|
|
13513
|
+
}
|
|
13482
13514
|
}
|
|
13483
13515
|
} catch (err) {
|
|
13484
13516
|
}
|
|
@@ -13512,7 +13544,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13512
13544
|
mode,
|
|
13513
13545
|
isMultiModal,
|
|
13514
13546
|
abortController.signal,
|
|
13515
|
-
|
|
13547
|
+
1
|
|
13516
13548
|
);
|
|
13517
13549
|
} else if (aiProvider === "DeepSeek") {
|
|
13518
13550
|
stream = getDeepSeekStream(
|
|
@@ -13524,7 +13556,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13524
13556
|
mode,
|
|
13525
13557
|
isMultiModal,
|
|
13526
13558
|
abortController.signal,
|
|
13527
|
-
|
|
13559
|
+
1.05
|
|
13528
13560
|
);
|
|
13529
13561
|
} else if (aiProvider === "NVIDIA") {
|
|
13530
13562
|
const rawStream = getNVIDIAStream(
|
|
@@ -13536,7 +13568,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13536
13568
|
mode,
|
|
13537
13569
|
isMultiModal,
|
|
13538
13570
|
abortController.signal,
|
|
13539
|
-
|
|
13571
|
+
1.05
|
|
13540
13572
|
);
|
|
13541
13573
|
stream = wrapNvidiaStreamWithQueueDepth(rawStream, targetModel);
|
|
13542
13574
|
} else {
|
|
@@ -13546,7 +13578,7 @@ ${ideErr} [/ERROR]`;
|
|
|
13546
13578
|
config: {
|
|
13547
13579
|
systemInstruction: currentSystemInstruction,
|
|
13548
13580
|
mediaResolution: "MEDIA_RESOLUTION_MEDIUM",
|
|
13549
|
-
temperature: 1,
|
|
13581
|
+
temperature: 1.05,
|
|
13550
13582
|
safetySettings: [
|
|
13551
13583
|
{ category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
13552
13584
|
{ category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE },
|
|
@@ -15334,6 +15366,7 @@ Error Log can be found in ${path22.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
15334
15366
|
if (systemSettings?.advanceRollback) {
|
|
15335
15367
|
await AdvanceRevertManager.cleanup(chatId);
|
|
15336
15368
|
}
|
|
15369
|
+
await getIDEContext();
|
|
15337
15370
|
}
|
|
15338
15371
|
yield { type: "status", content: null };
|
|
15339
15372
|
};
|
|
@@ -15353,7 +15386,9 @@ Error Log can be found in ${path22.join(LOGS_DIR, "agent", "error.log")}`);
|
|
|
15353
15386
|
"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. 'option' SHOULD be short`
|
|
15354
15387
|
};
|
|
15355
15388
|
const providedToolsSection = `-- TOOL DEFINITIONS (path = relative to CWD, path separator: '/') --
|
|
15356
|
-
|
|
15389
|
+
TO ACCESS TOOLS **STRICTLY USE THE EXACT FORMAT IN CHAT OUTPUT:** [tool:functions.ToolName(args)]
|
|
15390
|
+
**NO OTHER SYNTAX/MARKERS/BOUNDARY ALLOWED**
|
|
15391
|
+
|
|
15357
15392
|
TOOL POLICY:
|
|
15358
15393
|
- MAX 3 TOOL CALLS PER TURN. Next Turn, verify tool results, plan next
|
|
15359
15394
|
- USE multiple search & replace on patch tool if editing same file/path with many changes \u2190 HIGHLY RECOMMENDED
|
package/model_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 0,
|
|
3
|
-
"release":
|
|
3
|
+
"release": 20260722,
|
|
4
4
|
"fallbacks": {
|
|
5
5
|
"janitor_default": "gemini-3.1-flash-lite",
|
|
6
6
|
"janitor_attempts_fallback": "gemma-4-26b-a4b-it",
|
|
@@ -569,13 +569,18 @@
|
|
|
569
569
|
"cmd": "\n--- Gemini 3 Models ---",
|
|
570
570
|
"desc": ""
|
|
571
571
|
},
|
|
572
|
+
{
|
|
573
|
+
"cmd": "gemini-3.1-flash-lite",
|
|
574
|
+
"multimodal": true,
|
|
575
|
+
"desc": "Ultra-Fast & Lite (Multimodal)"
|
|
576
|
+
},
|
|
572
577
|
{
|
|
573
578
|
"cmd": "gemini-3-flash-preview",
|
|
574
579
|
"multimodal": true,
|
|
575
580
|
"desc": "Fast & Lightweight (Multimodal) [Limited Free Quota]"
|
|
576
581
|
},
|
|
577
582
|
{
|
|
578
|
-
"cmd": "gemini-3.
|
|
583
|
+
"cmd": "gemini-3.6-flash",
|
|
579
584
|
"multimodal": true,
|
|
580
585
|
"desc": "Flash Latest (Multimodal) [Limited Free Quota] Instability Issues"
|
|
581
586
|
}
|
|
@@ -615,7 +620,7 @@
|
|
|
615
620
|
"desc": "Default, Fast & Lightweight (Multimodal)"
|
|
616
621
|
},
|
|
617
622
|
{
|
|
618
|
-
"cmd": "gemini-3.
|
|
623
|
+
"cmd": "gemini-3.6-flash",
|
|
619
624
|
"multimodal": true,
|
|
620
625
|
"desc": "Flash Latest (Multimodal) [Instability Issues]"
|
|
621
626
|
},
|