@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 +181 -1
- package/dist/ast-grep-napi.linux-x64-gnu-qdwfscvp.node +0 -0
- package/dist/ast-grep-napi.linux-x64-musl-qnd01z8b.node +0 -0
- package/dist/index.js +2160 -219
- package/dist/mcp/pare-search.d.ts +13 -0
- package/dist/services/vector-memory.d.ts +85 -0
- package/dist/tools/agent-booster.d.ts +48 -0
- package/dist/tools/ast-grep-native.d.ts +18 -0
- package/dist/tools/hive-doctor.d.ts +6 -0
- package/dist/tools/vector-memory.d.ts +10 -0
- package/package.json +6 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LocalMcpConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @paretools/search MCP for structured code search
|
|
4
|
+
*
|
|
5
|
+
* Wraps ripgrep and fd with typed JSON output.
|
|
6
|
+
* Part of the Pare suite of MCP servers.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - 65-95% token reduction vs raw CLI output
|
|
10
|
+
* - Structured, schema-validated JSON
|
|
11
|
+
* - search, find, count tools
|
|
12
|
+
*/
|
|
13
|
+
export declare const pareSearchMcp: LocalMcpConfig;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Memory Service
|
|
3
|
+
*
|
|
4
|
+
* Enhanced memory system using @sparkleideas/memory for:
|
|
5
|
+
* - HNSW indexing for fast similarity search
|
|
6
|
+
* - Vector embeddings for semantic search
|
|
7
|
+
* - Hybrid SQLite + AgentDB backend
|
|
8
|
+
*
|
|
9
|
+
* Falls back to simple file-based storage if @sparkleideas/memory unavailable.
|
|
10
|
+
*/
|
|
11
|
+
export interface MemoryMetadata {
|
|
12
|
+
type?: 'decision' | 'learning' | 'preference' | 'blocker' | 'context' | 'pattern';
|
|
13
|
+
scope?: string;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
source?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface VectorMemoryEntry {
|
|
18
|
+
id: string;
|
|
19
|
+
content: string;
|
|
20
|
+
embedding?: number[];
|
|
21
|
+
metadata: MemoryMetadata;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SearchResult {
|
|
26
|
+
id: string;
|
|
27
|
+
content: string;
|
|
28
|
+
score: number;
|
|
29
|
+
metadata: MemoryMetadata;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Initialize vector memory with lazy loading
|
|
33
|
+
*/
|
|
34
|
+
declare function initMemory(options?: {
|
|
35
|
+
indexPath?: string;
|
|
36
|
+
dimensions?: number;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Add a memory entry to the vector index
|
|
40
|
+
*/
|
|
41
|
+
export declare function addMemory(content: string, metadata?: MemoryMetadata): Promise<{
|
|
42
|
+
id: string;
|
|
43
|
+
success: boolean;
|
|
44
|
+
fallback?: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Search memories using vector similarity
|
|
48
|
+
*/
|
|
49
|
+
export declare function searchMemories(query: string, options?: {
|
|
50
|
+
limit?: number;
|
|
51
|
+
type?: string;
|
|
52
|
+
scope?: string;
|
|
53
|
+
minScore?: number;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
results: SearchResult[];
|
|
56
|
+
fallback?: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Get a memory entry by ID
|
|
60
|
+
*/
|
|
61
|
+
export declare function getMemory(id: string): Promise<VectorMemoryEntry | null>;
|
|
62
|
+
/**
|
|
63
|
+
* Delete a memory entry
|
|
64
|
+
*/
|
|
65
|
+
export declare function deleteMemory(id: string): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Get vector memory status
|
|
68
|
+
*/
|
|
69
|
+
export declare function getMemoryStatus(): Promise<{
|
|
70
|
+
available: boolean;
|
|
71
|
+
type: 'vector' | 'fallback';
|
|
72
|
+
stats?: {
|
|
73
|
+
total: number;
|
|
74
|
+
byType?: Record<string, number>;
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
77
|
+
export declare const VectorMemoryService: {
|
|
78
|
+
init: typeof initMemory;
|
|
79
|
+
add: typeof addMemory;
|
|
80
|
+
search: typeof searchMemories;
|
|
81
|
+
get: typeof getMemory;
|
|
82
|
+
delete: typeof deleteMemory;
|
|
83
|
+
status: typeof getMemoryStatus;
|
|
84
|
+
};
|
|
85
|
+
export default VectorMemoryService;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Agent Booster Tool
|
|
4
|
+
*
|
|
5
|
+
* Ultra-fast code editing engine using @sparkleideas/agent-booster.
|
|
6
|
+
* - 52x faster than Morph LLM
|
|
7
|
+
* - FREE (no API key required)
|
|
8
|
+
* - Rust+WASM powered
|
|
9
|
+
*
|
|
10
|
+
* Uses lazy loading - only initializes when first called.
|
|
11
|
+
*/
|
|
12
|
+
export interface AgentBoosterEdit {
|
|
13
|
+
path: string;
|
|
14
|
+
oldContent: string;
|
|
15
|
+
newContent: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AgentBoosterResult {
|
|
18
|
+
success: boolean;
|
|
19
|
+
path: string;
|
|
20
|
+
applied?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
fallback?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Apply edit with fallback to native implementation
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyCodeEdit(edit: AgentBoosterEdit): Promise<AgentBoosterResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Check if agent-booster is available
|
|
30
|
+
*/
|
|
31
|
+
export declare function isBoosterAvailable(): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Get booster status
|
|
34
|
+
*/
|
|
35
|
+
export declare function getBoosterStatus(): Promise<{
|
|
36
|
+
available: boolean;
|
|
37
|
+
version?: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const hiveCodeEditTool: ToolDefinition;
|
|
40
|
+
/**
|
|
41
|
+
* Lazy edit marker tool - uses agent-booster's special marker syntax
|
|
42
|
+
* Allows partial code snippets with // ... existing code ... placeholders
|
|
43
|
+
*/
|
|
44
|
+
export declare const hiveLazyEditTool: ToolDefinition;
|
|
45
|
+
/**
|
|
46
|
+
* Tool to check agent-booster status
|
|
47
|
+
*/
|
|
48
|
+
export declare const hiveBoosterStatusTool: ToolDefinition;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Check if ast-grep is available
|
|
4
|
+
*/
|
|
5
|
+
export declare function isAstGrepAvailable(): Promise<boolean>;
|
|
6
|
+
/**
|
|
7
|
+
* Get ast-grep status
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAstGrepStatus(): Promise<{
|
|
10
|
+
available: boolean;
|
|
11
|
+
version?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const astGrepDumpSyntaxTreeTool: ToolDefinition;
|
|
14
|
+
export declare const astGrepTestMatchCodeRuleTool: ToolDefinition;
|
|
15
|
+
export declare const astGrepFindCodeTool: ToolDefinition;
|
|
16
|
+
export declare const astGrepScanCodeTool: ToolDefinition;
|
|
17
|
+
export declare const astGrepRewriteCodeTool: ToolDefinition;
|
|
18
|
+
export declare const astGrepAnalyzeImportsTool: ToolDefinition;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Vector Memory Tools
|
|
4
|
+
*
|
|
5
|
+
* Enhanced memory search using vector embeddings and HNSW indexing.
|
|
6
|
+
* Falls back to simple text search if @sparkleideas/memory unavailable.
|
|
7
|
+
*/
|
|
8
|
+
export declare const hiveVectorSearchTool: ToolDefinition;
|
|
9
|
+
export declare const hiveVectorAddTool: ToolDefinition;
|
|
10
|
+
export declare const hiveVectorStatusTool: ToolDefinition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hung319/opencode-hive",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
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",
|
|
@@ -42,7 +42,11 @@
|
|
|
42
42
|
"grep-mcp": "^1.1.0",
|
|
43
43
|
"@notprolands/ast-grep-mcp": "^1.1.1",
|
|
44
44
|
"@upstash/context7-mcp": "^2.1.0",
|
|
45
|
-
"exa-mcp-server": "^3.1.5"
|
|
45
|
+
"exa-mcp-server": "^3.1.5",
|
|
46
|
+
"@sparkleideas/agent-booster": "^0.2.3",
|
|
47
|
+
"@sparkleideas/memory": "^3.5.2",
|
|
48
|
+
"@ast-grep/napi": "^0.41.1",
|
|
49
|
+
"@paretools/search": "^0.15.0"
|
|
46
50
|
},
|
|
47
51
|
"devDependencies": {
|
|
48
52
|
"hive-core": "workspace:*",
|