fluxflow-cli 4.50.0 → 5.0.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.
Files changed (58) hide show
  1. package/ARCHITECTURE.md +7 -16
  2. package/README.md +1 -4
  3. package/TOOLS.md +0 -9
  4. package/UI_FEATURES.md +1 -2
  5. package/dist/chunks/ai-WBRHU7IH.js +1 -0
  6. package/dist/chunks/app-ML5GKD3A.js +325 -0
  7. package/dist/chunks/{auto_completion-5WD4TTIP.js → auto_completion-UG6IEWD2.js} +1 -1
  8. package/dist/chunks/{chat-BA72I6O3.js → chat-ISCVWNVN.js} +1 -1
  9. package/dist/chunks/chunk-24LJKH4G.js +847 -0
  10. package/dist/chunks/chunk-7SGZ66KT.js +44 -0
  11. package/dist/chunks/chunk-B4UKMX5E.js +1 -0
  12. package/dist/chunks/{chunk-Z5D4VQSG.js → chunk-EXT42EJZ.js} +1 -1
  13. package/dist/chunks/{chunk-6JMPGZPV.js → chunk-GBH7XI5A.js} +1 -1
  14. package/dist/chunks/{chunk-5KSNFTQN.js → chunk-J4J3F6BT.js} +1 -1
  15. package/dist/chunks/chunk-LQM3JK7N.js +1 -0
  16. package/dist/chunks/{chunk-ZURGYQ4L.js → chunk-QESQR5GB.js} +1 -1
  17. package/dist/chunks/chunk-V36DXF56.js +13 -0
  18. package/dist/chunks/{chunk-TRVRMCHV.js → chunk-ZNO55RNG.js} +1 -1
  19. package/dist/chunks/{click-F4M4FVLQ.js → click-AWHZCV2E.js} +2 -2
  20. package/dist/chunks/{computer_action-72ZORSKW.js → computer_action-MO2JR2XH.js} +1 -1
  21. package/dist/chunks/{custom_openai-BLC4CWOL.js → custom_openai-K554R7Q5.js} +1 -1
  22. package/dist/chunks/{drag-OT2BJZ4P.js → drag-D2GVPIQB.js} +1 -1
  23. package/dist/chunks/{generate_image-V4OMOT7Z.js → generate_image-45UQ6P2B.js} +1 -1
  24. package/dist/chunks/{invoke-L2V4QMJG.js → invoke-DVZUJJV3.js} +2 -2
  25. package/dist/chunks/{invokeSync-7NWIYBX5.js → invokeSync-NEZGW27B.js} +2 -2
  26. package/dist/chunks/{key_press-IVB7R7CK.js → key_press-AQNKL6UM.js} +1 -1
  27. package/dist/chunks/{keyboard_typing-A6VFLI7Q.js → keyboard_typing-QSBPTZJ6.js} +1 -1
  28. package/dist/chunks/{mistral-YTTOZB2J.js → mistral-ON6RQMK7.js} +1 -1
  29. package/dist/chunks/{model_config-JTMSQGKH.js → model_config-QRYAVWHF.js} +1 -1
  30. package/dist/chunks/{nvidia-ON4Q6Q26.js → nvidia-I6DPWP6U.js} +2 -2
  31. package/dist/chunks/{ollama-DIFOZ4PM.js → ollama-6WSZPCI5.js} +1 -1
  32. package/dist/chunks/{recapture_screen-TVTRNE7C.js → recapture_screen-PPXYK2YY.js} +1 -1
  33. package/dist/chunks/{screen_grid-AEHMTXP3.js → screen_grid-3RU324CV.js} +1 -1
  34. package/dist/chunks/{scroll-KFID5QKZ.js → scroll-TSU6MTGU.js} +1 -1
  35. package/dist/chunks/search_keyword-DZY4MWV7.js +8 -0
  36. package/dist/chunks/{secrets-JMSL57D2.js → secrets-TNMLVMST.js} +1 -1
  37. package/dist/chunks/{secrets_v2-U7JR7ZO6.js → secrets_v2-OBRWR3UT.js} +1 -1
  38. package/dist/chunks/{settings-3VSVCZDF.js → settings-PUFSRWT3.js} +1 -1
  39. package/dist/chunks/update_file-TGEB5UWK.js +13 -0
  40. package/dist/chunks/usage-EBE2OVES.js +1 -0
  41. package/dist/chunks/{usageServer-4X7T4FDJ.js → usageServer-RTK5N5KE.js} +1 -2
  42. package/dist/chunks/write_file-O6OF7Z2W.js +32 -0
  43. package/dist/cli.js +25 -22
  44. package/dist/model_config.json +2 -30
  45. package/dist/package.json +2 -2
  46. package/model_config.json +2 -30
  47. package/package.json +2 -2
  48. package/dist/chunks/ai-EWDCEXLL.js +0 -1
  49. package/dist/chunks/app-C7G3NWAQ.js +0 -333
  50. package/dist/chunks/chunk-HTOLY3HR.js +0 -1
  51. package/dist/chunks/chunk-OB2V6ZNC.js +0 -951
  52. package/dist/chunks/chunk-PACSPBDP.js +0 -1
  53. package/dist/chunks/chunk-T5CUPXCW.js +0 -13
  54. package/dist/chunks/chunk-TX3H7HDF.js +0 -44
  55. package/dist/chunks/search_keyword-666PL7YG.js +0 -8
  56. package/dist/chunks/update_file-RG5QSLR2.js +0 -13
  57. package/dist/chunks/usage-AJDMLXTH.js +0 -1
  58. package/dist/chunks/write_file-AQJXPIUV.js +0 -32
