@inkeep/agents-core 0.58.19 → 0.58.21

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