Skip to content

Commit b4dc0ef

Browse files
Ascendralclaude
andcommitted
v2.3.0 "Platform" — TUI mode, web dashboard, themes, rate limiting
Version bump 2.2.0 → 2.3.0 with full changelog, roadmap update, and README additions for all new features (--tui, --dashboard, --doctor, --theme, --no-stream flags; /doctor, /toolcost, /rate, /theme slash commands; TUI and dashboard architecture sections). 1035 tests, 0 failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c83fe84 commit b4dc0ef

File tree

6 files changed

+74
-12
lines changed

6 files changed

+74
-12
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## [2.3.0] — 2026-03-02
4+
5+
### Added
6+
- **TUI mode** (`--tui`) — full terminal UI with plan/output/details panels, keyboard-driven navigation (Tab=cycle, arrows=scroll, y/n=approve/deny, q=quit), real-time step tracking
7+
- **Web dashboard** (`--dashboard`) — local browser UI on port 3120 with session history, audit chain viewer with integrity verification, metrics summary, and SARIF export
8+
- **Theme system** (`--theme <name>`) — dark, light, and mono themes with semantic color roles; respects `NO_COLOR` env; persisted in config; `/theme` slash command
9+
- **Provider-aware rate limiting** — proactive sliding-window RPM/TPM tracking per provider (Anthropic, OpenAI, Gemini, DeepSeek, Groq, Mistral, xAI); automatic backoff on 429; `/rate` slash command
10+
- **Per-tool cost breakdown**`TokenTracker.getToolCostBreakdown()` with per-tool input/output tokens, USD cost, call count, and percentage of total; `/toolcost` slash command
11+
- **`codebot doctor`** (`--doctor`) — 12 environment health checks (Node, npm, config, sessions, audit integrity, disk, local LLM, cloud API keys, encryption, git, Docker); `/doctor` slash command
12+
- **Enhanced streaming display**`streamingIndicator()` with tokens/sec, `budgetBar()` with color gradient, `costBadge()` for REPL prompt, `timedStep()` for step timing, `collapsibleSection()` for verbose output
13+
- **TUI layout engine**`LayoutEngine` with panel management, focus cycling, scroll, bordered rendering; `Screen` abstraction with alt screen buffer; `KeyboardListener` with raw stdin parsing
14+
- **Dashboard REST API** — 9 endpoints: `/api/health`, `/api/sessions` (paginated), `/api/sessions/:id`, `/api/audit` (filterable), `/api/audit/verify`, `/api/audit/:sessionId`, `/api/metrics/summary`, `/api/usage`, `POST /api/audit/export`
15+
- **`--no-stream` flag** — disable streaming token display
16+
17+
### Changed
18+
- CLI help text updated with all new flags (`--tui`, `--dashboard`, `--doctor`, `--theme`, `--no-stream`)
19+
- UI component library: hardcoded colors replaced with theme-aware `getTheme().colors`
20+
- Banner system: local color constants replaced with theme integration
21+
- Agent loop: yields `stream_progress` events every 500ms during LLM streaming
22+
- Agent loop: `ProviderRateLimiter` integrated — acquire/release/backoff around provider calls
23+
- Tests: 907 → 1035+ (128 new tests across 12 test files)
24+
25+
### Security
26+
- Dashboard server binds to `127.0.0.1` only (no network exposure)
27+
- Dashboard static file serving prevents directory traversal
28+
- Dashboard frontend uses `escapeHtml()` for all user-data rendering (XSS prevention)
29+
- Audit chain verification endpoint validates SHA-256 hash chains
30+
31+
332
## [2.2.0] — 2026-03-02
433