package/ARCHITECTURE.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # 🏛️ Architecture & Design
5
5
 
6
- Flux Flow is built on a modern, reactive stack that brings web-like development paradigms to the terminal. It utilizes a custom agentic loop for reasoning and a unique dual-model system for background processing.
6
+ Flux Flow is built on a modern, reactive stack that brings web-like development paradigms to the terminal. It utilizes a custom agentic loop for reasoning and real-time stream processing.
7
7
 
8
8
  ## UI Layer: React & Ink
9
9
 
@@ -18,7 +18,7 @@ The core intelligence of Flux Flow resides in `src/utils/ai.js`. It does not rel
18
18
 
19
19
  The execution flow of a single user prompt follows this loop:
20
20
 
21
- 1. **Context Assembly**: The user's prompt is combined with the system instructions, temporary session context, persistent user memories, and the current chat history. If the history gets too large (e.g., >256k tokens) and compression is disabled, it is gracefully truncated. Some models/modes can go upto 400k context.
21
+ 1. **Context Assembly**: The user's prompt is combined with the system instructions, temporary session context, and the current chat history. If the history gets too large (e.g., >256k tokens), it is gracefully truncated. Some models/modes can go upto 400k context.
22
22
  2. **Stream Processing**: The main loop initiates a streaming request to the Gemini API (`client.models.generateContentStream`). It yields chunks of text and status updates directly back to the React UI as they arrive.
23
23
  3. **Detection & Tool Execution**: Once the stream completes for a given turn, the entire response is scanned for tool calls using a custom regex and bracket-balancing parser (looking for `tool:functions.tool_name(args...)`).
24
24
  - If tools are found, the loop pauses.
@@ -27,7 +27,7 @@ The execution flow of a single user prompt follows this loop:
27
27
  4. **Security Governance**: During tool execution, the loop enforces security checks (e.g., blocking `exec_command` from accessing system root drives if "External Workspace Access" is off) and pauses for Human-in-the-Loop (HITL) approval if necessary.
28
28
  5. **Turn Management & Continuation**: The model is instructed to append `[[END]]` or `[turn: finish]` if its goal is complete, or `[turn: continue]` if it expects tool results.
29
29
  - If tools were called or `[turn: continue]` is present, the loop increments and re-prompts the model with the newly gathered `[TOOL RESULT]` data.
