From 0b6ceac3f6edbe4b787f05cf0216330e966eaec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=9C=8B?= Date: Sat, 14 Mar 2026 13:30:53 +0900 Subject: [PATCH 1/2] docs: add changelog page with v0.4.0 and v0.4.1 release notes --- src/app/changelog/page.mdx | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/app/changelog/page.mdx diff --git a/src/app/changelog/page.mdx b/src/app/changelog/page.mdx new file mode 100644 index 0000000..a2a303f --- /dev/null +++ b/src/app/changelog/page.mdx @@ -0,0 +1,61 @@ +# Changelog + +All notable changes to LibreFang are documented here. For the full changelog, see [CHANGELOG.md](https://github.com/librefang/librefang/blob/main/CHANGELOG.md) and [GitHub Releases](https://github.com/librefang/librefang/releases). + +--- + +## v0.4.1 (2026-03-14) + +### Fixed +- Inherit environment variables when spawning daemon process — API keys (e.g., `MINIMAX_API_KEY`) are now correctly passed to the daemon subprocess ([#210](https://github.com/librefang/librefang/pull/210)) + +--- + +## v0.4.0 (2026-03-14) + +### Added + +#### Authentication & Drivers +- **ChatGPT Session Auth**: Browser-based OAuth flow for ChatGPT Plus/Ultra subscribers with PKCE S256, automatic model discovery, `librefang auth chatgpt` subcommand, and 7-day session caching ([#205](https://github.com/librefang/librefang/pull/205)) +- **MiniMax Dual-Platform Support**: Separate `minimax-cn` provider for China-specific endpoints using `MINIMAX_CN_API_KEY` +- **QQ Bot Adapter**: Native support for QQ Bot messaging channel ([#208](https://github.com/librefang/librefang/pull/208)) + +#### Web Dashboard & i18n +- Full internationalization (i18n) with `zh-CN` locale and unified `t()` translation helper +- New sidebar layout with theme/language switchers +- High-quality inline SVG icons replacing emoji icons +- Improved ClawHub responsiveness on small screens + +#### Core Platform +- Version alignment across all 31 built-in agents and sub-packages +- Enhanced config hot-reloading reliability + +#### CI/CD +- Optimized Docker multi-arch build with native ARM runner ([#203](https://github.com/librefang/librefang/pull/203)) + +#### CLI +- `librefang doctor` now checks for version updates and network connectivity ([#202](https://github.com/librefang/librefang/pull/202)) + +--- + +## v0.3.58 (2026-03-13) + +Maintenance release with dependency updates and bug fixes. + +--- + +## v0.1.0 (2026-02-24) + +Initial release. See [CHANGELOG.md](https://github.com/librefang/librefang/blob/main/CHANGELOG.md) for the complete v0.1.0 feature list including: +- 14-crate Rust workspace +- 27 LLM providers with 130+ models +- 40 channel adapters +- 41 built-in tools +- WASM sandbox with dual metering +- Visual workflow builder +- 16 security systems +- JavaScript and Python SDKs +- Google A2A protocol support + + +export const sections = []; From 04025d5c6c8ea15629853d034761fda0944f3c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E6=9C=8B?= Date: Sat, 14 Mar 2026 13:31:11 +0900 Subject: [PATCH 2/2] docs: update roadmap with current status and future plans --- src/app/roadmap/page.mdx | 500 ++++++++------------------------------- 1 file changed, 96 insertions(+), 404 deletions(-) diff --git a/src/app/roadmap/page.mdx b/src/app/roadmap/page.mdx index a32bc84..509874b 100644 --- a/src/app/roadmap/page.mdx +++ b/src/app/roadmap/page.mdx @@ -1,465 +1,157 @@ -# LibreFang Launch Roadmap +# Roadmap & Status -> Competitive gap analysis vs OpenClaw. Organized into 4 sprints. -> Each item has: what, why, files to touch, and done criteria. +> LibreFang development progress and upcoming plans. --- -## Sprint 1 — Stop the Bleeding (3-4 days) +## Core Platform -These are showstoppers. The app literally crashes or looks broken without them. +### Token-Aware Context Management — DONE -### 1.1 Fix Token Bloat (agents crash after 3 messages) -- DONE +Token-aware context management with automatic compaction at 70% capacity. Reduced first-message token usage from ~45K to ~15-20K through tool profile filtering and prompt compaction. -**Status: COMPLETE** -- All 13 items implemented across compactor.rs, context_overflow.rs, context_budget.rs, agent_loop.rs, kernel.rs, agent.rs, and prompt_builder.rs. +### Branding & Icon Assets — DONE -**Problem (was):** A single chat message consumed ~45K input tokens (tool definitions + system prompt). By message 3, it hit the 100K quota and crashed with "Token quota exceeded." +Desktop and web UI branding with LibreFang logo assets across all platforms (desktop taskbar, title bar, installer, web UI sidebar, favicon). -**What to do:** +### Tauri Signing Keypair — DONE -1. **Add token estimation & context guard** (`crates/librefang-runtime/src/compactor.rs`) - - Add `estimate_token_count(messages, system_prompt, tools)` — chars/4 heuristic - - Add `needs_compaction_by_tokens(estimated, context_window)` — triggers at 70% capacity - - Add `token_threshold_ratio: f64` (default 0.7) and `context_window_tokens: usize` (default 200_000) to `CompactionConfig` - - Lower message threshold from 80 to 30 +Ed25519 signing keypair for desktop app auto-updater support. -2. **Add in-loop token guard** (`crates/librefang-runtime/src/agent_loop.rs`) - - Before each LLM call: estimate tokens vs context window - - Over 70%: emergency-trim old messages (keep last 10), log warning - - Over 90%: aggressive trim to last 4 messages + inject summary - - Lower `MAX_HISTORY_MESSAGES` from 40 to 20 - - Lower `MAX_TOOL_RESULT_CHARS` from 50,000 to 15,000 +### First-Run Experience — DONE -3. **Filter tools by profile in kernel** (`crates/librefang-kernel/src/kernel.rs`) - - In `available_tools()`: use manifest's `tool_profile` to filter - - Call `tool_profile.tools()` for allowed tool names, filter `builtin_tool_definitions()` - - Only send ALL tools if profile is `Full` AND agent has `ToolAll` capability - - This alone cuts default chat from 41 tools to ~8 tools (saves ~15-20K tokens) - -4. **Raise default token quota** (`crates/librefang-types/src/agent.rs`) - - Change `max_llm_tokens_per_hour` from 100_000 to 1_000_000 - - 100K is too low — a single system prompt is 30-40K tokens - -5. **Token-based compaction trigger** (`crates/librefang-kernel/src/kernel.rs`) - - In `send_message_streaming()`: replace message-count-only check with token-aware check - - After compaction, verify token count actually decreased - -6. **Compact system prompt injections** (`crates/librefang-kernel/src/kernel.rs`) - - Cap canonical context to 500 chars - - Cap memory context to 3 items / 200 chars each - - Cap skill knowledge to 2000 chars total - - Skip MCP summary if tool count < 3 - -**Done when:** -- `cargo test --workspace` passes -- Start an agent, send 10+ messages — no "Token quota exceeded" error -- First-message token count drops from ~45K to ~15-20K - ---- - -### 1.2 Branding & Icon Assets - -**Problem:** Desktop app may show Tauri default icons. Branding assets exist at `~/Downloads/librefang/output/` but aren't installed. - -**What to do:** - -1. Generate all required icon sizes from source PNG (`librefang-logo-transparent.png`, 2000x2000) -2. Place into `crates/librefang-desktop/icons/`: - - `icon.png` (1024x1024) - - `icon.ico` (multi-size: 256, 128, 64, 48, 32, 16) - - `32x32.png` - - `128x128.png` - - `128x128@2x.png` (256x256) -3. Replace web UI logo at `crates/librefang-api/static/logo.png` -4. Update favicon if one exists - -**Assets available:** -- `librefang-logo-transparent.png` (328KB, 2000x2000) — primary source -- `librefang-logo-black-bg.png` (312KB) — for dark contexts -- `librefang-vector-transparent.svg` (293KB) — scalable vector -- `librefang-animated.svg` (310KB) — for loading screens - -**Done when:** -- Desktop app shows LibreFang logo in taskbar, title bar, and installer -- Web UI shows correct logo in sidebar and favicon - ---- - -### 1.3 Tauri Signing Keypair -- DONE - -**Status: COMPLETE** — Generated Ed25519 signing keypair via `cargo tauri signer generate --ci`. Public key installed in `tauri.conf.json`. Private key at `~/.tauri/librefang.key`. Set `TAURI_SIGNING_PRIVATE_KEY_PATH` in CI secrets. - -**Problem (was):** `tauri.conf.json` has `"pubkey": "PLACEHOLDER_REPLACE_WITH_GENERATED_PUBKEY"`. Auto-updater is completely dead without this. - ---- - -### 1.4 First-Run Experience Audit -- DONE - -**Status: COMPLETE** — Full code audit verified: all 8 wizard API endpoints exist and are implemented (providers list/set/test, templates list, agent spawn, channel configure). 6-step wizard (Welcome → Provider → Agent → Try It → Channel → Done) fully wired. 13 provider help links connected. Auto-detection of existing API keys via auth_status field working. Config editor fix added (POST /api/config/set). - -**Problem (was):** New users need a smooth setup wizard. The web UI has a setup checklist + wizard but it's untested end-to-end. - ---- - -## Sprint 2 — Competitive Parity (4-5 days) - -These close the gaps that would make users pick OpenClaw over LibreFang. - -### 2.1 Browser Screenshot Rendering in Chat -- DONE - -**Status: COMPLETE** — browser.rs saves screenshots to uploads temp dir and returns JSON with `image_urls`. chat.js detects `browser_screenshot` tool results and populates `_imageUrls` for inline display. - -**Problem (was):** The `browser_screenshot` tool returns base64 image data, but the UI renders it as raw text in a `
` tag.
-
-**What to do:**
-1. In `chat.js` `tool_result` handler: detect `browser_screenshot` tool results
-2. Parse the base64 data, create `/api/uploads/` entry (like image_generate)
-3. Store `_imageUrls` on the tool card
-4. UI already renders `tool._imageUrls` — just need to populate it
-
-**Files:** `crates/librefang-api/static/js/pages/chat.js`, `crates/librefang-runtime/src/tool_runner.rs`
-
-**Done when:**
-- Browser screenshots appear as inline images in tool cards
-- Clicking opens full-size in new tab
-
----
-
-### 2.2 Chat Message Search -- DONE
-
-**Status: COMPLETE** — Search bar with Ctrl+F shortcut, real-time filtering via `filteredMessages` getter, text highlighting via `highlightSearch()`, match count display.
-
-**Problem (was):** No way to search through chat history. OpenClaw has full-text search.
-
-**What to do:**
-1. Add search input to chat header (icon toggle, expands to input)
-2. Client-side filter: `messages.filter(m => m.text.includes(query))`
-3. Highlight matches in message bubbles
-4. Jump-to-message on click
-
-**Files:** `index_body.html` (search UI), `chat.js` (search logic), `components.css` (search styles)
-
-**Done when:**
-- Ctrl+F or search icon opens search bar
-- Typing filters messages in real-time
-- Matching text is highlighted
+6-step setup wizard (Welcome → Provider → Agent → Try It → Channel → Done) with provider auto-detection, API key help links for 12+ providers, and 10 agent templates with category filtering.
 
 ---
 
-### 2.3 Skill Marketplace Polish -- DONE
-
-**Status: COMPLETE** — Already polished with 4 tabs (Installed, ClawHub, MCP Servers, Quick Start), live search with debounce, sort pills, categories, install/uninstall, skill detail modal, runtime badges, source badges, enable/disable toggles, security warnings.
+## User Experience
 
-**Problem (was):** Skills page exists but needs polish for browsing/installing skills.
+### Browser Screenshot Rendering — DONE
 
-**What to do:**
-1. Verify `/api/skills/search` endpoint works
-2. Verify `/api/skills/install` endpoint works
-3. Polish UI: skill cards with descriptions, install buttons, installed badge
-4. Add FangHub registry URL if not configured
+Inline screenshot display in chat tool cards with full-size viewing support.
 
-**Files:** `crates/librefang-api/static/js/pages/skills.js`, `crates/librefang-api/src/routes.rs`
+### Chat Message Search — DONE
 
-**Done when:**
-- Users can browse, search, and install skills from the web UI
-- Installed skills show "Installed" badge
-- Error states handled gracefully
+Real-time message search with Ctrl+F shortcut, text highlighting, and match count display.
 
----
+### Skill Marketplace — DONE
 
-### 2.4 Install Script Deployment
+Skill browsing with 4 tabs (Installed, ClawHub, MCP Servers, Quick Start), live search, categories, install/uninstall, detail modals, and security warnings.
 
-**Problem:** `librefang.ai` install endpoints need to be wired. Users should be able to do `curl -fsSL https://librefang.ai/install.sh | sh`.
+### Install Script Deployment — PENDING
 
