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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE.md +56 -0
  2. package/README.md +458 -0
  3. package/SUPPLEMENTAL_TERMS.md +40 -0
  4. package/dist/auth-detection-CGqhPDnj.d.cts +435 -0
  5. package/dist/auth-detection-CGqhPDnj.d.ts +435 -0
  6. package/dist/chunk-7CLFCY6J.js +36 -0
  7. package/dist/chunk-A6JWG7FI.js +1689 -0
  8. package/dist/chunk-CMNLBV2A.js +39 -0
  9. package/dist/chunk-E6R6PML7.js +19 -0
  10. package/dist/chunk-OP3KPT4T.js +442 -0
  11. package/dist/chunk-TLSKVSBR.js +1234 -0
  12. package/dist/chunk-WG46C2WU.js +394 -0
  13. package/dist/chunk-YECQCT5N.js +223 -0
  14. package/dist/chunk-YFHT5M2R.js +18 -0
  15. package/dist/client-exports.cjs +3421 -0
  16. package/dist/client-exports.d.cts +292 -0
  17. package/dist/client-exports.d.ts +292 -0
  18. package/dist/client-exports.js +178 -0
  19. package/dist/constants/models.cjs +40 -0
  20. package/dist/constants/models.d.cts +42 -0
  21. package/dist/constants/models.d.ts +42 -0
  22. package/dist/constants/models.js +1 -0
  23. package/dist/db/schema.cjs +1686 -0
  24. package/dist/db/schema.d.cts +7 -0
  25. package/dist/db/schema.d.ts +7 -0
  26. package/dist/db/schema.js +1 -0
  27. package/dist/index.cjs +229792 -0
  28. package/dist/index.d.cts +5138 -0
  29. package/dist/index.d.ts +5138 -0
  30. package/dist/index.js +224908 -0
  31. package/dist/props-validation-BMR1qNiy.d.cts +15 -0
  32. package/dist/props-validation-BMR1qNiy.d.ts +15 -0
  33. package/dist/schema-C90zXlqp.d.ts +8012 -0
  34. package/dist/schema-keglUDw0.d.cts +8012 -0
  35. package/dist/types/index.cjs +64 -0
  36. package/dist/types/index.d.cts +175 -0
  37. package/dist/types/index.d.ts +175 -0
  38. package/dist/types/index.js +2 -0
  39. package/dist/utility-CXEG5391.d.cts +17265 -0
  40. package/dist/utility-CXEG5391.d.ts +17265 -0
  41. package/dist/utils/schema-conversion.cjs +236 -0
  42. package/dist/utils/schema-conversion.d.cts +26 -0
  43. package/dist/utils/schema-conversion.d.ts +26 -0
  44. package/dist/utils/schema-conversion.js +1 -0
  45. package/dist/validation/index.cjs +3521 -0
  46. package/dist/validation/index.d.cts +279 -0
  47. package/dist/validation/index.d.ts +279 -0
  48. package/dist/validation/index.js +2 -0
  49. package/drizzle/0000_exotic_mysterio.sql +398 -0
  50. package/drizzle/0001_greedy_the_phantom.sql +4 -0
  51. package/drizzle/0002_add_evaluation_features.sql +252 -0
  52. package/drizzle/0003_brave_micromax.sql +2 -0
  53. package/drizzle/meta/0000_snapshot.json +2519 -0
  54. package/drizzle/meta/0001_snapshot.json +2892 -0
  55. package/drizzle/meta/0002_snapshot.json +4485 -0
  56. package/drizzle/meta/_journal.json +34 -0
  57. package/package.json +133 -0
