@claude-flow/plugin-neural-coordination 3.0.0-alpha.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 +265 -0
- package/dist/bridges/attention-bridge.d.ts +100 -0
- package/dist/bridges/attention-bridge.d.ts.map +1 -0
- package/dist/bridges/attention-bridge.js +236 -0
- package/dist/bridges/attention-bridge.js.map +1 -0
- package/dist/bridges/index.d.ts +8 -0
- package/dist/bridges/index.d.ts.map +1 -0
- package/dist/bridges/index.js +8 -0
- package/dist/bridges/index.js.map +1 -0
- package/dist/bridges/nervous-system-bridge.d.ts +93 -0
- package/dist/bridges/nervous-system-bridge.d.ts.map +1 -0
- package/dist/bridges/nervous-system-bridge.js +240 -0
- package/dist/bridges/nervous-system-bridge.js.map +1 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-tools.d.ts +22 -0
- package/dist/mcp-tools.d.ts.map +1 -0
- package/dist/mcp-tools.js +915 -0
- package/dist/mcp-tools.js.map +1 -0
- package/dist/types.d.ts +730 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +229 -0
- package/dist/types.js.map +1 -0
- package/package.json +84 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neural Coordination Plugin - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for multi-agent neural coordination including consensus mechanisms,
|
|
5
|
+
* topology optimization, collective memory, emergent protocols, and swarm behavior.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
export interface MCPToolInputSchema {
|
|
9
|
+
type: 'object';
|
|
10
|
+
properties: Record<string, unknown>;
|
|
11
|
+
required?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface MCPToolResult {
|
|
14
|
+
content: Array<{
|
|
15
|
+
type: 'text' | 'image' | 'resource';
|
|
16
|
+
text?: string;
|
|
17
|
+
data?: string;
|
|
18
|
+
mimeType?: string;
|
|
19
|
+
}>;
|
|
20
|
+
isError?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface MCPTool {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
inputSchema: MCPToolInputSchema;
|
|
26
|
+
category?: string;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
version?: string;
|
|
29
|
+
cacheable?: boolean;
|
|
30
|
+
cacheTTL?: number;
|
|
31
|
+
handler: (input: Record<string, unknown>, context?: ToolContext) => Promise<MCPToolResult>;
|
|
32
|
+
}
|
|
33
|
+
export interface ToolContext {
|
|
34
|
+
nervousSystemBridge?: NervousSystemBridgeInterface;
|
|
35
|
+
attentionBridge?: AttentionBridgeInterface;
|
|
36
|
+
config?: NeuralCoordinationConfig;
|
|
37
|
+
logger?: Logger;
|
|
38
|
+
}
|
|
39
|
+
export interface Logger {
|
|
40
|
+
debug(message: string, meta?: Record<string, unknown>): void;
|
|
41
|
+
info(message: string, meta?: Record<string, unknown>): void;
|
|
42
|
+
warn(message: string, meta?: Record<string, unknown>): void;
|
|
43
|
+
error(message: string, meta?: Record<string, unknown>): void;
|
|
44
|
+
}
|
|
45
|
+
export declare const AgentSchema: z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
48
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
50
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
x: z.ZodNumber;
|
|
52
|
+
y: z.ZodNumber;
|
|
53
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
z?: number | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
z?: number | undefined;
|
|
62
|
+
}>>;
|
|
63
|
+
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
id: string;
|
|
66
|
+
preferences?: Record<string, number> | undefined;
|
|
67
|
+
constraints?: Record<string, unknown> | undefined;
|
|
68
|
+
capabilities?: string[] | undefined;
|
|
69
|
+
location?: {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
z?: number | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
embedding?: number[] | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
id: string;
|
|
77
|
+
preferences?: Record<string, number> | undefined;
|
|
78
|
+
constraints?: Record<string, unknown> | undefined;
|
|
79
|
+
capabilities?: string[] | undefined;
|
|
80
|
+
location?: {
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
z?: number | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
embedding?: number[] | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
export type Agent = z.infer<typeof AgentSchema>;
|
|
88
|
+
export declare const AgentStateSchema: z.ZodObject<{
|
|
89
|
+
agentId: z.ZodString;
|
|
90
|
+
embedding: z.ZodArray<z.ZodNumber, "many">;
|
|
91
|
+
vote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
92
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
embedding: number[];
|
|
95
|
+
agentId: string;
|
|
96
|
+
vote?: string | boolean | undefined;
|
|
97
|
+
metadata?: Record<string, unknown> | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
embedding: number[];
|
|
100
|
+
agentId: string;
|
|
101
|
+
vote?: string | boolean | undefined;
|
|
102
|
+
metadata?: Record<string, unknown> | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export type AgentState = z.infer<typeof AgentStateSchema>;
|
|
105
|
+
export declare const ConsensusProtocolSchema: z.ZodEnum<["neural_voting", "iterative_refinement", "auction", "contract_net"]>;
|
|
106
|
+
export type ConsensusProtocol = z.infer<typeof ConsensusProtocolSchema>;
|
|
107
|
+
export declare const ProposalSchema: z.ZodObject<{
|
|
108
|
+
topic: z.ZodString;
|
|
109
|
+
options: z.ZodArray<z.ZodObject<{
|
|
110
|
+
id: z.ZodString;
|
|
111
|
+
value: z.ZodUnknown;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
id: string;
|
|
114
|
+
value?: unknown;
|
|
115
|
+
}, {
|
|
116
|
+
id: string;
|
|
117
|
+
value?: unknown;
|
|
118
|
+
}>, "many">;
|
|
119
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
options: {
|
|
122
|
+
id: string;
|
|
123
|
+
value?: unknown;
|
|
124
|
+
}[];
|
|
125
|
+
topic: string;
|
|
126
|
+
constraints?: Record<string, unknown> | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
options: {
|
|
129
|
+
id: string;
|
|
130
|
+
value?: unknown;
|
|
131
|
+
}[];
|
|
132
|
+
topic: string;
|
|
133
|
+
constraints?: Record<string, unknown> | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
export type Proposal = z.infer<typeof ProposalSchema>;
|
|
136
|
+
export declare const NeuralConsensusInputSchema: z.ZodObject<{
|
|
137
|
+
proposal: z.ZodObject<{
|
|
138
|
+
topic: z.ZodString;
|
|
139
|
+
options: z.ZodArray<z.ZodObject<{
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
value: z.ZodUnknown;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
id: string;
|
|
144
|
+
value?: unknown;
|
|
145
|
+
}, {
|
|
146
|
+
id: string;
|
|
147
|
+
value?: unknown;
|
|
148
|
+
}>, "many">;
|
|
149
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
options: {
|
|
152
|
+
id: string;
|
|
153
|
+
value?: unknown;
|
|
154
|
+
}[];
|
|
155
|
+
topic: string;
|
|
156
|
+
constraints?: Record<string, unknown> | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
options: {
|
|
159
|
+
id: string;
|
|
160
|
+
value?: unknown;
|
|
161
|
+
}[];
|
|
162
|
+
topic: string;
|
|
163
|
+
constraints?: Record<string, unknown> | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
168
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
169
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
170
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
x: z.ZodNumber;
|
|
172
|
+
y: z.ZodNumber;
|
|
173
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
z?: number | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
x: number;
|
|
180
|
+
y: number;
|
|
181
|
+
z?: number | undefined;
|
|
182
|
+
}>>;
|
|
183
|
+
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
id: string;
|
|
186
|
+
preferences?: Record<string, number> | undefined;
|
|
187
|
+
constraints?: Record<string, unknown> | undefined;
|
|
188
|
+
capabilities?: string[] | undefined;
|
|
189
|
+
location?: {
|
|
190
|
+
x: number;
|
|
191
|
+
y: number;
|
|
192
|
+
z?: number | undefined;
|
|
193
|
+
} | undefined;
|
|
194
|
+
embedding?: number[] | undefined;
|
|
195
|
+
}, {
|
|
196
|
+
id: string;
|
|
197
|
+
preferences?: Record<string, number> | undefined;
|
|
198
|
+
constraints?: Record<string, unknown> | undefined;
|
|
199
|
+
capabilities?: string[] | undefined;
|
|
200
|
+
location?: {
|
|
201
|
+
x: number;
|
|
202
|
+
y: number;
|
|
203
|
+
z?: number | undefined;
|
|
204
|
+
} | undefined;
|
|
205
|
+
embedding?: number[] | undefined;
|
|
206
|
+
}>, "many">;
|
|
207
|
+
protocol: z.ZodDefault<z.ZodEnum<["neural_voting", "iterative_refinement", "auction", "contract_net"]>>;
|
|
208
|
+
maxRounds: z.ZodDefault<z.ZodNumber>;
|
|
209
|
+
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
proposal: {
|
|
211
|
+
options: {
|
|
212
|
+
id: string;
|
|
213
|
+
value?: unknown;
|
|
214
|
+
}[];
|
|
215
|
+
topic: string;
|
|
216
|
+
constraints?: Record<string, unknown> | undefined;
|
|
217
|
+
};
|
|
218
|
+
agents: {
|
|
219
|
+
id: string;
|
|
220
|
+
preferences?: Record<string, number> | undefined;
|
|
221
|
+
constraints?: Record<string, unknown> | undefined;
|
|
222
|
+
capabilities?: string[] | undefined;
|
|
223
|
+
location?: {
|
|
224
|
+
x: number;
|
|
225
|
+
y: number;
|
|
226
|
+
z?: number | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
embedding?: number[] | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
protocol: "neural_voting" | "iterative_refinement" | "auction" | "contract_net";
|
|
231
|
+
maxRounds: number;
|
|
232
|
+
}, {
|
|
233
|
+
proposal: {
|
|
234
|
+
options: {
|
|
235
|
+
id: string;
|
|
236
|
+
value?: unknown;
|
|
237
|
+
}[];
|
|
238
|
+
topic: string;
|
|
239
|
+
constraints?: Record<string, unknown> | undefined;
|
|
240
|
+
};
|
|
241
|
+
agents: {
|
|
242
|
+
id: string;
|
|
243
|
+
preferences?: Record<string, number> | undefined;
|
|
244
|
+
constraints?: Record<string, unknown> | undefined;
|
|
245
|
+
capabilities?: string[] | undefined;
|
|
246
|
+
location?: {
|
|
247
|
+
x: number;
|
|
248
|
+
y: number;
|
|
249
|
+
z?: number | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
embedding?: number[] | undefined;
|
|
252
|
+
}[];
|
|
253
|
+
protocol?: "neural_voting" | "iterative_refinement" | "auction" | "contract_net" | undefined;
|
|
254
|
+
maxRounds?: number | undefined;
|
|
255
|
+
}>;
|
|
256
|
+
export type NeuralConsensusInput = z.infer<typeof NeuralConsensusInputSchema>;
|
|
257
|
+
export interface ConsensusVote {
|
|
258
|
+
agentId: string;
|
|
259
|
+
optionId: string;
|
|
260
|
+
weight: number;
|
|
261
|
+
confidence: number;
|
|
262
|
+
}
|
|
263
|
+
export interface ConsensusResult {
|
|
264
|
+
consensusReached: boolean;
|
|
265
|
+
selectedOption: string | null;
|
|
266
|
+
votes: ConsensusVote[];
|
|
267
|
+
agreementRatio: number;
|
|
268
|
+
roundsUsed: number;
|
|
269
|
+
divergentAgents: string[];
|
|
270
|
+
}
|
|
271
|
+
export interface NeuralConsensusOutput {
|
|
272
|
+
consensusReached: boolean;
|
|
273
|
+
selectedOption: string | null;
|
|
274
|
+
agreementRatio: number;
|
|
275
|
+
details: {
|
|
276
|
+
protocol: ConsensusProtocol;
|
|
277
|
+
roundsUsed: number;
|
|
278
|
+
agentCount: number;
|
|
279
|
+
divergentAgents: string[];
|
|
280
|
+
interpretation: string;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export declare const TopologyObjectiveSchema: z.ZodEnum<["minimize_latency", "maximize_throughput", "minimize_hops", "fault_tolerant"]>;
|
|
284
|
+
export type TopologyObjective = z.infer<typeof TopologyObjectiveSchema>;
|
|
285
|
+
export declare const PreferredTopologySchema: z.ZodEnum<["mesh", "tree", "ring", "star", "hybrid"]>;
|
|
286
|
+
export type PreferredTopology = z.infer<typeof PreferredTopologySchema>;
|
|
287
|
+
export declare const TopologyConstraintsSchema: z.ZodObject<{
|
|
288
|
+
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
289
|
+
minRedundancy: z.ZodOptional<z.ZodNumber>;
|
|
290
|
+
preferredTopology: z.ZodOptional<z.ZodEnum<["mesh", "tree", "ring", "star", "hybrid"]>>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
maxConnections?: number | undefined;
|
|
293
|
+
minRedundancy?: number | undefined;
|
|
294
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
295
|
+
}, {
|
|
296
|
+
maxConnections?: number | undefined;
|
|
297
|
+
minRedundancy?: number | undefined;
|
|
298
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
299
|
+
}>;
|
|
300
|
+
export type TopologyConstraints = z.infer<typeof TopologyConstraintsSchema>;
|
|
301
|
+
export declare const TopologyOptimizeInputSchema: z.ZodObject<{
|
|
302
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
305
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
306
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
307
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
x: z.ZodNumber;
|
|
309
|
+
y: z.ZodNumber;
|
|
310
|
+
z: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
}, "strip", z.ZodTypeAny, {
|
|
312
|
+
x: number;
|
|
313
|
+
y: number;
|
|
314
|
+
z?: number | undefined;
|
|
315
|
+
}, {
|
|
316
|
+
x: number;
|
|
317
|
+
y: number;
|
|
318
|
+
z?: number | undefined;
|
|
319
|
+
}>>;
|
|
320
|
+
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
321
|
+
}, "strip", z.ZodTypeAny, {
|
|
322
|
+
id: string;
|
|
323
|
+
preferences?: Record<string, number> | undefined;
|
|
324
|
+
constraints?: Record<string, unknown> | undefined;
|
|
325
|
+
capabilities?: string[] | undefined;
|
|
326
|
+
location?: {
|
|
327
|
+
x: number;
|
|
328
|
+
y: number;
|
|
329
|
+
z?: number | undefined;
|
|
330
|
+
} | undefined;
|
|
331
|
+
embedding?: number[] | undefined;
|
|
332
|
+
}, {
|
|
333
|
+
id: string;
|
|
334
|
+
preferences?: Record<string, number> | undefined;
|
|
335
|
+
constraints?: Record<string, unknown> | undefined;
|
|
336
|
+
capabilities?: string[] | undefined;
|
|
337
|
+
location?: {
|
|
338
|
+
x: number;
|
|
339
|
+
y: number;
|
|
340
|
+
z?: number | undefined;
|
|
341
|
+
} | undefined;
|
|
342
|
+
embedding?: number[] | undefined;
|
|
343
|
+
}>, "many">;
|
|
344
|
+
objective: z.ZodDefault<z.ZodEnum<["minimize_latency", "maximize_throughput", "minimize_hops", "fault_tolerant"]>>;
|
|
345
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
minRedundancy: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
preferredTopology: z.ZodOptional<z.ZodEnum<["mesh", "tree", "ring", "star", "hybrid"]>>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
maxConnections?: number | undefined;
|
|
351
|
+
minRedundancy?: number | undefined;
|
|
352
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
353
|
+
}, {
|
|
354
|
+
maxConnections?: number | undefined;
|
|
355
|
+
minRedundancy?: number | undefined;
|
|
356
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
357
|
+
}>>;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
agents: {
|
|
360
|
+
id: string;
|
|
361
|
+
preferences?: Record<string, number> | undefined;
|
|
362
|
+
constraints?: Record<string, unknown> | undefined;
|
|
363
|
+
capabilities?: string[] | undefined;
|
|
364
|
+
location?: {
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
z?: number | undefined;
|
|
368
|
+
} | undefined;
|
|
369
|
+
embedding?: number[] | undefined;
|
|
370
|
+
}[];
|
|
371
|
+
objective: "minimize_latency" | "maximize_throughput" | "minimize_hops" | "fault_tolerant";
|
|
372
|
+
constraints?: {
|
|
373
|
+
maxConnections?: number | undefined;
|
|
374
|
+
minRedundancy?: number | undefined;
|
|
375
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
376
|
+
} | undefined;
|
|
377
|
+
}, {
|
|
378
|
+
agents: {
|
|
379
|
+
id: string;
|
|
380
|
+
preferences?: Record<string, number> | undefined;
|
|
381
|
+
constraints?: Record<string, unknown> | undefined;
|
|
382
|
+
capabilities?: string[] | undefined;
|
|
383
|
+
location?: {
|
|
384
|
+
x: number;
|
|
385
|
+
y: number;
|
|
386
|
+
z?: number | undefined;
|
|
387
|
+
} | undefined;
|
|
388
|
+
embedding?: number[] | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
constraints?: {
|
|
391
|
+
maxConnections?: number | undefined;
|
|
392
|
+
minRedundancy?: number | undefined;
|
|
393
|
+
preferredTopology?: "mesh" | "tree" | "ring" | "star" | "hybrid" | undefined;
|
|
394
|
+
} | undefined;
|
|
395
|
+
objective?: "minimize_latency" | "maximize_throughput" | "minimize_hops" | "fault_tolerant" | undefined;
|
|
396
|
+
}>;
|
|
397
|
+
export type TopologyOptimizeInput = z.infer<typeof TopologyOptimizeInputSchema>;
|
|
398
|
+
export interface TopologyEdge {
|
|
399
|
+
source: string;
|
|
400
|
+
target: string;
|
|
401
|
+
weight: number;
|
|
402
|
+
latency?: number;
|
|
403
|
+
}
|
|
404
|
+
export interface TopologyResult {
|
|
405
|
+
edges: TopologyEdge[];
|
|
406
|
+
topology: PreferredTopology;
|
|
407
|
+
metrics: {
|
|
408
|
+
avgLatency: number;
|
|
409
|
+
redundancy: number;
|
|
410
|
+
diameter: number;
|
|
411
|
+
avgDegree: number;
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
export interface TopologyOptimizeOutput {
|
|
415
|
+
topology: PreferredTopology;
|
|
416
|
+
edges: TopologyEdge[];
|
|
417
|
+
metrics: {
|
|
418
|
+
avgLatency: number;
|
|
419
|
+
redundancy: number;
|
|
420
|
+
diameter: number;
|
|
421
|
+
avgDegree: number;
|
|
422
|
+
};
|
|
423
|
+
details: {
|
|
424
|
+
objective: TopologyObjective;
|
|
425
|
+
agentCount: number;
|
|
426
|
+
edgeCount: number;
|
|
427
|
+
interpretation: string;
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
export declare const MemoryActionSchema: z.ZodEnum<["store", "retrieve", "consolidate", "forget", "synchronize"]>;
|
|
431
|
+
export type MemoryAction = z.infer<typeof MemoryActionSchema>;
|
|
432
|
+
export declare const MemoryScopeSchema: z.ZodEnum<["global", "team", "pair"]>;
|
|
433
|
+
export type MemoryScope = z.infer<typeof MemoryScopeSchema>;
|
|
434
|
+
export declare const ConsolidationStrategySchema: z.ZodEnum<["ewc", "replay", "distillation"]>;
|
|
435
|
+
export type ConsolidationStrategy = z.infer<typeof ConsolidationStrategySchema>;
|
|
436
|
+
export declare const CollectiveMemoryInputSchema: z.ZodObject<{
|
|
437
|
+
action: z.ZodEnum<["store", "retrieve", "consolidate", "forget", "synchronize"]>;
|
|
438
|
+
memory: z.ZodOptional<z.ZodObject<{
|
|
439
|
+
key: z.ZodOptional<z.ZodString>;
|
|
440
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
441
|
+
importance: z.ZodDefault<z.ZodNumber>;
|
|
442
|
+
expiry: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, "strip", z.ZodTypeAny, {
|
|
444
|
+
importance: number;
|
|
445
|
+
value?: unknown;
|
|
446
|
+
key?: string | undefined;
|
|
447
|
+
expiry?: string | undefined;
|
|
448
|
+
}, {
|
|
449
|
+
value?: unknown;
|
|
450
|
+
key?: string | undefined;
|
|
451
|
+
importance?: number | undefined;
|
|
452
|
+
expiry?: string | undefined;
|
|
453
|
+
}>>;
|
|
454
|
+
scope: z.ZodDefault<z.ZodEnum<["global", "team", "pair"]>>;
|
|
455
|
+
consolidationStrategy: z.ZodDefault<z.ZodEnum<["ewc", "replay", "distillation"]>>;
|
|
456
|
+
}, "strip", z.ZodTypeAny, {
|
|
457
|
+
action: "store" | "retrieve" | "consolidate" | "forget" | "synchronize";
|
|
458
|
+
scope: "global" | "team" | "pair";
|
|
459
|
+
consolidationStrategy: "ewc" | "replay" | "distillation";
|
|
460
|
+
memory?: {
|
|
461
|
+
importance: number;
|
|
462
|
+
value?: unknown;
|
|
463
|
+
key?: string | undefined;
|
|
464
|
+
expiry?: string | undefined;
|
|
465
|
+
} | undefined;
|
|
466
|
+
}, {
|
|
467
|
+
action: "store" | "retrieve" | "consolidate" | "forget" | "synchronize";
|
|
468
|
+
memory?: {
|
|
469
|
+
value?: unknown;
|
|
470
|
+
key?: string | undefined;
|
|
471
|
+
importance?: number | undefined;
|
|
472
|
+
expiry?: string | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
scope?: "global" | "team" | "pair" | undefined;
|
|
475
|
+
consolidationStrategy?: "ewc" | "replay" | "distillation" | undefined;
|
|
476
|
+
}>;
|
|
477
|
+
export type CollectiveMemoryInput = z.infer<typeof CollectiveMemoryInputSchema>;
|
|
478
|
+
export interface MemoryEntry {
|
|
479
|
+
key: string;
|
|
480
|
+
value: unknown;
|
|
481
|
+
importance: number;
|
|
482
|
+
createdAt: number;
|
|
483
|
+
updatedAt: number;
|
|
484
|
+
accessCount: number;
|
|
485
|
+
scope: MemoryScope;
|
|
486
|
+
}
|
|
487
|
+
export interface CollectiveMemoryOutput {
|
|
488
|
+
action: MemoryAction;
|
|
489
|
+
success: boolean;
|
|
490
|
+
data?: unknown;
|
|
491
|
+
details: {
|
|
492
|
+
scope: MemoryScope;
|
|
493
|
+
entryCount?: number;
|
|
494
|
+
consolidatedCount?: number;
|
|
495
|
+
interpretation: string;
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
export declare const TaskTypeSchema: z.ZodObject<{
|
|
499
|
+
type: z.ZodString;
|
|
500
|
+
objectives: z.ZodArray<z.ZodString, "many">;
|
|
501
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
502
|
+
}, "strip", z.ZodTypeAny, {
|
|
503
|
+
type: string;
|
|
504
|
+
objectives: string[];
|
|
505
|
+
constraints?: Record<string, unknown> | undefined;
|
|
506
|
+
}, {
|
|
507
|
+
type: string;
|
|
508
|
+
objectives: string[];
|
|
509
|
+
constraints?: Record<string, unknown> | undefined;
|
|
510
|
+
}>;
|
|
511
|
+
export type TaskType = z.infer<typeof TaskTypeSchema>;
|
|
512
|
+
export declare const CommunicationBudgetSchema: z.ZodObject<{
|
|
513
|
+
symbolsPerMessage: z.ZodDefault<z.ZodNumber>;
|
|
514
|
+
messagesPerRound: z.ZodDefault<z.ZodNumber>;
|
|
515
|
+
}, "strip", z.ZodTypeAny, {
|
|
516
|
+
symbolsPerMessage: number;
|
|
517
|
+
messagesPerRound: number;
|
|
518
|
+
}, {
|
|
519
|
+
symbolsPerMessage?: number | undefined;
|
|
520
|
+
messagesPerRound?: number | undefined;
|
|
521
|
+
}>;
|
|
522
|
+
export type CommunicationBudget = z.infer<typeof CommunicationBudgetSchema>;
|
|
523
|
+
export declare const EmergentProtocolInputSchema: z.ZodObject<{
|
|
524
|
+
task: z.ZodObject<{
|
|
525
|
+
type: z.ZodString;
|
|
526
|
+
objectives: z.ZodArray<z.ZodString, "many">;
|
|
527
|
+
constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
type: string;
|
|
530
|
+
objectives: string[];
|
|
531
|
+
constraints?: Record<string, unknown> | undefined;
|
|
532
|
+
}, {
|
|
533
|
+
type: string;
|
|
534
|
+
objectives: string[];
|
|
535
|
+
constraints?: Record<string, unknown> | undefined;
|
|
536
|
+
}>;
|
|
537
|
+
communicationBudget: z.ZodOptional<z.ZodObject<{
|
|
538
|
+
symbolsPerMessage: z.ZodDefault<z.ZodNumber>;
|
|
539
|
+
messagesPerRound: z.ZodDefault<z.ZodNumber>;
|
|
540
|
+
}, "strip", z.ZodTypeAny, {
|
|
541
|
+
symbolsPerMessage: number;
|
|
542
|
+
messagesPerRound: number;
|
|
543
|
+
}, {
|
|
544
|
+
symbolsPerMessage?: number | undefined;
|
|
545
|
+
messagesPerRound?: number | undefined;
|
|
546
|
+
}>>;
|
|
547
|
+
trainingEpisodes: z.ZodDefault<z.ZodNumber>;
|
|
548
|
+
interpretability: z.ZodDefault<z.ZodBoolean>;
|
|
549
|
+
}, "strip", z.ZodTypeAny, {
|
|
550
|
+
task: {
|
|
551
|
+
type: string;
|
|
552
|
+
objectives: string[];
|
|
553
|
+
constraints?: Record<string, unknown> | undefined;
|
|
554
|
+
};
|
|
555
|
+
trainingEpisodes: number;
|
|
556
|
+
interpretability: boolean;
|
|
557
|
+
communicationBudget?: {
|
|
558
|
+
symbolsPerMessage: number;
|
|
559
|
+
messagesPerRound: number;
|
|
560
|
+
} | undefined;
|
|
561
|
+
}, {
|
|
562
|
+
task: {
|
|
563
|
+
type: string;
|
|
564
|
+
objectives: string[];
|
|
565
|
+
constraints?: Record<string, unknown> | undefined;
|
|
566
|
+
};
|
|
567
|
+
communicationBudget?: {
|
|
568
|
+
symbolsPerMessage?: number | undefined;
|
|
569
|
+
messagesPerRound?: number | undefined;
|
|
570
|
+
} | undefined;
|
|
571
|
+
trainingEpisodes?: number | undefined;
|
|
572
|
+
interpretability?: boolean | undefined;
|
|
573
|
+
}>;
|
|
574
|
+
export type EmergentProtocolInput = z.infer<typeof EmergentProtocolInputSchema>;
|
|
575
|
+
export interface ProtocolSymbol {
|
|
576
|
+
id: number;
|
|
577
|
+
meaning: string;
|
|
578
|
+
frequency: number;
|
|
579
|
+
contextualMeaning: Map<string, string>;
|
|
580
|
+
}
|
|
581
|
+
export interface EmergentProtocolResult {
|
|
582
|
+
symbols: ProtocolSymbol[];
|
|
583
|
+
vocabulary: Map<number, string>;
|
|
584
|
+
compositionRules: string[];
|
|
585
|
+
successRate: number;
|
|
586
|
+
}
|
|
587
|
+
export interface EmergentProtocolOutput {
|
|
588
|
+
protocolLearned: boolean;
|
|
589
|
+
vocabularySize: number;
|
|
590
|
+
successRate: number;
|
|
591
|
+
details: {
|
|
592
|
+
trainingEpisodes: number;
|
|
593
|
+
symbols: Array<{
|
|
594
|
+
id: number;
|
|
595
|
+
meaning: string;
|
|
596
|
+
frequency: number;
|
|
597
|
+
}>;
|
|
598
|
+
compositionRules: string[];
|
|
599
|
+
interpretation: string;
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
export declare const SwarmBehaviorTypeSchema: z.ZodEnum<["flocking", "foraging", "formation", "task_allocation", "exploration", "aggregation", "dispersion"]>;
|
|
603
|
+
export type SwarmBehaviorType = z.infer<typeof SwarmBehaviorTypeSchema>;
|
|
604
|
+
export declare const ObservabilitySchema: z.ZodObject<{
|
|
605
|
+
recordTrajectories: z.ZodOptional<z.ZodBoolean>;
|
|
606
|
+
measureEmergence: z.ZodOptional<z.ZodBoolean>;
|
|
607
|
+
}, "strip", z.ZodTypeAny, {
|
|
608
|
+
recordTrajectories?: boolean | undefined;
|
|
609
|
+
measureEmergence?: boolean | undefined;
|
|
610
|
+
}, {
|
|
611
|
+
recordTrajectories?: boolean | undefined;
|
|
612
|
+
measureEmergence?: boolean | undefined;
|
|
613
|
+
}>;
|
|
614
|
+
export type Observability = z.infer<typeof ObservabilitySchema>;
|
|
615
|
+
export declare const SwarmBehaviorInputSchema: z.ZodObject<{
|
|
616
|
+
behavior: z.ZodEnum<["flocking", "foraging", "formation", "task_allocation", "exploration", "aggregation", "dispersion"]>;
|
|
617
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
618
|
+
adaptiveRules: z.ZodDefault<z.ZodBoolean>;
|
|
619
|
+
observability: z.ZodOptional<z.ZodObject<{
|
|
620
|
+
recordTrajectories: z.ZodOptional<z.ZodBoolean>;
|
|
621
|
+
measureEmergence: z.ZodOptional<z.ZodBoolean>;
|
|
622
|
+
}, "strip", z.ZodTypeAny, {
|
|
623
|
+
recordTrajectories?: boolean | undefined;
|
|
624
|
+
measureEmergence?: boolean | undefined;
|
|
625
|
+
}, {
|
|
626
|
+
recordTrajectories?: boolean | undefined;
|
|
627
|
+
measureEmergence?: boolean | undefined;
|
|
628
|
+
}>>;
|
|
629
|
+
}, "strip", z.ZodTypeAny, {
|
|
630
|
+
behavior: "flocking" | "foraging" | "formation" | "task_allocation" | "exploration" | "aggregation" | "dispersion";
|
|
631
|
+
adaptiveRules: boolean;
|
|
632
|
+
parameters?: Record<string, unknown> | undefined;
|
|
633
|
+
observability?: {
|
|
634
|
+
recordTrajectories?: boolean | undefined;
|
|
635
|
+
measureEmergence?: boolean | undefined;
|
|
636
|
+
} | undefined;
|
|
637
|
+
}, {
|
|
638
|
+
behavior: "flocking" | "foraging" | "formation" | "task_allocation" | "exploration" | "aggregation" | "dispersion";
|
|
639
|
+
parameters?: Record<string, unknown> | undefined;
|
|
640
|
+
adaptiveRules?: boolean | undefined;
|
|
641
|
+
observability?: {
|
|
642
|
+
recordTrajectories?: boolean | undefined;
|
|
643
|
+
measureEmergence?: boolean | undefined;
|
|
644
|
+
} | undefined;
|
|
645
|
+
}>;
|
|
646
|
+
export type SwarmBehaviorInput = z.infer<typeof SwarmBehaviorInputSchema>;
|
|
647
|
+
export interface SwarmMetrics {
|
|
648
|
+
cohesion: number;
|
|
649
|
+
alignment: number;
|
|
650
|
+
separation: number;
|
|
651
|
+
emergenceScore: number;
|
|
652
|
+
}
|
|
653
|
+
export interface SwarmBehaviorResult {
|
|
654
|
+
behaviorActive: boolean;
|
|
655
|
+
metrics: SwarmMetrics;
|
|
656
|
+
agentPositions: Array<{
|
|
657
|
+
id: string;
|
|
658
|
+
x: number;
|
|
659
|
+
y: number;
|
|
660
|
+
z?: number;
|
|
661
|
+
}>;
|
|
662
|
+
trajectories?: Array<Array<{
|
|
663
|
+
t: number;
|
|
664
|
+
x: number;
|
|
665
|
+
y: number;
|
|
666
|
+
}>>;
|
|
667
|
+
}
|
|
668
|
+
export interface SwarmBehaviorOutput {
|
|
669
|
+
behaviorActive: boolean;
|
|
670
|
+
metrics: {
|
|
671
|
+
cohesion: number;
|
|
672
|
+
alignment: number;
|
|
673
|
+
separation: number;
|
|
674
|
+
emergenceScore: number;
|
|
675
|
+
};
|
|
676
|
+
details: {
|
|
677
|
+
behavior: SwarmBehaviorType;
|
|
678
|
+
agentCount: number;
|
|
679
|
+
adaptiveRules: boolean;
|
|
680
|
+
interpretation: string;
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
export interface NeuralCoordinationConfig {
|
|
684
|
+
consensus: {
|
|
685
|
+
defaultProtocol: ConsensusProtocol;
|
|
686
|
+
maxRounds: number;
|
|
687
|
+
convergenceThreshold: number;
|
|
688
|
+
};
|
|
689
|
+
topology: {
|
|
690
|
+
defaultObjective: TopologyObjective;
|
|
691
|
+
maxConnections: number;
|
|
692
|
+
};
|
|
693
|
+
memory: {
|
|
694
|
+
defaultScope: MemoryScope;
|
|
695
|
+
consolidationInterval: number;
|
|
696
|
+
maxEntries: number;
|
|
697
|
+
};
|
|
698
|
+
swarm: {
|
|
699
|
+
defaultBehavior: SwarmBehaviorType;
|
|
700
|
+
adaptationRate: number;
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
export declare const DEFAULT_CONFIG: NeuralCoordinationConfig;
|
|
704
|
+
export interface NervousSystemBridgeInterface {
|
|
705
|
+
initialized: boolean;
|
|
706
|
+
propagate(signals: Float32Array[]): Promise<Float32Array[]>;
|
|
707
|
+
synchronize(states: Float32Array[]): Promise<Float32Array>;
|
|
708
|
+
coordinate(agents: Agent[]): Promise<{
|
|
709
|
+
assignments: Map<string, string>;
|
|
710
|
+
}>;
|
|
711
|
+
}
|
|
712
|
+
export interface AttentionBridgeInterface {
|
|
713
|
+
initialized: boolean;
|
|
714
|
+
flashAttention(query: Float32Array, key: Float32Array, value: Float32Array): Float32Array;
|
|
715
|
+
multiHeadAttention(query: Float32Array, key: Float32Array, value: Float32Array): Float32Array;
|
|
716
|
+
computeWeights(query: Float32Array, keys: Float32Array[]): number[];
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Create a successful MCP tool result
|
|
720
|
+
*/
|
|
721
|
+
export declare function successResult(data: unknown): MCPToolResult;
|
|
722
|
+
/**
|
|
723
|
+
* Create an error MCP tool result
|
|
724
|
+
*/
|
|
725
|
+
export declare function errorResult(error: Error | string): MCPToolResult;
|
|
726
|
+
/**
|
|
727
|
+
* Calculate cosine similarity between two vectors
|
|
728
|
+
*/
|
|
729
|
+
export declare function cosineSimilarity(a: number[] | Float32Array, b: number[] | Float32Array): number;
|
|
730
|
+
//# sourceMappingURL=types.d.ts.map
|