@inkeep/agents-core 0.55.3 → 0.56.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.
Files changed (48) hide show
  1. package/dist/auth/auth-schema.d.ts +85 -85
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +28 -28
  4. package/dist/auth/auth.js +2 -2
  5. package/dist/auth/permissions.d.ts +13 -13
  6. package/dist/client-exports.d.ts +4 -4
  7. package/dist/client-exports.js +2 -2
  8. package/dist/data-access/index.d.ts +3 -3
  9. package/dist/data-access/index.js +3 -3
  10. package/dist/data-access/manage/agents.d.ts +37 -37
  11. package/dist/data-access/manage/agents.js +25 -11
  12. package/dist/data-access/manage/artifactComponents.d.ts +8 -8
  13. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  14. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  15. package/dist/data-access/manage/functionTools.d.ts +16 -16
  16. package/dist/data-access/manage/skills.d.ts +13 -13
  17. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  18. package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
  19. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  20. package/dist/data-access/manage/subAgents.d.ts +15 -15
  21. package/dist/data-access/manage/tools.d.ts +21 -21
  22. package/dist/data-access/manage/triggerCleanup.d.ts +12 -0
  23. package/dist/data-access/manage/triggerCleanup.js +51 -0
  24. package/dist/data-access/manage/triggers.d.ts +14 -3
  25. package/dist/data-access/manage/triggers.js +8 -1
  26. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  27. package/dist/data-access/runtime/conversations.d.ts +31 -31
  28. package/dist/data-access/runtime/messages.d.ts +9 -9
  29. package/dist/data-access/runtime/tasks.d.ts +9 -9
  30. package/dist/data-access/runtime/users.d.ts +5 -1
  31. package/dist/data-access/runtime/users.js +14 -1
  32. package/dist/db/manage/manage-schema.d.ts +397 -359
  33. package/dist/db/manage/manage-schema.js +2 -0
  34. package/dist/db/runtime/runtime-schema.d.ts +272 -272
  35. package/dist/index.d.ts +4 -4
  36. package/dist/index.js +4 -4
  37. package/dist/validation/dolt-schemas.d.ts +1 -1
  38. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  39. package/dist/validation/index.d.ts +2 -2
  40. package/dist/validation/index.js +2 -2
  41. package/dist/validation/schemas.d.ts +1869 -1700
  42. package/dist/validation/schemas.js +18 -5
  43. package/drizzle/manage/0012_petite_weapon_omega.sql +2 -0
  44. package/drizzle/manage/meta/0012_snapshot.json +3697 -0
  45. package/drizzle/manage/meta/_journal.json +7 -0
  46. package/package.json +1 -1
  47. package/dist/auth/cleanup.d.ts +0 -12
  48. package/dist/auth/cleanup.js +0 -43
