@sparkleideas/plugins 3.0.0-alpha.10
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 +401 -0
- package/__tests__/collection-manager.test.ts +332 -0
- package/__tests__/dependency-graph.test.ts +434 -0
- package/__tests__/enhanced-plugin-registry.test.ts +488 -0
- package/__tests__/plugin-registry.test.ts +368 -0
- package/__tests__/ruvector-bridge.test.ts +2429 -0
- package/__tests__/ruvector-integration.test.ts +1602 -0
- package/__tests__/ruvector-migrations.test.ts +1099 -0
- package/__tests__/ruvector-quantization.test.ts +846 -0
- package/__tests__/ruvector-streaming.test.ts +1088 -0
- package/__tests__/sdk.test.ts +325 -0
- package/__tests__/security.test.ts +348 -0
- package/__tests__/utils/ruvector-test-utils.ts +860 -0
- package/examples/plugin-creator/index.ts +636 -0
- package/examples/plugin-creator/plugin-creator.test.ts +312 -0
- package/examples/ruvector/README.md +288 -0
- package/examples/ruvector/attention-patterns.ts +394 -0
- package/examples/ruvector/basic-usage.ts +288 -0
- package/examples/ruvector/docker-compose.yml +75 -0
- package/examples/ruvector/gnn-analysis.ts +501 -0
- package/examples/ruvector/hyperbolic-hierarchies.ts +557 -0
- package/examples/ruvector/init-db.sql +119 -0
- package/examples/ruvector/quantization.ts +680 -0
- package/examples/ruvector/self-learning.ts +447 -0
- package/examples/ruvector/semantic-search.ts +576 -0
- package/examples/ruvector/streaming-large-data.ts +507 -0
- package/examples/ruvector/transactions.ts +594 -0
- package/examples/ruvector-plugins/hook-pattern-library.ts +486 -0
- package/examples/ruvector-plugins/index.ts +79 -0
- package/examples/ruvector-plugins/intent-router.ts +354 -0
- package/examples/ruvector-plugins/mcp-tool-optimizer.ts +424 -0
- package/examples/ruvector-plugins/reasoning-bank.ts +657 -0
- package/examples/ruvector-plugins/ruvector-plugins.test.ts +518 -0
- package/examples/ruvector-plugins/semantic-code-search.ts +498 -0
- package/examples/ruvector-plugins/shared/index.ts +20 -0
- package/examples/ruvector-plugins/shared/vector-utils.ts +257 -0
- package/examples/ruvector-plugins/sona-learning.ts +445 -0
- package/package.json +97 -0
- package/src/collections/collection-manager.ts +661 -0
- package/src/collections/index.ts +56 -0
- package/src/collections/official/index.ts +1040 -0
- package/src/core/base-plugin.ts +416 -0
- package/src/core/plugin-interface.ts +215 -0
- package/src/hooks/index.ts +685 -0
- package/src/index.ts +378 -0
- package/src/integrations/agentic-flow.ts +743 -0
- package/src/integrations/index.ts +88 -0
- package/src/integrations/ruvector/ARCHITECTURE.md +1245 -0
- package/src/integrations/ruvector/attention-advanced.ts +1040 -0
- package/src/integrations/ruvector/attention-executor.ts +782 -0
- package/src/integrations/ruvector/attention-mechanisms.ts +757 -0
- package/src/integrations/ruvector/attention.ts +1063 -0
- package/src/integrations/ruvector/gnn.ts +3050 -0
- package/src/integrations/ruvector/hyperbolic.ts +1948 -0
- package/src/integrations/ruvector/index.ts +394 -0
- package/src/integrations/ruvector/migrations/001_create_extension.sql +135 -0
- package/src/integrations/ruvector/migrations/002_create_vector_tables.sql +259 -0
- package/src/integrations/ruvector/migrations/003_create_indices.sql +328 -0
- package/src/integrations/ruvector/migrations/004_create_functions.sql +598 -0
- package/src/integrations/ruvector/migrations/005_create_attention_functions.sql +654 -0
- package/src/integrations/ruvector/migrations/006_create_gnn_functions.sql +728 -0
- package/src/integrations/ruvector/migrations/007_create_hyperbolic_functions.sql +762 -0
- package/src/integrations/ruvector/migrations/index.ts +35 -0
- package/src/integrations/ruvector/migrations/migrations.ts +647 -0
- package/src/integrations/ruvector/quantization.ts +2036 -0
- package/src/integrations/ruvector/ruvector-bridge.ts +2000 -0
- package/src/integrations/ruvector/self-learning.ts +2376 -0
- package/src/integrations/ruvector/streaming.ts +1737 -0
- package/src/integrations/ruvector/types.ts +1945 -0
- package/src/providers/index.ts +643 -0
- package/src/registry/dependency-graph.ts +568 -0
- package/src/registry/enhanced-plugin-registry.ts +994 -0
- package/src/registry/plugin-registry.ts +604 -0
- package/src/sdk/index.ts +563 -0
- package/src/security/index.ts +594 -0
- package/src/types/index.ts +446 -0
- package/src/workers/index.ts +700 -0
- package/tmp.json +0 -0
- package/tsconfig.json +25 -0
- package/vitest.config.ts +23 -0
|
@@ -0,0 +1,1040 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official Plugin Collections
|
|
3
|
+
*
|
|
4
|
+
* Pre-built collections of plugins for common use cases.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { PluginCollection, PluginCollectionEntry } from '../collection-manager.js';
|
|
8
|
+
import { PluginBuilder } from '../../sdk/index.js';
|
|
9
|
+
import { HookEvent, HookPriority } from '../../types/index.js';
|
|
10
|
+
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Core Plugins
|
|
13
|
+
// ============================================================================
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Session management plugin - handles session lifecycle hooks.
|
|
17
|
+
*/
|
|
18
|
+
export const sessionPlugin = new PluginBuilder('session-manager', '3.0.0')
|
|
19
|
+
.withDescription('Manages session lifecycle with auto-save and restore')
|
|
20
|
+
.withAuthor('Claude Flow')
|
|
21
|
+
.withTags(['core', 'session', 'persistence'])
|
|
22
|
+
.withHooks([
|
|
23
|
+
{
|
|
24
|
+
event: HookEvent.SessionStart,
|
|
25
|
+
priority: HookPriority.Critical,
|
|
26
|
+
name: 'session-init',
|
|
27
|
+
handler: async (ctx) => {
|
|
28
|
+
return { success: true, data: { sessionId: Date.now().toString() } };
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
event: HookEvent.SessionEnd,
|
|
33
|
+
priority: HookPriority.Critical,
|
|
34
|
+
name: 'session-cleanup',
|
|
35
|
+
handler: async (ctx) => {
|
|
36
|
+
return { success: true };
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
])
|
|
40
|
+
.build();
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Memory coordination plugin - coordinates memory across agents.
|
|
44
|
+
*/
|
|
45
|
+
export const memoryCoordinatorPlugin = new PluginBuilder('memory-coordinator', '3.0.0')
|
|
46
|
+
.withDescription('Coordinates memory access and synchronization across agents')
|
|
47
|
+
.withAuthor('Claude Flow')
|
|
48
|
+
.withTags(['core', 'memory', 'coordination'])
|
|
49
|
+
.withHooks([
|
|
50
|
+
{
|
|
51
|
+
event: HookEvent.PreMemoryStore,
|
|
52
|
+
priority: HookPriority.High,
|
|
53
|
+
name: 'memory-validate',
|
|
54
|
+
handler: async (ctx) => {
|
|
55
|
+
return { success: true };
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
event: HookEvent.PostMemoryStore,
|
|
60
|
+
priority: HookPriority.Normal,
|
|
61
|
+
name: 'memory-sync',
|
|
62
|
+
handler: async (ctx) => {
|
|
63
|
+
return { success: true };
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
])
|
|
67
|
+
.build();
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Event bus plugin - provides pub/sub messaging.
|
|
71
|
+
*/
|
|
72
|
+
export const eventBusPlugin = new PluginBuilder('event-bus', '3.0.0')
|
|
73
|
+
.withDescription('Pub/sub event messaging system')
|
|
74
|
+
.withAuthor('Claude Flow')
|
|
75
|
+
.withTags(['core', 'events', 'messaging'])
|
|
76
|
+
.withMCPTools([
|
|
77
|
+
{
|
|
78
|
+
name: 'emit-event',
|
|
79
|
+
description: 'Emit an event to subscribers',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
event: { type: 'string', description: 'Event name' },
|
|
84
|
+
data: { type: 'object', description: 'Event data' },
|
|
85
|
+
},
|
|
86
|
+
required: ['event'],
|
|
87
|
+
},
|
|
88
|
+
handler: async (input) => {
|
|
89
|
+
return {
|
|
90
|
+
content: [{ type: 'text', text: `Event ${input.event} emitted` }],
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
])
|
|
95
|
+
.build();
|
|
96
|
+
|
|
97
|
+
// ============================================================================
|
|
98
|
+
// Development Plugins
|
|
99
|
+
// ============================================================================
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Coder agent plugin - provides coding assistance.
|
|
103
|
+
*/
|
|
104
|
+
export const coderAgentPlugin = new PluginBuilder('coder-agent', '3.0.0')
|
|
105
|
+
.withDescription('AI-powered coding assistance agent')
|
|
106
|
+
.withAuthor('Claude Flow')
|
|
107
|
+
.withTags(['development', 'agent', 'coding'])
|
|
108
|
+
.withAgentTypes([
|
|
109
|
+
{
|
|
110
|
+
type: 'coder',
|
|
111
|
+
name: 'Coder Agent',
|
|
112
|
+
description: 'Writes clean, efficient code following best practices',
|
|
113
|
+
capabilities: ['code-generation', 'refactoring', 'debugging'],
|
|
114
|
+
systemPrompt: 'You are an expert software engineer...',
|
|
115
|
+
model: 'claude-sonnet-4-20250514',
|
|
116
|
+
temperature: 0.3,
|
|
117
|
+
},
|
|
118
|
+
])
|
|
119
|
+
.build();
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Tester agent plugin - provides testing assistance.
|
|
123
|
+
*/
|
|
124
|
+
export const testerAgentPlugin = new PluginBuilder('tester-agent', '3.0.0')
|
|
125
|
+
.withDescription('AI-powered testing and QA agent')
|
|
126
|
+
.withAuthor('Claude Flow')
|
|
127
|
+
.withTags(['development', 'agent', 'testing'])
|
|
128
|
+
.withAgentTypes([
|
|
129
|
+
{
|
|
130
|
+
type: 'tester',
|
|
131
|
+
name: 'Tester Agent',
|
|
132
|
+
description: 'Writes comprehensive tests and validates code quality',
|
|
133
|
+
capabilities: ['unit-testing', 'integration-testing', 'test-coverage'],
|
|
134
|
+
systemPrompt: 'You are an expert QA engineer...',
|
|
135
|
+
model: 'claude-sonnet-4-20250514',
|
|
136
|
+
temperature: 0.2,
|
|
137
|
+
},
|
|
138
|
+
])
|
|
139
|
+
.build();
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Reviewer agent plugin - provides code review.
|
|
143
|
+
*/
|
|
144
|
+
export const reviewerAgentPlugin = new PluginBuilder('reviewer-agent', '3.0.0')
|
|
145
|
+
.withDescription('AI-powered code review agent')
|
|
146
|
+
.withAuthor('Claude Flow')
|
|
147
|
+
.withTags(['development', 'agent', 'review'])
|
|
148
|
+
.withAgentTypes([
|
|
149
|
+
{
|
|
150
|
+
type: 'reviewer',
|
|
151
|
+
name: 'Reviewer Agent',
|
|
152
|
+
description: 'Reviews code for quality, security, and best practices',
|
|
153
|
+
capabilities: ['code-review', 'security-audit', 'performance-review'],
|
|
154
|
+
systemPrompt: 'You are an expert code reviewer...',
|
|
155
|
+
model: 'claude-sonnet-4-20250514',
|
|
156
|
+
temperature: 0.1,
|
|
157
|
+
},
|
|
158
|
+
])
|
|
159
|
+
.build();
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Git integration plugin - provides Git operations.
|
|
163
|
+
*/
|
|
164
|
+
export const gitIntegrationPlugin = new PluginBuilder('git-integration', '3.0.0')
|
|
165
|
+
.withDescription('Git version control integration')
|
|
166
|
+
.withAuthor('Claude Flow')
|
|
167
|
+
.withTags(['development', 'integration', 'git'])
|
|
168
|
+
.withMCPTools([
|
|
169
|
+
{
|
|
170
|
+
name: 'git-status',
|
|
171
|
+
description: 'Get current Git repository status',
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
properties: {
|
|
175
|
+
path: { type: 'string', description: 'Repository path' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
handler: async (input) => {
|
|
179
|
+
return {
|
|
180
|
+
content: [{ type: 'text', text: 'Git status retrieved' }],
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'git-commit',
|
|
186
|
+
description: 'Create a Git commit',
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
properties: {
|
|
190
|
+
message: { type: 'string', description: 'Commit message' },
|
|
191
|
+
files: { type: 'array', items: { type: 'string' }, description: 'Files to commit' },
|
|
192
|
+
},
|
|
193
|
+
required: ['message'],
|
|
194
|
+
},
|
|
195
|
+
handler: async (input) => {
|
|
196
|
+
return {
|
|
197
|
+
content: [{ type: 'text', text: `Commit created: ${input.message}` }],
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
])
|
|
202
|
+
.build();
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Linter plugin - provides code linting.
|
|
206
|
+
*/
|
|
207
|
+
export const linterPlugin = new PluginBuilder('linter', '3.0.0')
|
|
208
|
+
.withDescription('Code linting and style checking')
|
|
209
|
+
.withAuthor('Claude Flow')
|
|
210
|
+
.withTags(['development', 'tool', 'linting'])
|
|
211
|
+
.withHooks([
|
|
212
|
+
{
|
|
213
|
+
event: HookEvent.PreFileWrite,
|
|
214
|
+
priority: HookPriority.Normal,
|
|
215
|
+
name: 'lint-check',
|
|
216
|
+
handler: async (ctx) => {
|
|
217
|
+
// Lint the file before writing
|
|
218
|
+
return { success: true };
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
])
|
|
222
|
+
.build();
|
|
223
|
+
|
|
224
|
+
// ============================================================================
|
|
225
|
+
// Intelligence Plugins
|
|
226
|
+
// ============================================================================
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* SONA integration plugin - self-optimizing neural architecture.
|
|
230
|
+
*/
|
|
231
|
+
export const sonaPlugin = new PluginBuilder('sona-integration', '3.0.0')
|
|
232
|
+
.withDescription('SONA self-optimizing neural architecture integration')
|
|
233
|
+
.withAuthor('Claude Flow')
|
|
234
|
+
.withTags(['intelligence', 'neural', 'learning'])
|
|
235
|
+
.withDependencies(['memory-coordinator@^3.0.0'])
|
|
236
|
+
.withHooks([
|
|
237
|
+
{
|
|
238
|
+
event: HookEvent.PatternDetected,
|
|
239
|
+
priority: HookPriority.High,
|
|
240
|
+
name: 'sona-learn',
|
|
241
|
+
handler: async (ctx) => {
|
|
242
|
+
return { success: true, data: { adapted: true } };
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
])
|
|
246
|
+
.build();
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* ReasoningBank plugin - stores and retrieves reasoning patterns.
|
|
250
|
+
*/
|
|
251
|
+
export const reasoningBankPlugin = new PluginBuilder('reasoning-bank', '3.0.0')
|
|
252
|
+
.withDescription('Pattern storage and retrieval for reasoning')
|
|
253
|
+
.withAuthor('Claude Flow')
|
|
254
|
+
.withTags(['intelligence', 'memory', 'patterns'])
|
|
255
|
+
.withMCPTools([
|
|
256
|
+
{
|
|
257
|
+
name: 'store-reasoning',
|
|
258
|
+
description: 'Store a reasoning pattern',
|
|
259
|
+
inputSchema: {
|
|
260
|
+
type: 'object',
|
|
261
|
+
properties: {
|
|
262
|
+
pattern: { type: 'string', description: 'Pattern identifier' },
|
|
263
|
+
context: { type: 'object', description: 'Pattern context' },
|
|
264
|
+
outcome: { type: 'string', description: 'Pattern outcome' },
|
|
265
|
+
},
|
|
266
|
+
required: ['pattern', 'outcome'],
|
|
267
|
+
},
|
|
268
|
+
handler: async (input) => {
|
|
269
|
+
return {
|
|
270
|
+
content: [{ type: 'text', text: `Pattern ${input.pattern} stored` }],
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'retrieve-reasoning',
|
|
276
|
+
description: 'Retrieve similar reasoning patterns',
|
|
277
|
+
inputSchema: {
|
|
278
|
+
type: 'object',
|
|
279
|
+
properties: {
|
|
280
|
+
query: { type: 'string', description: 'Query context' },
|
|
281
|
+
limit: { type: 'number', description: 'Max results' },
|
|
282
|
+
},
|
|
283
|
+
required: ['query'],
|
|
284
|
+
},
|
|
285
|
+
handler: async (input) => {
|
|
286
|
+
return {
|
|
287
|
+
content: [{ type: 'text', text: 'Retrieved patterns' }],
|
|
288
|
+
};
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
])
|
|
292
|
+
.build();
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Pattern learning plugin - learns from task execution.
|
|
296
|
+
*/
|
|
297
|
+
export const patternLearningPlugin = new PluginBuilder('pattern-learning', '3.0.0')
|
|
298
|
+
.withDescription('Learns patterns from task execution')
|
|
299
|
+
.withAuthor('Claude Flow')
|
|
300
|
+
.withTags(['intelligence', 'learning', 'hooks'])
|
|
301
|
+
.withHooks([
|
|
302
|
+
{
|
|
303
|
+
event: HookEvent.PostTaskComplete,
|
|
304
|
+
priority: HookPriority.Low,
|
|
305
|
+
name: 'learn-from-task',
|
|
306
|
+
handler: async (ctx) => {
|
|
307
|
+
return { success: true };
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
event: HookEvent.TaskFailed,
|
|
312
|
+
priority: HookPriority.Low,
|
|
313
|
+
name: 'learn-from-failure',
|
|
314
|
+
handler: async (ctx) => {
|
|
315
|
+
return { success: true };
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
])
|
|
319
|
+
.build();
|
|
320
|
+
|
|
321
|
+
// ============================================================================
|
|
322
|
+
// Swarm Plugins
|
|
323
|
+
// ============================================================================
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* HiveMind plugin - collective intelligence coordination.
|
|
327
|
+
*/
|
|
328
|
+
export const hiveMindPlugin = new PluginBuilder('hive-mind', '3.0.0')
|
|
329
|
+
.withDescription('Collective intelligence and consensus mechanisms')
|
|
330
|
+
.withAuthor('Claude Flow')
|
|
331
|
+
.withTags(['swarm', 'integration', 'consensus'])
|
|
332
|
+
.withMCPTools([
|
|
333
|
+
{
|
|
334
|
+
name: 'collective-decide',
|
|
335
|
+
description: 'Request collective decision from agents',
|
|
336
|
+
inputSchema: {
|
|
337
|
+
type: 'object',
|
|
338
|
+
properties: {
|
|
339
|
+
question: { type: 'string', description: 'Decision question' },
|
|
340
|
+
options: { type: 'array', items: { type: 'string' }, description: 'Options' },
|
|
341
|
+
threshold: { type: 'number', description: 'Consensus threshold (0-1)' },
|
|
342
|
+
},
|
|
343
|
+
required: ['question', 'options'],
|
|
344
|
+
},
|
|
345
|
+
handler: async (input) => {
|
|
346
|
+
return {
|
|
347
|
+
content: [{ type: 'text', text: 'Decision requested' }],
|
|
348
|
+
};
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
])
|
|
352
|
+
.build();
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Maestro plugin - workflow orchestration.
|
|
356
|
+
*/
|
|
357
|
+
export const maestroPlugin = new PluginBuilder('maestro', '3.0.0')
|
|
358
|
+
.withDescription('Multi-agent workflow orchestration')
|
|
359
|
+
.withAuthor('Claude Flow')
|
|
360
|
+
.withTags(['swarm', 'integration', 'orchestration'])
|
|
361
|
+
.withMCPTools([
|
|
362
|
+
{
|
|
363
|
+
name: 'create-workflow',
|
|
364
|
+
description: 'Create a new workflow',
|
|
365
|
+
inputSchema: {
|
|
366
|
+
type: 'object',
|
|
367
|
+
properties: {
|
|
368
|
+
name: { type: 'string', description: 'Workflow name' },
|
|
369
|
+
steps: { type: 'array', items: { type: 'object' }, description: 'Workflow steps' },
|
|
370
|
+
},
|
|
371
|
+
required: ['name', 'steps'],
|
|
372
|
+
},
|
|
373
|
+
handler: async (input) => {
|
|
374
|
+
return {
|
|
375
|
+
content: [{ type: 'text', text: `Workflow ${input.name} created` }],
|
|
376
|
+
};
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: 'execute-workflow',
|
|
381
|
+
description: 'Execute a workflow',
|
|
382
|
+
inputSchema: {
|
|
383
|
+
type: 'object',
|
|
384
|
+
properties: {
|
|
385
|
+
workflowId: { type: 'string', description: 'Workflow ID' },
|
|
386
|
+
input: { type: 'object', description: 'Workflow input' },
|
|
387
|
+
},
|
|
388
|
+
required: ['workflowId'],
|
|
389
|
+
},
|
|
390
|
+
handler: async (input) => {
|
|
391
|
+
return {
|
|
392
|
+
content: [{ type: 'text', text: `Workflow ${input.workflowId} started` }],
|
|
393
|
+
};
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
])
|
|
397
|
+
.build();
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Consensus plugin - Byzantine fault-tolerant consensus.
|
|
401
|
+
*/
|
|
402
|
+
export const consensusPlugin = new PluginBuilder('consensus', '3.0.0')
|
|
403
|
+
.withDescription('Byzantine fault-tolerant consensus mechanisms')
|
|
404
|
+
.withAuthor('Claude Flow')
|
|
405
|
+
.withTags(['swarm', 'integration', 'consensus', 'byzantine'])
|
|
406
|
+
.withDependencies(['hive-mind@^3.0.0'])
|
|
407
|
+
.build();
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Coordinator agent plugin - swarm coordination.
|
|
411
|
+
*/
|
|
412
|
+
export const coordinatorAgentPlugin = new PluginBuilder('coordinator-agent', '3.0.0')
|
|
413
|
+
.withDescription('Swarm coordination agent')
|
|
414
|
+
.withAuthor('Claude Flow')
|
|
415
|
+
.withTags(['swarm', 'agent', 'coordination'])
|
|
416
|
+
.withAgentTypes([
|
|
417
|
+
{
|
|
418
|
+
type: 'coordinator',
|
|
419
|
+
name: 'Coordinator Agent',
|
|
420
|
+
description: 'Coordinates multi-agent swarm operations',
|
|
421
|
+
capabilities: ['task-distribution', 'progress-tracking', 'conflict-resolution'],
|
|
422
|
+
systemPrompt: 'You are a swarm coordinator...',
|
|
423
|
+
model: 'claude-sonnet-4-20250514',
|
|
424
|
+
temperature: 0.2,
|
|
425
|
+
},
|
|
426
|
+
])
|
|
427
|
+
.build();
|
|
428
|
+
|
|
429
|
+
// ============================================================================
|
|
430
|
+
// Security Plugins
|
|
431
|
+
// ============================================================================
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Input validation plugin - validates all inputs.
|
|
435
|
+
*/
|
|
436
|
+
export const inputValidationPlugin = new PluginBuilder('input-validation', '3.0.0')
|
|
437
|
+
.withDescription('Input validation and sanitization')
|
|
438
|
+
.withAuthor('Claude Flow')
|
|
439
|
+
.withTags(['security', 'hook', 'validation'])
|
|
440
|
+
.withHooks([
|
|
441
|
+
{
|
|
442
|
+
event: HookEvent.PreToolUse,
|
|
443
|
+
priority: HookPriority.Critical,
|
|
444
|
+
name: 'validate-tool-input',
|
|
445
|
+
handler: async (ctx) => {
|
|
446
|
+
// Validate tool inputs
|
|
447
|
+
return { success: true };
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
event: HookEvent.PreCommand,
|
|
452
|
+
priority: HookPriority.Critical,
|
|
453
|
+
name: 'validate-command',
|
|
454
|
+
handler: async (ctx) => {
|
|
455
|
+
// Validate command
|
|
456
|
+
return { success: true };
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
])
|
|
460
|
+
.build();
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Path security plugin - prevents path traversal.
|
|
464
|
+
*/
|
|
465
|
+
export const pathSecurityPlugin = new PluginBuilder('path-security', '3.0.0')
|
|
466
|
+
.withDescription('Path traversal prevention and validation')
|
|
467
|
+
.withAuthor('Claude Flow')
|
|
468
|
+
.withTags(['security', 'hook', 'filesystem'])
|
|
469
|
+
.withHooks([
|
|
470
|
+
{
|
|
471
|
+
event: HookEvent.PreFileWrite,
|
|
472
|
+
priority: HookPriority.Critical,
|
|
473
|
+
name: 'validate-path',
|
|
474
|
+
handler: async (ctx) => {
|
|
475
|
+
// Validate file path
|
|
476
|
+
return { success: true };
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
event: HookEvent.PreFileDelete,
|
|
481
|
+
priority: HookPriority.Critical,
|
|
482
|
+
name: 'validate-delete-path',
|
|
483
|
+
handler: async (ctx) => {
|
|
484
|
+
return { success: true };
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
])
|
|
488
|
+
.build();
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Audit log plugin - logs all operations.
|
|
492
|
+
*/
|
|
493
|
+
export const auditLogPlugin = new PluginBuilder('audit-log', '3.0.0')
|
|
494
|
+
.withDescription('Comprehensive audit logging')
|
|
495
|
+
.withAuthor('Claude Flow')
|
|
496
|
+
.withTags(['security', 'hook', 'audit', 'logging'])
|
|
497
|
+
.withHooks([
|
|
498
|
+
{
|
|
499
|
+
event: HookEvent.PostToolUse,
|
|
500
|
+
priority: HookPriority.Low,
|
|
501
|
+
name: 'log-tool-use',
|
|
502
|
+
async: true,
|
|
503
|
+
handler: async (ctx) => {
|
|
504
|
+
// Log tool usage
|
|
505
|
+
return { success: true };
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
event: HookEvent.PostCommand,
|
|
510
|
+
priority: HookPriority.Low,
|
|
511
|
+
name: 'log-command',
|
|
512
|
+
async: true,
|
|
513
|
+
handler: async (ctx) => {
|
|
514
|
+
// Log command execution
|
|
515
|
+
return { success: true };
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
event: HookEvent.PostFileWrite,
|
|
520
|
+
priority: HookPriority.Low,
|
|
521
|
+
name: 'log-file-write',
|
|
522
|
+
async: true,
|
|
523
|
+
handler: async (ctx) => {
|
|
524
|
+
// Log file write
|
|
525
|
+
return { success: true };
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
])
|
|
529
|
+
.build();
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Security scan plugin - scans for vulnerabilities.
|
|
533
|
+
*/
|
|
534
|
+
export const securityScanPlugin = new PluginBuilder('security-scan', '3.0.0')
|
|
535
|
+
.withDescription('Security vulnerability scanning')
|
|
536
|
+
.withAuthor('Claude Flow')
|
|
537
|
+
.withTags(['security', 'tool', 'scanning'])
|
|
538
|
+
.withMCPTools([
|
|
539
|
+
{
|
|
540
|
+
name: 'scan-code',
|
|
541
|
+
description: 'Scan code for security vulnerabilities',
|
|
542
|
+
inputSchema: {
|
|
543
|
+
type: 'object',
|
|
544
|
+
properties: {
|
|
545
|
+
path: { type: 'string', description: 'Path to scan' },
|
|
546
|
+
depth: { type: 'string', enum: ['quick', 'standard', 'deep'], description: 'Scan depth' },
|
|
547
|
+
},
|
|
548
|
+
required: ['path'],
|
|
549
|
+
},
|
|
550
|
+
handler: async (input) => {
|
|
551
|
+
return {
|
|
552
|
+
content: [{ type: 'text', text: 'Security scan complete' }],
|
|
553
|
+
};
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
])
|
|
557
|
+
.build();
|
|
558
|
+
|
|
559
|
+
// ============================================================================
|
|
560
|
+
// Utility Plugins
|
|
561
|
+
// ============================================================================
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Metrics plugin - collects and reports metrics.
|
|
565
|
+
*/
|
|
566
|
+
export const metricsPlugin = new PluginBuilder('metrics', '3.0.0')
|
|
567
|
+
.withDescription('Performance and usage metrics collection')
|
|
568
|
+
.withAuthor('Claude Flow')
|
|
569
|
+
.withTags(['utility', 'metrics', 'monitoring'])
|
|
570
|
+
.withMCPTools([
|
|
571
|
+
{
|
|
572
|
+
name: 'get-metrics',
|
|
573
|
+
description: 'Get collected metrics',
|
|
574
|
+
inputSchema: {
|
|
575
|
+
type: 'object',
|
|
576
|
+
properties: {
|
|
577
|
+
category: { type: 'string', description: 'Metrics category' },
|
|
578
|
+
timeRange: { type: 'string', description: 'Time range (e.g., "1h", "24h")' },
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
handler: async (input) => {
|
|
582
|
+
return {
|
|
583
|
+
content: [{ type: 'text', text: 'Metrics retrieved' }],
|
|
584
|
+
};
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
])
|
|
588
|
+
.build();
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* Cache plugin - provides caching utilities.
|
|
592
|
+
*/
|
|
593
|
+
export const cachePlugin = new PluginBuilder('cache', '3.0.0')
|
|
594
|
+
.withDescription('Caching utilities for improved performance')
|
|
595
|
+
.withAuthor('Claude Flow')
|
|
596
|
+
.withTags(['utility', 'cache', 'performance'])
|
|
597
|
+
.build();
|
|
598
|
+
|
|
599
|
+
// ============================================================================
|
|
600
|
+
// Database & Vector Plugins
|
|
601
|
+
// ============================================================================
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* RuVector PostgreSQL Bridge plugin - advanced vector database with AI capabilities.
|
|
605
|
+
*
|
|
606
|
+
* Provides integration with @ruvector/postgres-cli including:
|
|
607
|
+
* - 53+ SQL functions for vector/graph operations
|
|
608
|
+
* - 39 attention mechanisms for neural processing
|
|
609
|
+
* - GNN layers for graph-aware queries
|
|
610
|
+
* - Hyperbolic embeddings for hierarchical data
|
|
611
|
+
* - Self-learning query optimization
|
|
612
|
+
*
|
|
613
|
+
* @see ADR-027, ADR-028, ADR-029
|
|
614
|
+
*/
|
|
615
|
+
export const ruvectorPostgresPlugin = new PluginBuilder('ruvector-postgres', '3.0.0')
|
|
616
|
+
.withDescription('RuVector PostgreSQL Bridge - Advanced vector search with attention, GNN, and hyperbolic embeddings')
|
|
617
|
+
.withAuthor('Claude Flow')
|
|
618
|
+
.withTags(['database', 'vector', 'postgresql', 'attention', 'gnn', 'hyperbolic', 'intelligence'])
|
|
619
|
+
.withDependencies(['memory-coordinator'])
|
|
620
|
+
.withMCPTools([
|
|
621
|
+
{
|
|
622
|
+
name: 'ruvector-search',
|
|
623
|
+
description: 'Vector similarity search with 12+ distance metrics (cosine, euclidean, dot, etc.)',
|
|
624
|
+
inputSchema: {
|
|
625
|
+
type: 'object',
|
|
626
|
+
properties: {
|
|
627
|
+
query: { type: 'array', items: { type: 'number' }, description: 'Query vector' },
|
|
628
|
+
k: { type: 'number', description: 'Number of results to return' },
|
|
629
|
+
metric: { type: 'string', enum: ['cosine', 'euclidean', 'dot', 'manhattan', 'hamming'], description: 'Distance metric' },
|
|
630
|
+
tableName: { type: 'string', description: 'Table to search' },
|
|
631
|
+
filter: { type: 'object', description: 'Metadata filters' },
|
|
632
|
+
},
|
|
633
|
+
required: ['query', 'k', 'tableName'],
|
|
634
|
+
},
|
|
635
|
+
handler: async (input) => {
|
|
636
|
+
return {
|
|
637
|
+
content: [{ type: 'text', text: `Vector search in ${input.tableName} with k=${input.k}` }],
|
|
638
|
+
};
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: 'ruvector-attention',
|
|
643
|
+
description: 'Execute attention mechanism (39 types: multi-head, flash, sparse, linear, etc.)',
|
|
644
|
+
inputSchema: {
|
|
645
|
+
type: 'object',
|
|
646
|
+
properties: {
|
|
647
|
+
mechanism: { type: 'string', description: 'Attention mechanism type' },
|
|
648
|
+
query: { type: 'array', items: { type: 'number' }, description: 'Query vector' },
|
|
649
|
+
keys: { type: 'array', items: { type: 'array' }, description: 'Key vectors' },
|
|
650
|
+
values: { type: 'array', items: { type: 'array' }, description: 'Value vectors' },
|
|
651
|
+
numHeads: { type: 'number', description: 'Number of attention heads' },
|
|
652
|
+
},
|
|
653
|
+
required: ['mechanism', 'query', 'keys', 'values'],
|
|
654
|
+
},
|
|
655
|
+
handler: async (input) => {
|
|
656
|
+
return {
|
|
657
|
+
content: [{ type: 'text', text: `Attention computed with ${input.mechanism}` }],
|
|
658
|
+
};
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: 'ruvector-gnn',
|
|
663
|
+
description: 'Execute GNN layer (GCN, GAT, GraphSAGE, GIN, MPNN, EdgeConv)',
|
|
664
|
+
inputSchema: {
|
|
665
|
+
type: 'object',
|
|
666
|
+
properties: {
|
|
667
|
+
layerType: { type: 'string', enum: ['gcn', 'gat', 'sage', 'gin', 'mpnn', 'edge_conv'], description: 'GNN layer type' },
|
|
668
|
+
nodes: { type: 'array', description: 'Node features' },
|
|
669
|
+
edges: { type: 'array', description: 'Edge list' },
|
|
670
|
+
aggregation: { type: 'string', enum: ['mean', 'sum', 'max', 'attention'], description: 'Aggregation method' },
|
|
671
|
+
},
|
|
672
|
+
required: ['layerType', 'nodes', 'edges'],
|
|
673
|
+
},
|
|
674
|
+
handler: async (input) => {
|
|
675
|
+
return {
|
|
676
|
+
content: [{ type: 'text', text: `GNN ${input.layerType} layer executed` }],
|
|
677
|
+
};
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'ruvector-hyperbolic',
|
|
682
|
+
description: 'Hyperbolic embedding operations (Poincare ball, Lorentz hyperboloid)',
|
|
683
|
+
inputSchema: {
|
|
684
|
+
type: 'object',
|
|
685
|
+
properties: {
|
|
686
|
+
model: { type: 'string', enum: ['poincare', 'lorentz', 'klein'], description: 'Hyperbolic model' },
|
|
687
|
+
operation: { type: 'string', enum: ['distance', 'exp_map', 'log_map', 'mobius_add', 'project'], description: 'Operation' },
|
|
688
|
+
vectors: { type: 'array', description: 'Input vectors' },
|
|
689
|
+
curvature: { type: 'number', description: 'Manifold curvature (negative for hyperbolic)' },
|
|
690
|
+
},
|
|
691
|
+
required: ['model', 'operation', 'vectors'],
|
|
692
|
+
},
|
|
693
|
+
handler: async (input) => {
|
|
694
|
+
return {
|
|
695
|
+
content: [{ type: 'text', text: `Hyperbolic ${input.operation} on ${input.model} model` }],
|
|
696
|
+
};
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
name: 'ruvector-optimize',
|
|
701
|
+
description: 'Self-learning query optimization and index tuning',
|
|
702
|
+
inputSchema: {
|
|
703
|
+
type: 'object',
|
|
704
|
+
properties: {
|
|
705
|
+
action: { type: 'string', enum: ['analyze', 'suggest', 'tune', 'learn'], description: 'Optimization action' },
|
|
706
|
+
target: { type: 'string', description: 'Table or index to optimize' },
|
|
707
|
+
},
|
|
708
|
+
required: ['action'],
|
|
709
|
+
},
|
|
710
|
+
handler: async (input) => {
|
|
711
|
+
return {
|
|
712
|
+
content: [{ type: 'text', text: `Optimization ${input.action} completed` }],
|
|
713
|
+
};
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
])
|
|
717
|
+
.withHooks([
|
|
718
|
+
{
|
|
719
|
+
event: HookEvent.PostMemoryStore,
|
|
720
|
+
priority: HookPriority.Normal,
|
|
721
|
+
name: 'ruvector-learn-pattern',
|
|
722
|
+
async: true,
|
|
723
|
+
handler: async (ctx) => {
|
|
724
|
+
// Learn from memory operations for self-optimization
|
|
725
|
+
return { success: true };
|
|
726
|
+
},
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
event: HookEvent.PostToolUse,
|
|
730
|
+
priority: HookPriority.Low,
|
|
731
|
+
name: 'ruvector-collect-stats',
|
|
732
|
+
async: true,
|
|
733
|
+
handler: async (ctx) => {
|
|
734
|
+
// Collect statistics for query optimization
|
|
735
|
+
return { success: true };
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
])
|
|
739
|
+
.build();
|
|
740
|
+
|
|
741
|
+
// ============================================================================
|
|
742
|
+
// Official Collections
|
|
743
|
+
// ============================================================================
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Core collection - essential plugins for Claude Flow operation.
|
|
747
|
+
*/
|
|
748
|
+
export const coreCollection: PluginCollection = {
|
|
749
|
+
id: 'claude-flow-core',
|
|
750
|
+
name: 'Claude Flow Core Plugins',
|
|
751
|
+
version: '3.0.0',
|
|
752
|
+
description: 'Essential plugins for Claude Flow operation',
|
|
753
|
+
author: 'Claude Flow',
|
|
754
|
+
license: 'MIT',
|
|
755
|
+
categories: ['hook', 'integration', 'utility'],
|
|
756
|
+
plugins: [
|
|
757
|
+
{
|
|
758
|
+
plugin: sessionPlugin,
|
|
759
|
+
defaultEnabled: true,
|
|
760
|
+
category: 'hook',
|
|
761
|
+
tags: ['core', 'session'],
|
|
762
|
+
description: 'Session lifecycle management',
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
plugin: memoryCoordinatorPlugin,
|
|
766
|
+
defaultEnabled: true,
|
|
767
|
+
category: 'integration',
|
|
768
|
+
tags: ['core', 'memory'],
|
|
769
|
+
description: 'Memory coordination across agents',
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
plugin: eventBusPlugin,
|
|
773
|
+
defaultEnabled: true,
|
|
774
|
+
category: 'utility',
|
|
775
|
+
tags: ['core', 'events'],
|
|
776
|
+
description: 'Event pub/sub system',
|
|
777
|
+
},
|
|
778
|
+
],
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Development collection - plugins for software development workflows.
|
|
783
|
+
*/
|
|
784
|
+
export const developmentCollection: PluginCollection = {
|
|
785
|
+
id: 'claude-flow-development',
|
|
786
|
+
name: 'Development Tools',
|
|
787
|
+
version: '3.0.0',
|
|
788
|
+
description: 'Plugins for software development workflows',
|
|
789
|
+
author: 'Claude Flow',
|
|
790
|
+
license: 'MIT',
|
|
791
|
+
categories: ['agent', 'tool', 'integration'],
|
|
792
|
+
plugins: [
|
|
793
|
+
{
|
|
794
|
+
plugin: coderAgentPlugin,
|
|
795
|
+
defaultEnabled: true,
|
|
796
|
+
category: 'agent',
|
|
797
|
+
tags: ['development', 'coding'],
|
|
798
|
+
description: 'AI coding assistant',
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
plugin: testerAgentPlugin,
|
|
802
|
+
defaultEnabled: true,
|
|
803
|
+
category: 'agent',
|
|
804
|
+
tags: ['development', 'testing'],
|
|
805
|
+
description: 'AI testing assistant',
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
plugin: reviewerAgentPlugin,
|
|
809
|
+
defaultEnabled: false,
|
|
810
|
+
category: 'agent',
|
|
811
|
+
tags: ['development', 'review'],
|
|
812
|
+
description: 'AI code reviewer',
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
plugin: gitIntegrationPlugin,
|
|
816
|
+
defaultEnabled: true,
|
|
817
|
+
category: 'integration',
|
|
818
|
+
tags: ['development', 'git'],
|
|
819
|
+
description: 'Git version control integration',
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
plugin: linterPlugin,
|
|
823
|
+
defaultEnabled: false,
|
|
824
|
+
category: 'tool',
|
|
825
|
+
tags: ['development', 'linting'],
|
|
826
|
+
description: 'Code linting and style checking',
|
|
827
|
+
},
|
|
828
|
+
],
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Intelligence collection - AI/ML and learning plugins.
|
|
833
|
+
*/
|
|
834
|
+
export const intelligenceCollection: PluginCollection = {
|
|
835
|
+
id: 'claude-flow-intelligence',
|
|
836
|
+
name: 'Intelligence & Learning',
|
|
837
|
+
version: '3.0.0',
|
|
838
|
+
description: 'AI/ML features and learning capabilities',
|
|
839
|
+
author: 'Claude Flow',
|
|
840
|
+
license: 'MIT',
|
|
841
|
+
categories: ['integration', 'memory', 'hook', 'database'],
|
|
842
|
+
plugins: [
|
|
843
|
+
{
|
|
844
|
+
plugin: sonaPlugin,
|
|
845
|
+
defaultEnabled: false,
|
|
846
|
+
category: 'integration',
|
|
847
|
+
tags: ['intelligence', 'neural'],
|
|
848
|
+
requiredCapabilities: ['memory', 'llm'],
|
|
849
|
+
description: 'SONA self-optimizing neural architecture',
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
plugin: reasoningBankPlugin,
|
|
853
|
+
defaultEnabled: false,
|
|
854
|
+
category: 'memory',
|
|
855
|
+
tags: ['intelligence', 'patterns'],
|
|
856
|
+
requiredCapabilities: ['memory'],
|
|
857
|
+
description: 'Reasoning pattern storage',
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
plugin: patternLearningPlugin,
|
|
861
|
+
defaultEnabled: false,
|
|
862
|
+
category: 'hook',
|
|
863
|
+
tags: ['intelligence', 'learning'],
|
|
864
|
+
description: 'Learn from task execution',
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
plugin: ruvectorPostgresPlugin,
|
|
868
|
+
defaultEnabled: false,
|
|
869
|
+
category: 'database',
|
|
870
|
+
tags: ['intelligence', 'vector', 'postgresql', 'attention', 'gnn'],
|
|
871
|
+
requiredCapabilities: ['memory', 'database'],
|
|
872
|
+
description: 'RuVector PostgreSQL Bridge - Advanced vector search with 39 attention mechanisms, GNN layers, and hyperbolic embeddings',
|
|
873
|
+
},
|
|
874
|
+
],
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Database collection - database and storage plugins.
|
|
879
|
+
*/
|
|
880
|
+
export const databaseCollection: PluginCollection = {
|
|
881
|
+
id: 'claude-flow-database',
|
|
882
|
+
name: 'Database & Storage',
|
|
883
|
+
version: '3.0.0',
|
|
884
|
+
description: 'Database integrations and storage plugins',
|
|
885
|
+
author: 'Claude Flow',
|
|
886
|
+
license: 'MIT',
|
|
887
|
+
categories: ['database', 'integration'],
|
|
888
|
+
plugins: [
|
|
889
|
+
{
|
|
890
|
+
plugin: ruvectorPostgresPlugin,
|
|
891
|
+
defaultEnabled: false,
|
|
892
|
+
category: 'database',
|
|
893
|
+
tags: ['postgresql', 'vector', 'attention', 'gnn', 'hyperbolic'],
|
|
894
|
+
requiredCapabilities: ['database'],
|
|
895
|
+
description: 'RuVector PostgreSQL - 52K+ inserts/sec, sub-ms queries, 39 attention mechanisms, GNN, hyperbolic embeddings',
|
|
896
|
+
},
|
|
897
|
+
],
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Swarm collection - multi-agent coordination plugins.
|
|
902
|
+
*/
|
|
903
|
+
export const swarmCollection: PluginCollection = {
|
|
904
|
+
id: 'claude-flow-swarm',
|
|
905
|
+
name: 'Swarm Coordination',
|
|
906
|
+
version: '3.0.0',
|
|
907
|
+
description: 'Multi-agent swarm coordination and orchestration',
|
|
908
|
+
author: 'Claude Flow',
|
|
909
|
+
license: 'MIT',
|
|
910
|
+
categories: ['integration', 'agent'],
|
|
911
|
+
plugins: [
|
|
912
|
+
{
|
|
913
|
+
plugin: hiveMindPlugin,
|
|
914
|
+
defaultEnabled: true,
|
|
915
|
+
category: 'integration',
|
|
916
|
+
tags: ['swarm', 'consensus'],
|
|
917
|
+
description: 'Collective intelligence coordination',
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
plugin: maestroPlugin,
|
|
921
|
+
defaultEnabled: true,
|
|
922
|
+
category: 'integration',
|
|
923
|
+
tags: ['swarm', 'orchestration'],
|
|
924
|
+
description: 'Workflow orchestration',
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
plugin: consensusPlugin,
|
|
928
|
+
defaultEnabled: false,
|
|
929
|
+
category: 'integration',
|
|
930
|
+
tags: ['swarm', 'byzantine'],
|
|
931
|
+
description: 'Byzantine fault-tolerant consensus',
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
plugin: coordinatorAgentPlugin,
|
|
935
|
+
defaultEnabled: true,
|
|
936
|
+
category: 'agent',
|
|
937
|
+
tags: ['swarm', 'coordination'],
|
|
938
|
+
description: 'Swarm coordinator agent',
|
|
939
|
+
},
|
|
940
|
+
],
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Security collection - security and audit plugins.
|
|
945
|
+
*/
|
|
946
|
+
export const securityCollection: PluginCollection = {
|
|
947
|
+
id: 'claude-flow-security',
|
|
948
|
+
name: 'Security & Audit',
|
|
949
|
+
version: '3.0.0',
|
|
950
|
+
description: 'Security validation and audit logging',
|
|
951
|
+
author: 'Claude Flow',
|
|
952
|
+
license: 'MIT',
|
|
953
|
+
categories: ['hook', 'tool'],
|
|
954
|
+
plugins: [
|
|
955
|
+
{
|
|
956
|
+
plugin: inputValidationPlugin,
|
|
957
|
+
defaultEnabled: true,
|
|
958
|
+
category: 'hook',
|
|
959
|
+
tags: ['security', 'validation'],
|
|
960
|
+
description: 'Input validation and sanitization',
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
plugin: pathSecurityPlugin,
|
|
964
|
+
defaultEnabled: true,
|
|
965
|
+
category: 'hook',
|
|
966
|
+
tags: ['security', 'filesystem'],
|
|
967
|
+
description: 'Path traversal prevention',
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
plugin: auditLogPlugin,
|
|
971
|
+
defaultEnabled: false,
|
|
972
|
+
category: 'hook',
|
|
973
|
+
tags: ['security', 'audit'],
|
|
974
|
+
description: 'Comprehensive audit logging',
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
plugin: securityScanPlugin,
|
|
978
|
+
defaultEnabled: false,
|
|
979
|
+
category: 'tool',
|
|
980
|
+
tags: ['security', 'scanning'],
|
|
981
|
+
description: 'Security vulnerability scanning',
|
|
982
|
+
},
|
|
983
|
+
],
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Utility collection - general utility plugins.
|
|
988
|
+
*/
|
|
989
|
+
export const utilityCollection: PluginCollection = {
|
|
990
|
+
id: 'claude-flow-utility',
|
|
991
|
+
name: 'Utilities',
|
|
992
|
+
version: '3.0.0',
|
|
993
|
+
description: 'General utility plugins',
|
|
994
|
+
author: 'Claude Flow',
|
|
995
|
+
license: 'MIT',
|
|
996
|
+
categories: ['utility'],
|
|
997
|
+
plugins: [
|
|
998
|
+
{
|
|
999
|
+
plugin: metricsPlugin,
|
|
1000
|
+
defaultEnabled: false,
|
|
1001
|
+
category: 'utility',
|
|
1002
|
+
tags: ['metrics', 'monitoring'],
|
|
1003
|
+
description: 'Performance metrics collection',
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
plugin: cachePlugin,
|
|
1007
|
+
defaultEnabled: false,
|
|
1008
|
+
category: 'utility',
|
|
1009
|
+
tags: ['cache', 'performance'],
|
|
1010
|
+
description: 'Caching utilities',
|
|
1011
|
+
},
|
|
1012
|
+
],
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* All official collections.
|
|
1017
|
+
*/
|
|
1018
|
+
export const officialCollections: PluginCollection[] = [
|
|
1019
|
+
coreCollection,
|
|
1020
|
+
developmentCollection,
|
|
1021
|
+
intelligenceCollection,
|
|
1022
|
+
swarmCollection,
|
|
1023
|
+
securityCollection,
|
|
1024
|
+
utilityCollection,
|
|
1025
|
+
databaseCollection,
|
|
1026
|
+
];
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Get all official plugins as a flat list.
|
|
1030
|
+
*/
|
|
1031
|
+
export function getAllOfficialPlugins(): PluginCollectionEntry[] {
|
|
1032
|
+
return officialCollections.flatMap(c => c.plugins);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Get an official collection by ID.
|
|
1037
|
+
*/
|
|
1038
|
+
export function getOfficialCollection(id: string): PluginCollection | undefined {
|
|
1039
|
+
return officialCollections.find(c => c.id === id);
|
|
1040
|
+
}
|