@inkeep/agents-core 0.37.1 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/auth/auth-schema.d.ts +47 -1
  2. package/dist/auth/auth-schema.js +1 -1
  3. package/dist/auth/auth-validation-schemas.d.ts +35 -1
  4. package/dist/auth/auth-validation-schemas.js +2 -2
  5. package/dist/auth/auth.d.ts +24 -23
  6. package/dist/auth/auth.js +11 -4
  7. package/dist/auth/permissions.d.ts +9 -9
  8. package/dist/auth/permissions.js +1 -1
  9. package/dist/chunk-3OPS2LN5.js +4 -0
  10. package/dist/{chunk-7CLFCY6J.js → chunk-7IQFIW44.js} +2 -0
  11. package/dist/{chunk-ZEZCCHV7.js → chunk-AJCP2QYU.js} +2 -2
  12. package/dist/{chunk-7GZHUB4J.js → chunk-AUGHKZEB.js} +42 -2
  13. package/dist/{chunk-W3QDM7WH.js → chunk-CWAFZVRI.js} +2 -2
  14. package/dist/{chunk-I6IF7ZTL.js → chunk-DW4DNYUS.js} +2 -2
  15. package/dist/chunk-GENLXHZ4.js +159 -0
  16. package/dist/{chunk-VMSYBWFH.js → chunk-JNBVHWXX.js} +7 -4
  17. package/dist/{chunk-PVRIMF6N.js → chunk-LH6OJIIM.js} +27 -12
  18. package/dist/{chunk-ROXPFQAM.js → chunk-MGHGIB7U.js} +25 -31
  19. package/dist/{chunk-FOK3JSQN.js → chunk-S4XQEAAF.js} +7 -4
  20. package/dist/{chunk-K6GMXJPW.js → chunk-UK63CULA.js} +7 -14
  21. package/dist/{chunk-LL6F3EAR.js → chunk-ZIXAWYZI.js} +1 -1
  22. package/dist/{client-B_3j-V4-.d.ts → client-DG_xZdlN.d.ts} +1 -1
  23. package/dist/client-exports.d.ts +14 -8
  24. package/dist/client-exports.js +10 -4
  25. package/dist/constants/models.d.ts +2 -0
  26. package/dist/constants/models.js +1 -1
  27. package/dist/constants/schema-validation/index.js +1 -1
  28. package/dist/credential-stores/index.d.ts +6 -6
  29. package/dist/credential-stores/index.js +1 -1
  30. package/dist/db/schema.d.ts +3 -4
  31. package/dist/db/schema.js +2 -2
  32. package/dist/db/test-client.d.ts +4 -5
  33. package/dist/db/test-client.js +1 -1
  34. package/dist/index.d.ts +379 -362
  35. package/dist/index.js +186 -125
  36. package/dist/{schema-DKbG39on.d.ts → schema-DA6PfmoP.d.ts} +83 -7
  37. package/dist/{server-BXoUiBMg.d.ts → server-BviIeoo5.d.ts} +1 -1
  38. package/dist/types/index.d.ts +3 -4
  39. package/dist/{utility-Lo5NoRHK.d.ts → utility-dsfXkYTu.d.ts} +1018 -366
  40. package/dist/utils/schema-conversion.d.ts +12 -2
  41. package/dist/utils/schema-conversion.js +1 -1
  42. package/dist/validation/index.d.ts +131 -132
  43. package/dist/validation/index.js +2 -2
  44. package/drizzle/0002_puzzling_goblin_queen.sql +8 -0
  45. package/drizzle/0003_sweet_human_robot.sql +8 -0
  46. package/drizzle/0004_cuddly_shooting_star.sql +6 -0
  47. package/drizzle/0005_reflective_starfox.sql +9 -0
  48. package/drizzle/meta/0003_snapshot.json +3643 -0
  49. package/drizzle/meta/0005_snapshot.json +3693 -0
  50. package/drizzle/meta/_journal.json +28 -0
  51. package/package.json +9 -11
  52. package/dist/chunk-NFTJ5JBY.js +0 -82
