@inkeep/agents-core 0.37.0 → 0.37.2

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