-**What to do:**
-1. Set up GitHub Pages or Cloudflare Worker for `librefang.ai`
-2. Serve `scripts/install.sh` at root
-3. Serve `scripts/install.ps1` at `/install.ps1`
-4. Test on fresh Linux, macOS, and Windows machines
+One-line install scripts for Linux/macOS (`curl | sh`) and Windows PowerShell (`irm | iex`).
 
-**Done when:**
-- `curl -fsSL https://librefang.ai/install.sh | sh` installs the latest release
-- `irm https://librefang.ai/install.ps1 | iex` works on Windows PowerShell
+### Voice Input/Output — DONE
 
----
+Hold-to-record mic button with automatic transcription, and inline TTS audio playback in chat.
 
-### 2.5 First-Run Wizard End-to-End -- DONE
+### Canvas Rendering — DONE
 
-**Status: COMPLETE** — 6-step wizard (Welcome → Provider → Agent → Try It → Channel → Done) with provider auto-detection, API key help links (12 providers), 10 agent templates with category filtering, mini chat for testing, channel setup (Telegram/Discord/Slack), setup checklist on overview page.
+Interactive iframe-based canvas output in chat with CSP support for both web browser and Tauri desktop app.
 
-**Problem (was):** Setup wizard needs to actually work for zero-config users.
+### Multi-Session per Agent — DONE
 
