@nomad-e/bluma-cli 0.1.60 → 0.1.61
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 +196 -2
- package/dist/main.js +3767 -1407
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Credit:** BluMa was conceived and architected by **Alex Fonseca**.
|
|
10
10
|
|
|
11
|
-
**Current Version:** 0.1.
|
|
11
|
+
**Current Version:** 0.1.60
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -280,12 +280,16 @@ BluMa includes **40+ built-in tools** organized by category:
|
|
|
280
280
|
| `send_command_input` | Send input to running commands' stdin |
|
|
281
281
|
| `kill_command` | Terminate running commands |
|
|
282
282
|
|
|
283
|
-
### Agent Coordination
|
|
283
|
+
### Agent Coordination (v0.1.60+)
|
|
284
284
|
| Tool | Description |
|
|
285
285
|
|------|-------------|
|
|
286
286
|
| `spawn_agent` | Create background worker agents |
|
|
287
287
|
| `wait_agent` | Wait for agent completion |
|
|
288
288
|
| `list_agents` | List active/completed agents |
|
|
289
|
+
| `send_message` | Send follow-up to running worker (continue without re-spawn) |
|
|
290
|
+
| `list_mailbox_messages` | Read messages from workers (progress, permission requests) |
|
|
291
|
+
| `signal_mailbox` | Send ack/nack/progress signals to workers |
|
|
292
|
+
| `poll_mailbox` | Poll mailbox for new messages (legacy polling mode) |
|
|
289
293
|
|
|
290
294
|
### Task & Project Management
|
|
291
295
|
| Tool | Description |
|
|
@@ -331,6 +335,8 @@ BluMa includes **40+ built-in tools** organized by category:
|
|
|
331
335
|
| Tool | Description |
|
|
332
336
|
|------|-------------|
|
|
333
337
|
| `lsp_query` | LSP go-to-definition or references (TS/JS) |
|
|
338
|
+
| `repl` | Interactive code execution (Python, Node, Bash) |
|
|
339
|
+
| `task_output` | Read task output in real-time |
|
|
334
340
|
|
|
335
341
|
### Plan Mode
|
|
336
342
|
| Tool | Description |
|
|
@@ -340,6 +346,185 @@ BluMa includes **40+ built-in tools** organized by category:
|
|
|
340
346
|
|
|
341
347
|
---
|
|
342
348
|
|
|
349
|
+
## New Features in v0.1.60
|
|
350
|
+
|
|
351
|
+
### Mailbox System (Bidirectional Communication)
|
|
352
|
+
**Push-based communication** between coordinator and workers using EventEmitter:
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
// Coordinator sends follow-up to running worker
|
|
356
|
+
send_message({
|
|
357
|
+
to: "worker-session-id",
|
|
358
|
+
message: "Fix the null pointer in src/auth/validate.ts:42..."
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
// Coordinator reads messages from workers
|
|
362
|
+
list_mailbox_messages({
|
|
363
|
+
from: "worker-session-id",
|
|
364
|
+
type: "progress_update",
|
|
365
|
+
unreadOnly: true
|
|
366
|
+
})
|
|
367
|
+
|
|
368
|
+
// Workers send progress/permission requests
|
|
369
|
+
signal_mailbox({
|
|
370
|
+
sessionId: "coordinator-session-id",
|
|
371
|
+
type: "progress",
|
|
372
|
+
data: { percent: 50 }
|
|
373
|
+
})
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**Key Benefits:**
|
|
377
|
+
- **No polling needed** - EventEmitter pushes messages instantly
|
|
378
|
+
- **Permission requests** - Workers can request permissions mid-execution
|
|
379
|
+
- **Progress tracking** - Real-time progress updates
|
|
380
|
+
- **Follow-up commands** - Continue workers without re-spawn
|
|
381
|
+
|
|
382
|
+
### Permission System
|
|
383
|
+
**Granular permission rules** with allow/deny patterns:
|
|
384
|
+
|
|
385
|
+
```typescript
|
|
386
|
+
// Check permission for tool invocation
|
|
387
|
+
permissionRulesEngine.checkPermission('edit_tool', {
|
|
388
|
+
filepath: '/src/auth/validate.ts'
|
|
389
|
+
})
|
|
390
|
+
// Returns: 'allow' | 'deny' | 'ask'
|
|
391
|
+
|
|
392
|
+
// Add custom rule
|
|
393
|
+
permissionRulesEngine.addRule({
|
|
394
|
+
type: 'allow',
|
|
395
|
+
toolPattern: 'read_*',
|
|
396
|
+
pathPattern: '**/*.md',
|
|
397
|
+
scope: 'global'
|
|
398
|
+
})
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**Features:**
|
|
402
|
+
- **Tool patterns** - Wildcard matching for tool names
|
|
403
|
+
- **Path patterns** - Glob-based file path matching
|
|
404
|
+
- **Command patterns** - Shell command pattern matching
|
|
405
|
+
- **Scopes** - global, workspace, session-level rules
|
|
406
|
+
|
|
407
|
+
### Worker Context Isolation
|
|
408
|
+
**AsyncLocalStorage-based context** for in-process workers:
|
|
409
|
+
|
|
410
|
+
```typescript
|
|
411
|
+
import { runWithWorkerContext, createWorkerContext } from './worker_context'
|
|
412
|
+
|
|
413
|
+
const ctx = createWorkerContext({
|
|
414
|
+
workerType: 'research',
|
|
415
|
+
name: 'auth-investigation'
|
|
416
|
+
})
|
|
417
|
+
|
|
418
|
+
await runWithWorkerContext(ctx, async () => {
|
|
419
|
+
// Worker code runs with isolated context
|
|
420
|
+
// Shares LLM/MCP clients but has unique context
|
|
421
|
+
})
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### REPL Tool
|
|
425
|
+
**Interactive code execution** for rapid prototyping:
|
|
426
|
+
|
|
427
|
+
```typescript
|
|
428
|
+
repl({
|
|
429
|
+
language: 'python',
|
|
430
|
+
code: `
|
|
431
|
+
import pandas as pd
|
|
432
|
+
df = pd.DataFrame({'a': [1, 2, 3]})
|
|
433
|
+
print(df.sum())
|
|
434
|
+
`,
|
|
435
|
+
timeout: 30000
|
|
436
|
+
})
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Supported languages:** Python, Node.js, Bash
|
|
440
|
+
|
|
441
|
+
### Context Auto-Compact
|
|
442
|
+
**Automatic context compression** with history anchoring:
|
|
443
|
+
|
|
444
|
+
- **Budget:** 240k tokens
|
|
445
|
+
- **Trigger:** 70% of budget (168k tokens)
|
|
446
|
+
- **Strategy:** Compress old turns, keep last 10 turns complete
|
|
447
|
+
- **Anchor:** System message with compressed summary
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
const { messages, newAnchor } = await createApiContextWindow(
|
|
451
|
+
fullHistory,
|
|
452
|
+
currentAnchor,
|
|
453
|
+
compressedTurnSliceCount,
|
|
454
|
+
llmService,
|
|
455
|
+
userContext
|
|
456
|
+
)
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
### Session Memory Extractor
|
|
460
|
+
**Automatic memory extraction** from conversations:
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
const memories = await memoryExtractor.extractMemoriesFromSession(messages)
|
|
464
|
+
// Returns: ExtractedMemory[] with type, content, confidence, tags
|
|
465
|
+
|
|
466
|
+
// Get relevant memories for query
|
|
467
|
+
const relevant = await memoryExtractor.getRelevantMemories('authentication')
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Memory types:** codebase_knowledge, preference, decision, pattern, bugfix, architecture
|
|
471
|
+
|
|
472
|
+
### Vim Mode
|
|
473
|
+
**Vim-like keybindings** in input prompt:
|
|
474
|
+
|
|
475
|
+
- **Modes:** normal, insert, visual, command
|
|
476
|
+
- **Motions:** h/j/k/l, w/b, 0/$, g/G
|
|
477
|
+
- **Operators:** d (delete), c (change), y (yank)
|
|
478
|
+
- **Commands:** `:w`, `:q`, etc.
|
|
479
|
+
|
|
480
|
+
```typescript
|
|
481
|
+
// Enable vim mode
|
|
482
|
+
/vim toggle
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Themes System
|
|
486
|
+
**6 configurable UI themes:**
|
|
487
|
+
|
|
488
|
+
| Theme | Description |
|
|
489
|
+
|-------|-------------|
|
|
490
|
+
| `default` | Classic dark terminal |
|
|
491
|
+
| `dracula` | Purple accents |
|
|
492
|
+
| `github` | GitHub Dark mode |
|
|
493
|
+
| `monokai` | Vibrant green accents |
|
|
494
|
+
| `nord` | Arctic blue palette |
|
|
495
|
+
| `tokyo` | Tokyo Night blue-purple |
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
/theme dracula
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Init Subagent
|
|
502
|
+
**Automatic BluMa.md generation:**
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
/init
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Scans repository and generates comprehensive codebase documentation including:
|
|
509
|
+
- Project overview
|
|
510
|
+
- Technology stack detection
|
|
511
|
+
- Directory structure with annotations
|
|
512
|
+
- Key configs and scripts
|
|
513
|
+
- CLI commands
|
|
514
|
+
- Operational notes
|
|
515
|
+
|
|
516
|
+
### Coding Memory Consolidate
|
|
517
|
+
**Deduplication of coding memories:**
|
|
518
|
+
|
|
519
|
+
```typescript
|
|
520
|
+
consolidateCodingMemoryFile()
|
|
521
|
+
// Merges duplicate entries by normalized text
|
|
522
|
+
// Keeps oldest ID, merges tags
|
|
523
|
+
// Creates backup .bak file
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
343
528
|
## Skills System
|
|
344
529
|
|
|
345
530
|
Skills are **self-contained knowledge modules** that extend BluMa with domain expertise. They use **Progressive Disclosure** to manage context efficiently.
|
|
@@ -501,6 +686,8 @@ Built-in terminal commands (type `/` to see all):
|
|
|
501
686
|
| `/kill <id>` | Send SIGTERM to a session by id |
|
|
502
687
|
| `/tasks [list\|add\|complete\|update\|remove\|clear]` | Manage task list |
|
|
503
688
|
| `/plan [show\|start\|end]` | Manage the active task boundary |
|
|
689
|
+
| `/compact` | Manually compact conversation context |
|
|
690
|
+
| `/export` | Export conversation as markdown |
|
|
504
691
|
|
|
505
692
|
### Agent
|
|
506
693
|
| Command | Description |
|
|
@@ -529,6 +716,13 @@ Built-in terminal commands (type `/` to see all):
|
|
|
529
716
|
| `/tools [grep]` | List native tools (optional filter) |
|
|
530
717
|
| `/mcp [fs]` | List MCP tools (optional filter) |
|
|
531
718
|
| `/features` | Feature flags: `/features` or `/features <key> on\|off` |
|
|
719
|
+
| `/debug-workers` | Show running workers, PIDs, memory, and event bus state |
|
|
720
|
+
| `/cost` | Show session cost and token usage |
|
|
721
|
+
| `/memory` | Manage session memories |
|
|
722
|
+
| `/stats` | Detailed session statistics |
|
|
723
|
+
| `/theme` | Change UI theme |
|
|
724
|
+
| `/keybindings` | Show or configure keybindings |
|
|
725
|
+
| `/vim` | Toggle vim mode |
|
|
532
726
|
|
|
533
727
|
### Help
|
|
534
728
|
| Command | Description |
|