fluxflow-cli 4.49.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.
- package/ARCHITECTURE.md +7 -16
- package/README.md +1 -4
- package/TOOLS.md +0 -9
- package/UI_FEATURES.md +1 -2
- package/dist/chunks/ai-WBRHU7IH.js +1 -0
- package/dist/chunks/app-ML5GKD3A.js +325 -0
- package/dist/chunks/{auto_completion-33R46AFF.js → auto_completion-UG6IEWD2.js} +1 -1
- package/dist/chunks/{chat-BA72I6O3.js → chat-ISCVWNVN.js} +1 -1
- package/dist/chunks/chunk-24LJKH4G.js +847 -0
- package/dist/chunks/chunk-7SGZ66KT.js +44 -0
- package/dist/chunks/chunk-B4UKMX5E.js +1 -0
- package/dist/chunks/{chunk-Z5D4VQSG.js → chunk-EXT42EJZ.js} +1 -1
- package/dist/chunks/{chunk-IMX3PWYO.js → chunk-GBH7XI5A.js} +1 -1
- package/dist/chunks/{chunk-ZCM4J7JT.js → chunk-J4J3F6BT.js} +1 -1
- package/dist/chunks/chunk-LQM3JK7N.js +1 -0
- package/dist/chunks/{chunk-AIWOSKP3.js → chunk-QESQR5GB.js} +1 -1
- package/dist/chunks/chunk-V36DXF56.js +13 -0
- package/dist/chunks/{chunk-TNA3R7TS.js → chunk-ZNO55RNG.js} +1 -1
- package/dist/chunks/{click-HMFVJIQN.js → click-AWHZCV2E.js} +2 -2
- package/dist/chunks/{computer_action-6AYM3W7D.js → computer_action-MO2JR2XH.js} +1 -1
- package/dist/chunks/{custom_openai-HY6EEQI2.js → custom_openai-K554R7Q5.js} +1 -1
- package/dist/chunks/{drag-H53TOSDP.js → drag-D2GVPIQB.js} +1 -1
- package/dist/chunks/{generate_image-JS7J4FLD.js → generate_image-45UQ6P2B.js} +1 -1
- package/dist/chunks/{invoke-WGWAIYZH.js → invoke-DVZUJJV3.js} +2 -2
- package/dist/chunks/{invokeSync-DCL3EMVV.js → invokeSync-NEZGW27B.js} +2 -2
- package/dist/chunks/{key_press-NF322TXF.js → key_press-AQNKL6UM.js} +1 -1
- package/dist/chunks/{keyboard_typing-OADL5LPA.js → keyboard_typing-QSBPTZJ6.js} +1 -1
- package/dist/chunks/{mistral-YTTOZB2J.js → mistral-ON6RQMK7.js} +1 -1
- package/dist/chunks/{model_config-JTMSQGKH.js → model_config-QRYAVWHF.js} +1 -1
- package/dist/chunks/{nvidia-ON4Q6Q26.js → nvidia-I6DPWP6U.js} +2 -2
- package/dist/chunks/{ollama-NWY2XLYF.js → ollama-6WSZPCI5.js} +1 -1
- package/dist/chunks/{recapture_screen-IXVMQR5C.js → recapture_screen-PPXYK2YY.js} +1 -1
- package/dist/chunks/{screen_grid-DGIDOOQD.js → screen_grid-3RU324CV.js} +1 -1
- package/dist/chunks/{scroll-B3HCFDTS.js → scroll-TSU6MTGU.js} +1 -1
- package/dist/chunks/search_keyword-DZY4MWV7.js +8 -0
- package/dist/chunks/{secrets-NGDMM5RJ.js → secrets-TNMLVMST.js} +1 -1
- package/dist/chunks/{secrets_v2-R5GMXRT3.js → secrets_v2-OBRWR3UT.js} +1 -1
- package/dist/chunks/{settings-JME7GCEU.js → settings-PUFSRWT3.js} +1 -1
- package/dist/chunks/update_file-TGEB5UWK.js +13 -0
- package/dist/chunks/usage-EBE2OVES.js +1 -0
- package/dist/chunks/{usageServer-RJDE5QDZ.js → usageServer-RTK5N5KE.js} +1 -2
- package/dist/chunks/write_file-O6OF7Z2W.js +32 -0
- package/dist/cli.js +27 -24
- package/dist/model_config.json +2 -30
- package/dist/package.json +2 -2
- package/model_config.json +2 -30
- package/package.json +2 -2
- package/dist/chunks/ai-QEMKCYGG.js +0 -1
- package/dist/chunks/app-6TAUOS56.js +0 -333
- package/dist/chunks/chunk-2XQIWDKW.js +0 -1
- package/dist/chunks/chunk-2YDU2B2F.js +0 -13
- package/dist/chunks/chunk-36FKJWXK.js +0 -949
- package/dist/chunks/chunk-AMFNIFF3.js +0 -44
- package/dist/chunks/chunk-HTOLY3HR.js +0 -1
- package/dist/chunks/search_keyword-UXNKLCGC.js +0 -8
- package/dist/chunks/update_file-YXW37NRJ.js +0 -13
- package/dist/chunks/usage-URT2EC23.js +0 -1
- package/dist/chunks/write_file-WMLWKQKI.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
|
|
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,
|
|
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
|
|
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
|
|
54
|
+
## The Streaming & Tool Protocol
|
|
55
55
|
|
|
56
|
-
|
|
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
|
|
82
|
-
- **Encryption**: User secrets
|
|
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
|
|
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
|
|
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};
|