30
- - If `[[END]]` or `[turn: finish]` is detected and no further tools were called, the main loop terminates, passing the final synthesized context to the background Janitor process.
30
+ - If `[[END]]` or `[turn: finish]` is detected and no further tools were called, the main loop terminates and the final synthesized context is committed to history.
31
31
  6. **Loop Limits & Resilience**: To prevent infinite loops or excessive API usage, **Flux mode** is capped at 70 iterations per user prompt, while **Flow mode** is capped at 7.
32
32
  - **Multi-Stage Failover**: The loop features a sophisticated 16-attempt retry engine with exponential backoff (1s - 32s).
33
33
  - **Critical Fallback Pivot**: If the primary model fails 14 consecutive times, the agent surgically pivots to a lighter, high-concurrency fallback model (`gemini-3.1-flash-lite`) for the final 3 attempts to ensure session navigation through API congestion.
@@ -51,18 +51,9 @@ Flux Flow implements a native multimodal processing engine in `src/tools/view_fi
51
51
  - **PDF Extraction**: For PDF documents, the engine extracts visual representation of pages to provide the model with high-fidelity spatial and textual context simultaneously.
52
52
  - **Context Injection**: These multimodal assets are injected directly into the Gemini model's multimodal part array, allowing the model to "see" the file as if it were looking at a screenshot.
53
53
 
54
- ## The Dual-Model System
54
+ ## The Streaming & Tool Protocol
55
55
 
56
- To maintain a fast, snappy UI while still performing complex data management, Flux Flow employs two separate AI models for every interaction:
57
-
58
- ### 1. The Main Agent
59
- - **Responsibility**: Direct user interaction, reasoning, and tool execution.
60
- - **Behavior**: Streams text directly to the UI. It focuses entirely on solving the user's immediate problem or answering their question.
61
-
62
- ### 2. The Janitor (Background Process)
63
- - **Responsibility**: System maintenance, long-term memory extraction, and chat summarization.
64
- - **Behavior**: After the Main Agent finishes its loop, the entire context (User Prompt + Agent Raws) is sent to the Janitor model.
65
- - **Headless Operation**: The Janitor is explicitly instructed to be a "silent background system process" with "no mouth." It *only* outputs valid tool calls (e.g., updating the chat title or saving a new user preference to the persistent memory vault).
56
+ Tool calls and turn continuations are parsed from the model's raw text output, allowing the loop to dispatch tool handlers and re-prompt the model with `[TOOL RESULT]` blocks until the goal is complete.
66
57
 
67
58
  ## The Subagent System
68
59
 
@@ -78,8 +69,8 @@ Flux Flow provides a robust, multi-agent execution system to delegate sub-tasks
78
69
 
79
70
  ## Data Persistence & Safety
80
71
 
81
- - **High-Fidelity Lock**: Because both the UI and the Janitor model may attempt to write to the `history.json` file simultaneously, a Promise-based `WRITE_LOCK` (`src/utils/history.js`) is utilized. This prevents race conditions and ensures data integrity.
82
- - **Encryption**: User secrets and persistent memories (`secret/memories.json`) are handled by `src/utils/crypto.js` to ensure local privacy.
72
+ - **High-Fidelity Lock**: Because the UI and background processes may attempt to write to the `history.json` file simultaneously, a Promise-based `WRITE_LOCK` (`src/utils/history.js`) is utilized. This prevents race conditions and ensures data integrity.
73
+ - **Encryption**: User secrets (`secret/`) are handled by `src/utils/crypto.js` to ensure local privacy.
83
74
 
84
75
  ## Redirection & The Anchor Strategy
85
76
 
package/README.md CHANGED
@@ -86,7 +86,7 @@ Zero setup means zero setup. On first run, Flux Flow performs an integrity check
86
86
  - **Archived Terminal Flow**: See execution outputs transform from live elements into permanent conversation records.
87
87
  - **Rich Aesthetics**: High-contrast, sleek design with smooth transitions and micro-animations.
88
88
 
89
- ### 🧠 **The Dual-Intelligence System**
89
+ ### 🧠 **The Quad-Intelligence System**
90
90
  - **Flux Mode (Workspace)**: High-speed, agentic problem solving for massive coding tasks.
91
91
  - **Flow Mode (Creative Studio)**: Optimized for high-quality conversation and web-assisted reasoning.
92
92
  - **Computer Use (GUI Automation)**: Agents can control computer GUI, with mouse and keyboard.
@@ -99,9 +99,6 @@ Security isn't an afterthought; it's a boundary.
99
99
  - **External Path Hardlock**: Restricts the agent to your Current Working Directory (CWD) unless you explicitly unlock it.
100
100
  - **Human-in-the-Loop (HITL)**: Every file write and terminal command requires your high-fidelity approval.
101
101
 
102
- ### 🧹 **The Background Janitor**
103
- While you move at high speed, the Janitor follows behind-refining session titles, compressing data, and ensuring your context window remains at absolute peak performance.
104
-
105
102
  ### 🤖 **Autonomous Subagent System**
106
103
  Delegate complex tasks to subagents. Spawns blocking subagents (`invokeSync`) or asynchronous background subagents (`invoke`) with distinct telemetry and silent background logging. Built-in transaction-safe reversion logs all subagent changes under the active turn, preserving rollback security.
107
104
 
package/TOOLS.md CHANGED
@@ -88,12 +88,3 @@ FluxFlow uses a transparent, string-based protocol for tool dispatching:
88
88
 
89
89
  ### `WriteDoc`
90
90
  - **Purpose**: Creates professional Word documents (.docx).
91
-
92
- ### `GenerateImage`
93
- - **Purpose**: Creates high-fidelity images via AI.
94
-
95
- ---
96
-
97
- ## Memory Management
98
-
99
- Managed primarily by the background **Janitor** model to maintain persistent user context and session summaries without bloating the reasoning loop.
package/UI_FEATURES.md CHANGED
@@ -16,14 +16,13 @@ You can control the application using `/` commands directly in the chat input:
16
16
  - **/settings**: Access the system configuration menu.
17
17
  - **/profile**: Update your name, nickname, and custom instructions.
18
18
  - **/update**: Update Flux Flow to the latest version.
19
- - **/memory**: View and manage the persistent memories extracted by the Janitor.
20
19
  - **/resume <chat-id>**: Switch back to a previous conversation.
21
20
  - **/changelog**: Open the project's changelog in your default browser.
22
21
  - **/help**: List all available commands.
23
22
 
24
23
  ## 📁 External Data Sanctuary (Redirection)
25
24
 
26
- Flux Flow allows you to "Anchor" your data outside of the default user directory. This is perfect for users who want to keep their logs, chat history, and encrypted memories on an external drive, a VeraCrypt volume, or a specific project folder.
25
+ Flux Flow allows you to "Anchor" your data outside of the default user directory. This is perfect for users who want to keep their logs and chat history on an external drive, a VeraCrypt volume, or a specific project folder.
27
26
 
28
27
  - **How to Enable**: Open `/settings` and toggle **Use External Data**.
29
28
  - **Portability**: Once set, the application will synchronously "pivot" all data operations to your specified `externalDataPath` upon startup.
@@ -0,0 +1 @@
1
+ import{A as r,B as s,C as t,D as u,E as v,k as b,l as c,m as d,n as e,o as f,p as g,q as h,r as i,s as j,t as k,u as l,v as m,w as n,x as o,y as p,z as q}from"./chunk-24LJKH4G.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-4BLSASW6.js";import"./chunk-7SGZ66KT.js";import"./chunk-UIL6OCU4.js";import"./chunk-EXT42EJZ.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-Y5JU726N.js";import"./chunk-QESQR5GB.js";import"./chunk-J4J3F6BT.js";import"./chunk-V36DXF56.js";import"./chunk-B4UKMX5E.js";import{l as a}from"./chunk-LQM3JK7N.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";export{c as RE_LEADING_THINK,b as convertChannelThinkTags,r as detectToolCalls,e as findGenuineThinkClose,t as generateSimpleContent,u as getAIStream,q as getActiveToolContext,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,s as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,o as maskCodeSpans,p as maskExecutedTools,n as runJanitorTask,v as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};