@inkeep/agents-core 0.38.3 → 0.39.0

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