@hung319/opencode-hive 1.6.0 → 1.6.1
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 +6 -3
- package/bin/doctor.ts +3 -0
- package/dist/index.js +8 -1
- package/dist/mcp/ast-grep.d.ts +7 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ npm install @hung319/opencode-hive
|
|
|
71
71
|
2. Set `EXA_API_KEY` to enable `websearch_exa` (optional).
|
|
72
72
|
3. Restart OpenCode.
|
|
73
73
|
|
|
74
|
-
This enables tools like `grep_app_searchGitHub`, `context7_query-docs`, and `
|
|
74
|
+
This enables tools like `grep_app_searchGitHub`, `context7_query-docs`, `websearch_web_search_exa`, and `ast_grep_search`.
|
|
75
75
|
|
|
76
76
|
## The Workflow
|
|
77
77
|
|
|
@@ -206,7 +206,7 @@ Hive uses a config file at `~/.config/opencode/agent_hive.json`. You can customi
|
|
|
206
206
|
{
|
|
207
207
|
"$schema": "https://raw.githubusercontent.com/hung319/agent-hive/main/packages/opencode-hive/schema/agent_hive.schema.json",
|
|
208
208
|
"disableSkills": ["brainstorming", "writing-plans"],
|
|
209
|
-
"disableMcps": ["websearch", "
|
|
209
|
+
"disableMcps": ["websearch", "ast_grep"]
|
|
210
210
|
}
|
|
211
211
|
```
|
|
212
212
|
|
|
@@ -230,6 +230,7 @@ Hive uses a config file at `~/.config/opencode/agent_hive.json`. You can customi
|
|
|
230
230
|
| `websearch` | Web search via [Exa AI](https://exa.ai). Real-time web searches and content scraping. | Set `EXA_API_KEY` env var |
|
|
231
231
|
| `context7` | Library documentation lookup via [Context7](https://context7.com). Query up-to-date docs for any programming library. | None |
|
|
232
232
|
| `grep_app` | GitHub code search via [grep.app](https://grep.app). Find real-world code examples from public repositories. | None |
|
|
233
|
+
| `ast_grep` | AST-based pattern matching and code analysis. | None (runs via npx) |
|
|
233
234
|
| `pare_search` | Structured ripgrep/fd search with 65-95% token reduction. | None (runs via npx) |
|
|
234
235
|
| `veil` | Code discovery and intelligent retrieval. | None (runs via npx) |
|
|
235
236
|
|
|
@@ -546,6 +547,7 @@ bunx @hung319/opencode-hive doctor
|
|
|
546
547
|
### What it checks
|
|
547
548
|
|
|
548
549
|
1. **Dependencies** - npm packages installed?
|
|
550
|
+
- Core: `@ast-grep/napi`, `@notprolands/ast-grep-mcp`
|
|
549
551
|
- Agent: `@sparkleideas/agent-booster`, `@sparkleideas/memory`
|
|
550
552
|
- MCPs: `@paretools/search`, `@upstash/context7-mcp`, `exa-mcp-server`, `grep-mcp`
|
|
551
553
|
- Blockchain: `btca`, `opencode-model-selector`
|
|
@@ -556,11 +558,12 @@ bunx @hung319/opencode-hive doctor
|
|
|
556
558
|
- `scip-typescript` - TypeScript indexer
|
|
557
559
|
- `veil` - Code discovery
|
|
558
560
|
- `btca` - BTC/A blockchain agent (from npmx.dev)
|
|
561
|
+
- `ast-grep` - AST-based pattern matching
|
|
559
562
|
|
|
560
563
|
3. **Config** - Features enabled?
|
|
561
564
|
- snip, vectorMemory, agentBooster
|
|
562
565
|
- sandbox mode
|
|
563
|
-
- MCPs: veil, pare_search
|
|
566
|
+
- MCPs: ast_grep, veil, pare_search
|
|
564
567
|
|
|
565
568
|
### Example Output
|
|
566
569
|
|
package/bin/doctor.ts
CHANGED
|
@@ -231,6 +231,8 @@ function runDoctor(): DoctorOutput {
|
|
|
231
231
|
|
|
232
232
|
// Check dependencies
|
|
233
233
|
const deps = [
|
|
234
|
+
'@ast-grep/napi',
|
|
235
|
+
'@notprolands/ast-grep-mcp',
|
|
234
236
|
'@sparkleideas/agent-booster',
|
|
235
237
|
'@sparkleideas/memory',
|
|
236
238
|
'@paretools/search',
|
|
@@ -252,6 +254,7 @@ function runDoctor(): DoctorOutput {
|
|
|
252
254
|
{ name: 'veil', command: '@ushiradineth/veil', description: 'Code discovery and retrieval' },
|
|
253
255
|
{ name: 'scip-typescript', command: '@sourcegraph/scip-typescript', description: 'TypeScript SCIP indexer' },
|
|
254
256
|
{ name: 'btca', command: 'btca', description: 'BTC/A agent for blockchain tasks' },
|
|
257
|
+
{ name: 'ast-grep', command: '@notprolands/ast-grep-mcp', description: 'AST-based pattern matching' },
|
|
255
258
|
];
|
|
256
259
|
|
|
257
260
|
output.checks.cliTools.items = cliTools.map(t => checkCliTool(t.name, t.command, t.description));
|
package/dist/index.js
CHANGED
|
@@ -19852,13 +19852,20 @@ var veilMcp = {
|
|
|
19852
19852
|
command: ["npx", "-y", "@ushiradineth/veil@latest", "mcp", "server"]
|
|
19853
19853
|
};
|
|
19854
19854
|
|
|
19855
|
+
// src/mcp/ast-grep.ts
|
|
19856
|
+
var astGrepMcp = {
|
|
19857
|
+
type: "local",
|
|
19858
|
+
command: ["npx", "-y", "@notprolands/ast-grep-mcp"]
|
|
19859
|
+
};
|
|
19860
|
+
|
|
19855
19861
|
// src/mcp/index.ts
|
|
19856
19862
|
var allBuiltinMcps = {
|
|
19857
19863
|
websearch: websearchMcp,
|
|
19858
19864
|
context7: context7Mcp,
|
|
19859
19865
|
grep_app: grepAppMcp,
|
|
19860
19866
|
pare_search: pareSearchMcp,
|
|
19861
|
-
veil: veilMcp
|
|
19867
|
+
veil: veilMcp,
|
|
19868
|
+
ast_grep: astGrepMcp
|
|
19862
19869
|
};
|
|
19863
19870
|
var createBuiltinMcps = (disabledMcps = []) => {
|
|
19864
19871
|
const disabled = new Set(disabledMcps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hung319/opencode-hive",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Agent Hive - from vibe coding to hive coding",
|
|
6
6
|
"license": "MIT WITH Commons-Clause",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"clean": "rm -rf dist",
|
|
33
33
|
"generate-skills": "bun run scripts/generate-skills.ts",
|
|
34
|
-
"build": "npm run clean && npm run generate-skills && bun build src/index.ts --outdir dist --target node --format esm --packages=bundle && tsc --emitDeclarationOnly",
|
|
34
|
+
"build": "npm run clean && npm run generate-skills && bun build src/index.ts --outdir dist --target node --format esm --packages=bundle --external @ast-grep/napi && tsc --emitDeclarationOnly",
|
|
35
35
|
"dev": "opencode plugin dev",
|
|
36
36
|
"test": "bun test"
|
|
37
37
|
},
|
|
@@ -39,10 +39,12 @@
|
|
|
39
39
|
"@opencode-ai/plugin": ">=0.13.7"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@ast-grep/napi": "^0.41.1",
|
|
42
43
|
"simple-git": "^3.27.0"
|
|
43
44
|
},
|
|
44
45
|
"optionalDependencies": {
|
|
45
46
|
"grep-mcp": "^1.1.0",
|
|
47
|
+
"@notprolands/ast-grep-mcp": "^1.1.1",
|
|
46
48
|
"@upstash/context7-mcp": "^2.1.0",
|
|
47
49
|
"exa-mcp-server": "^3.1.5",
|
|
48
50
|
"@sparkleideas/agent-booster": "^0.2.3",
|