@@ -0,0 +1,3693 @@
1
+ {
2
+ "id": "d40dfb52-3de8-4e52-825a-1dbc976e5375",
3
+ "prevId": "8c058f0b-8ea3-47f6-8acc-61fbb7b795e3",
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.external_agents": {
1089
+ "name": "external_agents",
1090
+ "schema": "",
1091
+ "columns": {
1092
+ "tenant_id": {
1093
+ "name": "tenant_id",
1094
+ "type": "varchar(256)",
1095
+ "primaryKey": false,
1096
+ "notNull": true
1097
+ },
1098
+ "id": {
1099
+ "name": "id",
1100
+ "type": "varchar(256)",
1101
+ "primaryKey": false,
1102
+ "notNull": true
1103
+ },
1104
+ "project_id": {
1105
+ "name": "project_id",
1106
+ "type": "varchar(256)",
1107
+ "primaryKey": false,
1108
+ "notNull": true
1109
+ },
1110
+ "name": {
1111
+ "name": "name",
1112
+ "type": "varchar(256)",
1113
+ "primaryKey": false,
1114
+ "notNull": true
1115
+ },
1116
+ "description": {
1117
+ "name": "description",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": false
1121
+ },
1122
+ "base_url": {
1123
+ "name": "base_url",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": true
1127
+ },
1128
+ "credential_reference_id": {
1129
+ "name": "credential_reference_id",
1130
+ "type": "varchar(256)",
1131
+ "primaryKey": false,
1132
+ "notNull": false
1133
+ },
1134
+ "created_at": {
1135
+ "name": "created_at",
1136
+ "type": "timestamp",
1137
+ "primaryKey": false,
1138
+ "notNull": true,
1139
+ "default": "now()"
1140
+ },
1141
+ "updated_at": {
1142
+ "name": "updated_at",
1143
+ "type": "timestamp",
1144
+ "primaryKey": false,
1145
+ "notNull": true,
1146
+ "default": "now()"
1147
+ }
1148
+ },
1149
+ "indexes": {},
1150
+ "foreignKeys": {
1151
+ "external_agents_project_fk": {
1152
+ "name": "external_agents_project_fk",
1153
+ "tableFrom": "external_agents",
1154
+ "tableTo": "projects",
1155
+ "columnsFrom": [
1156
+ "tenant_id",
1157
+ "project_id"
1158
+ ],
1159
+ "columnsTo": [
1160
+ "tenant_id",
1161
+ "id"
1162
+ ],
1163
+ "onDelete": "cascade",
1164
+ "onUpdate": "no action"
1165
+ },
1166
+ "external_agents_credential_reference_fk": {
1167
+ "name": "external_agents_credential_reference_fk",
1168
+ "tableFrom": "external_agents",
1169
+ "tableTo": "credential_references",
1170
+ "columnsFrom": [
1171
+ "credential_reference_id"
1172
+ ],
1173
+ "columnsTo": [
1174
+ "id"
1175
+ ],
1176
+ "onDelete": "set null",
1177
+ "onUpdate": "no action"
1178
+ }
1179
+ },
1180
+ "compositePrimaryKeys": {
1181
+ "external_agents_tenant_id_project_id_id_pk": {
1182
+ "name": "external_agents_tenant_id_project_id_id_pk",
1183
+ "columns": [
1184
+ "tenant_id",
1185
+ "project_id",
1186
+ "id"
1187
+ ]
1188
+ }
1189
+ },
1190
+ "uniqueConstraints": {},
1191
+ "policies": {},
1192
+ "checkConstraints": {},
1193
+ "isRLSEnabled": false
1194
+ },
1195
+ "public.function_tools": {
1196
+ "name": "function_tools",
1197
+ "schema": "",
1198
+ "columns": {
1199
+ "tenant_id": {
1200
+ "name": "tenant_id",
1201
+ "type": "varchar(256)",
1202
+ "primaryKey": false,
1203
+ "notNull": true
1204
+ },
1205
+ "id": {
1206
+ "name": "id",
1207
+ "type": "varchar(256)",
1208
+ "primaryKey": false,
1209
+ "notNull": true
1210
+ },
1211
+ "project_id": {
1212
+ "name": "project_id",
1213
+ "type": "varchar(256)",
1214
+ "primaryKey": false,
1215
+ "notNull": true
1216
+ },
1217
+ "agent_id": {
1218
+ "name": "agent_id",
1219
+ "type": "varchar(256)",
1220
+ "primaryKey": false,
1221
+ "notNull": true
1222
+ },
1223
+ "name": {
1224
+ "name": "name",
1225
+ "type": "varchar(256)",
1226
+ "primaryKey": false,
1227
+ "notNull": true
1228
+ },
1229
+ "description": {
1230
+ "name": "description",
1231
+ "type": "text",
1232
+ "primaryKey": false,
1233
+ "notNull": false
1234
+ },
1235
+ "function_id": {
1236
+ "name": "function_id",
1237
+ "type": "varchar(256)",
1238
+ "primaryKey": false,
1239
+ "notNull": true
1240
+ },
1241
+ "created_at": {
1242
+ "name": "created_at",
1243
+ "type": "timestamp",
1244
+ "primaryKey": false,
1245
+ "notNull": true,
1246
+ "default": "now()"
1247
+ },
1248
+ "updated_at": {
1249
+ "name": "updated_at",
1250
+ "type": "timestamp",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "default": "now()"
1254
+ }
1255
+ },
1256
+ "indexes": {},
1257
+ "foreignKeys": {
1258
+ "function_tools_agent_fk": {
1259
+ "name": "function_tools_agent_fk",
1260
+ "tableFrom": "function_tools",
1261
+ "tableTo": "agent",
1262
+ "columnsFrom": [
1263
+ "tenant_id",
1264
+ "project_id",
1265
+ "agent_id"
1266
+ ],
1267
+ "columnsTo": [
1268
+ "tenant_id",
1269
+ "project_id",
1270
+ "id"
1271
+ ],
1272
+ "onDelete": "cascade",
1273
+ "onUpdate": "no action"
1274
+ },
1275
+ "function_tools_function_fk": {
1276
+ "name": "function_tools_function_fk",
1277
+ "tableFrom": "function_tools",
1278
+ "tableTo": "functions",
1279
+ "columnsFrom": [
1280
+ "tenant_id",
1281
+ "project_id",
1282
+ "function_id"
1283
+ ],
1284
+ "columnsTo": [
1285
+ "tenant_id",
1286
+ "project_id",
1287
+ "id"
1288
+ ],
1289
+ "onDelete": "cascade",
1290
+ "onUpdate": "no action"
1291
+ }
1292
+ },
1293
+ "compositePrimaryKeys": {
1294
+ "function_tools_tenant_id_project_id_agent_id_id_pk": {
1295
+ "name": "function_tools_tenant_id_project_id_agent_id_id_pk",
1296
+ "columns": [
1297
+ "tenant_id",
1298
+ "project_id",
1299
+ "agent_id",
1300
+ "id"
1301
+ ]
1302
+ }
1303
+ },
1304
+ "uniqueConstraints": {},
1305
+ "policies": {},
1306
+ "checkConstraints": {},
1307
+ "isRLSEnabled": false
1308
+ },
1309
+ "public.functions": {
1310
+ "name": "functions",
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
+ "input_schema": {
1332
+ "name": "input_schema",
1333
+ "type": "jsonb",
1334
+ "primaryKey": false,
1335
+ "notNull": false
1336
+ },
1337
+ "execute_code": {
1338
+ "name": "execute_code",
1339
+ "type": "text",
1340
+ "primaryKey": false,
1341
+ "notNull": true
1342
+ },
1343
+ "dependencies": {
1344
+ "name": "dependencies",
1345
+ "type": "jsonb",
1346
+ "primaryKey": false,
1347
+ "notNull": false
1348
+ },
1349
+ "created_at": {
1350
+ "name": "created_at",
1351
+ "type": "timestamp",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "default": "now()"
1355
+ },
1356
+ "updated_at": {
1357
+ "name": "updated_at",
1358
+ "type": "timestamp",
1359
+ "primaryKey": false,
1360
+ "notNull": true,
1361
+ "default": "now()"
1362
+ }
1363
+ },
1364
+ "indexes": {},
1365
+ "foreignKeys": {
1366
+ "functions_project_fk": {
1367
+ "name": "functions_project_fk",
1368
+ "tableFrom": "functions",
1369
+ "tableTo": "projects",
1370
+ "columnsFrom": [
1371
+ "tenant_id",
1372
+ "project_id"
1373
+ ],
1374
+ "columnsTo": [
1375
+ "tenant_id",
1376
+ "id"
1377
+ ],
1378
+ "onDelete": "cascade",
1379
+ "onUpdate": "no action"
1380
+ }
1381
+ },
1382
+ "compositePrimaryKeys": {
1383
+ "functions_tenant_id_project_id_id_pk": {
1384
+ "name": "functions_tenant_id_project_id_id_pk",
1385
+ "columns": [
1386
+ "tenant_id",
1387
+ "project_id",
1388
+ "id"
1389
+ ]
1390
+ }
1391
+ },
1392
+ "uniqueConstraints": {},
1393
+ "policies": {},
1394
+ "checkConstraints": {},
1395
+ "isRLSEnabled": false
1396
+ },
1397
+ "public.invitation": {
1398
+ "name": "invitation",
1399
+ "schema": "",
1400
+ "columns": {
1401
+ "id": {
1402
+ "name": "id",
1403
+ "type": "text",
1404
+ "primaryKey": true,
1405
+ "notNull": true
1406
+ },
1407
+ "organization_id": {
1408
+ "name": "organization_id",
1409
+ "type": "text",
1410
+ "primaryKey": false,
1411
+ "notNull": true
1412
+ },
1413
+ "email": {
1414
+ "name": "email",
1415
+ "type": "text",
1416
+ "primaryKey": false,
1417
+ "notNull": true
1418
+ },
1419
+ "role": {
1420
+ "name": "role",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": false
1424
+ },
1425
+ "status": {
1426
+ "name": "status",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true,
1430
+ "default": "'pending'"
1431
+ },
1432
+ "expires_at": {
1433
+ "name": "expires_at",
1434
+ "type": "timestamp",
1435
+ "primaryKey": false,
1436
+ "notNull": true
1437
+ },
1438
+ "created_at": {
1439
+ "name": "created_at",
1440
+ "type": "timestamp",
1441
+ "primaryKey": false,
1442
+ "notNull": true,
1443
+ "default": "now()"
1444
+ },
1445
+ "inviter_id": {
1446
+ "name": "inviter_id",
1447
+ "type": "text",
1448
+ "primaryKey": false,
1449
+ "notNull": true
1450
+ }
1451
+ },
1452
+ "indexes": {
1453
+ "invitation_organizationId_idx": {
1454
+ "name": "invitation_organizationId_idx",
1455
+ "columns": [
1456
+ {
1457
+ "expression": "organization_id",
1458
+ "isExpression": false,
1459
+ "asc": true,
1460
+ "nulls": "last"
1461
+ }
1462
+ ],
1463
+ "isUnique": false,
1464
+ "concurrently": false,
1465
+ "method": "btree",
1466
+ "with": {}
1467
+ },
1468
+ "invitation_email_idx": {
1469
+ "name": "invitation_email_idx",
1470
+ "columns": [
1471
+ {
1472
+ "expression": "email",
1473
+ "isExpression": false,
1474
+ "asc": true,
1475
+ "nulls": "last"
1476
+ }
1477
+ ],
1478
+ "isUnique": false,
1479
+ "concurrently": false,
1480
+ "method": "btree",
1481
+ "with": {}
1482
+ }
1483
+ },
1484
+ "foreignKeys": {
1485
+ "invitation_organization_id_organization_id_fk": {
1486
+ "name": "invitation_organization_id_organization_id_fk",
1487
+ "tableFrom": "invitation",
1488
+ "tableTo": "organization",
1489
+ "columnsFrom": [
1490
+ "organization_id"
1491
+ ],
1492
+ "columnsTo": [
1493
+ "id"
1494
+ ],
1495
+ "onDelete": "cascade",
1496
+ "onUpdate": "no action"
1497
+ },
1498
+ "invitation_inviter_id_user_id_fk": {
1499
+ "name": "invitation_inviter_id_user_id_fk",
1500
+ "tableFrom": "invitation",
1501
+ "tableTo": "user",
1502
+ "columnsFrom": [
1503
+ "inviter_id"
1504
+ ],
1505
+ "columnsTo": [
1506
+ "id"
1507
+ ],
1508
+ "onDelete": "cascade",
1509
+ "onUpdate": "no action"
1510
+ }
1511
+ },
1512
+ "compositePrimaryKeys": {},
1513
+ "uniqueConstraints": {},
1514
+ "policies": {},
1515
+ "checkConstraints": {},
1516
+ "isRLSEnabled": false
1517
+ },
1518
+ "public.ledger_artifacts": {
1519
+ "name": "ledger_artifacts",
1520
+ "schema": "",
1521
+ "columns": {
1522
+ "tenant_id": {
1523
+ "name": "tenant_id",
1524
+ "type": "varchar(256)",
1525
+ "primaryKey": false,
1526
+ "notNull": true
1527
+ },
1528
+ "id": {
1529
+ "name": "id",
1530
+ "type": "varchar(256)",
1531
+ "primaryKey": false,
1532
+ "notNull": true
1533
+ },
1534
+ "project_id": {
1535
+ "name": "project_id",
1536
+ "type": "varchar(256)",
1537
+ "primaryKey": false,
1538
+ "notNull": true
1539
+ },
1540
+ "task_id": {
1541
+ "name": "task_id",
1542
+ "type": "varchar(256)",
1543
+ "primaryKey": false,
1544
+ "notNull": true
1545
+ },
1546
+ "tool_call_id": {
1547
+ "name": "tool_call_id",
1548
+ "type": "varchar(256)",
1549
+ "primaryKey": false,
1550
+ "notNull": false
1551
+ },
1552
+ "context_id": {
1553
+ "name": "context_id",
1554
+ "type": "varchar(256)",
1555
+ "primaryKey": false,
1556
+ "notNull": true
1557
+ },
1558
+ "type": {
1559
+ "name": "type",
1560
+ "type": "varchar(256)",
1561
+ "primaryKey": false,
1562
+ "notNull": true,
1563
+ "default": "'source'"
1564
+ },
1565
+ "name": {
1566
+ "name": "name",
1567
+ "type": "varchar(256)",
1568
+ "primaryKey": false,
1569
+ "notNull": false
1570
+ },
1571
+ "description": {
1572
+ "name": "description",
1573
+ "type": "text",
1574
+ "primaryKey": false,
1575
+ "notNull": false
1576
+ },
1577
+ "parts": {
1578
+ "name": "parts",
1579
+ "type": "jsonb",
1580
+ "primaryKey": false,
1581
+ "notNull": false
1582
+ },
1583
+ "metadata": {
1584
+ "name": "metadata",
1585
+ "type": "jsonb",
1586
+ "primaryKey": false,
1587
+ "notNull": false
1588
+ },
1589
+ "summary": {
1590
+ "name": "summary",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": false
1594
+ },
1595
+ "mime": {
1596
+ "name": "mime",
1597
+ "type": "jsonb",
1598
+ "primaryKey": false,
1599
+ "notNull": false
1600
+ },
1601
+ "visibility": {
1602
+ "name": "visibility",
1603
+ "type": "varchar(256)",
1604
+ "primaryKey": false,
1605
+ "notNull": false,
1606
+ "default": "'context'"
1607
+ },
1608
+ "allowed_agents": {
1609
+ "name": "allowed_agents",
1610
+ "type": "jsonb",
1611
+ "primaryKey": false,
1612
+ "notNull": false
1613
+ },
1614
+ "derived_from": {
1615
+ "name": "derived_from",
1616
+ "type": "varchar(256)",
1617
+ "primaryKey": false,
1618
+ "notNull": false
1619
+ },
1620
+ "created_at": {
1621
+ "name": "created_at",
1622
+ "type": "timestamp",
1623
+ "primaryKey": false,
1624
+ "notNull": true,
1625
+ "default": "now()"
1626
+ },
1627
+ "updated_at": {
1628
+ "name": "updated_at",
1629
+ "type": "timestamp",
1630
+ "primaryKey": false,
1631
+ "notNull": true,
1632
+ "default": "now()"
1633
+ }
1634
+ },
1635
+ "indexes": {
1636
+ "ledger_artifacts_task_id_idx": {
1637
+ "name": "ledger_artifacts_task_id_idx",
1638
+ "columns": [
1639
+ {
1640
+ "expression": "task_id",
1641
+ "isExpression": false,
1642
+ "asc": true,
1643
+ "nulls": "last"
1644
+ }
1645
+ ],
1646
+ "isUnique": false,
1647
+ "concurrently": false,
1648
+ "method": "btree",
1649
+ "with": {}
1650
+ },
1651
+ "ledger_artifacts_tool_call_id_idx": {
1652
+ "name": "ledger_artifacts_tool_call_id_idx",
1653
+ "columns": [
1654
+ {
1655
+ "expression": "tool_call_id",
1656
+ "isExpression": false,
1657
+ "asc": true,
1658
+ "nulls": "last"
1659
+ }
1660
+ ],
1661
+ "isUnique": false,
1662
+ "concurrently": false,
1663
+ "method": "btree",
1664
+ "with": {}
1665
+ },
1666
+ "ledger_artifacts_context_id_idx": {
1667
+ "name": "ledger_artifacts_context_id_idx",
1668
+ "columns": [
1669
+ {
1670
+ "expression": "context_id",
1671
+ "isExpression": false,
1672
+ "asc": true,
1673
+ "nulls": "last"
1674
+ }
1675
+ ],
1676
+ "isUnique": false,
1677
+ "concurrently": false,
1678
+ "method": "btree",
1679
+ "with": {}
1680
+ }
1681
+ },
1682
+ "foreignKeys": {
1683
+ "ledger_artifacts_project_fk": {
1684
+ "name": "ledger_artifacts_project_fk",
1685
+ "tableFrom": "ledger_artifacts",
1686
+ "tableTo": "projects",
1687
+ "columnsFrom": [
1688
+ "tenant_id",
1689
+ "project_id"
1690
+ ],
1691
+ "columnsTo": [
1692
+ "tenant_id",
1693
+ "id"
1694
+ ],
1695
+ "onDelete": "cascade",
1696
+ "onUpdate": "no action"
1697
+ }
1698
+ },
1699
+ "compositePrimaryKeys": {
1700
+ "ledger_artifacts_tenant_id_project_id_id_task_id_pk": {
1701
+ "name": "ledger_artifacts_tenant_id_project_id_id_task_id_pk",
1702
+ "columns": [
1703
+ "tenant_id",
1704
+ "project_id",
1705
+ "id",
1706
+ "task_id"
1707
+ ]
1708
+ }
1709
+ },
1710
+ "uniqueConstraints": {
1711
+ "ledger_artifacts_task_context_name_unique": {
1712
+ "name": "ledger_artifacts_task_context_name_unique",
1713
+ "nullsNotDistinct": false,
1714
+ "columns": [
1715
+ "task_id",
1716
+ "context_id",
1717
+ "name"
1718
+ ]
1719
+ }
1720
+ },
1721
+ "policies": {},
1722
+ "checkConstraints": {},
1723
+ "isRLSEnabled": false
1724
+ },
1725
+ "public.member": {
1726
+ "name": "member",
1727
+ "schema": "",
1728
+ "columns": {
1729
+ "id": {
1730
+ "name": "id",
1731
+ "type": "text",
1732
+ "primaryKey": true,
1733
+ "notNull": true
1734
+ },
1735
+ "organization_id": {
1736
+ "name": "organization_id",
1737
+ "type": "text",
1738
+ "primaryKey": false,
1739
+ "notNull": true
1740
+ },
1741
+ "user_id": {
1742
+ "name": "user_id",
1743
+ "type": "text",
1744
+ "primaryKey": false,
1745
+ "notNull": true
1746
+ },
1747
+ "role": {
1748
+ "name": "role",
1749
+ "type": "text",
1750
+ "primaryKey": false,
1751
+ "notNull": true,
1752
+ "default": "'member'"
1753
+ },
1754
+ "created_at": {
1755
+ "name": "created_at",
1756
+ "type": "timestamp",
1757
+ "primaryKey": false,
1758
+ "notNull": true
1759
+ }
1760
+ },
1761
+ "indexes": {
1762
+ "member_organizationId_idx": {
1763
+ "name": "member_organizationId_idx",
1764
+ "columns": [
1765
+ {
1766
+ "expression": "organization_id",
1767
+ "isExpression": false,
1768
+ "asc": true,
1769
+ "nulls": "last"
1770
+ }
1771
+ ],
1772
+ "isUnique": false,
1773
+ "concurrently": false,
1774
+ "method": "btree",
1775
+ "with": {}
1776
+ },
1777
+ "member_userId_idx": {
1778
+ "name": "member_userId_idx",
1779
+ "columns": [
1780
+ {
1781
+ "expression": "user_id",
1782
+ "isExpression": false,
1783
+ "asc": true,
1784
+ "nulls": "last"
1785
+ }
1786
+ ],
1787
+ "isUnique": false,
1788
+ "concurrently": false,
1789
+ "method": "btree",
1790
+ "with": {}
1791
+ }
1792
+ },
1793
+ "foreignKeys": {
1794
+ "member_organization_id_organization_id_fk": {
1795
+ "name": "member_organization_id_organization_id_fk",
1796
+ "tableFrom": "member",
1797
+ "tableTo": "organization",
1798
+ "columnsFrom": [
1799
+ "organization_id"
1800
+ ],
1801
+ "columnsTo": [
1802
+ "id"
1803
+ ],
1804
+ "onDelete": "cascade",
1805
+ "onUpdate": "no action"
1806
+ },
1807
+ "member_user_id_user_id_fk": {
1808
+ "name": "member_user_id_user_id_fk",
1809
+ "tableFrom": "member",
1810
+ "tableTo": "user",
1811
+ "columnsFrom": [
1812
+ "user_id"
1813
+ ],
1814
+ "columnsTo": [
1815
+ "id"
1816
+ ],
1817
+ "onDelete": "cascade",
1818
+ "onUpdate": "no action"
1819
+ }
1820
+ },
1821
+ "compositePrimaryKeys": {},
1822
+ "uniqueConstraints": {},
1823
+ "policies": {},
1824
+ "checkConstraints": {},
1825
+ "isRLSEnabled": false
1826
+ },
1827
+ "public.messages": {
1828
+ "name": "messages",
1829
+ "schema": "",
1830
+ "columns": {
1831
+ "tenant_id": {
1832
+ "name": "tenant_id",
1833
+ "type": "varchar(256)",
1834
+ "primaryKey": false,
1835
+ "notNull": true
1836
+ },
1837
+ "id": {
1838
+ "name": "id",
1839
+ "type": "varchar(256)",
1840
+ "primaryKey": false,
1841
+ "notNull": true
1842
+ },
1843
+ "project_id": {
1844
+ "name": "project_id",
1845
+ "type": "varchar(256)",
1846
+ "primaryKey": false,
1847
+ "notNull": true
1848
+ },
1849
+ "conversation_id": {
1850
+ "name": "conversation_id",
1851
+ "type": "varchar(256)",
1852
+ "primaryKey": false,
1853
+ "notNull": true
1854
+ },
1855
+ "role": {
1856
+ "name": "role",
1857
+ "type": "varchar(256)",
1858
+ "primaryKey": false,
1859
+ "notNull": true
1860
+ },
1861
+ "from_sub_agent_id": {
1862
+ "name": "from_sub_agent_id",
1863
+ "type": "varchar(256)",
1864
+ "primaryKey": false,
1865
+ "notNull": false
1866
+ },
1867
+ "to_sub_agent_id": {
1868
+ "name": "to_sub_agent_id",
1869
+ "type": "varchar(256)",
1870
+ "primaryKey": false,
1871
+ "notNull": false
1872
+ },
1873
+ "from_external_sub_agent_id": {
1874
+ "name": "from_external_sub_agent_id",
1875
+ "type": "varchar(256)",
1876
+ "primaryKey": false,
1877
+ "notNull": false
1878
+ },
1879
+ "to_external_sub_agent_id": {
1880
+ "name": "to_external_sub_agent_id",
1881
+ "type": "varchar(256)",
1882
+ "primaryKey": false,
1883
+ "notNull": false
1884
+ },
1885
+ "from_team_agent_id": {
1886
+ "name": "from_team_agent_id",
1887
+ "type": "varchar(256)",
1888
+ "primaryKey": false,
1889
+ "notNull": false
1890
+ },
1891
+ "to_team_agent_id": {
1892
+ "name": "to_team_agent_id",
1893
+ "type": "varchar(256)",
1894
+ "primaryKey": false,
1895
+ "notNull": false
1896
+ },
1897
+ "content": {
1898
+ "name": "content",
1899
+ "type": "jsonb",
1900
+ "primaryKey": false,
1901
+ "notNull": true
1902
+ },
1903
+ "visibility": {
1904
+ "name": "visibility",
1905
+ "type": "varchar(256)",
1906
+ "primaryKey": false,
1907
+ "notNull": true,
1908
+ "default": "'user-facing'"
1909
+ },
1910
+ "message_type": {
1911
+ "name": "message_type",
1912
+ "type": "varchar(256)",
1913
+ "primaryKey": false,
1914
+ "notNull": true,
1915
+ "default": "'chat'"
1916
+ },
1917
+ "task_id": {
1918
+ "name": "task_id",
1919
+ "type": "varchar(256)",
1920
+ "primaryKey": false,
1921
+ "notNull": false
1922
+ },
1923
+ "parent_message_id": {
1924
+ "name": "parent_message_id",
1925
+ "type": "varchar(256)",
1926
+ "primaryKey": false,
1927
+ "notNull": false
1928
+ },
1929
+ "a2a_task_id": {
1930
+ "name": "a2a_task_id",
1931
+ "type": "varchar(256)",
1932
+ "primaryKey": false,
1933
+ "notNull": false
1934
+ },
1935
+ "a2a_session_id": {
1936
+ "name": "a2a_session_id",
1937
+ "type": "varchar(256)",
1938
+ "primaryKey": false,
1939
+ "notNull": false
1940
+ },
1941
+ "metadata": {
1942
+ "name": "metadata",
1943
+ "type": "jsonb",
1944
+ "primaryKey": false,
1945
+ "notNull": false
1946
+ },
1947
+ "created_at": {
1948
+ "name": "created_at",
1949
+ "type": "timestamp",
1950
+ "primaryKey": false,
1951
+ "notNull": true,
1952
+ "default": "now()"
1953
+ },
1954
+ "updated_at": {
1955
+ "name": "updated_at",
1956
+ "type": "timestamp",
1957
+ "primaryKey": false,
1958
+ "notNull": true,
1959
+ "default": "now()"
1960
+ }
1961
+ },
1962
+ "indexes": {},
1963
+ "foreignKeys": {
1964
+ "messages_project_fk": {
1965
+ "name": "messages_project_fk",
1966
+ "tableFrom": "messages",
1967
+ "tableTo": "projects",
1968
+ "columnsFrom": [
1969
+ "tenant_id",
1970
+ "project_id"
1971
+ ],
1972
+ "columnsTo": [
1973
+ "tenant_id",
1974
+ "id"
1975
+ ],
1976
+ "onDelete": "cascade",
1977
+ "onUpdate": "no action"
1978
+ }
1979
+ },
1980
+ "compositePrimaryKeys": {
1981
+ "messages_tenant_id_project_id_id_pk": {
1982
+ "name": "messages_tenant_id_project_id_id_pk",
1983
+ "columns": [
1984
+ "tenant_id",
1985
+ "project_id",
1986
+ "id"
1987
+ ]
1988
+ }
1989
+ },
1990
+ "uniqueConstraints": {},
1991
+ "policies": {},
1992
+ "checkConstraints": {},
1993
+ "isRLSEnabled": false
1994
+ },
1995
+ "public.organization": {
1996
+ "name": "organization",
1997
+ "schema": "",
1998
+ "columns": {
1999
+ "id": {
2000
+ "name": "id",
2001
+ "type": "text",
2002
+ "primaryKey": true,
2003
+ "notNull": true
2004
+ },
2005
+ "name": {
2006
+ "name": "name",
2007
+ "type": "text",
2008
+ "primaryKey": false,
2009
+ "notNull": true
2010
+ },
2011
+ "slug": {
2012
+ "name": "slug",
2013
+ "type": "text",
2014
+ "primaryKey": false,
2015
+ "notNull": true
2016
+ },
2017
+ "logo": {
2018
+ "name": "logo",
2019
+ "type": "text",
2020
+ "primaryKey": false,
2021
+ "notNull": false
2022
+ },
2023
+ "created_at": {
2024
+ "name": "created_at",
2025
+ "type": "timestamp",
2026
+ "primaryKey": false,
2027
+ "notNull": true
2028
+ },
2029
+ "metadata": {
2030
+ "name": "metadata",
2031
+ "type": "text",
2032
+ "primaryKey": false,
2033
+ "notNull": false
2034
+ }
2035
+ },
2036
+ "indexes": {},
2037
+ "foreignKeys": {},
2038
+ "compositePrimaryKeys": {},
2039
+ "uniqueConstraints": {
2040
+ "organization_slug_unique": {
2041
+ "name": "organization_slug_unique",
2042
+ "nullsNotDistinct": false,
2043
+ "columns": [
2044
+ "slug"
2045
+ ]
2046
+ }
2047
+ },
2048
+ "policies": {},
2049
+ "checkConstraints": {},
2050
+ "isRLSEnabled": false
2051
+ },
2052
+ "public.projects": {
2053
+ "name": "projects",
2054
+ "schema": "",
2055
+ "columns": {
2056
+ "tenant_id": {
2057
+ "name": "tenant_id",
2058
+ "type": "varchar(256)",
2059
+ "primaryKey": false,
2060
+ "notNull": true
2061
+ },
2062
+ "id": {
2063
+ "name": "id",
2064
+ "type": "varchar(256)",
2065
+ "primaryKey": false,
2066
+ "notNull": true
2067
+ },
2068
+ "name": {
2069
+ "name": "name",
2070
+ "type": "varchar(256)",
2071
+ "primaryKey": false,
2072
+ "notNull": true
2073
+ },
2074
+ "description": {
2075
+ "name": "description",
2076
+ "type": "text",
2077
+ "primaryKey": false,
2078
+ "notNull": false
2079
+ },
2080
+ "models": {
2081
+ "name": "models",
2082
+ "type": "jsonb",
2083
+ "primaryKey": false,
2084
+ "notNull": false
2085
+ },
2086
+ "stop_when": {
2087
+ "name": "stop_when",
2088
+ "type": "jsonb",
2089
+ "primaryKey": false,
2090
+ "notNull": false
2091
+ },
2092
+ "created_at": {
2093
+ "name": "created_at",
2094
+ "type": "timestamp",
2095
+ "primaryKey": false,
2096
+ "notNull": true,
2097
+ "default": "now()"
2098
+ },
2099
+ "updated_at": {
2100
+ "name": "updated_at",
2101
+ "type": "timestamp",
2102
+ "primaryKey": false,
2103
+ "notNull": true,
2104
+ "default": "now()"
2105
+ }
2106
+ },
2107
+ "indexes": {},
2108
+ "foreignKeys": {
2109
+ "projects_tenant_id_fk": {
2110
+ "name": "projects_tenant_id_fk",
2111
+ "tableFrom": "projects",
2112
+ "tableTo": "organization",
2113
+ "columnsFrom": [
2114
+ "tenant_id"
2115
+ ],
2116
+ "columnsTo": [
2117
+ "id"
2118
+ ],
2119
+ "onDelete": "cascade",
2120
+ "onUpdate": "no action"
2121
+ }
2122
+ },
2123
+ "compositePrimaryKeys": {
2124
+ "projects_tenant_id_id_pk": {
2125
+ "name": "projects_tenant_id_id_pk",
2126
+ "columns": [
2127
+ "tenant_id",
2128
+ "id"
2129
+ ]
2130
+ }
2131
+ },
2132
+ "uniqueConstraints": {},
2133
+ "policies": {},
2134
+ "checkConstraints": {},
2135
+ "isRLSEnabled": false
2136
+ },
2137
+ "public.session": {
2138
+ "name": "session",
2139
+ "schema": "",
2140
+ "columns": {
2141
+ "id": {
2142
+ "name": "id",
2143
+ "type": "text",
2144
+ "primaryKey": true,
2145
+ "notNull": true
2146
+ },
2147
+ "expires_at": {
2148
+ "name": "expires_at",
2149
+ "type": "timestamp",
2150
+ "primaryKey": false,
2151
+ "notNull": true
2152
+ },
2153
+ "token": {
2154
+ "name": "token",
2155
+ "type": "text",
2156
+ "primaryKey": false,
2157
+ "notNull": true
2158
+ },
2159
+ "created_at": {
2160
+ "name": "created_at",
2161
+ "type": "timestamp",
2162
+ "primaryKey": false,
2163
+ "notNull": true,
2164
+ "default": "now()"
2165
+ },
2166
+ "updated_at": {
2167
+ "name": "updated_at",
2168
+ "type": "timestamp",
2169
+ "primaryKey": false,
2170
+ "notNull": true
2171
+ },
2172
+ "ip_address": {
2173
+ "name": "ip_address",
2174
+ "type": "text",
2175
+ "primaryKey": false,
2176
+ "notNull": false
2177
+ },
2178
+ "user_agent": {
2179
+ "name": "user_agent",
2180
+ "type": "text",
2181
+ "primaryKey": false,
2182
+ "notNull": false
2183
+ },
2184
+ "user_id": {
2185
+ "name": "user_id",
2186
+ "type": "text",
2187
+ "primaryKey": false,
2188
+ "notNull": true
2189
+ },
2190
+ "active_organization_id": {
2191
+ "name": "active_organization_id",
2192
+ "type": "text",
2193
+ "primaryKey": false,
2194
+ "notNull": false
2195
+ }
2196
+ },
2197
+ "indexes": {
2198
+ "session_userId_idx": {
2199
+ "name": "session_userId_idx",
2200
+ "columns": [
2201
+ {
2202
+ "expression": "user_id",
2203
+ "isExpression": false,
2204
+ "asc": true,
2205
+ "nulls": "last"
2206
+ }
2207
+ ],
2208
+ "isUnique": false,
2209
+ "concurrently": false,
2210
+ "method": "btree",
2211
+ "with": {}
2212
+ }
2213
+ },
2214
+ "foreignKeys": {
2215
+ "session_user_id_user_id_fk": {
2216
+ "name": "session_user_id_user_id_fk",
2217
+ "tableFrom": "session",
2218
+ "tableTo": "user",
2219
+ "columnsFrom": [
2220
+ "user_id"
2221
+ ],
2222
+ "columnsTo": [
2223
+ "id"
2224
+ ],
2225
+ "onDelete": "cascade",
2226
+ "onUpdate": "no action"
2227
+ }
2228
+ },
2229
+ "compositePrimaryKeys": {},
2230
+ "uniqueConstraints": {
2231
+ "session_token_unique": {
2232
+ "name": "session_token_unique",
2233
+ "nullsNotDistinct": false,
2234
+ "columns": [
2235
+ "token"
2236
+ ]
2237
+ }
2238
+ },
2239
+ "policies": {},
2240
+ "checkConstraints": {},
2241
+ "isRLSEnabled": false
2242
+ },
2243
+ "public.sso_provider": {
2244
+ "name": "sso_provider",
2245
+ "schema": "",
2246
+ "columns": {
2247
+ "id": {
2248
+ "name": "id",
2249
+ "type": "text",
2250
+ "primaryKey": true,
2251
+ "notNull": true
2252
+ },
2253
+ "issuer": {
2254
+ "name": "issuer",
2255
+ "type": "text",
2256
+ "primaryKey": false,
2257
+ "notNull": true
2258
+ },
2259
+ "oidc_config": {
2260
+ "name": "oidc_config",
2261
+ "type": "text",
2262
+ "primaryKey": false,
2263
+ "notNull": false
2264
+ },
2265
+ "saml_config": {
2266
+ "name": "saml_config",
2267
+ "type": "text",
2268
+ "primaryKey": false,
2269
+ "notNull": false
2270
+ },
2271
+ "user_id": {
2272
+ "name": "user_id",
2273
+ "type": "text",
2274
+ "primaryKey": false,
2275
+ "notNull": false
2276
+ },
2277
+ "provider_id": {
2278
+ "name": "provider_id",
2279
+ "type": "text",
2280
+ "primaryKey": false,
2281
+ "notNull": true
2282
+ },
2283
+ "organization_id": {
2284
+ "name": "organization_id",
2285
+ "type": "text",
2286
+ "primaryKey": false,
2287
+ "notNull": false
2288
+ },
2289
+ "domain": {
2290
+ "name": "domain",
2291
+ "type": "text",
2292
+ "primaryKey": false,
2293
+ "notNull": true
2294
+ }
2295
+ },
2296
+ "indexes": {},
2297
+ "foreignKeys": {
2298
+ "sso_provider_user_id_user_id_fk": {
2299
+ "name": "sso_provider_user_id_user_id_fk",
2300
+ "tableFrom": "sso_provider",
2301
+ "tableTo": "user",
2302
+ "columnsFrom": [
2303
+ "user_id"
2304
+ ],
2305
+ "columnsTo": [
2306
+ "id"
2307
+ ],
2308
+ "onDelete": "cascade",
2309
+ "onUpdate": "no action"
2310
+ }
2311
+ },
2312
+ "compositePrimaryKeys": {},
2313
+ "uniqueConstraints": {
2314
+ "sso_provider_provider_id_unique": {
2315
+ "name": "sso_provider_provider_id_unique",
2316
+ "nullsNotDistinct": false,
2317
+ "columns": [
2318
+ "provider_id"
2319
+ ]
2320
+ }
2321
+ },
2322
+ "policies": {},
2323
+ "checkConstraints": {},
2324
+ "isRLSEnabled": false
2325
+ },
2326
+ "public.sub_agent_artifact_components": {
2327
+ "name": "sub_agent_artifact_components",
2328
+ "schema": "",
2329
+ "columns": {
2330
+ "tenant_id": {
2331
+ "name": "tenant_id",
2332
+ "type": "varchar(256)",
2333
+ "primaryKey": false,
2334
+ "notNull": true
2335
+ },
2336
+ "id": {
2337
+ "name": "id",
2338
+ "type": "varchar(256)",
2339
+ "primaryKey": false,
2340
+ "notNull": true
2341
+ },
2342
+ "project_id": {
2343
+ "name": "project_id",
2344
+ "type": "varchar(256)",
2345
+ "primaryKey": false,
2346
+ "notNull": true
2347
+ },
2348
+ "agent_id": {
2349
+ "name": "agent_id",
2350
+ "type": "varchar(256)",
2351
+ "primaryKey": false,
2352
+ "notNull": true
2353
+ },
2354
+ "sub_agent_id": {
2355
+ "name": "sub_agent_id",
2356
+ "type": "varchar(256)",
2357
+ "primaryKey": false,
2358
+ "notNull": true
2359
+ },
2360
+ "artifact_component_id": {
2361
+ "name": "artifact_component_id",
2362
+ "type": "varchar(256)",
2363
+ "primaryKey": false,
2364
+ "notNull": true
2365
+ },
2366
+ "created_at": {
2367
+ "name": "created_at",
2368
+ "type": "timestamp",
2369
+ "primaryKey": false,
2370
+ "notNull": true,
2371
+ "default": "now()"
2372
+ }
2373
+ },
2374
+ "indexes": {},
2375
+ "foreignKeys": {
2376
+ "sub_agent_artifact_components_sub_agent_fk": {
2377
+ "name": "sub_agent_artifact_components_sub_agent_fk",
2378
+ "tableFrom": "sub_agent_artifact_components",
2379
+ "tableTo": "sub_agents",
2380
+ "columnsFrom": [
2381
+ "tenant_id",
2382
+ "project_id",
2383
+ "agent_id",
2384
+ "sub_agent_id"
2385
+ ],
2386
+ "columnsTo": [
2387
+ "tenant_id",
2388
+ "project_id",
2389
+ "agent_id",
2390
+ "id"
2391
+ ],
2392
+ "onDelete": "cascade",
2393
+ "onUpdate": "no action"
2394
+ },
2395
+ "sub_agent_artifact_components_artifact_component_fk": {
2396
+ "name": "sub_agent_artifact_components_artifact_component_fk",
2397
+ "tableFrom": "sub_agent_artifact_components",
2398
+ "tableTo": "artifact_components",
2399
+ "columnsFrom": [
2400
+ "tenant_id",
2401
+ "project_id",
2402
+ "artifact_component_id"
2403
+ ],
2404
+ "columnsTo": [
2405
+ "tenant_id",
2406
+ "project_id",
2407
+ "id"
2408
+ ],
2409
+ "onDelete": "cascade",
2410
+ "onUpdate": "no action"
2411
+ }
2412
+ },
2413
+ "compositePrimaryKeys": {
2414
+ "sub_agent_artifact_components_tenant_id_project_id_agent_id_sub_agent_id_id_pk": {
2415
+ "name": "sub_agent_artifact_components_tenant_id_project_id_agent_id_sub_agent_id_id_pk",
2416
+ "columns": [
2417
+ "tenant_id",
2418
+ "project_id",
2419
+ "agent_id",
2420
+ "sub_agent_id",
2421
+ "id"
2422
+ ]
2423
+ }
2424
+ },
2425
+ "uniqueConstraints": {},
2426
+ "policies": {},
2427
+ "checkConstraints": {},
2428
+ "isRLSEnabled": false
2429
+ },
2430
+ "public.sub_agent_data_components": {
2431
+ "name": "sub_agent_data_components",
2432
+ "schema": "",
2433
+ "columns": {
2434
+ "tenant_id": {
2435
+ "name": "tenant_id",
2436
+ "type": "varchar(256)",
2437
+ "primaryKey": false,
2438
+ "notNull": true
2439
+ },
2440
+ "id": {
2441
+ "name": "id",
2442
+ "type": "varchar(256)",
2443
+ "primaryKey": false,
2444
+ "notNull": true
2445
+ },
2446
+ "project_id": {
2447
+ "name": "project_id",
2448
+ "type": "varchar(256)",
2449
+ "primaryKey": false,
2450
+ "notNull": true
2451
+ },
2452
+ "agent_id": {
2453
+ "name": "agent_id",
2454
+ "type": "varchar(256)",
2455
+ "primaryKey": false,
2456
+ "notNull": true
2457
+ },
2458
+ "sub_agent_id": {
2459
+ "name": "sub_agent_id",
2460
+ "type": "varchar(256)",
2461
+ "primaryKey": false,
2462
+ "notNull": true
2463
+ },
2464
+ "data_component_id": {
2465
+ "name": "data_component_id",
2466
+ "type": "varchar(256)",
2467
+ "primaryKey": false,
2468
+ "notNull": true
2469
+ },
2470
+ "created_at": {
2471
+ "name": "created_at",
2472
+ "type": "timestamp",
2473
+ "primaryKey": false,
2474
+ "notNull": true,
2475
+ "default": "now()"
2476
+ }
2477
+ },
2478
+ "indexes": {},
2479
+ "foreignKeys": {
2480
+ "sub_agent_data_components_sub_agent_fk": {
2481
+ "name": "sub_agent_data_components_sub_agent_fk",
2482
+ "tableFrom": "sub_agent_data_components",
2483
+ "tableTo": "sub_agents",
2484
+ "columnsFrom": [
2485
+ "tenant_id",
2486
+ "project_id",
2487
+ "agent_id",
2488
+ "sub_agent_id"
2489
+ ],
2490
+ "columnsTo": [
2491
+ "tenant_id",
2492
+ "project_id",
2493
+ "agent_id",
2494
+ "id"
2495
+ ],
2496
+ "onDelete": "cascade",
2497
+ "onUpdate": "no action"
2498
+ },
2499
+ "sub_agent_data_components_data_component_fk": {
2500
+ "name": "sub_agent_data_components_data_component_fk",
2501
+ "tableFrom": "sub_agent_data_components",
2502
+ "tableTo": "data_components",
2503
+ "columnsFrom": [
2504
+ "tenant_id",
2505
+ "project_id",
2506
+ "data_component_id"
2507
+ ],
2508
+ "columnsTo": [
2509
+ "tenant_id",
2510
+ "project_id",
2511
+ "id"
2512
+ ],
2513
+ "onDelete": "cascade",
2514
+ "onUpdate": "no action"
2515
+ }
2516
+ },
2517
+ "compositePrimaryKeys": {
2518
+ "sub_agent_data_components_tenant_id_project_id_id_pk": {
2519
+ "name": "sub_agent_data_components_tenant_id_project_id_id_pk",
2520
+ "columns": [
2521
+ "tenant_id",
2522
+ "project_id",
2523
+ "id"
2524
+ ]
2525
+ }
2526
+ },
2527
+ "uniqueConstraints": {},
2528
+ "policies": {},
2529
+ "checkConstraints": {},
2530
+ "isRLSEnabled": false
2531
+ },
2532
+ "public.sub_agent_external_agent_relations": {
2533
+ "name": "sub_agent_external_agent_relations",
2534
+ "schema": "",
2535
+ "columns": {
2536
+ "tenant_id": {
2537
+ "name": "tenant_id",
2538
+ "type": "varchar(256)",
2539
+ "primaryKey": false,
2540
+ "notNull": true
2541
+ },
2542
+ "id": {
2543
+ "name": "id",
2544
+ "type": "varchar(256)",
2545
+ "primaryKey": false,
2546
+ "notNull": true
2547
+ },
2548
+ "project_id": {
2549
+ "name": "project_id",
2550
+ "type": "varchar(256)",
2551
+ "primaryKey": false,
2552
+ "notNull": true
2553
+ },
2554
+ "agent_id": {
2555
+ "name": "agent_id",
2556
+ "type": "varchar(256)",
2557
+ "primaryKey": false,
2558
+ "notNull": true
2559
+ },
2560
+ "sub_agent_id": {
2561
+ "name": "sub_agent_id",
2562
+ "type": "varchar(256)",
2563
+ "primaryKey": false,
2564
+ "notNull": true
2565
+ },
2566
+ "external_agent_id": {
2567
+ "name": "external_agent_id",
2568
+ "type": "varchar(256)",
2569
+ "primaryKey": false,
2570
+ "notNull": true
2571
+ },
2572
+ "headers": {
2573
+ "name": "headers",
2574
+ "type": "jsonb",
2575
+ "primaryKey": false,
2576
+ "notNull": false
2577
+ },
2578
+ "created_at": {
2579
+ "name": "created_at",
2580
+ "type": "timestamp",
2581
+ "primaryKey": false,
2582
+ "notNull": true,
2583
+ "default": "now()"
2584
+ },
2585
+ "updated_at": {
2586
+ "name": "updated_at",
2587
+ "type": "timestamp",
2588
+ "primaryKey": false,
2589
+ "notNull": true,
2590
+ "default": "now()"
2591
+ }
2592
+ },
2593
+ "indexes": {},
2594
+ "foreignKeys": {
2595
+ "sub_agent_external_agent_relations_sub_agent_fk": {
2596
+ "name": "sub_agent_external_agent_relations_sub_agent_fk",
2597
+ "tableFrom": "sub_agent_external_agent_relations",
2598
+ "tableTo": "sub_agents",
2599
+ "columnsFrom": [
2600
+ "tenant_id",
2601
+ "project_id",
2602
+ "agent_id",
2603
+ "sub_agent_id"
2604
+ ],
2605
+ "columnsTo": [
2606
+ "tenant_id",
2607
+ "project_id",
2608
+ "agent_id",
2609
+ "id"
2610
+ ],
2611
+ "onDelete": "cascade",
2612
+ "onUpdate": "no action"
2613
+ },
2614
+ "sub_agent_external_agent_relations_external_agent_fk": {
2615
+ "name": "sub_agent_external_agent_relations_external_agent_fk",
2616
+ "tableFrom": "sub_agent_external_agent_relations",
2617
+ "tableTo": "external_agents",
2618
+ "columnsFrom": [
2619
+ "tenant_id",
2620
+ "project_id",
2621
+ "external_agent_id"
2622
+ ],
2623
+ "columnsTo": [
2624
+ "tenant_id",
2625
+ "project_id",
2626
+ "id"
2627
+ ],
2628
+ "onDelete": "cascade",
2629
+ "onUpdate": "no action"
2630
+ }
2631
+ },
2632
+ "compositePrimaryKeys": {
2633
+ "sub_agent_external_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2634
+ "name": "sub_agent_external_agent_relations_tenant_id_project_id_agent_id_id_pk",
2635
+ "columns": [
2636
+ "tenant_id",
2637
+ "project_id",
2638
+ "agent_id",
2639
+ "id"
2640
+ ]
2641
+ }
2642
+ },
2643
+ "uniqueConstraints": {},
2644
+ "policies": {},
2645
+ "checkConstraints": {},
2646
+ "isRLSEnabled": false
2647
+ },
2648
+ "public.sub_agent_function_tool_relations": {
2649
+ "name": "sub_agent_function_tool_relations",
2650
+ "schema": "",
2651
+ "columns": {
2652
+ "tenant_id": {
2653
+ "name": "tenant_id",
2654
+ "type": "varchar(256)",
2655
+ "primaryKey": false,
2656
+ "notNull": true
2657
+ },
2658
+ "id": {
2659
+ "name": "id",
2660
+ "type": "varchar(256)",
2661
+ "primaryKey": false,
2662
+ "notNull": true
2663
+ },
2664
+ "project_id": {
2665
+ "name": "project_id",
2666
+ "type": "varchar(256)",
2667
+ "primaryKey": false,
2668
+ "notNull": true
2669
+ },
2670
+ "agent_id": {
2671
+ "name": "agent_id",
2672
+ "type": "varchar(256)",
2673
+ "primaryKey": false,
2674
+ "notNull": true
2675
+ },
2676
+ "sub_agent_id": {
2677
+ "name": "sub_agent_id",
2678
+ "type": "varchar(256)",
2679
+ "primaryKey": false,
2680
+ "notNull": true
2681
+ },
2682
+ "function_tool_id": {
2683
+ "name": "function_tool_id",
2684
+ "type": "varchar(256)",
2685
+ "primaryKey": false,
2686
+ "notNull": true
2687
+ },
2688
+ "created_at": {
2689
+ "name": "created_at",
2690
+ "type": "timestamp",
2691
+ "primaryKey": false,
2692
+ "notNull": true,
2693
+ "default": "now()"
2694
+ },
2695
+ "updated_at": {
2696
+ "name": "updated_at",
2697
+ "type": "timestamp",
2698
+ "primaryKey": false,
2699
+ "notNull": true,
2700
+ "default": "now()"
2701
+ }
2702
+ },
2703
+ "indexes": {},
2704
+ "foreignKeys": {
2705
+ "sub_agent_function_tool_relations_sub_agent_fk": {
2706
+ "name": "sub_agent_function_tool_relations_sub_agent_fk",
2707
+ "tableFrom": "sub_agent_function_tool_relations",
2708
+ "tableTo": "sub_agents",
2709
+ "columnsFrom": [
2710
+ "tenant_id",
2711
+ "project_id",
2712
+ "agent_id",
2713
+ "sub_agent_id"
2714
+ ],
2715
+ "columnsTo": [
2716
+ "tenant_id",
2717
+ "project_id",
2718
+ "agent_id",
2719
+ "id"
2720
+ ],
2721
+ "onDelete": "cascade",
2722
+ "onUpdate": "no action"
2723
+ },
2724
+ "sub_agent_function_tool_relations_function_tool_fk": {
2725
+ "name": "sub_agent_function_tool_relations_function_tool_fk",
2726
+ "tableFrom": "sub_agent_function_tool_relations",
2727
+ "tableTo": "function_tools",
2728
+ "columnsFrom": [
2729
+ "tenant_id",
2730
+ "project_id",
2731
+ "agent_id",
2732
+ "function_tool_id"
2733
+ ],
2734
+ "columnsTo": [
2735
+ "tenant_id",
2736
+ "project_id",
2737
+ "agent_id",
2738
+ "id"
2739
+ ],
2740
+ "onDelete": "cascade",
2741
+ "onUpdate": "no action"
2742
+ }
2743
+ },
2744
+ "compositePrimaryKeys": {
2745
+ "sub_agent_function_tool_relations_tenant_id_project_id_agent_id_id_pk": {
2746
+ "name": "sub_agent_function_tool_relations_tenant_id_project_id_agent_id_id_pk",
2747
+ "columns": [
2748
+ "tenant_id",
2749
+ "project_id",
2750
+ "agent_id",
2751
+ "id"
2752
+ ]
2753
+ }
2754
+ },
2755
+ "uniqueConstraints": {},
2756
+ "policies": {},
2757
+ "checkConstraints": {},
2758
+ "isRLSEnabled": false
2759
+ },
2760
+ "public.sub_agent_relations": {
2761
+ "name": "sub_agent_relations",
2762
+ "schema": "",
2763
+ "columns": {
2764
+ "tenant_id": {
2765
+ "name": "tenant_id",
2766
+ "type": "varchar(256)",
2767
+ "primaryKey": false,
2768
+ "notNull": true
2769
+ },
2770
+ "id": {
2771
+ "name": "id",
2772
+ "type": "varchar(256)",
2773
+ "primaryKey": false,
2774
+ "notNull": true
2775
+ },
2776
+ "project_id": {
2777
+ "name": "project_id",
2778
+ "type": "varchar(256)",
2779
+ "primaryKey": false,
2780
+ "notNull": true
2781
+ },
2782
+ "agent_id": {
2783
+ "name": "agent_id",
2784
+ "type": "varchar(256)",
2785
+ "primaryKey": false,
2786
+ "notNull": true
2787
+ },
2788
+ "source_sub_agent_id": {
2789
+ "name": "source_sub_agent_id",
2790
+ "type": "varchar(256)",
2791
+ "primaryKey": false,
2792
+ "notNull": true
2793
+ },
2794
+ "target_sub_agent_id": {
2795
+ "name": "target_sub_agent_id",
2796
+ "type": "varchar(256)",
2797
+ "primaryKey": false,
2798
+ "notNull": false
2799
+ },
2800
+ "relation_type": {
2801
+ "name": "relation_type",
2802
+ "type": "varchar(256)",
2803
+ "primaryKey": false,
2804
+ "notNull": false
2805
+ },
2806
+ "created_at": {
2807
+ "name": "created_at",
2808
+ "type": "timestamp",
2809
+ "primaryKey": false,
2810
+ "notNull": true,
2811
+ "default": "now()"
2812
+ },
2813
+ "updated_at": {
2814
+ "name": "updated_at",
2815
+ "type": "timestamp",
2816
+ "primaryKey": false,
2817
+ "notNull": true,
2818
+ "default": "now()"
2819
+ }
2820
+ },
2821
+ "indexes": {},
2822
+ "foreignKeys": {
2823
+ "sub_agent_relations_agent_fk": {
2824
+ "name": "sub_agent_relations_agent_fk",
2825
+ "tableFrom": "sub_agent_relations",
2826
+ "tableTo": "agent",
2827
+ "columnsFrom": [
2828
+ "tenant_id",
2829
+ "project_id",
2830
+ "agent_id"
2831
+ ],
2832
+ "columnsTo": [
2833
+ "tenant_id",
2834
+ "project_id",
2835
+ "id"
2836
+ ],
2837
+ "onDelete": "cascade",
2838
+ "onUpdate": "no action"
2839
+ }
2840
+ },
2841
+ "compositePrimaryKeys": {
2842
+ "sub_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2843
+ "name": "sub_agent_relations_tenant_id_project_id_agent_id_id_pk",
2844
+ "columns": [
2845
+ "tenant_id",
2846
+ "project_id",
2847
+ "agent_id",
2848
+ "id"
2849
+ ]
2850
+ }
2851
+ },
2852
+ "uniqueConstraints": {},
2853
+ "policies": {},
2854
+ "checkConstraints": {},
2855
+ "isRLSEnabled": false
2856
+ },
2857
+ "public.sub_agent_team_agent_relations": {
2858
+ "name": "sub_agent_team_agent_relations",
2859
+ "schema": "",
2860
+ "columns": {
2861
+ "tenant_id": {
2862
+ "name": "tenant_id",
2863
+ "type": "varchar(256)",
2864
+ "primaryKey": false,
2865
+ "notNull": true
2866
+ },
2867
+ "id": {
2868
+ "name": "id",
2869
+ "type": "varchar(256)",
2870
+ "primaryKey": false,
2871
+ "notNull": true
2872
+ },
2873
+ "project_id": {
2874
+ "name": "project_id",
2875
+ "type": "varchar(256)",
2876
+ "primaryKey": false,
2877
+ "notNull": true
2878
+ },
2879
+ "agent_id": {
2880
+ "name": "agent_id",
2881
+ "type": "varchar(256)",
2882
+ "primaryKey": false,
2883
+ "notNull": true
2884
+ },
2885
+ "sub_agent_id": {
2886
+ "name": "sub_agent_id",
2887
+ "type": "varchar(256)",
2888
+ "primaryKey": false,
2889
+ "notNull": true
2890
+ },
2891
+ "target_agent_id": {
2892
+ "name": "target_agent_id",
2893
+ "type": "varchar(256)",
2894
+ "primaryKey": false,
2895
+ "notNull": true
2896
+ },
2897
+ "headers": {
2898
+ "name": "headers",
2899
+ "type": "jsonb",
2900
+ "primaryKey": false,
2901
+ "notNull": false
2902
+ },
2903
+ "created_at": {
2904
+ "name": "created_at",
2905
+ "type": "timestamp",
2906
+ "primaryKey": false,
2907
+ "notNull": true,
2908
+ "default": "now()"
2909
+ },
2910
+ "updated_at": {
2911
+ "name": "updated_at",
2912
+ "type": "timestamp",
2913
+ "primaryKey": false,
2914
+ "notNull": true,
2915
+ "default": "now()"
2916
+ }
2917
+ },
2918
+ "indexes": {},
2919
+ "foreignKeys": {
2920
+ "sub_agent_team_agent_relations_sub_agent_fk": {
2921
+ "name": "sub_agent_team_agent_relations_sub_agent_fk",
2922
+ "tableFrom": "sub_agent_team_agent_relations",
2923
+ "tableTo": "sub_agents",
2924
+ "columnsFrom": [
2925
+ "tenant_id",
2926
+ "project_id",
2927
+ "agent_id",
2928
+ "sub_agent_id"
2929
+ ],
2930
+ "columnsTo": [
2931
+ "tenant_id",
2932
+ "project_id",
2933
+ "agent_id",
2934
+ "id"
2935
+ ],
2936
+ "onDelete": "cascade",
2937
+ "onUpdate": "no action"
2938
+ },
2939
+ "sub_agent_team_agent_relations_target_agent_fk": {
2940
+ "name": "sub_agent_team_agent_relations_target_agent_fk",
2941
+ "tableFrom": "sub_agent_team_agent_relations",
2942
+ "tableTo": "agent",
2943
+ "columnsFrom": [
2944
+ "tenant_id",
2945
+ "project_id",
2946
+ "target_agent_id"
2947
+ ],
2948
+ "columnsTo": [
2949
+ "tenant_id",
2950
+ "project_id",
2951
+ "id"
2952
+ ],
2953
+ "onDelete": "cascade",
2954
+ "onUpdate": "no action"
2955
+ }
2956
+ },
2957
+ "compositePrimaryKeys": {
2958
+ "sub_agent_team_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2959
+ "name": "sub_agent_team_agent_relations_tenant_id_project_id_agent_id_id_pk",
2960
+ "columns": [
2961
+ "tenant_id",
2962
+ "project_id",
2963
+ "agent_id",
2964
+ "id"
2965
+ ]
2966
+ }
2967
+ },
2968
+ "uniqueConstraints": {},
2969
+ "policies": {},
2970
+ "checkConstraints": {},
2971
+ "isRLSEnabled": false
2972
+ },
2973
+ "public.sub_agent_tool_relations": {
2974
+ "name": "sub_agent_tool_relations",
2975
+ "schema": "",
2976
+ "columns": {
2977
+ "tenant_id": {
2978
+ "name": "tenant_id",
2979
+ "type": "varchar(256)",
2980
+ "primaryKey": false,
2981
+ "notNull": true
2982
+ },
2983
+ "id": {
2984
+ "name": "id",
2985
+ "type": "varchar(256)",
2986
+ "primaryKey": false,
2987
+ "notNull": true
2988
+ },
2989
+ "project_id": {
2990
+ "name": "project_id",
2991
+ "type": "varchar(256)",
2992
+ "primaryKey": false,
2993
+ "notNull": true
2994
+ },
2995
+ "agent_id": {
2996
+ "name": "agent_id",
2997
+ "type": "varchar(256)",
2998
+ "primaryKey": false,
2999
+ "notNull": true
3000
+ },
3001
+ "sub_agent_id": {
3002
+ "name": "sub_agent_id",
3003
+ "type": "varchar(256)",
3004
+ "primaryKey": false,
3005
+ "notNull": true
3006
+ },
3007
+ "tool_id": {
3008
+ "name": "tool_id",
3009
+ "type": "varchar(256)",
3010
+ "primaryKey": false,
3011
+ "notNull": true
3012
+ },
3013
+ "selected_tools": {
3014
+ "name": "selected_tools",
3015
+ "type": "jsonb",
3016
+ "primaryKey": false,
3017
+ "notNull": false
3018
+ },
3019
+ "headers": {
3020
+ "name": "headers",
3021
+ "type": "jsonb",
3022
+ "primaryKey": false,
3023
+ "notNull": false
3024
+ },
3025
+ "tool_policies": {
3026
+ "name": "tool_policies",
3027
+ "type": "jsonb",
3028
+ "primaryKey": false,
3029
+ "notNull": false
3030
+ },
3031
+ "created_at": {
3032
+ "name": "created_at",
3033
+ "type": "timestamp",
3034
+ "primaryKey": false,
3035
+ "notNull": true,
3036
+ "default": "now()"
3037
+ },
3038
+ "updated_at": {
3039
+ "name": "updated_at",
3040
+ "type": "timestamp",
3041
+ "primaryKey": false,
3042
+ "notNull": true,
3043
+ "default": "now()"
3044
+ }
3045
+ },
3046
+ "indexes": {},
3047
+ "foreignKeys": {
3048
+ "sub_agent_tool_relations_agent_fk": {
3049
+ "name": "sub_agent_tool_relations_agent_fk",
3050
+ "tableFrom": "sub_agent_tool_relations",
3051
+ "tableTo": "sub_agents",
3052
+ "columnsFrom": [
3053
+ "tenant_id",
3054
+ "project_id",
3055
+ "agent_id",
3056
+ "sub_agent_id"
3057
+ ],
3058
+ "columnsTo": [
3059
+ "tenant_id",
3060
+ "project_id",
3061
+ "agent_id",
3062
+ "id"
3063
+ ],
3064
+ "onDelete": "cascade",
3065
+ "onUpdate": "no action"
3066
+ },
3067
+ "sub_agent_tool_relations_tool_fk": {
3068
+ "name": "sub_agent_tool_relations_tool_fk",
3069
+ "tableFrom": "sub_agent_tool_relations",
3070
+ "tableTo": "tools",
3071
+ "columnsFrom": [
3072
+ "tenant_id",
3073
+ "project_id",
3074
+ "tool_id"
3075
+ ],
3076
+ "columnsTo": [
3077
+ "tenant_id",
3078
+ "project_id",
3079
+ "id"
3080
+ ],
3081
+ "onDelete": "cascade",
3082
+ "onUpdate": "no action"
3083
+ }
3084
+ },
3085
+ "compositePrimaryKeys": {
3086
+ "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk": {
3087
+ "name": "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk",
3088
+ "columns": [
3089
+ "tenant_id",
3090
+ "project_id",
3091
+ "agent_id",
3092
+ "id"
3093
+ ]
3094
+ }
3095
+ },
3096
+ "uniqueConstraints": {},
3097
+ "policies": {},
3098
+ "checkConstraints": {},
3099
+ "isRLSEnabled": false
3100
+ },
3101
+ "public.sub_agents": {
3102
+ "name": "sub_agents",
3103
+ "schema": "",
3104
+ "columns": {
3105
+ "tenant_id": {
3106
+ "name": "tenant_id",
3107
+ "type": "varchar(256)",
3108
+ "primaryKey": false,
3109
+ "notNull": true
3110
+ },
3111
+ "id": {
3112
+ "name": "id",
3113
+ "type": "varchar(256)",
3114
+ "primaryKey": false,
3115
+ "notNull": true
3116
+ },
3117
+ "project_id": {
3118
+ "name": "project_id",
3119
+ "type": "varchar(256)",
3120
+ "primaryKey": false,
3121
+ "notNull": true
3122
+ },
3123
+ "agent_id": {
3124
+ "name": "agent_id",
3125
+ "type": "varchar(256)",
3126
+ "primaryKey": false,
3127
+ "notNull": true
3128
+ },
3129
+ "name": {
3130
+ "name": "name",
3131
+ "type": "varchar(256)",
3132
+ "primaryKey": false,
3133
+ "notNull": true
3134
+ },
3135
+ "description": {
3136
+ "name": "description",
3137
+ "type": "text",
3138
+ "primaryKey": false,
3139
+ "notNull": false
3140
+ },
3141
+ "prompt": {
3142
+ "name": "prompt",
3143
+ "type": "text",
3144
+ "primaryKey": false,
3145
+ "notNull": false
3146
+ },
3147
+ "conversation_history_config": {
3148
+ "name": "conversation_history_config",
3149
+ "type": "jsonb",
3150
+ "primaryKey": false,
3151
+ "notNull": false,
3152
+ "default": "'{\"mode\":\"full\",\"limit\":50,\"maxOutputTokens\":4000,\"includeInternal\":false,\"messageTypes\":[\"chat\",\"tool-result\"]}'::jsonb"
3153
+ },
3154
+ "models": {
3155
+ "name": "models",
3156
+ "type": "jsonb",
3157
+ "primaryKey": false,
3158
+ "notNull": false
3159
+ },
3160
+ "stop_when": {
3161
+ "name": "stop_when",
3162
+ "type": "jsonb",
3163
+ "primaryKey": false,
3164
+ "notNull": false
3165
+ },
3166
+ "created_at": {
3167
+ "name": "created_at",
3168
+ "type": "timestamp",
3169
+ "primaryKey": false,
3170
+ "notNull": true,
3171
+ "default": "now()"
3172
+ },
3173
+ "updated_at": {
3174
+ "name": "updated_at",
3175
+ "type": "timestamp",
3176
+ "primaryKey": false,
3177
+ "notNull": true,
3178
+ "default": "now()"
3179
+ }
3180
+ },
3181
+ "indexes": {},
3182
+ "foreignKeys": {
3183
+ "sub_agents_agents_fk": {
3184
+ "name": "sub_agents_agents_fk",
3185
+ "tableFrom": "sub_agents",
3186
+ "tableTo": "agent",
3187
+ "columnsFrom": [
3188
+ "tenant_id",
3189
+ "project_id",
3190
+ "agent_id"
3191
+ ],
3192
+ "columnsTo": [
3193
+ "tenant_id",
3194
+ "project_id",
3195
+ "id"
3196
+ ],
3197
+ "onDelete": "cascade",
3198
+ "onUpdate": "no action"
3199
+ }
3200
+ },
3201
+ "compositePrimaryKeys": {
3202
+ "sub_agents_tenant_id_project_id_agent_id_id_pk": {
3203
+ "name": "sub_agents_tenant_id_project_id_agent_id_id_pk",
3204
+ "columns": [
3205
+ "tenant_id",
3206
+ "project_id",
3207
+ "agent_id",
3208
+ "id"
3209
+ ]
3210
+ }
3211
+ },
3212
+ "uniqueConstraints": {},
3213
+ "policies": {},
3214
+ "checkConstraints": {},
3215
+ "isRLSEnabled": false
3216
+ },
3217
+ "public.task_relations": {
3218
+ "name": "task_relations",
3219
+ "schema": "",
3220
+ "columns": {
3221
+ "tenant_id": {
3222
+ "name": "tenant_id",
3223
+ "type": "varchar(256)",
3224
+ "primaryKey": false,
3225
+ "notNull": true
3226
+ },
3227
+ "id": {
3228
+ "name": "id",
3229
+ "type": "varchar(256)",
3230
+ "primaryKey": false,
3231
+ "notNull": true
3232
+ },
3233
+ "project_id": {
3234
+ "name": "project_id",
3235
+ "type": "varchar(256)",
3236
+ "primaryKey": false,
3237
+ "notNull": true
3238
+ },
3239
+ "parent_task_id": {
3240
+ "name": "parent_task_id",
3241
+ "type": "varchar(256)",
3242
+ "primaryKey": false,
3243
+ "notNull": true
3244
+ },
3245
+ "child_task_id": {
3246
+ "name": "child_task_id",
3247
+ "type": "varchar(256)",
3248
+ "primaryKey": false,
3249
+ "notNull": true
3250
+ },
3251
+ "relation_type": {
3252
+ "name": "relation_type",
3253
+ "type": "varchar(256)",
3254
+ "primaryKey": false,
3255
+ "notNull": false,
3256
+ "default": "'parent_child'"
3257
+ },
3258
+ "created_at": {
3259
+ "name": "created_at",
3260
+ "type": "timestamp",
3261
+ "primaryKey": false,
3262
+ "notNull": true,
3263
+ "default": "now()"
3264
+ },
3265
+ "updated_at": {
3266
+ "name": "updated_at",
3267
+ "type": "timestamp",
3268
+ "primaryKey": false,
3269
+ "notNull": true,
3270
+ "default": "now()"
3271
+ }
3272
+ },
3273
+ "indexes": {},
3274
+ "foreignKeys": {
3275
+ "task_relations_project_fk": {
3276
+ "name": "task_relations_project_fk",
3277
+ "tableFrom": "task_relations",
3278
+ "tableTo": "projects",
3279
+ "columnsFrom": [
3280
+ "tenant_id",
3281
+ "project_id"
3282
+ ],
3283
+ "columnsTo": [
3284
+ "tenant_id",
3285
+ "id"
3286
+ ],
3287
+ "onDelete": "cascade",
3288
+ "onUpdate": "no action"
3289
+ }
3290
+ },
3291
+ "compositePrimaryKeys": {
3292
+ "task_relations_tenant_id_project_id_id_pk": {
3293
+ "name": "task_relations_tenant_id_project_id_id_pk",
3294
+ "columns": [
3295
+ "tenant_id",
3296
+ "project_id",
3297
+ "id"
3298
+ ]
3299
+ }
3300
+ },
3301
+ "uniqueConstraints": {},
3302
+ "policies": {},
3303
+ "checkConstraints": {},
3304
+ "isRLSEnabled": false
3305
+ },
3306
+ "public.tasks": {
3307
+ "name": "tasks",
3308
+ "schema": "",
3309
+ "columns": {
3310
+ "tenant_id": {
3311
+ "name": "tenant_id",
3312
+ "type": "varchar(256)",
3313
+ "primaryKey": false,
3314
+ "notNull": true
3315
+ },
3316
+ "id": {
3317
+ "name": "id",
3318
+ "type": "varchar(256)",
3319
+ "primaryKey": false,
3320
+ "notNull": true
3321
+ },
3322
+ "project_id": {
3323
+ "name": "project_id",
3324
+ "type": "varchar(256)",
3325
+ "primaryKey": false,
3326
+ "notNull": true
3327
+ },
3328
+ "agent_id": {
3329
+ "name": "agent_id",
3330
+ "type": "varchar(256)",
3331
+ "primaryKey": false,
3332
+ "notNull": true
3333
+ },
3334
+ "sub_agent_id": {
3335
+ "name": "sub_agent_id",
3336
+ "type": "varchar(256)",
3337
+ "primaryKey": false,
3338
+ "notNull": true
3339
+ },
3340
+ "context_id": {
3341
+ "name": "context_id",
3342
+ "type": "varchar(256)",
3343
+ "primaryKey": false,
3344
+ "notNull": true
3345
+ },
3346
+ "status": {
3347
+ "name": "status",
3348
+ "type": "varchar(256)",
3349
+ "primaryKey": false,
3350
+ "notNull": true
3351
+ },
3352
+ "metadata": {
3353
+ "name": "metadata",
3354
+ "type": "jsonb",
3355
+ "primaryKey": false,
3356
+ "notNull": false
3357
+ },
3358
+ "created_at": {
3359
+ "name": "created_at",
3360
+ "type": "timestamp",
3361
+ "primaryKey": false,
3362
+ "notNull": true,
3363
+ "default": "now()"
3364
+ },
3365
+ "updated_at": {
3366
+ "name": "updated_at",
3367
+ "type": "timestamp",
3368
+ "primaryKey": false,
3369
+ "notNull": true,
3370
+ "default": "now()"
3371
+ }
3372
+ },
3373
+ "indexes": {},
3374
+ "foreignKeys": {
3375
+ "tasks_sub_agent_fk": {
3376
+ "name": "tasks_sub_agent_fk",
3377
+ "tableFrom": "tasks",
3378
+ "tableTo": "sub_agents",
3379
+ "columnsFrom": [
3380
+ "tenant_id",
3381
+ "project_id",
3382
+ "agent_id",
3383
+ "sub_agent_id"
3384
+ ],
3385
+ "columnsTo": [
3386
+ "tenant_id",
3387
+ "project_id",
3388
+ "agent_id",
3389
+ "id"
3390
+ ],
3391
+ "onDelete": "cascade",
3392
+ "onUpdate": "no action"
3393
+ }
3394
+ },
3395
+ "compositePrimaryKeys": {
3396
+ "tasks_tenant_id_project_id_id_pk": {
3397
+ "name": "tasks_tenant_id_project_id_id_pk",
3398
+ "columns": [
3399
+ "tenant_id",
3400
+ "project_id",
3401
+ "id"
3402
+ ]
3403
+ }
3404
+ },
3405
+ "uniqueConstraints": {},
3406
+ "policies": {},
3407
+ "checkConstraints": {},
3408
+ "isRLSEnabled": false
3409
+ },
3410
+ "public.tools": {
3411
+ "name": "tools",
3412
+ "schema": "",
3413
+ "columns": {
3414
+ "tenant_id": {
3415
+ "name": "tenant_id",
3416
+ "type": "varchar(256)",
3417
+ "primaryKey": false,
3418
+ "notNull": true
3419
+ },
3420
+ "id": {
3421
+ "name": "id",
3422
+ "type": "varchar(256)",
3423
+ "primaryKey": false,
3424
+ "notNull": true
3425
+ },
3426
+ "project_id": {
3427
+ "name": "project_id",
3428
+ "type": "varchar(256)",
3429
+ "primaryKey": false,
3430
+ "notNull": true
3431
+ },
3432
+ "name": {
3433
+ "name": "name",
3434
+ "type": "varchar(256)",
3435
+ "primaryKey": false,
3436
+ "notNull": true
3437
+ },
3438
+ "description": {
3439
+ "name": "description",
3440
+ "type": "text",
3441
+ "primaryKey": false,
3442
+ "notNull": false
3443
+ },
3444
+ "config": {
3445
+ "name": "config",
3446
+ "type": "jsonb",
3447
+ "primaryKey": false,
3448
+ "notNull": true
3449
+ },
3450
+ "credential_reference_id": {
3451
+ "name": "credential_reference_id",
3452
+ "type": "varchar(256)",
3453
+ "primaryKey": false,
3454
+ "notNull": false
3455
+ },
3456
+ "credential_scope": {
3457
+ "name": "credential_scope",
3458
+ "type": "varchar(50)",
3459
+ "primaryKey": false,
3460
+ "notNull": true,
3461
+ "default": "'project'"
3462
+ },
3463
+ "headers": {
3464
+ "name": "headers",
3465
+ "type": "jsonb",
3466
+ "primaryKey": false,
3467
+ "notNull": false
3468
+ },
3469
+ "image_url": {
3470
+ "name": "image_url",
3471
+ "type": "text",
3472
+ "primaryKey": false,
3473
+ "notNull": false
3474
+ },
3475
+ "capabilities": {
3476
+ "name": "capabilities",
3477
+ "type": "jsonb",
3478
+ "primaryKey": false,
3479
+ "notNull": false
3480
+ },
3481
+ "last_error": {
3482
+ "name": "last_error",
3483
+ "type": "text",
3484
+ "primaryKey": false,
3485
+ "notNull": false
3486
+ },
3487
+ "created_at": {
3488
+ "name": "created_at",
3489
+ "type": "timestamp",
3490
+ "primaryKey": false,
3491
+ "notNull": true,
3492
+ "default": "now()"
3493
+ },
3494
+ "updated_at": {
3495
+ "name": "updated_at",
3496
+ "type": "timestamp",
3497
+ "primaryKey": false,
3498
+ "notNull": true,
3499
+ "default": "now()"
3500
+ }
3501
+ },
3502
+ "indexes": {},
3503
+ "foreignKeys": {
3504
+ "tools_project_fk": {
3505
+ "name": "tools_project_fk",
3506
+ "tableFrom": "tools",
3507
+ "tableTo": "projects",
3508
+ "columnsFrom": [
3509
+ "tenant_id",
3510
+ "project_id"
3511
+ ],
3512
+ "columnsTo": [
3513
+ "tenant_id",
3514
+ "id"
3515
+ ],
3516
+ "onDelete": "cascade",
3517
+ "onUpdate": "no action"
3518
+ },
3519
+ "tools_credential_reference_fk": {
3520
+ "name": "tools_credential_reference_fk",
3521
+ "tableFrom": "tools",
3522
+ "tableTo": "credential_references",
3523
+ "columnsFrom": [
3524
+ "credential_reference_id"
3525
+ ],
3526
+ "columnsTo": [
3527
+ "id"
3528
+ ],
3529
+ "onDelete": "set null",
3530
+ "onUpdate": "no action"
3531
+ }
3532
+ },
3533
+ "compositePrimaryKeys": {
3534
+ "tools_tenant_id_project_id_id_pk": {
3535
+ "name": "tools_tenant_id_project_id_id_pk",
3536
+ "columns": [
3537
+ "tenant_id",
3538
+ "project_id",
3539
+ "id"
3540
+ ]
3541
+ }
3542
+ },
3543
+ "uniqueConstraints": {},
3544
+ "policies": {},
3545
+ "checkConstraints": {},
3546
+ "isRLSEnabled": false
3547
+ },
3548
+ "public.user": {
3549
+ "name": "user",
3550
+ "schema": "",
3551
+ "columns": {
3552
+ "id": {
3553
+ "name": "id",
3554
+ "type": "text",
3555
+ "primaryKey": true,
3556
+ "notNull": true
3557
+ },
3558
+ "name": {
3559
+ "name": "name",
3560
+ "type": "text",
3561
+ "primaryKey": false,
3562
+ "notNull": true
3563
+ },
3564
+ "email": {
3565
+ "name": "email",
3566
+ "type": "text",
3567
+ "primaryKey": false,
3568
+ "notNull": true
3569
+ },
3570
+ "email_verified": {
3571
+ "name": "email_verified",
3572
+ "type": "boolean",
3573
+ "primaryKey": false,
3574
+ "notNull": true,
3575
+ "default": false
3576
+ },
3577
+ "image": {
3578
+ "name": "image",
3579
+ "type": "text",
3580
+ "primaryKey": false,
3581
+ "notNull": false
3582
+ },
3583
+ "created_at": {
3584
+ "name": "created_at",
3585
+ "type": "timestamp",
3586
+ "primaryKey": false,
3587
+ "notNull": true,
3588
+ "default": "now()"
3589
+ },
3590
+ "updated_at": {
3591
+ "name": "updated_at",
3592
+ "type": "timestamp",
3593
+ "primaryKey": false,
3594
+ "notNull": true,
3595
+ "default": "now()"
3596
+ }
3597
+ },
3598
+ "indexes": {},
3599
+ "foreignKeys": {},
3600
+ "compositePrimaryKeys": {},
3601
+ "uniqueConstraints": {
3602
+ "user_email_unique": {
3603
+ "name": "user_email_unique",
3604
+ "nullsNotDistinct": false,
3605
+ "columns": [
3606
+ "email"
3607
+ ]
3608
+ }
3609
+ },
3610
+ "policies": {},
3611
+ "checkConstraints": {},
3612
+ "isRLSEnabled": false
3613
+ },
3614
+ "public.verification": {
3615
+ "name": "verification",
3616
+ "schema": "",
3617
+ "columns": {
3618
+ "id": {
3619
+ "name": "id",
3620
+ "type": "text",
3621
+ "primaryKey": true,
3622
+ "notNull": true
3623
+ },
3624
+ "identifier": {
3625
+ "name": "identifier",
3626
+ "type": "text",
3627
+ "primaryKey": false,
3628
+ "notNull": true
3629
+ },
3630
+ "value": {
3631
+ "name": "value",
3632
+ "type": "text",
3633
+ "primaryKey": false,
3634
+ "notNull": true
3635
+ },
3636
+ "expires_at": {
3637
+ "name": "expires_at",
3638
+ "type": "timestamp",
3639
+ "primaryKey": false,
3640
+ "notNull": true
3641
+ },
3642
+ "created_at": {
3643
+ "name": "created_at",
3644
+ "type": "timestamp",
3645
+ "primaryKey": false,
3646
+ "notNull": true,
3647
+ "default": "now()"
3648
+ },
3649
+ "updated_at": {
3650
+ "name": "updated_at",
3651
+ "type": "timestamp",
3652
+ "primaryKey": false,
3653
+ "notNull": true,
3654
+ "default": "now()"
3655
+ }
3656
+ },
3657
+ "indexes": {
3658
+ "verification_identifier_idx": {
3659
+ "name": "verification_identifier_idx",
3660
+ "columns": [
3661
+ {
3662
+ "expression": "identifier",
3663
+ "isExpression": false,
3664
+ "asc": true,
3665
+ "nulls": "last"
3666
+ }
3667
+ ],
3668
+ "isUnique": false,
3669
+ "concurrently": false,
3670
+ "method": "btree",
3671
+ "with": {}
3672
+ }
3673
+ },
3674
+ "foreignKeys": {},
3675
+ "compositePrimaryKeys": {},
3676
+ "uniqueConstraints": {},
3677
+ "policies": {},
3678
+ "checkConstraints": {},
3679
+ "isRLSEnabled": false
3680
+ }
3681
+ },
3682
+ "enums": {},
3683
+ "schemas": {},
3684
+ "sequences": {},
3685
+ "roles": {},
3686
+ "policies": {},
3687
+ "views": {},
3688
+ "_meta": {
3689
+ "columns": {},
3690
+ "schemas": {},
3691
+ "tables": {}
3692
+ }
3693
+ }