@@ -0,0 +1,2519 @@
1
+ {
2
+ "id": "ecc2e5f8-2b4e-4798-8b86-f70cc1cd4483",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.agent": {
8
+ "name": "agent",
9
+ "schema": "",
10
+ "columns": {
11
+ "tenant_id": {
12
+ "name": "tenant_id",
13
+ "type": "varchar(256)",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "id": {
18
+ "name": "id",
19
+ "type": "varchar(256)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "project_id": {
24
+ "name": "project_id",
25
+ "type": "varchar(256)",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "name": {
30
+ "name": "name",
31
+ "type": "varchar(256)",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "description": {
36
+ "name": "description",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "default_sub_agent_id": {
42
+ "name": "default_sub_agent_id",
43
+ "type": "varchar(256)",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "context_config_id": {
48
+ "name": "context_config_id",
49
+ "type": "varchar(256)",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "models": {
54
+ "name": "models",
55
+ "type": "jsonb",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "status_updates": {
60
+ "name": "status_updates",
61
+ "type": "jsonb",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "prompt": {
66
+ "name": "prompt",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "stop_when": {
72
+ "name": "stop_when",
73
+ "type": "jsonb",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "now()"
90
+ }
91
+ },
92
+ "indexes": {},
93
+ "foreignKeys": {
94
+ "agent_project_fk": {
95
+ "name": "agent_project_fk",
96
+ "tableFrom": "agent",
97
+ "tableTo": "projects",
98
+ "columnsFrom": ["tenant_id", "project_id"],
99
+ "columnsTo": ["tenant_id", "id"],
100
+ "onDelete": "cascade",
101
+ "onUpdate": "no action"
102
+ }
103
+ },
104
+ "compositePrimaryKeys": {
105
+ "agent_tenant_id_project_id_id_pk": {
106
+ "name": "agent_tenant_id_project_id_id_pk",
107
+ "columns": ["tenant_id", "project_id", "id"]
108
+ }
109
+ },
110
+ "uniqueConstraints": {},
111
+ "policies": {},
112
+ "checkConstraints": {},
113
+ "isRLSEnabled": false
114
+ },
115
+ "public.api_keys": {
116
+ "name": "api_keys",
117
+ "schema": "",
118
+ "columns": {
119
+ "tenant_id": {
120
+ "name": "tenant_id",
121
+ "type": "varchar(256)",
122
+ "primaryKey": false,
123
+ "notNull": true
124
+ },
125
+ "id": {
126
+ "name": "id",
127
+ "type": "varchar(256)",
128
+ "primaryKey": false,
129
+ "notNull": true
130
+ },
131
+ "project_id": {
132
+ "name": "project_id",
133
+ "type": "varchar(256)",
134
+ "primaryKey": false,
135
+ "notNull": true
136
+ },
137
+ "agent_id": {
138
+ "name": "agent_id",
139
+ "type": "varchar(256)",
140
+ "primaryKey": false,
141
+ "notNull": true
142
+ },
143
+ "public_id": {
144
+ "name": "public_id",
145
+ "type": "varchar(256)",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "key_hash": {
150
+ "name": "key_hash",
151
+ "type": "varchar(256)",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "key_prefix": {
156
+ "name": "key_prefix",
157
+ "type": "varchar(256)",
158
+ "primaryKey": false,
159
+ "notNull": true
160
+ },
161
+ "name": {
162
+ "name": "name",
163
+ "type": "varchar(256)",
164
+ "primaryKey": false,
165
+ "notNull": false
166
+ },
167
+ "last_used_at": {
168
+ "name": "last_used_at",
169
+ "type": "timestamp",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "expires_at": {
174
+ "name": "expires_at",
175
+ "type": "timestamp",
176
+ "primaryKey": false,
177
+ "notNull": false
178
+ },
179
+ "created_at": {
180
+ "name": "created_at",
181
+ "type": "timestamp",
182
+ "primaryKey": false,
183
+ "notNull": true,
184
+ "default": "now()"
185
+ },
186
+ "updated_at": {
187
+ "name": "updated_at",
188
+ "type": "timestamp",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "default": "now()"
192
+ }
193
+ },
194
+ "indexes": {
195
+ "api_keys_tenant_agent_idx": {
196
+ "name": "api_keys_tenant_agent_idx",
197
+ "columns": [
198
+ {
199
+ "expression": "tenant_id",
200
+ "isExpression": false,
201
+ "asc": true,
202
+ "nulls": "last"
203
+ },
204
+ {
205
+ "expression": "agent_id",
206
+ "isExpression": false,
207
+ "asc": true,
208
+ "nulls": "last"
209
+ }
210
+ ],
211
+ "isUnique": false,
212
+ "concurrently": false,
213
+ "method": "btree",
214
+ "with": {}
215
+ },
216
+ "api_keys_prefix_idx": {
217
+ "name": "api_keys_prefix_idx",
218
+ "columns": [
219
+ {
220
+ "expression": "key_prefix",
221
+ "isExpression": false,
222
+ "asc": true,
223
+ "nulls": "last"
224
+ }
225
+ ],
226
+ "isUnique": false,
227
+ "concurrently": false,
228
+ "method": "btree",
229
+ "with": {}
230
+ },
231
+ "api_keys_public_id_idx": {
232
+ "name": "api_keys_public_id_idx",
233
+ "columns": [
234
+ {
235
+ "expression": "public_id",
236
+ "isExpression": false,
237
+ "asc": true,
238
+ "nulls": "last"
239
+ }
240
+ ],
241
+ "isUnique": false,
242
+ "concurrently": false,
243
+ "method": "btree",
244
+ "with": {}
245
+ }
246
+ },
247
+ "foreignKeys": {
248
+ "api_keys_project_fk": {
249
+ "name": "api_keys_project_fk",
250
+ "tableFrom": "api_keys",
251
+ "tableTo": "projects",
252
+ "columnsFrom": ["tenant_id", "project_id"],
253
+ "columnsTo": ["tenant_id", "id"],
254
+ "onDelete": "cascade",
255
+ "onUpdate": "no action"
256
+ },
257
+ "api_keys_agent_fk": {
258
+ "name": "api_keys_agent_fk",
259
+ "tableFrom": "api_keys",
260
+ "tableTo": "agent",
261
+ "columnsFrom": ["tenant_id", "project_id", "agent_id"],
262
+ "columnsTo": ["tenant_id", "project_id", "id"],
263
+ "onDelete": "cascade",
264
+ "onUpdate": "no action"
265
+ }
266
+ },
267
+ "compositePrimaryKeys": {},
268
+ "uniqueConstraints": {
269
+ "api_keys_public_id_unique": {
270
+ "name": "api_keys_public_id_unique",
271
+ "nullsNotDistinct": false,
272
+ "columns": ["public_id"]
273
+ }
274
+ },
275
+ "policies": {},
276
+ "checkConstraints": {},
277
+ "isRLSEnabled": false
278
+ },
279
+ "public.artifact_components": {
280
+ "name": "artifact_components",
281
+ "schema": "",
282
+ "columns": {
283
+ "tenant_id": {
284
+ "name": "tenant_id",
285
+ "type": "varchar(256)",
286
+ "primaryKey": false,
287
+ "notNull": true
288
+ },
289
+ "id": {
290
+ "name": "id",
291
+ "type": "varchar(256)",
292
+ "primaryKey": false,
293
+ "notNull": true
294
+ },
295
+ "project_id": {
296
+ "name": "project_id",
297
+ "type": "varchar(256)",
298
+ "primaryKey": false,
299
+ "notNull": true
300
+ },
301
+ "name": {
302
+ "name": "name",
303
+ "type": "varchar(256)",
304
+ "primaryKey": false,
305
+ "notNull": true
306
+ },
307
+ "description": {
308
+ "name": "description",
309
+ "type": "text",
310
+ "primaryKey": false,
311
+ "notNull": true
312
+ },
313
+ "props": {
314
+ "name": "props",
315
+ "type": "jsonb",
316
+ "primaryKey": false,
317
+ "notNull": false
318
+ },
319
+ "created_at": {
320
+ "name": "created_at",
321
+ "type": "timestamp",
322
+ "primaryKey": false,
323
+ "notNull": true,
324
+ "default": "now()"
325
+ },
326
+ "updated_at": {
327
+ "name": "updated_at",
328
+ "type": "timestamp",
329
+ "primaryKey": false,
330
+ "notNull": true,
331
+ "default": "now()"
332
+ }
333
+ },
334
+ "indexes": {},
335
+ "foreignKeys": {
336
+ "artifact_components_project_fk": {
337
+ "name": "artifact_components_project_fk",
338
+ "tableFrom": "artifact_components",
339
+ "tableTo": "projects",
340
+ "columnsFrom": ["tenant_id", "project_id"],
341
+ "columnsTo": ["tenant_id", "id"],
342
+ "onDelete": "cascade",
343
+ "onUpdate": "no action"
344
+ }
345
+ },
346
+ "compositePrimaryKeys": {
347
+ "artifact_components_tenant_id_project_id_id_pk": {
348
+ "name": "artifact_components_tenant_id_project_id_id_pk",
349
+ "columns": ["tenant_id", "project_id", "id"]
350
+ }
351
+ },
352
+ "uniqueConstraints": {},
353
+ "policies": {},
354
+ "checkConstraints": {},
355
+ "isRLSEnabled": false
356
+ },
357
+ "public.context_cache": {
358
+ "name": "context_cache",
359
+ "schema": "",
360
+ "columns": {
361
+ "tenant_id": {
362
+ "name": "tenant_id",
363
+ "type": "varchar(256)",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "id": {
368
+ "name": "id",
369
+ "type": "varchar(256)",
370
+ "primaryKey": false,
371
+ "notNull": true
372
+ },
373
+ "project_id": {
374
+ "name": "project_id",
375
+ "type": "varchar(256)",
376
+ "primaryKey": false,
377
+ "notNull": true
378
+ },
379
+ "conversation_id": {
380
+ "name": "conversation_id",
381
+ "type": "varchar(256)",
382
+ "primaryKey": false,
383
+ "notNull": true
384
+ },
385
+ "context_config_id": {
386
+ "name": "context_config_id",
387
+ "type": "varchar(256)",
388
+ "primaryKey": false,
389
+ "notNull": true
390
+ },
391
+ "context_variable_key": {
392
+ "name": "context_variable_key",
393
+ "type": "varchar(256)",
394
+ "primaryKey": false,
395
+ "notNull": true
396
+ },
397
+ "value": {
398
+ "name": "value",
399
+ "type": "jsonb",
400
+ "primaryKey": false,
401
+ "notNull": true
402
+ },
403
+ "request_hash": {
404
+ "name": "request_hash",
405
+ "type": "varchar(256)",
406
+ "primaryKey": false,
407
+ "notNull": false
408
+ },
409
+ "fetched_at": {
410
+ "name": "fetched_at",
411
+ "type": "timestamp",
412
+ "primaryKey": false,
413
+ "notNull": true,
414
+ "default": "now()"
415
+ },
416
+ "fetch_source": {
417
+ "name": "fetch_source",
418
+ "type": "varchar(256)",
419
+ "primaryKey": false,
420
+ "notNull": false
421
+ },
422
+ "fetch_duration_ms": {
423
+ "name": "fetch_duration_ms",
424
+ "type": "integer",
425
+ "primaryKey": false,
426
+ "notNull": false
427
+ },
428
+ "created_at": {
429
+ "name": "created_at",
430
+ "type": "timestamp",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "default": "now()"
434
+ },
435
+ "updated_at": {
436
+ "name": "updated_at",
437
+ "type": "timestamp",
438
+ "primaryKey": false,
439
+ "notNull": true,
440
+ "default": "now()"
441
+ }
442
+ },
443
+ "indexes": {
444
+ "context_cache_lookup_idx": {
445
+ "name": "context_cache_lookup_idx",
446
+ "columns": [
447
+ {
448
+ "expression": "conversation_id",
449
+ "isExpression": false,
450
+ "asc": true,
451
+ "nulls": "last"
452
+ },
453
+ {
454
+ "expression": "context_config_id",
455
+ "isExpression": false,
456
+ "asc": true,
457
+ "nulls": "last"
458
+ },
459
+ {
460
+ "expression": "context_variable_key",
461
+ "isExpression": false,
462
+ "asc": true,
463
+ "nulls": "last"
464
+ }
465
+ ],
466
+ "isUnique": false,
467
+ "concurrently": false,
468
+ "method": "btree",
469
+ "with": {}
470
+ }
471
+ },
472
+ "foreignKeys": {
473
+ "context_cache_project_fk": {
474
+ "name": "context_cache_project_fk",
475
+ "tableFrom": "context_cache",
476
+ "tableTo": "projects",
477
+ "columnsFrom": ["tenant_id", "project_id"],
478
+ "columnsTo": ["tenant_id", "id"],
479
+ "onDelete": "cascade",
480
+ "onUpdate": "no action"
481
+ }
482
+ },
483
+ "compositePrimaryKeys": {
484
+ "context_cache_tenant_id_project_id_id_pk": {
485
+ "name": "context_cache_tenant_id_project_id_id_pk",
486
+ "columns": ["tenant_id", "project_id", "id"]
487
+ }
488
+ },
489
+ "uniqueConstraints": {},
490
+ "policies": {},
491
+ "checkConstraints": {},
492
+ "isRLSEnabled": false
493
+ },
494
+ "public.context_configs": {
495
+ "name": "context_configs",
496
+ "schema": "",
497
+ "columns": {
498
+ "tenant_id": {
499
+ "name": "tenant_id",
500
+ "type": "varchar(256)",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "id": {
505
+ "name": "id",
506
+ "type": "varchar(256)",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ },
510
+ "project_id": {
511
+ "name": "project_id",
512
+ "type": "varchar(256)",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "agent_id": {
517
+ "name": "agent_id",
518
+ "type": "varchar(256)",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "headers_schema": {
523
+ "name": "headers_schema",
524
+ "type": "jsonb",
525
+ "primaryKey": false,
526
+ "notNull": false
527
+ },
528
+ "context_variables": {
529
+ "name": "context_variables",
530
+ "type": "jsonb",
531
+ "primaryKey": false,
532
+ "notNull": false
533
+ },
534
+ "created_at": {
535
+ "name": "created_at",
536
+ "type": "timestamp",
537
+ "primaryKey": false,
538
+ "notNull": true,
539
+ "default": "now()"
540
+ },
541
+ "updated_at": {
542
+ "name": "updated_at",
543
+ "type": "timestamp",
544
+ "primaryKey": false,
545
+ "notNull": true,
546
+ "default": "now()"
547
+ }
548
+ },
549
+ "indexes": {},
550
+ "foreignKeys": {
551
+ "context_configs_agent_fk": {
552
+ "name": "context_configs_agent_fk",
553
+ "tableFrom": "context_configs",
554
+ "tableTo": "agent",
555
+ "columnsFrom": ["tenant_id", "project_id", "agent_id"],
556
+ "columnsTo": ["tenant_id", "project_id", "id"],
557
+ "onDelete": "cascade",
558
+ "onUpdate": "no action"
559
+ }
560
+ },
561
+ "compositePrimaryKeys": {
562
+ "context_configs_tenant_id_project_id_agent_id_id_pk": {
563
+ "name": "context_configs_tenant_id_project_id_agent_id_id_pk",
564
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
565
+ }
566
+ },
567
+ "uniqueConstraints": {},
568
+ "policies": {},
569
+ "checkConstraints": {},
570
+ "isRLSEnabled": false
571
+ },
572
+ "public.conversations": {
573
+ "name": "conversations",
574
+ "schema": "",
575
+ "columns": {
576
+ "tenant_id": {
577
+ "name": "tenant_id",
578
+ "type": "varchar(256)",
579
+ "primaryKey": false,
580
+ "notNull": true
581
+ },
582
+ "id": {
583
+ "name": "id",
584
+ "type": "varchar(256)",
585
+ "primaryKey": false,
586
+ "notNull": true
587
+ },
588
+ "project_id": {
589
+ "name": "project_id",
590
+ "type": "varchar(256)",
591
+ "primaryKey": false,
592
+ "notNull": true
593
+ },
594
+ "user_id": {
595
+ "name": "user_id",
596
+ "type": "varchar(256)",
597
+ "primaryKey": false,
598
+ "notNull": false
599
+ },
600
+ "active_sub_agent_id": {
601
+ "name": "active_sub_agent_id",
602
+ "type": "varchar(256)",
603
+ "primaryKey": false,
604
+ "notNull": true
605
+ },
606
+ "title": {
607
+ "name": "title",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": false
611
+ },
612
+ "last_context_resolution": {
613
+ "name": "last_context_resolution",
614
+ "type": "timestamp",
615
+ "primaryKey": false,
616
+ "notNull": false
617
+ },
618
+ "metadata": {
619
+ "name": "metadata",
620
+ "type": "jsonb",
621
+ "primaryKey": false,
622
+ "notNull": false
623
+ },
624
+ "created_at": {
625
+ "name": "created_at",
626
+ "type": "timestamp",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "default": "now()"
630
+ },
631
+ "updated_at": {
632
+ "name": "updated_at",
633
+ "type": "timestamp",
634
+ "primaryKey": false,
635
+ "notNull": true,
636
+ "default": "now()"
637
+ }
638
+ },
639
+ "indexes": {},
640
+ "foreignKeys": {
641
+ "conversations_project_fk": {
642
+ "name": "conversations_project_fk",
643
+ "tableFrom": "conversations",
644
+ "tableTo": "projects",
645
+ "columnsFrom": ["tenant_id", "project_id"],
646
+ "columnsTo": ["tenant_id", "id"],
647
+ "onDelete": "cascade",
648
+ "onUpdate": "no action"
649
+ }
650
+ },
651
+ "compositePrimaryKeys": {
652
+ "conversations_tenant_id_project_id_id_pk": {
653
+ "name": "conversations_tenant_id_project_id_id_pk",
654
+ "columns": ["tenant_id", "project_id", "id"]
655
+ }
656
+ },
657
+ "uniqueConstraints": {},
658
+ "policies": {},
659
+ "checkConstraints": {},
660
+ "isRLSEnabled": false
661
+ },
662
+ "public.credential_references": {
663
+ "name": "credential_references",
664
+ "schema": "",
665
+ "columns": {
666
+ "tenant_id": {
667
+ "name": "tenant_id",
668
+ "type": "varchar(256)",
669
+ "primaryKey": false,
670
+ "notNull": true
671
+ },
672
+ "id": {
673
+ "name": "id",
674
+ "type": "varchar(256)",
675
+ "primaryKey": false,
676
+ "notNull": true
677
+ },
678
+ "project_id": {
679
+ "name": "project_id",
680
+ "type": "varchar(256)",
681
+ "primaryKey": false,
682
+ "notNull": true
683
+ },
684
+ "name": {
685
+ "name": "name",
686
+ "type": "varchar(256)",
687
+ "primaryKey": false,
688
+ "notNull": true
689
+ },
690
+ "type": {
691
+ "name": "type",
692
+ "type": "varchar(256)",
693
+ "primaryKey": false,
694
+ "notNull": true
695
+ },
696
+ "credential_store_id": {
697
+ "name": "credential_store_id",
698
+ "type": "varchar(256)",
699
+ "primaryKey": false,
700
+ "notNull": true
701
+ },
702
+ "retrieval_params": {
703
+ "name": "retrieval_params",
704
+ "type": "jsonb",
705
+ "primaryKey": false,
706
+ "notNull": false
707
+ },
708
+ "created_at": {
709
+ "name": "created_at",
710
+ "type": "timestamp",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "default": "now()"
714
+ },
715
+ "updated_at": {
716
+ "name": "updated_at",
717
+ "type": "timestamp",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "default": "now()"
721
+ }
722
+ },
723
+ "indexes": {},
724
+ "foreignKeys": {
725
+ "credential_references_project_fk": {
726
+ "name": "credential_references_project_fk",
727
+ "tableFrom": "credential_references",
728
+ "tableTo": "projects",
729
+ "columnsFrom": ["tenant_id", "project_id"],
730
+ "columnsTo": ["tenant_id", "id"],
731
+ "onDelete": "cascade",
732
+ "onUpdate": "no action"
733
+ }
734
+ },
735
+ "compositePrimaryKeys": {
736
+ "credential_references_tenant_id_project_id_id_pk": {
737
+ "name": "credential_references_tenant_id_project_id_id_pk",
738
+ "columns": ["tenant_id", "project_id", "id"]
739
+ }
740
+ },
741
+ "uniqueConstraints": {},
742
+ "policies": {},
743
+ "checkConstraints": {},
744
+ "isRLSEnabled": false
745
+ },
746
+ "public.data_components": {
747
+ "name": "data_components",
748
+ "schema": "",
749
+ "columns": {
750
+ "tenant_id": {
751
+ "name": "tenant_id",
752
+ "type": "varchar(256)",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ },
756
+ "id": {
757
+ "name": "id",
758
+ "type": "varchar(256)",
759
+ "primaryKey": false,
760
+ "notNull": true
761
+ },
762
+ "project_id": {
763
+ "name": "project_id",
764
+ "type": "varchar(256)",
765
+ "primaryKey": false,
766
+ "notNull": true
767
+ },
768
+ "name": {
769
+ "name": "name",
770
+ "type": "varchar(256)",
771
+ "primaryKey": false,
772
+ "notNull": true
773
+ },
774
+ "description": {
775
+ "name": "description",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true
779
+ },
780
+ "props": {
781
+ "name": "props",
782
+ "type": "jsonb",
783
+ "primaryKey": false,
784
+ "notNull": false
785
+ },
786
+ "render": {
787
+ "name": "render",
788
+ "type": "jsonb",
789
+ "primaryKey": false,
790
+ "notNull": false
791
+ },
792
+ "created_at": {
793
+ "name": "created_at",
794
+ "type": "timestamp",
795
+ "primaryKey": false,
796
+ "notNull": true,
797
+ "default": "now()"
798
+ },
799
+ "updated_at": {
800
+ "name": "updated_at",
801
+ "type": "timestamp",
802
+ "primaryKey": false,
803
+ "notNull": true,
804
+ "default": "now()"
805
+ }
806
+ },
807
+ "indexes": {},
808
+ "foreignKeys": {
809
+ "data_components_project_fk": {
810
+ "name": "data_components_project_fk",
811
+ "tableFrom": "data_components",
812
+ "tableTo": "projects",
813
+ "columnsFrom": ["tenant_id", "project_id"],
814
+ "columnsTo": ["tenant_id", "id"],
815
+ "onDelete": "cascade",
816
+ "onUpdate": "no action"
817
+ }
818
+ },
819
+ "compositePrimaryKeys": {
820
+ "data_components_tenant_id_project_id_id_pk": {
821
+ "name": "data_components_tenant_id_project_id_id_pk",
822
+ "columns": ["tenant_id", "project_id", "id"]
823
+ }
824
+ },
825
+ "uniqueConstraints": {},
826
+ "policies": {},
827
+ "checkConstraints": {},
828
+ "isRLSEnabled": false
829
+ },
830
+ "public.external_agents": {
831
+ "name": "external_agents",
832
+ "schema": "",
833
+ "columns": {
834
+ "tenant_id": {
835
+ "name": "tenant_id",
836
+ "type": "varchar(256)",
837
+ "primaryKey": false,
838
+ "notNull": true
839
+ },
840
+ "id": {
841
+ "name": "id",
842
+ "type": "varchar(256)",
843
+ "primaryKey": false,
844
+ "notNull": true
845
+ },
846
+ "project_id": {
847
+ "name": "project_id",
848
+ "type": "varchar(256)",
849
+ "primaryKey": false,
850
+ "notNull": true
851
+ },
852
+ "name": {
853
+ "name": "name",
854
+ "type": "varchar(256)",
855
+ "primaryKey": false,
856
+ "notNull": true
857
+ },
858
+ "description": {
859
+ "name": "description",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true
863
+ },
864
+ "base_url": {
865
+ "name": "base_url",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": true
869
+ },
870
+ "credential_reference_id": {
871
+ "name": "credential_reference_id",
872
+ "type": "varchar(256)",
873
+ "primaryKey": false,
874
+ "notNull": false
875
+ },
876
+ "created_at": {
877
+ "name": "created_at",
878
+ "type": "timestamp",
879
+ "primaryKey": false,
880
+ "notNull": true,
881
+ "default": "now()"
882
+ },
883
+ "updated_at": {
884
+ "name": "updated_at",
885
+ "type": "timestamp",
886
+ "primaryKey": false,
887
+ "notNull": true,
888
+ "default": "now()"
889
+ }
890
+ },
891
+ "indexes": {},
892
+ "foreignKeys": {
893
+ "external_agents_project_fk": {
894
+ "name": "external_agents_project_fk",
895
+ "tableFrom": "external_agents",
896
+ "tableTo": "projects",
897
+ "columnsFrom": ["tenant_id", "project_id"],
898
+ "columnsTo": ["tenant_id", "id"],
899
+ "onDelete": "cascade",
900
+ "onUpdate": "no action"
901
+ },
902
+ "external_agents_credential_reference_fk": {
903
+ "name": "external_agents_credential_reference_fk",
904
+ "tableFrom": "external_agents",
905
+ "tableTo": "credential_references",
906
+ "columnsFrom": ["tenant_id", "project_id", "credential_reference_id"],
907
+ "columnsTo": ["tenant_id", "project_id", "id"],
908
+ "onDelete": "cascade",
909
+ "onUpdate": "no action"
910
+ }
911
+ },
912
+ "compositePrimaryKeys": {
913
+ "external_agents_tenant_id_project_id_id_pk": {
914
+ "name": "external_agents_tenant_id_project_id_id_pk",
915
+ "columns": ["tenant_id", "project_id", "id"]
916
+ }
917
+ },
918
+ "uniqueConstraints": {},
919
+ "policies": {},
920
+ "checkConstraints": {},
921
+ "isRLSEnabled": false
922
+ },
923
+ "public.function_tools": {
924
+ "name": "function_tools",
925
+ "schema": "",
926
+ "columns": {
927
+ "tenant_id": {
928
+ "name": "tenant_id",
929
+ "type": "varchar(256)",
930
+ "primaryKey": false,
931
+ "notNull": true
932
+ },
933
+ "id": {
934
+ "name": "id",
935
+ "type": "varchar(256)",
936
+ "primaryKey": false,
937
+ "notNull": true
938
+ },
939
+ "project_id": {
940
+ "name": "project_id",
941
+ "type": "varchar(256)",
942
+ "primaryKey": false,
943
+ "notNull": true
944
+ },
945
+ "agent_id": {
946
+ "name": "agent_id",
947
+ "type": "varchar(256)",
948
+ "primaryKey": false,
949
+ "notNull": true
950
+ },
951
+ "name": {
952
+ "name": "name",
953
+ "type": "varchar(256)",
954
+ "primaryKey": false,
955
+ "notNull": true
956
+ },
957
+ "description": {
958
+ "name": "description",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": false
962
+ },
963
+ "function_id": {
964
+ "name": "function_id",
965
+ "type": "varchar(256)",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "created_at": {
970
+ "name": "created_at",
971
+ "type": "timestamp",
972
+ "primaryKey": false,
973
+ "notNull": true,
974
+ "default": "now()"
975
+ },
976
+ "updated_at": {
977
+ "name": "updated_at",
978
+ "type": "timestamp",
979
+ "primaryKey": false,
980
+ "notNull": true,
981
+ "default": "now()"
982
+ }
983
+ },
984
+ "indexes": {},
985
+ "foreignKeys": {
986
+ "function_tools_agent_fk": {
987
+ "name": "function_tools_agent_fk",
988
+ "tableFrom": "function_tools",
989
+ "tableTo": "agent",
990
+ "columnsFrom": ["tenant_id", "project_id", "agent_id"],
991
+ "columnsTo": ["tenant_id", "project_id", "id"],
992
+ "onDelete": "cascade",
993
+ "onUpdate": "no action"
994
+ },
995
+ "function_tools_function_fk": {
996
+ "name": "function_tools_function_fk",
997
+ "tableFrom": "function_tools",
998
+ "tableTo": "functions",
999
+ "columnsFrom": ["tenant_id", "project_id", "function_id"],
1000
+ "columnsTo": ["tenant_id", "project_id", "id"],
1001
+ "onDelete": "cascade",
1002
+ "onUpdate": "no action"
1003
+ }
1004
+ },
1005
+ "compositePrimaryKeys": {
1006
+ "function_tools_tenant_id_project_id_agent_id_id_pk": {
1007
+ "name": "function_tools_tenant_id_project_id_agent_id_id_pk",
1008
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
1009
+ }
1010
+ },
1011
+ "uniqueConstraints": {},
1012
+ "policies": {},
1013
+ "checkConstraints": {},
1014
+ "isRLSEnabled": false
1015
+ },
1016
+ "public.functions": {
1017
+ "name": "functions",
1018
+ "schema": "",
1019
+ "columns": {
1020
+ "tenant_id": {
1021
+ "name": "tenant_id",
1022
+ "type": "varchar(256)",
1023
+ "primaryKey": false,
1024
+ "notNull": true
1025
+ },
1026
+ "id": {
1027
+ "name": "id",
1028
+ "type": "varchar(256)",
1029
+ "primaryKey": false,
1030
+ "notNull": true
1031
+ },
1032
+ "project_id": {
1033
+ "name": "project_id",
1034
+ "type": "varchar(256)",
1035
+ "primaryKey": false,
1036
+ "notNull": true
1037
+ },
1038
+ "input_schema": {
1039
+ "name": "input_schema",
1040
+ "type": "jsonb",
1041
+ "primaryKey": false,
1042
+ "notNull": false
1043
+ },
1044
+ "execute_code": {
1045
+ "name": "execute_code",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": true
1049
+ },
1050
+ "dependencies": {
1051
+ "name": "dependencies",
1052
+ "type": "jsonb",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "created_at": {
1057
+ "name": "created_at",
1058
+ "type": "timestamp",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "default": "now()"
1062
+ },
1063
+ "updated_at": {
1064
+ "name": "updated_at",
1065
+ "type": "timestamp",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "default": "now()"
1069
+ }
1070
+ },
1071
+ "indexes": {},
1072
+ "foreignKeys": {
1073
+ "functions_project_fk": {
1074
+ "name": "functions_project_fk",
1075
+ "tableFrom": "functions",
1076
+ "tableTo": "projects",
1077
+ "columnsFrom": ["tenant_id", "project_id"],
1078
+ "columnsTo": ["tenant_id", "id"],
1079
+ "onDelete": "cascade",
1080
+ "onUpdate": "no action"
1081
+ }
1082
+ },
1083
+ "compositePrimaryKeys": {
1084
+ "functions_tenant_id_project_id_id_pk": {
1085
+ "name": "functions_tenant_id_project_id_id_pk",
1086
+ "columns": ["tenant_id", "project_id", "id"]
1087
+ }
1088
+ },
1089
+ "uniqueConstraints": {},
1090
+ "policies": {},
1091
+ "checkConstraints": {},
1092
+ "isRLSEnabled": false
1093
+ },
1094
+ "public.ledger_artifacts": {
1095
+ "name": "ledger_artifacts",
1096
+ "schema": "",
1097
+ "columns": {
1098
+ "tenant_id": {
1099
+ "name": "tenant_id",
1100
+ "type": "varchar(256)",
1101
+ "primaryKey": false,
1102
+ "notNull": true
1103
+ },
1104
+ "id": {
1105
+ "name": "id",
1106
+ "type": "varchar(256)",
1107
+ "primaryKey": false,
1108
+ "notNull": true
1109
+ },
1110
+ "project_id": {
1111
+ "name": "project_id",
1112
+ "type": "varchar(256)",
1113
+ "primaryKey": false,
1114
+ "notNull": true
1115
+ },
1116
+ "task_id": {
1117
+ "name": "task_id",
1118
+ "type": "varchar(256)",
1119
+ "primaryKey": false,
1120
+ "notNull": true
1121
+ },
1122
+ "tool_call_id": {
1123
+ "name": "tool_call_id",
1124
+ "type": "varchar(256)",
1125
+ "primaryKey": false,
1126
+ "notNull": false
1127
+ },
1128
+ "context_id": {
1129
+ "name": "context_id",
1130
+ "type": "varchar(256)",
1131
+ "primaryKey": false,
1132
+ "notNull": true
1133
+ },
1134
+ "type": {
1135
+ "name": "type",
1136
+ "type": "varchar(256)",
1137
+ "primaryKey": false,
1138
+ "notNull": true,
1139
+ "default": "'source'"
1140
+ },
1141
+ "name": {
1142
+ "name": "name",
1143
+ "type": "varchar(256)",
1144
+ "primaryKey": false,
1145
+ "notNull": false
1146
+ },
1147
+ "description": {
1148
+ "name": "description",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": false
1152
+ },
1153
+ "parts": {
1154
+ "name": "parts",
1155
+ "type": "jsonb",
1156
+ "primaryKey": false,
1157
+ "notNull": false
1158
+ },
1159
+ "metadata": {
1160
+ "name": "metadata",
1161
+ "type": "jsonb",
1162
+ "primaryKey": false,
1163
+ "notNull": false
1164
+ },
1165
+ "summary": {
1166
+ "name": "summary",
1167
+ "type": "text",
1168
+ "primaryKey": false,
1169
+ "notNull": false
1170
+ },
1171
+ "mime": {
1172
+ "name": "mime",
1173
+ "type": "jsonb",
1174
+ "primaryKey": false,
1175
+ "notNull": false
1176
+ },
1177
+ "visibility": {
1178
+ "name": "visibility",
1179
+ "type": "varchar(256)",
1180
+ "primaryKey": false,
1181
+ "notNull": false,
1182
+ "default": "'context'"
1183
+ },
1184
+ "allowed_agents": {
1185
+ "name": "allowed_agents",
1186
+ "type": "jsonb",
1187
+ "primaryKey": false,
1188
+ "notNull": false
1189
+ },
1190
+ "derived_from": {
1191
+ "name": "derived_from",
1192
+ "type": "varchar(256)",
1193
+ "primaryKey": false,
1194
+ "notNull": false
1195
+ },
1196
+ "created_at": {
1197
+ "name": "created_at",
1198
+ "type": "timestamp",
1199
+ "primaryKey": false,
1200
+ "notNull": true,
1201
+ "default": "now()"
1202
+ },
1203
+ "updated_at": {
1204
+ "name": "updated_at",
1205
+ "type": "timestamp",
1206
+ "primaryKey": false,
1207
+ "notNull": true,
1208
+ "default": "now()"
1209
+ }
1210
+ },
1211
+ "indexes": {
1212
+ "ledger_artifacts_task_id_idx": {
1213
+ "name": "ledger_artifacts_task_id_idx",
1214
+ "columns": [
1215
+ {
1216
+ "expression": "task_id",
1217
+ "isExpression": false,
1218
+ "asc": true,
1219
+ "nulls": "last"
1220
+ }
1221
+ ],
1222
+ "isUnique": false,
1223
+ "concurrently": false,
1224
+ "method": "btree",
1225
+ "with": {}
1226
+ },
1227
+ "ledger_artifacts_tool_call_id_idx": {
1228
+ "name": "ledger_artifacts_tool_call_id_idx",
1229
+ "columns": [
1230
+ {
1231
+ "expression": "tool_call_id",
1232
+ "isExpression": false,
1233
+ "asc": true,
1234
+ "nulls": "last"
1235
+ }
1236
+ ],
1237
+ "isUnique": false,
1238
+ "concurrently": false,
1239
+ "method": "btree",
1240
+ "with": {}
1241
+ },
1242
+ "ledger_artifacts_context_id_idx": {
1243
+ "name": "ledger_artifacts_context_id_idx",
1244
+ "columns": [
1245
+ {
1246
+ "expression": "context_id",
1247
+ "isExpression": false,
1248
+ "asc": true,
1249
+ "nulls": "last"
1250
+ }
1251
+ ],
1252
+ "isUnique": false,
1253
+ "concurrently": false,
1254
+ "method": "btree",
1255
+ "with": {}
1256
+ }
1257
+ },
1258
+ "foreignKeys": {
1259
+ "ledger_artifacts_project_fk": {
1260
+ "name": "ledger_artifacts_project_fk",
1261
+ "tableFrom": "ledger_artifacts",
1262
+ "tableTo": "projects",
1263
+ "columnsFrom": ["tenant_id", "project_id"],
1264
+ "columnsTo": ["tenant_id", "id"],
1265
+ "onDelete": "cascade",
1266
+ "onUpdate": "no action"
1267
+ }
1268
+ },
1269
+ "compositePrimaryKeys": {
1270
+ "ledger_artifacts_tenant_id_project_id_id_task_id_pk": {
1271
+ "name": "ledger_artifacts_tenant_id_project_id_id_task_id_pk",
1272
+ "columns": ["tenant_id", "project_id", "id", "task_id"]
1273
+ }
1274
+ },
1275
+ "uniqueConstraints": {
1276
+ "ledger_artifacts_task_context_name_unique": {
1277
+ "name": "ledger_artifacts_task_context_name_unique",
1278
+ "nullsNotDistinct": false,
1279
+ "columns": ["task_id", "context_id", "name"]
1280
+ }
1281
+ },
1282
+ "policies": {},
1283
+ "checkConstraints": {},
1284
+ "isRLSEnabled": false
1285
+ },
1286
+ "public.messages": {
1287
+ "name": "messages",
1288
+ "schema": "",
1289
+ "columns": {
1290
+ "tenant_id": {
1291
+ "name": "tenant_id",
1292
+ "type": "varchar(256)",
1293
+ "primaryKey": false,
1294
+ "notNull": true
1295
+ },
1296
+ "id": {
1297
+ "name": "id",
1298
+ "type": "varchar(256)",
1299
+ "primaryKey": false,
1300
+ "notNull": true
1301
+ },
1302
+ "project_id": {
1303
+ "name": "project_id",
1304
+ "type": "varchar(256)",
1305
+ "primaryKey": false,
1306
+ "notNull": true
1307
+ },
1308
+ "conversation_id": {
1309
+ "name": "conversation_id",
1310
+ "type": "varchar(256)",
1311
+ "primaryKey": false,
1312
+ "notNull": true
1313
+ },
1314
+ "role": {
1315
+ "name": "role",
1316
+ "type": "varchar(256)",
1317
+ "primaryKey": false,
1318
+ "notNull": true
1319
+ },
1320
+ "from_sub_agent_id": {
1321
+ "name": "from_sub_agent_id",
1322
+ "type": "varchar(256)",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ },
1326
+ "to_sub_agent_id": {
1327
+ "name": "to_sub_agent_id",
1328
+ "type": "varchar(256)",
1329
+ "primaryKey": false,
1330
+ "notNull": false
1331
+ },
1332
+ "from_external_sub_agent_id": {
1333
+ "name": "from_external_sub_agent_id",
1334
+ "type": "varchar(256)",
1335
+ "primaryKey": false,
1336
+ "notNull": false
1337
+ },
1338
+ "to_external_sub_agent_id": {
1339
+ "name": "to_external_sub_agent_id",
1340
+ "type": "varchar(256)",
1341
+ "primaryKey": false,
1342
+ "notNull": false
1343
+ },
1344
+ "from_team_agent_id": {
1345
+ "name": "from_team_agent_id",
1346
+ "type": "varchar(256)",
1347
+ "primaryKey": false,
1348
+ "notNull": false
1349
+ },
1350
+ "to_team_agent_id": {
1351
+ "name": "to_team_agent_id",
1352
+ "type": "varchar(256)",
1353
+ "primaryKey": false,
1354
+ "notNull": false
1355
+ },
1356
+ "content": {
1357
+ "name": "content",
1358
+ "type": "jsonb",
1359
+ "primaryKey": false,
1360
+ "notNull": true
1361
+ },
1362
+ "visibility": {
1363
+ "name": "visibility",
1364
+ "type": "varchar(256)",
1365
+ "primaryKey": false,
1366
+ "notNull": true,
1367
+ "default": "'user-facing'"
1368
+ },
1369
+ "message_type": {
1370
+ "name": "message_type",
1371
+ "type": "varchar(256)",
1372
+ "primaryKey": false,
1373
+ "notNull": true,
1374
+ "default": "'chat'"
1375
+ },
1376
+ "task_id": {
1377
+ "name": "task_id",
1378
+ "type": "varchar(256)",
1379
+ "primaryKey": false,
1380
+ "notNull": false
1381
+ },
1382
+ "parent_message_id": {
1383
+ "name": "parent_message_id",
1384
+ "type": "varchar(256)",
1385
+ "primaryKey": false,
1386
+ "notNull": false
1387
+ },
1388
+ "a2a_task_id": {
1389
+ "name": "a2a_task_id",
1390
+ "type": "varchar(256)",
1391
+ "primaryKey": false,
1392
+ "notNull": false
1393
+ },
1394
+ "a2a_session_id": {
1395
+ "name": "a2a_session_id",
1396
+ "type": "varchar(256)",
1397
+ "primaryKey": false,
1398
+ "notNull": false
1399
+ },
1400
+ "metadata": {
1401
+ "name": "metadata",
1402
+ "type": "jsonb",
1403
+ "primaryKey": false,
1404
+ "notNull": false
1405
+ },
1406
+ "created_at": {
1407
+ "name": "created_at",
1408
+ "type": "timestamp",
1409
+ "primaryKey": false,
1410
+ "notNull": true,
1411
+ "default": "now()"
1412
+ },
1413
+ "updated_at": {
1414
+ "name": "updated_at",
1415
+ "type": "timestamp",
1416
+ "primaryKey": false,
1417
+ "notNull": true,
1418
+ "default": "now()"
1419
+ }
1420
+ },
1421
+ "indexes": {},
1422
+ "foreignKeys": {
1423
+ "messages_project_fk": {
1424
+ "name": "messages_project_fk",
1425
+ "tableFrom": "messages",
1426
+ "tableTo": "projects",
1427
+ "columnsFrom": ["tenant_id", "project_id"],
1428
+ "columnsTo": ["tenant_id", "id"],
1429
+ "onDelete": "cascade",
1430
+ "onUpdate": "no action"
1431
+ }
1432
+ },
1433
+ "compositePrimaryKeys": {
1434
+ "messages_tenant_id_project_id_id_pk": {
1435
+ "name": "messages_tenant_id_project_id_id_pk",
1436
+ "columns": ["tenant_id", "project_id", "id"]
1437
+ }
1438
+ },
1439
+ "uniqueConstraints": {},
1440
+ "policies": {},
1441
+ "checkConstraints": {},
1442
+ "isRLSEnabled": false
1443
+ },
1444
+ "public.projects": {
1445
+ "name": "projects",
1446
+ "schema": "",
1447
+ "columns": {
1448
+ "tenant_id": {
1449
+ "name": "tenant_id",
1450
+ "type": "varchar(256)",
1451
+ "primaryKey": false,
1452
+ "notNull": true
1453
+ },
1454
+ "id": {
1455
+ "name": "id",
1456
+ "type": "varchar(256)",
1457
+ "primaryKey": false,
1458
+ "notNull": true
1459
+ },
1460
+ "name": {
1461
+ "name": "name",
1462
+ "type": "varchar(256)",
1463
+ "primaryKey": false,
1464
+ "notNull": true
1465
+ },
1466
+ "description": {
1467
+ "name": "description",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": true
1471
+ },
1472
+ "models": {
1473
+ "name": "models",
1474
+ "type": "jsonb",
1475
+ "primaryKey": false,
1476
+ "notNull": false
1477
+ },
1478
+ "stop_when": {
1479
+ "name": "stop_when",
1480
+ "type": "jsonb",
1481
+ "primaryKey": false,
1482
+ "notNull": false
1483
+ },
1484
+ "created_at": {
1485
+ "name": "created_at",
1486
+ "type": "timestamp",
1487
+ "primaryKey": false,
1488
+ "notNull": true,
1489
+ "default": "now()"
1490
+ },
1491
+ "updated_at": {
1492
+ "name": "updated_at",
1493
+ "type": "timestamp",
1494
+ "primaryKey": false,
1495
+ "notNull": true,
1496
+ "default": "now()"
1497
+ }
1498
+ },
1499
+ "indexes": {},
1500
+ "foreignKeys": {},
1501
+ "compositePrimaryKeys": {
1502
+ "projects_tenant_id_id_pk": {
1503
+ "name": "projects_tenant_id_id_pk",
1504
+ "columns": ["tenant_id", "id"]
1505
+ }
1506
+ },
1507
+ "uniqueConstraints": {},
1508
+ "policies": {},
1509
+ "checkConstraints": {},
1510
+ "isRLSEnabled": false
1511
+ },
1512
+ "public.sub_agent_artifact_components": {
1513
+ "name": "sub_agent_artifact_components",
1514
+ "schema": "",
1515
+ "columns": {
1516
+ "tenant_id": {
1517
+ "name": "tenant_id",
1518
+ "type": "varchar(256)",
1519
+ "primaryKey": false,
1520
+ "notNull": true
1521
+ },
1522
+ "id": {
1523
+ "name": "id",
1524
+ "type": "varchar(256)",
1525
+ "primaryKey": false,
1526
+ "notNull": true
1527
+ },
1528
+ "project_id": {
1529
+ "name": "project_id",
1530
+ "type": "varchar(256)",
1531
+ "primaryKey": false,
1532
+ "notNull": true
1533
+ },
1534
+ "agent_id": {
1535
+ "name": "agent_id",
1536
+ "type": "varchar(256)",
1537
+ "primaryKey": false,
1538
+ "notNull": true
1539
+ },
1540
+ "sub_agent_id": {
1541
+ "name": "sub_agent_id",
1542
+ "type": "varchar(256)",
1543
+ "primaryKey": false,
1544
+ "notNull": true
1545
+ },
1546
+ "artifact_component_id": {
1547
+ "name": "artifact_component_id",
1548
+ "type": "varchar(256)",
1549
+ "primaryKey": false,
1550
+ "notNull": true
1551
+ },
1552
+ "created_at": {
1553
+ "name": "created_at",
1554
+ "type": "timestamp",
1555
+ "primaryKey": false,
1556
+ "notNull": true,
1557
+ "default": "now()"
1558
+ }
1559
+ },
1560
+ "indexes": {},
1561
+ "foreignKeys": {
1562
+ "sub_agent_artifact_components_sub_agent_fk": {
1563
+ "name": "sub_agent_artifact_components_sub_agent_fk",
1564
+ "tableFrom": "sub_agent_artifact_components",
1565
+ "tableTo": "sub_agents",
1566
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
1567
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
1568
+ "onDelete": "cascade",
1569
+ "onUpdate": "no action"
1570
+ },
1571
+ "sub_agent_artifact_components_artifact_component_fk": {
1572
+ "name": "sub_agent_artifact_components_artifact_component_fk",
1573
+ "tableFrom": "sub_agent_artifact_components",
1574
+ "tableTo": "artifact_components",
1575
+ "columnsFrom": ["tenant_id", "project_id", "artifact_component_id"],
1576
+ "columnsTo": ["tenant_id", "project_id", "id"],
1577
+ "onDelete": "cascade",
1578
+ "onUpdate": "no action"
1579
+ }
1580
+ },
1581
+ "compositePrimaryKeys": {
1582
+ "sub_agent_artifact_components_tenant_id_project_id_agent_id_sub_agent_id_id_pk": {
1583
+ "name": "sub_agent_artifact_components_tenant_id_project_id_agent_id_sub_agent_id_id_pk",
1584
+ "columns": ["tenant_id", "project_id", "agent_id", "sub_agent_id", "id"]
1585
+ }
1586
+ },
1587
+ "uniqueConstraints": {},
1588
+ "policies": {},
1589
+ "checkConstraints": {},
1590
+ "isRLSEnabled": false
1591
+ },
1592
+ "public.sub_agent_data_components": {
1593
+ "name": "sub_agent_data_components",
1594
+ "schema": "",
1595
+ "columns": {
1596
+ "tenant_id": {
1597
+ "name": "tenant_id",
1598
+ "type": "varchar(256)",
1599
+ "primaryKey": false,
1600
+ "notNull": true
1601
+ },
1602
+ "id": {
1603
+ "name": "id",
1604
+ "type": "varchar(256)",
1605
+ "primaryKey": false,
1606
+ "notNull": true
1607
+ },
1608
+ "project_id": {
1609
+ "name": "project_id",
1610
+ "type": "varchar(256)",
1611
+ "primaryKey": false,
1612
+ "notNull": true
1613
+ },
1614
+ "agent_id": {
1615
+ "name": "agent_id",
1616
+ "type": "varchar(256)",
1617
+ "primaryKey": false,
1618
+ "notNull": true
1619
+ },
1620
+ "sub_agent_id": {
1621
+ "name": "sub_agent_id",
1622
+ "type": "varchar(256)",
1623
+ "primaryKey": false,
1624
+ "notNull": true
1625
+ },
1626
+ "data_component_id": {
1627
+ "name": "data_component_id",
1628
+ "type": "varchar(256)",
1629
+ "primaryKey": false,
1630
+ "notNull": true
1631
+ },
1632
+ "created_at": {
1633
+ "name": "created_at",
1634
+ "type": "timestamp",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "default": "now()"
1638
+ }
1639
+ },
1640
+ "indexes": {},
1641
+ "foreignKeys": {
1642
+ "sub_agent_data_components_sub_agent_fk": {
1643
+ "name": "sub_agent_data_components_sub_agent_fk",
1644
+ "tableFrom": "sub_agent_data_components",
1645
+ "tableTo": "sub_agents",
1646
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
1647
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
1648
+ "onDelete": "cascade",
1649
+ "onUpdate": "no action"
1650
+ },
1651
+ "sub_agent_data_components_data_component_fk": {
1652
+ "name": "sub_agent_data_components_data_component_fk",
1653
+ "tableFrom": "sub_agent_data_components",
1654
+ "tableTo": "data_components",
1655
+ "columnsFrom": ["tenant_id", "project_id", "data_component_id"],
1656
+ "columnsTo": ["tenant_id", "project_id", "id"],
1657
+ "onDelete": "cascade",
1658
+ "onUpdate": "no action"
1659
+ }
1660
+ },
1661
+ "compositePrimaryKeys": {
1662
+ "sub_agent_data_components_tenant_id_project_id_id_pk": {
1663
+ "name": "sub_agent_data_components_tenant_id_project_id_id_pk",
1664
+ "columns": ["tenant_id", "project_id", "id"]
1665
+ }
1666
+ },
1667
+ "uniqueConstraints": {},
1668
+ "policies": {},
1669
+ "checkConstraints": {},
1670
+ "isRLSEnabled": false
1671
+ },
1672
+ "public.sub_agent_external_agent_relations": {
1673
+ "name": "sub_agent_external_agent_relations",
1674
+ "schema": "",
1675
+ "columns": {
1676
+ "tenant_id": {
1677
+ "name": "tenant_id",
1678
+ "type": "varchar(256)",
1679
+ "primaryKey": false,
1680
+ "notNull": true
1681
+ },
1682
+ "id": {
1683
+ "name": "id",
1684
+ "type": "varchar(256)",
1685
+ "primaryKey": false,
1686
+ "notNull": true
1687
+ },
1688
+ "project_id": {
1689
+ "name": "project_id",
1690
+ "type": "varchar(256)",
1691
+ "primaryKey": false,
1692
+ "notNull": true
1693
+ },
1694
+ "agent_id": {
1695
+ "name": "agent_id",
1696
+ "type": "varchar(256)",
1697
+ "primaryKey": false,
1698
+ "notNull": true
1699
+ },
1700
+ "sub_agent_id": {
1701
+ "name": "sub_agent_id",
1702
+ "type": "varchar(256)",
1703
+ "primaryKey": false,
1704
+ "notNull": true
1705
+ },
1706
+ "external_agent_id": {
1707
+ "name": "external_agent_id",
1708
+ "type": "varchar(256)",
1709
+ "primaryKey": false,
1710
+ "notNull": true
1711
+ },
1712
+ "headers": {
1713
+ "name": "headers",
1714
+ "type": "jsonb",
1715
+ "primaryKey": false,
1716
+ "notNull": false
1717
+ },
1718
+ "created_at": {
1719
+ "name": "created_at",
1720
+ "type": "timestamp",
1721
+ "primaryKey": false,
1722
+ "notNull": true,
1723
+ "default": "now()"
1724
+ },
1725
+ "updated_at": {
1726
+ "name": "updated_at",
1727
+ "type": "timestamp",
1728
+ "primaryKey": false,
1729
+ "notNull": true,
1730
+ "default": "now()"
1731
+ }
1732
+ },
1733
+ "indexes": {},
1734
+ "foreignKeys": {
1735
+ "sub_agent_external_agent_relations_sub_agent_fk": {
1736
+ "name": "sub_agent_external_agent_relations_sub_agent_fk",
1737
+ "tableFrom": "sub_agent_external_agent_relations",
1738
+ "tableTo": "sub_agents",
1739
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
1740
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
1741
+ "onDelete": "cascade",
1742
+ "onUpdate": "no action"
1743
+ },
1744
+ "sub_agent_external_agent_relations_external_agent_fk": {
1745
+ "name": "sub_agent_external_agent_relations_external_agent_fk",
1746
+ "tableFrom": "sub_agent_external_agent_relations",
1747
+ "tableTo": "external_agents",
1748
+ "columnsFrom": ["tenant_id", "project_id", "external_agent_id"],
1749
+ "columnsTo": ["tenant_id", "project_id", "id"],
1750
+ "onDelete": "cascade",
1751
+ "onUpdate": "no action"
1752
+ }
1753
+ },
1754
+ "compositePrimaryKeys": {
1755
+ "sub_agent_external_agent_relations_tenant_id_project_id_agent_id_id_pk": {
1756
+ "name": "sub_agent_external_agent_relations_tenant_id_project_id_agent_id_id_pk",
1757
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
1758
+ }
1759
+ },
1760
+ "uniqueConstraints": {},
1761
+ "policies": {},
1762
+ "checkConstraints": {},
1763
+ "isRLSEnabled": false
1764
+ },
1765
+ "public.sub_agent_function_tool_relations": {
1766
+ "name": "sub_agent_function_tool_relations",
1767
+ "schema": "",
1768
+ "columns": {
1769
+ "tenant_id": {
1770
+ "name": "tenant_id",
1771
+ "type": "varchar(256)",
1772
+ "primaryKey": false,
1773
+ "notNull": true
1774
+ },
1775
+ "id": {
1776
+ "name": "id",
1777
+ "type": "varchar(256)",
1778
+ "primaryKey": false,
1779
+ "notNull": true
1780
+ },
1781
+ "project_id": {
1782
+ "name": "project_id",
1783
+ "type": "varchar(256)",
1784
+ "primaryKey": false,
1785
+ "notNull": true
1786
+ },
1787
+ "agent_id": {
1788
+ "name": "agent_id",
1789
+ "type": "varchar(256)",
1790
+ "primaryKey": false,
1791
+ "notNull": true
1792
+ },
1793
+ "sub_agent_id": {
1794
+ "name": "sub_agent_id",
1795
+ "type": "varchar(256)",
1796
+ "primaryKey": false,
1797
+ "notNull": true
1798
+ },
1799
+ "function_tool_id": {
1800
+ "name": "function_tool_id",
1801
+ "type": "varchar(256)",
1802
+ "primaryKey": false,
1803
+ "notNull": true
1804
+ },
1805
+ "created_at": {
1806
+ "name": "created_at",
1807
+ "type": "timestamp",
1808
+ "primaryKey": false,
1809
+ "notNull": true,
1810
+ "default": "now()"
1811
+ },
1812
+ "updated_at": {
1813
+ "name": "updated_at",
1814
+ "type": "timestamp",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "default": "now()"
1818
+ }
1819
+ },
1820
+ "indexes": {},
1821
+ "foreignKeys": {
1822
+ "sub_agent_function_tool_relations_sub_agent_fk": {
1823
+ "name": "sub_agent_function_tool_relations_sub_agent_fk",
1824
+ "tableFrom": "sub_agent_function_tool_relations",
1825
+ "tableTo": "sub_agents",
1826
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
1827
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
1828
+ "onDelete": "cascade",
1829
+ "onUpdate": "no action"
1830
+ },
1831
+ "sub_agent_function_tool_relations_function_tool_fk": {
1832
+ "name": "sub_agent_function_tool_relations_function_tool_fk",
1833
+ "tableFrom": "sub_agent_function_tool_relations",
1834
+ "tableTo": "function_tools",
1835
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "function_tool_id"],
1836
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
1837
+ "onDelete": "cascade",
1838
+ "onUpdate": "no action"
1839
+ }
1840
+ },
1841
+ "compositePrimaryKeys": {
1842
+ "sub_agent_function_tool_relations_tenant_id_project_id_agent_id_id_pk": {
1843
+ "name": "sub_agent_function_tool_relations_tenant_id_project_id_agent_id_id_pk",
1844
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
1845
+ }
1846
+ },
1847
+ "uniqueConstraints": {},
1848
+ "policies": {},
1849
+ "checkConstraints": {},
1850
+ "isRLSEnabled": false
1851
+ },
1852
+ "public.sub_agent_relations": {
1853
+ "name": "sub_agent_relations",
1854
+ "schema": "",
1855
+ "columns": {
1856
+ "tenant_id": {
1857
+ "name": "tenant_id",
1858
+ "type": "varchar(256)",
1859
+ "primaryKey": false,
1860
+ "notNull": true
1861
+ },
1862
+ "id": {
1863
+ "name": "id",
1864
+ "type": "varchar(256)",
1865
+ "primaryKey": false,
1866
+ "notNull": true
1867
+ },
1868
+ "project_id": {
1869
+ "name": "project_id",
1870
+ "type": "varchar(256)",
1871
+ "primaryKey": false,
1872
+ "notNull": true
1873
+ },
1874
+ "agent_id": {
1875
+ "name": "agent_id",
1876
+ "type": "varchar(256)",
1877
+ "primaryKey": false,
1878
+ "notNull": true
1879
+ },
1880
+ "source_sub_agent_id": {
1881
+ "name": "source_sub_agent_id",
1882
+ "type": "varchar(256)",
1883
+ "primaryKey": false,
1884
+ "notNull": true
1885
+ },
1886
+ "target_sub_agent_id": {
1887
+ "name": "target_sub_agent_id",
1888
+ "type": "varchar(256)",
1889
+ "primaryKey": false,
1890
+ "notNull": false
1891
+ },
1892
+ "relation_type": {
1893
+ "name": "relation_type",
1894
+ "type": "varchar(256)",
1895
+ "primaryKey": false,
1896
+ "notNull": false
1897
+ },
1898
+ "created_at": {
1899
+ "name": "created_at",
1900
+ "type": "timestamp",
1901
+ "primaryKey": false,
1902
+ "notNull": true,
1903
+ "default": "now()"
1904
+ },
1905
+ "updated_at": {
1906
+ "name": "updated_at",
1907
+ "type": "timestamp",
1908
+ "primaryKey": false,
1909
+ "notNull": true,
1910
+ "default": "now()"
1911
+ }
1912
+ },
1913
+ "indexes": {},
1914
+ "foreignKeys": {
1915
+ "sub_agent_relations_agent_fk": {
1916
+ "name": "sub_agent_relations_agent_fk",
1917
+ "tableFrom": "sub_agent_relations",
1918
+ "tableTo": "agent",
1919
+ "columnsFrom": ["tenant_id", "project_id", "agent_id"],
1920
+ "columnsTo": ["tenant_id", "project_id", "id"],
1921
+ "onDelete": "cascade",
1922
+ "onUpdate": "no action"
1923
+ }
1924
+ },
1925
+ "compositePrimaryKeys": {
1926
+ "sub_agent_relations_tenant_id_project_id_agent_id_id_pk": {
1927
+ "name": "sub_agent_relations_tenant_id_project_id_agent_id_id_pk",
1928
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
1929
+ }
1930
+ },
1931
+ "uniqueConstraints": {},
1932
+ "policies": {},
1933
+ "checkConstraints": {},
1934
+ "isRLSEnabled": false
1935
+ },
1936
+ "public.sub_agent_team_agent_relations": {
1937
+ "name": "sub_agent_team_agent_relations",
1938
+ "schema": "",
1939
+ "columns": {
1940
+ "tenant_id": {
1941
+ "name": "tenant_id",
1942
+ "type": "varchar(256)",
1943
+ "primaryKey": false,
1944
+ "notNull": true
1945
+ },
1946
+ "id": {
1947
+ "name": "id",
1948
+ "type": "varchar(256)",
1949
+ "primaryKey": false,
1950
+ "notNull": true
1951
+ },
1952
+ "project_id": {
1953
+ "name": "project_id",
1954
+ "type": "varchar(256)",
1955
+ "primaryKey": false,
1956
+ "notNull": true
1957
+ },
1958
+ "agent_id": {
1959
+ "name": "agent_id",
1960
+ "type": "varchar(256)",
1961
+ "primaryKey": false,
1962
+ "notNull": true
1963
+ },
1964
+ "sub_agent_id": {
1965
+ "name": "sub_agent_id",
1966
+ "type": "varchar(256)",
1967
+ "primaryKey": false,
1968
+ "notNull": true
1969
+ },
1970
+ "target_agent_id": {
1971
+ "name": "target_agent_id",
1972
+ "type": "varchar(256)",
1973
+ "primaryKey": false,
1974
+ "notNull": true
1975
+ },
1976
+ "headers": {
1977
+ "name": "headers",
1978
+ "type": "jsonb",
1979
+ "primaryKey": false,
1980
+ "notNull": false
1981
+ },
1982
+ "created_at": {
1983
+ "name": "created_at",
1984
+ "type": "timestamp",
1985
+ "primaryKey": false,
1986
+ "notNull": true,
1987
+ "default": "now()"
1988
+ },
1989
+ "updated_at": {
1990
+ "name": "updated_at",
1991
+ "type": "timestamp",
1992
+ "primaryKey": false,
1993
+ "notNull": true,
1994
+ "default": "now()"
1995
+ }
1996
+ },
1997
+ "indexes": {},
1998
+ "foreignKeys": {
1999
+ "sub_agent_team_agent_relations_sub_agent_fk": {
2000
+ "name": "sub_agent_team_agent_relations_sub_agent_fk",
2001
+ "tableFrom": "sub_agent_team_agent_relations",
2002
+ "tableTo": "sub_agents",
2003
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
2004
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
2005
+ "onDelete": "cascade",
2006
+ "onUpdate": "no action"
2007
+ },
2008
+ "sub_agent_team_agent_relations_target_agent_fk": {
2009
+ "name": "sub_agent_team_agent_relations_target_agent_fk",
2010
+ "tableFrom": "sub_agent_team_agent_relations",
2011
+ "tableTo": "agent",
2012
+ "columnsFrom": ["tenant_id", "project_id", "target_agent_id"],
2013
+ "columnsTo": ["tenant_id", "project_id", "id"],
2014
+ "onDelete": "cascade",
2015
+ "onUpdate": "no action"
2016
+ }
2017
+ },
2018
+ "compositePrimaryKeys": {
2019
+ "sub_agent_team_agent_relations_tenant_id_project_id_agent_id_id_pk": {
2020
+ "name": "sub_agent_team_agent_relations_tenant_id_project_id_agent_id_id_pk",
2021
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
2022
+ }
2023
+ },
2024
+ "uniqueConstraints": {},
2025
+ "policies": {},
2026
+ "checkConstraints": {},
2027
+ "isRLSEnabled": false
2028
+ },
2029
+ "public.sub_agent_tool_relations": {
2030
+ "name": "sub_agent_tool_relations",
2031
+ "schema": "",
2032
+ "columns": {
2033
+ "tenant_id": {
2034
+ "name": "tenant_id",
2035
+ "type": "varchar(256)",
2036
+ "primaryKey": false,
2037
+ "notNull": true
2038
+ },
2039
+ "id": {
2040
+ "name": "id",
2041
+ "type": "varchar(256)",
2042
+ "primaryKey": false,
2043
+ "notNull": true
2044
+ },
2045
+ "project_id": {
2046
+ "name": "project_id",
2047
+ "type": "varchar(256)",
2048
+ "primaryKey": false,
2049
+ "notNull": true
2050
+ },
2051
+ "agent_id": {
2052
+ "name": "agent_id",
2053
+ "type": "varchar(256)",
2054
+ "primaryKey": false,
2055
+ "notNull": true
2056
+ },
2057
+ "sub_agent_id": {
2058
+ "name": "sub_agent_id",
2059
+ "type": "varchar(256)",
2060
+ "primaryKey": false,
2061
+ "notNull": true
2062
+ },
2063
+ "tool_id": {
2064
+ "name": "tool_id",
2065
+ "type": "varchar(256)",
2066
+ "primaryKey": false,
2067
+ "notNull": true
2068
+ },
2069
+ "selected_tools": {
2070
+ "name": "selected_tools",
2071
+ "type": "jsonb",
2072
+ "primaryKey": false,
2073
+ "notNull": false
2074
+ },
2075
+ "headers": {
2076
+ "name": "headers",
2077
+ "type": "jsonb",
2078
+ "primaryKey": false,
2079
+ "notNull": false
2080
+ },
2081
+ "created_at": {
2082
+ "name": "created_at",
2083
+ "type": "timestamp",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "default": "now()"
2087
+ },
2088
+ "updated_at": {
2089
+ "name": "updated_at",
2090
+ "type": "timestamp",
2091
+ "primaryKey": false,
2092
+ "notNull": true,
2093
+ "default": "now()"
2094
+ }
2095
+ },
2096
+ "indexes": {},
2097
+ "foreignKeys": {
2098
+ "sub_agent_tool_relations_agent_fk": {
2099
+ "name": "sub_agent_tool_relations_agent_fk",
2100
+ "tableFrom": "sub_agent_tool_relations",
2101
+ "tableTo": "sub_agents",
2102
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
2103
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
2104
+ "onDelete": "cascade",
2105
+ "onUpdate": "no action"
2106
+ },
2107
+ "sub_agent_tool_relations_tool_fk": {
2108
+ "name": "sub_agent_tool_relations_tool_fk",
2109
+ "tableFrom": "sub_agent_tool_relations",
2110
+ "tableTo": "tools",
2111
+ "columnsFrom": ["tenant_id", "project_id", "tool_id"],
2112
+ "columnsTo": ["tenant_id", "project_id", "id"],
2113
+ "onDelete": "cascade",
2114
+ "onUpdate": "no action"
2115
+ }
2116
+ },
2117
+ "compositePrimaryKeys": {
2118
+ "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk": {
2119
+ "name": "sub_agent_tool_relations_tenant_id_project_id_agent_id_id_pk",
2120
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
2121
+ }
2122
+ },
2123
+ "uniqueConstraints": {},
2124
+ "policies": {},
2125
+ "checkConstraints": {},
2126
+ "isRLSEnabled": false
2127
+ },
2128
+ "public.sub_agents": {
2129
+ "name": "sub_agents",
2130
+ "schema": "",
2131
+ "columns": {
2132
+ "tenant_id": {
2133
+ "name": "tenant_id",
2134
+ "type": "varchar(256)",
2135
+ "primaryKey": false,
2136
+ "notNull": true
2137
+ },
2138
+ "id": {
2139
+ "name": "id",
2140
+ "type": "varchar(256)",
2141
+ "primaryKey": false,
2142
+ "notNull": true
2143
+ },
2144
+ "project_id": {
2145
+ "name": "project_id",
2146
+ "type": "varchar(256)",
2147
+ "primaryKey": false,
2148
+ "notNull": true
2149
+ },
2150
+ "agent_id": {
2151
+ "name": "agent_id",
2152
+ "type": "varchar(256)",
2153
+ "primaryKey": false,
2154
+ "notNull": true
2155
+ },
2156
+ "name": {
2157
+ "name": "name",
2158
+ "type": "varchar(256)",
2159
+ "primaryKey": false,
2160
+ "notNull": true
2161
+ },
2162
+ "description": {
2163
+ "name": "description",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true
2167
+ },
2168
+ "prompt": {
2169
+ "name": "prompt",
2170
+ "type": "text",
2171
+ "primaryKey": false,
2172
+ "notNull": true
2173
+ },
2174
+ "conversation_history_config": {
2175
+ "name": "conversation_history_config",
2176
+ "type": "jsonb",
2177
+ "primaryKey": false,
2178
+ "notNull": false
2179
+ },
2180
+ "models": {
2181
+ "name": "models",
2182
+ "type": "jsonb",
2183
+ "primaryKey": false,
2184
+ "notNull": false
2185
+ },
2186
+ "stop_when": {
2187
+ "name": "stop_when",
2188
+ "type": "jsonb",
2189
+ "primaryKey": false,
2190
+ "notNull": false
2191
+ },
2192
+ "created_at": {
2193
+ "name": "created_at",
2194
+ "type": "timestamp",
2195
+ "primaryKey": false,
2196
+ "notNull": true,
2197
+ "default": "now()"
2198
+ },
2199
+ "updated_at": {
2200
+ "name": "updated_at",
2201
+ "type": "timestamp",
2202
+ "primaryKey": false,
2203
+ "notNull": true,
2204
+ "default": "now()"
2205
+ }
2206
+ },
2207
+ "indexes": {},
2208
+ "foreignKeys": {
2209
+ "sub_agents_agents_fk": {
2210
+ "name": "sub_agents_agents_fk",
2211
+ "tableFrom": "sub_agents",
2212
+ "tableTo": "agent",
2213
+ "columnsFrom": ["tenant_id", "project_id", "agent_id"],
2214
+ "columnsTo": ["tenant_id", "project_id", "id"],
2215
+ "onDelete": "cascade",
2216
+ "onUpdate": "no action"
2217
+ }
2218
+ },
2219
+ "compositePrimaryKeys": {
2220
+ "sub_agents_tenant_id_project_id_agent_id_id_pk": {
2221
+ "name": "sub_agents_tenant_id_project_id_agent_id_id_pk",
2222
+ "columns": ["tenant_id", "project_id", "agent_id", "id"]
2223
+ }
2224
+ },
2225
+ "uniqueConstraints": {},
2226
+ "policies": {},
2227
+ "checkConstraints": {},
2228
+ "isRLSEnabled": false
2229
+ },
2230
+ "public.task_relations": {
2231
+ "name": "task_relations",
2232
+ "schema": "",
2233
+ "columns": {
2234
+ "tenant_id": {
2235
+ "name": "tenant_id",
2236
+ "type": "varchar(256)",
2237
+ "primaryKey": false,
2238
+ "notNull": true
2239
+ },
2240
+ "id": {
2241
+ "name": "id",
2242
+ "type": "varchar(256)",
2243
+ "primaryKey": false,
2244
+ "notNull": true
2245
+ },
2246
+ "project_id": {
2247
+ "name": "project_id",
2248
+ "type": "varchar(256)",
2249
+ "primaryKey": false,
2250
+ "notNull": true
2251
+ },
2252
+ "parent_task_id": {
2253
+ "name": "parent_task_id",
2254
+ "type": "varchar(256)",
2255
+ "primaryKey": false,
2256
+ "notNull": true
2257
+ },
2258
+ "child_task_id": {
2259
+ "name": "child_task_id",
2260
+ "type": "varchar(256)",
2261
+ "primaryKey": false,
2262
+ "notNull": true
2263
+ },
2264
+ "relation_type": {
2265
+ "name": "relation_type",
2266
+ "type": "varchar(256)",
2267
+ "primaryKey": false,
2268
+ "notNull": false,
2269
+ "default": "'parent_child'"
2270
+ },
2271
+ "created_at": {
2272
+ "name": "created_at",
2273
+ "type": "timestamp",
2274
+ "primaryKey": false,
2275
+ "notNull": true,
2276
+ "default": "now()"
2277
+ },
2278
+ "updated_at": {
2279
+ "name": "updated_at",
2280
+ "type": "timestamp",
2281
+ "primaryKey": false,
2282
+ "notNull": true,
2283
+ "default": "now()"
2284
+ }
2285
+ },
2286
+ "indexes": {},
2287
+ "foreignKeys": {
2288
+ "task_relations_project_fk": {
2289
+ "name": "task_relations_project_fk",
2290
+ "tableFrom": "task_relations",
2291
+ "tableTo": "projects",
2292
+ "columnsFrom": ["tenant_id", "project_id"],
2293
+ "columnsTo": ["tenant_id", "id"],
2294
+ "onDelete": "cascade",
2295
+ "onUpdate": "no action"
2296
+ }
2297
+ },
2298
+ "compositePrimaryKeys": {
2299
+ "task_relations_tenant_id_project_id_id_pk": {
2300
+ "name": "task_relations_tenant_id_project_id_id_pk",
2301
+ "columns": ["tenant_id", "project_id", "id"]
2302
+ }
2303
+ },
2304
+ "uniqueConstraints": {},
2305
+ "policies": {},
2306
+ "checkConstraints": {},
2307
+ "isRLSEnabled": false
2308
+ },
2309
+ "public.tasks": {
2310
+ "name": "tasks",
2311
+ "schema": "",
2312
+ "columns": {
2313
+ "tenant_id": {
2314
+ "name": "tenant_id",
2315
+ "type": "varchar(256)",
2316
+ "primaryKey": false,
2317
+ "notNull": true
2318
+ },
2319
+ "id": {
2320
+ "name": "id",
2321
+ "type": "varchar(256)",
2322
+ "primaryKey": false,
2323
+ "notNull": true
2324
+ },
2325
+ "project_id": {
2326
+ "name": "project_id",
2327
+ "type": "varchar(256)",
2328
+ "primaryKey": false,
2329
+ "notNull": true
2330
+ },
2331
+ "agent_id": {
2332
+ "name": "agent_id",
2333
+ "type": "varchar(256)",
2334
+ "primaryKey": false,
2335
+ "notNull": true
2336
+ },
2337
+ "sub_agent_id": {
2338
+ "name": "sub_agent_id",
2339
+ "type": "varchar(256)",
2340
+ "primaryKey": false,
2341
+ "notNull": true
2342
+ },
2343
+ "context_id": {
2344
+ "name": "context_id",
2345
+ "type": "varchar(256)",
2346
+ "primaryKey": false,
2347
+ "notNull": true
2348
+ },
2349
+ "status": {
2350
+ "name": "status",
2351
+ "type": "varchar(256)",
2352
+ "primaryKey": false,
2353
+ "notNull": true
2354
+ },
2355
+ "metadata": {
2356
+ "name": "metadata",
2357
+ "type": "jsonb",
2358
+ "primaryKey": false,
2359
+ "notNull": false
2360
+ },
2361
+ "created_at": {
2362
+ "name": "created_at",
2363
+ "type": "timestamp",
2364
+ "primaryKey": false,
2365
+ "notNull": true,
2366
+ "default": "now()"
2367
+ },
2368
+ "updated_at": {
2369
+ "name": "updated_at",
2370
+ "type": "timestamp",
2371
+ "primaryKey": false,
2372
+ "notNull": true,
2373
+ "default": "now()"
2374
+ }
2375
+ },
2376
+ "indexes": {},
2377
+ "foreignKeys": {
2378
+ "tasks_sub_agent_fk": {
2379
+ "name": "tasks_sub_agent_fk",
2380
+ "tableFrom": "tasks",
2381
+ "tableTo": "sub_agents",
2382
+ "columnsFrom": ["tenant_id", "project_id", "agent_id", "sub_agent_id"],
2383
+ "columnsTo": ["tenant_id", "project_id", "agent_id", "id"],
2384
+ "onDelete": "cascade",
2385
+ "onUpdate": "no action"
2386
+ }
2387
+ },
2388
+ "compositePrimaryKeys": {
2389
+ "tasks_tenant_id_project_id_id_pk": {
2390
+ "name": "tasks_tenant_id_project_id_id_pk",
2391
+ "columns": ["tenant_id", "project_id", "id"]
2392
+ }
2393
+ },
2394
+ "uniqueConstraints": {},
2395
+ "policies": {},
2396
+ "checkConstraints": {},
2397
+ "isRLSEnabled": false
2398
+ },
2399
+ "public.tools": {
2400
+ "name": "tools",
2401
+ "schema": "",
2402
+ "columns": {
2403
+ "tenant_id": {
2404
+ "name": "tenant_id",
2405
+ "type": "varchar(256)",
2406
+ "primaryKey": false,
2407
+ "notNull": true
2408
+ },
2409
+ "id": {
2410
+ "name": "id",
2411
+ "type": "varchar(256)",
2412
+ "primaryKey": false,
2413
+ "notNull": true
2414
+ },
2415
+ "project_id": {
2416
+ "name": "project_id",
2417
+ "type": "varchar(256)",
2418
+ "primaryKey": false,
2419
+ "notNull": true
2420
+ },
2421
+ "name": {
2422
+ "name": "name",
2423
+ "type": "varchar(256)",
2424
+ "primaryKey": false,
2425
+ "notNull": true
2426
+ },
2427
+ "description": {
2428
+ "name": "description",
2429
+ "type": "text",
2430
+ "primaryKey": false,
2431
+ "notNull": false
2432
+ },
2433
+ "config": {
2434
+ "name": "config",
2435
+ "type": "jsonb",
2436
+ "primaryKey": false,
2437
+ "notNull": true
2438
+ },
2439
+ "credential_reference_id": {
2440
+ "name": "credential_reference_id",
2441
+ "type": "varchar(256)",
2442
+ "primaryKey": false,
2443
+ "notNull": false
2444
+ },
2445
+ "headers": {
2446
+ "name": "headers",
2447
+ "type": "jsonb",
2448
+ "primaryKey": false,
2449
+ "notNull": false
2450
+ },
2451
+ "image_url": {
2452
+ "name": "image_url",
2453
+ "type": "text",
2454
+ "primaryKey": false,
2455
+ "notNull": false
2456
+ },
2457
+ "capabilities": {
2458
+ "name": "capabilities",
2459
+ "type": "jsonb",
2460
+ "primaryKey": false,
2461
+ "notNull": false
2462
+ },
2463
+ "last_error": {
2464
+ "name": "last_error",
2465
+ "type": "text",
2466
+ "primaryKey": false,
2467
+ "notNull": false
2468
+ },
2469
+ "created_at": {
2470
+ "name": "created_at",
2471
+ "type": "timestamp",
2472
+ "primaryKey": false,
2473
+ "notNull": true,
2474
+ "default": "now()"
2475
+ },
2476
+ "updated_at": {
2477
+ "name": "updated_at",
2478
+ "type": "timestamp",
2479
+ "primaryKey": false,
2480
+ "notNull": true,
2481
+ "default": "now()"
2482
+ }
2483
+ },
2484
+ "indexes": {},
2485
+ "foreignKeys": {
2486
+ "tools_project_fk": {
2487
+ "name": "tools_project_fk",
2488
+ "tableFrom": "tools",
2489
+ "tableTo": "projects",
2490
+ "columnsFrom": ["tenant_id", "project_id"],
2491
+ "columnsTo": ["tenant_id", "id"],
2492
+ "onDelete": "cascade",
2493
+ "onUpdate": "no action"
2494
+ }
2495
+ },
2496
+ "compositePrimaryKeys": {
2497
+ "tools_tenant_id_project_id_id_pk": {
2498
+ "name": "tools_tenant_id_project_id_id_pk",
2499
+ "columns": ["tenant_id", "project_id", "id"]
2500
+ }
2501
+ },
2502
+ "uniqueConstraints": {},
2503
+ "policies": {},
2504
+ "checkConstraints": {},
2505
+ "isRLSEnabled": false
2506
+ }
2507
+ },
2508
+ "enums": {},
2509
+ "schemas": {},
2510
+ "sequences": {},
2511
+ "roles": {},
2512
+ "policies": {},
2513
+ "views": {},
2514
+ "_meta": {
2515
+ "columns": {},
2516
+ "schemas": {},
2517
+ "tables": {}
2518
+ }
2519
+ }