@hung319/opencode-hive 1.4.2 → 1.4.4

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 CHANGED
@@ -187,7 +187,21 @@ Hive uses a config file at `~/.config/opencode/agent_hive.json`. You can customi
187
187
  | `websearch` | Web search via [Exa AI](https://exa.ai). Real-time web searches and content scraping. | Set `EXA_API_KEY` env var |
188
188
  | `context7` | Library documentation lookup via [Context7](https://context7.com). Query up-to-date docs for any programming library. | None |
189
189
  | `grep_app` | GitHub code search via [grep.app](https://grep.app). Find real-world code examples from public repositories. | None |
190
- | `ast_grep` | AST-aware code search and replace via [ast-grep](https://ast-grep.github.io). Pattern matching across 25+ languages. | None (runs via npx) |
190
+ | `ast_grep` | Native NAPI-powered AST analysis. Pattern matching across 25+ languages. | Built-in (no npx needed) |
191
+ | `pare_search` | Structured ripgrep/fd search with 65-95% token reduction. | None (runs via npx) |
192
+
193
+ #### Native ast-grep Tools
194
+
195
+ Instead of MCP-based ast-grep, this plugin includes native tools using `@ast-grep/napi`:
196
+
197
+ | Tool | Description |
198
+ |------|-------------|
199
+ | `ast_grep_dump_syntax_tree` | Dump code's syntax structure for debugging |
200
+ | `ast_grep_test_match_code_rule` | Test code against YAML rules |
201
+ | `ast_grep_find_code` | Find code matching patterns in project |
202
+ | `ast_grep_scan_code` | Scan for TypeScript bugs and best practices |
203
+ | `ast_grep_rewrite_code` | Transform/refactor code with AST patterns |
204
+ | `ast_grep_analyze_imports` | Analyze import usage in codebase |
191
205
 
192
206
  ### Per-Agent Skills
193
207
 
@@ -374,6 +388,172 @@ Override models for specific agents:
374
388
  }
375
389
  ```
376
390
 
391
+ ## Agent Booster Tools
392
+
393
+ Ultra-fast code editing powered by Rust+WASM. **52x faster than Morph LLM, FREE (no API key required).**
394
+
395
+ ### Tools
396
+
397
+ | Tool | Description |
398
+ |------|-------------|
399
+ | `hive_code_edit` | Ultra-fast code editing with automatic fallback |
400
+ | `hive_lazy_edit` | Edit with `// ... existing code ...` markers |
401
+ | `hive_booster_status` | Check agent-booster availability |
402
+
403
+ ### Usage
404
+
405
+ ```typescript
406
+ // Edit with old/new content
407
+ hive_code_edit({
408
+ path: "src/index.ts",
409
+ oldContent: "const old = 'value';",
410
+ newContent: "const new = 'updated';"
411
+ })
412
+ ```
413
+
414
+ ### Lazy Edit Example
415
+
416
+ ```typescript
417
+ // Use markers for partial code
418
+ hive_lazy_edit({
419
+ path: "src/component.tsx",
420
+ snippet: `// ... existing code ...
421
+ export const newFeature = () => { ... };
422
+ // ... existing code ...`
423
+ })
424
+ ```
425
+
426
+ ### Configuration
427
+
428
+ ```json
429
+ {
430
+ "agentBooster": {
431
+ "enabled": false,
432
+ "serverUrl": "http://localhost:3001",
433
+ "serverPort": 3001
434
+ }
435
+ }
436
+ ```
437
+
438
+ ## Vector Memory Tools
439
+
440
+ Semantic memory search powered by HNSW indexing. Find memories by meaning, not just keywords.
441
+
442
+ ### Tools
443
+
444
+ | Tool | Description |
445
+ |------|-------------|
446
+ | `hive_vector_search` | Semantic search across memories |
447
+ | `hive_vector_add` | Add memory with vector indexing |
448
+ | `hive_vector_status` | Check vector memory status |
449
+
450
+ ### Memory Types
451
+
452
+ - `decision`: Architectural decisions, design choices
453
+ - `learning`: Insights, discoveries, patterns found
454
+ - `preference`: User preferences, coding style
455
+ - `blocker`: Known blockers, workarounds
456
+ - `context`: Important context about the project
457
+ - `pattern`: Code patterns, recurring solutions
458
+
459
+ ### Usage
460
+
461
+ ```typescript
462
+ // Add a memory
463
+ hive_vector_add({
464
+ content: "Use async/await instead of .then() chains",
465
+ type: "learning",
466
+ scope: "async-patterns",
467
+ tags: ["javascript", "best-practice"]
468
+ })
469
+
470
+ // Search memories
471
+ hive_vector_search({
472
+ query: "async patterns JavaScript",
473
+ type: "learning",
474
+ limit: 10
475
+ })
476
+ ```
477
+
478
+ ### Configuration
479
+
480
+ ```json
481
+ {
482
+ "vectorMemory": {
483
+ "enabled": false,
484
+ "indexPath": "~/.config/opencode/hive/vector-index",
485
+ "dimensions": 384
486
+ }
487
+ }
488
+ ```
489
+
490
+ ## Hive Doctor
491
+
492
+ System health check and optimization advisor. Checks dependencies, features, and provides recommendations.
493
+
494
+ ### Tools
495
+
496
+ | Tool | Description |
497
+ |------|-------------|
498
+ | `hive_doctor` | Full health check with recommendations |
499
+ | `hive_doctor_quick` | Quick status summary |
500
+
501
+ ### Usage
502
+
503
+ ```typescript
504
+ // Full health check
505
+ hive_doctor()
506
+
507
+ // Quick check
508
+ hive_doctor_quick()
509
+ ```
510
+
511
+ ### What it checks
512
+
513
+ 1. **Dependencies** - Optional packages installed and working
514
+ - @sparkleideas/agent-booster
515
+ - @sparkleideas/memory
516
+ - @ast-grep/napi
517
+ - @paretools/search
518
+ - @upstash/context7-mcp
519
+ - exa-mcp-server
520
+
521
+ 2. **Optimizations** - Features enabled in config
522
+ - snip (60-90% token reduction)
523
+ - vector memory (semantic search)
524
+ - agent booster (fast code editing)
525
+ - Docker sandbox (isolated environments)
526
+ - native ast-grep (fast AST analysis)
527
+ - pare-search (structured search)
528
+
529
+ 3. **Recommendations** - Suggestions for improvements
530
+
531
+ ### Example Output
532
+
533
+ ```json
534
+ {
535
+ "status": "warning",
536
+ "checks": {
537
+ "dependencies": {
538
+ "total": 6,
539
+ "installed": 4,
540
+ "packages": [...]
541
+ },
542
+ "optimizations": {
543
+ "total": 6,
544
+ "enabled": 3,
545
+ "features": [...]
546
+ }
547
+ },
548
+ "recommendations": [
549
+ "Enable vector memory for semantic search across memories"
550
+ ],
551
+ "quickFixes": [
552
+ { "command": "npm install @sparkleideas/memory", "description": "Install vector-memory" }
553
+ ]
554
+ }
555
+ ```
556
+
377
557
  ## License
378
558
 
379
559
  MIT with Commons Clause — Free for personal and non-commercial use. See [LICENSE](../../LICENSE) for details.