agentdb 1.0.0 → 1.0.2

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +5 -5
  3. package/bin/agentdb.js +296 -65
  4. package/dist/mcp/learning/core/experience-buffer.d.ts +61 -0
  5. package/dist/mcp/learning/core/experience-buffer.d.ts.map +1 -0
  6. package/dist/mcp/learning/core/experience-buffer.js +175 -0
  7. package/dist/mcp/learning/core/experience-buffer.js.map +1 -0
  8. package/dist/mcp/learning/core/experience-buffer.mjs +170 -0
  9. package/dist/mcp/learning/core/experience-recorder.d.ts +40 -0
  10. package/dist/mcp/learning/core/experience-recorder.d.ts.map +1 -0
  11. package/dist/mcp/learning/core/experience-recorder.js +200 -0
  12. package/dist/mcp/learning/core/experience-recorder.js.map +1 -0
  13. package/dist/mcp/learning/core/experience-recorder.mjs +195 -0
  14. package/dist/mcp/learning/core/learning-manager.d.ts +66 -0
  15. package/dist/mcp/learning/core/learning-manager.d.ts.map +1 -0
  16. package/dist/mcp/learning/core/learning-manager.js +252 -0
  17. package/dist/mcp/learning/core/learning-manager.js.map +1 -0
  18. package/dist/mcp/learning/core/learning-manager.mjs +247 -0
  19. package/dist/mcp/learning/core/policy-optimizer.d.ts +53 -0
  20. package/dist/mcp/learning/core/policy-optimizer.d.ts.map +1 -0
  21. package/dist/mcp/learning/core/policy-optimizer.js +251 -0
  22. package/dist/mcp/learning/core/policy-optimizer.js.map +1 -0
  23. package/dist/mcp/learning/core/policy-optimizer.mjs +246 -0
  24. package/dist/mcp/learning/core/reward-estimator.d.ts +44 -0
  25. package/dist/mcp/learning/core/reward-estimator.d.ts.map +1 -0
  26. package/dist/mcp/learning/core/reward-estimator.js +158 -0
  27. package/dist/mcp/learning/core/reward-estimator.js.map +1 -0
  28. package/dist/mcp/learning/core/reward-estimator.mjs +153 -0
  29. package/dist/mcp/learning/core/session-manager.d.ts +63 -0
  30. package/dist/mcp/learning/core/session-manager.d.ts.map +1 -0
  31. package/dist/mcp/learning/core/session-manager.js +202 -0
  32. package/dist/mcp/learning/core/session-manager.js.map +1 -0
  33. package/dist/mcp/learning/core/session-manager.mjs +197 -0
  34. package/dist/mcp/learning/index.d.ts +19 -0
  35. package/dist/mcp/learning/index.d.ts.map +1 -0
  36. package/dist/mcp/learning/index.js +30 -0
  37. package/dist/mcp/learning/index.js.map +1 -0
  38. package/dist/mcp/learning/index.mjs +19 -0
  39. package/dist/mcp/learning/tools/mcp-learning-tools.d.ts +369 -0
  40. package/dist/mcp/learning/tools/mcp-learning-tools.d.ts.map +1 -0
  41. package/dist/mcp/learning/tools/mcp-learning-tools.js +361 -0
  42. package/dist/mcp/learning/tools/mcp-learning-tools.js.map +1 -0
  43. package/dist/mcp/learning/tools/mcp-learning-tools.mjs +356 -0
  44. package/dist/mcp/learning/types/index.d.ts +138 -0
  45. package/dist/mcp/learning/types/index.d.ts.map +1 -0
  46. package/dist/mcp/learning/types/index.js +6 -0
  47. package/dist/mcp/learning/types/index.js.map +1 -0
  48. package/dist/mcp/learning/types/index.mjs +4 -0
  49. package/dist/mcp-server.d.ts +2 -0
  50. package/dist/mcp-server.d.ts.map +1 -1
  51. package/dist/mcp-server.js +72 -4
  52. package/dist/mcp-server.js.map +1 -1
  53. package/dist/mcp-server.mjs +72 -4
  54. package/dist/wasm/sql-wasm-debug.js +6989 -0
  55. package/dist/wasm/sql-wasm-debug.wasm +0 -0
  56. package/dist/wasm/sql-wasm.js +188 -0
  57. package/dist/wasm/sql-wasm.wasm +0 -0
  58. package/dist/wasm-loader.d.ts.map +1 -1
  59. package/dist/wasm-loader.js +5 -2
  60. package/dist/wasm-loader.js.map +1 -1
  61. package/dist/wasm-loader.mjs +5 -2
  62. package/examples/mcp-learning-example.ts +220 -0
  63. package/package.json +26 -5
