@happyvertical/smrt-agents 0.30.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 (94) hide show
  1. package/AGENTS.md +96 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +139 -0
  5. package/dist/__smrt-register__.d.ts +2 -0
  6. package/dist/__smrt-register__.d.ts.map +1 -0
  7. package/dist/agent.d.ts +545 -0
  8. package/dist/agent.d.ts.map +1 -0
  9. package/dist/ai-config.d.ts +27 -0
  10. package/dist/ai-config.d.ts.map +1 -0
  11. package/dist/chunks/config-BYbOxt24.js +179 -0
  12. package/dist/chunks/config-BYbOxt24.js.map +1 -0
  13. package/dist/chunks/manifest-utils-DLXfTOq0.js +69 -0
  14. package/dist/chunks/manifest-utils-DLXfTOq0.js.map +1 -0
  15. package/dist/config.d.ts +117 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/identity.d.ts +19 -0
  18. package/dist/identity.d.ts.map +1 -0
  19. package/dist/index.d.ts +13 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +1477 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/interests.d.ts +291 -0
  24. package/dist/interests.d.ts.map +1 -0
  25. package/dist/manifest.json +2012 -0
  26. package/dist/playground.d.ts +2 -0
  27. package/dist/playground.d.ts.map +1 -0
  28. package/dist/playground.js +156 -0
  29. package/dist/playground.js.map +1 -0
  30. package/dist/schedule.d.ts +168 -0
  31. package/dist/schedule.d.ts.map +1 -0
  32. package/dist/server/action-types.d.ts +65 -0
  33. package/dist/server/action-types.d.ts.map +1 -0
  34. package/dist/server/action-types.js +2 -0
  35. package/dist/server/action-types.js.map +1 -0
  36. package/dist/server/api-routes.d.ts +57 -0
  37. package/dist/server/api-routes.d.ts.map +1 -0
  38. package/dist/server/config-loader.d.ts +17 -0
  39. package/dist/server/config-loader.d.ts.map +1 -0
  40. package/dist/server/index.d.ts +34 -0
  41. package/dist/server/index.d.ts.map +1 -0
  42. package/dist/server/manifest-utils.d.ts +63 -0
  43. package/dist/server/manifest-utils.d.ts.map +1 -0
  44. package/dist/server/serialization.d.ts +58 -0
  45. package/dist/server/serialization.d.ts.map +1 -0
  46. package/dist/server.js +105 -0
  47. package/dist/server.js.map +1 -0
  48. package/dist/smrt-knowledge.json +983 -0
  49. package/dist/summary-article.d.ts +30 -0
  50. package/dist/summary-article.d.ts.map +1 -0
  51. package/dist/summary-article.js +2 -0
  52. package/dist/summary-article.js.map +1 -0
  53. package/dist/svelte/components/AgentDashboard.svelte +250 -0
  54. package/dist/svelte/components/AgentDashboard.svelte.d.ts +21 -0
  55. package/dist/svelte/components/AgentDashboard.svelte.d.ts.map +1 -0
  56. package/dist/svelte/components/AgentRunHistory.svelte +225 -0
  57. package/dist/svelte/components/AgentRunHistory.svelte.d.ts +16 -0
  58. package/dist/svelte/components/AgentRunHistory.svelte.d.ts.map +1 -0
  59. package/dist/svelte/components/AgentScheduleForm.svelte +381 -0
  60. package/dist/svelte/components/AgentScheduleForm.svelte.d.ts +19 -0
  61. package/dist/svelte/components/AgentScheduleForm.svelte.d.ts.map +1 -0
  62. package/dist/svelte/components/AgentScheduleList.svelte +370 -0
  63. package/dist/svelte/components/AgentScheduleList.svelte.d.ts +24 -0
  64. package/dist/svelte/components/AgentScheduleList.svelte.d.ts.map +1 -0
  65. package/dist/svelte/components/ScheduleStatusBadge.svelte +23 -0
  66. package/dist/svelte/components/ScheduleStatusBadge.svelte.d.ts +9 -0
  67. package/dist/svelte/components/ScheduleStatusBadge.svelte.d.ts.map +1 -0
  68. package/dist/svelte/i18n.d.ts +33 -0
  69. package/dist/svelte/i18n.d.ts.map +1 -0
  70. package/dist/svelte/i18n.js +37 -0
  71. package/dist/svelte/index.d.ts +23 -0
  72. package/dist/svelte/index.d.ts.map +1 -0
  73. package/dist/svelte/index.js +26 -0
  74. package/dist/svelte/playground.d.ts +196 -0
  75. package/dist/svelte/playground.d.ts.map +1 -0
  76. package/dist/svelte/playground.js +151 -0
  77. package/dist/svelte/types.d.ts +155 -0
  78. package/dist/svelte/types.d.ts.map +1 -0
  79. package/dist/svelte/types.js +116 -0
  80. package/dist/tenant-agent.d.ts +106 -0
  81. package/dist/tenant-agent.d.ts.map +1 -0
  82. package/dist/types.d.ts +5 -0
  83. package/dist/types.d.ts.map +1 -0
  84. package/dist/types.js +2 -0
  85. package/dist/types.js.map +1 -0
  86. package/dist/ui.d.ts +298 -0
  87. package/dist/ui.d.ts.map +1 -0
  88. package/dist/ui.js +133 -0
  89. package/dist/ui.js.map +1 -0
  90. package/dist/vite-plugin.d.ts +61 -0
  91. package/dist/vite-plugin.d.ts.map +1 -0
  92. package/dist/vite-plugin.js +173 -0
  93. package/dist/vite-plugin.js.map +1 -0
  94. package/package.json +104 -0
