fluxflow-cli 1.9.13 → 1.9.15

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.
Files changed (2) hide show
  1. package/dist/fluxflow.js +56 -66
  2. package/package.json +1 -1
package/dist/fluxflow.js CHANGED
@@ -871,43 +871,41 @@ var init_main_tools = __esm({
871
871
  "src/data/main_tools.js"() {
872
872
  TOOL_PROTOCOL = (mode) => `
873
873
  -- TOOL DEFINITIONS --
874
- You have access to internal tools. To call a tool, you MUST use the following exact syntax on a new line:
874
+ Have access to internal tools. To call a tool, MUST use the following exact syntax on a new line:
875
875
  [tool:functions.tool_name(arguments)]
876
876
 
877
877
  - COMMUNICATION TOOLS -
878
- 1. Ask User: [tool:functions.ask(question="...", optionA="...", ...)]. Use for ambiguity. Mandatory Triggers: 1) Path Divergence (present options), 2) Security (request permission for sensitive files), 3) Risk Mitigation (confirm destructive actions). Prefer this over finishing for clarification.
879
- NOTE: Suggest best options; don't ask for preferences. System handles the rest.
878
+ 1. Ask User: [tool:functions.ask(question="...", optionA="...", ...)]. Ambiguity Resolution. Mandatory Triggers: Path Divergence, Security, Risk Mitigation. ask >> finish
879
+ Suggest best options; don't ask for preferences. System handles the rest
880
880
 
881
881
  - WEB TOOLS -
882
- 1. Web Search: [tool:functions.web_search(query="...", limit=number)]. Find info (limit 3-10, default 10). Use proactively for unknown topics${mode === "Flux" ? " or documentation." : "."}
883
- 2. Web Scrape: [tool:functions.web_scrape(url="<url>")]. provides detail from a URL.
882
+ 1. Web Search: [tool:functions.web_search(query="...", limit=number)]. Find info (limit 3-10). Proactive use for unknown topics${mode === "Flux" ? " or docs" : ""}
883
+ 2. Web Scrape: [tool:functions.web_scrape(url="<url>")]. Provides detail from a URL
884
884
 
885
- ${mode === "Flux" ? `
886
- - DEV TOOLS (path will always be relative to CWD) -
887
- 1. View File: [tool:functions.view_file(path="...", start_line=N, end_line=N)]. Reads content (800 lines max). Supports images/docs. If user provides an image/doc, view it first.
888
- 2. Read Folder: [tool:functions.read_folder(path="...")]. Detailed stats of a directory.
889
- 3. Write File: [tool:functions.write_file(path="...", content="content to write")]. Creates/Overwrites. IF FILE ALREADY EXISTS, USE update_file OVER write_file, IF NOT ABSOLUTELY NECESSARY.
890
- 4. Update File: [tool:functions.update_file(path="...", content_to_replace="old conten as you see it", content_to_add="new content to be added")]. Surgical patching. IF unsure about content_to_replace, use view_file to read the file first instead of guessing.
891
- 5. Write PDF: [tool:functions.write_pdf(path="...", content="html", orientation="...")]. A4 PDF. Use CSS for layout (100vh/vw). Handle page breaks pro-actively; no manual footers.
892
- 6. Write DOCX: [tool:functions.write_docx(path="...", content="html")]. A4 Word doc. Use proper margins and page breaks.
893
- 7. PPTX: [tool:functions.write_pptx(path="...", content="html")]. 4:3 PPTX. '---' for slides.
885
+ ${mode === "Flux" ? `- DEV TOOLS (path = relative to CWD) -
886
+ 1. View File: [tool:functions.view_file(path="...", start_line=N, end_line=N)]. Reads contents. Supports images/docs. User gives image/doc: VIEW FIRST
887
+ 2. Read Folder: [tool:functions.read_folder(path="...")]. Detailed DIR stats
888
+ 3. Write File: [tool:functions.write_file(path="...", content="content to write")]. Creates/Overwrites. File Exist? -> update_file > write_file
889
+ 4. Update File: [tool:functions.update_file(path="...", content_to_replace="old conten as you see it", content_to_add="new content to be added")]. Surgical patching. Unsure content_to_replace? -> use view_file >> guessing.
890
+ 5. Write PDF: [tool:functions.write_pdf(path="...", content="html", orientation="...")]. A4 PDF. Use CSS for layout (100vh/vw). Handle page breaks pro-actively; no manual footers
891
+ 6. Write DOCX: [tool:functions.write_docx(path="...", content="html")]. A4 Word doc. Use proper margins and page breaks
892
+ 7. PPTX: [tool:functions.write_pptx(path="...", content="html")]. 4:3 PPTX. '---' for slides
894
893
  Tags: a,b,br,del,font,h1-h6,i,ol,ul,li,p,pre,s,sub,sup,u
895
894
  CSS: background-color,color,font-family,font-size(pt),font-style,font-weight,margin,text-align,text-shadow
896
- 8. Execution: [tool:functions.exec_command(command="command")]. Runs a shell command. Use ask tool to confirm before executing any destructive or irreversible operations.
897
- 9. Search: [tool:functions.search_keyword(keyword="...")]. Global search. Use to locate definitions/logic without reading every file.
895
+ 8. Execution: [tool:functions.exec_command(command="command")]. Runs a shell command. Destructive/Irreversible ops -> ask user
896
+ 9. Search: [tool:functions.search_keyword(keyword="...")]. Global search. Finds definitions/logic without reading every file
898
897
 
899
898
  - VERIFY SUCCESS CONTENTS. Fix errors. No hallucinations.
900
899
  - File tools > Chat code blocks.
901
900
 
902
- - Escape quotes: Use \\" inside code strings.
903
- - Literal escapes: Double-escape sequences (e.g., \\\\n, \\\\t).
904
- - File structure: Use real newlines for code formatting.`.trim() : `
905
- - DEV TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX.`.trim()}
901
+ - Escape quotes: Use \\" inside code strings
902
+ - Literal escapes: Double-escape sequences (e.g., \\\\n, \\\\t)
903
+ - File structure: Use real newlines for code formatting`.trim() : `
904
+ - DEV TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX`.trim()}
906
905
 
907
- - Results: Passed as [TOOL_RESULT] (SYSTEM), USER_PROMPT (USER).
908
- - Tool calls: End with [turn: continue]. Only use [turn: finish] after verifying goals.
909
- - Multi-call: Stack 1-by-1. Upto 4.
910
- -- END TOOL DEFINITIONS --`.trim();
906
+ - Results: Passed as [TOOL_RESULT] (SYSTEM), USER_PROMPT (USER)
907
+ - Tool calls: End with [turn: continue]. Only use [turn: finish] after verifying goals
908
+ - Multi-call: Stack 1-by-1. Upto 3`.trim();
911
909
  }
912
910
  });
913
911
 
@@ -918,9 +916,7 @@ var init_janitor_tools = __esm({
918
916
  JANITOR_TOOLS_PROTOCOL = (isMemoryEnabled = true, needTitle = true) => `
919
917
  ${needTitle ? `-- CHAT MANAGEMENT TOOLS --
920
918
  1. YOU MUST UPDATE CHAT TITLE (URGENT PRIORITY):
921
- [tool:functions.chat(title='<short creative title of FULL conversation in 3-5 words>')]. Consider full chat context to generate title NOT just latest message.
922
- -- END CHAT MANAGEMENT TOOLS --
923
- `.trimEnd() : ""}
919
+ [tool:functions.chat(title='<short creative title of FULL conversation in 3-5 words>')]. Consider full chat context to generate title NOT just latest message.`.trimEnd() : ""}
924
920
  -- MEMORY TOOLS (YOU SHOULD NOT OUTPUT ANYTHING OTHER THAN THESE SPECIFIC TOOLS) --
925
921
  Your tool syntax is: '[tool:functions.function_name(args...)]'
926
922
  You have access to the following memory functions to persist important information:
@@ -935,8 +931,7 @@ ${isMemoryEnabled ? `2. User-specific long-term memory (USE BASED ON CONVERSATIO
935
931
 
936
932
  Usage Rules:
937
933
  - Frequency for 'user' action: Only when explicit context from chat is found or explicitly requested by the user.
938
- - IF YOU WANT TO SAVE SOMETHING, BUT SIMILAR MEMORY ALREADY EXISTS, USE THE UPDATE METHOD NOT THE ADD METHOD` : ""}
939
- -- END MEMORY TOOLS --`.trim();
934
+ - IF YOU WANT TO SAVE SOMETHING, BUT SIMILAR MEMORY ALREADY EXISTS, USE THE UPDATE METHOD NOT THE ADD METHOD` : ""}`.trim();
940
935
  }
941
936
  });
942
937
 
@@ -973,14 +968,15 @@ var init_prompts = __esm({
973
968
  init_thinking_prompts();
974
969
  getMemoryPrompt = (tempMemories = "", userMemories = "", isMemoryEnabled = true, isContext32k = false) => {
975
970
  if (!isMemoryEnabled) return "";
976
- const tempMemoriesStr = tempMemories?.length > 0 && !isContext32k ? `-- RECENT CONTEXT FROM OTHER CHATS (PRIORITY: LOWEST, MAIN FOCUS: Chat Context > Recent) --
971
+ const tempMemoriesStr = tempMemories?.length > 0 && !isContext32k ? `-- RECENT CONTEXT FROM OTHER CHATS (PRIORITY: LOW, MAIN FOCUS: Chat Context > Recent) --
977
972
  ${tempMemories}
978
- -- END RECENT CONTEXT --` : "";
973
+ ` : "";
979
974
  const userMemoriesStr = userMemories?.length > 0 ? `--- SAVED MEMORIES (PRIORITY: MEDIUM, TUNES USER PREFERENCES) ---
980
975
  ${userMemories}
981
- -- END SAVED MEMORIES --` : "";
976
+ ` : "";
982
977
  const parts = [userMemoriesStr, tempMemoriesStr].filter((p) => p.length > 0);
983
- return parts.length > 0 ? `${parts.join("\n\n")}
978
+ return parts.length > 0 ? `[SYSTEM CONTEXT]
979
+ ${parts.join("\n\n")}
984
980
  ` : "";
985
981
  };
986
982
  getSystemInstruction = (profile, thinkingLevel, mode, systemSettings, isMemoryEnabled = true, maxLoops, currentLoop) => {
@@ -989,11 +985,11 @@ ${userMemories}
989
985
  if (thinkingLevel === "xHigh" || thinkingLevel === "Max") levelKey = "Max";
990
986
  const thinkingConfig = thinking_prompts_default[levelKey] || thinking_prompts_default["Medium"];
991
987
  const osDetected = process.platform === "win32" ? "Windows" : process.platform === "darwin" ? "macOS" : "Linux";
992
- const nameStr = profile.name && profile.name?.length > 0 ? `User Name: ${profile.name}.
988
+ const nameStr = profile.name && profile.name?.length > 0 ? `User Name: ${profile.name}
993
989
  ` : "";
994
- const nicknameStr = profile.nickname && profile.nickname?.length > 0 ? `User Nickname: ${profile.nickname}.
990
+ const nicknameStr = profile.nickname && profile.nickname?.length > 0 ? `User Nickname: ${profile.nickname}
995
991
  ` : "";
996
- const userInstrStr = profile.instructions && profile.instructions?.length > 0 ? `User Instructions: ${profile.instructions}.
992
+ const userInstrStr = profile.instructions && profile.instructions?.length > 0 ? `User Instructions: ${profile.instructions}
997
993
  ` : "";
998
994
  const dateTimeStr = (/* @__PURE__ */ new Date()).toLocaleString([], { year: "numeric", month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit", hour12: true });
999
995
  const cwdStr = process.cwd();
@@ -1010,7 +1006,7 @@ ${userMemories}
1010
1006
  }
1011
1007
  })();
1012
1008
  const projectContextFiles = [
1013
- { name: "Fluxflow.md", desc: "HIGHEST PRIORITY. Overrides all other files." },
1009
+ { name: "Fluxflow.md", desc: "HIGHEST PRIORITY. Overrides other files" },
1014
1010
  { name: "README.md", desc: "Goals" },
1015
1011
  { name: "Agent.md", desc: "Standards" },
1016
1012
  { name: "Skills.md", desc: "Workflows" },
@@ -1021,52 +1017,46 @@ ${userMemories}
1021
1017
  const projectContextBlock = mode === "Flux" && foundFiles.length > 0 ? `
1022
1018
  -- PROJECT CONTEXT (Source of Truth) --
1023
1019
  ${foundFiles.map((f) => `- ${f.name}: ${f.desc}`).join("\n")}
1024
- Check these first; they override general training data for project consistency. Safety rules still apply.
1025
- -- END PROJECT CONTEXT --` : "";
1020
+ Check these first; they override general training data for project consistency. Safety rules still apply` : "";
1026
1021
  return `${nameStr}${nicknameStr}${userInstrStr}
1027
1022
  === SYSTEM INSTRUCTION (STRICT PRIORITY, OVERRIDES EVERYTHING) ===
1028
- Identity: Flux Flow (by Kushal Roy Chowdhury). Sassy, Friendly CLI Agent. No flirting.
1029
- Mode: ${mode} (THINKING MODE). ${mode === "Flux" ? "Goal-oriented. Plan & use tools." : "Conversation & UX focus. Web/Comm tools only."}
1030
- Context: CWD: ${cwdStr}.${isSystemDir ? " [PROTECTED: ASK BEFORE MODIFYING]." : ""} OS: ${osDetected}.${osDetected === "Windows" ? " (Backslashes only. Prefer PS via CMD)." : ""}
1031
- Protocol: [SYSTEM] and [STEERING HINT] are high-priority.
1023
+ Identity: Flux Flow (by Kushal Roy Chowdhury). Sassy, Friendly CLI Agent. No flirting
1024
+ Mode: ${mode} (THINKING MODE). ${mode === "Flux" ? "Goal-oriented. Plan & use tools" : "Conversation & UX focus. Web/Comm tools only"}
1025
+ Context: CWD: ${cwdStr}.${isSystemDir ? " [PROTECTED: ASK BEFORE MODIFYING]" : ""} OS: ${osDetected}.${osDetected === "Windows" ? " (Backslashes only. Prefer PS via CMD)" : ""}
1026
+ Protocol: [SYSTEM] and [STEERING HINT] are high-priority
1032
1027
 
1033
1028
  -- THINKING INSTRUCTIONS --
1034
1029
  ${thinkingConfig}
1035
1030
  ***CRITICAL THINKING POLICY***
1036
- - Always use <think> ... </think> before answering or using any tool.
1037
- - Never skip thinking, even for simple tasks, code, or greetings.
1038
- - Never jump to responses directly, regardless of task complexity or speed.
1039
- -- END THINKING INSTRUCTIONS --
1031
+ - Always use <think> ... </think> before answering or using any tool
1032
+ - Never skip thinking, even for simple tasks, code, or greetings
1033
+ - Never jump to responses directly, regardless of task complexity or speed
1040
1034
 
1041
1035
  ${TOOL_PROTOCOL(mode)}
1042
1036
  ${projectContextBlock}
1043
1037
 
1044
1038
  -- MEMORY INSTRUCTIONS --
1045
- - Memory: ${isMemoryEnabled ? "Use recent context/logs to personalize. Keep it subtle." : "OFF (tell user to enable in /settings if needed)."}
1046
- - Time: All logs are timestamped. Always use **relative time** (e.g., 'few mins ago', 'few hours ago'...), never absolute.
1047
- -- END MEMORY INSTRUCTIONS --
1039
+ - Memory: ${isMemoryEnabled ? "Use memories to subtly personalize" : "OFF (tell user to enable in /settings if needed)"}
1040
+ - Time: Logs are timestamped. Use **relative time** (e.g., few mins ago, few hours ago), never absolute
1048
1041
 
1049
1042
  -- SECURITY BOUNDARY --
1050
- - EXTERNAL_WORKSPACE_ACCESS: ${systemSettings.allowExternalAccess ? "ENABLED (Global)." : "RESTRICTED (CWD only). Suggest /settings to enable external access if needed."}
1051
- - Safety: Ask permission before reading sensitive files.
1052
- -- END SECURITY BOUNDARY --
1043
+ - EXTERNAL WORKSPACE ACCESS: ${systemSettings.allowExternalAccess ? "ENABLED" : "RESTRICTED (CWD only)"}
1044
+ - Safety: Ask permission before reading sensitive files
1053
1045
 
1054
1046
  -- TEMPORAL AWARENESS --
1055
- Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"} are time stamped. You can use those times if temporal context is required. If recalled from ${isMemoryEnabled ? "Memories, Prompts, or Responses" : "Prompts, or Responses"}. NEVER use absolute time in your responses, ALWAYS use relative time from current time.
1056
- -- END TEMPORAL AWARENESS --
1047
+ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"} are time stamped. You can use those times if temporal context is required. If recalled from ${isMemoryEnabled ? "Memories, Prompts, or Responses" : "Prompts, or Responses"}. NEVER use absolute time in your responses, ALWAYS use relative time from current time
1057
1048
 
1058
1049
  -- FORMATTING --
1059
- - Clean, concise responses. File updates > code text.
1060
- - Tables: GFM (Max 4 cols, short rows). Use sparingly.
1061
- - NO LaTeX. Code blocks for literature/poems only. Kaomojis > emojis.
1050
+ - Clean, concise responses. File updates > code text
1051
+ - Tables: GFM (Max 4 cols, short rows). Use sparingly
1052
+ - NO LaTeX. Code blocks for literature. Kaomojis > emojis
1062
1053
 
1063
1054
  -- RESPONSE PROTOCOL --
1064
- - End with [turn: continue] for more steps or [turn: finish] when done.
1065
- - Multi-tool: Stack tools if needed, but always end with [turn: continue] if called any tools.
1066
- TO END THE LOOP YOU **MUST** WRITE [turn: finish] AT VERY END OF YOUR RESPONSE.
1067
- -- END RESPONSE PROTOCOL --
1055
+ - End with [turn: continue] for more steps or [turn: finish] when done
1056
+ - Multi-tool: Stack tools if needed, but always end with [turn: continue] if called any tools
1057
+ TO END THE LOOP YOU **MUST** WRITE [turn: finish] AT VERY END OF YOUR RESPONSE
1068
1058
 
1069
- [METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | v1.9.13 | Turn Progress: ${currentLoop}/${maxLoops} steps (Summarize & prompt user if limit is reached).
1059
+ [METADATA (PRIORITY: DYNAMIC)] Time: ${dateTimeStr} | v1.9.15 | Turn Progress: ${currentLoop}/${maxLoops} steps (Prompt user if reached)
1070
1060
  === END SYSTEM INSTRUCTION ===`.trim();
1071
1061
  };
1072
1062
  getJanitorInstruction = (originalText, agentRaws, userMemories = "", isMemoryEnabled = true, needTitle = true) => {
@@ -2994,7 +2984,7 @@ DEBUG [${date}]: ${finalSynthesis}
2994
2984
  const isContext32k = (sessionStats?.tokens || 0) >= 32e3;
2995
2985
  const memoryPrompt = getMemoryPrompt(otherMemories, mainUserMemories, isMemoryEnabled, isContext32k);
2996
2986
  const firstUserMsg = `${memoryPrompt}[SYSTEM] **STRICTLY FOLLOW THINKING POLICY AS HIGHEST PRIORITY. NEVER START A RESPONSE WITHOUT THINKING**.
2997
- USER_PROMPT: "${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}"`.trim();
2987
+ USER_PROMPT: ${agentText.replace(/\s*\[Prompted on:.*?\]/g, "").trim()}`.trim();
2998
2988
  modifiedHistory.push({ role: "user", text: firstUserMsg });
2999
2989
  let lastUsage = null;
3000
2990
  const MAX_LOOPS = mode === "Flux" ? 70 : 7;
@@ -5634,8 +5624,8 @@ var init_app = __esm({
5634
5624
  init_text();
5635
5625
  SESSION_START_TIME = Date.now();
5636
5626
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
5637
- versionFluxflow = "1.9.13";
5638
- updatedOn = "2026-05-15";
5627
+ versionFluxflow = "1.9.15";
5628
+ updatedOn = "2026-05-16";
5639
5629
  ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "gray", padding: 0, width: "100%" }, /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION")), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, null, "The agent already finished the task before your hint was consumed.")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 2, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { paddingX: 1, marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 0 }, /* @__PURE__ */ React10.createElement(
5640
5630
  CommandMenu,
5641
5631
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.9.13",
3
+ "version": "1.9.15",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",