@@ -0,0 +1,369 @@
1
+ /**
2
+ * MCP Learning Tools - Tool definitions for MCP server integration
3
+ */
4
+ import type { LearningManager } from '../core/learning-manager.js';
5
+ export declare class MCPLearningTools {
6
+ private learningManager;
7
+ constructor(learningManager: LearningManager);
8
+ /**
9
+ * Get all tool definitions for MCP server
10
+ */
11
+ getToolDefinitions(): {
12
+ learning_start_session: {
13
+ description: string;
14
+ inputSchema: {
15
+ type: string;
16
+ properties: {
17
+ userId: {
18
+ type: string;
19
+ description: string;
20
+ };
21
+ sessionType: {
22
+ type: string;
23
+ enum: string[];
24
+ description: string;
25
+ };
26
+ plugin: {
27
+ type: string;
28
+ default: string;
29
+ description: string;
30
+ };
31
+ config: {
32
+ type: string;
33
+ description: string;
34
+ properties: {
35
+ learningRate: {
36
+ type: string;
37
+ default: number;
38
+ };
39
+ discountFactor: {
40
+ type: string;
41
+ default: number;
42
+ };
43
+ bufferSize: {
44
+ type: string;
45
+ default: number;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ required: string[];
51
+ };
52
+ };
53
+ learning_end_session: {
54
+ description: string;
55
+ inputSchema: {
56
+ type: string;
57
+ properties: {
58
+ sessionId: {
59
+ type: string;
60
+ description: string;
61
+ };
62
+ };
63
+ required: string[];
64
+ };
65
+ };
66
+ learning_predict: {
67
+ description: string;
68
+ inputSchema: {
69
+ type: string;
70
+ properties: {
71
+ sessionId: {
72
+ type: string;
73
+ description: string;
74
+ };
75
+ currentState: {
76
+ type: string;
77
+ description: string;
78
+ properties: {
79
+ taskDescription: {
80
+ type: string;
81
+ };
82
+ availableTools: {
83
+ type: string;
84
+ items: {
85
+ type: string;
86
+ };
87
+ };
88
+ previousActions: {
89
+ type: string;
90
+ items: {
91
+ type: string;
92
+ };
93
+ };
94
+ };
95
+ required: string[];
96
+ };
97
+ availableTools: {
98
+ type: string;
99
+ items: {
100
+ type: string;
101
+ };
102
+ description: string;
103
+ };
104
+ };
105
+ required: string[];
106
+ };
107
+ };
108
+ learning_feedback: {
109
+ description: string;
110
+ inputSchema: {
111
+ type: string;
112
+ properties: {
113
+ sessionId: {
114
+ type: string;
115
+ description: string;
116
+ };
117
+ actionId: {
118
+ type: string;
119
+ description: string;
120
+ };
121
+ feedback: {
122
+ type: string;
123
+ properties: {
124
+ success: {
125
+ type: string;
126
+ };
127
+ rating: {
128
+ type: string;
129
+ minimum: number;
130
+ maximum: number;
131
+ description: string;
132
+ };
133
+ comments: {
134
+ type: string;
135
+ };
136
+ dimensions: {
137
+ type: string;
138
+ properties: {
139
+ speed: {
140
+ type: string;
141
+ minimum: number;
142
+ maximum: number;
143
+ };
144
+ accuracy: {
145
+ type: string;
146
+ minimum: number;
147
+ maximum: number;
148
+ };
149
+ completeness: {
150
+ type: string;
151
+ minimum: number;
152
+ maximum: number;
153
+ };
154
+ };
155
+ };
156
+ };
157
+ required: string[];
158
+ };
159
+ };
160
+ required: string[];
161
+ };
162
+ };
163
+ learning_train: {
164
+ description: string;
165
+ inputSchema: {
166
+ type: string;
167
+ properties: {
168
+ sessionId: {
169
+ type: string;
170
+ description: string;
171
+ };
172
+ options: {
173
+ type: string;
174
+ properties: {
175
+ batchSize: {
176
+ type: string;
177
+ default: number;
178
+ };
179
+ epochs: {
180
+ type: string;
181
+ default: number;
182
+ };
183
+ learningRate: {
184
+ type: string;
185
+ default: number;
186
+ };
187
+ minExperiences: {
188
+ type: string;
189
+ default: number;
190
+ };
191
+ };
192
+ };
193
+ };
194
+ required: string[];
195
+ };
196
+ };
197
+ learning_metrics: {
198
+ description: string;
199
+ inputSchema: {
200
+ type: string;
201
+ properties: {
202
+ sessionId: {
203
+ type: string;
204
+ description: string;
205
+ };
206
+ period: {
207
+ type: string;
208
+ enum: string[];
209
+ default: string;
210
+ description: string;
211
+ };
212
+ };
213
+ required: string[];
214
+ };
215
+ };
216
+ learning_transfer: {
217
+ description: string;
218
+ inputSchema: {
219
+ type: string;
220
+ properties: {
221
+ sourceSessionId: {
222
+ type: string;
223
+ description: string;
224
+ };
225
+ targetSessionId: {
226
+ type: string;
227
+ description: string;
228
+ };
229
+ similarity: {
230
+ type: string;
231
+ minimum: number;
232
+ maximum: number;
233
+ default: number;
234
+ description: string;
235
+ };
236
+ };
237
+ required: string[];
238
+ };
239
+ };
240
+ learning_explain: {
241
+ description: string;
242
+ inputSchema: {
243
+ type: string;
244
+ properties: {
245
+ sessionId: {
246
+ type: string;
247
+ description: string;
248
+ };
249
+ state: {
250
+ type: string;
251
+ description: string;
252
+ properties: {
253
+ taskDescription: {
254
+ type: string;
255
+ };
256
+ availableTools: {
257
+ type: string;
258
+ items: {
259
+ type: string;
260
+ };
261
+ };
262
+ };
263
+ required: string[];
264
+ };
265
+ };
266
+ required: string[];
267
+ };
268
+ };
269
+ experience_record: {
270
+ description: string;
271
+ inputSchema: {
272
+ type: string;
273
+ properties: {
274
+ sessionId: {
275
+ type: string;
276
+ description: string;
277
+ };
278
+ toolName: {
279
+ type: string;
280
+ description: string;
281
+ };
282
+ args: {
283
+ type: string;
284
+ description: string;
285
+ };
286
+ result: {
287
+ description: string;
288
+ };
289
+ outcome: {
290
+ type: string;
291
+ properties: {
292
+ success: {
293
+ type: string;
294
+ };
295
+ executionTime: {
296
+ type: string;
297
+ };
298
+ tokensUsed: {
299
+ type: string;
300
+ };
301
+ error: {
302
+ type: string;
303
+ };
304
+ };
305
+ required: string[];
306
+ };
307
+ };
308
+ required: string[];
309
+ };
310
+ };
311
+ reward_signal: {
312
+ description: string;
313
+ inputSchema: {
314
+ type: string;
315
+ properties: {
316
+ outcome: {
317
+ type: string;
318
+ properties: {
319
+ success: {
320
+ type: string;
321
+ };
322
+ executionTime: {
323
+ type: string;
324
+ };
325
+ tokensUsed: {
326
+ type: string;
327
+ };
328
+ result: {
329
+ description: string;
330
+ };
331
+ };
332
+ required: string[];
333
+ };
334
+ context: {
335
+ type: string;
336
+ properties: {
337
+ userId: {
338
+ type: string;
339
+ };
340
+ sessionId: {
341
+ type: string;
342
+ };
343
+ taskType: {
344
+ type: string;
345
+ enum: string[];
346
+ };
347
+ timestamp: {
348
+ type: string;
349
+ };
350
+ };
351
+ required: string[];
352
+ };
353
+ userRating: {
354
+ type: string;
355
+ minimum: number;
356
+ maximum: number;
357
+ description: string;
358
+ };
359
+ };
360
+ required: string[];
361
+ };
362
+ };
363
+ };
364
+ /**
365
+ * Handle tool calls
366
+ */
367
+ handleToolCall(toolName: string, args: any): Promise<any>;
368
+ }
369
+ //# sourceMappingURL=mcp-learning-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-learning-tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/learning/tools/mcp-learning-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAQnE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,eAAe,CAAkB;gBAE7B,eAAe,EAAE,eAAe;IAI5C;;OAEG;IACH,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwSlB;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAiGhE"}