@inkeep/agents-core 0.63.3 → 0.64.1

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