@nomad-e/bluma-cli 0.1.59 → 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.
Files changed (3) hide show
  1. package/README.md +199 -3
  2. package/dist/main.js +3811 -1400
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -6,7 +6,9 @@
6
6
 
7
7
  **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.
8
8
 
9
- **Current Version:** 0.1.55
9
+ > **Credit:** BluMa was conceived and architected by **Alex Fonseca**.
10
+
11
+ **Current Version:** 0.1.60
10
12
 
11
13
  ---
12
14
 
@@ -278,12 +280,16 @@ BluMa includes **40+ built-in tools** organized by category:
278
280
  | `send_command_input` | Send input to running commands' stdin |
279
281
  | `kill_command` | Terminate running commands |
280
282
 
281
- ### Agent Coordination
283
+ ### Agent Coordination (v0.1.60+)
282
284
  | Tool | Description |
283
285
  |------|-------------|
284
286
  | `spawn_agent` | Create background worker agents |
285
287
  | `wait_agent` | Wait for agent completion |
286
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) |
287
293
 
288
294
  ### Task & Project Management
289
295
  | Tool | Description |
@@ -329,6 +335,8 @@ BluMa includes **40+ built-in tools** organized by category:
329
335
  | Tool | Description |
330
336
  |------|-------------|
331
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 |
332
340
 
333
341
  ### Plan Mode
334
342
  | Tool | Description |
@@ -338,6 +346,185 @@ BluMa includes **40+ built-in tools** organized by category:
338
346
 
339
347
  ---
340
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
+
341
528
  ## Skills System
342
529
 
343
530
  Skills are **self-contained knowledge modules** that extend BluMa with domain expertise. They use **Progressive Disclosure** to manage context efficiently.
@@ -499,6 +686,8 @@ Built-in terminal commands (type `/` to see all):
499
686
  | `/kill <id>` | Send SIGTERM to a session by id |
500
687
  | `/tasks [list\|add\|complete\|update\|remove\|clear]` | Manage task list |
501
688
  | `/plan [show\|start\|end]` | Manage the active task boundary |
689
+ | `/compact` | Manually compact conversation context |
690
+ | `/export` | Export conversation as markdown |
502
691
 
503
692
  ### Agent
504
693
  | Command | Description |
@@ -527,6 +716,13 @@ Built-in terminal commands (type `/` to see all):
527
716
  | `/tools [grep]` | List native tools (optional filter) |
528
717
  | `/mcp [fs]` | List MCP tools (optional filter) |
529
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 |
530
726
 
531
727
  ### Help
532
728
  | Command | Description |
@@ -777,7 +973,7 @@ Apache 2.0 — see [LICENSE](LICENSE) for details.
777
973
 
778
974
  - **Issues**: [GitHub Issues](https://github.com/nomad-e/bluma-cli/issues)
779
975
  - **Documentation**: This README + `docs/` directory
780
- - **Author**: Alex Fonseca
976
+ - **Author & Architect**: Alex Fonseca (conceived and architected BluMa)
781
977
  - **npm Package**: [@nomad-e/bluma-cli](https://www.npmjs.com/package/@nomad-e/bluma-cli)
782
978
 
783
979
  ### Runtime Modules (v0.1.41+)