fluxflow-cli 1.12.1 → 1.12.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 +11 -6
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -961,7 +961,7 @@ ${mode === "Flux" ? `- FILE TOOLS (path = relative to CWD) -
|
|
|
961
961
|
2. [tool:functions.ReadFolder(path="...")]. Detailed DIR stats
|
|
962
962
|
3. [tool:functions.WriteFile(path="...", content="...")]. Creates/Overwrites. File Exist? -> update_file > write_file
|
|
963
963
|
4. [tool:functions.PatchFile(path="...", content_to_replace="exact old content", content_to_add="new content")]. Surgical patching. Unsure content_to_replace? -> view_file >> guessing.
|
|
964
|
-
5. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. A4
|
|
964
|
+
5. [tool:functions.WritePDF(path="...", content="...", orientation="...")]. MUST HAVE PROPER A4 PAGE BREAKS. HTML/CSS for premium layout (100vh/vw). No manual footers
|
|
965
965
|
6. [tool:functions.WriteDoc(path="...", content="...")]. A4 Word doc. Proper margins and page breaks
|
|
966
966
|
7. [tool:functions.Run(command="...")]. Runs a shell command. Destructive/Irreversible ops -> ask user
|
|
967
967
|
8. [tool:functions.SearchKeyword(keyword="...")]. Global search. Finds definitions/logic without reading every file
|
|
@@ -3549,6 +3549,9 @@ ${originalTextProcessed.length > 1500 ? "... (truncated) ...\n\n" : ""}
|
|
|
3549
3549
|
let attempts = 0;
|
|
3550
3550
|
const MAX_JANITOR_RETRIES = 5;
|
|
3551
3551
|
while (attempts <= MAX_JANITOR_RETRIES) {
|
|
3552
|
+
if (process.stdout.isTTY) {
|
|
3553
|
+
process.stdout.write(`\x1B]0;Retrying Memory (${attempts + 1})...\x07`);
|
|
3554
|
+
}
|
|
3552
3555
|
try {
|
|
3553
3556
|
if (!await checkQuota("background", settings)) {
|
|
3554
3557
|
return;
|
|
@@ -3632,7 +3635,7 @@ ${originalTextProcessed.length > 1500 ? "... (truncated) ...\n\n" : ""}
|
|
|
3632
3635
|
if (process.stdout.isTTY) {
|
|
3633
3636
|
process.stdout.write(`\x1B]0;Memory Error\x07`);
|
|
3634
3637
|
}
|
|
3635
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
3638
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
3636
3639
|
const janitorErrDir = path14.join(LOGS_DIR, "janitor");
|
|
3637
3640
|
if (!fs15.existsSync(janitorErrDir)) fs15.mkdirSync(janitorErrDir, { recursive: true });
|
|
3638
3641
|
fs15.appendFileSync(path14.join(janitorErrDir, "error.log"), `ERROR [Attempt ${attempts}/${MAX_JANITOR_RETRIES + 1}] [${date}]: ${String(janitorErr)}
|
|
@@ -4041,7 +4044,8 @@ ${thinkingLevel != "Fast" ? "[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS STRIC
|
|
|
4041
4044
|
}
|
|
4042
4045
|
const cleanText = dedupeBuffer.substring(overlapLen);
|
|
4043
4046
|
if (cleanText) {
|
|
4044
|
-
const
|
|
4047
|
+
const hasOpenThink = /<(think|thought)>(?:(?!<\/(?:think|thought)>)[\s\S])*$/i.test(accumulatedContext);
|
|
4048
|
+
const dedupeClean = hasOpenThink ? cleanText.replace(/^\s*<(think|thought)>\s*/gi, "") : cleanText.replace(/^\s*<(think|thought)>[\s\S]*?<\/(think|thought)>\s*/gi, "").replace(/^\s*<(think|thought)>\s*/gi, "");
|
|
4045
4049
|
if (dedupeClean) {
|
|
4046
4050
|
turnText += dedupeClean;
|
|
4047
4051
|
yield { type: "text", content: dedupeClean };
|
|
@@ -4423,7 +4427,8 @@ ${boxBottom}` };
|
|
|
4423
4427
|
}
|
|
4424
4428
|
const cleanText = dedupeBuffer.substring(overlapLen);
|
|
4425
4429
|
if (cleanText) {
|
|
4426
|
-
const
|
|
4430
|
+
const hasOpenThink = /<(think|thought)>(?:(?!<\/(?:think|thought)>)[\s\S])*$/i.test(accumulatedContext);
|
|
4431
|
+
const dedupeClean = hasOpenThink ? cleanText.replace(/^\s*<(think|thought)>\s*/gi, "") : cleanText.replace(/^\s*<(think|thought)>[\s\S]*?<\/(think|thought)>\s*/gi, "").replace(/^\s*<(think|thought)>\s*/gi, "");
|
|
4427
4432
|
if (dedupeClean) {
|
|
4428
4433
|
turnText += dedupeClean;
|
|
4429
4434
|
yield { type: "text", content: dedupeClean };
|
|
@@ -4461,7 +4466,8 @@ ${boxBottom}` };
|
|
|
4461
4466
|
}
|
|
4462
4467
|
const cleanText = dedupeBuffer.substring(overlapLen);
|
|
4463
4468
|
if (cleanText) {
|
|
4464
|
-
const
|
|
4469
|
+
const hasOpenThink = /<(think|thought)>(?:(?!<\/(?:think|thought)>)[\s\S])*$/i.test(accumulatedContext);
|
|
4470
|
+
const dedupeClean = hasOpenThink ? cleanText.replace(/^\s*<(think|thought)>\s*/gi, "") : cleanText.replace(/^\s*<(think|thought)>[\s\S]*?<\/(think|thought)>\s*/gi, "").replace(/^\s*<(think|thought)>\s*/gi, "");
|
|
4465
4471
|
if (dedupeClean) {
|
|
4466
4472
|
turnText += dedupeClean;
|
|
4467
4473
|
}
|
|
@@ -4475,7 +4481,6 @@ ${boxBottom}` };
|
|
|
4475
4481
|
const agentErrDir = path14.join(LOGS_DIR, "agent");
|
|
4476
4482
|
if (!fs15.existsSync(agentErrDir)) fs15.mkdirSync(agentErrDir, { recursive: true });
|
|
4477
4483
|
fs15.appendFileSync(path14.join(agentErrDir, "error.log"), `ERROR [${date}]: ${errLog}
|
|
4478
|
-
DEBUG STATE: turnText='${turnText}', length=${turnText.trim().length}, inStreamRetryCount=${inStreamRetryCount}, retryCount=${retryCount}, isDedupeActive=${isDedupeActive}, dedupeBuffer='${dedupeBuffer}'
|
|
4479
4484
|
|
|
4480
4485
|
----------------------------------------------------------------------
|
|
4481
4486
|
|