agentic-flow 2.0.1-alpha.8 → 2.0.1-alpha.9
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/package.json +3 -1
- package/scripts/postinstall.js +68 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-flow",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.9",
|
|
4
4
|
"description": "Production-ready AI agent orchestration platform with 66 specialized agents, 213 MCP tools, ReasoningBank learning memory, and autonomous multi-agent swarms. Built by @ruvnet with Claude Agent SDK, neural networks, memory persistence, GitHub integration, and distributed consensus protocols.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
"@anthropic-ai/claude-agent-sdk": "^0.1.5",
|
|
144
144
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
145
145
|
"@google/genai": "^1.22.0",
|
|
146
|
+
"@ruvector/core": "^0.1.29",
|
|
146
147
|
"@ruvector/router": "^0.1.25",
|
|
147
148
|
"@ruvector/ruvllm": "^0.2.3",
|
|
148
149
|
"@ruvector/tiny-dancer": "^0.1.15",
|
|
@@ -169,6 +170,7 @@
|
|
|
169
170
|
"@types/uuid": "^11.0.0",
|
|
170
171
|
"@types/ws": "^8.18.1",
|
|
171
172
|
"@vitest/coverage-v8": "^4.0.14",
|
|
173
|
+
"patch-package": "^8.0.1",
|
|
172
174
|
"tsx": "^4.19.0",
|
|
173
175
|
"typescript": "^5.6.3",
|
|
174
176
|
"vitest": "^4.0.14"
|
package/scripts/postinstall.js
CHANGED
|
@@ -90,8 +90,76 @@ function applyPatch() {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
function applyRuvectorPatch() {
|
|
94
|
+
console.log('[agentic-flow] Checking ruvector installation...');
|
|
95
|
+
|
|
96
|
+
const possiblePaths = [
|
|
97
|
+
join(__dirname, '..', 'node_modules', 'ruvector'),
|
|
98
|
+
join(__dirname, '..', '..', 'ruvector'),
|
|
99
|
+
join(__dirname, '..', '..', '..', 'ruvector')
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
let ruvectorPath = null;
|
|
103
|
+
for (const path of possiblePaths) {
|
|
104
|
+
if (existsSync(join(path, 'package.json'))) {
|
|
105
|
+
try {
|
|
106
|
+
const pkg = JSON.parse(readFileSync(join(path, 'package.json'), 'utf8'));
|
|
107
|
+
if (pkg.name === 'ruvector') {
|
|
108
|
+
ruvectorPath = path;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
} catch {}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!ruvectorPath) {
|
|
116
|
+
console.log('[agentic-flow] ⚠️ ruvector not found - skipping patch');
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const indexPath = join(ruvectorPath, 'dist', 'index.js');
|
|
121
|
+
if (!existsSync(indexPath)) {
|
|
122
|
+
console.log('[agentic-flow] ⚠️ ruvector dist/index.js not found');
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
let content = readFileSync(indexPath, 'utf8');
|
|
127
|
+
|
|
128
|
+
// Check if already patched
|
|
129
|
+
if (content.includes('implementation.VectorDb')) {
|
|
130
|
+
console.log('[agentic-flow] ✅ ruvector already patched');
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Fix VectorDB vs VectorDb case mismatch
|
|
135
|
+
const oldCheck = `if (typeof implementation.VectorDB !== 'function') {
|
|
136
|
+
throw new Error('Native module loaded but VectorDB not found');
|
|
137
|
+
}`;
|
|
138
|
+
|
|
139
|
+
const newCheck = `if (typeof implementation.VectorDB !== 'function' && typeof implementation.VectorDb !== 'function') {
|
|
140
|
+
throw new Error('Native module loaded but VectorDB not found');
|
|
141
|
+
}
|
|
142
|
+
// Normalize: if VectorDb exists but VectorDB doesn't, alias it
|
|
143
|
+
if (!implementation.VectorDB && implementation.VectorDb) {
|
|
144
|
+
implementation.VectorDB = implementation.VectorDb;
|
|
145
|
+
}`;
|
|
146
|
+
|
|
147
|
+
if (content.includes(oldCheck)) {
|
|
148
|
+
content = content.replace(oldCheck, newCheck);
|
|
149
|
+
try {
|
|
150
|
+
writeFileSync(indexPath, content, 'utf8');
|
|
151
|
+
console.log('[agentic-flow] ✅ ruvector VectorDB/VectorDb case mismatch fixed');
|
|
152
|
+
} catch (error) {
|
|
153
|
+
console.log('[agentic-flow] ⚠️ Could not write ruvector patch (read-only)');
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
console.log('[agentic-flow] ⚠️ ruvector patch pattern not found');
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
93
160
|
try {
|
|
94
161
|
applyPatch();
|
|
162
|
+
applyRuvectorPatch();
|
|
95
163
|
} catch (error) {
|
|
96
164
|
console.log('[agentic-flow] ⚠️ Postinstall patch failed:', error.message);
|
|
97
165
|
console.log('[agentic-flow] Runtime patch will attempt fix on first use');
|