@nomad-e/bluma-cli 0.2.1 → 0.3.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/README.md +251 -1117
- package/dist/WorkingTimer.js +130 -0
- package/dist/components/StreamingText.js +113 -0
- package/dist/components/reasoningText.js +18 -0
- package/dist/components/streamingTextFlush.js +11 -0
- package/dist/config/native_tools.json +1 -59
- package/dist/config/plan_mode_instructions.md +218 -0
- package/dist/constants/toolUiSymbols.js +10 -0
- package/dist/main.js +17346 -4542
- package/dist/theme/blumaTerminal.js +79 -0
- package/dist/theme/m3Layout.js +68 -0
- package/dist/utils/formatTurnDurationMs.js +16 -0
- package/dist/utils/toolActionLabels.js +167 -0
- package/package.json +35 -12
package/README.md
CHANGED
|
@@ -1,1237 +1,371 @@
|
|
|
1
|
-
# BluMa CLI —
|
|
1
|
+
# BluMa CLI — AI Agent for Advanced Software Engineering
|
|
2
2
|
|
|
3
|
-
[](LICENSE)
|
|
3
|
+
[](LICENSE)
|
|
5
4
|
[](https://nodejs.org/)
|
|
5
|
+
[](https://www.npmjs.com/package/@nomad-e/bluma-cli)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**BluMa** is a CLI-based model agent for advanced software engineering workflows. Built with React/Ink 5, it provides an interactive terminal interface for LLM-powered automation, code generation, refactoring, and task execution. Features persistent sessions, contextual reasoning, smart feedback, coordinator mode for worker orchestration, and extensible tools/skills architecture.
|
|
11
|
-
|
|
12
|
-
> **Credit:** BluMa was conceived and architected by **Alex Fonseca**.
|
|
13
|
-
|
|
14
|
-
**Current Version:** 0.1.84
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Table of Contents
|
|
19
|
-
|
|
20
|
-
- [Overview](#overview)
|
|
21
|
-
- [Key Features](#key-features)
|
|
22
|
-
- [Requirements](#requirements)
|
|
23
|
-
- [Installation](#installation)
|
|
24
|
-
- [Quick Start](#quick-start)
|
|
25
|
-
- [Configuration](#configuration)
|
|
26
|
-
- [Architecture](#architecture)
|
|
27
|
-
- [Native Tools](#native-tools)
|
|
28
|
-
- [Skills System](#skills-system)
|
|
29
|
-
- [Runtime & Orchestration](#runtime--orchestration)
|
|
30
|
-
- [Slash Commands](#slash-commands)
|
|
31
|
-
- [Development](#development)
|
|
32
|
-
- [Testing](#testing)
|
|
33
|
-
- [Contributing](#contributing)
|
|
34
|
-
- [License](#license)
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Overview
|
|
39
|
-
|
|
40
|
-
BluMa operates as a **conversational agent** in the terminal, combining:
|
|
41
|
-
|
|
42
|
-
- **Rich UI Layer**: React/Ink 5 components for interactive prompts, live overlays, and real-time feedback
|
|
43
|
-
- **Agent Layer**: LLM orchestration via FactorRouter with tool invocation and context management
|
|
44
|
-
- **Runtime Layer**: Task tracking, plugin system, hooks, diagnostics, session management, and coordinator mode
|
|
45
|
-
- **Tool Layer**: 50+ native tools + MCP SDK integration for external tools
|
|
46
|
-
|
|
47
|
-
The agent maintains persistent conversation history, workspace snapshots, and coding memory across sessions.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Key Features
|
|
52
|
-
|
|
53
|
-
### Core Agent
|
|
54
|
-
- **Interactive CLI**: Rich terminal UI with React/Ink 5
|
|
55
|
-
- **Session Persistence**: Automatic save/load of conversation and tool history
|
|
56
|
-
- **Context Management**: Token-aware context compression with history anchoring
|
|
57
|
-
- **Smart Feedback**: Technical suggestions and automated checks
|
|
58
|
-
- **Confirmation System**: Controlled execution with whitelists and previews
|
|
59
|
-
- **Coding Memory**: Persistent notes about codebase decisions (`~/.bluma/coding_memory.json`)
|
|
60
|
-
|
|
61
|
-
### Runtime & Orchestration (v0.1.41+)
|
|
62
|
-
- **Plugin System**: Load plugins from `.bluma/plugins/` or `~/.bluma/plugins/`
|
|
63
|
-
- **Hook Registry**: Event-driven lifecycle tracking (tool calls, decisions, state changes)
|
|
64
|
-
- **Task Store**: Persistent task management with PLANNING → EXECUTION → VERIFICATION flow
|
|
65
|
-
- **Session Registry**: Multi-session support with process health monitoring
|
|
66
|
-
- **Thread System**: Multi-thread conversation management with isolated contexts
|
|
67
|
-
- **Diagnostics**: Real-time system snapshot (tasks, hooks, plugins, sessions)
|
|
68
|
-
- **Tool Execution Policy**: Intelligent decisions based on sandbox mode and safety
|
|
69
|
-
|
|
70
|
-
### Tools & Skills
|
|
71
|
-
- **50+ Native Tools**: File operations, search, shell commands, web fetch, agent coordination, task management, MCP resources, cron scheduling, LSP queries, notebook editing, REPL execution
|
|
72
|
-
- **Coordinator Mode**: Orchestrator playbook for delegating work to background workers
|
|
73
|
-
- **MCP Integration**: Model Context Protocol SDK for external tool servers
|
|
74
|
-
- **Skills System**: Pluggable knowledge modules (git, PDF, Excel, etc.)
|
|
75
|
-
- **Agent Coordination**: Spawn/wait/list subagents for parallel work with bidirectional mailbox system
|
|
76
|
-
|
|
77
|
-
### UI Components
|
|
78
|
-
- **Slash Commands**: 30+ built-in commands (`/help`, `/model`, `/tasks`, `/plugins`, `/threads`, etc.)
|
|
79
|
-
- **Live Overlays**: Working timers, progress indicators, streaming text
|
|
80
|
-
- **Diff Previews**: Side-by-side code comparisons before edits
|
|
81
|
-
- **Tool Result Cards**: Structured display of tool outputs
|
|
82
|
-
- **Session Panels**: Real-time monitoring with log streaming
|
|
83
|
-
- **Thread Management**: Multi-thread conversation UI with thread switching
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Requirements
|
|
88
|
-
|
|
89
|
-
- **Node.js**: >= 20
|
|
90
|
-
- **npm**: >= 9
|
|
91
|
-
- **FactorRouter**: API key and URL for LLM backend
|
|
7
|
+
**BluMa** is an independent AI agent CLI for automation and advanced software engineering. It combines powerful tool orchestration, multi-agent coordination, and intelligent context management to help you build software faster and with higher quality.
|
|
92
8
|
|
|
93
9
|
---
|
|
94
10
|
|
|
95
|
-
##
|
|
96
|
-
|
|
97
|
-
### Global Installation (Recommended)
|
|
11
|
+
## 🚀 Quick Start
|
|
98
12
|
|
|
99
13
|
```bash
|
|
14
|
+
# Install globally
|
|
100
15
|
npm install -g @nomad-e/bluma-cli
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Linux/macOS** (if permission errors):
|
|
104
|
-
```bash
|
|
105
|
-
sudo npm install -g @nomad-e/bluma-cli
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
> **macOS Note**: After installation, run `bluma` **without** sudo to avoid permission issues.
|
|
109
16
|
|
|
110
|
-
|
|
17
|
+
# Run BluMa
|
|
18
|
+
bluma
|
|
111
19
|
|
|
112
|
-
|
|
113
|
-
git clone <repository-url>
|
|
114
|
-
cd bluma-cli
|
|
20
|
+
# Or run from source
|
|
115
21
|
npm install
|
|
116
22
|
npm run build
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Environment Setup
|
|
120
|
-
|
|
121
|
-
Set these environment variables globally:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Linux/macOS: Add to ~/.bashrc, ~/.zshrc, or ~/.bash_profile
|
|
125
|
-
export FACTOR_ROUTER_KEY="sk-fai-your-key-here"
|
|
126
|
-
export FACTOR_ROUTER_URL="http://host:8003/router-api"
|
|
127
|
-
|
|
128
|
-
# Then reload
|
|
129
|
-
source ~/.bashrc # or ~/.zshrc
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Windows (PowerShell)**:
|
|
133
|
-
```powershell
|
|
134
|
-
[Environment]::SetEnvironmentVariable("FACTOR_ROUTER_KEY", "sk-fai-your-key-here", "User")
|
|
135
|
-
[Environment]::SetEnvironmentVariable("FACTOR_ROUTER_URL", "http://host:8003/router-api", "User")
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Quick Start
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
# Launch BluMa
|
|
144
|
-
bluma
|
|
145
|
-
|
|
146
|
-
# Or from local development
|
|
147
23
|
npm start
|
|
148
24
|
```
|
|
149
25
|
|
|
150
|
-
### First Interaction
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
> help me create a React component
|
|
154
|
-
> find all files containing "useEffect"
|
|
155
|
-
> run npm test in the background
|
|
156
|
-
> /tasks to see active tasks
|
|
157
|
-
> /model to switch LLM model
|
|
158
|
-
> /threads to manage conversation threads
|
|
159
|
-
```
|
|
160
|
-
|
|
161
26
|
---
|
|
162
27
|
|
|
163
|
-
##
|
|
164
|
-
|
|
165
|
-
###
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
28
|
+
## ✨ Key Features
|
|
29
|
+
|
|
30
|
+
### 🤖 **50+ Native Tools**
|
|
31
|
+
Comprehensive toolset for file operations, code analysis, web search, and more:
|
|
32
|
+
- **Filesystem**: `edit_tool`, `file_write`, `read_file_lines`, `ls_tool`, `find_by_name`, `grep_search`
|
|
33
|
+
- **Execution**: `shell_command`, `repl`, `command_status`, `kill_command`
|
|
34
|
+
- **Communication**: `ask_user_question`, `send_message`, `brief`, `signal_mailbox`
|
|
35
|
+
- **Planning**: `todo`, `task_boundary`, `task_create`, `task_update`, `enter_plan_mode`
|
|
36
|
+
- **Knowledge**: `search_web`, `web_fetch`, `coding_memory`, `ctx_inspect`
|
|
37
|
+
- **Agent Coordination**: `spawn_agent`, `wait_agent`, `list_agents`, `kill_agent`
|
|
38
|
+
- **Specialized**: `context_collapse`, `dream_engine`, `snip`, `lsp_query`, `notebook_edit`
|
|
39
|
+
|
|
40
|
+
### 🧠 **Multi-Agent Orchestration**
|
|
41
|
+
- **Coordinator Mode**: Product Owner + Engineering Manager hybrid that delegates to specialist workers
|
|
42
|
+
- **Parallel Execution**: Launch multiple workers concurrently for research, implementation, and verification
|
|
43
|
+
- **Mailbox IPC**: Bidirectional communication between coordinator and workers
|
|
44
|
+
- **Worker Types**: Researchers, implementers, verifiers with specialized roles
|
|
45
|
+
|
|
46
|
+
### 📝 **50+ Slash Commands**
|
|
47
|
+
Quick access to common operations:
|
|
48
|
+
- **Session**: `/undo`, `/redo`, `/diff`, `/clear`, `/sessions`, `/attach`, `/bridge`, `/logs`, `/resume`, `/kill`
|
|
49
|
+
- **Inspect**: `/explain`, `/fix`, `/editor`, `/config`, `/bug`, `/optimize`, `/refactor`, `/document`, `/search`, `/context`, `/token`, `/settings`, `/history`, `/alias`, `/macro`, `/template`, `/share`, `/copy`
|
|
50
|
+
- **Agent**: `/test`, `/chat`, `/code`, `/terminal`, `/file`
|
|
51
|
+
- **Git**: `/pr` (create PRs), `/release` (release engineering)
|
|
52
|
+
- **Input**: `/help`, Ctrl+V for images
|
|
53
|
+
|
|
54
|
+
### 🎯 **Intelligent Context Management**
|
|
55
|
+
- **Auto Memory**: Persistent coding notes across sessions (`coding_memory`)
|
|
56
|
+
- **Context Collapse**: Advanced history compaction with token budget control
|
|
57
|
+
- **Snip Tool**: Extract and remove old conversation snippets
|
|
58
|
+
- **Dream Engine**: Background memory consolidation and deduplication
|
|
59
|
+
- **Token Tracking**: Real-time token usage monitoring with `ctx_inspect`
|
|
60
|
+
|
|
61
|
+
### 🔧 **Plan Mode**
|
|
62
|
+
Structured problem-solving workflow with 3 phases:
|
|
63
|
+
1. **PLANNING**: Research and design
|
|
64
|
+
2. **EXECUTION**: Implementation
|
|
65
|
+
3. **VERIFICATION**: Testing and validation
|
|
66
|
+
|
|
67
|
+
### 🛠️ **Skills System**
|
|
68
|
+
Extendable expertise modules with progressive disclosure:
|
|
69
|
+
- **git-commit**: Conventional commits automation
|
|
70
|
+
- **git-pr**: Pull request creation and management
|
|
71
|
+
- **git-release**: Full release engineering workflow
|
|
72
|
+
- **pdf**: PDF generation and manipulation
|
|
73
|
+
- **xlsx**: Spreadsheet processing
|
|
74
|
+
- **skill-creator**: Create custom skills
|
|
75
|
+
|
|
76
|
+
### 🎨 **Modern UI**
|
|
77
|
+
- Built with **Ink** (React for CLI)
|
|
78
|
+
- **Shimmer effects** for working states
|
|
79
|
+
- **Streamlined transcript** with syntax highlighting
|
|
80
|
+
- **Bottom dock** for status and controls
|
|
81
|
+
- **Workers overlay** for multi-agent visualization
|
|
82
|
+
- **Thread management** for multi-thread conversations
|
|
83
|
+
|
|
84
|
+
### 🔒 **Sandbox Security**
|
|
85
|
+
- **Permission modes**: Local (auto-approve) vs Sandbox (confirmation required)
|
|
86
|
+
- **Policy enforcement**: `rm -rf` protection, sudo blocking, dangerous command detection
|
|
87
|
+
- **FactorAI integration**: Optional sandbox backend for isolated execution
|
|
88
|
+
|
|
89
|
+
### 📦 **Native Performance**
|
|
90
|
+
- **Rust clipboard**: Cross-platform clipboard support (no wl-paste/xclip dependencies)
|
|
91
|
+
- **Native modules**: High-performance bindings for critical operations
|
|
92
|
+
- **TypeScript**: Full type safety with strict mode
|
|
93
|
+
|
|
94
|
+
### 🔌 **MCP Support**
|
|
95
|
+
- **Model Context Protocol**: Connect to external MCP servers
|
|
96
|
+
- **Resource listing**: Discover and read MCP resources
|
|
97
|
+
- **SSE transport**: Server-Sent Events for real-time communication
|
|
196
98
|
|
|
197
99
|
---
|
|
198
100
|
|
|
199
|
-
## Architecture
|
|
101
|
+
## 🏗️ Architecture
|
|
200
102
|
|
|
201
103
|
```
|
|
202
104
|
┌─────────────────────────────────────────────────────────────┐
|
|
203
|
-
│
|
|
204
|
-
|
|
205
|
-
│
|
|
206
|
-
│
|
|
207
|
-
|
|
208
|
-
│
|
|
209
|
-
|
|
210
|
-
│
|
|
211
|
-
│ │
|
|
212
|
-
|
|
213
|
-
│
|
|
214
|
-
└─────────────────────────────────────────────────────────────┘
|
|
215
|
-
│
|
|
216
|
-
┌─────────────────────────────┼────────────────────────────────┐
|
|
217
|
-
│ Agent Layer │
|
|
218
|
-
│ ┌──────────────┐ ┌──────────┐ ┌──────────────────────┐ │
|
|
219
|
-
│ │ Agent │ │ BluMa │ │ RouteManager │ │
|
|
220
|
-
│ │ Orchestrator│ │ Core │ │ (FactorRouter) │ │
|
|
221
|
-
│ └──────┬───────┘ └────┬─────┘ └──────────┬───────────┘ │
|
|
222
|
-
│ │ │ │ │
|
|
223
|
-
│ ┌──────┴───────┐ ┌────┴────┐ ┌───────────┴──────────┐ │
|
|
224
|
-
│ │ ToolInvoker │ │ LLM │ │ PromptBuilder │ │
|
|
225
|
-
│ │ │ │ Client │ │ + ContextManager │ │
|
|
226
|
-
│ └──────────────┘ └─────────┘ └──────────────────────┘ │
|
|
227
|
-
│ ┌──────────────────────────────────────────────────────┐ │
|
|
228
|
-
│ │ Thread Manager / Thread Store │ │
|
|
229
|
-
│ └──────────────────────────────────────────────────────┘ │
|
|
230
|
-
└─────────────────────────────────────────────────────────────┘
|
|
231
|
-
│
|
|
232
|
-
┌─────────────────────────────┼────────────────────────────────┐
|
|
233
|
-
│ Runtime Layer │
|
|
234
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
|
|
235
|
-
│ │TaskStore │ │HookReg. │ │PluginReg.│ │SessionReg. │ │
|
|
236
|
-
│ │ │ │ │ │ │ │ │ │
|
|
237
|
-
│ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │
|
|
238
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
|
|
239
|
-
│ │Sandbox │ │ToolExec │ │Diagnostics│ │SessionView │ │
|
|
240
|
-
│ │Policy │ │Policy │ │ │ │ │ │
|
|
241
|
-
│ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │
|
|
242
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
|
|
243
|
-
│ │Feature │ │Plan Mode │ │Tool Auto │ │Tool Permission│ │
|
|
244
|
-
│ │Flags │ │Session │ │Approve │ │Classifier │ │
|
|
245
|
-
│ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │
|
|
246
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
|
|
247
|
-
│ │Mailbox │ │Worker │ │Permission│ │Thread │ │
|
|
248
|
-
│ │Registry │ │Context │ │Rules │ │Manager │ │
|
|
249
|
-
│ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │
|
|
250
|
-
└─────────────────────────────────────────────────────────────┘
|
|
251
|
-
│
|
|
252
|
-
┌─────────────────────────────┼────────────────────────────────┐
|
|
253
|
-
│ Tools Layer │
|
|
254
|
-
│ ┌──────────────────────────────────────────────────────┐ │
|
|
255
|
-
│ │ Native Tools (50+) │ │
|
|
256
|
-
│ │ edit_tool, file_write, shell_command, grep_search, │ │
|
|
257
|
-
│ │ spawn_agent, wait_agent, list_agents, │ │
|
|
258
|
-
│ │ send_message, list_mailbox_messages, signal_mailbox,│ │
|
|
259
|
-
│ │ todo, task_boundary, task_create, task_list, │ │
|
|
260
|
-
│ │ task_get, task_update, task_stop, │ │
|
|
261
|
-
│ │ coding_memory, search_web, web_fetch, load_skill, │ │
|
|
262
|
-
│ │ message, ask_user_question, repl, │ │
|
|
263
|
-
│ │ list_mcp_resources, read_mcp_resource, │ │
|
|
264
|
-
│ │ cron_create, cron_list, cron_delete, │ │
|
|
265
|
-
│ │ lsp_query, notebook_edit, │ │
|
|
266
|
-
│ │ enter_plan_mode, exit_plan_mode, ... │ │
|
|
267
|
-
│ └──────────────────────────────────────────────────────┘ │
|
|
268
|
-
│ ┌──────────────────────────────────────────────────────┐ │
|
|
269
|
-
│ │ MCP SDK Integration │ │
|
|
270
|
-
│ │ External tool servers via MCP │ │
|
|
271
|
-
│ └──────────────────────────────────────────────────────┘ │
|
|
105
|
+
│ BluMa CLI (Ink UI) │
|
|
106
|
+
├─────────────────────────────────────────────────────────────┤
|
|
107
|
+
│ BlumaShell │ BlumaViewport │ BlumaTranscript │
|
|
108
|
+
│ BlumaBottomDock │ BlumaWorkersOverlay │
|
|
109
|
+
├─────────────────────────────────────────────────────────────┤
|
|
110
|
+
│ useBlumaSessionRuntime (Hook) │
|
|
111
|
+
├─────────────────────────────────────────────────────────────┤
|
|
112
|
+
│ Message Queue │ Agent Core │ Tool Invoker │
|
|
113
|
+
│ Session Manager │ Prompt Builder │
|
|
114
|
+
├─────────────────────────────────────────────────────────────┤
|
|
115
|
+
│ Native Tools (50+) │ Skills │ MCP Clients │
|
|
272
116
|
└─────────────────────────────────────────────────────────────┘
|
|
273
117
|
```
|
|
274
118
|
|
|
275
|
-
|
|
119
|
+
### Core Components
|
|
276
120
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
| `find_by_name` | Glob-based file search |
|
|
290
|
-
| `grep_search` | Text/regex search across files |
|
|
291
|
-
| `view_file_outline` | Show code structure (classes, functions, interfaces) |
|
|
292
|
-
| `notebook_edit` | Edit Jupyter `.ipynb` files (cells operations) |
|
|
293
|
-
|
|
294
|
-
### Shell & Commands
|
|
295
|
-
| Tool | Description |
|
|
296
|
-
|------|-------------|
|
|
297
|
-
| `shell_command` | Execute background commands |
|
|
298
|
-
| `command_status` | Check command progress/output |
|
|
299
|
-
| `send_command_input` | Send input to running commands' stdin |
|
|
300
|
-
| `kill_command` | Terminate running commands |
|
|
301
|
-
|
|
302
|
-
### Agent Coordination (v0.1.60+)
|
|
303
|
-
| Tool | Description |
|
|
304
|
-
|------|-------------|
|
|
305
|
-
| `spawn_agent` | Create background worker agents |
|
|
306
|
-
| `wait_agent` | Wait for agent completion |
|
|
307
|
-
| `list_agents` | List active/completed agents |
|
|
308
|
-
| `send_message` | Send follow-up to running worker (continue without re-spawn) |
|
|
309
|
-
| `list_mailbox_messages` | Read messages from workers (progress, permission requests) |
|
|
310
|
-
| `signal_mailbox` | Send ack/nack/progress signals to workers |
|
|
311
|
-
| `poll_mailbox` | Poll mailbox for new messages |
|
|
312
|
-
|
|
313
|
-
### Task & Project Management
|
|
314
|
-
| Tool | Description |
|
|
315
|
-
|------|-------------|
|
|
316
|
-
| `todo` | Manage task lists |
|
|
317
|
-
| `task_boundary` | Track task phases (PLANNING/EXECUTION/VERIFICATION) |
|
|
318
|
-
| `task_create` | Create session-scoped tasks |
|
|
319
|
-
| `task_list` | List all session tasks |
|
|
320
|
-
| `task_get` | Get one task by id |
|
|
321
|
-
| `task_update` | Update task fields |
|
|
322
|
-
| `task_stop` | Cancel a task |
|
|
323
|
-
| `task_output` | Read task output in real-time |
|
|
324
|
-
| `create_artifact` | Save documents under `<workspace>/.bluma/artifacts/<session>/` |
|
|
325
|
-
| `read_artifact` | Read artifacts from the current session directory |
|
|
326
|
-
|
|
327
|
-
### Thread Management (v0.1.84+)
|
|
328
|
-
| Tool | Description |
|
|
329
|
-
|------|-------------|
|
|
330
|
-
| `thread_create` | Create new conversation thread |
|
|
331
|
-
| `thread_list` | List all threads |
|
|
332
|
-
| `thread_switch` | Switch to different thread |
|
|
333
|
-
| `thread_archive` | Archive a thread |
|
|
334
|
-
|
|
335
|
-
### Knowledge & Research
|
|
336
|
-
| Tool | Description |
|
|
337
|
-
|------|-------------|
|
|
338
|
-
| `search_web` | Search programming solutions (Reddit, GitHub, StackOverflow) |
|
|
339
|
-
| `web_fetch` | Fetch and analyze remote URLs |
|
|
340
|
-
| `load_skill` | Activate domain-specific skills |
|
|
341
|
-
| `coding_memory` | CRUD for persistent coding notes |
|
|
342
|
-
|
|
343
|
-
### Communication & Interaction
|
|
344
|
-
| Tool | Description |
|
|
345
|
-
|------|-------------|
|
|
346
|
-
| `message` | Post user-visible chat (info/result types) |
|
|
347
|
-
| `ask_user_question` | Ask multiple-choice questions in terminal |
|
|
348
|
-
|
|
349
|
-
### MCP & Resources
|
|
350
|
-
| Tool | Description |
|
|
351
|
-
|------|-------------|
|
|
352
|
-
| `list_mcp_resources` | List resources from MCP servers |
|
|
353
|
-
| `read_mcp_resource` | Read a resource URI from MCP server |
|
|
354
|
-
|
|
355
|
-
### Scheduling
|
|
356
|
-
| Tool | Description |
|
|
357
|
-
|------|-------------|
|
|
358
|
-
| `cron_create` | Schedule one-shot or repeating reminders |
|
|
359
|
-
| `cron_list` | List scheduled cron jobs |
|
|
360
|
-
| `cron_delete` | Cancel scheduled job |
|
|
361
|
-
|
|
362
|
-
### Development Tools
|
|
363
|
-
| Tool | Description |
|
|
364
|
-
|------|-------------|
|
|
365
|
-
| `lsp_query` | LSP go-to-definition or references (TS/JS) |
|
|
366
|
-
| `repl` | Interactive code execution (Python, Node, Bash) |
|
|
367
|
-
|
|
368
|
-
### Specialized
|
|
369
|
-
| Tool | Description |
|
|
370
|
-
|------|-------------|
|
|
371
|
-
| `context_collapse` | Collapse context window |
|
|
372
|
-
| `dream_engine` | Auto-dream feature (coding memory consolidation) |
|
|
373
|
-
| `brief` | Generate project brief |
|
|
374
|
-
| `ctx_inspect` | Inspect current context |
|
|
375
|
-
| `snip` | Code snippet management |
|
|
376
|
-
| `coordinator_tools` | Coordinator mode utilities |
|
|
377
|
-
| `create-next-app` | Scaffold Next.js project with shadcn/ui + Tailwind |
|
|
378
|
-
| `deploy-app` | Deploy Next.js to Severino hosting |
|
|
379
|
-
|
|
380
|
-
### Plan Mode
|
|
381
|
-
| Tool | Description |
|
|
382
|
-
|------|-------------|
|
|
383
|
-
| `enter_plan_mode` | Enter plan-only mode (edits require confirmation) |
|
|
384
|
-
| `exit_plan_mode` | Leave plan mode |
|
|
121
|
+
- **`src/main.ts`**: Entry point
|
|
122
|
+
- **`src/app/ui/`**: React/Ink UI components
|
|
123
|
+
- `App.tsx`: Main orchestrator
|
|
124
|
+
- `BlumaSession.tsx`: Session management
|
|
125
|
+
- `components/`: Reusable UI elements
|
|
126
|
+
- **`src/app/agent/`**: AI agent core
|
|
127
|
+
- `core/`: Prompt building, context management
|
|
128
|
+
- `tools/`: Native tool implementations
|
|
129
|
+
- `runtime/`: Session runtime, sandbox policy
|
|
130
|
+
- `session_manager/`: Multi-session orchestration
|
|
131
|
+
- **`src/app/hooks/`**: React hooks for state management
|
|
132
|
+
- **`src/app/utils/`**: Utility functions and helpers
|
|
385
133
|
|
|
386
134
|
---
|
|
387
135
|
|
|
388
|
-
##
|
|
389
|
-
|
|
390
|
-
### Thread System (v0.1.84+)
|
|
391
|
-
**Multi-thread conversation management** for isolated contexts:
|
|
136
|
+
## 📋 Configuration
|
|
392
137
|
|
|
393
|
-
|
|
394
|
-
// Create a new thread
|
|
395
|
-
thread_create({
|
|
396
|
-
name: "Feature Implementation",
|
|
397
|
-
context: "Working on authentication module"
|
|
398
|
-
})
|
|
138
|
+
### Environment Variables
|
|
399
139
|
|
|
400
|
-
|
|
401
|
-
thread_list()
|
|
140
|
+
Create a `.env` file in your project root:
|
|
402
141
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
142
|
+
```bash
|
|
143
|
+
# Required for AI features
|
|
144
|
+
FACTOR_ROUTER_KEY=your_key
|
|
145
|
+
FACTOR_ROUTER_URL=https://api.factorai.sh
|
|
406
146
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
- **Parallel work** - Work on multiple features simultaneously
|
|
410
|
-
- **Context preservation** - Switch without losing previous context
|
|
411
|
-
- **Thread-specific memory** - Coding memories scoped to threads
|
|
412
|
-
|
|
413
|
-
### Mailbox System (Bidirectional Communication)
|
|
414
|
-
**Push-based communication** between coordinator and workers using EventEmitter:
|
|
415
|
-
|
|
416
|
-
```typescript
|
|
417
|
-
// Coordinator sends follow-up to running worker
|
|
418
|
-
send_message({
|
|
419
|
-
to: "worker-session-id",
|
|
420
|
-
message: "Fix the null pointer in src/auth/validate.ts:42..."
|
|
421
|
-
})
|
|
422
|
-
|
|
423
|
-
// Coordinator reads messages from workers
|
|
424
|
-
list_mailbox_messages({
|
|
425
|
-
from: "worker-session-id",
|
|
426
|
-
type: "progress_update",
|
|
427
|
-
unreadOnly: true
|
|
428
|
-
})
|
|
429
|
-
|
|
430
|
-
// Workers send progress/permission requests
|
|
431
|
-
signal_mailbox({
|
|
432
|
-
sessionId: "coordinator-session-id",
|
|
433
|
-
type: "progress",
|
|
434
|
-
data: { percent: 50 }
|
|
435
|
-
})
|
|
436
|
-
```
|
|
147
|
+
# Optional: MCP Server
|
|
148
|
+
MCP_SSE_URL=http://localhost:3000/sse
|
|
437
149
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
-
|
|
441
|
-
- **Progress tracking** - Real-time progress updates
|
|
442
|
-
- **Follow-up commands** - Continue workers without re-spawn
|
|
443
|
-
|
|
444
|
-
### Permission System
|
|
445
|
-
**Granular permission rules** with allow/deny patterns:
|
|
446
|
-
|
|
447
|
-
```typescript
|
|
448
|
-
// Check permission for tool invocation
|
|
449
|
-
permissionRulesEngine.checkPermission('edit_tool', {
|
|
450
|
-
filepath: '/src/auth/validate.ts'
|
|
451
|
-
})
|
|
452
|
-
// Returns: 'allow' | 'deny' | 'ask'
|
|
453
|
-
|
|
454
|
-
// Add custom rule
|
|
455
|
-
permissionRulesEngine.addRule({
|
|
456
|
-
type: 'allow',
|
|
457
|
-
toolPattern: 'read_*',
|
|
458
|
-
pathPattern: '**/*.md',
|
|
459
|
-
scope: 'global'
|
|
460
|
-
})
|
|
150
|
+
# Optional: FactorAI Sandbox
|
|
151
|
+
FACTORAI_BASE_URL=http://localhost:8080
|
|
152
|
+
FACTORAI_API_KEY=your-sandbox-key
|
|
461
153
|
```
|
|
462
154
|
|
|
463
|
-
|
|
464
|
-
- **Tool patterns** - Wildcard matching for tool names
|
|
465
|
-
- **Path patterns** - Glob-based file path matching
|
|
466
|
-
- **Command patterns** - Shell command pattern matching
|
|
467
|
-
- **Scopes** - global, workspace, session-level rules
|
|
468
|
-
|
|
469
|
-
### Worker Context Isolation
|
|
470
|
-
**AsyncLocalStorage-based context** for in-process workers:
|
|
155
|
+
### Runtime Modes
|
|
471
156
|
|
|
472
|
-
|
|
473
|
-
import { runWithWorkerContext, createWorkerContext } from './worker_context'
|
|
157
|
+
BluMa supports different permission modes:
|
|
474
158
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
name: 'auth-investigation'
|
|
478
|
-
})
|
|
479
|
-
|
|
480
|
-
await runWithWorkerContext(ctx, async () => {
|
|
481
|
-
// Worker code runs with isolated context
|
|
482
|
-
// Shares LLM/MCP clients but has unique context
|
|
483
|
-
})
|
|
484
|
-
```
|
|
159
|
+
- **Local Mode**: Auto-approve safe operations
|
|
160
|
+
- **Sandbox Mode**: Require confirmation for write/execute operations
|
|
485
161
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
```typescript
|
|
490
|
-
repl({
|
|
491
|
-
language: 'python',
|
|
492
|
-
code: `
|
|
493
|
-
import pandas as pd
|
|
494
|
-
df = pd.DataFrame({'a': [1, 2, 3]})
|
|
495
|
-
print(df.sum())
|
|
496
|
-
`,
|
|
497
|
-
timeout: 30000
|
|
498
|
-
})
|
|
162
|
+
Set via environment or runtime config:
|
|
163
|
+
```bash
|
|
164
|
+
BLUMA_PERMISSION_MODE=sandbox
|
|
499
165
|
```
|
|
500
166
|
|
|
501
|
-
|
|
167
|
+
---
|
|
502
168
|
|
|
503
|
-
|
|
504
|
-
**Automatic context compression** with history anchoring:
|
|
169
|
+
## 🛠️ Development
|
|
505
170
|
|
|
506
|
-
|
|
507
|
-
- **Trigger:** 70% of budget (168k tokens)
|
|
508
|
-
- **Strategy:** Compress old turns, keep last 10 turns complete
|
|
509
|
-
- **Anchor:** System message with compressed summary
|
|
171
|
+
### Prerequisites
|
|
510
172
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
currentAnchor,
|
|
515
|
-
compressedTurnSliceCount,
|
|
516
|
-
llmService,
|
|
517
|
-
userContext
|
|
518
|
-
)
|
|
519
|
-
```
|
|
173
|
+
- Node.js >= 20
|
|
174
|
+
- npm >= 9
|
|
175
|
+
- Rust (for native clipboard module, optional)
|
|
520
176
|
|
|
521
|
-
###
|
|
522
|
-
**Automatic memory extraction** from conversations:
|
|
177
|
+
### Setup
|
|
523
178
|
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
// Get relevant memories for query
|
|
529
|
-
const relevant = await memoryExtractor.getRelevantMemories('authentication')
|
|
530
|
-
```
|
|
179
|
+
```bash
|
|
180
|
+
# Clone the repository
|
|
181
|
+
git clone https://github.com/Nomad-e/bluma-cli.git
|
|
182
|
+
cd bluma-cli
|
|
531
183
|
|
|
532
|
-
|
|
184
|
+
# Install dependencies
|
|
185
|
+
npm install
|
|
533
186
|
|
|
534
|
-
|
|
535
|
-
|
|
187
|
+
# Build the project
|
|
188
|
+
npm run build
|
|
536
189
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
- **Operators:** d (delete), c (change), y (yank)
|
|
540
|
-
- **Commands:** `:w`, `:q`, etc.
|
|
190
|
+
# Or build with native modules
|
|
191
|
+
npm run build:all
|
|
541
192
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/vim toggle
|
|
193
|
+
# Start BluMa
|
|
194
|
+
npm start
|
|
545
195
|
```
|
|
546
196
|
|
|
547
|
-
###
|
|
548
|
-
**6 configurable UI themes:**
|
|
549
|
-
|
|
550
|
-
| Theme | Description |
|
|
551
|
-
|-------|-------------|
|
|
552
|
-
| `default` | Classic dark terminal |
|
|
553
|
-
| `dracula` | Purple accents |
|
|
554
|
-
| `github` | GitHub Dark mode |
|
|
555
|
-
| `monokai` | Vibrant green accents |
|
|
556
|
-
| `nord` | Arctic blue palette |
|
|
557
|
-
| `tokyo` | Tokyo Night blue-purple |
|
|
197
|
+
### Scripts
|
|
558
198
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
199
|
+
| Script | Description |
|
|
200
|
+
|--------|-------------|
|
|
201
|
+
| `npm run build` | TypeScript check + bundle |
|
|
202
|
+
| `npm run build:native` | Build Rust native modules |
|
|
203
|
+
| `npm run build:all` | Build native + TypeScript |
|
|
204
|
+
| `npm start` | Build + run BluMa |
|
|
205
|
+
| `npm test` | Run Jest tests |
|
|
206
|
+
| `npm run test:watch` | Watch mode for tests |
|
|
207
|
+
| `npm run test:parallel` | Parallel test execution |
|
|
208
|
+
| `npm run lint` | ESLint check |
|
|
209
|
+
| `npm run lint:fix` | Auto-fix lint errors |
|
|
562
210
|
|
|
563
|
-
###
|
|
564
|
-
**Automatic BluMa.md generation:**
|
|
211
|
+
### Testing
|
|
565
212
|
|
|
566
213
|
```bash
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
Scans repository and generates comprehensive codebase documentation including:
|
|
571
|
-
- Project overview
|
|
572
|
-
- Technology stack detection
|
|
573
|
-
- Directory structure with annotations
|
|
574
|
-
- Key configs and scripts
|
|
575
|
-
- CLI commands
|
|
576
|
-
- Operational notes
|
|
577
|
-
|
|
578
|
-
### Coding Memory Consolidate
|
|
579
|
-
**Deduplication of coding memories:**
|
|
580
|
-
|
|
581
|
-
```typescript
|
|
582
|
-
consolidateCodingMemoryFile()
|
|
583
|
-
// Merges duplicate entries by normalized text
|
|
584
|
-
// Keeps oldest ID, merges tags
|
|
585
|
-
// Creates backup .bak file
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
---
|
|
589
|
-
|
|
590
|
-
## Skills System
|
|
591
|
-
|
|
592
|
-
Skills are **self-contained knowledge modules** that extend BluMa with domain expertise. They use **Progressive Disclosure** to manage context efficiently.
|
|
214
|
+
# Run all tests
|
|
215
|
+
npm test
|
|
593
216
|
|
|
594
|
-
|
|
217
|
+
# Run specific test file
|
|
218
|
+
npm test -- tests/tool_invocation.spec.ts
|
|
595
219
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
| 1 | **Bundled** | `dist/config/skills/` |
|
|
599
|
-
| 2 | **Project** | `{cwd}/.bluma/skills/` |
|
|
600
|
-
| 3 | **Global** | `~/.bluma/skills/` |
|
|
220
|
+
# Watch mode
|
|
221
|
+
npm run test:watch
|
|
601
222
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
```
|
|
605
|
-
Level 1: description (frontmatter)
|
|
606
|
-
Always visible. Cost: ~1 line per skill.
|
|
607
|
-
Purpose: Let agent DECIDE to activate.
|
|
608
|
-
|
|
609
|
-
↓ agent calls load_skill(name)
|
|
610
|
-
|
|
611
|
-
Level 2: SKILL.md body
|
|
612
|
-
Injected when activated. Cost: 50-300 lines.
|
|
613
|
-
Purpose: Core instructions and quick-start.
|
|
614
|
-
|
|
615
|
-
↓ agent reads reference or runs script (if needed)
|
|
616
|
-
|
|
617
|
-
Level 3a: references/*.md
|
|
618
|
-
Read on-demand. Cost: only when read.
|
|
619
|
-
Purpose: Advanced documentation.
|
|
620
|
-
|
|
621
|
-
Level 3b: scripts/*.py
|
|
622
|
-
Executed on-demand. Cost: zero context.
|
|
623
|
-
Purpose: Pre-built utilities.
|
|
223
|
+
# Parallel tests (faster)
|
|
224
|
+
npm run test:parallel:fast
|
|
624
225
|
```
|
|
625
226
|
|
|
626
|
-
###
|
|
227
|
+
### Contributing
|
|
627
228
|
|
|
628
|
-
|
|
629
|
-
|-------|-------------|
|
|
630
|
-
| `git-commit` | Conventional commits, staging, commit messages |
|
|
631
|
-
| `git-pr` | Pull requests, code review preparation |
|
|
632
|
-
| `git-release` | Version bumps, changelogs, git tags, GitHub releases |
|
|
633
|
-
| `pdf` | PDF creation, extraction, merging, OCR |
|
|
634
|
-
| `xlsx` | Spreadsheet operations, formulas, charts |
|
|
635
|
-
| `skill-creator` | Author new BluMa skills |
|
|
636
|
-
|
|
637
|
-
### Loading Skills
|
|
638
|
-
|
|
639
|
-
```typescript
|
|
640
|
-
// Via command
|
|
641
|
-
> load the git-commit skill
|
|
642
|
-
|
|
643
|
-
// Via tool call
|
|
644
|
-
load_skill({ skill_name: "git-commit" })
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
Skills inject domain knowledge and best practices into the agent's context. Each skill has:
|
|
648
|
-
- **Frontmatter**: Description and dependencies (always visible)
|
|
649
|
-
- **Body**: Core instructions (injected on activation)
|
|
650
|
-
- **References**: Advanced docs (read on-demand)
|
|
651
|
-
- **Scripts**: Executable utilities (zero context cost)
|
|
229
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.
|
|
652
230
|
|
|
653
231
|
---
|
|
654
232
|
|
|
655
|
-
##
|
|
656
|
-
|
|
657
|
-
### Task Store
|
|
233
|
+
## 📚 Documentation
|
|
658
234
|
|
|
659
|
-
|
|
235
|
+
- **[Developer Guide](docs/BLUMA_DEVELOPER_GUIDE.md)**: Complete technical reference
|
|
236
|
+
- **[Skills Guide](docs/SKILLS.md)**: How to create and use skills
|
|
237
|
+
- **[Mailbox IPC](docs/MAILBOX_IPC.md)**: Multi-agent communication
|
|
238
|
+
- **[Plan Mode](docs/plan-mode/)**: Structured problem-solving workflow
|
|
239
|
+
- **[CI/CD](docs/CI-TEST.md)**: Continuous integration setup
|
|
660
240
|
|
|
661
|
-
|
|
662
|
-
task_boundary({
|
|
663
|
-
task_name: "Implementing Authentication",
|
|
664
|
-
mode: "PLANNING",
|
|
665
|
-
task_status: "Creating middleware structure"
|
|
666
|
-
});
|
|
667
|
-
```
|
|
241
|
+
---
|
|
668
242
|
|
|
669
|
-
|
|
243
|
+
## 🎯 Use Cases
|
|
670
244
|
|
|
671
|
-
|
|
245
|
+
### 1. **Code Analysis & Refactoring**
|
|
246
|
+
```bash
|
|
247
|
+
# Ask BluMa to analyze your codebase
|
|
248
|
+
bluma
|
|
672
249
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
thread_switch({ threadId: "..." })
|
|
678
|
-
thread_archive({ threadId: "..." })
|
|
250
|
+
# Then use slash commands
|
|
251
|
+
/explain src/app/agent/core/prompt_builder.ts
|
|
252
|
+
/refactor src/utils/helpers.ts
|
|
253
|
+
/fix src/components/Button.tsx
|
|
679
254
|
```
|
|
680
255
|
|
|
681
|
-
###
|
|
682
|
-
|
|
683
|
-
|
|
256
|
+
### 2. **Multi-Agent Development**
|
|
257
|
+
```bash
|
|
258
|
+
# Coordinator mode: delegate to workers
|
|
259
|
+
"Build a new feature with research, implementation, and verification"
|
|
684
260
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
});
|
|
261
|
+
# BluMa automatically spawns:
|
|
262
|
+
# - Researcher: Investigate codebase structure
|
|
263
|
+
# - Implementer: Write the code
|
|
264
|
+
# - Verifier: Run tests and validate
|
|
690
265
|
```
|
|
691
266
|
|
|
692
|
-
###
|
|
693
|
-
|
|
694
|
-
Load plugins from `.bluma/plugins/`:
|
|
695
|
-
|
|
267
|
+
### 3. **Release Engineering**
|
|
696
268
|
```bash
|
|
697
|
-
|
|
698
|
-
|
|
269
|
+
/release patch # Auto-detect version bump
|
|
270
|
+
/release minor --dry-run # Preview release
|
|
699
271
|
```
|
|
700
272
|
|
|
701
|
-
###
|
|
702
|
-
|
|
703
|
-
Multi-session support with health monitoring:
|
|
704
|
-
|
|
273
|
+
### 4. **Pull Request Creation**
|
|
705
274
|
```bash
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
> /sessions kill <id> # Terminate session
|
|
275
|
+
/pr dev to main # Create PR from dev to main
|
|
276
|
+
/pr feature/auth to develop --draft # Draft PR
|
|
709
277
|
```
|
|
710
278
|
|
|
711
|
-
###
|
|
712
|
-
|
|
713
|
-
Real-time system snapshot:
|
|
714
|
-
|
|
279
|
+
### 5. **Context Management**
|
|
715
280
|
```bash
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
> /diagnostics plugins # Plugin registry status
|
|
720
|
-
> /diagnostics sessions # Active sessions
|
|
721
|
-
> /diagnostics threads # Thread overview
|
|
281
|
+
/context # Inspect current context
|
|
282
|
+
/token # View token usage
|
|
283
|
+
/summarize # Summarize conversation
|
|
722
284
|
```
|
|
723
285
|
|
|
724
|
-
### Runtime Files
|
|
725
|
-
|
|
726
|
-
| File | Purpose |
|
|
727
|
-
|------|---------|
|
|
728
|
-
| `~/.bluma/task_state.json` | Persistent task tracking |
|
|
729
|
-
| `~/.bluma/hooks.json` | Hook registry state |
|
|
730
|
-
| `~/.bluma/sessions/` | Session history and logs |
|
|
731
|
-
| `~/.bluma/plugins/` | Global plugin storage |
|
|
732
|
-
| `~/.bluma/threads/` | Thread storage |
|
|
733
|
-
|
|
734
|
-
### Tool Execution Policy
|
|
735
|
-
|
|
736
|
-
BluMa uses intelligent tool execution based on sandbox mode:
|
|
737
|
-
|
|
738
|
-
| Sandbox Mode | Behavior |
|
|
739
|
-
|--------------|----------|
|
|
740
|
-
| `confirm` | Prompt for dangerous tools (shell, edit, write) |
|
|
741
|
-
| `auto` | Auto-approve safe tools, confirm risky ones |
|
|
742
|
-
| `strict` | Require confirmation for all tools |
|
|
743
|
-
|
|
744
|
-
Safe tools (always auto-approved): `read_file_lines`, `grep_search`, `ls_tool`, `find_by_name`, `count_file_lines`, `view_file_outline`
|
|
745
|
-
|
|
746
286
|
---
|
|
747
287
|
|
|
748
|
-
##
|
|
749
|
-
|
|
750
|
-
Built-in terminal commands (type `/` to see all):
|
|
751
|
-
|
|
752
|
-
### Session & UI
|
|
753
|
-
| Command | Description |
|
|
754
|
-
|---------|-------------|
|
|
755
|
-
| `/clear` | Clear chat below welcome panel |
|
|
756
|
-
| `/sessions` | Show registered sessions (current + historical) |
|
|
757
|
-
| `/attach <id>` | Live-follow a session log stream |
|
|
758
|
-
| `/follow <id>` | Alias of /attach for live session follow |
|
|
759
|
-
| `/bridge` | Show session bridge state and follow instructions |
|
|
760
|
-
| `/status <id>` | Show session status for a session id |
|
|
761
|
-
| `/logs <id>` | Show recent logs for a session id |
|
|
762
|
-
| `/resume <id>` | Resume a session from the current CLI |
|
|
763
|
-
| `/kill <id>` | Send SIGTERM to a session by id |
|
|
764
|
-
| `/tasks [list\|add\|complete\|update\|remove\|clear]` | Manage task list |
|
|
765
|
-
| `/plan [show\|start\|end]` | Manage the active task boundary |
|
|
766
|
-
| `/compact` | Manually compact conversation context |
|
|
767
|
-
| `/export` | Export conversation as markdown |
|
|
768
|
-
|
|
769
|
-
### Threads (v0.1.84+)
|
|
770
|
-
| Command | Description |
|
|
771
|
-
|---------|-------------|
|
|
772
|
-
| `/threads` | List all conversation threads |
|
|
773
|
-
| `/thread [id]` | Switch to thread or show current |
|
|
774
|
-
| `/thread new [name]` | Create new thread |
|
|
775
|
-
| `/thread archive [id]` | Archive a thread |
|
|
776
|
-
|
|
777
|
-
### Agent
|
|
778
|
-
| Command | Description |
|
|
779
|
-
|---------|-------------|
|
|
780
|
-
| `/img ./shot.png [question]` | Send local image(s) to the model |
|
|
781
|
-
| `/image` | Alias of /img |
|
|
782
|
-
| `/init` | Run init subagent — BluMa.md codebase documentation |
|
|
783
|
-
| `/agent [default\|coordinator]` | Set prompt profile (coordinator playbook for worker orchestration) |
|
|
784
|
-
| `/agents` | List worker/agent sessions (spawn_agent children) |
|
|
785
|
-
|
|
786
|
-
### Inspect
|
|
787
|
-
| Command | Description |
|
|
788
|
-
|---------|-------------|
|
|
789
|
-
| `/plugins` | List installed plugins and plugin paths |
|
|
790
|
-
| `/plugin <name>` | Inspect one plugin |
|
|
791
|
-
| `/diagnostics` | Show a consolidated health snapshot |
|
|
792
|
-
| `/permissions` | Inspect sandbox and tool rules; set mode |
|
|
793
|
-
| `/hooks` | Inspect, enable, disable, or clear lifecycle hooks |
|
|
794
|
-
| `/model [list\|name\|auto]` | Show, list, or set the active model |
|
|
795
|
-
| `/effort [low\|medium\|high]` | Show or set reasoning effort |
|
|
796
|
-
| `/style [default\|compact\|brief]` | Show or set output style |
|
|
797
|
-
| `/sandbox [on\|off]` | Show or toggle sandbox mode |
|
|
798
|
-
| `/worktree [path]` | Show or set workspace root |
|
|
799
|
-
| `/statusline` | Show the current session statusline summary |
|
|
800
|
-
| `/skills` | List load_skill modules, dirs, and conflicts |
|
|
801
|
-
| `/tools [grep]` | List native tools (optional filter) |
|
|
802
|
-
| `/mcp [fs]` | List MCP tools (optional filter) |
|
|
803
|
-
| `/features` | Feature flags: `/features` or `/features <key> on\|off` |
|
|
804
|
-
| `/debug-workers` | Show running workers, PIDs, memory, and event bus state |
|
|
805
|
-
| `/cost` | Show session cost and token usage |
|
|
806
|
-
| `/memory` | Manage session memories |
|
|
807
|
-
| `/stats` | Detailed session statistics |
|
|
808
|
-
| `/theme` | Change UI theme |
|
|
809
|
-
| `/keybindings` | Show or configure keybindings |
|
|
810
|
-
| `/vim` | Toggle vim mode |
|
|
811
|
-
|
|
812
|
-
### Help
|
|
813
|
-
| Command | Description |
|
|
814
|
-
|---------|-------------|
|
|
815
|
-
| `/help` | List all slash commands (grouped) |
|
|
816
|
-
|
|
817
|
-
### Input (Keyboard Shortcuts)
|
|
818
|
-
| Shortcut | Description |
|
|
819
|
-
|----------|-------------|
|
|
820
|
-
| `Ctrl+V / Cmd+V` | Paste from clipboard: image → cache `~/.cache/bluma/clipboard`; text; or file path as image |
|
|
821
|
-
| `Ctrl+Shift+I` | Same as Ctrl+V (paste image, text, or file path) |
|
|
822
|
-
| `Ctrl+O` | Expand truncated previews in tool results |
|
|
288
|
+
## 🔧 Tool Categories
|
|
823
289
|
|
|
824
|
-
|
|
290
|
+
### Filesystem Tools (12)
|
|
291
|
+
`edit_tool`, `file_write`, `read_file_lines`, `ls_tool`, `find_by_name`, `grep_search`, `view_file_outline`, `count_file_lines`, `file_write`, `snip`, `ctx_inspect`, `workspace_snapshot`
|
|
825
292
|
|
|
826
|
-
|
|
293
|
+
### Execution Tools (6)
|
|
294
|
+
`shell_command`, `command_status`, `send_command_input`, `kill_command`, `repl`, `task_output`
|
|
827
295
|
|
|
828
|
-
###
|
|
296
|
+
### Communication Tools (5)
|
|
297
|
+
`ask_user_question`, `send_message`, `list_mailbox_messages`, `signal_mailbox`, `brief`
|
|
829
298
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
npm run build:native # Build native modules
|
|
833
|
-
npm run build:all # Build native + main
|
|
834
|
-
npm start # Build + run
|
|
835
|
-
```
|
|
299
|
+
### Planning Tools (8)
|
|
300
|
+
`todo`, `task_boundary`, `task_create`, `task_update`, `task_stop`, `task_list`, `enter_plan_mode`, `exit_plan_mode`
|
|
836
301
|
|
|
837
|
-
###
|
|
302
|
+
### Knowledge Tools (6)
|
|
303
|
+
`search_web`, `web_fetch`, `coding_memory`, `ctx_inspect`, `dream_engine`, `load_skill`
|
|
838
304
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
npm run lint:fix # Auto-fix issues
|
|
842
|
-
```
|
|
305
|
+
### Agent Coordination Tools (6)
|
|
306
|
+
`spawn_agent`, `wait_agent`, `list_agents`, `kill_agent`, `send_message`, `list_mailbox_messages`
|
|
843
307
|
|
|
844
|
-
###
|
|
308
|
+
### Specialized Tools (7)
|
|
309
|
+
`context_collapse`, `snip`, `brief`, `lsp_query`, `notebook_edit`, `createNextApp`, `deployApp`
|
|
845
310
|
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
npm run test:watch # Watch mode
|
|
849
|
-
npm run test:parallel # Parallel test execution
|
|
850
|
-
npm run test:parallel:fast # Fast parallel with 8 workers
|
|
851
|
-
```
|
|
311
|
+
### MCP Tools (2)
|
|
312
|
+
`list_mcp_resources`, `read_mcp_resource`
|
|
852
313
|
|
|
853
|
-
###
|
|
854
|
-
|
|
855
|
-
```
|
|
856
|
-
src/
|
|
857
|
-
├── app/
|
|
858
|
-
│ ├── agent/
|
|
859
|
-
│ │ ├── agent.ts # Main orchestrator
|
|
860
|
-
│ │ ├── bluma/ # Core agent logic
|
|
861
|
-
│ │ │ ├── core/
|
|
862
|
-
│ │ │ │ ├── bluma.ts # BluMaAgent class
|
|
863
|
-
│ │ │ │ └── turn_start_payload.ts
|
|
864
|
-
│ │ │ ├── context/
|
|
865
|
-
│ │ │ │ └── auto_compact.ts # Automatic context compaction
|
|
866
|
-
│ │ │ ├── memory/
|
|
867
|
-
│ │ │ │ └── session_memory.ts # Session memory
|
|
868
|
-
│ │ │ └── types/
|
|
869
|
-
│ │ │ └── errors.ts # Error type definitions
|
|
870
|
-
│ │ ├── config/
|
|
871
|
-
│ │ │ ├── native_tools.json # Tool definitions (50+)
|
|
872
|
-
│ │ │ ├── skills/ # Bundled skills
|
|
873
|
-
│ │ │ │ ├── git-commit/
|
|
874
|
-
│ │ │ │ ├── git-pr/
|
|
875
|
-
│ │ │ │ ├── git-release/ # Version bumps, changelogs, releases
|
|
876
|
-
│ │ │ │ ├── pdf/
|
|
877
|
-
│ │ │ │ ├── skill-creator/
|
|
878
|
-
│ │ │ │ └── xlsx/
|
|
879
|
-
│ │ │ │ └── scripts/
|
|
880
|
-
│ │ │ │ └── office/ # Office document handling
|
|
881
|
-
│ │ ├── core/ # LLM, context, prompts
|
|
882
|
-
│ │ │ ├── context-api/ # Context management
|
|
883
|
-
│ │ │ │ ├── context_manager.ts # Token-aware context
|
|
884
|
-
│ │ │ │ ├── history_anchor.ts # Conversation anchoring
|
|
885
|
-
│ │ │ │ └── token_counter.ts # Tiktoken integration
|
|
886
|
-
│ │ │ ├── llm/ # LLM client
|
|
887
|
-
│ │ │ │ ├── llm.ts # FactorRouter client
|
|
888
|
-
│ │ │ │ ├── llm_errors.ts # LLM error formatting
|
|
889
|
-
│ │ │ │ ├── streaming_delta.ts # Streaming delta handling
|
|
890
|
-
│ │ │ │ └── tool_call_normalizer.ts
|
|
891
|
-
│ │ │ ├── prompt/ # Prompt engineering
|
|
892
|
-
│ │ │ │ ├── prompt_builder.ts # Dynamic prompts
|
|
893
|
-
│ │ │ │ ├── workspace_snapshot.ts
|
|
894
|
-
│ │ │ │ ├── mcp_instructions.ts
|
|
895
|
-
│ │ │ │ ├── model_info.ts
|
|
896
|
-
│ │ │ │ ├── production_sandbox_prompt.ts
|
|
897
|
-
│ │ │ │ ├── system_prompt_sections.ts
|
|
898
|
-
│ │ │ │ ├── system_reminders.ts
|
|
899
|
-
│ │ │ │ └── tool_guidance.ts
|
|
900
|
-
│ │ │ ├── thread/ # Thread management (v0.1.84+)
|
|
901
|
-
│ │ │ │ ├── index.ts
|
|
902
|
-
│ │ │ │ ├── thread_manager.ts
|
|
903
|
-
│ │ │ │ ├── thread_store.ts
|
|
904
|
-
│ │ │ │ └── types.ts
|
|
905
|
-
│ │ │ └── context_viz.ts # Context visualization
|
|
906
|
-
│ │ ├── docs/
|
|
907
|
-
│ │ │ └── TOOL_PARITY.md # Tool parity documentation
|
|
908
|
-
│ │ ├── feedback/
|
|
909
|
-
│ │ │ └── feedback_system.ts # Smart feedback system
|
|
910
|
-
│ │ │ └── feedback_scoring.ts # User feedback scoring
|
|
911
|
-
│ │ ├── runtime/ # Orchestration layer
|
|
912
|
-
│ │ │ ├── diagnostics.ts # System snapshots
|
|
913
|
-
│ │ │ ├── feature_flags.ts # Feature gates
|
|
914
|
-
│ │ │ ├── hook_registry.ts # Event-driven hooks
|
|
915
|
-
│ │ │ ├── native_tool_catalog.ts # Tool registry
|
|
916
|
-
│ │ │ ├── permission_bridge.ts # Leader↔Worker permission system
|
|
917
|
-
│ │ │ ├── permission_rules.ts # Permission rule definitions
|
|
918
|
-
│ │ │ ├── tool_permission_classifier.ts
|
|
919
|
-
│ │ │ ├── plan_mode_session.ts # Plan mode state
|
|
920
|
-
│ │ │ ├── plugin_registry.ts # Plugin system
|
|
921
|
-
│ │ │ ├── plugin_runtime.ts # Plugin execution
|
|
922
|
-
│ │ │ ├── runtime_config.ts # Runtime settings
|
|
923
|
-
│ │ │ ├── sandbox_policy.ts # Safety policies
|
|
924
|
-
│ │ │ ├── session_registry.ts # Multi-session mgmt
|
|
925
|
-
│ │ │ ├── session_view.ts # Session monitoring
|
|
926
|
-
│ │ │ ├── task_store.ts # Task lifecycle
|
|
927
|
-
│ │ │ ├── tool_auto_approve.ts # Auto-approve rules
|
|
928
|
-
│ │ │ ├── tool_execution_policy.ts
|
|
929
|
-
│ │ │ ├── tool_orchestration.ts # Parallel read eligibility
|
|
930
|
-
│ │ │ ├── mailbox_registry.ts # Mailbox system
|
|
931
|
-
│ │ │ ├── worker_context.ts # Worker context management
|
|
932
|
-
│ │ │ └── factorai_context.ts # FactorAI app context
|
|
933
|
-
│ │ ├── session_manager/
|
|
934
|
-
│ │ │ └── session_manager.ts # Session persistence
|
|
935
|
-
│ │ ├── skills/
|
|
936
|
-
│ │ │ └── skill_loader.ts # 3-source skill loading
|
|
937
|
-
│ │ ├── subagents/ # Subagent system
|
|
938
|
-
│ │ │ ├── base_llm_subagent.ts
|
|
939
|
-
│ │ │ ├── init/ # Init subagent (BluMa.md)
|
|
940
|
-
│ │ │ │ ├── init_subagent.ts # Deep project analysis
|
|
941
|
-
│ │ │ │ ├── init_system_prompt.ts
|
|
942
|
-
│ │ │ │ └── contracts.ts
|
|
943
|
-
│ │ │ ├── registry.ts
|
|
944
|
-
│ │ │ ├── subagents_bluma.ts # SubAgent orchestration
|
|
945
|
-
│ │ │ ├── types.ts # SubAgent type definitions
|
|
946
|
-
│ │ │ └── worker_system_prompt.ts
|
|
947
|
-
│ │ ├── tools/
|
|
948
|
-
│ │ │ ├── mcp/
|
|
949
|
-
│ │ │ │ └── mcp_client.ts # MCP SDK client
|
|
950
|
-
│ │ │ ├── shared/
|
|
951
|
-
│ │ │ │ └── token_utils.ts # Token utilities
|
|
952
|
-
│ │ │ └── natives/ # 50+ native tool implementations
|
|
953
|
-
│ │ │ ├── agent_coordination.ts
|
|
954
|
-
│ │ │ ├── ask_user_question.ts
|
|
955
|
-
│ │ │ ├── async_command.ts
|
|
956
|
-
│ │ │ ├── coding_memory.ts
|
|
957
|
-
│ │ │ ├── coding_memory_consolidate.ts
|
|
958
|
-
│ │ │ ├── coordinator_tools.ts
|
|
959
|
-
│ │ │ ├── count_lines.ts
|
|
960
|
-
│ │ │ ├── edit.ts
|
|
961
|
-
│ │ │ ├── file_write.ts
|
|
962
|
-
│ │ │ ├── find_by_name.ts
|
|
963
|
-
│ │ │ ├── grep_search.ts
|
|
964
|
-
│ │ │ ├── list_mailbox_messages.ts
|
|
965
|
-
│ │ │ ├── load_skill.ts
|
|
966
|
-
│ │ │ ├── ls.ts
|
|
967
|
-
│ │ │ ├── lsp_query.ts
|
|
968
|
-
│ │ │ ├── mcp_resources.ts
|
|
969
|
-
│ │ │ ├── message.ts
|
|
970
|
-
│ │ │ ├── notebook_edit.ts
|
|
971
|
-
│ │ │ ├── plan_mode_tools.ts
|
|
972
|
-
│ │ │ ├── poll_mailbox.ts
|
|
973
|
-
│ │ │ ├── readLines.ts
|
|
974
|
-
│ │ │ ├── repl.ts
|
|
975
|
-
│ │ │ ├── search_web.ts
|
|
976
|
-
│ │ │ ├── send_message.ts
|
|
977
|
-
│ │ │ ├── session_cron.ts
|
|
978
|
-
│ │ │ ├── shell_command.ts
|
|
979
|
-
│ │ │ ├── signal_mailbox.ts
|
|
980
|
-
│ │ │ ├── task_boundary.ts
|
|
981
|
-
│ │ │ ├── task_output.ts
|
|
982
|
-
│ │ │ ├── task_tools.ts
|
|
983
|
-
│ │ │ ├── todo.ts
|
|
984
|
-
│ │ │ ├── view_file_outline.ts
|
|
985
|
-
│ │ │ └── web_fetch.ts
|
|
986
|
-
│ │ ├── types/
|
|
987
|
-
│ │ │ └── index.ts
|
|
988
|
-
│ │ └── utils/
|
|
989
|
-
│ │ ├── blumamd.ts # BluMa markdown utilities
|
|
990
|
-
│ │ ├── coordinator_prompt.ts # Coordinator mode playbook
|
|
991
|
-
│ │ ├── logger.ts # Logging utilities
|
|
992
|
-
│ │ ├── update_check.ts
|
|
993
|
-
│ │ └── user_message_images.ts
|
|
994
|
-
│ └── ui/
|
|
995
|
-
│ ├── App.tsx # Main UI component
|
|
996
|
-
│ ├── BlumaSession.tsx # Session component (v0.1.84+)
|
|
997
|
-
│ ├── Asci/
|
|
998
|
-
│ │ └── AsciiArt.ts
|
|
999
|
-
│ ├── components/ # 35+ UI components
|
|
1000
|
-
│ │ ├── AnimatedBorder.tsx
|
|
1001
|
-
│ │ ├── AskUserQuestionPrompt.tsx
|
|
1002
|
-
│ │ ├── AssistantMessageDisplay.tsx
|
|
1003
|
-
│ │ ├── BlumaBottomDock.tsx # Bottom dock (v0.1.84+)
|
|
1004
|
-
│ │ ├── BlumaShell.tsx # Shell container (v0.1.84+)
|
|
1005
|
-
│ │ ├── BlumaTranscript.tsx # Message transcript (v0.1.84+)
|
|
1006
|
-
│ │ ├── BlumaViewport.tsx # Viewport container (v0.1.84+)
|
|
1007
|
-
│ │ ├── BlumaWorkersOverlay.tsx # Workers overlay (v0.1.84+)
|
|
1008
|
-
│ │ ├── CollapsibleResult.tsx
|
|
1009
|
-
│ │ ├── ConfirmationPrompt.tsx # Permission confirmation dialog
|
|
1010
|
-
│ │ ├── CtrlOToExpand.tsx # Ctrl+O expansion (v0.1.84+)
|
|
1011
|
-
│ │ ├── EditToolDiffPanel.tsx # Diff preview for edits
|
|
1012
|
-
│ │ ├── ErrorMessage.tsx
|
|
1013
|
-
│ │ ├── ExpandedPreviewBlock.tsx
|
|
1014
|
-
│ │ ├── FilePathLink.tsx # File path links (v0.1.84+)
|
|
1015
|
-
│ │ ├── HighlightedCode.tsx # Syntax highlighting (v0.1.84+)
|
|
1016
|
-
│ │ ├── InputPrompt.tsx # User input
|
|
1017
|
-
│ │ ├── InteractiveMenu.tsx # Interactive menu component
|
|
1018
|
-
│ │ ├── MarkdownRenderer.tsx
|
|
1019
|
-
│ │ ├── ProgressBar.tsx
|
|
1020
|
-
│ │ ├── ReasoningDisplay.tsx # LLM reasoning
|
|
1021
|
-
│ │ ├── SessionStats.tsx
|
|
1022
|
-
│ │ ├── SimpleDiff.tsx
|
|
1023
|
-
│ │ ├── SlashCommands.tsx # 30+ commands
|
|
1024
|
-
│ │ ├── StartupUpdateGate.tsx # Update check gate
|
|
1025
|
-
│ │ ├── StatusNotification.tsx
|
|
1026
|
-
│ │ ├── StreamingText.tsx # Live text output
|
|
1027
|
-
│ │ ├── TaskDisplay.tsx
|
|
1028
|
-
│ │ ├── TodoPlanDisplay.tsx # Task visualization
|
|
1029
|
-
│ │ ├── ToolCallDisplay.tsx
|
|
1030
|
-
│ │ ├── ToolInvocationBlock.tsx
|
|
1031
|
-
│ │ ├── ToolResultCard.tsx # Structured results
|
|
1032
|
-
│ │ ├── ToolResultDisplay.tsx
|
|
1033
|
-
│ │ ├── TypewriterText.tsx
|
|
1034
|
-
│ │ ├── UpdateNotice.tsx
|
|
1035
|
-
│ │ ├── WorkerOverlay.tsx # Worker status overlay
|
|
1036
|
-
│ │ ├── WorkerStatusList.tsx # Active workers list
|
|
1037
|
-
│ │ ├── WorkerTranscript.tsx # Worker conversation transcript
|
|
1038
|
-
│ │ ├── WorkingTimer.tsx # Work duration timer
|
|
1039
|
-
│ │ ├── WorkingShimmerText.tsx # Shimmer text effect
|
|
1040
|
-
│ │ ├── streamingTextFlush.ts
|
|
1041
|
-
│ │ ├── toolCallRenderers.tsx
|
|
1042
|
-
│ │ └── slash-commands/ # Slash command renderers
|
|
1043
|
-
│ │ ├── SessionLivePanel.tsx
|
|
1044
|
-
│ │ ├── SlashCommands.types.ts
|
|
1045
|
-
│ │ ├── commandHelpers.tsx
|
|
1046
|
-
│ │ ├── constants.ts
|
|
1047
|
-
│ │ └── renderers/
|
|
1048
|
-
│ │ ├── index.ts
|
|
1049
|
-
│ │ ├── configRenderers.tsx
|
|
1050
|
-
│ │ ├── infoRenderers.tsx
|
|
1051
|
-
│ │ ├── permissionRenderers.tsx
|
|
1052
|
-
│ │ ├── pluginRenderers.tsx
|
|
1053
|
-
│ │ ├── sessionRenderers.tsx
|
|
1054
|
-
│ │ ├── staticRenderers.tsx
|
|
1055
|
-
│ │ ├── taskRenderers.tsx
|
|
1056
|
-
│ │ └── threadRenderers.tsx # Thread renderers (v0.1.84+)
|
|
1057
|
-
│ ├── constants/
|
|
1058
|
-
│ │ ├── historyLayout.ts # History layout constants
|
|
1059
|
-
│ │ ├── inputPaste.ts # Input paste constants
|
|
1060
|
-
│ │ ├── toolUiPreview.ts # Tool UI preview constants
|
|
1061
|
-
│ │ └── toolUiSymbols.ts # Tool UI symbols
|
|
1062
|
-
│ ├── hooks/
|
|
1063
|
-
│ │ ├── useAtCompletion.ts # Completion hook
|
|
1064
|
-
│ │ ├── useBlumaSessionRuntime.tsx # Session runtime hook (v0.1.84+)
|
|
1065
|
-
│ │ └── useWorkerProgress.ts # Worker progress hook
|
|
1066
|
-
│ ├── prompts/
|
|
1067
|
-
│ │ └── initCommandPrompt.ts # Init command prompt
|
|
1068
|
-
│ ├── theme/
|
|
1069
|
-
│ │ ├── blumaTerminal.ts
|
|
1070
|
-
│ │ ├── themes.ts # Theme definitions
|
|
1071
|
-
│ │ └── m3Layout.tsx # Material Design 3 layout
|
|
1072
|
-
│ └── utils/
|
|
1073
|
-
│ ├── clipboardImage.ts
|
|
1074
|
-
│ ├── editToolDiffUtils.ts
|
|
1075
|
-
│ ├── expandPreviewHotkey.ts
|
|
1076
|
-
│ ├── expandablePreviewStore.ts
|
|
1077
|
-
│ ├── formatTurnDurationMs.ts
|
|
1078
|
-
│ ├── inlineImageInputLabels.ts
|
|
1079
|
-
│ ├── pathDisplay.ts
|
|
1080
|
-
│ ├── shellToolNames.ts
|
|
1081
|
-
│ ├── slashRegistry.ts
|
|
1082
|
-
│ ├── terminalTitle.ts # Terminal title keeper
|
|
1083
|
-
│ ├── toolActionLabels.ts # Tool action labels
|
|
1084
|
-
│ ├── toolDisplayLabels.ts # Tool display labels
|
|
1085
|
-
│ ├── toolInvocationPairing.ts
|
|
1086
|
-
│ ├── toolResultStatusStore.ts
|
|
1087
|
-
│ ├── update_message.ts
|
|
1088
|
-
│ ├── useSimpleInputBuffer.ts
|
|
1089
|
-
│ └── vim_engine.ts # Vim mode engine
|
|
1090
|
-
├── main.ts # Entry point
|
|
1091
|
-
└── types/
|
|
1092
|
-
└── semver-functions.d.ts
|
|
1093
|
-
```
|
|
314
|
+
### Session Tools (3)
|
|
315
|
+
`cronCreate`, `cronList`, `cronDelete`
|
|
1094
316
|
|
|
1095
317
|
---
|
|
1096
318
|
|
|
1097
|
-
##
|
|
1098
|
-
|
|
1099
|
-
```bash
|
|
1100
|
-
npm test # Run all tests
|
|
1101
|
-
npm run test:watch # Watch mode
|
|
1102
|
-
npm run test:parallel # Parallel execution
|
|
1103
|
-
npm run test:parallel:fast # Fast mode with 8 workers
|
|
1104
|
-
```
|
|
1105
|
-
|
|
1106
|
-
### Test Structure
|
|
319
|
+
## 🎨 UI Components
|
|
1107
320
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
├── plugin_registry.spec.ts # Plugin loading and lifecycle
|
|
1118
|
-
├── session_registry.spec.ts # Session management
|
|
1119
|
-
├── session_manager.spec.ts # Session lifecycle
|
|
1120
|
-
├── tool_execution_policy.spec.ts # Safe vs dangerous tool decisions
|
|
1121
|
-
├── diagnostics.spec.ts # System diagnostics
|
|
1122
|
-
├── runtime_config.spec.ts # Runtime configuration
|
|
1123
|
-
├── slash_routing.spec.ts # Slash command routing
|
|
1124
|
-
├── subagents_flow.integration.spec.ts # Subagent coordination
|
|
1125
|
-
├── prompt_builder.spec.ts # Prompt engineering
|
|
1126
|
-
├── token_counter.spec.ts # Token counting
|
|
1127
|
-
├── coding_memory.spec.ts # Persistent memory
|
|
1128
|
-
├── web_fetch.spec.ts # Web fetching
|
|
1129
|
-
├── workspace_snapshot.spec.ts # Workspace analysis
|
|
1130
|
-
├── ui_*.spec.ts(x) # UI component tests
|
|
1131
|
-
├── llm_stream_partial.spec.ts # LLM streaming partial handling
|
|
1132
|
-
├── llm_errors.spec.ts # LLM error handling
|
|
1133
|
-
├── context_manager_sanitize.spec.ts # Context sanitization
|
|
1134
|
-
├── coordinator-worker-mailbox.integration.spec.ts # Mailbox system
|
|
1135
|
-
├── jest-resolver.cjs # Jest resolver configuration
|
|
1136
|
-
└── ... # Additional integration and unit tests
|
|
1137
|
-
```
|
|
321
|
+
- **BlumaShell**: Main application shell with header and footer
|
|
322
|
+
- **BlumaViewport**: Scrollable transcript view
|
|
323
|
+
- **BlumaTranscript**: Message rendering with syntax highlighting
|
|
324
|
+
- **BlumaBottomDock**: Status bar and controls
|
|
325
|
+
- **BlumaWorkersOverlay**: Worker status visualization
|
|
326
|
+
- **WorkingShimmerText**: Animated working state indicator
|
|
327
|
+
- **FilePathLink**: Clickable file paths
|
|
328
|
+
- **HighlightedCode**: Syntax-highlighted code blocks
|
|
329
|
+
- **CtrlOToExpand**: Expandable content indicator
|
|
1138
330
|
|
|
1139
331
|
---
|
|
1140
332
|
|
|
1141
|
-
##
|
|
1142
|
-
|
|
1143
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
333
|
+
## 🔐 Security
|
|
1144
334
|
|
|
1145
|
-
|
|
335
|
+
- **Sandbox Policy**: Blocks dangerous commands (`rm -rf /`, `sudo`, etc.)
|
|
336
|
+
- **Permission Modes**: Configurable auto-approve vs confirmation
|
|
337
|
+
- **Input Validation**: JSON argument validation for tool calls
|
|
338
|
+
- **Error Handling**: User-friendly error messages with hints
|
|
339
|
+
- **Rate Limiting**: Web search and external API rate limiting
|
|
1146
340
|
|
|
1147
|
-
|
|
1148
|
-
2. Create a branch: `feat/add-feature` or `fix/bug-description`
|
|
1149
|
-
3. Make changes following the style guide
|
|
1150
|
-
4. Add/update tests
|
|
1151
|
-
5. Ensure build passes: `npm run build && npm test`
|
|
1152
|
-
6. Open a Pull Request
|
|
341
|
+
---
|
|
1153
342
|
|
|
1154
|
-
|
|
343
|
+
## 📦 Package Info
|
|
1155
344
|
|
|
1156
|
-
-
|
|
1157
|
-
- 2
|
|
1158
|
-
-
|
|
1159
|
-
-
|
|
345
|
+
- **Name**: `@nomad-e/bluma-cli`
|
|
346
|
+
- **Version**: `0.2.3`
|
|
347
|
+
- **License**: Apache 2.0
|
|
348
|
+
- **Engine**: Node.js >= 20
|
|
349
|
+
- **Type**: ES Modules
|
|
350
|
+
- **Main**: `dist/main.js`
|
|
351
|
+
- **Bin**: `bluma`
|
|
1160
352
|
|
|
1161
353
|
---
|
|
1162
354
|
|
|
1163
|
-
##
|
|
355
|
+
## 🤝 Community
|
|
1164
356
|
|
|
1165
|
-
|
|
357
|
+
- **Issues**: Report bugs and suggest features on GitHub
|
|
358
|
+
- **Discussions**: Open questions and community discussions
|
|
359
|
+
- **Contributions**: See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
1166
360
|
|
|
1167
361
|
---
|
|
1168
362
|
|
|
1169
|
-
##
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
- **Documentation**: This README + `docs/` directory
|
|
1173
|
-
- **Author & Architect**: Alex Fonseca (conceived and architected BluMa)
|
|
1174
|
-
- **npm Package**: [@nomad-e/bluma-cli](https://www.npmjs.com/package/@nomad-e/bluma-cli)
|
|
1175
|
-
|
|
1176
|
-
### Runtime Modules
|
|
1177
|
-
|
|
1178
|
-
BluMa's runtime layer provides enterprise-grade orchestration:
|
|
1179
|
-
|
|
1180
|
-
| Module | Purpose | Key Features |
|
|
1181
|
-
|--------|---------|--------------|
|
|
1182
|
-
| `task_store.ts` | Task lifecycle | PLANNING → EXECUTION → VERIFICATION phases, persistence |
|
|
1183
|
-
| `thread_manager.ts` | Thread management | Multi-thread conversations, context isolation |
|
|
1184
|
-
| `hook_registry.ts` | Event system | Tool calls, decisions, state changes |
|
|
1185
|
-
| `plugin_registry.ts` | Plugin system | Load from `.bluma/plugins/`, lifecycle management |
|
|
1186
|
-
| `session_registry.ts` | Multi-session | Process health monitoring, session isolation |
|
|
1187
|
-
| `mailbox_registry.ts` | Communication | Bidirectional coordinator-worker messaging |
|
|
1188
|
-
| `worker_context.ts` | Worker isolation | AsyncLocalStorage-based context |
|
|
1189
|
-
| `permission_rules.ts` | Permissions | Granular allow/deny rules |
|
|
1190
|
-
| `sandbox_policy.ts` | Safety | Safe vs dangerous tool classification |
|
|
1191
|
-
| `tool_execution_policy.ts` | Execution rules | Auto-approve, confirm, block decisions |
|
|
1192
|
-
| `diagnostics.ts` | System snapshots | Tasks, hooks, plugins, sessions overview |
|
|
1193
|
-
| `session_view.ts` | Session monitoring | Log streaming, status display |
|
|
1194
|
-
| `native_tool_catalog.ts` | Tool registry | Discovery and metadata |
|
|
1195
|
-
| `runtime_config.ts` | Settings | Runtime configuration management |
|
|
1196
|
-
| `feature_flags.ts` | Feature gates | Opt-in features via env or settings |
|
|
1197
|
-
| `plan_mode_session.ts` | Plan mode | Forces confirmation for edits/writes |
|
|
1198
|
-
| `tool_auto_approve.ts` | Auto-approve | Effective approve rules |
|
|
1199
|
-
| `tool_orchestration.ts` | Parallel reads | Eligibility for parallel execution |
|
|
1200
|
-
| `tool_permission_classifier` | Tool classification | Classify tool invocations |
|
|
1201
|
-
| `plugin_runtime.ts` | Plugin execution | Plugin runtime context |
|
|
1202
|
-
|
|
1203
|
-
### UI Components
|
|
1204
|
-
|
|
1205
|
-
Key UI components that power the rich terminal experience:
|
|
1206
|
-
|
|
1207
|
-
| Component | Purpose |
|
|
1208
|
-
|-----------|---------|
|
|
1209
|
-
| `BlumaSession.tsx` | Main session component with event handling |
|
|
1210
|
-
| `BlumaShell.tsx` | Shell container for layout |
|
|
1211
|
-
| `BlumaViewport.tsx` | Viewport container for responsive layout |
|
|
1212
|
-
| `BlumaTranscript.tsx` | Message transcript display |
|
|
1213
|
-
| `BlumaBottomDock.tsx` | Bottom dock for status and controls |
|
|
1214
|
-
| `BlumaWorkersOverlay.tsx` | Overlay for worker status |
|
|
1215
|
-
| `EditToolDiffPanel.tsx` | Side-by-side diff previews before edits |
|
|
1216
|
-
| `ToolResultCard.tsx` | Structured tool output display |
|
|
1217
|
-
| `SlashCommands.tsx` | Command palette and help |
|
|
1218
|
-
| `StreamingText.tsx` | Live text output with typing effects |
|
|
1219
|
-
| `ReasoningDisplay.tsx` | LLM reasoning visualization |
|
|
1220
|
-
| `TodoPlanDisplay.tsx` | Task list visualization |
|
|
1221
|
-
| `SessionStats.tsx` | Session metrics and status |
|
|
1222
|
-
| `AnimatedBorder.tsx` | Visual feedback for active elements |
|
|
1223
|
-
| `CollapsibleResult.tsx` | Expandable result sections |
|
|
1224
|
-
| `ProgressBar.tsx` | Progress indicators |
|
|
1225
|
-
| `AskUserQuestionPrompt.tsx` | Multiple-choice question UI |
|
|
1226
|
-
| `ToolInvocationBlock.tsx` | Tool call visualization |
|
|
1227
|
-
| `AssistantMessageDisplay.tsx` | Assistant message formatting |
|
|
1228
|
-
| `CtrlOToExpand.tsx` | Ctrl+O expansion for previews |
|
|
1229
|
-
| `FilePathLink.tsx` | Clickable file path links |
|
|
1230
|
-
| `HighlightedCode.tsx` | Syntax highlighted code blocks |
|
|
1231
|
-
| `WorkingShimmerText.tsx` | Shimmer text effect for loading states |
|
|
363
|
+
## 📄 License
|
|
364
|
+
|
|
365
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
|
1232
366
|
|
|
1233
367
|
---
|
|
1234
368
|
|
|
1235
369
|
<p align="center">
|
|
1236
|
-
<sub>Built with ❤️ by NomadEngenuity</sub>
|
|
370
|
+
<sub>Built with ❤️ by <a href="https://github.com/Nomad-e">NomadEngenuity</a></sub>
|
|
1237
371
|
</p>
|