@blackms/aistack 1.3.1 → 1.4.0

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 (76) hide show
  1. package/README.md +533 -411
  2. package/README.md.backup +617 -0
  3. package/dist/agents/identity-service.d.ts +89 -0
  4. package/dist/agents/identity-service.d.ts.map +1 -0
  5. package/dist/agents/identity-service.js +280 -0
  6. package/dist/agents/identity-service.js.map +1 -0
  7. package/dist/agents/index.d.ts +1 -0
  8. package/dist/agents/index.d.ts.map +1 -1
  9. package/dist/agents/index.js +1 -0
  10. package/dist/agents/index.js.map +1 -1
  11. package/dist/agents/spawner.d.ts +2 -0
  12. package/dist/agents/spawner.d.ts.map +1 -1
  13. package/dist/agents/spawner.js +60 -2
  14. package/dist/agents/spawner.js.map +1 -1
  15. package/dist/cli/commands/agent-watch.d.ts +17 -0
  16. package/dist/cli/commands/agent-watch.d.ts.map +1 -0
  17. package/dist/cli/commands/agent-watch.js +108 -0
  18. package/dist/cli/commands/agent-watch.js.map +1 -0
  19. package/dist/cli/commands/agent.d.ts.map +1 -1
  20. package/dist/cli/commands/agent.js +15 -0
  21. package/dist/cli/commands/agent.js.map +1 -1
  22. package/dist/cli/utils/terminal.d.ts +58 -0
  23. package/dist/cli/utils/terminal.d.ts.map +1 -0
  24. package/dist/cli/utils/terminal.js +130 -0
  25. package/dist/cli/utils/terminal.js.map +1 -0
  26. package/dist/cli/utils/watch-renderer.d.ts +51 -0
  27. package/dist/cli/utils/watch-renderer.d.ts.map +1 -0
  28. package/dist/cli/utils/watch-renderer.js +146 -0
  29. package/dist/cli/utils/watch-renderer.js.map +1 -0
  30. package/dist/mcp/server.d.ts.map +1 -1
  31. package/dist/mcp/server.js +2 -1
  32. package/dist/mcp/server.js.map +1 -1
  33. package/dist/mcp/tools/identity-tools.d.ts +435 -0
  34. package/dist/mcp/tools/identity-tools.d.ts.map +1 -0
  35. package/dist/mcp/tools/identity-tools.js +409 -0
  36. package/dist/mcp/tools/identity-tools.js.map +1 -0
  37. package/dist/mcp/tools/index.d.ts +1 -0
  38. package/dist/mcp/tools/index.d.ts.map +1 -1
  39. package/dist/mcp/tools/index.js +1 -0
  40. package/dist/mcp/tools/index.js.map +1 -1
  41. package/dist/mcp/tools/memory-tools.d.ts +23 -0
  42. package/dist/mcp/tools/memory-tools.d.ts.map +1 -1
  43. package/dist/mcp/tools/memory-tools.js +20 -1
  44. package/dist/mcp/tools/memory-tools.js.map +1 -1
  45. package/dist/memory/fts-search.d.ts +2 -0
  46. package/dist/memory/fts-search.d.ts.map +1 -1
  47. package/dist/memory/fts-search.js +14 -2
  48. package/dist/memory/fts-search.js.map +1 -1
  49. package/dist/memory/index.d.ts +34 -1
  50. package/dist/memory/index.d.ts.map +1 -1
  51. package/dist/memory/index.js +59 -6
  52. package/dist/memory/index.js.map +1 -1
  53. package/dist/memory/sqlite-store.d.ts +62 -3
  54. package/dist/memory/sqlite-store.d.ts.map +1 -1
  55. package/dist/memory/sqlite-store.js +289 -17
  56. package/dist/memory/sqlite-store.js.map +1 -1
  57. package/dist/memory/vector-search.d.ts +2 -0
  58. package/dist/memory/vector-search.d.ts.map +1 -1
  59. package/dist/memory/vector-search.js +7 -3
  60. package/dist/memory/vector-search.js.map +1 -1
  61. package/dist/types.d.ts +40 -0
  62. package/dist/types.d.ts.map +1 -1
  63. package/dist/types.js +7 -0
  64. package/dist/types.js.map +1 -1
  65. package/dist/web/routes/identities.d.ts +7 -0
  66. package/dist/web/routes/identities.d.ts.map +1 -0
  67. package/dist/web/routes/identities.js +216 -0
  68. package/dist/web/routes/identities.js.map +1 -0
  69. package/dist/web/routes/index.d.ts +1 -0
  70. package/dist/web/routes/index.d.ts.map +1 -1
  71. package/dist/web/routes/index.js +1 -0
  72. package/dist/web/routes/index.js.map +1 -1
  73. package/dist/web/server.d.ts.map +1 -1
  74. package/dist/web/server.js +3 -1
  75. package/dist/web/server.js.map +1 -1
  76. package/package.json +2 -2