534
### Added

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![npm version](https://img.shields.io/npm/v/codebot-ai.svg)](https://www.npmjs.com/package/codebot-ai)
55
[![license](https://img.shields.io/npm/l/codebot-ai.svg)](https://github.com/zanderone1980/codebot-ai/blob/main/LICENSE)
66
[![node](https://img.shields.io/node/v/codebot-ai.svg)](https://nodejs.org)
7-
![tests](https://img.shields.io/badge/tests-907%20passing-brightgreen)
7+
![tests](https://img.shields.io/badge/tests-1035%2B%20passing-brightgreen)
88
![dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
99
![tools](https://img.shields.io/badge/tools-28-blue)
1010

@@ -142,6 +142,11 @@ echo "explain this error" | codebot # Pipe mode
142142
--max-iterations <n> Max agent loop iterations (default: 50)
143143
--no-animate Disable mascot and banner animations
144144
--verbose Show detailed debug output
145+
--tui Full terminal UI mode (panels, keyboard nav)
146+
--dashboard Start web dashboard on localhost:3120
147+
--doctor Run environment health checks
148+
--theme <name> Color theme: dark, light, mono
149+
--no-stream Disable streaming token display
145150
```
146151
147152
### Interactive Commands
@@ -160,6 +165,10 @@ echo "explain this error" | codebot # Pipe mode
160165
/metrics Show session metrics (token counts, latency, costs)
161166
/risk Show risk assessment history
162167
/config Show configuration
168+
/doctor Run environment health checks
169+
/toolcost Show per-tool cost breakdown
170+
/rate Show provider rate limit status
171+
/theme Switch color theme
163172
/quit Exit
164173
```
165174
@@ -315,7 +324,7 @@ CodeBot is hardened for continuous operation:
315324
- **Context compaction** — when the conversation exceeds the model's context window, messages are intelligently summarized
316325
- **Process resilience** — unhandled exceptions and rejections are caught, logged, and the REPL keeps running
317326
- **Routine timeouts** — scheduled tasks are capped at 5 minutes to prevent the scheduler from hanging
318-
- **907+ tests** — comprehensive suite covering core agent, security, extension, and action
327+
- **1035+ tests** — comprehensive suite covering core agent, security, extension, and action
319328

320329
## Programmatic API
321330

@@ -365,6 +374,19 @@ src/
365374
replay.ts Session replay
366375
capabilities.ts Per-tool capability restrictions
367376
banner.ts Mascot and banner animation system
377+
theme.ts Color themes (dark/light/mono)
378+
doctor.ts Environment health checks
379+
provider-rate-limiter.ts Proactive RPM/TPM rate limiting
380+
telemetry.ts Token tracking and cost estimation
381+
tui/
382+
layout.ts Panel-based TUI layout engine
383+
keyboard.ts Raw stdin keyboard input handler
384+
screen.ts ANSI terminal screen control
385+
tui-mode.ts Full TUI mode integration
386+
dashboard/
387+
server.ts HTTP server (node:http, zero deps)
388+
api.ts REST API for sessions/audit/metrics
389+
static/ Browser UI (HTML/CSS/JS)
368390
context/
369391
manager.ts Context window management, LLM-powered compaction
370392
repo-map.ts Project structure scanner

ROADMAP.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
| Metric | Value |
1010
|--------|-------|
11-
| Version | 2.2.0 |
12-
| Tests | 907 passing |
11+
| Version | 2.3.0 |
12+
| Tests | 1035+ passing |
1313
| Tools | 28 built-in + MCP + plugins |
1414
| Security | 8-layer stack: policy, RBAC, capabilities, risk scoring, path safety, secret detection, SSRF, sandbox |
1515
| Platforms | CLI, VS Code extension, GitHub Action |
@@ -32,6 +32,7 @@
3232
| v2.1.5 | Hardened II | RBAC consistency, browser safety, encryption wiring | 559 | Shipped |
3333
| v2.1.6 | Intelligence | Prompt caching, vision/multimodal, model routing, JSON mode | 586 | Shipped |
3434
| v2.2.0 | Quality | 907 tests, CLI UI polish, permission cards, cost estimation, browser resilience | 907 | Shipped |
35+
| v2.3.0 | Platform | TUI mode, web dashboard, theme system, provider rate limiting, doctor | 1035 | Shipped |
3536

3637
---
3738

@@ -65,7 +66,7 @@
6566

6667
---
6768

68-
## Next: v2.3.0 — Platform
69+
## Shipped: v2.3.0 — Platform
6970

7071
**Theme:** Run anywhere, for anyone.
7172

@@ -92,10 +93,18 @@
9293
- Streaming response display (token-by-token)
9394
- Cost budget visualization
9495

96+
### Completed
97+
- \u2705 TUI mode with 3-panel layout, keyboard navigation, permission dialogs
98+
- \u2705 Web dashboard with session viewer, audit chain verification, metrics
99+
- \u2705 Theme system (dark/light/mono) with NO_COLOR support
100+
- \u2705 Provider-aware rate limiting with sliding-window RPM/TPM
101+
- \u2705 Per-tool cost breakdown + doctor command (deferred from v2.2.0)
102+
- \u2705 Enhanced streaming display with budget visualization
103+
95104
### Gate Criteria
96-
- TUI prototype working
97-
- Web dashboard serving locally
98-
- 900+ tests
105+
- 1035+ tests, 0 failures \u2705
106+
- TUI mode working \u2705
107+
- Web dashboard serving locally \u2705
99108

100109
---
101110

@@ -146,4 +155,4 @@ The only open-source AI coding agent that is:
146155
- **Provider-agnostic** — any LLM, local or cloud
147156
- **Zero dependencies** — pure Node.js, no install bloat
148157
- **Enterprise-ready** — VS Code extension, GitHub Action, CI/CD integration
149-
- **Tested**880+ tests covering every tool and security boundary
158+
- **Tested**1035+ tests covering every tool and security boundary

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codebot-ai",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Zero-dependency autonomous AI agent. Code, browse, search, automate. Works with any LLM \u2014 Ollama, Claude, GPT, Gemini, DeepSeek, Groq, Mistral, Grok.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -18,6 +18,7 @@
1818
"format:check": "prettier --check 'src/**/*.ts' '*.json' '*.md'",
1919
"typecheck": "tsc --noEmit",
2020
"clean": "rm -rf dist",
21+
"postbuild": "cp -r src/dashboard/static dist/dashboard/",
2122
"prepublishOnly": "npm run build"
2223
},
2324
"keywords": [
@@ -70,6 +71,7 @@
7071
"files": [
7172
"dist/**/*.js",
7273
"dist/**/*.d.ts",
74+
"dist/dashboard/static/**",
7375
"!dist/**/*.test.*",
7476
"bin",
7577
"README.md",

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { TuiMode } from './tui/tui-mode';
2525
import { DashboardServer } from './dashboard/server';
2626
import { registerApiRoutes } from './dashboard/api';
2727

28-
const VERSION = '2.2.0';
28+
const VERSION = '2.3.0';
2929

3030
let verbose = false;
3131

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const VERSION = '2.2.0';
1+
export const VERSION = '2.3.0';
22
export { Agent } from './agent';
33
export { OpenAIProvider } from './providers/openai';
44
export { AnthropicProvider } from './providers/anthropic';

0 commit comments

Comments
 (0)