@inkeep/agents-core 0.0.0-chat-to-edit-20251119071712

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