@@ -0,0 +1,435 @@
1
+ /**
2
+ * Identity MCP tools - manage agent identities
3
+ */
4
+ import type { AgentStackConfig, AgentIdentityStatus } from '../../types.js';
5
+ export declare function createIdentityTools(config: AgentStackConfig): {
6
+ identity_create: {
7
+ name: string;
8
+ description: string;
9
+ inputSchema: {
10
+ type: string;
11
+ properties: {
12
+ agentType: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ displayName: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ description: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ capabilities: {
25
+ type: string;
26
+ items: {
27
+ type: string;
28
+ properties: {
29
+ name: {
30
+ type: string;
31
+ };
32
+ version: {
33
+ type: string;
34
+ };
35
+ enabled: {
36
+ type: string;
37
+ };
38
+ metadata: {
39
+ type: string;
40
+ };
41
+ };
42
+ required: string[];
43
+ };
44
+ description: string;
45
+ };
46
+ metadata: {
47
+ type: string;
48
+ description: string;
49
+ };
50
+ createdBy: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ autoActivate: {
55
+ type: string;
56
+ description: string;
57
+ };
58
+ };
59
+ required: string[];
60
+ };
61
+ handler: (params: Record<string, unknown>) => Promise<{
62
+ success: boolean;
63
+ identity: {
64
+ agentId: string;
65
+ agentType: string;
66
+ status: string;
67
+ capabilities: unknown[];
68
+ version: number;
69
+ displayName: string | undefined;
70
+ description: string | undefined;
71
+ metadata: Record<string, unknown> | undefined;
72
+ createdAt: string;
73
+ lastActiveAt: string;
74
+ retiredAt: string | undefined;
75
+ retirementReason: string | undefined;
76
+ createdBy: string | undefined;
77
+ updatedAt: string;
78
+ };
79
+ error?: undefined;
80
+ } | {
81
+ success: boolean;
82
+ error: string;
83
+ identity?: undefined;
84
+ }>;
85
+ };
86
+ identity_get: {
87
+ name: string;
88
+ description: string;
89
+ inputSchema: {
90
+ type: string;
91
+ properties: {
92
+ agentId: {
93
+ type: string;
94
+ description: string;
95
+ };
96
+ displayName: {
97
+ type: string;
98
+ description: string;
99
+ };
100
+ };
101
+ };
102
+ handler: (params: Record<string, unknown>) => Promise<{
103
+ found: boolean;
104
+ error: string;
105
+ message?: undefined;
106
+ identity?: undefined;
107
+ } | {
108
+ found: boolean;
109
+ message: string;
110
+ error?: undefined;
111
+ identity?: undefined;
112
+ } | {
113
+ found: boolean;
114
+ identity: {
115
+ agentId: string;
116
+ agentType: string;
117
+ status: string;
118
+ capabilities: unknown[];
119
+ version: number;
120
+ displayName: string | undefined;
121
+ description: string | undefined;
122
+ metadata: Record<string, unknown> | undefined;
123
+ createdAt: string;
124
+ lastActiveAt: string;
125
+ retiredAt: string | undefined;
126
+ retirementReason: string | undefined;
127
+ createdBy: string | undefined;
128
+ updatedAt: string;
129
+ };
130
+ error?: undefined;
131
+ message?: undefined;
132
+ }>;
133
+ };
134
+ identity_list: {
135
+ name: string;
136
+ description: string;
137
+ inputSchema: {
138
+ type: string;
139
+ properties: {
140
+ status: {
141
+ type: string;
142
+ enum: string[];
143
+ description: string;
144
+ };
145
+ agentType: {
146
+ type: string;
147
+ description: string;
148
+ };
149
+ limit: {
150
+ type: string;
151
+ description: string;
152
+ };
153
+ offset: {
154
+ type: string;
155
+ description: string;
156
+ };
157
+ };
158
+ };
159
+ handler: (params: Record<string, unknown>) => Promise<{
160
+ count: number;
161
+ identities: {
162
+ agentId: string;
163
+ agentType: string;
164
+ status: string;
165
+ capabilities: unknown[];
166
+ version: number;
167
+ displayName: string | undefined;
168
+ description: string | undefined;
169
+ metadata: Record<string, unknown> | undefined;
170
+ createdAt: string;
171
+ lastActiveAt: string;
172
+ retiredAt: string | undefined;
173
+ retirementReason: string | undefined;
174
+ createdBy: string | undefined;
175
+ updatedAt: string;
176
+ }[];
177
+ error?: undefined;
178
+ } | {
179
+ count: number;
180
+ identities: never[];
181
+ error: string;
182
+ }>;
183
+ };
184
+ identity_update: {
185
+ name: string;
186
+ description: string;
187
+ inputSchema: {
188
+ type: string;
189
+ properties: {
190
+ agentId: {
191
+ type: string;
192
+ description: string;
193
+ };
194
+ displayName: {
195
+ type: string;
196
+ description: string;
197
+ };
198
+ description: {
199
+ type: string;
200
+ description: string;
201
+ };
202
+ metadata: {
203
+ type: string;
204
+ description: string;
205
+ };
206
+ capabilities: {
207
+ type: string;
208
+ items: {
209
+ type: string;
210
+ properties: {
211
+ name: {
212
+ type: string;
213
+ };
214
+ version: {
215
+ type: string;
216
+ };
217
+ enabled: {
218
+ type: string;
219
+ };
220
+ metadata: {
221
+ type: string;
222
+ };
223
+ };
224
+ required: string[];
225
+ };
226
+ description: string;
227
+ };
228
+ actorId: {
229
+ type: string;
230
+ description: string;
231
+ };
232
+ };
233
+ required: string[];
234
+ };
235
+ handler: (params: Record<string, unknown>) => Promise<{
236
+ success: boolean;
237
+ error: string;
238
+ identity?: undefined;
239
+ } | {
240
+ success: boolean;
241
+ identity: {
242
+ agentId: string;
243
+ agentType: string;
244
+ status: string;
245
+ capabilities: unknown[];
246
+ version: number;
247
+ displayName: string | undefined;
248
+ description: string | undefined;
249
+ metadata: Record<string, unknown> | undefined;
250
+ createdAt: string;
251
+ lastActiveAt: string;
252
+ retiredAt: string | undefined;
253
+ retirementReason: string | undefined;
254
+ createdBy: string | undefined;
255
+ updatedAt: string;
256
+ };
257
+ error?: undefined;
258
+ }>;
259
+ };
260
+ identity_activate: {
261
+ name: string;
262
+ description: string;
263
+ inputSchema: {
264
+ type: string;
265
+ properties: {
266
+ agentId: {
267
+ type: string;
268
+ description: string;
269
+ };
270
+ actorId: {
271
+ type: string;
272
+ description: string;
273
+ };
274
+ };
275
+ required: string[];
276
+ };
277
+ handler: (params: Record<string, unknown>) => Promise<{
278
+ success: boolean;
279
+ identity: {
280
+ agentId: string;
281
+ agentType: string;
282
+ status: string;
283
+ capabilities: unknown[];
284
+ version: number;
285
+ displayName: string | undefined;
286
+ description: string | undefined;
287
+ metadata: Record<string, unknown> | undefined;
288
+ createdAt: string;
289
+ lastActiveAt: string;
290
+ retiredAt: string | undefined;
291
+ retirementReason: string | undefined;
292
+ createdBy: string | undefined;
293
+ updatedAt: string;
294
+ };
295
+ error?: undefined;
296
+ } | {
297
+ success: boolean;
298
+ error: string;
299
+ identity?: undefined;
300
+ }>;
301
+ };
302
+ identity_deactivate: {
303
+ name: string;
304
+ description: string;
305
+ inputSchema: {
306
+ type: string;
307
+ properties: {
308
+ agentId: {
309
+ type: string;
310
+ description: string;
311
+ };
312
+ reason: {
313
+ type: string;
314
+ description: string;
315
+ };
316
+ actorId: {
317
+ type: string;
318
+ description: string;
319
+ };
320
+ };
321
+ required: string[];
322
+ };
323
+ handler: (params: Record<string, unknown>) => Promise<{
324
+ success: boolean;
325
+ identity: {
326
+ agentId: string;
327
+ agentType: string;
328
+ status: string;
329
+ capabilities: unknown[];
330
+ version: number;
331
+ displayName: string | undefined;
332
+ description: string | undefined;
333
+ metadata: Record<string, unknown> | undefined;
334
+ createdAt: string;
335
+ lastActiveAt: string;
336
+ retiredAt: string | undefined;
337
+ retirementReason: string | undefined;
338
+ createdBy: string | undefined;
339
+ updatedAt: string;
340
+ };
341
+ error?: undefined;
342
+ } | {
343
+ success: boolean;
344
+ error: string;
345
+ identity?: undefined;
346
+ }>;
347
+ };
348
+ identity_retire: {
349
+ name: string;
350
+ description: string;
351
+ inputSchema: {
352
+ type: string;
353
+ properties: {
354
+ agentId: {
355
+ type: string;
356
+ description: string;
357
+ };
358
+ reason: {
359
+ type: string;
360
+ description: string;
361
+ };
362
+ actorId: {
363
+ type: string;
364
+ description: string;
365
+ };
366
+ };
367
+ required: string[];
368
+ };
369
+ handler: (params: Record<string, unknown>) => Promise<{
370
+ success: boolean;
371
+ identity: {
372
+ agentId: string;
373
+ agentType: string;
374
+ status: string;
375
+ capabilities: unknown[];
376
+ version: number;
377
+ displayName: string | undefined;
378
+ description: string | undefined;
379
+ metadata: Record<string, unknown> | undefined;
380
+ createdAt: string;
381
+ lastActiveAt: string;
382
+ retiredAt: string | undefined;
383
+ retirementReason: string | undefined;
384
+ createdBy: string | undefined;
385
+ updatedAt: string;
386
+ };
387
+ error?: undefined;
388
+ } | {
389
+ success: boolean;
390
+ error: string;
391
+ identity?: undefined;
392
+ }>;
393
+ };
394
+ identity_audit: {
395
+ name: string;
396
+ description: string;
397
+ inputSchema: {
398
+ type: string;
399
+ properties: {
400
+ agentId: {
401
+ type: string;
402
+ description: string;
403
+ };
404
+ limit: {
405
+ type: string;
406
+ description: string;
407
+ };
408
+ };
409
+ required: string[];
410
+ };
411
+ handler: (params: Record<string, unknown>) => Promise<{
412
+ success: boolean;
413
+ error: string;
414
+ agentId?: undefined;
415
+ count?: undefined;
416
+ entries?: undefined;
417
+ } | {
418
+ agentId: string;
419
+ count: number;
420
+ entries: {
421
+ id: string;
422
+ action: "created" | "retired" | "activated" | "deactivated" | "updated" | "spawned";
423
+ previousStatus: AgentIdentityStatus | undefined;
424
+ newStatus: AgentIdentityStatus | undefined;
425
+ reason: string | undefined;
426
+ actorId: string | undefined;
427
+ metadata: Record<string, unknown> | undefined;
428
+ timestamp: string;
429
+ }[];
430
+ success?: undefined;
431
+ error?: undefined;
432
+ }>;
433
+ };
434
+ };
435
+ //# sourceMappingURL=identity-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/identity-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AA0F5E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA+B9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsCvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAwDvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsDvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA+CvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAgCvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAoCvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmCvB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;EAwCpD"}