@inkeep/agents-core 0.56.2 → 0.58.0

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