@inkeep/agents-core 0.78.3 → 0.78.4

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