@inkeep/agents-core 0.61.0 → 0.62.0

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