fluxflow-cli 1.5.2 → 1.5.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 +52 -20
- package/package.json +1 -1
package/dist/fluxflow.js
CHANGED
|
@@ -741,7 +741,7 @@ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"}
|
|
|
741
741
|
- Use GFM tables for structured data to keep the terminal view organized. KEEP SENTENCES IN TABLE **SHORT & CONCISE**. AND MAX 3 COLUMNS. DO NOT OVERUSE TABLES.
|
|
742
742
|
- **CRITICAL**: NEVER USE LaTeX IN TERMINAL RESPONSES (exception: file content).
|
|
743
743
|
- Keep Poems & Literature in Code Block.
|
|
744
|
-
- Use emojis & Kaomojis.
|
|
744
|
+
- Use emojis & Kaomojis. Prefer Kaomojis more.
|
|
745
745
|
-- END FORMATTING RULES --
|
|
746
746
|
|
|
747
747
|
-- START REPONSE FINISH PROTOCOL --
|
|
@@ -763,7 +763,7 @@ Current date and Time is: ${dateTimeStr}
|
|
|
763
763
|
AGENT RAWS (responses from this turn):
|
|
764
764
|
${agentRes}
|
|
765
765
|
${userMemories ? `
|
|
766
|
-
|
|
766
|
+
|
|
767
767
|
-- CURRENT PERSISTENT USER MEMORIES --
|
|
768
768
|
${userMemories}
|
|
769
769
|
-------------------------------------------------
|
|
@@ -1096,35 +1096,58 @@ var init_web_scrape = __esm({
|
|
|
1096
1096
|
await new Promise((r) => setTimeout(r, jitter));
|
|
1097
1097
|
await page.goto(url, { waitUntil: "networkidle2", timeout: 45e3 });
|
|
1098
1098
|
await new Promise((r) => setTimeout(r, 5e3));
|
|
1099
|
-
let
|
|
1100
|
-
const junk = document.querySelectorAll("script, style, nav, footer, header, noscript");
|
|
1099
|
+
let htmlContent = await page.evaluate(() => {
|
|
1100
|
+
const junk = document.querySelectorAll("script, style, nav, footer, header, noscript, svg, canvas, iframe, ad, .ads, link, meta, img");
|
|
1101
1101
|
junk.forEach((el) => el.remove());
|
|
1102
|
-
const
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1102
|
+
const iterator = document.createNodeIterator(document.body, NodeFilter.SHOW_COMMENT);
|
|
1103
|
+
let currentNode;
|
|
1104
|
+
while (currentNode = iterator.nextNode()) {
|
|
1105
|
+
currentNode.remove();
|
|
1106
|
+
}
|
|
1107
|
+
const allElements = document.querySelectorAll("*");
|
|
1108
|
+
allElements.forEach((el) => {
|
|
1109
|
+
const attributes = el.attributes;
|
|
1110
|
+
for (let i = attributes.length - 1; i >= 0; i--) {
|
|
1111
|
+
const attrName = attributes[i].name;
|
|
1112
|
+
if (attrName !== "href" && attrName !== "src") {
|
|
1113
|
+
el.removeAttribute(attrName);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
if ((el.tagName === "SPAN" || el.tagName === "DIV" || el.tagName === "SECTION") && el.attributes.length === 0) {
|
|
1117
|
+
if (el.tagName === "SPAN" || el.tagName === "DIV" && el.childNodes.length === 1 && el.childNodes[0].nodeType === Node.TEXT_NODE) {
|
|
1118
|
+
el.replaceWith(...el.childNodes);
|
|
1119
|
+
}
|
|
1108
1120
|
}
|
|
1109
1121
|
});
|
|
1110
|
-
|
|
1122
|
+
const pruneEmpty = () => {
|
|
1123
|
+
let found = false;
|
|
1124
|
+
document.querySelectorAll("*:not(br)").forEach((el) => {
|
|
1125
|
+
if (el.childNodes.length === 0 && !el.innerText.trim()) {
|
|
1126
|
+
el.remove();
|
|
1127
|
+
found = true;
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
if (found) pruneEmpty();
|
|
1131
|
+
};
|
|
1132
|
+
pruneEmpty();
|
|
1133
|
+
return document.body.innerHTML;
|
|
1111
1134
|
});
|
|
1112
|
-
if (!
|
|
1113
|
-
const
|
|
1135
|
+
if (!htmlContent) throw new Error("EMPTY_RENDER_RESULT");
|
|
1136
|
+
const cleanedHtml = htmlContent.replace(/\s+/g, " ").replace(/>\s+</g, "><").trim().substring(0, 3e4);
|
|
1114
1137
|
const toolLogDir = path7.join(LOGS_DIR, "tools");
|
|
1115
1138
|
if (!fs7.existsSync(toolLogDir)) fs7.mkdirSync(toolLogDir, { recursive: true });
|
|
1116
|
-
fs7.appendFileSync(path7.join(toolLogDir, "search-scraped.log"), `PUPPETEER ${(/* @__PURE__ */ new Date()).toISOString()} - URL: [${url}]. Length: ${
|
|
1139
|
+
fs7.appendFileSync(path7.join(toolLogDir, "search-scraped.log"), `PUPPETEER ${(/* @__PURE__ */ new Date()).toISOString()} - URL: [${url}]. Length: ${cleanedHtml.length}.
|
|
1117
1140
|
Content:
|
|
1118
|
-
${
|
|
1141
|
+
${cleanedHtml}
|
|
1119
1142
|
|
|
1120
1143
|
--------------------------------------------------------
|
|
1121
1144
|
|
|
1122
1145
|
|
|
1123
1146
|
`);
|
|
1124
1147
|
await browser.close();
|
|
1125
|
-
return `
|
|
1148
|
+
return `CLEANED HTML FROM [${url}]:
|
|
1126
1149
|
|
|
1127
|
-
${
|
|
1150
|
+
${cleanedHtml}${htmlContent.length > 3e4 ? "\n\n[TRUNCATED AT 30K CHARS]" : ""}`;
|
|
1128
1151
|
} catch (err) {
|
|
1129
1152
|
lastError = err;
|
|
1130
1153
|
if (browser) await browser.close();
|
|
@@ -2051,7 +2074,16 @@ USER_PROMPT: ${agentText}`.trim();
|
|
|
2051
2074
|
}
|
|
2052
2075
|
} catch (e) {
|
|
2053
2076
|
}
|
|
2054
|
-
|
|
2077
|
+
const pathLower = targetPath2.toLowerCase();
|
|
2078
|
+
const isPdf = pathLower.endsWith(".pdf");
|
|
2079
|
+
const isImage = /\.(png|jpg|jpeg|webp|gif|bmp)$/.test(pathLower);
|
|
2080
|
+
if (isPdf) {
|
|
2081
|
+
label = `\u{1F4C4} ANALYZING PDF: ${targetPath2}`.toUpperCase();
|
|
2082
|
+
} else if (isImage) {
|
|
2083
|
+
label = `\u{1F5BC}\uFE0F ANALYZING IMAGE: ${targetPath2}`.toUpperCase();
|
|
2084
|
+
} else {
|
|
2085
|
+
label = `\u{1F4C4} READING FILE: ${targetPath2}. LINES ${start_line} - ${actualEndLine} FROM ${totalLines}`.toUpperCase();
|
|
2086
|
+
}
|
|
2055
2087
|
} else if (toolCall.toolName === "list_files" || toolCall.toolName === "read_folder") {
|
|
2056
2088
|
const action = toolCall.toolName === "list_files" ? "LISTING" : "DISCOVERING";
|
|
2057
2089
|
label = `\u{1F4C2} ${action} DIRECTORY: ${parseArgs(toolCall.args).path || "."}`.toUpperCase();
|
|
@@ -4089,8 +4121,8 @@ var init_app = __esm({
|
|
|
4089
4121
|
init_setup();
|
|
4090
4122
|
SESSION_START_TIME = Date.now();
|
|
4091
4123
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
4092
|
-
versionFluxflow = "1.5.
|
|
4093
|
-
updatedOn = "2026-05-
|
|
4124
|
+
versionFluxflow = "1.5.3";
|
|
4125
|
+
updatedOn = "2026-05-02";
|
|
4094
4126
|
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(
|
|
4095
4127
|
CommandMenu,
|
|
4096
4128
|
{
|