@inkeep/agents-core 0.58.7 → 0.58.9

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