@@ -0,0 +1,3697 @@
1
+ {
2
+ "id": "abc7a103-dd2c-4112-987f-c0e6750fb068",
3
+ "prevId": "6bd65088-9917-4c03-85e1-64e73aca6e13",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.agent": {
8
+ "name": "agent",
9
+ "schema": "",
10
+ "columns": {
11
+ "tenant_id": {
12
+ "name": "tenant_id",
13
+ "type": "varchar(256)",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "id": {
18
+ "name": "id",
19
+ "type": "varchar(256)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "project_id": {
24
+ "name": "project_id",
25
+ "type": "varchar(256)",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "name": {
30
+ "name": "name",
31
+ "type": "varchar(256)",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "description": {
36
+ "name": "description",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "default_sub_agent_id": {
42
+ "name": "default_sub_agent_id",
43
+ "type": "varchar(256)",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "context_config_id": {
48
+ "name": "context_config_id",
49
+ "type": "varchar(256)",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "models": {
54
+ "name": "models",
55
+ "type": "jsonb",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "status_updates": {
60
+ "name": "status_updates",
61
+ "type": "jsonb",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "prompt": {
66
+ "name": "prompt",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "stop_when": {
72
+ "name": "stop_when",
73
+ "type": "jsonb",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "now()"
90
+ }
91
+ },
92
+ "indexes": {},
93
+ "foreignKeys": {
94
+ "agent_project_fk": {
95
+ "name": "agent_project_fk",
96
+ "tableFrom": "agent",
97
+ "tableTo": "projects",
98
+ "columnsFrom": [
99
+ "tenant_id",
100
+ "project_id"
101
+ ],
102
+ "columnsTo": [
103
+ "tenant_id",
104
+ "id"
105
+ ],
106
+ "onDelete": "cascade",
107
+ "onUpdate": "no action"
108
+ }
109
+ },
110
+ "compositePrimaryKeys": {
111
+ "agent_tenant_id_project_id_id_pk": {
112
+ "name": "agent_tenant_id_project_id_id_pk",
113
+ "columns": [
114
+ "tenant_id",
115
+ "project_id",
116
+ "id"
117
+ ]
118
+ }
119
+ },
120
+ "uniqueConstraints": {},
121
+ "policies": {},
122
+ "checkConstraints": {},
123
+ "isRLSEnabled": false
124
+ },
125
+ "public.artifact_components": {
126
+ "name": "artifact_components",
127
+ "schema": "",
128
+ "columns": {
129
+ "tenant_id": {
130
+ "name": "tenant_id",
131
+ "type": "varchar(256)",
132
+ "primaryKey": false,
133
+ "notNull": true
134
+ },
135
+ "id": {
136
+ "name": "id",
137
+ "type": "varchar(256)",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "project_id": {
142
+ "name": "project_id",
143
+ "type": "varchar(256)",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "name": {
148
+ "name": "name",
149
+ "type": "varchar(256)",
150
+ "primaryKey": false,
151
+ "notNull": true
152
+ },
153
+ "description": {
154
+ "name": "description",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": false
158
+ },
159
+ "props": {
160
+ "name": "props",
161
+ "type": "jsonb",
162
+ "primaryKey": false,
163
+ "notNull": false
164
+ },
165
+ "render": {
166
+ "name": "render",
167
+ "type": "jsonb",
168
+ "primaryKey": false,
169
+ "notNull": false
170
+ },
171
+ "created_at": {
172
+ "name": "created_at",
173
+ "type": "timestamp",
174
+ "primaryKey": false,
175
+ "notNull": true,
176
+ "default": "now()"
177
+ },
178
+ "updated_at": {
179
+ "name": "updated_at",
180
+ "type": "timestamp",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "default": "now()"
184
+ }
185
+ },
186
+ "indexes": {},
187
+ "foreignKeys": {
188
+ "artifact_components_project_fk": {
189
+ "name": "artifact_components_project_fk",
190
+ "tableFrom": "artifact_components",
191
+ "tableTo": "projects",
192
+ "columnsFrom": [
193
+ "tenant_id",
194
+ "project_id"
195
+ ],
196
+ "columnsTo": [
197
+ "tenant_id",
198
+ "id"
199
+ ],
200
+ "onDelete": "cascade",
201
+ "onUpdate": "no action"
202
+ }
203
+ },
204
+ "compositePrimaryKeys": {
205
+ "artifact_components_tenant_id_project_id_id_pk": {
206
+ "name": "artifact_components_tenant_id_project_id_id_pk",
207
+ "columns": [
208
+ "tenant_id",
209
+ "project_id",
210
+ "id"
211
+ ]
212
+ }
213
+ },
214
+ "uniqueConstraints": {},
215
+ "policies": {},
216
+ "checkConstraints": {},
217
+ "isRLSEnabled": false
218
+ },
219
+ "public.context_configs": {
220
+ "name": "context_configs",
221
+ "schema": "",
222
+ "columns": {
223
+ "tenant_id": {
224
+ "name": "tenant_id",
225
+ "type": "varchar(256)",
226
+ "primaryKey": false,
227
+ "notNull": true
228
+ },
229
+ "id": {
230
+ "name": "id",
231
+ "type": "varchar(256)",
232
+ "primaryKey": false,
233
+ "notNull": true
234
+ },
235
+ "project_id": {
236
+ "name": "project_id",
237
+ "type": "varchar(256)",
238
+ "primaryKey": false,
239
+ "notNull": true
240
+ },
241
+ "agent_id": {
242
+ "name": "agent_id",
243
+ "type": "varchar(256)",
244
+ "primaryKey": false,
245
+ "notNull": true
246
+ },
247
+ "headers_schema": {
248
+ "name": "headers_schema",
249
+ "type": "jsonb",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "context_variables": {
254
+ "name": "context_variables",
255
+ "type": "jsonb",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "created_at": {
260
+ "name": "created_at",
261
+ "type": "timestamp",
262
+ "primaryKey": false,
263
+ "notNull": true,
264
+ "default": "now()"
265
+ },
266
+ "updated_at": {
267
+ "name": "updated_at",
268
+ "type": "timestamp",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "now()"
272
+ }
273
+ },
274
+ "indexes": {},
275
+ "foreignKeys": {
276
+ "context_configs_agent_fk": {
277
+ "name": "context_configs_agent_fk",
278
+ "tableFrom": "context_configs",
279
+ "tableTo": "agent",
280
+ "columnsFrom": [
281
+ "tenant_id",
282
+ "project_id",
283
+ "agent_id"
284
+ ],
285
+ "columnsTo": [
286
+ "tenant_id",
287
+ "project_id",
288
+ "id"
289
+ ],
290
+ "onDelete": "cascade",
291
+ "onUpdate": "no action"
292
+ }
293
+ },
294
+ "compositePrimaryKeys": {
295
+ "context_configs_tenant_id_project_id_agent_id_id_pk": {
296
+ "name": "context_configs_tenant_id_project_id_agent_id_id_pk",
297
+ "columns": [
298
+ "tenant_id",
299
+ "project_id",
300
+ "agent_id",
301
+ "id"
302
+ ]
303
+ }
304
+ },
305
+ "uniqueConstraints": {},
306
+ "policies": {},
307
+ "checkConstraints": {},
308
+ "isRLSEnabled": false
309
+ },
310
+ "public.credential_references": {
311
+ "name": "credential_references",
312
+ "schema": "",
313
+ "columns": {
314
+ "tenant_id": {
315
+ "name": "tenant_id",
316
+ "type": "varchar(256)",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "id": {
321
+ "name": "id",
322
+ "type": "varchar(256)",
323
+ "primaryKey": false,
324
+ "notNull": true
325
+ },
326
+ "project_id": {
327
+ "name": "project_id",
328
+ "type": "varchar(256)",
329
+ "primaryKey": false,
330
+ "notNull": true
331
+ },
332
+ "name": {
333
+ "name": "name",
334
+ "type": "varchar(256)",
335
+ "primaryKey": false,
336
+ "notNull": true
337
+ },
338
+ "type": {
339
+ "name": "type",
340
+ "type": "varchar(256)",
341
+ "primaryKey": false,
342
+ "notNull": true
343
+ },
344
+ "credential_store_id": {
345
+ "name": "credential_store_id",
346
+ "type": "varchar(256)",
347
+ "primaryKey": false,
348
+ "notNull": true
349
+ },
350
+ "retrieval_params": {
351
+ "name": "retrieval_params",
352
+ "type": "jsonb",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ },
356
+ "tool_id": {
357
+ "name": "tool_id",
358
+ "type": "varchar(256)",
359
+ "primaryKey": false,
360
+ "notNull": false
361
+ },
362
+ "user_id": {
363
+ "name": "user_id",
364
+ "type": "varchar(256)",
365
+ "primaryKey": false,
366
+ "notNull": false
367
+ },
368
+ "created_by": {
369
+ "name": "created_by",
370
+ "type": "varchar(256)",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "created_at": {
375
+ "name": "created_at",
376
+ "type": "timestamp",
377
+ "primaryKey": false,
378
+ "notNull": true,
379
+ "default": "now()"
380
+ },
381
+ "updated_at": {
382
+ "name": "updated_at",
383
+ "type": "timestamp",
384
+ "primaryKey": false,
385
+ "notNull": true,
386
+ "default": "now()"
387
+ }
388
+ },
389
+ "indexes": {},
390
+ "foreignKeys": {
391
+ "credential_references_project_fk": {
392
+ "name": "credential_references_project_fk",
393
+ "tableFrom": "credential_references",
394
+ "tableTo": "projects",
395
+ "columnsFrom": [
396
+ "tenant_id",
397
+ "project_id"
398
+ ],
399
+ "columnsTo": [
400
+ "tenant_id",
401
+ "id"
402
+ ],
403
+ "onDelete": "cascade",
404
+ "onUpdate": "no action"
405
+ }
406
+ },
407
+ "compositePrimaryKeys": {
408
+ "credential_references_tenant_id_project_id_id_pk": {
409
+ "name": "credential_references_tenant_id_project_id_id_pk",
410
+ "columns": [
411
+ "tenant_id",
412
+ "project_id",
413
+ "id"
414
+ ]
415
+ }
416
+ },
417
+ "uniqueConstraints": {
418
+ "credential_references_id_unique": {
419
+ "name": "credential_references_id_unique",
420
+ "nullsNotDistinct": false,
421
+ "columns": [
422
+ "id"
423
+ ]
424
+ },
425
+ "credential_references_tool_user_unique": {
426
+ "name": "credential_references_tool_user_unique",
427
+ "nullsNotDistinct": false,
428
+ "columns": [
429
+ "tool_id",
430
+ "user_id"
431
+ ]
432
+ }
433
+ },
434
+ "policies": {},
435
+ "checkConstraints": {},
436
+ "isRLSEnabled": false
437
+ },
438
+ "public.data_components": {
439
+ "name": "data_components",
440
+ "schema": "",
441
+ "columns": {
442
+ "tenant_id": {
443
+ "name": "tenant_id",
444
+ "type": "varchar(256)",
445
+ "primaryKey": false,
446
+ "notNull": true
447
+ },
448
+ "id": {
449
+ "name": "id",
450
+ "type": "varchar(256)",
451
+ "primaryKey": false,
452
+ "notNull": true
453
+ },
454
+ "project_id": {
455
+ "name": "project_id",
456
+ "type": "varchar(256)",
457
+ "primaryKey": false,
458
+ "notNull": true
459
+ },
460
+ "name": {
461
+ "name": "name",
462
+ "type": "varchar(256)",
463
+ "primaryKey": false,
464
+ "notNull": true
465
+ },
466
+ "description": {
467
+ "name": "description",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": false
471
+ },
472
+ "props": {
473
+ "name": "props",
474
+ "type": "jsonb",
475
+ "primaryKey": false,
476
+ "notNull": true
477
+ },
478
+ "render": {
479
+ "name": "render",
480
+ "type": "jsonb",
481
+ "primaryKey": false,
482
+ "notNull": false
483
+ },
484
+ "created_at": {
485
+ "name": "created_at",
486
+ "type": "timestamp",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "default": "now()"
490
+ },
491
+ "updated_at": {
492
+ "name": "updated_at",
493
+ "type": "timestamp",
494
+ "primaryKey": false,
495
+ "notNull": true,
496
+ "default": "now()"
497
+ }
498
+ },
499
+ "indexes": {},
500
+ "foreignKeys": {
501
+ "data_components_project_fk": {
502
+ "name": "data_components_project_fk",
503
+ "tableFrom": "data_components",
504
+ "tableTo": "projects",
505
+ "columnsFrom": [
506
+ "tenant_id",
507
+ "project_id"
508
+ ],
509
+ "columnsTo": [
510
+ "tenant_id",
511
+ "id"
512
+ ],
513
+ "onDelete": "cascade",
514
+ "onUpdate": "no action"
515
+ }
516
+ },
517
+ "compositePrimaryKeys": {
518
+ "data_components_tenant_id_project_id_id_pk": {
519
+ "name": "data_components_tenant_id_project_id_id_pk",
520
+ "columns": [
521
+ "tenant_id",
522
+ "project_id",
523
+ "id"
524
+ ]
525
+ }
526
+ },
527
+ "uniqueConstraints": {},
528
+ "policies": {},
529
+ "checkConstraints": {},
530
+ "isRLSEnabled": false
531
+ },
532
+ "public.dataset": {
533
+ "name": "dataset",
534
+ "schema": "",
535
+ "columns": {
536
+ "tenant_id": {
537
+ "name": "tenant_id",
538
+ "type": "varchar(256)",
539
+ "primaryKey": false,
540
+ "notNull": true
541
+ },
542
+ "id": {
543
+ "name": "id",
544
+ "type": "varchar(256)",
545
+ "primaryKey": false,
546
+ "notNull": true
547
+ },
548
+ "project_id": {
549
+ "name": "project_id",
550
+ "type": "varchar(256)",
551
+ "primaryKey": false,
552
+ "notNull": true
553
+ },
554
+ "name": {
555
+ "name": "name",
556
+ "type": "varchar(256)",
557
+ "primaryKey": false,
558
+ "notNull": true
559
+ },
560
+ "created_at": {
561
+ "name": "created_at",
562
+ "type": "timestamp",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "default": "now()"
566
+ },
567
+ "updated_at": {
568
+ "name": "updated_at",
569
+ "type": "timestamp",
570
+ "primaryKey": false,
571
+ "notNull": true,
572
+ "default": "now()"
573
+ }
574
+ },
575
+ "indexes": {},
576
+ "foreignKeys": {
577
+ "dataset_project_fk": {
578
+ "name": "dataset_project_fk",
579
+ "tableFrom": "dataset",
580
+ "tableTo": "projects",
581
+ "columnsFrom": [
582
+ "tenant_id",
583
+ "project_id"
584
+ ],
585
+ "columnsTo": [
586
+ "tenant_id",
587
+ "id"
588
+ ],
589
+ "onDelete": "cascade",
590
+ "onUpdate": "no action"
591
+ }
592
+ },
593
+ "compositePrimaryKeys": {
594
+ "dataset_tenant_id_project_id_id_pk": {
595
+ "name": "dataset_tenant_id_project_id_id_pk",
596
+ "columns": [
597
+ "tenant_id",
598
+ "project_id",
599
+ "id"
600
+ ]
601
+ }
602
+ },
603
+ "uniqueConstraints": {},
604
+ "policies": {},
605
+ "checkConstraints": {},
606
+ "isRLSEnabled": false
607
+ },
608
+ "public.dataset_item": {
609
+ "name": "dataset_item",
610
+ "schema": "",
611
+ "columns": {
612
+ "tenant_id": {
613
+ "name": "tenant_id",
614
+ "type": "varchar(256)",
615
+ "primaryKey": false,
616
+ "notNull": true
617
+ },
618
+ "id": {
619
+ "name": "id",
620
+ "type": "varchar(256)",
621
+ "primaryKey": false,
622
+ "notNull": true
623
+ },
624
+ "project_id": {
625
+ "name": "project_id",
626
+ "type": "varchar(256)",
627
+ "primaryKey": false,
628
+ "notNull": true
629
+ },
630
+ "dataset_id": {
631
+ "name": "dataset_id",
632
+ "type": "varchar(256)",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "input": {
637
+ "name": "input",
638
+ "type": "jsonb",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "expected_output": {
643
+ "name": "expected_output",
644
+ "type": "jsonb",
645
+ "primaryKey": false,
646
+ "notNull": false
647
+ },
648
+ "simulation_agent": {
649
+ "name": "simulation_agent",
650
+ "type": "jsonb",
651
+ "primaryKey": false,
652
+ "notNull": false
653
+ },
654
+ "created_at": {
655
+ "name": "created_at",
656
+ "type": "timestamp",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "default": "now()"
660
+ },
661
+ "updated_at": {
662
+ "name": "updated_at",
663
+ "type": "timestamp",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "default": "now()"
667
+ }
668
+ },
669
+ "indexes": {},
670
+ "foreignKeys": {
671
+ "dataset_item_dataset_fk": {
672
+ "name": "dataset_item_dataset_fk",
673
+ "tableFrom": "dataset_item",
674
+ "tableTo": "dataset",
675
+ "columnsFrom": [
676
+ "tenant_id",
677
+ "project_id",
678
+ "dataset_id"
679
+ ],
680
+ "columnsTo": [
681
+ "tenant_id",
682
+ "project_id",
683
+ "id"
684
+ ],
685
+ "onDelete": "cascade",
686
+ "onUpdate": "no action"
687
+ }
688
+ },
689
+ "compositePrimaryKeys": {
690
+ "dataset_item_tenant_id_project_id_id_pk": {
691
+ "name": "dataset_item_tenant_id_project_id_id_pk",
692
+ "columns": [
693
+ "tenant_id",
694
+ "project_id",
695
+ "id"
696
+ ]
697
+ }
698
+ },
699
+ "uniqueConstraints": {},
700
+ "policies": {},
701
+ "checkConstraints": {},
702
+ "isRLSEnabled": false
703
+ },
704
+ "public.dataset_run_config": {
705
+ "name": "dataset_run_config",
706
+ "schema": "",
707
+ "columns": {
708
+ "tenant_id": {
709
+ "name": "tenant_id",
710
+ "type": "varchar(256)",
711
+ "primaryKey": false,
712
+ "notNull": true
713
+ },
714
+ "id": {
715
+ "name": "id",
716
+ "type": "varchar(256)",
717
+ "primaryKey": false,
718
+ "notNull": true
719
+ },
720
+ "project_id": {
721
+ "name": "project_id",
722
+ "type": "varchar(256)",
723
+ "primaryKey": false,
724
+ "notNull": true
725
+ },
726
+ "name": {
727
+ "name": "name",
728
+ "type": "varchar(256)",
729
+ "primaryKey": false,
730
+ "notNull": true
731
+ },
732
+ "description": {
733
+ "name": "description",
734
+ "type": "text",
735
+ "primaryKey": false,
736
+ "notNull": false
737
+ },
738
+ "dataset_id": {
739
+ "name": "dataset_id",
740
+ "type": "varchar(256)",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "created_at": {
745
+ "name": "created_at",
746
+ "type": "timestamp",
747
+ "primaryKey": false,
748
+ "notNull": true,
749
+ "default": "now()"
750
+ },
751
+ "updated_at": {
752
+ "name": "updated_at",
753
+ "type": "timestamp",
754
+ "primaryKey": false,
755
+ "notNull": true,
756
+ "default": "now()"
757
+ }
758
+ },
759
+ "indexes": {},
760
+ "foreignKeys": {
761
+ "dataset_run_config_project_fk": {
762
+ "name": "dataset_run_config_project_fk",
763
+ "tableFrom": "dataset_run_config",
764
+ "tableTo": "projects",
765
+ "columnsFrom": [
766
+ "tenant_id",
767
+ "project_id"
768
+ ],
769
+ "columnsTo": [
770
+ "tenant_id",
771
+ "id"
772
+ ],
773
+ "onDelete": "cascade",
774
+ "onUpdate": "no action"
775
+ },
776
+ "dataset_run_config_dataset_fk": {
777
+ "name": "dataset_run_config_dataset_fk",
778
+ "tableFrom": "dataset_run_config",
779
+ "tableTo": "dataset",
780
+ "columnsFrom": [
781
+ "tenant_id",
782
+ "project_id",
783
+ "dataset_id"
784
+ ],
785
+ "columnsTo": [
786
+ "tenant_id",
787
+ "project_id",
788
+ "id"
789
+ ],
790
+ "onDelete": "cascade",
791
+ "onUpdate": "no action"
792
+ }
793
+ },
794
+ "compositePrimaryKeys": {
795
+ "dataset_run_config_tenant_id_project_id_id_pk": {
796
+ "name": "dataset_run_config_tenant_id_project_id_id_pk",
797
+ "columns": [
798
+ "tenant_id",
799
+ "project_id",
800
+ "id"
801
+ ]
802
+ }
803
+ },
804
+ "uniqueConstraints": {},
805
+ "policies": {},
806
+ "checkConstraints": {},
807
+ "isRLSEnabled": false
808
+ },
809
+ "public.dataset_run_config_agent_relations": {
810
+ "name": "dataset_run_config_agent_relations",
811
+ "schema": "",
812
+ "columns": {
813
+ "tenant_id": {
814
+ "name": "tenant_id",
815
+ "type": "varchar(256)",
816
+ "primaryKey": false,
817
+ "notNull": true
818
+ },
819
+ "id": {
820
+ "name": "id",
821
+ "type": "varchar(256)",
822
+ "primaryKey": false,
823
+ "notNull": true
824
+ },
825
+ "project_id": {
826
+ "name": "project_id",
827
+ "type": "varchar(256)",
828
+ "primaryKey": false,
829
+ "notNull": true
830
+ },
831
+ "dataset_run_config_id": {
832
+ "name": "dataset_run_config_id",
833
+ "type": "varchar(256)",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ },
837
+ "agent_id": {
838
+ "name": "agent_id",
839
+ "type": "varchar(256)",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "created_at": {
844
+ "name": "created_at",
845
+ "type": "timestamp",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "default": "now()"
849
+ },
850
+ "updated_at": {
851
+ "name": "updated_at",
852
+ "type": "timestamp",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "default": "now()"
856
+ }
857
+ },
858
+ "indexes": {},
859
+ "foreignKeys": {
860
+ "dataset_run_config_agent_relations_dataset_run_config_fk": {
861
+ "name": "dataset_run_config_agent_relations_dataset_run_config_fk",
862
+ "tableFrom": "dataset_run_config_agent_relations",
863
+ "tableTo": "dataset_run_config",
864
+ "columnsFrom": [
865
+ "tenant_id",
866
+ "project_id",
867
+ "dataset_run_config_id"
868
+ ],
869
+ "columnsTo": [
870
+ "tenant_id",
871
+ "project_id",
872
+ "id"
873
+ ],
874
+ "onDelete": "cascade",
875
+ "onUpdate": "no action"
876
+ },
877
+ "dataset_run_config_agent_relations_agent_fk": {
878
+ "name": "dataset_run_config_agent_relations_agent_fk",
879
+ "tableFrom": "dataset_run_config_agent_relations",
880
+ "tableTo": "agent",
881
+ "columnsFrom": [
882
+ "tenant_id",
883
+ "project_id",
884
+ "agent_id"
885
+ ],
886
+ "columnsTo": [
887
+ "tenant_id",
888
+ "project_id",
889
+ "id"
890
+ ],
891
+ "onDelete": "cascade",
892
+ "onUpdate": "no action"
893
+ }
894
+ },
895
+ "compositePrimaryKeys": {
896
+ "dataset_run_config_agent_relations_tenant_id_project_id_id_pk": {
897
+ "name": "dataset_run_config_agent_relations_tenant_id_project_id_id_pk",
898
+ "columns": [
899
+ "tenant_id",
900
+ "project_id",
901
+ "id"
902
+ ]
903
+ }
904
+ },
905
+ "uniqueConstraints": {},
906
+ "policies": {},
907
+ "checkConstraints": {},
908
+ "isRLSEnabled": false
909
+ },
910
+ "public.evaluation_job_config": {
911
+ "name": "evaluation_job_config",
912
+ "schema": "",
913
+ "columns": {
914
+ "tenant_id": {
915
+ "name": "tenant_id",
916
+ "type": "varchar(256)",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "id": {
921
+ "name": "id",
922
+ "type": "varchar(256)",
923
+ "primaryKey": false,
924
+ "notNull": true
925
+ },
926
+ "project_id": {
927
+ "name": "project_id",
928
+ "type": "varchar(256)",
929
+ "primaryKey": false,
930
+ "notNull": true
931
+ },
932
+ "job_filters": {
933
+ "name": "job_filters",
934
+ "type": "jsonb",
935
+ "primaryKey": false,
936
+ "notNull": false
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "timestamp",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "default": "now()"
944
+ },
945
+ "updated_at": {
946
+ "name": "updated_at",
947
+ "type": "timestamp",
948
+ "primaryKey": false,
949
+ "notNull": true,
950
+ "default": "now()"
951
+ }
952
+ },
953
+ "indexes": {},
954
+ "foreignKeys": {
955
+ "evaluation_job_config_project_fk": {
956
+ "name": "evaluation_job_config_project_fk",
957
+ "tableFrom": "evaluation_job_config",
958
+ "tableTo": "projects",
959
+ "columnsFrom": [
960
+ "tenant_id",
961
+ "project_id"
962
+ ],
963
+ "columnsTo": [
964
+ "tenant_id",
965
+ "id"
966
+ ],
967
+ "onDelete": "cascade",
968
+ "onUpdate": "no action"
969
+ }
970
+ },
971
+ "compositePrimaryKeys": {
972
+ "evaluation_job_config_tenant_id_project_id_id_pk": {
973
+ "name": "evaluation_job_config_tenant_id_project_id_id_pk",
974
+ "columns": [
975
+ "tenant_id",
976
+ "project_id",
977
+ "id"
978
+ ]
979
+ }
980
+ },
981
+ "uniqueConstraints": {},
982
+ "policies": {},
983
+ "checkConstraints": {},
984
+ "isRLSEnabled": false
985
+ },
986
+ "public.evaluation_job_config_evaluator_relations": {
987
+ "name": "evaluation_job_config_evaluator_relations",
988
+ "schema": "",
989
+ "columns": {
990
+ "tenant_id": {
991
+ "name": "tenant_id",
992
+ "type": "varchar(256)",
993
+ "primaryKey": false,
994
+ "notNull": true
995
+ },
996
+ "id": {
997
+ "name": "id",
998
+ "type": "varchar(256)",
999
+ "primaryKey": false,
1000
+ "notNull": true
1001
+ },
1002
+ "project_id": {
1003
+ "name": "project_id",
1004
+ "type": "varchar(256)",
1005
+ "primaryKey": false,
1006
+ "notNull": true
1007
+ },
1008
+ "evaluation_job_config_id": {
1009
+ "name": "evaluation_job_config_id",
1010
+ "type": "varchar(256)",
1011
+ "primaryKey": false,
1012
+ "notNull": true
1013
+ },
1014
+ "evaluator_id": {
1015
+ "name": "evaluator_id",
1016
+ "type": "varchar(256)",
1017
+ "primaryKey": false,
1018
+ "notNull": true
1019
+ },
1020
+ "created_at": {
1021
+ "name": "created_at",
1022
+ "type": "timestamp",
1023
+ "primaryKey": false,
1024
+ "notNull": true,
1025
+ "default": "now()"
1026
+ },
1027
+ "updated_at": {
1028
+ "name": "updated_at",
1029
+ "type": "timestamp",
1030
+ "primaryKey": false,
1031
+ "notNull": true,
1032
+ "default": "now()"
1033
+ }
1034
+ },
1035
+ "indexes": {},
1036
+ "foreignKeys": {
1037
+ "eval_job_cfg_evaluator_rel_job_cfg_fk": {
1038
+ "name": "eval_job_cfg_evaluator_rel_job_cfg_fk",
1039
+ "tableFrom": "evaluation_job_config_evaluator_relations",
1040
+ "tableTo": "evaluation_job_config",
1041
+ "columnsFrom": [
1042
+ "tenant_id",
1043
+ "project_id",
1044
+ "evaluation_job_config_id"
1045
+ ],
1046
+ "columnsTo": [
1047
+ "tenant_id",
1048
+ "project_id",
1049
+ "id"
1050
+ ],
1051
+ "onDelete": "cascade",
1052
+ "onUpdate": "no action"
1053
+ },
1054
+ "eval_job_cfg_evaluator_rel_evaluator_fk": {
1055
+ "name": "eval_job_cfg_evaluator_rel_evaluator_fk",
1056
+ "tableFrom": "evaluation_job_config_evaluator_relations",
1057
+ "tableTo": "evaluator",
1058
+ "columnsFrom": [
1059
+ "tenant_id",
1060
+ "project_id",
1061
+ "evaluator_id"
1062
+ ],
1063
+ "columnsTo": [
1064
+ "tenant_id",
1065
+ "project_id",
1066
+ "id"
1067
+ ],
1068
+ "onDelete": "cascade",
1069
+ "onUpdate": "no action"
1070
+ }
1071
+ },
1072
+ "compositePrimaryKeys": {
1073
+ "eval_job_cfg_evaluator_rel_pk": {
1074
+ "name": "eval_job_cfg_evaluator_rel_pk",
1075
+ "columns": [
1076
+ "tenant_id",
1077
+ "project_id",
1078
+ "id"
1079
+ ]
1080
+ }
1081
+ },
1082
+ "uniqueConstraints": {},
1083
+ "policies": {},
1084
+ "checkConstraints": {},
1085
+ "isRLSEnabled": false
1086
+ },
1087
+ "public.evaluation_run_config": {
1088
+ "name": "evaluation_run_config",
1089
+ "schema": "",
1090
+ "columns": {
1091
+ "tenant_id": {
1092
+ "name": "tenant_id",
1093
+ "type": "varchar(256)",
1094
+ "primaryKey": false,
1095
+ "notNull": true
1096
+ },
1097
+ "id": {
1098
+ "name": "id",
1099
+ "type": "varchar(256)",
1100
+ "primaryKey": false,
1101
+ "notNull": true
1102
+ },
1103
+ "project_id": {
1104
+ "name": "project_id",
1105
+ "type": "varchar(256)",
1106
+ "primaryKey": false,
1107
+ "notNull": true
1108
+ },
1109
+ "name": {
1110
+ "name": "name",
1111
+ "type": "varchar(256)",
1112
+ "primaryKey": false,
1113
+ "notNull": true
1114
+ },
1115
+ "description": {
1116
+ "name": "description",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": false
1120
+ },
1121
+ "is_active": {
1122
+ "name": "is_active",
1123
+ "type": "boolean",
1124
+ "primaryKey": false,
1125
+ "notNull": true,
1126
+ "default": true
1127
+ },
1128
+ "created_at": {
1129
+ "name": "created_at",
1130
+ "type": "timestamp",
1131
+ "primaryKey": false,
1132
+ "notNull": true,
1133
+ "default": "now()"
1134
+ },
1135
+ "updated_at": {
1136
+ "name": "updated_at",
1137
+ "type": "timestamp",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "default": "now()"
1141
+ }
1142
+ },
1143
+ "indexes": {},
1144
+ "foreignKeys": {
1145
+ "evaluation_run_config_project_fk": {
1146
+ "name": "evaluation_run_config_project_fk",
1147
+ "tableFrom": "evaluation_run_config",
1148
+ "tableTo": "projects",
1149
+ "columnsFrom": [
1150
+ "tenant_id",
1151
+ "project_id"
1152
+ ],
1153
+ "columnsTo": [
1154
+ "tenant_id",
1155
+ "id"
1156
+ ],
1157
+ "onDelete": "cascade",
1158
+ "onUpdate": "no action"
1159
+ }
1160
+ },
1161
+ "compositePrimaryKeys": {
1162
+ "evaluation_run_config_tenant_id_project_id_id_pk": {
1163
+ "name": "evaluation_run_config_tenant_id_project_id_id_pk",
1164
+ "columns": [
1165
+ "tenant_id",
1166
+ "project_id",
1167
+ "id"
1168
+ ]
1169
+ }
1170
+ },
1171
+ "uniqueConstraints": {},
1172
+ "policies": {},
1173
+ "checkConstraints": {},
1174
+ "isRLSEnabled": false
1175
+ },
1176
+ "public.evaluation_run_config_evaluation_suite_config_relations": {
1177
+ "name": "evaluation_run_config_evaluation_suite_config_relations",
1178
+ "schema": "",
1179
+ "columns": {
1180
+ "tenant_id": {
1181
+ "name": "tenant_id",
1182
+ "type": "varchar(256)",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "id": {
1187
+ "name": "id",
1188
+ "type": "varchar(256)",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "project_id": {
1193
+ "name": "project_id",
1194
+ "type": "varchar(256)",
1195
+ "primaryKey": false,
1196
+ "notNull": true
1197
+ },
1198
+ "evaluation_run_config_id": {
1199
+ "name": "evaluation_run_config_id",
1200
+ "type": "varchar(256)",
1201
+ "primaryKey": false,
1202
+ "notNull": true
1203
+ },
1204
+ "evaluation_suite_config_id": {
1205
+ "name": "evaluation_suite_config_id",
1206
+ "type": "varchar(256)",
1207
+ "primaryKey": false,
1208
+ "notNull": true
1209
+ },
1210
+ "created_at": {
1211
+ "name": "created_at",
1212
+ "type": "timestamp",
1213
+ "primaryKey": false,
1214
+ "notNull": true,
1215
+ "default": "now()"
1216
+ },
1217
+ "updated_at": {
1218
+ "name": "updated_at",
1219
+ "type": "timestamp",
1220
+ "primaryKey": false,
1221
+ "notNull": true,
1222
+ "default": "now()"
1223
+ }
1224
+ },
1225
+ "indexes": {},
1226
+ "foreignKeys": {
1227
+ "eval_run_cfg_eval_suite_rel_run_cfg_fk": {
1228
+ "name": "eval_run_cfg_eval_suite_rel_run_cfg_fk",
1229
+ "tableFrom": "evaluation_run_config_evaluation_suite_config_relations",
1230
+ "tableTo": "evaluation_run_config",
1231
+ "columnsFrom": [
1232
+ "tenant_id",
1233
+ "project_id",
1234
+ "evaluation_run_config_id"
1235
+ ],
1236
+ "columnsTo": [
1237
+ "tenant_id",
1238
+ "project_id",
1239
+ "id"
1240
+ ],
1241
+ "onDelete": "cascade",
1242
+ "onUpdate": "no action"
1243
+ },
1244
+ "eval_run_cfg_eval_suite_rel_suite_cfg_fk": {
1245
+ "name": "eval_run_cfg_eval_suite_rel_suite_cfg_fk",
1246
+ "tableFrom": "evaluation_run_config_evaluation_suite_config_relations",
1247
+ "tableTo": "evaluation_suite_config",
1248
+ "columnsFrom": [
1249
+ "tenant_id",
1250
+ "project_id",
1251
+ "evaluation_suite_config_id"
1252
+ ],
1253
+ "columnsTo": [
1254
+ "tenant_id",
1255
+ "project_id",
1256
+ "id"
1257
+ ],
1258
+ "onDelete": "cascade",
1259
+ "onUpdate": "no action"
1260
+ }
1261
+ },
1262
+ "compositePrimaryKeys": {
1263
+ "eval_run_cfg_eval_suite_cfg_rel_pk": {
1264
+ "name": "eval_run_cfg_eval_suite_cfg_rel_pk",
1265
+ "columns": [
1266
+ "tenant_id",
1267
+ "project_id",
1268
+ "id"
1269
+ ]
1270
+ }
1271
+ },
1272
+ "uniqueConstraints": {},
1273
+ "policies": {},
1274
+ "checkConstraints": {},
1275
+ "isRLSEnabled": false
1276
+ },
1277
+ "public.evaluation_suite_config": {
1278
+ "name": "evaluation_suite_config",
1279
+ "schema": "",
1280
+ "columns": {
1281
+ "tenant_id": {
1282
+ "name": "tenant_id",
1283
+ "type": "varchar(256)",
1284
+ "primaryKey": false,
1285
+ "notNull": true
1286
+ },
1287
+ "id": {
1288
+ "name": "id",
1289
+ "type": "varchar(256)",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "project_id": {
1294
+ "name": "project_id",
1295
+ "type": "varchar(256)",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ },
1299
+ "filters": {
1300
+ "name": "filters",
1301
+ "type": "jsonb",
1302
+ "primaryKey": false,
1303
+ "notNull": false
1304
+ },
1305
+ "sample_rate": {
1306
+ "name": "sample_rate",
1307
+ "type": "double precision",
1308
+ "primaryKey": false,
1309
+ "notNull": false
1310
+ },
1311
+ "created_at": {
1312
+ "name": "created_at",
1313
+ "type": "timestamp",
1314
+ "primaryKey": false,
1315
+ "notNull": true,
1316
+ "default": "now()"
1317
+ },
1318
+ "updated_at": {
1319
+ "name": "updated_at",
1320
+ "type": "timestamp",
1321
+ "primaryKey": false,
1322
+ "notNull": true,
1323
+ "default": "now()"
1324
+ }
1325
+ },
1326
+ "indexes": {},
1327
+ "foreignKeys": {
1328
+ "evaluation_suite_config_project_fk": {
1329
+ "name": "evaluation_suite_config_project_fk",
1330
+ "tableFrom": "evaluation_suite_config",
1331
+ "tableTo": "projects",
1332
+ "columnsFrom": [
1333
+ "tenant_id",
1334
+ "project_id"
1335
+ ],
1336
+ "columnsTo": [
1337
+ "tenant_id",
1338
+ "id"
1339
+ ],
1340
+ "onDelete": "cascade",
1341
+ "onUpdate": "no action"
1342
+ }
1343
+ },
1344
+ "compositePrimaryKeys": {
1345
+ "evaluation_suite_config_tenant_id_project_id_id_pk": {
1346
+ "name": "evaluation_suite_config_tenant_id_project_id_id_pk",
1347
+ "columns": [
1348
+ "tenant_id",
1349
+ "project_id",
1350
+ "id"
1351
+ ]
1352
+ }
1353
+ },
1354
+ "uniqueConstraints": {},
1355
+ "policies": {},
1356
+ "checkConstraints": {},
1357
+ "isRLSEnabled": false
1358
+ },
1359
+ "public.evaluation_suite_config_evaluator_relations": {
1360
+ "name": "evaluation_suite_config_evaluator_relations",
1361
+ "schema": "",
1362
+ "columns": {
1363
+ "tenant_id": {
1364
+ "name": "tenant_id",
1365
+ "type": "varchar(256)",
1366
+ "primaryKey": false,
1367
+ "notNull": true
1368
+ },
1369
+ "id": {
1370
+ "name": "id",
1371
+ "type": "varchar(256)",
1372
+ "primaryKey": false,
1373
+ "notNull": true
1374
+ },
1375
+ "project_id": {
1376
+ "name": "project_id",
1377
+ "type": "varchar(256)",
1378
+ "primaryKey": false,
1379
+ "notNull": true
1380
+ },
1381
+ "evaluation_suite_config_id": {
1382
+ "name": "evaluation_suite_config_id",
1383
+ "type": "varchar(256)",
1384
+ "primaryKey": false,
1385
+ "notNull": true
1386
+ },
1387
+ "evaluator_id": {
1388
+ "name": "evaluator_id",
1389
+ "type": "varchar(256)",
1390
+ "primaryKey": false,
1391
+ "notNull": true
1392
+ },
1393
+ "created_at": {
1394
+ "name": "created_at",
1395
+ "type": "timestamp",
1396
+ "primaryKey": false,
1397
+ "notNull": true,
1398
+ "default": "now()"
1399
+ },
1400
+ "updated_at": {
1401
+ "name": "updated_at",
1402
+ "type": "timestamp",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "default": "now()"
1406
+ }
1407
+ },
1408
+ "indexes": {},
1409
+ "foreignKeys": {
1410
+ "eval_suite_cfg_evaluator_rel_suite_cfg_fk": {
1411
+ "name": "eval_suite_cfg_evaluator_rel_suite_cfg_fk",
1412
+ "tableFrom": "evaluation_suite_config_evaluator_relations",
1413
+ "tableTo": "evaluation_suite_config",
1414
+ "columnsFrom": [
1415
+ "tenant_id",
1416
+ "project_id",
1417
+ "evaluation_suite_config_id"
1418
+ ],
1419
+ "columnsTo": [
1420
+ "tenant_id",
1421
+ "project_id",
1422
+ "id"
1423
+ ],
1424
+ "onDelete": "cascade",
1425
+ "onUpdate": "no action"
1426
+ },
1427
+ "eval_suite_cfg_evaluator_rel_evaluator_fk": {
1428
+ "name": "eval_suite_cfg_evaluator_rel_evaluator_fk",
1429
+ "tableFrom": "evaluation_suite_config_evaluator_relations",
1430
+ "tableTo": "evaluator",
1431
+ "columnsFrom": [
1432
+ "tenant_id",
1433
+ "project_id",
1434
+ "evaluator_id"
1435
+ ],
1436
+ "columnsTo": [
1437
+ "tenant_id",
1438
+ "project_id",
1439
+ "id"
1440
+ ],
1441
+ "onDelete": "cascade",
1442
+ "onUpdate": "no action"
1443
+ }
1444
+ },
1445
+ "compositePrimaryKeys": {
1446
+ "eval_suite_cfg_evaluator_rel_pk": {
1447
+ "name": "eval_suite_cfg_evaluator_rel_pk",
1448
+ "columns": [
1449
+ "tenant_id",
1450
+ "project_id",
1451
+ "id"
1452
+ ]
1453
+ }
1454
+ },
1455
+ "uniqueConstraints": {},
1456
+ "policies": {},
1457
+ "checkConstraints": {},
1458
+ "isRLSEnabled": false
1459
+ },
1460
+ "public.evaluator": {
1461
+ "name": "evaluator",
1462
+ "schema": "",
1463
+ "columns": {
1464
+ "tenant_id": {
1465
+ "name": "tenant_id",
1466
+ "type": "varchar(256)",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "id": {
1471
+ "name": "id",
1472
+ "type": "varchar(256)",
1473
+ "primaryKey": false,
1474
+ "notNull": true
1475
+ },
1476
+ "project_id": {
1477
+ "name": "project_id",
1478
+ "type": "varchar(256)",
1479
+ "primaryKey": false,
1480
+ "notNull": true
1481
+ },
1482
+ "name": {
1483
+ "name": "name",
1484
+ "type": "varchar(256)",
1485
+ "primaryKey": false,
1486
+ "notNull": true
1487
+ },
1488
+ "description": {
1489
+ "name": "description",
1490
+ "type": "text",
1491
+ "primaryKey": false,
1492
+ "notNull": false
1493
+ },
1494
+ "prompt": {
1495
+ "name": "prompt",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": true
1499
+ },
1500
+ "schema": {
1501
+ "name": "schema",
1502
+ "type": "jsonb",
1503
+ "primaryKey": false,
1504
+ "notNull": true
1505
+ },
1506
+ "model": {
1507
+ "name": "model",
1508
+ "type": "jsonb",
1509
+ "primaryKey": false,
1510
+ "notNull": true
1511
+ },
1512
+ "pass_criteria": {
1513
+ "name": "pass_criteria",
1514
+ "type": "jsonb",
1515
+ "primaryKey": false,
1516
+ "notNull": false
1517
+ },
1518
+ "created_at": {
1519
+ "name": "created_at",
1520
+ "type": "timestamp",
1521
+ "primaryKey": false,
1522
+ "notNull": true,
1523
+ "default": "now()"
1524
+ },
1525
+ "updated_at": {
1526
+ "name": "updated_at",
1527
+ "type": "timestamp",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "default": "now()"
1531
+ }
1532
+ },
1533
+ "indexes": {},
1534
+ "foreignKeys": {
1535
+ "evaluator_project_fk": {
1536
+ "name": "evaluator_project_fk",
1537
+ "tableFrom": "evaluator",
1538
+ "tableTo": "projects",
1539
+ "columnsFrom": [
1540
+ "tenant_id",
1541
+ "project_id"
1542
+ ],
1543
+ "columnsTo": [
1544
+ "tenant_id",
1545
+ "id"
1546
+ ],
1547
+ "onDelete": "cascade",
1548
+ "onUpdate": "no action"
1549
+ }
1550
+ },
1551
+ "compositePrimaryKeys": {
1552
+ "evaluator_tenant_id_project_id_id_pk": {
1553
+ "name": "evaluator_tenant_id_project_id_id_pk",
1554
+ "columns": [
1555
+ "tenant_id",
1556
+ "project_id",
1557
+ "id"
1558
+ ]
1559
+ }
1560
+ },
1561
+ "uniqueConstraints": {},
1562
+ "policies": {},
1563
+ "checkConstraints": {},
1564
+ "isRLSEnabled": false
1565
+ },
1566
+ "public.external_agents": {
1567
+ "name": "external_agents",
1568
+ "schema": "",
1569
+ "columns": {
1570
+ "tenant_id": {
1571
+ "name": "tenant_id",
1572
+ "type": "varchar(256)",
1573
+ "primaryKey": false,
1574
+ "notNull": true
1575
+ },
1576
+ "id": {
1577
+ "name": "id",
1578
+ "type": "varchar(256)",
1579
+ "primaryKey": false,
1580
+ "notNull": true
1581
+ },
1582
+ "project_id": {
1583
+ "name": "project_id",
1584
+ "type": "varchar(256)",
1585
+ "primaryKey": false,
1586
+ "notNull": true
1587
+ },
1588
+ "name": {
1589
+ "name": "name",
1590
+ "type": "varchar(256)",
1591
+ "primaryKey": false,
1592
+ "notNull": true
1593
+ },
1594
+ "description": {
1595
+ "name": "description",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": false
1599
+ },
1600
+ "base_url": {
1601
+ "name": "base_url",
1602
+ "type": "text",
1603
+ "primaryKey": false,
1604
+ "notNull": true
1605
+ },
1606
+ "credential_reference_id": {
1607
+ "name": "credential_reference_id",
1608
+ "type": "varchar(256)",
1609
+ "primaryKey": false,
1610
+ "notNull": false
1611
+ },
1612
+ "created_at": {
1613
+ "name": "created_at",
1614
+ "type": "timestamp",
1615
+ "primaryKey": false,
1616
+ "notNull": true,
1617
+ "default": "now()"
1618
+ },
1619
+ "updated_at": {
1620
+ "name": "updated_at",
1621
+ "type": "timestamp",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "default": "now()"
1625
+ }
1626
+ },
1627
+ "indexes": {},
1628
+ "foreignKeys": {
1629
+ "external_agents_project_fk": {
1630
+ "name": "external_agents_project_fk",
1631
+ "tableFrom": "external_agents",
1632
+ "tableTo": "projects",
1633
+ "columnsFrom": [
1634
+ "tenant_id",
1635
+ "project_id"
1636
+ ],
1637
+ "columnsTo": [
1638
+ "tenant_id",
1639
+ "id"
1640
+ ],
1641
+ "onDelete": "cascade",
1642
+ "onUpdate": "no action"
1643
+ },
1644
+ "external_agents_credential_reference_fk": {
1645
+ "name": "external_agents_credential_reference_fk",
1646
+ "tableFrom": "external_agents",
1647
+ "tableTo": "credential_references",
1648
+ "columnsFrom": [
1649
+ "credential_reference_id"
1650
+ ],
1651
+ "columnsTo": [
1652
+ "id"
1653
+ ],
1654
+ "onDelete": "set null",
1655
+ "onUpdate": "no action"
1656
+ }
1657
+ },
1658
+ "compositePrimaryKeys": {
1659
+ "external_agents_tenant_id_project_id_id_pk": {
1660
+ "name": "external_agents_tenant_id_project_id_id_pk",
1661
+ "columns": [
1662
+ "tenant_id",
1663
+ "project_id",
1664
+ "id"
1665
+ ]
1666
+ }
1667
+ },
1668
+ "uniqueConstraints": {},
1669
+ "policies": {},
1670
+ "checkConstraints": {},
1671
+ "isRLSEnabled": false
1672
+ },
1673
+ "public.function_tools": {
1674
+ "name": "function_tools",
1675
+ "schema": "",
1676
+ "columns": {
1677
+ "tenant_id": {
1678
+ "name": "tenant_id",
1679
+ "type": "varchar(256)",
1680
+ "primaryKey": false,
1681
+ "notNull": true
1682
+ },
1683
+ "id": {
1684
+ "name": "id",
1685
+ "type": "varchar(256)",
1686
+ "primaryKey": false,
1687
+ "notNull": true
1688
+ },
1689
+ "project_id": {
1690
+ "name": "project_id",
1691
+ "type": "varchar(256)",
1692
+ "primaryKey": false,
1693
+ "notNull": true
1694
+ },
1695
+ "agent_id": {
1696
+ "name": "agent_id",
1697
+ "type": "varchar(256)",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ },
1701
+ "name": {
1702
+ "name": "name",
1703
+ "type": "varchar(256)",
1704
+ "primaryKey": false,
1705
+ "notNull": true
1706
+ },
1707
+ "description": {
1708
+ "name": "description",
1709
+ "type": "text",
1710
+ "primaryKey": false,
1711
+ "notNull": false
1712
+ },
1713
+ "function_id": {
1714
+ "name": "function_id",
1715
+ "type": "varchar(256)",
1716
+ "primaryKey": false,
1717
+ "notNull": true
1718
+ },
1719
+ "created_at": {
1720
+ "name": "created_at",
1721
+ "type": "timestamp",
1722
+ "primaryKey": false,
1723
+ "notNull": true,
1724
+ "default": "now()"
1725
+ },
1726
+ "updated_at": {
1727
+ "name": "updated_at",
1728
+ "type": "timestamp",
1729
+ "primaryKey": false,
1730
+ "notNull": true,
1731
+ "default": "now()"
1732
+ }
1733
+ },
1734
+ "indexes": {},
1735
+ "foreignKeys": {
1736
+ "function_tools_agent_fk": {
1737
+ "name": "function_tools_agent_fk",
1738
+ "tableFrom": "function_tools",
1739
+ "tableTo": "agent",
1740
+ "columnsFrom": [
1741
+ "tenant_id",
1742
+ "project_id",
1743
+ "agent_id"
1744
+ ],
1745
+ "columnsTo": [
1746
+ "tenant_id",
1747
+ "project_id",
1748
+ "id"
1749
+ ],
1750
+ "onDelete": "cascade",
1751
+ "onUpdate": "no action"
1752
+ },
1753
+ "function_tools_function_fk": {
1754
+ "name": "function_tools_function_fk",
1755
+ "tableFrom": "function_tools",
1756
+ "tableTo": "functions",
1757
+ "columnsFrom": [
1758
+ "tenant_id",
1759
+ "project_id",
1760
+ "function_id"
1761
+ ],
1762
+ "columnsTo": [
1763
+ "tenant_id",
1764
+ "project_id",
1765
+ "id"
1766
+ ],
1767
+ "onDelete": "cascade",
1768
+ "onUpdate": "no action"
1769
+ }
1770
+ },
1771
+ "compositePrimaryKeys": {
1772
+ "function_tools_tenant_id_project_id_agent_id_id_pk": {
1773
+ "name": "function_tools_tenant_id_project_id_agent_id_id_pk",
1774
+ "columns": [
1775
+ "tenant_id",
1776
+ "project_id",
1777
+ "agent_id",
1778
+ "id"
1779
+ ]
1780
+ }
1781
+ },
1782
+ "uniqueConstraints": {},
1783
+ "policies": {},
1784
+ "checkConstraints": {},
1785
+ "isRLSEnabled": false
1786
+ },
1787
+ "public.functions": {
1788
+ "name": "functions",
1789
+ "schema": "",
1790
+ "columns": {
1791
+ "tenant_id": {
1792
+ "name": "tenant_id",
1793
+ "type": "varchar(256)",
1794
+ "primaryKey": false,
1795
+ "notNull": true
1796
+ },
1797
+ "id": {
1798
+ "name": "id",
1799
+ "type": "varchar(256)",
1800
+ "primaryKey": false,
1801
+ "notNull": true
1802
+ },
1803
+ "project_id": {
1804
+ "name": "project_id",
1805
+ "type": "varchar(256)",
1806
+ "primaryKey": false,
1807
+ "notNull": true
1808
+ },
1809
+ "input_schema": {
1810
+ "name": "input_schema",
1811
+ "type": "jsonb",
1812
+ "primaryKey": false,
1813
+ "notNull": false
1814
+ },
1815
+ "execute_code": {
1816
+ "name": "execute_code",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": true
1820
+ },
1821
+ "dependencies": {
1822
+ "name": "dependencies",
1823
+ "type": "jsonb",
1824
+ "primaryKey": false,
1825
+ "notNull": false
1826
+ },
1827
+ "created_at": {
1828
+ "name": "created_at",
1829
+ "type": "timestamp",
1830
+ "primaryKey": false,
1831
+ "notNull": true,
1832
+ "default": "now()"
1833
+ },
1834
+ "updated_at": {
1835
+ "name": "updated_at",
1836
+ "type": "timestamp",
1837
+ "primaryKey": false,
1838
+ "notNull": true,
1839
+ "default": "now()"
1840
+ }
1841
+ },
1842
+ "indexes": {},
1843
+ "foreignKeys": {
1844
+ "functions_project_fk": {
1845
+ "name": "functions_project_fk",
1846
+ "tableFrom": "functions",
1847
+ "tableTo": "projects",
1848
+ "columnsFrom": [
1849
+ "tenant_id",
1850
+ "project_id"
1851
+ ],
1852
+ "columnsTo": [
1853
+ "tenant_id",
1854
+ "id"
1855
+ ],
1856
+ "onDelete": "cascade",
1857
+ "onUpdate": "no action"
1858
+ }
1859
+ },
1860
+ "compositePrimaryKeys": {
1861
+ "functions_tenant_id_project_id_id_pk": {
1862
+ "name": "functions_tenant_id_project_id_id_pk",
1863
+ "columns": [
1864
+ "tenant_id",
1865
+ "project_id",
1866
+ "id"
1867
+ ]
1868
+ }
1869
+ },
1870
+ "uniqueConstraints": {},
1871
+ "policies": {},
1872
+ "checkConstraints": {},
1873
+ "isRLSEnabled": false
1874
+ },
1875
+ "public.projects": {
1876
+ "name": "projects",
1877
+ "schema": "",
1878
+ "columns": {
1879
+ "tenant_id": {
1880
+ "name": "tenant_id",
1881
+ "type": "varchar(256)",
1882
+ "primaryKey": false,
1883
+ "notNull": true
1884
+ },
1885
+ "id": {
1886
+ "name": "id",
1887
+ "type": "varchar(256)",
1888
+ "primaryKey": false,
1889
+ "notNull": true
1890
+ },
1891
+ "name": {
1892
+ "name": "name",
1893
+ "type": "varchar(256)",
1894
+ "primaryKey": false,
1895
+ "notNull": true
1896
+ },
1897
+ "description": {
1898
+ "name": "description",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": false
1902
+ },
1903
+ "models": {
1904
+ "name": "models",
1905
+ "type": "jsonb",
1906
+ "primaryKey": false,
1907
+ "notNull": false
1908
+ },
1909
+ "stop_when": {
1910
+ "name": "stop_when",
1911
+ "type": "jsonb",
1912
+ "primaryKey": false,
1913
+ "notNull": false
1914
+ },
1915
+ "created_at": {
1916
+ "name": "created_at",
1917
+ "type": "timestamp",
1918
+ "primaryKey": false,
1919
+ "notNull": true,
1920
+ "default": "now()"
1921
+ },
1922
+ "updated_at": {
1923
+ "name": "updated_at",
1924
+ "type": "timestamp",
1925
+ "primaryKey": false,
1926
+ "notNull": true,
1927
+ "default": "now()"
1928
+ }
1929
+ },
1930
+ "indexes": {},
1931
+ "foreignKeys": {},
1932
+ "compositePrimaryKeys": {
1933
+ "projects_tenant_id_id_pk": {
1934
+ "name": "projects_tenant_id_id_pk",
1935
+ "columns": [
1936
+ "tenant_id",
1937
+ "id"
1938
+ ]
1939
+ }
1940
+ },
1941
+ "uniqueConstraints": {},
1942
+ "policies": {},
1943
+ "checkConstraints": {},
1944
+ "isRLSEnabled": false
1945
+ },
1946
+ "public.scheduled_triggers": {
1947
+ "name": "scheduled_triggers",
1948
+ "schema": "",
1949
+ "columns": {
1950
+ "tenant_id": {
1951
+ "name": "tenant_id",
1952
+ "type": "varchar(256)",
1953
+ "primaryKey": false,
1954
+ "notNull": true
1955
+ },
1956
+ "id": {
1957
+ "name": "id",
1958
+ "type": "varchar(256)",
1959
+ "primaryKey": false,
1960
+ "notNull": true
1961
+ },
1962
+ "project_id": {
1963
+ "name": "project_id",
1964
+ "type": "varchar(256)",
1965
+ "primaryKey": false,
1966
+ "notNull": true
1967
+ },
1968
+ "agent_id": {
1969
+ "name": "agent_id",
1970
+ "type": "varchar(256)",
1971
+ "primaryKey": false,
1972
+ "notNull": true
1973
+ },
1974
+ "name": {
1975
+ "name": "name",
1976
+ "type": "varchar(256)",
1977
+ "primaryKey": false,
1978
+ "notNull": true
1979
+ },
1980
+ "description": {
1981
+ "name": "description",
1982
+ "type": "text",
1983
+ "primaryKey": false,
1984
+ "notNull": false
1985
+ },
1986
+ "enabled": {
1987
+ "name": "enabled",
1988
+ "type": "boolean",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "default": true
1992
+ },
1993
+ "cron_expression": {
1994
+ "name": "cron_expression",
1995
+ "type": "varchar(256)",
1996
+ "primaryKey": false,
1997
+ "notNull": false
1998
+ },
1999
+ "cron_timezone": {
2000
+ "name": "cron_timezone",
2001
+ "type": "varchar(64)",
2002
+ "primaryKey": false,
2003
+ "notNull": false,
2004
+ "default": "'UTC'"
2005
+ },
2006
+ "run_at": {
2007
+ "name": "run_at",
2008
+ "type": "timestamp with time zone",
2009
+ "primaryKey": false,
2010
+ "notNull": false
2011
+ },
2012
+ "payload": {
2013
+ "name": "payload",
2014
+ "type": "jsonb",
2015
+ "primaryKey": false,
2016
+ "notNull": false
2017
+ },
2018
+ "message_template": {
2019
+ "name": "message_template",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": false
2023
+ },
2024
+ "max_retries": {
2025
+ "name": "max_retries",
2026
+ "type": "numeric",
2027
+ "primaryKey": false,
2028
+ "notNull": true,
2029
+ "default": 1
2030
+ },
2031
+ "retry_delay_seconds": {
2032
+ "name": "retry_delay_seconds",
2033
+ "type": "numeric",
2034
+ "primaryKey": false,
2035
+ "notNull": true,
2036
+ "default": 60
2037
+ },
2038
+ "timeout_seconds": {
2039
+ "name": "timeout_seconds",
2040
+ "type": "numeric",
2041
+ "primaryKey": false,
2042
+ "notNull": true,
2043
+ "default": 780
2044
+ },
2045
+ "run_as_user_id": {
2046
+ "name": "run_as_user_id",
2047
+ "type": "varchar(256)",
2048
+ "primaryKey": false,
2049
+ "notNull": false
2050
+ },
2051
+ "created_by": {
2052
+ "name": "created_by",
2053
+ "type": "varchar(256)",
2054
+ "primaryKey": false,
2055
+ "notNull": false
2056
+ },
2057
+ "created_at": {
2058
+ "name": "created_at",
2059
+ "type": "timestamp",
2060
+ "primaryKey": false,
2061
+ "notNull": true,
2062
+ "default": "now()"
2063
+ },
2064
+ "updated_at": {
2065
+ "name": "updated_at",
2066
+ "type": "timestamp",
2067
+ "primaryKey": false,
2068
+ "notNull": true,
2069
+ "default": "now()"
2070
+ }
2071
+ },
2072
+ "indexes": {},
2073
+ "foreignKeys": {
2074
+ "scheduled_triggers_agent_fk": {
2075
+ "name": "scheduled_triggers_agent_fk",
2076
+ "tableFrom": "scheduled_triggers",
2077
+ "tableTo": "agent",
2078
+ "columnsFrom": [
2079
+ "tenant_id",
2080
+ "project_id",
2081
+ "agent_id"
2082
+ ],
2083
+ "columnsTo": [
2084
+ "tenant_id",
2085
+ "project_id",
2086
+ "id"
2087
+ ],
2088
+ "onDelete": "cascade",
2089
+ "onUpdate": "no action"
2090
+ }
2091
+ },
2092
+ "compositePrimaryKeys": {
2093
+ "scheduled_triggers_tenant_id_project_id_agent_id_id_pk": {
2094
+ "name": "scheduled_triggers_tenant_id_project_id_agent_id_id_pk",
2095
+ "columns": [
2096
+ "tenant_id",
2097
+ "project_id",
2098
+ "agent_id",
2099
+ "id"
2100
+ ]
2101
+ }
2102
+ },
2103
+ "uniqueConstraints": {},
2104
+ "policies": {},
2105
+ "checkConstraints": {},
2106
+ "isRLSEnabled": false
2107
+ },
2108
+ "public.scheduled_workflows": {
2109
+ "name": "scheduled_workflows",
2110
+ "schema": "",
2111
+ "columns": {
2112
+ "tenant_id": {
2113
+ "name": "tenant_id",
2114
+ "type": "varchar(256)",
2115
+ "primaryKey": false,
2116
+ "notNull": true
2117
+ },
2118
+ "id": {
2119
+ "name": "id",
2120
+ "type": "varchar(256)",
2121
+ "primaryKey": false,
2122
+ "notNull": true
2123
+ },
2124
+ "project_id": {
2125
+ "name": "project_id",
2126
+ "type": "varchar(256)",
2127
+ "primaryKey": false,
2128
+ "notNull": true
2129
+ },
2130
+ "agent_id": {
2131
+ "name": "agent_id",
2132
+ "type": "varchar(256)",
2133
+ "primaryKey": false,
2134
+ "notNull": true
2135
+ },
2136
+ "name": {
2137
+ "name": "name",
2138
+ "type": "varchar(256)",
2139
+ "primaryKey": false,
2140
+ "notNull": true
2141
+ },
2142
+ "description": {
2143
+ "name": "description",
2144
+ "type": "text",
2145
+ "primaryKey": false,
2146
+ "notNull": false
2147
+ },
2148
+ "workflow_run_id": {
2149
+ "name": "workflow_run_id",
2150
+ "type": "varchar(256)",
2151
+ "primaryKey": false,
2152
+ "notNull": false
2153
+ },
2154
+ "status": {
2155
+ "name": "status",
2156
+ "type": "varchar(50)",
2157
+ "primaryKey": false,
2158
+ "notNull": true,
2159
+ "default": "'pending'"
2160
+ },
2161
+ "scheduled_trigger_id": {
2162
+ "name": "scheduled_trigger_id",
2163
+ "type": "varchar(256)",
2164
+ "primaryKey": false,
2165
+ "notNull": true
2166
+ },
2167
+ "created_at": {
2168
+ "name": "created_at",
2169
+ "type": "timestamp",
2170
+ "primaryKey": false,
2171
+ "notNull": true,
2172
+ "default": "now()"
2173
+ },
2174
+ "updated_at": {
2175
+ "name": "updated_at",
2176
+ "type": "timestamp",
2177
+ "primaryKey": false,
2178
+ "notNull": true,
2179
+ "default": "now()"
2180
+ }
2181
+ },
2182
+ "indexes": {},
2183
+ "foreignKeys": {
2184
+ "scheduled_workflows_agent_fk": {
2185
+ "name": "scheduled_workflows_agent_fk",
2186
+ "tableFrom": "scheduled_workflows",
2187
+ "tableTo": "agent",
2188
+ "columnsFrom": [
2189
+ "tenant_id",
2190
+ "project_id",
2191
+ "agent_id"
2192
+ ],
2193
+ "columnsTo": [
2194
+ "tenant_id",
2195
+ "project_id",
2196
+ "id"
2197
+ ],
2198
+ "onDelete": "cascade",
2199
+ "onUpdate": "no action"
2200
+ },
2201
+ "scheduled_workflows_trigger_fk": {
2202
+ "name": "scheduled_workflows_trigger_fk",
2203
+ "tableFrom": "scheduled_workflows",
2204
+ "tableTo": "scheduled_triggers",
2205
+ "columnsFrom": [
2206
+ "tenant_id",
2207
+ "project_id",
2208
+ "agent_id",
2209
+ "scheduled_trigger_id"
2210
+ ],
2211
+ "columnsTo": [
2212
+ "tenant_id",
2213
+ "project_id",
2214
+ "agent_id",
2215
+ "id"
2216
+ ],
2217
+ "onDelete": "cascade",
2218
+ "onUpdate": "no action"
2219
+ }
2220
+ },
2221
+ "compositePrimaryKeys": {
2222
+ "scheduled_workflows_tenant_id_project_id_agent_id_id_pk": {
2223
+ "name": "scheduled_workflows_tenant_id_project_id_agent_id_id_pk",
2224
+ "columns": [
2225
+ "tenant_id",
2226
+ "project_id",
2227
+ "agent_id",
2228
+ "id"
2229
+ ]
2230
+ }
2231
+ },
2232
+ "uniqueConstraints": {},
2233
+ "policies": {},
2234
+ "checkConstraints": {},
2235
+ "isRLSEnabled": false
2236
+ },
2237
+ "public.skills": {
2238
+ "name": "skills",
2239
+ "schema": "",
2240
+ "columns": {
2241
+ "tenant_id": {
2242
+ "name": "tenant_id",
2243
+ "type": "varchar(256)",
2244
+ "primaryKey": false,
2245
+ "notNull": true
2246
+ },
2247
+ "id": {
2248
+ "name": "id",
2249
+ "type": "varchar(64)",
2250
+ "primaryKey": false,
2251
+ "notNull": true
2252
+ },
2253
+ "project_id": {
2254
+ "name": "project_id",
2255
+ "type": "varchar(256)",
2256
+ "primaryKey": false,
2257
+ "notNull": true
2258
+ },
2259
+ "name": {
2260
+ "name": "name",
2261
+ "type": "varchar(64)",
2262
+ "primaryKey": false,
2263
+ "notNull": true
2264
+ },
2265
+ "description": {
2266
+ "name": "description",
2267
+ "type": "text",
2268
+ "primaryKey": false,
2269
+ "notNull": true
2270
+ },
2271
+ "content": {
2272
+ "name": "content",
2273
+ "type": "text",
2274
+ "primaryKey": false,
2275
+ "notNull": true
2276
+ },
2277
+ "metadata": {
2278
+ "name": "metadata",
2279
+ "type": "jsonb",
2280
+ "primaryKey": false,
2281
+ "notNull": false
2282
+ },
2283
+ "created_at": {
2284
+ "name": "created_at",
2285
+ "type": "timestamp",
2286
+ "primaryKey": false,
2287
+ "notNull": true,
2288
+ "default": "now()"
2289
+ },
2290
+ "updated_at": {
2291
+ "name": "updated_at",
2292
+ "type": "timestamp",
2293
+ "primaryKey": false,
2294
+ "notNull": true,
2295
+ "default": "now()"
2296
+ }
2297
+ },
2298
+ "indexes": {},
2299
+ "foreignKeys": {
2300
+ "skills_project_fk": {
2301
+ "name": "skills_project_fk",
2302
+ "tableFrom": "skills",
2303
+ "tableTo": "projects",
2304
+ "columnsFrom": [
2305
+ "tenant_id",
2306
+ "project_id"
2307
+ ],
2308
+ "columnsTo": [
2309
+ "tenant_id",
2310
+ "id"
2311
+ ],
2312
+ "onDelete": "cascade",
2313
+ "onUpdate": "no action"
2314
+ }
2315
+ },
2316
+ "compositePrimaryKeys": {
2317
+ "skills_tenant_id_project_id_id_pk": {
2318
+ "name": "skills_tenant_id_project_id_id_pk",
2319
+ "columns": [
2320
+ "tenant_id",
2321
+ "project_id",
2322
+ "id"
2323
+ ]
2324
+ }
2325
+ },
2326
+ "uniqueConstraints": {},
2327
+ "policies": {},
2328
+ "checkConstraints": {},
2329
+ "isRLSEnabled": false
2330
+ },
2331
+ "public.sub_agent_artifact_components": {
2332
+ "name": "sub_agent_artifact_components",
2333
+ "schema": "",
2334
+ "columns": {
2335
+ "tenant_id": {
2336
+ "name": "tenant_id",
2337
+ "type": "varchar(256)",
2338
+ "primaryKey": false,
2339
+ "notNull": true
2340
+ },
2341
+ "id": {
2342
+ "name": "id",
2343
+ "type": "varchar(256)",
2344
+ "primaryKey": false,
2345
+ "notNull": true
2346
+ },
2347
+ "project_id": {
2348
+ "name": "project_id",
2349
+ "type": "varchar(256)",
2350
+ "primaryKey": false,
2351
+ "notNull": true
2352
+ },
2353
+ "agent_id": {
2354
+ "name": "agent_id",
2355
+ "type": "varchar(256)",
2356
+ "primaryKey": false,
2357
+ "notNull": true
2358
+ },
2359
+ "sub_agent_id": {
2360
+ "name": "sub_agent_id",
2361
+ "type": "varchar(256)",
2362
+ "primaryKey": false,
2363
+ "notNull": true
2364
+ },
2365
+ "artifact_component_id": {
2366
+ "name": "artifact_component_id",
2367
+ "type": "varchar(256)",
2368
+ "primaryKey": false,
2369
+ "notNull": true
2370
+ },
2371
+ "created_at": {
2372
+ "name": "created_at",
2373
+ "type": "timestamp",
2374
+ "primaryKey": false,
2375
+ "notNull": true,
2376
+ "default": "now()"
2377
+ }
2378
+ },
2379
+ "indexes": {},
2380
+ "foreignKeys": {
2381
+ "sub_agent_artifact_components_sub_agent_fk": {
2382
+ "name": "sub_agent_artifact_components_sub_agent_fk",
2383
+ "tableFrom": "sub_agent_artifact_components",
2384
+ "tableTo": "sub_agents",
2385
+ "columnsFrom": [
2386
+ "tenant_id",
2387
+ "project_id",
2388
+ "agent_id",
2389
+ "sub_agent_id"
2390
+ ],
2391
+ "columnsTo": [
2392
+ "tenant_id",
2393
+ "project_id",
2394
+ "agent_id",
2395
+ "id"
2396
+ ],
2397
+ "onDelete": "cascade",
2398
+ "onUpdate": "no action"
2399
+ },
2400
+ "sub_agent_artifact_components_artifact_component_fk": {
2401
+ "name": "sub_agent_artifact_components_artifact_component_fk",
2402
+ "tableFrom": "sub_agent_artifact_components",
2403
+ "tableTo": "artifact_components",
2404
+ "columnsFrom": [
2405
+ "tenant_id",
2406
+ "project_id",
2407
+ "artifact_component_id"
2408
+ ],
2409
+ "columnsTo": [
2410
+ "tenant_id",
2411
+ "project_id",
2412
+ "id"
2413
+ ],
2414
+ "onDelete": "cascade",
2415
+ "onUpdate": "no action"
2416
+ }
2417
+ },
2418
+ "compositePrimaryKeys": {
2419
+ "sub_agent_artifact_components_pk": {
2420
+ "name": "sub_agent_artifact_components_pk",
2421
+ "columns": [
2422
+ "tenant_id",
2423
+ "project_id",
2424
+ "agent_id",
2425
+ "sub_agent_id",
2426
+ "id"
2427
+ ]
2428
+ }
2429
+ },
2430
+ "uniqueConstraints": {},
2431
+ "policies": {},
2432
+ "checkConstraints": {},
2433
+ "isRLSEnabled": false
2434
+ },
2435
+ "public.sub_agent_data_components": {
2436
+ "name": "sub_agent_data_components",
2437
+ "schema": "",
2438
+ "columns": {
2439
+ "tenant_id": {
2440
+ "name": "tenant_id",
2441
+ "type": "varchar(256)",
2442
+ "primaryKey": false,
2443
+ "notNull": true
2444
+ },
2445
+ "id": {
2446
+ "name": "id",
2447
+ "type": "varchar(256)",
2448
+ "primaryKey": false,
2449
+ "notNull": true
2450
+ },
2451
+ "project_id": {
2452
+ "name": "project_id",
2453
+ "type": "varchar(256)",
2454
+ "primaryKey": false,
2455
+ "notNull": true
2456
+ },
2457
+ "agent_id": {
2458
+ "name": "agent_id",
2459
+ "type": "varchar(256)",
2460
+ "primaryKey": false,
2461
+ "notNull": true
2462
+ },
2463
+ "sub_agent_id": {
2464
+ "name": "sub_agent_id",
2465
+ "type": "varchar(256)",
2466
+ "primaryKey": false,
2467
+ "notNull": true
2468
+ },
2469
+ "data_component_id": {
2470
+ "name": "data_component_id",
2471
+ "type": "varchar(256)",
2472
+ "primaryKey": false,
2473
+ "notNull": true
2474
+ },
2475
+ "created_at": {
2476
+ "name": "created_at",
2477
+ "type": "timestamp",
2478
+ "primaryKey": false,
2479
+ "notNull": true,
2480
+ "default": "now()"
2481
+ }
2482
+ },
2483
+ "indexes": {},
2484
+ "foreignKeys": {
2485
+ "sub_agent_data_components_sub_agent_fk": {
2486
+ "name": "sub_agent_data_components_sub_agent_fk",
2487
+ "tableFrom": "sub_agent_data_components",
2488
+ "tableTo": "sub_agents",
2489
+ "columnsFrom": [
2490
+ "tenant_id",
2491
+ "project_id",
2492
+ "agent_id",
2493
+ "sub_agent_id"
2494
+ ],
2495
+ "columnsTo": [
2496
+ "tenant_id",
2497
+ "project_id",
2498
+ "agent_id",
2499
+ "id"
2500
+ ],
2501
+ "onDelete": "cascade",
2502
+ "onUpdate": "no action"
2503
+ },
2504
+ "sub_agent_data_components_data_component_fk": {
2505
+ "name": "sub_agent_data_components_data_component_fk",
2506
+ "tableFrom": "sub_agent_data_components",
2507
+ "tableTo": "data_components",
2508
+ "columnsFrom": [
2509
+ "tenant_id",
2510
+ "project_id",
2511
+ "data_component_id"
2512
+ ],
2513
+ "columnsTo": [
2514
+ "tenant_id",
2515
+ "project_id",
2516
+ "id"
2517
+ ],
2518
+ "onDelete": "cascade",
2519
+ "onUpdate": "no action"
2520
+ }
2521
+ },
2522
+ "compositePrimaryKeys": {
2523
+ "sub_agent_data_components_tenant_id_project_id_id_pk": {
2524
+ "name": "sub_agent_data_components_tenant_id_project_id_id_pk",
2525
+ "columns": [
2526
+ "tenant_id",
2527
+ "project_id",
2528
+ "id"
2529
+ ]
2530
+ }
2531
+ },
2532
+ "uniqueConstraints": {},
2533
+ "policies": {},
2534
+ "checkConstraints": {},
2535
+ "isRLSEnabled": false
2536
+ },
2537
+ "public.sub_agent_external_agent_relations": {
2538
+ "name": "sub_agent_external_agent_relations",
2539
+ "schema": "",
2540
+ "columns": {
2541
+ "tenant_id": {
2542
+ "name": "tenant_id",
2543
+ "type": "varchar(256)",
2544
+ "primaryKey": false,
2545
+ "notNull": true
2546
+ },
2547
+ "id": {
2548
+ "name": "id",
2549
+ "type": "varchar(256)",
2550
+ "primaryKey": false,
2551
+ "notNull": true
2552
+ },
2553
+ "project_id": {
2554
+ "name": "project_id",
2555
+ "type": "varchar(256)",
2556
+ "primaryKey": false,
2557
+ "notNull": true
2558
+ },
2559
+ "agent_id": {
2560
+ "name": "agent_id",
2561
+ "type": "varchar(256)",
2562
+ "primaryKey": false,
2563
+ "notNull": true
2564
+ },
2565
+ "sub_agent_id": {
2566
+ "name": "sub_agent_id",
2567
+ "type": "varchar(256)",
2568
+ "primaryKey": false,
2569
+ "notNull": true
2570
+ },
2571
+ "external_agent_id": {
2572
+ "name": "external_agent_id",
2573
+ "type": "varchar(256)",
2574
+ "primaryKey": false,
2575
+ "notNull": true
2576
+ },
2577
+ "headers": {
2578
+ "name": "headers",
2579
+ "type": "jsonb",
2580
+ "primaryKey": false,
2581
+ "notNull": false
2582
+ },
2583
+ "created_at": {
2584
+ "name": "created_at",
2585
+ "type": "timestamp",
2586
+ "primaryKey": false,
2587
+ "notNull": true,
2588
+ "default": "now()"
2589
+ },
2590
+ "updated_at": {
2591
+ "name": "updated_at",
2592
+ "type": "timestamp",
2593
+ "primaryKey": false,
2594
+ "notNull": true,
2595
+ "default": "now()"
2596
+ }
2597
+ },
2598
+ "indexes": {},
2599
+ "foreignKeys": {
2600
+ "sub_agent_external_agent_relations_sub_agent_fk": {
2601
+ "name": "sub_agent_external_agent_relations_sub_agent_fk",
2602
+ "tableFrom": "sub_agent_external_agent_relations",
2603
+ "tableTo": "sub_agents",
2604
+ "columnsFrom": [
2605
+ "tenant_id",
2606
+ "project_id",
2607
+ "agent_id",
2608
+ "sub_agent_id"
2609
+ ],
2610
+ "columnsTo": [
2611
+ "tenant_id",
2612
+ "project_id",
2613
+ "agent_id",
2614
+ "id"
2615
+ ],
2616
+ "onDelete": "cascade",
2617
+ "onUpdate": "no action"
2618
+ },
2619
+ "sub_agent_external_agent_relations_external_agent_fk": {
2620
+ "name": "sub_agent_external_agent_relations_external_agent_fk",
2621
+ "tableFrom": "sub_agent_external_agent_relations",
2622
+ "tableTo": "external_agents",
2623
+ "columnsFrom": [
2624
+ "tenant_id",
2625
+ "project_id",
2626
+ "external_agent_id"
2627
+ ],
2628
+ "columnsTo": [
2629
+ "tenant_id",
2630
+ "project_id",
2631
+ "id"
2632
+ ],
2633
+ "onDelete": "cascade",
2634
+ "onUpdate": "no action"
2635
+ }
2636
+ },
2637
+ "compositePrimaryKeys": {
2638
+ "sub_agent_external_agent_relations_pk": {
2639
+ "name": "sub_agent_external_agent_relations_pk",
2640
+ "columns": [
2641
+ "tenant_id",
2642
+ "project_id",
2643
+ "agent_id",
2644
+ "id"
2645
+ ]
2646
+ }
2647
+ },
2648
+ "uniqueConstraints": {},
2649
+ "policies": {},
2650
+ "checkConstraints": {},
2651
+ "isRLSEnabled": false
2652
+ },
2653
+ "public.sub_agent_function_tool_relations": {
2654
+ "name": "sub_agent_function_tool_relations",
2655
+ "schema": "",
2656
+ "columns": {
2657
+ "tenant_id": {
2658
+ "name": "tenant_id",
2659
+ "type": "varchar(256)",
2660
+ "primaryKey": false,
2661
+ "notNull": true
2662
+ },
2663
+ "id": {
2664
+ "name": "id",
2665
+ "type": "varchar(256)",
2666
+ "primaryKey": false,
2667
+ "notNull": true
2668
+ },
2669
+ "project_id": {
2670
+ "name": "project_id",
2671
+ "type": "varchar(256)",
2672
+ "primaryKey": false,
2673
+ "notNull": true
2674
+ },
2675
+ "agent_id": {
2676
+ "name": "agent_id",
2677
+ "type": "varchar(256)",
2678
+ "primaryKey": false,
2679
+ "notNull": true
2680
+ },
2681
+ "sub_agent_id": {
2682
+ "name": "sub_agent_id",
2683
+ "type": "varchar(256)",
2684
+ "primaryKey": false,
2685
+ "notNull": true
2686
+ },
2687
+ "function_tool_id": {
2688
+ "name": "function_tool_id",
2689
+ "type": "varchar(256)",
2690
+ "primaryKey": false,
2691
+ "notNull": true
2692
+ },
2693
+ "tool_policies": {
2694
+ "name": "tool_policies",
2695
+ "type": "jsonb",
2696
+ "primaryKey": false,
2697
+ "notNull": false
2698
+ },
2699
+ "created_at": {
2700
+ "name": "created_at",
2701
+ "type": "timestamp",
2702
+ "primaryKey": false,
2703
+ "notNull": true,
2704
+ "default": "now()"
2705
+ },
2706
+ "updated_at": {
2707
+ "name": "updated_at",
2708
+ "type": "timestamp",
2709
+ "primaryKey": false,
2710
+ "notNull": true,
2711
+ "default": "now()"
2712
+ }
2713
+ },
2714
+ "indexes": {},
2715
+ "foreignKeys": {
2716
+ "sub_agent_function_tool_relations_sub_agent_fk": {
2717
+ "name": "sub_agent_function_tool_relations_sub_agent_fk",
2718
+ "tableFrom": "sub_agent_function_tool_relations",
2719
+ "tableTo": "sub_agents",
2720
+ "columnsFrom": [
2721
+ "tenant_id",
2722
+ "project_id",
2723
+ "agent_id",
2724
+ "sub_agent_id"
2725
+ ],
2726
+ "columnsTo": [
2727
+ "tenant_id",
2728
+ "project_id",
2729
+ "agent_id",
2730
+ "id"
2731
+ ],
2732
+ "onDelete": "cascade",
2733
+ "onUpdate": "no action"
2734
+ },
2735
+ "sub_agent_function_tool_relations_function_tool_fk": {
2736
+ "name": "sub_agent_function_tool_relations_function_tool_fk",
2737
+ "tableFrom": "sub_agent_function_tool_relations",
2738
+ "tableTo": "function_tools",
2739
+ "columnsFrom": [
2740
+ "tenant_id",
2741
+ "project_id",
2742
+ "agent_id",
2743
+ "function_tool_id"
2744
+ ],
2745
+ "columnsTo": [
2746
+ "tenant_id",
2747
+ "project_id",
2748
+ "agent_id",
2749
+ "id"
2750
+ ],
2751
+ "onDelete": "cascade",
2752
+ "onUpdate": "no action"
2753
+ }
2754
+ },
2755
+ "compositePrimaryKeys": {
2756
+ "sub_agent_function_tool_relations_pk": {
2757
+ "name": "sub_agent_function_tool_relations_pk",
2758
+ "columns": [
2759
+ "tenant_id",
2760
+ "project_id",
2761
+ "agent_id",
2762
+ "id"
2763
+ ]
2764
+ }
2765
+ },
2766
+ "uniqueConstraints": {},
2767
+ "policies": {},
2768
+ "checkConstraints": {},
2769
+ "isRLSEnabled": false
2770
+ },
2771
+ "public.sub_agent_relations": {
2772
+ "name": "sub_agent_relations",
2773
+ "schema": "",
2774
+ "columns": {
2775
+ "tenant_id": {
2776
+ "name": "tenant_id",
2777
+ "type": "varchar(256)",
2778
+ "primaryKey": false,
2779
+ "notNull": true
2780
+ },
2781
+ "id": {
2782
+ "name": "id",
2783
+ "type": "varchar(256)",
2784
+ "primaryKey": false,
2785
+ "notNull": true
2786
+ },
2787
+ "project_id": {
2788
+ "name": "project_id",
2789
+ "type": "varchar(256)",
2790
+ "primaryKey": false,
2791
+ "notNull": true
2792
+ },
2793
+ "agent_id": {
2794
+ "name": "agent_id",
2795
+ "type": "varchar(256)",
2796
+ "primaryKey": false,
2797
+ "notNull": true
2798
+ },
2799
+ "source_sub_agent_id": {
2800
+ "name": "source_sub_agent_id",
2801
+ "type": "varchar(256)",
2802
+ "primaryKey": false,
2803
+ "notNull": true
2804
+ },
2805
+ "target_sub_agent_id": {
2806
+ "name": "target_sub_agent_id",
2807
+ "type": "varchar(256)",
2808
+ "primaryKey": false,
2809
+ "notNull": false
2810
+ },
2811
+ "relation_type": {
2812
+ "name": "relation_type",
2813
+ "type": "varchar(256)",
2814
+ "primaryKey": false,
2815
+ "notNull": false
2816
+ },
2817
+ "created_at": {
2818
+ "name": "created_at",
2819
+ "type": "timestamp",
2820
+ "primaryKey": false,
2821
+ "notNull": true,
2822
+ "default": "now()"
2823
+ },
2824
+ "updated_at": {
2825
+ "name": "updated_at",
2826
+ "type": "timestamp",
2827
+ "primaryKey": false,
2828
+ "notNull": true,
2829
+ "default": "now()"
2830
+ }
2831
+ },
2832
+ "indexes": {},
2833
+ "foreignKeys": {
2834
+ "sub_agent_relations_agent_fk": {
2835
+ "name": "sub_agent_relations_agent_fk",
2836
+ "tableFrom": "sub_agent_relations",
2837
+ "tableTo": "agent",
2838
+ "columnsFrom": [
2839
+ "tenant_id",
2840
+ "project_id",
2841
+ "agent_id"
2842
+ ],
2843
+ "columnsTo": [
2844
+ "tenant_id",
2845
+ "project_id",
2846
+ "id"
2847
+ ],
2848
+ "onDelete": "cascade",
2849
+ "onUpdate": "no action"
2850
+ }
2851
+ },
2852
+ "compositePrimaryKeys": {
2853
+ "sub_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2854
+ "name": "sub_agent_relations_tenant_id_project_id_agent_id_id_pk",
2855
+ "columns": [
2856
+ "tenant_id",
2857
+ "project_id",
2858
+ "agent_id",
2859
+ "id"
2860
+ ]
2861
+ }
2862
+ },
2863
+ "uniqueConstraints": {},
2864
+ "policies": {},
2865
+ "checkConstraints": {},
2866
+ "isRLSEnabled": false
2867
+ },
2868
+ "public.sub_agent_skills": {
2869
+ "name": "sub_agent_skills",
2870
+ "schema": "",
2871
+ "columns": {
2872
+ "tenant_id": {
2873
+ "name": "tenant_id",
2874
+ "type": "varchar(256)",
2875
+ "primaryKey": false,
2876
+ "notNull": true
2877
+ },
2878
+ "id": {
2879
+ "name": "id",
2880
+ "type": "varchar(256)",
2881
+ "primaryKey": false,
2882
+ "notNull": true
2883
+ },
2884
+ "project_id": {
2885
+ "name": "project_id",
2886
+ "type": "varchar(256)",
2887
+ "primaryKey": false,
2888
+ "notNull": true
2889
+ },
2890
+ "agent_id": {
2891
+ "name": "agent_id",
2892
+ "type": "varchar(256)",
2893
+ "primaryKey": false,
2894
+ "notNull": true
2895
+ },
2896
+ "sub_agent_id": {
2897
+ "name": "sub_agent_id",
2898
+ "type": "varchar(256)",
2899
+ "primaryKey": false,
2900
+ "notNull": true
2901
+ },
2902
+ "skill_id": {
2903
+ "name": "skill_id",
2904
+ "type": "varchar(64)",
2905
+ "primaryKey": false,
2906
+ "notNull": true
2907
+ },
2908
+ "index": {
2909
+ "name": "index",
2910
+ "type": "numeric",
2911
+ "primaryKey": false,
2912
+ "notNull": true,
2913
+ "default": 0
2914
+ },
2915
+ "always_loaded": {
2916
+ "name": "always_loaded",
2917
+ "type": "boolean",
2918
+ "primaryKey": false,
2919
+ "notNull": true,
2920
+ "default": false
2921
+ },
2922
+ "created_at": {
2923
+ "name": "created_at",
2924
+ "type": "timestamp",
2925
+ "primaryKey": false,
2926
+ "notNull": true,
2927
+ "default": "now()"
2928
+ },
2929
+ "updated_at": {
2930
+ "name": "updated_at",
2931
+ "type": "timestamp",
2932
+ "primaryKey": false,
2933
+ "notNull": true,
2934
+ "default": "now()"
2935
+ }
2936
+ },
2937
+ "indexes": {
2938
+ "sub_agent_skills_skill_idx": {
2939
+ "name": "sub_agent_skills_skill_idx",
2940
+ "columns": [
2941
+ {
2942
+ "expression": "skill_id",
2943
+ "isExpression": false,
2944
+ "asc": true,
2945
+ "nulls": "last"
2946
+ }
2947
+ ],
2948
+ "isUnique": false,
2949
+ "concurrently": false,
2950
+ "method": "btree",
2951
+ "with": {}
2952
+ }
2953
+ },
2954
+ "foreignKeys": {
2955
+ "sub_agent_skills_sub_agent_fk": {
2956
+ "name": "sub_agent_skills_sub_agent_fk",
2957
+ "tableFrom": "sub_agent_skills",
2958
+ "tableTo": "sub_agents",
2959
+ "columnsFrom": [
2960
+ "tenant_id",
2961
+ "project_id",
2962
+ "agent_id",
2963
+ "sub_agent_id"
2964
+ ],
2965
+ "columnsTo": [
2966
+ "tenant_id",
2967
+ "project_id",
2968
+ "agent_id",
2969
+ "id"
2970
+ ],
2971
+ "onDelete": "cascade",
2972
+ "onUpdate": "no action"
2973
+ },
2974
+ "sub_agent_skills_skill_fk": {
2975
+ "name": "sub_agent_skills_skill_fk",
2976
+ "tableFrom": "sub_agent_skills",
2977
+ "tableTo": "skills",
2978
+ "columnsFrom": [
2979
+ "tenant_id",
2980
+ "project_id",
2981
+ "skill_id"
2982
+ ],
2983
+ "columnsTo": [
2984
+ "tenant_id",
2985
+ "project_id",
2986
+ "id"
2987
+ ],
2988
+ "onDelete": "cascade",
2989
+ "onUpdate": "no action"
2990
+ }
2991
+ },
2992
+ "compositePrimaryKeys": {
2993
+ "sub_agent_skills_tenant_id_project_id_agent_id_id_pk": {
2994
+ "name": "sub_agent_skills_tenant_id_project_id_agent_id_id_pk",
2995
+ "columns": [
2996
+ "tenant_id",
2997
+ "project_id",
2998
+ "agent_id",
2999
+ "id"
3000
+ ]
3001
+ }
3002
+ },
3003
+ "uniqueConstraints": {
3004
+ "sub_agent_skills_sub_agent_skill_unique": {
3005
+ "name": "sub_agent_skills_sub_agent_skill_unique",
3006
+ "nullsNotDistinct": false,
3007
+ "columns": [
3008
+ "tenant_id",
3009
+ "project_id",
3010
+ "agent_id",
3011
+ "sub_agent_id",
3012
+ "skill_id"
3013
+ ]
3014
+ }
3015
+ },
3016
+ "policies": {},
3017
+ "checkConstraints": {},
3018
+ "isRLSEnabled": false
3019
+ },
3020
+ "public.sub_agent_team_agent_relations": {
3021
+ "name": "sub_agent_team_agent_relations",
3022
+ "schema": "",
3023
+ "columns": {
3024
+ "tenant_id": {
3025
+ "name": "tenant_id",
3026
+ "type": "varchar(256)",
3027
+ "primaryKey": false,
3028
+ "notNull": true
3029
+ },
3030
+ "id": {
3031
+ "name": "id",
3032
+ "type": "varchar(256)",
3033
+ "primaryKey": false,
3034
+ "notNull": true
3035
+ },
3036
+ "project_id": {
3037
+ "name": "project_id",
3038
+ "type": "varchar(256)",
3039
+ "primaryKey": false,
3040
+ "notNull": true
3041
+ },
3042
+ "agent_id": {
3043
+ "name": "agent_id",
3044
+ "type": "varchar(256)",
3045
+ "primaryKey": false,
3046
+ "notNull": true
3047
+ },
3048
+ "sub_agent_id": {
3049
+ "name": "sub_agent_id",
3050
+ "type": "varchar(256)",
3051
+ "primaryKey": false,
3052
+ "notNull": true
3053
+ },
3054
+ "target_agent_id": {
3055
+ "name": "target_agent_id",
3056
+ "type": "varchar(256)",
3057
+ "primaryKey": false,
3058
+ "notNull": true
3059
+ },
3060
+ "headers": {
3061
+ "name": "headers",
3062
+ "type": "jsonb",
3063
+ "primaryKey": false,
3064
+ "notNull": false
3065
+ },
3066
+ "created_at": {
3067
+ "name": "created_at",
3068
+ "type": "timestamp",
3069
+ "primaryKey": false,
3070
+ "notNull": true,
3071
+ "default": "now()"
3072
+ },
3073
+ "updated_at": {
3074
+ "name": "updated_at",
3075
+ "type": "timestamp",
3076
+ "primaryKey": false,
3077
+ "notNull": true,
3078
+ "default": "now()"
3079
+ }
3080
+ },
3081
+ "indexes": {},
3082
+ "foreignKeys": {
3083
+ "sub_agent_team_agent_relations_sub_agent_fk": {
3084
+ "name": "sub_agent_team_agent_relations_sub_agent_fk",
3085
+ "tableFrom": "sub_agent_team_agent_relations",
3086
+ "tableTo": "sub_agents",
3087
+ "columnsFrom": [
3088
+ "tenant_id",
3089
+ "project_id",
3090
+ "agent_id",
3091
+ "sub_agent_id"
3092
+ ],
3093
+ "columnsTo": [
3094
+ "tenant_id",
3095
+ "project_id",
3096
+ "agent_id",
3097
+ "id"
3098
+ ],
3099
+ "onDelete": "cascade",
3100
+ "onUpdate": "no action"
3101
+ },
3102
+ "sub_agent_team_agent_relations_target_agent_fk": {
3103
+ "name": "sub_agent_team_agent_relations_target_agent_fk",
3104
+ "tableFrom": "sub_agent_team_agent_relations",
3105
+ "tableTo": "agent",
3106
+ "columnsFrom": [
3107
+ "tenant_id",
3108
+ "project_id",
3109
+ "target_agent_id"
3110
+ ],
3111
+ "columnsTo": [
3112
+ "tenant_id",
3113
+ "project_id",
3114
+ "id"
3115
+ ],
3116
+ "onDelete": "cascade",
3117
+ "onUpdate": "no action"
3118
+ }
3119
+ },
3120
+ "compositePrimaryKeys": {
3121
+ "sub_agent_team_agent_relations_pk": {
3122
+ "name": "sub_agent_team_agent_relations_pk",
3123
+ "columns": [
3124
+ "tenant_id",
3125
+ "project_id",
3126
+ "agent_id",
3127
+ "id"
3128
+ ]
3129
+ }
3130
+ },
3131
+ "uniqueConstraints": {},
3132
+ "policies": {},
3133
+ "checkConstraints": {},
3134
+ "isRLSEnabled": false
3135
+ },
3136
+ "public.sub_agent_tool_relations": {
3137
+ "name": "sub_agent_tool_relations",
3138
+ "schema": "",
3139
+ "columns": {
3140
+ "tenant_id": {
3141
+ "name": "tenant_id",
3142
+ "type": "varchar(256)",
3143
+ "primaryKey": false,
3144
+ "notNull": true
3145
+ },
3146
+ "id": {
3147
+ "name": "id",
3148
+ "type": "varchar(256)",
3149
+ "primaryKey": false,
3150
+ "notNull": true
3151
+ },
3152
+ "project_id": {
3153
+ "name": "project_id",
3154
+ "type": "varchar(256)",
3155
+ "primaryKey": false,
3156
+ "notNull": true
3157
+ },
3158
+ "agent_id": {
3159
+ "name": "agent_id",
3160
+ "type": "varchar(256)",
3161
+ "primaryKey": false,
3162
+ "notNull": true
3163
+ },
3164
+ "sub_agent_id": {
3165
+ "name": "sub_agent_id",
3166
+ "type": "varchar(256)",
3167
+ "primaryKey": false,
3168
+ "notNull": true
3169
+ },
3170
+ "tool_id": {
3171
+ "name": "tool_id",
3172
+ "type": "varchar(256)",
3173
+ "primaryKey": false,
3174
+ "notNull": true
3175
+ },
3176
+ "selected_tools": {
3177
+ "name": "selected_tools",
3178
+ "type": "jsonb",
3179
+ "primaryKey": false,
3180
+ "notNull": false
3181
+ },
3182
+ "headers": {
3183
+ "name": "headers",
3184
+ "type": "jsonb",
3185
+ "primaryKey": false,
3186
+ "notNull": false
3187
+ },
3188
+ "tool_policies": {
3189
+ "name": "tool_policies",
3190
+ "type": "jsonb",
3191
+ "primaryKey": false,
3192
+ "notNull": false
3193
+ },
3194
+ "created_at": {
3195
+ "name": "created_at",
3196
+ "type": "timestamp",
3197
+ "primaryKey": false,
3198
+ "notNull": true,
3199
+ "default": "now()"
3200
+ },
3201
+ "updated_at": {
3202
+ "name": "updated_at",
3203
+ "type": "timestamp",
3204
+ "primaryKey": false,
3205
+ "notNull": true,
3206
+ "default": "now()"
3207
+ }
3208
+ },
3209
+ "indexes": {},
3210
+ "foreignKeys": {
3211
+ "sub_agent_tool_relations_agent_fk": {
3212
+ "name": "sub_agent_tool_relations_agent_fk",
3213
+ "tableFrom": "sub_agent_tool_relations",
3214
+ "tableTo": "sub_agents",
3215
+ "columnsFrom": [
3216
+ "tenant_id",
3217
+ "project_id",
3218
+ "agent_id",
3219
+ "sub_agent_id"
3220
+ ],
3221
+ "columnsTo": [
3222
+ "tenant_id",
3223
+ "project_id",
3224
+ "agent_id",
3225
+ "id"
3226
+ ],
3227
+ "onDelete": "cascade",
3228
+ "onUpdate": "no action"
3229
+ },
3230
+ "sub_agent_tool_relations_tool_fk": {
3231
+ "name": "sub_agent_tool_relations_tool_fk",
3232
+ "tableFrom": "sub_agent_tool_relations",
3233
+ "tableTo": "tools",
3234
+ "columnsFrom": [
3235
+ "tenant_id",
3236
+ "project_id",
3237
+ "tool_id"
3238
+ ],
3239
+ "columnsTo": [
3240
+ "tenant_id",
3241
+ "project_id",
3242
+ "id"
3243
+ ],
3244
+ "onDelete": "cascade",
3245
+ "onUpdate": "no action"
3246
+ }
3247
+ },
3248
+ "compositePrimaryKeys": {
3249
+ "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk": {
3250
+ "name": "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk",
3251
+ "columns": [
3252
+ "tenant_id",
3253
+ "project_id",
3254
+ "agent_id",
3255
+ "id"
3256
+ ]
3257
+ }
3258
+ },
3259
+ "uniqueConstraints": {},
3260
+ "policies": {},
3261
+ "checkConstraints": {},
3262
+ "isRLSEnabled": false
3263
+ },
3264
+ "public.sub_agents": {
3265
+ "name": "sub_agents",
3266
+ "schema": "",
3267
+ "columns": {
3268
+ "tenant_id": {
3269
+ "name": "tenant_id",
3270
+ "type": "varchar(256)",
3271
+ "primaryKey": false,
3272
+ "notNull": true
3273
+ },
3274
+ "id": {
3275
+ "name": "id",
3276
+ "type": "varchar(256)",
3277
+ "primaryKey": false,
3278
+ "notNull": true
3279
+ },
3280
+ "project_id": {
3281
+ "name": "project_id",
3282
+ "type": "varchar(256)",
3283
+ "primaryKey": false,
3284
+ "notNull": true
3285
+ },
3286
+ "agent_id": {
3287
+ "name": "agent_id",
3288
+ "type": "varchar(256)",
3289
+ "primaryKey": false,
3290
+ "notNull": true
3291
+ },
3292
+ "name": {
3293
+ "name": "name",
3294
+ "type": "varchar(256)",
3295
+ "primaryKey": false,
3296
+ "notNull": true
3297
+ },
3298
+ "description": {
3299
+ "name": "description",
3300
+ "type": "text",
3301
+ "primaryKey": false,
3302
+ "notNull": false
3303
+ },
3304
+ "prompt": {
3305
+ "name": "prompt",
3306
+ "type": "text",
3307
+ "primaryKey": false,
3308
+ "notNull": false
3309
+ },
3310
+ "conversation_history_config": {
3311
+ "name": "conversation_history_config",
3312
+ "type": "jsonb",
3313
+ "primaryKey": false,
3314
+ "notNull": false,
3315
+ "default": "'{\"mode\":\"full\",\"limit\":50,\"maxOutputTokens\":4000,\"includeInternal\":false,\"messageTypes\":[\"chat\",\"tool-result\"]}'::jsonb"
3316
+ },
3317
+ "models": {
3318
+ "name": "models",
3319
+ "type": "jsonb",
3320
+ "primaryKey": false,
3321
+ "notNull": false
3322
+ },
3323
+ "stop_when": {
3324
+ "name": "stop_when",
3325
+ "type": "jsonb",
3326
+ "primaryKey": false,
3327
+ "notNull": false
3328
+ },
3329
+ "created_at": {
3330
+ "name": "created_at",
3331
+ "type": "timestamp",
3332
+ "primaryKey": false,
3333
+ "notNull": true,
3334
+ "default": "now()"
3335
+ },
3336
+ "updated_at": {
3337
+ "name": "updated_at",
3338
+ "type": "timestamp",
3339
+ "primaryKey": false,
3340
+ "notNull": true,
3341
+ "default": "now()"
3342
+ }
3343
+ },
3344
+ "indexes": {},
3345
+ "foreignKeys": {
3346
+ "sub_agents_agents_fk": {
3347
+ "name": "sub_agents_agents_fk",
3348
+ "tableFrom": "sub_agents",
3349
+ "tableTo": "agent",
3350
+ "columnsFrom": [
3351
+ "tenant_id",
3352
+ "project_id",
3353
+ "agent_id"
3354
+ ],
3355
+ "columnsTo": [
3356
+ "tenant_id",
3357
+ "project_id",
3358
+ "id"
3359
+ ],
3360
+ "onDelete": "cascade",
3361
+ "onUpdate": "no action"
3362
+ }
3363
+ },
3364
+ "compositePrimaryKeys": {
3365
+ "sub_agents_tenant_id_project_id_agent_id_id_pk": {
3366
+ "name": "sub_agents_tenant_id_project_id_agent_id_id_pk",
3367
+ "columns": [
3368
+ "tenant_id",
3369
+ "project_id",
3370
+ "agent_id",
3371
+ "id"
3372
+ ]
3373
+ }
3374
+ },
3375
+ "uniqueConstraints": {},
3376
+ "policies": {},
3377
+ "checkConstraints": {},
3378
+ "isRLSEnabled": false
3379
+ },
3380
+ "public.tools": {
3381
+ "name": "tools",
3382
+ "schema": "",
3383
+ "columns": {
3384
+ "tenant_id": {
3385
+ "name": "tenant_id",
3386
+ "type": "varchar(256)",
3387
+ "primaryKey": false,
3388
+ "notNull": true
3389
+ },
3390
+ "id": {
3391
+ "name": "id",
3392
+ "type": "varchar(256)",
3393
+ "primaryKey": false,
3394
+ "notNull": true
3395
+ },
3396
+ "project_id": {
3397
+ "name": "project_id",
3398
+ "type": "varchar(256)",
3399
+ "primaryKey": false,
3400
+ "notNull": true
3401
+ },
3402
+ "name": {
3403
+ "name": "name",
3404
+ "type": "varchar(256)",
3405
+ "primaryKey": false,
3406
+ "notNull": true
3407
+ },
3408
+ "description": {
3409
+ "name": "description",
3410
+ "type": "text",
3411
+ "primaryKey": false,
3412
+ "notNull": false
3413
+ },
3414
+ "config": {
3415
+ "name": "config",
3416
+ "type": "jsonb",
3417
+ "primaryKey": false,
3418
+ "notNull": true
3419
+ },
3420
+ "credential_reference_id": {
3421
+ "name": "credential_reference_id",
3422
+ "type": "varchar(256)",
3423
+ "primaryKey": false,
3424
+ "notNull": false
3425
+ },
3426
+ "credential_scope": {
3427
+ "name": "credential_scope",
3428
+ "type": "varchar(50)",
3429
+ "primaryKey": false,
3430
+ "notNull": true,
3431
+ "default": "'project'"
3432
+ },
3433
+ "headers": {
3434
+ "name": "headers",
3435
+ "type": "jsonb",
3436
+ "primaryKey": false,
3437
+ "notNull": false
3438
+ },
3439
+ "image_url": {
3440
+ "name": "image_url",
3441
+ "type": "text",
3442
+ "primaryKey": false,
3443
+ "notNull": false
3444
+ },
3445
+ "capabilities": {
3446
+ "name": "capabilities",
3447
+ "type": "jsonb",
3448
+ "primaryKey": false,
3449
+ "notNull": false
3450
+ },
3451
+ "last_error": {
3452
+ "name": "last_error",
3453
+ "type": "text",
3454
+ "primaryKey": false,
3455
+ "notNull": false
3456
+ },
3457
+ "is_work_app": {
3458
+ "name": "is_work_app",
3459
+ "type": "boolean",
3460
+ "primaryKey": false,
3461
+ "notNull": true,
3462
+ "default": false
3463
+ },
3464
+ "created_at": {
3465
+ "name": "created_at",
3466
+ "type": "timestamp",
3467
+ "primaryKey": false,
3468
+ "notNull": true,
3469
+ "default": "now()"
3470
+ },
3471
+ "updated_at": {
3472
+ "name": "updated_at",
3473
+ "type": "timestamp",
3474
+ "primaryKey": false,
3475
+ "notNull": true,
3476
+ "default": "now()"
3477
+ }
3478
+ },
3479
+ "indexes": {},
3480
+ "foreignKeys": {
3481
+ "tools_project_fk": {
3482
+ "name": "tools_project_fk",
3483
+ "tableFrom": "tools",
3484
+ "tableTo": "projects",
3485
+ "columnsFrom": [
3486
+ "tenant_id",
3487
+ "project_id"
3488
+ ],
3489
+ "columnsTo": [
3490
+ "tenant_id",
3491
+ "id"
3492
+ ],
3493
+ "onDelete": "cascade",
3494
+ "onUpdate": "no action"
3495
+ },
3496
+ "tools_credential_reference_fk": {
3497
+ "name": "tools_credential_reference_fk",
3498
+ "tableFrom": "tools",
3499
+ "tableTo": "credential_references",
3500
+ "columnsFrom": [
3501
+ "credential_reference_id"
3502
+ ],
3503
+ "columnsTo": [
3504
+ "id"
3505
+ ],
3506
+ "onDelete": "set null",
3507
+ "onUpdate": "no action"
3508
+ }
3509
+ },
3510
+ "compositePrimaryKeys": {
3511
+ "tools_tenant_id_project_id_id_pk": {
3512
+ "name": "tools_tenant_id_project_id_id_pk",
3513
+ "columns": [
3514
+ "tenant_id",
3515
+ "project_id",
3516
+ "id"
3517
+ ]
3518
+ }
3519
+ },
3520
+ "uniqueConstraints": {},
3521
+ "policies": {},
3522
+ "checkConstraints": {},
3523
+ "isRLSEnabled": false
3524
+ },
3525
+ "public.triggers": {
3526
+ "name": "triggers",
3527
+ "schema": "",
3528
+ "columns": {
3529
+ "tenant_id": {
3530
+ "name": "tenant_id",
3531
+ "type": "varchar(256)",
3532
+ "primaryKey": false,
3533
+ "notNull": true
3534
+ },
3535
+ "id": {
3536
+ "name": "id",
3537
+ "type": "varchar(256)",
3538
+ "primaryKey": false,
3539
+ "notNull": true
3540
+ },
3541
+ "project_id": {
3542
+ "name": "project_id",
3543
+ "type": "varchar(256)",
3544
+ "primaryKey": false,
3545
+ "notNull": true
3546
+ },
3547
+ "agent_id": {
3548
+ "name": "agent_id",
3549
+ "type": "varchar(256)",
3550
+ "primaryKey": false,
3551
+ "notNull": true
3552
+ },
3553
+ "name": {
3554
+ "name": "name",
3555
+ "type": "varchar(256)",
3556
+ "primaryKey": false,
3557
+ "notNull": true
3558
+ },
3559
+ "description": {
3560
+ "name": "description",
3561
+ "type": "text",
3562
+ "primaryKey": false,
3563
+ "notNull": false
3564
+ },
3565
+ "enabled": {
3566
+ "name": "enabled",
3567
+ "type": "boolean",
3568
+ "primaryKey": false,
3569
+ "notNull": true,
3570
+ "default": true
3571
+ },
3572
+ "input_schema": {
3573
+ "name": "input_schema",
3574
+ "type": "jsonb",
3575
+ "primaryKey": false,
3576
+ "notNull": false
3577
+ },
3578
+ "output_transform": {
3579
+ "name": "output_transform",
3580
+ "type": "jsonb",
3581
+ "primaryKey": false,
3582
+ "notNull": false
3583
+ },
3584
+ "message_template": {
3585
+ "name": "message_template",
3586
+ "type": "text",
3587
+ "primaryKey": false,
3588
+ "notNull": false
3589
+ },
3590
+ "authentication": {
3591
+ "name": "authentication",
3592
+ "type": "jsonb",
3593
+ "primaryKey": false,
3594
+ "notNull": false
3595
+ },
3596
+ "signing_secret_credential_reference_id": {
3597
+ "name": "signing_secret_credential_reference_id",
3598
+ "type": "varchar(256)",
3599
+ "primaryKey": false,
3600
+ "notNull": false
3601
+ },
3602
+ "signature_verification": {
3603
+ "name": "signature_verification",
3604
+ "type": "jsonb",
3605
+ "primaryKey": false,
3606
+ "notNull": false,
3607
+ "default": "'null'::jsonb"
3608
+ },
3609
+ "run_as_user_id": {
3610
+ "name": "run_as_user_id",
3611
+ "type": "varchar(256)",
3612
+ "primaryKey": false,
3613
+ "notNull": false
3614
+ },
3615
+ "created_by": {
3616
+ "name": "created_by",
3617
+ "type": "varchar(256)",
3618
+ "primaryKey": false,
3619
+ "notNull": false
3620
+ },
3621
+ "created_at": {
3622
+ "name": "created_at",
3623
+ "type": "timestamp",
3624
+ "primaryKey": false,
3625
+ "notNull": true,
3626
+ "default": "now()"
3627
+ },
3628
+ "updated_at": {
3629
+ "name": "updated_at",
3630
+ "type": "timestamp",
3631
+ "primaryKey": false,
3632
+ "notNull": true,
3633
+ "default": "now()"
3634
+ }
3635
+ },
3636
+ "indexes": {},
3637
+ "foreignKeys": {
3638
+ "triggers_agent_fk": {
3639
+ "name": "triggers_agent_fk",
3640
+ "tableFrom": "triggers",
3641
+ "tableTo": "agent",
3642
+ "columnsFrom": [
3643
+ "tenant_id",
3644
+ "project_id",
3645
+ "agent_id"
3646
+ ],
3647
+ "columnsTo": [
3648
+ "tenant_id",
3649
+ "project_id",
3650
+ "id"
3651
+ ],
3652
+ "onDelete": "cascade",
3653
+ "onUpdate": "no action"
3654
+ },
3655
+ "triggers_credential_reference_fk": {
3656
+ "name": "triggers_credential_reference_fk",
3657
+ "tableFrom": "triggers",
3658
+ "tableTo": "credential_references",
3659
+ "columnsFrom": [
3660
+ "signing_secret_credential_reference_id"
3661
+ ],
3662
+ "columnsTo": [
3663
+ "id"
3664
+ ],
3665
+ "onDelete": "set null",
3666
+ "onUpdate": "no action"
3667
+ }
3668
+ },
3669
+ "compositePrimaryKeys": {
3670
+ "triggers_tenant_id_project_id_agent_id_id_pk": {
3671
+ "name": "triggers_tenant_id_project_id_agent_id_id_pk",
3672
+ "columns": [
3673
+ "tenant_id",
3674
+ "project_id",
3675
+ "agent_id",
3676
+ "id"
3677
+ ]
3678
+ }
3679
+ },
3680
+ "uniqueConstraints": {},
3681
+ "policies": {},
3682
+ "checkConstraints": {},
3683
+ "isRLSEnabled": false
3684
+ }
3685
+ },
3686
+ "enums": {},
3687
+ "schemas": {},
3688
+ "sequences": {},
3689
+ "roles": {},
3690
+ "policies": {},
3691
+ "views": {},
3692
+ "_meta": {
3693
+ "columns": {},
3694
+ "schemas": {},
3695
+ "tables": {}
3696
+ }
3697
+ }