@@ -0,0 +1,2012 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177118019,
4
+ "packageName": "@happyvertical/smrt-agents",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-agents:Agent": {
8
+ "name": "agent",
9
+ "className": "Agent",
10
+ "qualifiedName": "@happyvertical/smrt-agents:Agent",
11
+ "collection": "agents",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/agent.ts",
13
+ "packageName": "@happyvertical/smrt-agents",
14
+ "fields": {
15
+ "created_at": {
16
+ "type": "datetime",
17
+ "required": false
18
+ },
19
+ "updated_at": {
20
+ "type": "datetime",
21
+ "required": false
22
+ },
23
+ "tenantId": {
24
+ "type": "text",
25
+ "required": false,
26
+ "_meta": {
27
+ "sqlType": "UUID",
28
+ "nullable": true,
29
+ "__tenancy": {
30
+ "isTenantIdField": true,
31
+ "autoFilter": true,
32
+ "required": false,
33
+ "autoPopulate": true,
34
+ "nullable": true,
35
+ "mode": "optional",
36
+ "field": "tenantId",
37
+ "allowSuperAdminBypass": false
38
+ }
39
+ }
40
+ },
41
+ "status": {
42
+ "type": "text",
43
+ "required": false,
44
+ "default": "idle"
45
+ }
46
+ },
47
+ "methods": {
48
+ "getAiUsageSnapshot": {
49
+ "name": "getAiUsageSnapshot",
50
+ "async": false,
51
+ "parameters": [],
52
+ "returnType": "AiUsageSnapshot | undefined",
53
+ "isStatic": false,
54
+ "isPublic": true
55
+ },
56
+ "resetAiUsage": {
57
+ "name": "resetAiUsage",
58
+ "async": false,
59
+ "parameters": [],
60
+ "returnType": "void",
61
+ "isStatic": false,
62
+ "isPublic": true
63
+ },
64
+ "listAiUsage": {
65
+ "name": "listAiUsage",
66
+ "async": true,
67
+ "parameters": [
68
+ {
69
+ "name": "options",
70
+ "type": "AiUsageListOptions",
71
+ "optional": true
72
+ }
73
+ ],
74
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
75
+ "isStatic": false,
76
+ "isPublic": true
77
+ },
78
+ "summarizeAiUsage": {
79
+ "name": "summarizeAiUsage",
80
+ "async": true,
81
+ "parameters": [
82
+ {
83
+ "name": "options",
84
+ "type": "AiUsageSummaryOptions",
85
+ "optional": true
86
+ }
87
+ ],
88
+ "returnType": "Promise<Record<string, AiUsageStats>>",
89
+ "isStatic": false,
90
+ "isPublic": true
91
+ },
92
+ "destroy": {
93
+ "name": "destroy",
94
+ "async": false,
95
+ "parameters": [],
96
+ "returnType": "void",
97
+ "isStatic": false,
98
+ "isPublic": true
99
+ },
100
+ "markAsPersisted": {
101
+ "name": "markAsPersisted",
102
+ "async": false,
103
+ "parameters": [],
104
+ "returnType": "void",
105
+ "isStatic": false,
106
+ "isPublic": true
107
+ },
108
+ "initialize": {
109
+ "name": "initialize",
110
+ "async": true,
111
+ "parameters": [],
112
+ "returnType": "Promise",
113
+ "isStatic": false,
114
+ "isPublic": true
115
+ },
116
+ "loadDataFromDb": {
117
+ "name": "loadDataFromDb",
118
+ "async": true,
119
+ "parameters": [
120
+ {
121
+ "name": "data",
122
+ "type": "any",
123
+ "optional": false
124
+ }
125
+ ],
126
+ "returnType": "any",
127
+ "isStatic": false,
128
+ "isPublic": true
129
+ },
130
+ "getFields": {
131
+ "name": "getFields",
132
+ "async": true,
133
+ "parameters": [],
134
+ "returnType": "any",
135
+ "isStatic": false,
136
+ "isPublic": true
137
+ },
138
+ "toJSON": {
139
+ "name": "toJSON",
140
+ "async": false,
141
+ "parameters": [],
142
+ "returnType": "any",
143
+ "isStatic": false,
144
+ "isPublic": true
145
+ },
146
+ "toPlainObject": {
147
+ "name": "toPlainObject",
148
+ "async": false,
149
+ "parameters": [],
150
+ "returnType": "Record<string>",
151
+ "isStatic": false,
152
+ "isPublic": true
153
+ },
154
+ "toPublicJSON": {
155
+ "name": "toPublicJSON",
156
+ "async": false,
157
+ "parameters": [],
158
+ "returnType": "Record<string>",
159
+ "isStatic": false,
160
+ "isPublic": true
161
+ },
162
+ "getId": {
163
+ "name": "getId",
164
+ "async": true,
165
+ "parameters": [],
166
+ "returnType": "any",
167
+ "isStatic": false,
168
+ "isPublic": true
169
+ },
170
+ "getSlug": {
171
+ "name": "getSlug",
172
+ "async": true,
173
+ "parameters": [],
174
+ "returnType": "any",
175
+ "isStatic": false,
176
+ "isPublic": true
177
+ },
178
+ "getSavedId": {
179
+ "name": "getSavedId",
180
+ "async": true,
181
+ "parameters": [],
182
+ "returnType": "any",
183
+ "isStatic": false,
184
+ "isPublic": true
185
+ },
186
+ "isSaved": {
187
+ "name": "isSaved",
188
+ "async": true,
189
+ "parameters": [],
190
+ "returnType": "any",
191
+ "isStatic": false,
192
+ "isPublic": true
193
+ },
194
+ "save": {
195
+ "name": "save",
196
+ "async": true,
197
+ "parameters": [],
198
+ "returnType": "any",
199
+ "isStatic": false,
200
+ "isPublic": true
201
+ },
202
+ "classifyConstraintError": {
203
+ "name": "classifyConstraintError",
204
+ "async": false,
205
+ "parameters": [
206
+ {
207
+ "name": "message",
208
+ "type": "string",
209
+ "optional": false
210
+ }
211
+ ],
212
+ "returnType": "'unique' | 'not_null' | null",
213
+ "isStatic": true,
214
+ "isPublic": true
215
+ },
216
+ "loadFromId": {
217
+ "name": "loadFromId",
218
+ "async": true,
219
+ "parameters": [],
220
+ "returnType": "any",
221
+ "isStatic": false,
222
+ "isPublic": true
223
+ },
224
+ "loadFromSlug": {
225
+ "name": "loadFromSlug",
226
+ "async": true,
227
+ "parameters": [],
228
+ "returnType": "any",
229
+ "isStatic": false,
230
+ "isPublic": true
231
+ },
232
+ "is": {
233
+ "name": "is",
234
+ "async": true,
235
+ "parameters": [
236
+ {
237
+ "name": "criteria",
238
+ "type": "string",
239
+ "optional": false
240
+ },
241
+ {
242
+ "name": "options",
243
+ "type": "any",
244
+ "optional": true
245
+ }
246
+ ],
247
+ "returnType": "any",
248
+ "isStatic": false,
249
+ "isPublic": true
250
+ },
251
+ "do": {
252
+ "name": "do",
253
+ "async": true,
254
+ "parameters": [
255
+ {
256
+ "name": "instructions",
257
+ "type": "string",
258
+ "optional": false
259
+ },
260
+ {
261
+ "name": "options",
262
+ "type": "any",
263
+ "optional": true
264
+ }
265
+ ],
266
+ "returnType": "any",
267
+ "isStatic": false,
268
+ "isPublic": true
269
+ },
270
+ "describe": {
271
+ "name": "describe",
272
+ "async": true,
273
+ "parameters": [
274
+ {
275
+ "name": "options",
276
+ "type": "any",
277
+ "optional": true
278
+ }
279
+ ],
280
+ "returnType": "any",
281
+ "isStatic": false,
282
+ "isPublic": true
283
+ },
284
+ "delete": {
285
+ "name": "delete",
286
+ "async": true,
287
+ "parameters": [],
288
+ "returnType": "Promise<void>",
289
+ "isStatic": false,
290
+ "isPublic": true
291
+ },
292
+ "isRelatedLoaded": {
293
+ "name": "isRelatedLoaded",
294
+ "async": false,
295
+ "parameters": [
296
+ {
297
+ "name": "fieldName",
298
+ "type": "string",
299
+ "optional": false
300
+ }
301
+ ],
302
+ "returnType": "boolean",
303
+ "isStatic": false,
304
+ "isPublic": true
305
+ },
306
+ "loadRelated": {
307
+ "name": "loadRelated",
308
+ "async": true,
309
+ "parameters": [
310
+ {
311
+ "name": "fieldName",
312
+ "type": "string",
313
+ "optional": false
314
+ },
315
+ {
316
+ "name": "opts",
317
+ "type": "LoadRelatedOptions",
318
+ "optional": true
319
+ }
320
+ ],
321
+ "returnType": "Promise<any>",
322
+ "isStatic": false,
323
+ "isPublic": true
324
+ },
325
+ "loadRelatedMany": {
326
+ "name": "loadRelatedMany",
327
+ "async": true,
328
+ "parameters": [
329
+ {
330
+ "name": "fieldName",
331
+ "type": "string",
332
+ "optional": false
333
+ },
334
+ {
335
+ "name": "opts",
336
+ "type": "LoadRelatedOptions",
337
+ "optional": true
338
+ }
339
+ ],
340
+ "returnType": "Promise<any[]>",
341
+ "isStatic": false,
342
+ "isPublic": true
343
+ },
344
+ "getRelated": {
345
+ "name": "getRelated",
346
+ "async": true,
347
+ "parameters": [
348
+ {
349
+ "name": "fieldName",
350
+ "type": "string",
351
+ "optional": false
352
+ },
353
+ {
354
+ "name": "opts",
355
+ "type": "LoadRelatedOptions",
356
+ "optional": true
357
+ }
358
+ ],
359
+ "returnType": "Promise<any>",
360
+ "isStatic": false,
361
+ "isPublic": true
362
+ },
363
+ "getAvailableTools": {
364
+ "name": "getAvailableTools",
365
+ "async": false,
366
+ "parameters": [],
367
+ "returnType": "AITool[]",
368
+ "isStatic": false,
369
+ "isPublic": true
370
+ },
371
+ "executeToolCall": {
372
+ "name": "executeToolCall",
373
+ "async": true,
374
+ "parameters": [
375
+ {
376
+ "name": "toolCall",
377
+ "type": "ToolCall",
378
+ "optional": false
379
+ }
380
+ ],
381
+ "returnType": "Promise<ToolCallResult>",
382
+ "isStatic": false,
383
+ "isPublic": true
384
+ },
385
+ "remember": {
386
+ "name": "remember",
387
+ "async": true,
388
+ "parameters": [
389
+ {
390
+ "name": "options",
391
+ "type": "object",
392
+ "optional": false
393
+ }
394
+ ],
395
+ "returnType": "Promise<void>",
396
+ "isStatic": false,
397
+ "isPublic": true
398
+ },
399
+ "recall": {
400
+ "name": "recall",
401
+ "async": true,
402
+ "parameters": [
403
+ {
404
+ "name": "options",
405
+ "type": "object",
406
+ "optional": false
407
+ }
408
+ ],
409
+ "returnType": "Promise<any | null>",
410
+ "isStatic": false,
411
+ "isPublic": true
412
+ },
413
+ "recallAll": {
414
+ "name": "recallAll",
415
+ "async": true,
416
+ "parameters": [
417
+ {
418
+ "name": "options",
419
+ "type": "object",
420
+ "optional": true
421
+ }
422
+ ],
423
+ "returnType": "Promise<Map<string, any>>",
424
+ "isStatic": false,
425
+ "isPublic": true
426
+ },
427
+ "forget": {
428
+ "name": "forget",
429
+ "async": true,
430
+ "parameters": [
431
+ {
432
+ "name": "options",
433
+ "type": "object",
434
+ "optional": false
435
+ }
436
+ ],
437
+ "returnType": "Promise<void>",
438
+ "isStatic": false,
439
+ "isPublic": true
440
+ },
441
+ "forgetScope": {
442
+ "name": "forgetScope",
443
+ "async": true,
444
+ "parameters": [
445
+ {
446
+ "name": "options",
447
+ "type": "object",
448
+ "optional": false
449
+ }
450
+ ],
451
+ "returnType": "Promise<number>",
452
+ "isStatic": false,
453
+ "isPublic": true
454
+ },
455
+ "generateEmbeddings": {
456
+ "name": "generateEmbeddings",
457
+ "async": true,
458
+ "parameters": [
459
+ {
460
+ "name": "options",
461
+ "type": "GenerateEmbeddingsOptions",
462
+ "optional": true
463
+ }
464
+ ],
465
+ "returnType": "Promise<void>",
466
+ "isStatic": false,
467
+ "isPublic": true
468
+ },
469
+ "getEmbedding": {
470
+ "name": "getEmbedding",
471
+ "async": true,
472
+ "parameters": [
473
+ {
474
+ "name": "fieldName",
475
+ "type": "string",
476
+ "optional": false
477
+ },
478
+ {
479
+ "name": "model",
480
+ "type": "string",
481
+ "optional": true
482
+ }
483
+ ],
484
+ "returnType": "Promise<number[] | null>",
485
+ "isStatic": false,
486
+ "isPublic": true
487
+ },
488
+ "hasStaleEmbeddings": {
489
+ "name": "hasStaleEmbeddings",
490
+ "async": true,
491
+ "parameters": [],
492
+ "returnType": "Promise<boolean>",
493
+ "isStatic": false,
494
+ "isPublic": true
495
+ },
496
+ "clearEmbeddings": {
497
+ "name": "clearEmbeddings",
498
+ "async": true,
499
+ "parameters": [],
500
+ "returnType": "Promise<void>",
501
+ "isStatic": false,
502
+ "isPublic": true
503
+ },
504
+ "getUISlots": {
505
+ "name": "getUISlots",
506
+ "async": false,
507
+ "parameters": [],
508
+ "returnType": "AgentUISlots",
509
+ "isStatic": false,
510
+ "isPublic": true
511
+ },
512
+ "loadConfigs": {
513
+ "name": "loadConfigs",
514
+ "async": true,
515
+ "parameters": [],
516
+ "returnType": "Promise<Map<string, any>>",
517
+ "isStatic": false,
518
+ "isPublic": true
519
+ },
520
+ "saveSlotConfig": {
521
+ "name": "saveSlotConfig",
522
+ "async": true,
523
+ "parameters": [
524
+ {
525
+ "name": "slotId",
526
+ "type": "string",
527
+ "optional": false
528
+ },
529
+ {
530
+ "name": "data",
531
+ "type": "Record<string, any>",
532
+ "optional": false
533
+ }
534
+ ],
535
+ "returnType": "Promise<void>",
536
+ "isStatic": false,
537
+ "isPublic": true
538
+ },
539
+ "getMergedConfig": {
540
+ "name": "getMergedConfig",
541
+ "async": true,
542
+ "parameters": [
543
+ {
544
+ "name": "slotId",
545
+ "type": "string",
546
+ "optional": false
547
+ }
548
+ ],
549
+ "returnType": "Promise<any>",
550
+ "isStatic": false,
551
+ "isPublic": true
552
+ },
553
+ "exportConfig": {
554
+ "name": "exportConfig",
555
+ "async": true,
556
+ "parameters": [
557
+ {
558
+ "name": "options",
559
+ "type": "object",
560
+ "optional": true
561
+ }
562
+ ],
563
+ "returnType": "Promise<any>",
564
+ "isStatic": false,
565
+ "isPublic": true
566
+ },
567
+ "getDispatch": {
568
+ "name": "getDispatch",
569
+ "async": true,
570
+ "parameters": [],
571
+ "returnType": "Promise<DispatchBus>",
572
+ "isStatic": false,
573
+ "isPublic": true
574
+ },
575
+ "handleDispatch": {
576
+ "name": "handleDispatch",
577
+ "async": true,
578
+ "parameters": [
579
+ {
580
+ "name": "_payload",
581
+ "type": "any",
582
+ "optional": false
583
+ },
584
+ {
585
+ "name": "_metadata",
586
+ "type": "DispatchMetadata",
587
+ "optional": false
588
+ }
589
+ ],
590
+ "returnType": "Promise<void>",
591
+ "isStatic": false,
592
+ "isPublic": true
593
+ },
594
+ "processDispatches": {
595
+ "name": "processDispatches",
596
+ "async": true,
597
+ "parameters": [],
598
+ "returnType": "Promise<number>",
599
+ "isStatic": false,
600
+ "isPublic": true
601
+ },
602
+ "validate": {
603
+ "name": "validate",
604
+ "async": true,
605
+ "parameters": [],
606
+ "returnType": "Promise<void>",
607
+ "isStatic": false,
608
+ "isPublic": true
609
+ },
610
+ "shutdown": {
611
+ "name": "shutdown",
612
+ "async": true,
613
+ "parameters": [],
614
+ "returnType": "Promise<void>",
615
+ "isStatic": false,
616
+ "isPublic": true
617
+ },
618
+ "execute": {
619
+ "name": "execute",
620
+ "async": true,
621
+ "parameters": [],
622
+ "returnType": "Promise<void>",
623
+ "isStatic": false,
624
+ "isPublic": true
625
+ },
626
+ "interesting": {
627
+ "name": "interesting",
628
+ "async": true,
629
+ "parameters": [],
630
+ "returnType": "Promise<InterestResult[]>",
631
+ "isStatic": false,
632
+ "isPublic": true
633
+ }
634
+ },
635
+ "decoratorConfig": {
636
+ "cli": false,
637
+ "api": false,
638
+ "mcp": false,
639
+ "tableStrategy": "sti",
640
+ "tenantScoped": {
641
+ "mode": "optional"
642
+ }
643
+ },
644
+ "extends": "SmrtObject",
645
+ "exportName": "Agent",
646
+ "collectionExportName": "AgentCollection",
647
+ "staticProperties": {
648
+ "uiSlots": {},
649
+ "adminRoutes": [],
650
+ "signalSubscriptions": []
651
+ },
652
+ "schema": {
653
+ "tableName": "agents",
654
+ "ddl": "CREATE TABLE IF NOT EXISTS \"agents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"status\" TEXT DEFAULT 'idle'\n);",
655
+ "columns": {
656
+ "id": {
657
+ "type": "UUID",
658
+ "primaryKey": true,
659
+ "referenceKind": "id",
660
+ "notNull": true
661
+ },
662
+ "slug": {
663
+ "type": "TEXT",
664
+ "notNull": true
665
+ },
666
+ "context": {
667
+ "type": "TEXT",
668
+ "notNull": true,
669
+ "default": ""
670
+ },
671
+ "_meta_type": {
672
+ "type": "TEXT",
673
+ "notNull": true
674
+ },
675
+ "_meta_data": {
676
+ "type": "JSON",
677
+ "notNull": false
678
+ },
679
+ "created_at": {
680
+ "type": "TIMESTAMP",
681
+ "notNull": true,
682
+ "default": "current_timestamp"
683
+ },
684
+ "updated_at": {
685
+ "type": "TIMESTAMP",
686
+ "notNull": true,
687
+ "default": "current_timestamp"
688
+ },
689
+ "tenant_id": {
690
+ "type": "UUID",
691
+ "referenceKind": "tenantId",
692
+ "notNull": false
693
+ },
694
+ "status": {
695
+ "type": "TEXT",
696
+ "notNull": false,
697
+ "default": "idle"
698
+ }
699
+ },
700
+ "indexes": [
701
+ {
702
+ "name": "agents_id_idx",
703
+ "columns": [
704
+ "id"
705
+ ]
706
+ },
707
+ {
708
+ "name": "agents_slug_context_meta_type_idx",
709
+ "columns": [
710
+ "slug",
711
+ "context",
712
+ "_meta_type"
713
+ ],
714
+ "unique": true
715
+ },
716
+ {
717
+ "name": "agents_meta_type_idx",
718
+ "columns": [
719
+ "_meta_type"
720
+ ]
721
+ }
722
+ ],
723
+ "version": "dde8777b"
724
+ }
725
+ },
726
+ "@happyvertical/smrt-agents:AgentConfig": {
727
+ "name": "agentconfig",
728
+ "className": "AgentConfig",
729
+ "qualifiedName": "@happyvertical/smrt-agents:AgentConfig",
730
+ "collection": "agentconfigs",
731
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/config.ts",
732
+ "packageName": "@happyvertical/smrt-agents",
733
+ "fields": {
734
+ "tenantId": {
735
+ "type": "text",
736
+ "required": false,
737
+ "_meta": {
738
+ "sqlType": "UUID",
739
+ "nullable": true,
740
+ "__tenancy": {
741
+ "isTenantIdField": true,
742
+ "autoFilter": true,
743
+ "required": false,
744
+ "autoPopulate": true,
745
+ "nullable": true,
746
+ "mode": "optional",
747
+ "field": "tenantId",
748
+ "allowSuperAdminBypass": false
749
+ }
750
+ }
751
+ },
752
+ "agentId": {
753
+ "type": "text",
754
+ "required": false,
755
+ "_meta": {}
756
+ },
757
+ "agentClass": {
758
+ "type": "text",
759
+ "required": false,
760
+ "_meta": {}
761
+ },
762
+ "slotId": {
763
+ "type": "text",
764
+ "required": false,
765
+ "_meta": {}
766
+ },
767
+ "configData": {
768
+ "type": "json",
769
+ "required": false,
770
+ "_meta": {
771
+ "sensitive": true
772
+ },
773
+ "sensitive": true
774
+ },
775
+ "schemaVersion": {
776
+ "type": "integer",
777
+ "required": false,
778
+ "_meta": {}
779
+ }
780
+ },
781
+ "methods": {
782
+ "forAgent": {
783
+ "name": "forAgent",
784
+ "async": true,
785
+ "parameters": [
786
+ {
787
+ "name": "agentId",
788
+ "type": "string",
789
+ "optional": false
790
+ },
791
+ {
792
+ "name": "options",
793
+ "type": "SmrtClassOptions",
794
+ "optional": false
795
+ }
796
+ ],
797
+ "returnType": "Promise<Map<string, any>>",
798
+ "isStatic": true,
799
+ "isPublic": true
800
+ },
801
+ "forAgents": {
802
+ "name": "forAgents",
803
+ "async": true,
804
+ "parameters": [
805
+ {
806
+ "name": "agentIds",
807
+ "type": "string[]",
808
+ "optional": false
809
+ },
810
+ {
811
+ "name": "options",
812
+ "type": "SmrtClassOptions",
813
+ "optional": false
814
+ }
815
+ ],
816
+ "returnType": "Promise<Map<string, Map<string, any>>>",
817
+ "isStatic": true,
818
+ "isPublic": true
819
+ },
820
+ "forSlot": {
821
+ "name": "forSlot",
822
+ "async": true,
823
+ "parameters": [
824
+ {
825
+ "name": "agentId",
826
+ "type": "string",
827
+ "optional": false
828
+ },
829
+ {
830
+ "name": "slotId",
831
+ "type": "string",
832
+ "optional": false
833
+ },
834
+ {
835
+ "name": "options",
836
+ "type": "SmrtClassOptions",
837
+ "optional": false
838
+ }
839
+ ],
840
+ "returnType": "Promise<any | undefined>",
841
+ "isStatic": true,
842
+ "isPublic": true
843
+ },
844
+ "saveSlot": {
845
+ "name": "saveSlot",
846
+ "async": true,
847
+ "parameters": [
848
+ {
849
+ "name": "data",
850
+ "type": "object",
851
+ "optional": false
852
+ },
853
+ {
854
+ "name": "options",
855
+ "type": "SmrtClassOptions",
856
+ "optional": false
857
+ }
858
+ ],
859
+ "returnType": "Promise<AgentConfig>",
860
+ "isStatic": true,
861
+ "isPublic": true
862
+ }
863
+ },
864
+ "decoratorConfig": {
865
+ "tableName": "agent_configs",
866
+ "api": {
867
+ "include": [
868
+ "list",
869
+ "get",
870
+ "create",
871
+ "update",
872
+ "delete"
873
+ ]
874
+ },
875
+ "mcp": {
876
+ "include": [
877
+ "list",
878
+ "get"
879
+ ]
880
+ },
881
+ "cli": true,
882
+ "tenantScoped": {
883
+ "mode": "optional"
884
+ }
885
+ },
886
+ "extends": "SmrtObject",
887
+ "exportName": "AgentConfig",
888
+ "collectionExportName": "AgentConfigCollection",
889
+ "schema": {
890
+ "tableName": "agent_configs",
891
+ "ddl": "CREATE TABLE IF NOT EXISTS \"agent_configs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"agent_id\" TEXT,\n \"agent_class\" TEXT,\n \"slot_id\" TEXT,\n \"config_data\" JSON,\n \"schema_version\" INTEGER\n);",
892
+ "columns": {
893
+ "id": {
894
+ "type": "UUID",
895
+ "primaryKey": true,
896
+ "referenceKind": "id",
897
+ "notNull": true
898
+ },
899
+ "slug": {
900
+ "type": "TEXT",
901
+ "notNull": true
902
+ },
903
+ "context": {
904
+ "type": "TEXT",
905
+ "notNull": true,
906
+ "default": ""
907
+ },
908
+ "created_at": {
909
+ "type": "TIMESTAMP",
910
+ "notNull": true,
911
+ "default": "current_timestamp"
912
+ },
913
+ "updated_at": {
914
+ "type": "TIMESTAMP",
915
+ "notNull": true,
916
+ "default": "current_timestamp"
917
+ },
918
+ "tenant_id": {
919
+ "type": "UUID",
920
+ "referenceKind": "tenantId",
921
+ "notNull": false,
922
+ "unique": false
923
+ },
924
+ "agent_id": {
925
+ "type": "TEXT",
926
+ "notNull": false,
927
+ "unique": false
928
+ },
929
+ "agent_class": {
930
+ "type": "TEXT",
931
+ "notNull": false,
932
+ "unique": false
933
+ },
934
+ "slot_id": {
935
+ "type": "TEXT",
936
+ "notNull": false,
937
+ "unique": false
938
+ },
939
+ "config_data": {
940
+ "type": "JSON",
941
+ "notNull": false,
942
+ "unique": false
943
+ },
944
+ "schema_version": {
945
+ "type": "INTEGER",
946
+ "notNull": false,
947
+ "unique": false
948
+ }
949
+ },
950
+ "indexes": [
951
+ {
952
+ "name": "agent_configs_id_idx",
953
+ "columns": [
954
+ "id"
955
+ ]
956
+ },
957
+ {
958
+ "name": "agent_configs_slug_context_idx",
959
+ "columns": [
960
+ "slug",
961
+ "context"
962
+ ],
963
+ "unique": true
964
+ }
965
+ ],
966
+ "version": "25c6ac4c"
967
+ }
968
+ },
969
+ "@happyvertical/smrt-agents:AgentConfigCollection": {
970
+ "name": "agentconfigcollection",
971
+ "className": "AgentConfigCollection",
972
+ "qualifiedName": "@happyvertical/smrt-agents:AgentConfigCollection",
973
+ "collection": "agentconfigs",
974
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/config.ts",
975
+ "packageName": "@happyvertical/smrt-agents",
976
+ "fields": {},
977
+ "methods": {
978
+ "findByTenant": {
979
+ "name": "findByTenant",
980
+ "async": true,
981
+ "parameters": [
982
+ {
983
+ "name": "tenantId",
984
+ "type": "string",
985
+ "optional": false
986
+ }
987
+ ],
988
+ "returnType": "Promise<AgentConfig[]>",
989
+ "isStatic": false,
990
+ "isPublic": true
991
+ },
992
+ "findGlobal": {
993
+ "name": "findGlobal",
994
+ "async": true,
995
+ "parameters": [],
996
+ "returnType": "Promise<AgentConfig[]>",
997
+ "isStatic": false,
998
+ "isPublic": true
999
+ },
1000
+ "findWithGlobals": {
1001
+ "name": "findWithGlobals",
1002
+ "async": true,
1003
+ "parameters": [
1004
+ {
1005
+ "name": "tenantId",
1006
+ "type": "string",
1007
+ "optional": false
1008
+ }
1009
+ ],
1010
+ "returnType": "Promise<AgentConfig[]>",
1011
+ "isStatic": false,
1012
+ "isPublic": true
1013
+ }
1014
+ },
1015
+ "decoratorConfig": {
1016
+ "tableName": "agent_configs"
1017
+ },
1018
+ "extends": "SmrtCollection",
1019
+ "extendsTypeArg": "AgentConfig",
1020
+ "exportName": "AgentConfigCollection",
1021
+ "collectionExportName": "AgentConfigCollectionCollection",
1022
+ "schema": {
1023
+ "tableName": "agent_configs",
1024
+ "ddl": "CREATE TABLE IF NOT EXISTS \"agent_configs\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1025
+ "columns": {
1026
+ "id": {
1027
+ "type": "UUID",
1028
+ "primaryKey": true,
1029
+ "referenceKind": "id",
1030
+ "notNull": true
1031
+ },
1032
+ "slug": {
1033
+ "type": "TEXT",
1034
+ "notNull": true
1035
+ },
1036
+ "context": {
1037
+ "type": "TEXT",
1038
+ "notNull": true,
1039
+ "default": ""
1040
+ },
1041
+ "created_at": {
1042
+ "type": "TIMESTAMP",
1043
+ "notNull": true,
1044
+ "default": "current_timestamp"
1045
+ },
1046
+ "updated_at": {
1047
+ "type": "TIMESTAMP",
1048
+ "notNull": true,
1049
+ "default": "current_timestamp"
1050
+ }
1051
+ },
1052
+ "indexes": [
1053
+ {
1054
+ "name": "agent_configs_id_idx",
1055
+ "columns": [
1056
+ "id"
1057
+ ]
1058
+ },
1059
+ {
1060
+ "name": "agent_configs_slug_context_idx",
1061
+ "columns": [
1062
+ "slug",
1063
+ "context"
1064
+ ],
1065
+ "unique": true
1066
+ }
1067
+ ],
1068
+ "version": "9162bcd3"
1069
+ }
1070
+ },
1071
+ "@happyvertical/smrt-agents:AgentSchedule": {
1072
+ "name": "agentschedule",
1073
+ "className": "AgentSchedule",
1074
+ "qualifiedName": "@happyvertical/smrt-agents:AgentSchedule",
1075
+ "collection": "agentschedules",
1076
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/schedule.ts",
1077
+ "packageName": "@happyvertical/smrt-agents",
1078
+ "fields": {
1079
+ "tenantId": {
1080
+ "type": "text",
1081
+ "required": false,
1082
+ "_meta": {
1083
+ "sqlType": "UUID",
1084
+ "nullable": true,
1085
+ "__tenancy": {
1086
+ "isTenantIdField": true,
1087
+ "autoFilter": true,
1088
+ "required": false,
1089
+ "autoPopulate": true,
1090
+ "nullable": true,
1091
+ "mode": "optional",
1092
+ "field": "tenantId",
1093
+ "allowSuperAdminBypass": false
1094
+ }
1095
+ }
1096
+ },
1097
+ "agentType": {
1098
+ "type": "text",
1099
+ "required": false,
1100
+ "_meta": {}
1101
+ },
1102
+ "agentId": {
1103
+ "type": "text",
1104
+ "required": false,
1105
+ "_meta": {
1106
+ "nullable": true
1107
+ }
1108
+ },
1109
+ "agentConfig": {
1110
+ "type": "json",
1111
+ "required": false,
1112
+ "_meta": {
1113
+ "sqlType": "TEXT",
1114
+ "sensitive": true
1115
+ },
1116
+ "sensitive": true
1117
+ },
1118
+ "cron": {
1119
+ "type": "text",
1120
+ "required": false,
1121
+ "_meta": {}
1122
+ },
1123
+ "timezone": {
1124
+ "type": "text",
1125
+ "required": false,
1126
+ "_meta": {}
1127
+ },
1128
+ "enabled": {
1129
+ "type": "boolean",
1130
+ "required": false,
1131
+ "_meta": {}
1132
+ },
1133
+ "status": {
1134
+ "type": "text",
1135
+ "required": false,
1136
+ "_meta": {}
1137
+ },
1138
+ "lastRun": {
1139
+ "type": "datetime",
1140
+ "required": false,
1141
+ "_meta": {
1142
+ "nullable": true
1143
+ }
1144
+ },
1145
+ "nextRun": {
1146
+ "type": "datetime",
1147
+ "required": false,
1148
+ "_meta": {
1149
+ "nullable": true
1150
+ }
1151
+ },
1152
+ "lastStatus": {
1153
+ "type": "text",
1154
+ "required": false,
1155
+ "_meta": {
1156
+ "nullable": true
1157
+ }
1158
+ },
1159
+ "lastError": {
1160
+ "type": "text",
1161
+ "required": false,
1162
+ "_meta": {
1163
+ "nullable": true
1164
+ }
1165
+ },
1166
+ "runCount": {
1167
+ "type": "integer",
1168
+ "required": false,
1169
+ "_meta": {}
1170
+ },
1171
+ "successCount": {
1172
+ "type": "integer",
1173
+ "required": false,
1174
+ "_meta": {}
1175
+ },
1176
+ "failureCount": {
1177
+ "type": "integer",
1178
+ "required": false,
1179
+ "_meta": {}
1180
+ },
1181
+ "maxConcurrent": {
1182
+ "type": "integer",
1183
+ "required": false,
1184
+ "_meta": {}
1185
+ },
1186
+ "runningCount": {
1187
+ "type": "integer",
1188
+ "required": false,
1189
+ "_meta": {}
1190
+ },
1191
+ "timeout": {
1192
+ "type": "integer",
1193
+ "required": false,
1194
+ "_meta": {}
1195
+ },
1196
+ "method": {
1197
+ "type": "text",
1198
+ "required": false,
1199
+ "_meta": {}
1200
+ },
1201
+ "methodArgs": {
1202
+ "type": "json",
1203
+ "required": false,
1204
+ "_meta": {
1205
+ "sqlType": "TEXT"
1206
+ }
1207
+ }
1208
+ },
1209
+ "methods": {
1210
+ "enable": {
1211
+ "name": "enable",
1212
+ "async": true,
1213
+ "parameters": [],
1214
+ "returnType": "Promise<void>",
1215
+ "isStatic": false,
1216
+ "isPublic": true
1217
+ },
1218
+ "disable": {
1219
+ "name": "disable",
1220
+ "async": true,
1221
+ "parameters": [],
1222
+ "returnType": "Promise<void>",
1223
+ "isStatic": false,
1224
+ "isPublic": true
1225
+ },
1226
+ "pause": {
1227
+ "name": "pause",
1228
+ "async": true,
1229
+ "parameters": [],
1230
+ "returnType": "Promise<void>",
1231
+ "isStatic": false,
1232
+ "isPublic": true
1233
+ },
1234
+ "resume": {
1235
+ "name": "resume",
1236
+ "async": true,
1237
+ "parameters": [],
1238
+ "returnType": "Promise<void>",
1239
+ "isStatic": false,
1240
+ "isPublic": true
1241
+ },
1242
+ "recordSuccess": {
1243
+ "name": "recordSuccess",
1244
+ "async": true,
1245
+ "parameters": [],
1246
+ "returnType": "Promise<void>",
1247
+ "isStatic": false,
1248
+ "isPublic": true
1249
+ },
1250
+ "recordFailure": {
1251
+ "name": "recordFailure",
1252
+ "async": true,
1253
+ "parameters": [
1254
+ {
1255
+ "name": "error",
1256
+ "type": "string",
1257
+ "optional": false
1258
+ }
1259
+ ],
1260
+ "returnType": "Promise<void>",
1261
+ "isStatic": false,
1262
+ "isPublic": true
1263
+ },
1264
+ "isDue": {
1265
+ "name": "isDue",
1266
+ "async": false,
1267
+ "parameters": [],
1268
+ "returnType": "boolean",
1269
+ "isStatic": false,
1270
+ "isPublic": true
1271
+ },
1272
+ "calculateNextRun": {
1273
+ "name": "calculateNextRun",
1274
+ "async": false,
1275
+ "parameters": [],
1276
+ "returnType": "void",
1277
+ "isStatic": false,
1278
+ "isPublic": true
1279
+ },
1280
+ "getDescription": {
1281
+ "name": "getDescription",
1282
+ "async": false,
1283
+ "parameters": [],
1284
+ "returnType": "string",
1285
+ "isStatic": false,
1286
+ "isPublic": true
1287
+ },
1288
+ "beforeSave": {
1289
+ "name": "beforeSave",
1290
+ "async": true,
1291
+ "parameters": [],
1292
+ "returnType": "Promise<void>",
1293
+ "isStatic": false,
1294
+ "isPublic": true
1295
+ }
1296
+ },
1297
+ "decoratorConfig": {
1298
+ "tableName": "_smrt_agent_schedules",
1299
+ "api": {
1300
+ "include": [
1301
+ "list",
1302
+ "get",
1303
+ "create",
1304
+ "update",
1305
+ "delete"
1306
+ ]
1307
+ },
1308
+ "cli": {
1309
+ "include": [
1310
+ "list",
1311
+ "get",
1312
+ "create",
1313
+ "update",
1314
+ "delete",
1315
+ "enable",
1316
+ "disable"
1317
+ ],
1318
+ "skipApiCheck": true
1319
+ },
1320
+ "mcp": {
1321
+ "include": [
1322
+ "list",
1323
+ "get"
1324
+ ]
1325
+ },
1326
+ "tenantScoped": {
1327
+ "mode": "optional"
1328
+ }
1329
+ },
1330
+ "extends": "SmrtObject",
1331
+ "exportName": "AgentSchedule",
1332
+ "collectionExportName": "AgentScheduleCollection",
1333
+ "schema": {
1334
+ "tableName": "_smrt_agent_schedules",
1335
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_agent_schedules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"agent_type\" TEXT,\n \"agent_id\" TEXT,\n \"agent_config\" TEXT,\n \"cron\" TEXT,\n \"timezone\" TEXT,\n \"enabled\" BOOLEAN,\n \"status\" TEXT,\n \"last_run\" TIMESTAMP,\n \"next_run\" TIMESTAMP,\n \"last_status\" TEXT,\n \"last_error\" TEXT,\n \"run_count\" INTEGER,\n \"success_count\" INTEGER,\n \"failure_count\" INTEGER,\n \"max_concurrent\" INTEGER,\n \"running_count\" INTEGER,\n \"timeout\" INTEGER,\n \"method\" TEXT,\n \"method_args\" TEXT\n);",
1336
+ "columns": {
1337
+ "id": {
1338
+ "type": "UUID",
1339
+ "primaryKey": true,
1340
+ "referenceKind": "id",
1341
+ "notNull": true
1342
+ },
1343
+ "slug": {
1344
+ "type": "TEXT",
1345
+ "notNull": true
1346
+ },
1347
+ "context": {
1348
+ "type": "TEXT",
1349
+ "notNull": true,
1350
+ "default": ""
1351
+ },
1352
+ "created_at": {
1353
+ "type": "TIMESTAMP",
1354
+ "notNull": true,
1355
+ "default": "current_timestamp"
1356
+ },
1357
+ "updated_at": {
1358
+ "type": "TIMESTAMP",
1359
+ "notNull": true,
1360
+ "default": "current_timestamp"
1361
+ },
1362
+ "tenant_id": {
1363
+ "type": "UUID",
1364
+ "referenceKind": "tenantId",
1365
+ "notNull": false,
1366
+ "unique": false
1367
+ },
1368
+ "agent_type": {
1369
+ "type": "TEXT",
1370
+ "notNull": false,
1371
+ "unique": false
1372
+ },
1373
+ "agent_id": {
1374
+ "type": "TEXT",
1375
+ "notNull": false,
1376
+ "unique": false
1377
+ },
1378
+ "agent_config": {
1379
+ "type": "TEXT",
1380
+ "notNull": false,
1381
+ "unique": false
1382
+ },
1383
+ "cron": {
1384
+ "type": "TEXT",
1385
+ "notNull": false,
1386
+ "unique": false
1387
+ },
1388
+ "timezone": {
1389
+ "type": "TEXT",
1390
+ "notNull": false,
1391
+ "unique": false
1392
+ },
1393
+ "enabled": {
1394
+ "type": "BOOLEAN",
1395
+ "notNull": false,
1396
+ "unique": false
1397
+ },
1398
+ "status": {
1399
+ "type": "TEXT",
1400
+ "notNull": false,
1401
+ "unique": false
1402
+ },
1403
+ "last_run": {
1404
+ "type": "TIMESTAMP",
1405
+ "notNull": false,
1406
+ "unique": false
1407
+ },
1408
+ "next_run": {
1409
+ "type": "TIMESTAMP",
1410
+ "notNull": false,
1411
+ "unique": false
1412
+ },
1413
+ "last_status": {
1414
+ "type": "TEXT",
1415
+ "notNull": false,
1416
+ "unique": false
1417
+ },
1418
+ "last_error": {
1419
+ "type": "TEXT",
1420
+ "notNull": false,
1421
+ "unique": false
1422
+ },
1423
+ "run_count": {
1424
+ "type": "INTEGER",
1425
+ "notNull": false,
1426
+ "unique": false
1427
+ },
1428
+ "success_count": {
1429
+ "type": "INTEGER",
1430
+ "notNull": false,
1431
+ "unique": false
1432
+ },
1433
+ "failure_count": {
1434
+ "type": "INTEGER",
1435
+ "notNull": false,
1436
+ "unique": false
1437
+ },
1438
+ "max_concurrent": {
1439
+ "type": "INTEGER",
1440
+ "notNull": false,
1441
+ "unique": false
1442
+ },
1443
+ "running_count": {
1444
+ "type": "INTEGER",
1445
+ "notNull": false,
1446
+ "unique": false
1447
+ },
1448
+ "timeout": {
1449
+ "type": "INTEGER",
1450
+ "notNull": false,
1451
+ "unique": false
1452
+ },
1453
+ "method": {
1454
+ "type": "TEXT",
1455
+ "notNull": false,
1456
+ "unique": false
1457
+ },
1458
+ "method_args": {
1459
+ "type": "TEXT",
1460
+ "notNull": false,
1461
+ "unique": false
1462
+ }
1463
+ },
1464
+ "indexes": [
1465
+ {
1466
+ "name": "_smrt_agent_schedules_id_idx",
1467
+ "columns": [
1468
+ "id"
1469
+ ]
1470
+ },
1471
+ {
1472
+ "name": "_smrt_agent_schedules_slug_context_idx",
1473
+ "columns": [
1474
+ "slug",
1475
+ "context"
1476
+ ],
1477
+ "unique": true
1478
+ }
1479
+ ],
1480
+ "version": "c21a1f29"
1481
+ }
1482
+ },
1483
+ "@happyvertical/smrt-agents:AgentScheduleCollection": {
1484
+ "name": "agentschedulecollection",
1485
+ "className": "AgentScheduleCollection",
1486
+ "qualifiedName": "@happyvertical/smrt-agents:AgentScheduleCollection",
1487
+ "collection": "agentschedules",
1488
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/schedule.ts",
1489
+ "packageName": "@happyvertical/smrt-agents",
1490
+ "fields": {},
1491
+ "methods": {
1492
+ "findByTenant": {
1493
+ "name": "findByTenant",
1494
+ "async": true,
1495
+ "parameters": [
1496
+ {
1497
+ "name": "tenantId",
1498
+ "type": "string",
1499
+ "optional": false
1500
+ }
1501
+ ],
1502
+ "returnType": "Promise<AgentSchedule[]>",
1503
+ "isStatic": false,
1504
+ "isPublic": true
1505
+ },
1506
+ "findGlobal": {
1507
+ "name": "findGlobal",
1508
+ "async": true,
1509
+ "parameters": [],
1510
+ "returnType": "Promise<AgentSchedule[]>",
1511
+ "isStatic": false,
1512
+ "isPublic": true
1513
+ },
1514
+ "findWithGlobals": {
1515
+ "name": "findWithGlobals",
1516
+ "async": true,
1517
+ "parameters": [
1518
+ {
1519
+ "name": "tenantId",
1520
+ "type": "string",
1521
+ "optional": false
1522
+ }
1523
+ ],
1524
+ "returnType": "Promise<AgentSchedule[]>",
1525
+ "isStatic": false,
1526
+ "isPublic": true
1527
+ },
1528
+ "listByStatus": {
1529
+ "name": "listByStatus",
1530
+ "async": true,
1531
+ "parameters": [
1532
+ {
1533
+ "name": "status",
1534
+ "type": "ScheduleStatus | ScheduleStatus[]",
1535
+ "optional": false
1536
+ },
1537
+ {
1538
+ "name": "options",
1539
+ "type": "object",
1540
+ "optional": true
1541
+ }
1542
+ ],
1543
+ "returnType": "Promise<AgentSchedule[]>",
1544
+ "isStatic": false,
1545
+ "isPublic": true
1546
+ },
1547
+ "listDue": {
1548
+ "name": "listDue",
1549
+ "async": true,
1550
+ "parameters": [
1551
+ {
1552
+ "name": "options",
1553
+ "type": "object",
1554
+ "optional": true
1555
+ }
1556
+ ],
1557
+ "returnType": "Promise<AgentSchedule[]>",
1558
+ "isStatic": false,
1559
+ "isPublic": true
1560
+ },
1561
+ "listByAgentType": {
1562
+ "name": "listByAgentType",
1563
+ "async": true,
1564
+ "parameters": [
1565
+ {
1566
+ "name": "agentType",
1567
+ "type": "string",
1568
+ "optional": false
1569
+ },
1570
+ {
1571
+ "name": "options",
1572
+ "type": "object",
1573
+ "optional": true
1574
+ }
1575
+ ],
1576
+ "returnType": "Promise<AgentSchedule[]>",
1577
+ "isStatic": false,
1578
+ "isPublic": true
1579
+ },
1580
+ "stats": {
1581
+ "name": "stats",
1582
+ "async": true,
1583
+ "parameters": [],
1584
+ "returnType": "Promise<object>",
1585
+ "isStatic": false,
1586
+ "isPublic": true
1587
+ }
1588
+ },
1589
+ "decoratorConfig": {
1590
+ "tableName": "_smrt_agent_schedules"
1591
+ },
1592
+ "extends": "SmrtCollection",
1593
+ "extendsTypeArg": "AgentSchedule",
1594
+ "exportName": "AgentScheduleCollection",
1595
+ "collectionExportName": "AgentScheduleCollectionCollection",
1596
+ "schema": {
1597
+ "tableName": "_smrt_agent_schedules",
1598
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_agent_schedules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1599
+ "columns": {
1600
+ "id": {
1601
+ "type": "UUID",
1602
+ "primaryKey": true,
1603
+ "referenceKind": "id",
1604
+ "notNull": true
1605
+ },
1606
+ "slug": {
1607
+ "type": "TEXT",
1608
+ "notNull": true
1609
+ },
1610
+ "context": {
1611
+ "type": "TEXT",
1612
+ "notNull": true,
1613
+ "default": ""
1614
+ },
1615
+ "created_at": {
1616
+ "type": "TIMESTAMP",
1617
+ "notNull": true,
1618
+ "default": "current_timestamp"
1619
+ },
1620
+ "updated_at": {
1621
+ "type": "TIMESTAMP",
1622
+ "notNull": true,
1623
+ "default": "current_timestamp"
1624
+ }
1625
+ },
1626
+ "indexes": [
1627
+ {
1628
+ "name": "_smrt_agent_schedules_id_idx",
1629
+ "columns": [
1630
+ "id"
1631
+ ]
1632
+ },
1633
+ {
1634
+ "name": "_smrt_agent_schedules_slug_context_idx",
1635
+ "columns": [
1636
+ "slug",
1637
+ "context"
1638
+ ],
1639
+ "unique": true
1640
+ }
1641
+ ],
1642
+ "version": "d45601b0"
1643
+ }
1644
+ },
1645
+ "@happyvertical/smrt-agents:TenantAgent": {
1646
+ "name": "tenantagent",
1647
+ "className": "TenantAgent",
1648
+ "qualifiedName": "@happyvertical/smrt-agents:TenantAgent",
1649
+ "collection": "tenantagents",
1650
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/tenant-agent.ts",
1651
+ "packageName": "@happyvertical/smrt-agents",
1652
+ "fields": {
1653
+ "tenantId": {
1654
+ "type": "text",
1655
+ "required": true,
1656
+ "_meta": {
1657
+ "sqlType": "UUID",
1658
+ "__tenancy": {
1659
+ "isTenantIdField": true,
1660
+ "autoFilter": true,
1661
+ "required": true,
1662
+ "autoPopulate": true,
1663
+ "nullable": false,
1664
+ "mode": "required",
1665
+ "field": "tenantId",
1666
+ "allowSuperAdminBypass": false
1667
+ }
1668
+ }
1669
+ },
1670
+ "agentClass": {
1671
+ "type": "text",
1672
+ "required": false,
1673
+ "_meta": {}
1674
+ },
1675
+ "status": {
1676
+ "type": "text",
1677
+ "required": false,
1678
+ "_meta": {}
1679
+ },
1680
+ "permissions": {
1681
+ "type": "json",
1682
+ "required": false,
1683
+ "_meta": {
1684
+ "nullable": true
1685
+ }
1686
+ },
1687
+ "config": {
1688
+ "type": "json",
1689
+ "required": false,
1690
+ "_meta": {
1691
+ "nullable": true,
1692
+ "sensitive": true
1693
+ },
1694
+ "sensitive": true
1695
+ }
1696
+ },
1697
+ "methods": {},
1698
+ "decoratorConfig": {
1699
+ "tableName": "tenant_agents",
1700
+ "api": {
1701
+ "include": [
1702
+ "list",
1703
+ "get",
1704
+ "create",
1705
+ "update",
1706
+ "delete"
1707
+ ]
1708
+ },
1709
+ "cli": {
1710
+ "include": [
1711
+ "list",
1712
+ "get"
1713
+ ]
1714
+ },
1715
+ "mcp": {
1716
+ "include": [
1717
+ "list",
1718
+ "get"
1719
+ ]
1720
+ },
1721
+ "conflictColumns": [
1722
+ "tenant_id",
1723
+ "agent_class"
1724
+ ],
1725
+ "tenantScoped": {
1726
+ "mode": "required"
1727
+ }
1728
+ },
1729
+ "extends": "SmrtObject",
1730
+ "exportName": "TenantAgent",
1731
+ "collectionExportName": "TenantAgentCollection",
1732
+ "validationRules": [
1733
+ {
1734
+ "field": "tenantId",
1735
+ "rule": "required",
1736
+ "fieldType": "text"
1737
+ }
1738
+ ],
1739
+ "schema": {
1740
+ "tableName": "tenant_agents",
1741
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_agents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"agent_class\" TEXT,\n \"status\" TEXT,\n \"permissions\" JSON,\n \"config\" JSON\n);",
1742
+ "columns": {
1743
+ "id": {
1744
+ "type": "UUID",
1745
+ "primaryKey": true,
1746
+ "referenceKind": "id",
1747
+ "notNull": true
1748
+ },
1749
+ "slug": {
1750
+ "type": "TEXT",
1751
+ "notNull": true
1752
+ },
1753
+ "context": {
1754
+ "type": "TEXT",
1755
+ "notNull": true,
1756
+ "default": ""
1757
+ },
1758
+ "created_at": {
1759
+ "type": "TIMESTAMP",
1760
+ "notNull": true,
1761
+ "default": "current_timestamp"
1762
+ },
1763
+ "updated_at": {
1764
+ "type": "TIMESTAMP",
1765
+ "notNull": true,
1766
+ "default": "current_timestamp"
1767
+ },
1768
+ "tenant_id": {
1769
+ "type": "UUID",
1770
+ "referenceKind": "tenantId",
1771
+ "notNull": true,
1772
+ "unique": false
1773
+ },
1774
+ "agent_class": {
1775
+ "type": "TEXT",
1776
+ "notNull": false,
1777
+ "unique": false
1778
+ },
1779
+ "status": {
1780
+ "type": "TEXT",
1781
+ "notNull": false,
1782
+ "unique": false
1783
+ },
1784
+ "permissions": {
1785
+ "type": "JSON",
1786
+ "notNull": false,
1787
+ "unique": false
1788
+ },
1789
+ "config": {
1790
+ "type": "JSON",
1791
+ "notNull": false,
1792
+ "unique": false
1793
+ }
1794
+ },
1795
+ "indexes": [
1796
+ {
1797
+ "name": "tenant_agents_id_idx",
1798
+ "columns": [
1799
+ "id"
1800
+ ]
1801
+ },
1802
+ {
1803
+ "name": "tenant_agents_tenant_id_agent_class_idx",
1804
+ "columns": [
1805
+ "tenant_id",
1806
+ "agent_class"
1807
+ ],
1808
+ "unique": true
1809
+ }
1810
+ ],
1811
+ "version": "9892a054"
1812
+ }
1813
+ },
1814
+ "@happyvertical/smrt-agents:TenantAgentCollection": {
1815
+ "name": "tenantagentcollection",
1816
+ "className": "TenantAgentCollection",
1817
+ "qualifiedName": "@happyvertical/smrt-agents:TenantAgentCollection",
1818
+ "collection": "tenantagents",
1819
+ "filePath": "/home/runner/_work/smrt/smrt/packages/agents/src/tenant-agent.ts",
1820
+ "packageName": "@happyvertical/smrt-agents",
1821
+ "fields": {},
1822
+ "methods": {
1823
+ "resolveForTenant": {
1824
+ "name": "resolveForTenant",
1825
+ "async": true,
1826
+ "parameters": [
1827
+ {
1828
+ "name": "tenantId",
1829
+ "type": "string",
1830
+ "optional": false
1831
+ },
1832
+ {
1833
+ "name": "getAncestorIds",
1834
+ "type": "Function",
1835
+ "optional": false
1836
+ },
1837
+ {
1838
+ "name": "manifests",
1839
+ "type": "Map<string, AgentManifestInfo>",
1840
+ "optional": true
1841
+ }
1842
+ ],
1843
+ "returnType": "Promise<ResolvedAgentAvailability[]>",
1844
+ "isStatic": false,
1845
+ "isPublic": true
1846
+ },
1847
+ "enableAgent": {
1848
+ "name": "enableAgent",
1849
+ "async": true,
1850
+ "parameters": [
1851
+ {
1852
+ "name": "tenantId",
1853
+ "type": "string",
1854
+ "optional": false
1855
+ },
1856
+ {
1857
+ "name": "agentClass",
1858
+ "type": "string",
1859
+ "optional": false
1860
+ }
1861
+ ],
1862
+ "returnType": "Promise<TenantAgent>",
1863
+ "isStatic": false,
1864
+ "isPublic": true
1865
+ },
1866
+ "disableAgent": {
1867
+ "name": "disableAgent",
1868
+ "async": true,
1869
+ "parameters": [
1870
+ {
1871
+ "name": "tenantId",
1872
+ "type": "string",
1873
+ "optional": false
1874
+ },
1875
+ {
1876
+ "name": "agentClass",
1877
+ "type": "string",
1878
+ "optional": false
1879
+ }
1880
+ ],
1881
+ "returnType": "Promise<TenantAgent>",
1882
+ "isStatic": false,
1883
+ "isPublic": true
1884
+ },
1885
+ "clearOverride": {
1886
+ "name": "clearOverride",
1887
+ "async": true,
1888
+ "parameters": [
1889
+ {
1890
+ "name": "tenantId",
1891
+ "type": "string",
1892
+ "optional": false
1893
+ },
1894
+ {
1895
+ "name": "agentClass",
1896
+ "type": "string",
1897
+ "optional": false
1898
+ }
1899
+ ],
1900
+ "returnType": "Promise<void>",
1901
+ "isStatic": false,
1902
+ "isPublic": true
1903
+ },
1904
+ "setPermissions": {
1905
+ "name": "setPermissions",
1906
+ "async": true,
1907
+ "parameters": [
1908
+ {
1909
+ "name": "tenantId",
1910
+ "type": "string",
1911
+ "optional": false
1912
+ },
1913
+ {
1914
+ "name": "agentClass",
1915
+ "type": "string",
1916
+ "optional": false
1917
+ },
1918
+ {
1919
+ "name": "permissions",
1920
+ "type": "Record<string, boolean>",
1921
+ "optional": false
1922
+ }
1923
+ ],
1924
+ "returnType": "Promise<TenantAgent>",
1925
+ "isStatic": false,
1926
+ "isPublic": true
1927
+ },
1928
+ "findByTenantAndClass": {
1929
+ "name": "findByTenantAndClass",
1930
+ "async": true,
1931
+ "parameters": [
1932
+ {
1933
+ "name": "tenantId",
1934
+ "type": "string",
1935
+ "optional": false
1936
+ },
1937
+ {
1938
+ "name": "agentClass",
1939
+ "type": "string",
1940
+ "optional": false
1941
+ }
1942
+ ],
1943
+ "returnType": "Promise<TenantAgent | null>",
1944
+ "isStatic": false,
1945
+ "isPublic": true
1946
+ }
1947
+ },
1948
+ "decoratorConfig": {
1949
+ "tableName": "tenant_agents"
1950
+ },
1951
+ "extends": "SmrtCollection",
1952
+ "extendsTypeArg": "TenantAgent",
1953
+ "exportName": "TenantAgentCollection",
1954
+ "collectionExportName": "TenantAgentCollectionCollection",
1955
+ "schema": {
1956
+ "tableName": "tenant_agents",
1957
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_agents\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
1958
+ "columns": {
1959
+ "id": {
1960
+ "type": "UUID",
1961
+ "primaryKey": true,
1962
+ "referenceKind": "id",
1963
+ "notNull": true
1964
+ },
1965
+ "slug": {
1966
+ "type": "TEXT",
1967
+ "notNull": true
1968
+ },
1969
+ "context": {
1970
+ "type": "TEXT",
1971
+ "notNull": true,
1972
+ "default": ""
1973
+ },
1974
+ "created_at": {
1975
+ "type": "TIMESTAMP",
1976
+ "notNull": true,
1977
+ "default": "current_timestamp"
1978
+ },
1979
+ "updated_at": {
1980
+ "type": "TIMESTAMP",
1981
+ "notNull": true,
1982
+ "default": "current_timestamp"
1983
+ }
1984
+ },
1985
+ "indexes": [
1986
+ {
1987
+ "name": "tenant_agents_id_idx",
1988
+ "columns": [
1989
+ "id"
1990
+ ]
1991
+ },
1992
+ {
1993
+ "name": "tenant_agents_slug_context_idx",
1994
+ "columns": [
1995
+ "slug",
1996
+ "context"
1997
+ ],
1998
+ "unique": true
1999
+ }
2000
+ ],
2001
+ "version": "fbe7be99"
2002
+ }
2003
+ }
2004
+ },
2005
+ "moduleType": "smrt",
2006
+ "smrtDependencies": [
2007
+ "@happyvertical/smrt-core",
2008
+ "@happyvertical/smrt-secrets",
2009
+ "@happyvertical/smrt-tenancy",
2010
+ "@happyvertical/smrt-users"
2011
+ ]
2012
+ }