-**What to do:**
-1. Test wizard steps: welcome, API key entry, provider selection, model pick, first agent spawn
-2. Fix any broken flows
-3. Add provider-specific help text (where to get API keys)
-4. Auto-detect existing `.env` API keys and pre-fill
-
-**Files:** `index_body.html` (wizard template), `routes.rs` (config save endpoint)
-
-**Done when:**
-- New user completes wizard in < 2 minutes
-- Wizard detects existing API keys from environment
-- Clear error messages for invalid keys
+Multiple conversation sessions per agent with session switcher in chat header, session creation, and click-to-switch.
 
 ---
 
-## Sprint 3 — Differentiation (5-7 days)
-
-These are features where LibreFang can leapfrog OpenClaw.
+## Developer Platform
 
-### 3.1 Voice Input/Output in Web UI -- DONE
+### JavaScript & Python SDK — DONE
 
-**Status: COMPLETE** — Mic button with hold-to-record, MediaRecorder with webm/opus codec, auto-upload and transcription, TTS audio player in tool cards, recording timer display, CSP updated for media-src blob:.
-
-**Problem (was):** `media_transcribe` and `text_to_speech` tools exist but there's no mic button or audio playback in the UI.
-
-**What to do:**
-1. Add mic button next to attach button in input area
-2. Use Web Audio API / MediaRecorder for recording
-3. Upload audio as attachment, auto-invoke `media_transcribe`
-4. For TTS responses: detect audio URLs in tool results, add `