@inkeep/agents-core 0.58.2 → 0.58.4

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 (59) hide show
  1. package/dist/auth/auth-schema.d.ts +85 -85
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +9 -9
  4. package/dist/auth/permissions.d.ts +9 -9
  5. package/dist/client-exports.d.ts +5 -5
  6. package/dist/client-exports.js +2 -2
  7. package/dist/constants/models.d.ts +34 -2
  8. package/dist/constants/models.js +37 -5
  9. package/dist/data-access/index.d.ts +2 -1
  10. package/dist/data-access/index.js +2 -1
  11. package/dist/data-access/manage/agents.d.ts +21 -21
  12. package/dist/data-access/manage/artifactComponents.d.ts +8 -8
  13. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  14. package/dist/data-access/manage/dataComponents.d.ts +4 -4
  15. package/dist/data-access/manage/functionTools.d.ts +10 -10
  16. package/dist/data-access/manage/skills.d.ts +12 -12
  17. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
  18. package/dist/data-access/manage/subAgentRelations.d.ts +18 -18
  19. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
  20. package/dist/data-access/manage/subAgents.d.ts +15 -15
  21. package/dist/data-access/manage/tools.d.ts +15 -15
  22. package/dist/data-access/manage/tools.js +16 -2
  23. package/dist/data-access/manage/triggers.d.ts +2 -2
  24. package/dist/data-access/runtime/apiKeys.d.ts +12 -12
  25. package/dist/data-access/runtime/cascade-delete.d.ts +3 -0
  26. package/dist/data-access/runtime/cascade-delete.js +11 -4
  27. package/dist/data-access/runtime/conversations.d.ts +31 -31
  28. package/dist/data-access/runtime/github-work-app-installations.d.ts +25 -5
  29. package/dist/data-access/runtime/github-work-app-installations.js +20 -17
  30. package/dist/data-access/runtime/messages.d.ts +9 -9
  31. package/dist/data-access/runtime/slack-work-app-mcp.d.ts +26 -0
  32. package/dist/data-access/runtime/slack-work-app-mcp.js +69 -0
  33. package/dist/data-access/runtime/tasks.d.ts +9 -9
  34. package/dist/data-access/runtime/workAppSlack.js +2 -2
  35. package/dist/db/manage/manage-schema.d.ts +453 -453
  36. package/dist/db/manage/scope-definitions.d.ts +3 -1
  37. package/dist/db/manage/scope-definitions.js +5 -0
  38. package/dist/db/runtime/runtime-schema.d.ts +465 -311
  39. package/dist/db/runtime/runtime-schema.js +29 -2
  40. package/dist/env.d.ts +2 -0
  41. package/dist/env.js +1 -0
  42. package/dist/index.d.ts +5 -4
  43. package/dist/index.js +4 -3
  44. package/dist/middleware/no-auth.d.ts +2 -2
  45. package/dist/setup/setup.js +14 -3
  46. package/dist/types/index.d.ts +2 -2
  47. package/dist/types/utility.d.ts +9 -2
  48. package/dist/validation/dolt-schemas.d.ts +1 -1
  49. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  50. package/dist/validation/index.d.ts +2 -2
  51. package/dist/validation/index.js +2 -2
  52. package/dist/validation/schemas.d.ts +1922 -1893
  53. package/dist/validation/schemas.js +16 -2
  54. package/drizzle/runtime/0020_tiny_killmonger.sql +15 -0
  55. package/drizzle/runtime/0021_careful_xorn.sql +2 -0
  56. package/drizzle/runtime/meta/0020_snapshot.json +4122 -0
  57. package/drizzle/runtime/meta/0021_snapshot.json +4124 -0
  58. package/drizzle/runtime/meta/_journal.json +14 -0
  59. package/package.json +1 -1
@@ -0,0 +1,4124 @@
1
+ {
2
+ "id": "2bfee8e9-8bdd-4380-923a-1e91307177bc",
3
+ "prevId": "876a9314-fb24-4607-85ce-4bee15878873",
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_tenant_id_project_id_tool_id_pk": {
2832
+ "name": "work_app_github_mcp_tool_access_mode_tenant_id_project_id_tool_id_pk",
2833
+ "columns": [
2834
+ "tenant_id",
2835
+ "project_id",
2836
+ "tool_id"
2837
+ ]
2838
+ }
2839
+ },
2840
+ "uniqueConstraints": {},
2841
+ "policies": {},
2842
+ "checkConstraints": {},
2843
+ "isRLSEnabled": false
2844
+ },
2845
+ "public.work_app_github_mcp_tool_repository_access": {
2846
+ "name": "work_app_github_mcp_tool_repository_access",
2847
+ "schema": "",
2848
+ "columns": {
2849
+ "tenant_id": {
2850
+ "name": "tenant_id",
2851
+ "type": "varchar(256)",
2852
+ "primaryKey": false,
2853
+ "notNull": true
2854
+ },
2855
+ "id": {
2856
+ "name": "id",
2857
+ "type": "varchar(256)",
2858
+ "primaryKey": false,
2859
+ "notNull": true
2860
+ },
2861
+ "project_id": {
2862
+ "name": "project_id",
2863
+ "type": "varchar(256)",
2864
+ "primaryKey": false,
2865
+ "notNull": true
2866
+ },
2867
+ "tool_id": {
2868
+ "name": "tool_id",
2869
+ "type": "varchar(256)",
2870
+ "primaryKey": false,
2871
+ "notNull": true
2872
+ },
2873
+ "repository_db_id": {
2874
+ "name": "repository_db_id",
2875
+ "type": "varchar(256)",
2876
+ "primaryKey": false,
2877
+ "notNull": true
2878
+ },
2879
+ "created_at": {
2880
+ "name": "created_at",
2881
+ "type": "timestamp",
2882
+ "primaryKey": false,
2883
+ "notNull": true,
2884
+ "default": "now()"
2885
+ },
2886
+ "updated_at": {
2887
+ "name": "updated_at",
2888
+ "type": "timestamp",
2889
+ "primaryKey": false,
2890
+ "notNull": true,
2891
+ "default": "now()"
2892
+ }
2893
+ },
2894
+ "indexes": {
2895
+ "work_app_github_mcp_tool_repository_access_tool_idx": {
2896
+ "name": "work_app_github_mcp_tool_repository_access_tool_idx",
2897
+ "columns": [
2898
+ {
2899
+ "expression": "tool_id",
2900
+ "isExpression": false,
2901
+ "asc": true,
2902
+ "nulls": "last"
2903
+ }
2904
+ ],
2905
+ "isUnique": false,
2906
+ "concurrently": false,
2907
+ "method": "btree",
2908
+ "with": {}
2909
+ },
2910
+ "work_app_github_mcp_tool_repository_access_tenant_idx": {
2911
+ "name": "work_app_github_mcp_tool_repository_access_tenant_idx",
2912
+ "columns": [
2913
+ {
2914
+ "expression": "tenant_id",
2915
+ "isExpression": false,
2916
+ "asc": true,
2917
+ "nulls": "last"
2918
+ }
2919
+ ],
2920
+ "isUnique": false,
2921
+ "concurrently": false,
2922
+ "method": "btree",
2923
+ "with": {}
2924
+ },
2925
+ "work_app_github_mcp_tool_repository_access_project_idx": {
2926
+ "name": "work_app_github_mcp_tool_repository_access_project_idx",
2927
+ "columns": [
2928
+ {
2929
+ "expression": "project_id",
2930
+ "isExpression": false,
2931
+ "asc": true,
2932
+ "nulls": "last"
2933
+ }
2934
+ ],
2935
+ "isUnique": false,
2936
+ "concurrently": false,
2937
+ "method": "btree",
2938
+ "with": {}
2939
+ }
2940
+ },
2941
+ "foreignKeys": {
2942
+ "work_app_github_mcp_tool_repository_access_tenant_fk": {
2943
+ "name": "work_app_github_mcp_tool_repository_access_tenant_fk",
2944
+ "tableFrom": "work_app_github_mcp_tool_repository_access",
2945
+ "tableTo": "organization",
2946
+ "columnsFrom": [
2947
+ "tenant_id"
2948
+ ],
2949
+ "columnsTo": [
2950
+ "id"
2951
+ ],
2952
+ "onDelete": "cascade",
2953
+ "onUpdate": "no action"
2954
+ },
2955
+ "work_app_github_mcp_tool_repository_access_repo_fk": {
2956
+ "name": "work_app_github_mcp_tool_repository_access_repo_fk",
2957
+ "tableFrom": "work_app_github_mcp_tool_repository_access",
2958
+ "tableTo": "work_app_github_repositories",
2959
+ "columnsFrom": [
2960
+ "repository_db_id"
2961
+ ],
2962
+ "columnsTo": [
2963
+ "id"
2964
+ ],
2965
+ "onDelete": "cascade",
2966
+ "onUpdate": "no action"
2967
+ }
2968
+ },
2969
+ "compositePrimaryKeys": {},
2970
+ "uniqueConstraints": {
2971
+ "work_app_github_mcp_tool_repository_access_unique": {
2972
+ "name": "work_app_github_mcp_tool_repository_access_unique",
2973
+ "nullsNotDistinct": false,
2974
+ "columns": [
2975
+ "tool_id",
2976
+ "repository_db_id"
2977
+ ]
2978
+ }
2979
+ },
2980
+ "policies": {},
2981
+ "checkConstraints": {},
2982
+ "isRLSEnabled": false
2983
+ },
2984
+ "public.work_app_github_project_access_mode": {
2985
+ "name": "work_app_github_project_access_mode",
2986
+ "schema": "",
2987
+ "columns": {
2988
+ "tenant_id": {
2989
+ "name": "tenant_id",
2990
+ "type": "varchar(256)",
2991
+ "primaryKey": false,
2992
+ "notNull": true
2993
+ },
2994
+ "project_id": {
2995
+ "name": "project_id",
2996
+ "type": "varchar(256)",
2997
+ "primaryKey": false,
2998
+ "notNull": true
2999
+ },
3000
+ "mode": {
3001
+ "name": "mode",
3002
+ "type": "varchar(20)",
3003
+ "primaryKey": false,
3004
+ "notNull": true
3005
+ },
3006
+ "created_at": {
3007
+ "name": "created_at",
3008
+ "type": "timestamp",
3009
+ "primaryKey": false,
3010
+ "notNull": true,
3011
+ "default": "now()"
3012
+ },
3013
+ "updated_at": {
3014
+ "name": "updated_at",
3015
+ "type": "timestamp",
3016
+ "primaryKey": false,
3017
+ "notNull": true,
3018
+ "default": "now()"
3019
+ }
3020
+ },
3021
+ "indexes": {},
3022
+ "foreignKeys": {
3023
+ "work_app_github_project_access_mode_tenant_fk": {
3024
+ "name": "work_app_github_project_access_mode_tenant_fk",
3025
+ "tableFrom": "work_app_github_project_access_mode",
3026
+ "tableTo": "organization",
3027
+ "columnsFrom": [
3028
+ "tenant_id"
3029
+ ],
3030
+ "columnsTo": [
3031
+ "id"
3032
+ ],
3033
+ "onDelete": "cascade",
3034
+ "onUpdate": "no action"
3035
+ }
3036
+ },
3037
+ "compositePrimaryKeys": {
3038
+ "work_app_github_project_access_mode_tenant_id_project_id_pk": {
3039
+ "name": "work_app_github_project_access_mode_tenant_id_project_id_pk",
3040
+ "columns": [
3041
+ "tenant_id",
3042
+ "project_id"
3043
+ ]
3044
+ }
3045
+ },
3046
+ "uniqueConstraints": {},
3047
+ "policies": {},
3048
+ "checkConstraints": {},
3049
+ "isRLSEnabled": false
3050
+ },
3051
+ "public.work_app_github_project_repository_access": {
3052
+ "name": "work_app_github_project_repository_access",
3053
+ "schema": "",
3054
+ "columns": {
3055
+ "tenant_id": {
3056
+ "name": "tenant_id",
3057
+ "type": "varchar(256)",
3058
+ "primaryKey": false,
3059
+ "notNull": true
3060
+ },
3061
+ "id": {
3062
+ "name": "id",
3063
+ "type": "varchar(256)",
3064
+ "primaryKey": false,
3065
+ "notNull": true
3066
+ },
3067
+ "project_id": {
3068
+ "name": "project_id",
3069
+ "type": "varchar(256)",
3070
+ "primaryKey": false,
3071
+ "notNull": true
3072
+ },
3073
+ "repository_db_id": {
3074
+ "name": "repository_db_id",
3075
+ "type": "varchar(256)",
3076
+ "primaryKey": false,
3077
+ "notNull": true
3078
+ },
3079
+ "created_at": {
3080
+ "name": "created_at",
3081
+ "type": "timestamp",
3082
+ "primaryKey": false,
3083
+ "notNull": true,
3084
+ "default": "now()"
3085
+ },
3086
+ "updated_at": {
3087
+ "name": "updated_at",
3088
+ "type": "timestamp",
3089
+ "primaryKey": false,
3090
+ "notNull": true,
3091
+ "default": "now()"
3092
+ }
3093
+ },
3094
+ "indexes": {
3095
+ "work_app_github_project_repository_access_tenant_idx": {
3096
+ "name": "work_app_github_project_repository_access_tenant_idx",
3097
+ "columns": [
3098
+ {
3099
+ "expression": "tenant_id",
3100
+ "isExpression": false,
3101
+ "asc": true,
3102
+ "nulls": "last"
3103
+ }
3104
+ ],
3105
+ "isUnique": false,
3106
+ "concurrently": false,
3107
+ "method": "btree",
3108
+ "with": {}
3109
+ },
3110
+ "work_app_github_project_repository_access_project_idx": {
3111
+ "name": "work_app_github_project_repository_access_project_idx",
3112
+ "columns": [
3113
+ {
3114
+ "expression": "project_id",
3115
+ "isExpression": false,
3116
+ "asc": true,
3117
+ "nulls": "last"
3118
+ }
3119
+ ],
3120
+ "isUnique": false,
3121
+ "concurrently": false,
3122
+ "method": "btree",
3123
+ "with": {}
3124
+ }
3125
+ },
3126
+ "foreignKeys": {
3127
+ "work_app_github_project_repository_access_tenant_fk": {
3128
+ "name": "work_app_github_project_repository_access_tenant_fk",
3129
+ "tableFrom": "work_app_github_project_repository_access",
3130
+ "tableTo": "organization",
3131
+ "columnsFrom": [
3132
+ "tenant_id"
3133
+ ],
3134
+ "columnsTo": [
3135
+ "id"
3136
+ ],
3137
+ "onDelete": "cascade",
3138
+ "onUpdate": "no action"
3139
+ },
3140
+ "work_app_github_project_repository_access_repo_fk": {
3141
+ "name": "work_app_github_project_repository_access_repo_fk",
3142
+ "tableFrom": "work_app_github_project_repository_access",
3143
+ "tableTo": "work_app_github_repositories",
3144
+ "columnsFrom": [
3145
+ "repository_db_id"
3146
+ ],
3147
+ "columnsTo": [
3148
+ "id"
3149
+ ],
3150
+ "onDelete": "cascade",
3151
+ "onUpdate": "no action"
3152
+ }
3153
+ },
3154
+ "compositePrimaryKeys": {},
3155
+ "uniqueConstraints": {
3156
+ "work_app_github_project_repository_access_unique": {
3157
+ "name": "work_app_github_project_repository_access_unique",
3158
+ "nullsNotDistinct": false,
3159
+ "columns": [
3160
+ "tenant_id",
3161
+ "project_id",
3162
+ "repository_db_id"
3163
+ ]
3164
+ }
3165
+ },
3166
+ "policies": {},
3167
+ "checkConstraints": {},
3168
+ "isRLSEnabled": false
3169
+ },
3170
+ "public.work_app_github_repositories": {
3171
+ "name": "work_app_github_repositories",
3172
+ "schema": "",
3173
+ "columns": {
3174
+ "id": {
3175
+ "name": "id",
3176
+ "type": "varchar(256)",
3177
+ "primaryKey": true,
3178
+ "notNull": true
3179
+ },
3180
+ "installation_db_id": {
3181
+ "name": "installation_db_id",
3182
+ "type": "varchar(256)",
3183
+ "primaryKey": false,
3184
+ "notNull": true
3185
+ },
3186
+ "repository_id": {
3187
+ "name": "repository_id",
3188
+ "type": "text",
3189
+ "primaryKey": false,
3190
+ "notNull": true
3191
+ },
3192
+ "repository_name": {
3193
+ "name": "repository_name",
3194
+ "type": "varchar(256)",
3195
+ "primaryKey": false,
3196
+ "notNull": true
3197
+ },
3198
+ "repository_full_name": {
3199
+ "name": "repository_full_name",
3200
+ "type": "varchar(512)",
3201
+ "primaryKey": false,
3202
+ "notNull": true
3203
+ },
3204
+ "private": {
3205
+ "name": "private",
3206
+ "type": "boolean",
3207
+ "primaryKey": false,
3208
+ "notNull": true,
3209
+ "default": false
3210
+ },
3211
+ "created_at": {
3212
+ "name": "created_at",
3213
+ "type": "timestamp",
3214
+ "primaryKey": false,
3215
+ "notNull": true,
3216
+ "default": "now()"
3217
+ },
3218
+ "updated_at": {
3219
+ "name": "updated_at",
3220
+ "type": "timestamp",
3221
+ "primaryKey": false,
3222
+ "notNull": true,
3223
+ "default": "now()"
3224
+ }
3225
+ },
3226
+ "indexes": {
3227
+ "work_app_github_repositories_installation_idx": {
3228
+ "name": "work_app_github_repositories_installation_idx",
3229
+ "columns": [
3230
+ {
3231
+ "expression": "installation_db_id",
3232
+ "isExpression": false,
3233
+ "asc": true,
3234
+ "nulls": "last"
3235
+ }
3236
+ ],
3237
+ "isUnique": false,
3238
+ "concurrently": false,
3239
+ "method": "btree",
3240
+ "with": {}
3241
+ },
3242
+ "work_app_github_repositories_full_name_idx": {
3243
+ "name": "work_app_github_repositories_full_name_idx",
3244
+ "columns": [
3245
+ {
3246
+ "expression": "repository_full_name",
3247
+ "isExpression": false,
3248
+ "asc": true,
3249
+ "nulls": "last"
3250
+ }
3251
+ ],
3252
+ "isUnique": false,
3253
+ "concurrently": false,
3254
+ "method": "btree",
3255
+ "with": {}
3256
+ }
3257
+ },
3258
+ "foreignKeys": {
3259
+ "work_app_github_repositories_installation_fk": {
3260
+ "name": "work_app_github_repositories_installation_fk",
3261
+ "tableFrom": "work_app_github_repositories",
3262
+ "tableTo": "work_app_github_installations",
3263
+ "columnsFrom": [
3264
+ "installation_db_id"
3265
+ ],
3266
+ "columnsTo": [
3267
+ "id"
3268
+ ],
3269
+ "onDelete": "cascade",
3270
+ "onUpdate": "no action"
3271
+ }
3272
+ },
3273
+ "compositePrimaryKeys": {},
3274
+ "uniqueConstraints": {
3275
+ "work_app_github_repositories_repo_installation_unique": {
3276
+ "name": "work_app_github_repositories_repo_installation_unique",
3277
+ "nullsNotDistinct": false,
3278
+ "columns": [
3279
+ "installation_db_id",
3280
+ "repository_id"
3281
+ ]
3282
+ }
3283
+ },
3284
+ "policies": {},
3285
+ "checkConstraints": {},
3286
+ "isRLSEnabled": false
3287
+ },
3288
+ "public.work_app_slack_channel_agent_configs": {
3289
+ "name": "work_app_slack_channel_agent_configs",
3290
+ "schema": "",
3291
+ "columns": {
3292
+ "id": {
3293
+ "name": "id",
3294
+ "type": "varchar(256)",
3295
+ "primaryKey": true,
3296
+ "notNull": true
3297
+ },
3298
+ "tenant_id": {
3299
+ "name": "tenant_id",
3300
+ "type": "varchar(256)",
3301
+ "primaryKey": false,
3302
+ "notNull": true
3303
+ },
3304
+ "slack_team_id": {
3305
+ "name": "slack_team_id",
3306
+ "type": "varchar(256)",
3307
+ "primaryKey": false,
3308
+ "notNull": true
3309
+ },
3310
+ "slack_channel_id": {
3311
+ "name": "slack_channel_id",
3312
+ "type": "varchar(256)",
3313
+ "primaryKey": false,
3314
+ "notNull": true
3315
+ },
3316
+ "slack_channel_name": {
3317
+ "name": "slack_channel_name",
3318
+ "type": "varchar(256)",
3319
+ "primaryKey": false,
3320
+ "notNull": false
3321
+ },
3322
+ "slack_channel_type": {
3323
+ "name": "slack_channel_type",
3324
+ "type": "varchar(50)",
3325
+ "primaryKey": false,
3326
+ "notNull": false
3327
+ },
3328
+ "project_id": {
3329
+ "name": "project_id",
3330
+ "type": "varchar(256)",
3331
+ "primaryKey": false,
3332
+ "notNull": true
3333
+ },
3334
+ "agent_id": {
3335
+ "name": "agent_id",
3336
+ "type": "varchar(256)",
3337
+ "primaryKey": false,
3338
+ "notNull": true
3339
+ },
3340
+ "configured_by_user_id": {
3341
+ "name": "configured_by_user_id",
3342
+ "type": "text",
3343
+ "primaryKey": false,
3344
+ "notNull": false
3345
+ },
3346
+ "enabled": {
3347
+ "name": "enabled",
3348
+ "type": "boolean",
3349
+ "primaryKey": false,
3350
+ "notNull": true,
3351
+ "default": true
3352
+ },
3353
+ "grant_access_to_members": {
3354
+ "name": "grant_access_to_members",
3355
+ "type": "boolean",
3356
+ "primaryKey": false,
3357
+ "notNull": true,
3358
+ "default": true
3359
+ },
3360
+ "created_at": {
3361
+ "name": "created_at",
3362
+ "type": "timestamp",
3363
+ "primaryKey": false,
3364
+ "notNull": true,
3365
+ "default": "now()"
3366
+ },
3367
+ "updated_at": {
3368
+ "name": "updated_at",
3369
+ "type": "timestamp",
3370
+ "primaryKey": false,
3371
+ "notNull": true,
3372
+ "default": "now()"
3373
+ }
3374
+ },
3375
+ "indexes": {
3376
+ "work_app_slack_channel_agent_configs_tenant_idx": {
3377
+ "name": "work_app_slack_channel_agent_configs_tenant_idx",
3378
+ "columns": [
3379
+ {
3380
+ "expression": "tenant_id",
3381
+ "isExpression": false,
3382
+ "asc": true,
3383
+ "nulls": "last"
3384
+ }
3385
+ ],
3386
+ "isUnique": false,
3387
+ "concurrently": false,
3388
+ "method": "btree",
3389
+ "with": {}
3390
+ },
3391
+ "work_app_slack_channel_agent_configs_team_idx": {
3392
+ "name": "work_app_slack_channel_agent_configs_team_idx",
3393
+ "columns": [
3394
+ {
3395
+ "expression": "slack_team_id",
3396
+ "isExpression": false,
3397
+ "asc": true,
3398
+ "nulls": "last"
3399
+ }
3400
+ ],
3401
+ "isUnique": false,
3402
+ "concurrently": false,
3403
+ "method": "btree",
3404
+ "with": {}
3405
+ },
3406
+ "work_app_slack_channel_agent_configs_channel_idx": {
3407
+ "name": "work_app_slack_channel_agent_configs_channel_idx",
3408
+ "columns": [
3409
+ {
3410
+ "expression": "slack_channel_id",
3411
+ "isExpression": false,
3412
+ "asc": true,
3413
+ "nulls": "last"
3414
+ }
3415
+ ],
3416
+ "isUnique": false,
3417
+ "concurrently": false,
3418
+ "method": "btree",
3419
+ "with": {}
3420
+ },
3421
+ "work_app_slack_channel_agent_configs_tenant_team_idx": {
3422
+ "name": "work_app_slack_channel_agent_configs_tenant_team_idx",
3423
+ "columns": [
3424
+ {
3425
+ "expression": "tenant_id",
3426
+ "isExpression": false,
3427
+ "asc": true,
3428
+ "nulls": "last"
3429
+ },
3430
+ {
3431
+ "expression": "slack_team_id",
3432
+ "isExpression": false,
3433
+ "asc": true,
3434
+ "nulls": "last"
3435
+ }
3436
+ ],
3437
+ "isUnique": false,
3438
+ "concurrently": false,
3439
+ "method": "btree",
3440
+ "with": {}
3441
+ },
3442
+ "work_app_slack_channel_agent_configs_agent_idx": {
3443
+ "name": "work_app_slack_channel_agent_configs_agent_idx",
3444
+ "columns": [
3445
+ {
3446
+ "expression": "tenant_id",
3447
+ "isExpression": false,
3448
+ "asc": true,
3449
+ "nulls": "last"
3450
+ },
3451
+ {
3452
+ "expression": "project_id",
3453
+ "isExpression": false,
3454
+ "asc": true,
3455
+ "nulls": "last"
3456
+ },
3457
+ {
3458
+ "expression": "agent_id",
3459
+ "isExpression": false,
3460
+ "asc": true,
3461
+ "nulls": "last"
3462
+ }
3463
+ ],
3464
+ "isUnique": false,
3465
+ "concurrently": false,
3466
+ "method": "btree",
3467
+ "with": {}
3468
+ },
3469
+ "work_app_slack_channel_agent_configs_project_idx": {
3470
+ "name": "work_app_slack_channel_agent_configs_project_idx",
3471
+ "columns": [
3472
+ {
3473
+ "expression": "tenant_id",
3474
+ "isExpression": false,
3475
+ "asc": true,
3476
+ "nulls": "last"
3477
+ },
3478
+ {
3479
+ "expression": "project_id",
3480
+ "isExpression": false,
3481
+ "asc": true,
3482
+ "nulls": "last"
3483
+ }
3484
+ ],
3485
+ "isUnique": false,
3486
+ "concurrently": false,
3487
+ "method": "btree",
3488
+ "with": {}
3489
+ }
3490
+ },
3491
+ "foreignKeys": {
3492
+ "work_app_slack_channel_agent_configs_tenant_id_organization_id_fk": {
3493
+ "name": "work_app_slack_channel_agent_configs_tenant_id_organization_id_fk",
3494
+ "tableFrom": "work_app_slack_channel_agent_configs",
3495
+ "tableTo": "organization",
3496
+ "columnsFrom": [
3497
+ "tenant_id"
3498
+ ],
3499
+ "columnsTo": [
3500
+ "id"
3501
+ ],
3502
+ "onDelete": "cascade",
3503
+ "onUpdate": "no action"
3504
+ },
3505
+ "work_app_slack_channel_agent_configs_configured_by_user_id_user_id_fk": {
3506
+ "name": "work_app_slack_channel_agent_configs_configured_by_user_id_user_id_fk",
3507
+ "tableFrom": "work_app_slack_channel_agent_configs",
3508
+ "tableTo": "user",
3509
+ "columnsFrom": [
3510
+ "configured_by_user_id"
3511
+ ],
3512
+ "columnsTo": [
3513
+ "id"
3514
+ ],
3515
+ "onDelete": "set null",
3516
+ "onUpdate": "no action"
3517
+ }
3518
+ },
3519
+ "compositePrimaryKeys": {},
3520
+ "uniqueConstraints": {
3521
+ "work_app_slack_channel_agent_configs_unique": {
3522
+ "name": "work_app_slack_channel_agent_configs_unique",
3523
+ "nullsNotDistinct": false,
3524
+ "columns": [
3525
+ "tenant_id",
3526
+ "slack_team_id",
3527
+ "slack_channel_id"
3528
+ ]
3529
+ }
3530
+ },
3531
+ "policies": {},
3532
+ "checkConstraints": {},
3533
+ "isRLSEnabled": false
3534
+ },
3535
+ "public.work_app_slack_mcp_tool_access_config": {
3536
+ "name": "work_app_slack_mcp_tool_access_config",
3537
+ "schema": "",
3538
+ "columns": {
3539
+ "tool_id": {
3540
+ "name": "tool_id",
3541
+ "type": "varchar(256)",
3542
+ "primaryKey": false,
3543
+ "notNull": true
3544
+ },
3545
+ "tenant_id": {
3546
+ "name": "tenant_id",
3547
+ "type": "varchar(256)",
3548
+ "primaryKey": false,
3549
+ "notNull": true
3550
+ },
3551
+ "project_id": {
3552
+ "name": "project_id",
3553
+ "type": "varchar(256)",
3554
+ "primaryKey": false,
3555
+ "notNull": true
3556
+ },
3557
+ "channel_access_mode": {
3558
+ "name": "channel_access_mode",
3559
+ "type": "varchar(20)",
3560
+ "primaryKey": false,
3561
+ "notNull": true
3562
+ },
3563
+ "dm_enabled": {
3564
+ "name": "dm_enabled",
3565
+ "type": "boolean",
3566
+ "primaryKey": false,
3567
+ "notNull": true,
3568
+ "default": false
3569
+ },
3570
+ "channel_ids": {
3571
+ "name": "channel_ids",
3572
+ "type": "jsonb",
3573
+ "primaryKey": false,
3574
+ "notNull": true,
3575
+ "default": "'[]'::jsonb"
3576
+ },
3577
+ "created_at": {
3578
+ "name": "created_at",
3579
+ "type": "timestamp",
3580
+ "primaryKey": false,
3581
+ "notNull": true,
3582
+ "default": "now()"
3583
+ },
3584
+ "updated_at": {
3585
+ "name": "updated_at",
3586
+ "type": "timestamp",
3587
+ "primaryKey": false,
3588
+ "notNull": true,
3589
+ "default": "now()"
3590
+ }
3591
+ },
3592
+ "indexes": {
3593
+ "work_app_slack_mcp_tool_access_config_tenant_idx": {
3594
+ "name": "work_app_slack_mcp_tool_access_config_tenant_idx",
3595
+ "columns": [
3596
+ {
3597
+ "expression": "tenant_id",
3598
+ "isExpression": false,
3599
+ "asc": true,
3600
+ "nulls": "last"
3601
+ }
3602
+ ],
3603
+ "isUnique": false,
3604
+ "concurrently": false,
3605
+ "method": "btree",
3606
+ "with": {}
3607
+ },
3608
+ "work_app_slack_mcp_tool_access_config_project_idx": {
3609
+ "name": "work_app_slack_mcp_tool_access_config_project_idx",
3610
+ "columns": [
3611
+ {
3612
+ "expression": "project_id",
3613
+ "isExpression": false,
3614
+ "asc": true,
3615
+ "nulls": "last"
3616
+ }
3617
+ ],
3618
+ "isUnique": false,
3619
+ "concurrently": false,
3620
+ "method": "btree",
3621
+ "with": {}
3622
+ }
3623
+ },
3624
+ "foreignKeys": {
3625
+ "work_app_slack_mcp_tool_access_config_tenant_fk": {
3626
+ "name": "work_app_slack_mcp_tool_access_config_tenant_fk",
3627
+ "tableFrom": "work_app_slack_mcp_tool_access_config",
3628
+ "tableTo": "organization",
3629
+ "columnsFrom": [
3630
+ "tenant_id"
3631
+ ],
3632
+ "columnsTo": [
3633
+ "id"
3634
+ ],
3635
+ "onDelete": "cascade",
3636
+ "onUpdate": "no action"
3637
+ }
3638
+ },
3639
+ "compositePrimaryKeys": {
3640
+ "work_app_slack_mcp_tool_access_config_tenant_id_project_id_tool_id_pk": {
3641
+ "name": "work_app_slack_mcp_tool_access_config_tenant_id_project_id_tool_id_pk",
3642
+ "columns": [
3643
+ "tenant_id",
3644
+ "project_id",
3645
+ "tool_id"
3646
+ ]
3647
+ }
3648
+ },
3649
+ "uniqueConstraints": {},
3650
+ "policies": {},
3651
+ "checkConstraints": {},
3652
+ "isRLSEnabled": false
3653
+ },
3654
+ "public.work_app_slack_user_mappings": {
3655
+ "name": "work_app_slack_user_mappings",
3656
+ "schema": "",
3657
+ "columns": {
3658
+ "id": {
3659
+ "name": "id",
3660
+ "type": "varchar(256)",
3661
+ "primaryKey": true,
3662
+ "notNull": true
3663
+ },
3664
+ "tenant_id": {
3665
+ "name": "tenant_id",
3666
+ "type": "varchar(256)",
3667
+ "primaryKey": false,
3668
+ "notNull": true
3669
+ },
3670
+ "client_id": {
3671
+ "name": "client_id",
3672
+ "type": "varchar(256)",
3673
+ "primaryKey": false,
3674
+ "notNull": true,
3675
+ "default": "'work-apps-slack'"
3676
+ },
3677
+ "slack_user_id": {
3678
+ "name": "slack_user_id",
3679
+ "type": "varchar(256)",
3680
+ "primaryKey": false,
3681
+ "notNull": true
3682
+ },
3683
+ "slack_team_id": {
3684
+ "name": "slack_team_id",
3685
+ "type": "varchar(256)",
3686
+ "primaryKey": false,
3687
+ "notNull": true
3688
+ },
3689
+ "slack_enterprise_id": {
3690
+ "name": "slack_enterprise_id",
3691
+ "type": "varchar(256)",
3692
+ "primaryKey": false,
3693
+ "notNull": false
3694
+ },
3695
+ "inkeep_user_id": {
3696
+ "name": "inkeep_user_id",
3697
+ "type": "text",
3698
+ "primaryKey": false,
3699
+ "notNull": true
3700
+ },
3701
+ "slack_username": {
3702
+ "name": "slack_username",
3703
+ "type": "varchar(256)",
3704
+ "primaryKey": false,
3705
+ "notNull": false
3706
+ },
3707
+ "slack_email": {
3708
+ "name": "slack_email",
3709
+ "type": "varchar(256)",
3710
+ "primaryKey": false,
3711
+ "notNull": false
3712
+ },
3713
+ "linked_at": {
3714
+ "name": "linked_at",
3715
+ "type": "timestamp",
3716
+ "primaryKey": false,
3717
+ "notNull": true,
3718
+ "default": "now()"
3719
+ },
3720
+ "last_used_at": {
3721
+ "name": "last_used_at",
3722
+ "type": "timestamp",
3723
+ "primaryKey": false,
3724
+ "notNull": false
3725
+ },
3726
+ "created_at": {
3727
+ "name": "created_at",
3728
+ "type": "timestamp",
3729
+ "primaryKey": false,
3730
+ "notNull": true,
3731
+ "default": "now()"
3732
+ },
3733
+ "updated_at": {
3734
+ "name": "updated_at",
3735
+ "type": "timestamp",
3736
+ "primaryKey": false,
3737
+ "notNull": true,
3738
+ "default": "now()"
3739
+ }
3740
+ },
3741
+ "indexes": {
3742
+ "work_app_slack_user_mappings_tenant_idx": {
3743
+ "name": "work_app_slack_user_mappings_tenant_idx",
3744
+ "columns": [
3745
+ {
3746
+ "expression": "tenant_id",
3747
+ "isExpression": false,
3748
+ "asc": true,
3749
+ "nulls": "last"
3750
+ }
3751
+ ],
3752
+ "isUnique": false,
3753
+ "concurrently": false,
3754
+ "method": "btree",
3755
+ "with": {}
3756
+ },
3757
+ "work_app_slack_user_mappings_user_idx": {
3758
+ "name": "work_app_slack_user_mappings_user_idx",
3759
+ "columns": [
3760
+ {
3761
+ "expression": "inkeep_user_id",
3762
+ "isExpression": false,
3763
+ "asc": true,
3764
+ "nulls": "last"
3765
+ }
3766
+ ],
3767
+ "isUnique": false,
3768
+ "concurrently": false,
3769
+ "method": "btree",
3770
+ "with": {}
3771
+ },
3772
+ "work_app_slack_user_mappings_team_idx": {
3773
+ "name": "work_app_slack_user_mappings_team_idx",
3774
+ "columns": [
3775
+ {
3776
+ "expression": "slack_team_id",
3777
+ "isExpression": false,
3778
+ "asc": true,
3779
+ "nulls": "last"
3780
+ }
3781
+ ],
3782
+ "isUnique": false,
3783
+ "concurrently": false,
3784
+ "method": "btree",
3785
+ "with": {}
3786
+ },
3787
+ "work_app_slack_user_mappings_slack_user_idx": {
3788
+ "name": "work_app_slack_user_mappings_slack_user_idx",
3789
+ "columns": [
3790
+ {
3791
+ "expression": "slack_user_id",
3792
+ "isExpression": false,
3793
+ "asc": true,
3794
+ "nulls": "last"
3795
+ }
3796
+ ],
3797
+ "isUnique": false,
3798
+ "concurrently": false,
3799
+ "method": "btree",
3800
+ "with": {}
3801
+ },
3802
+ "work_app_slack_user_mappings_tenant_team_idx": {
3803
+ "name": "work_app_slack_user_mappings_tenant_team_idx",
3804
+ "columns": [
3805
+ {
3806
+ "expression": "tenant_id",
3807
+ "isExpression": false,
3808
+ "asc": true,
3809
+ "nulls": "last"
3810
+ },
3811
+ {
3812
+ "expression": "slack_team_id",
3813
+ "isExpression": false,
3814
+ "asc": true,
3815
+ "nulls": "last"
3816
+ }
3817
+ ],
3818
+ "isUnique": false,
3819
+ "concurrently": false,
3820
+ "method": "btree",
3821
+ "with": {}
3822
+ },
3823
+ "work_app_slack_user_mappings_lookup_idx": {
3824
+ "name": "work_app_slack_user_mappings_lookup_idx",
3825
+ "columns": [
3826
+ {
3827
+ "expression": "client_id",
3828
+ "isExpression": false,
3829
+ "asc": true,
3830
+ "nulls": "last"
3831
+ },
3832
+ {
3833
+ "expression": "slack_team_id",
3834
+ "isExpression": false,
3835
+ "asc": true,
3836
+ "nulls": "last"
3837
+ },
3838
+ {
3839
+ "expression": "slack_user_id",
3840
+ "isExpression": false,
3841
+ "asc": true,
3842
+ "nulls": "last"
3843
+ }
3844
+ ],
3845
+ "isUnique": false,
3846
+ "concurrently": false,
3847
+ "method": "btree",
3848
+ "with": {}
3849
+ }
3850
+ },
3851
+ "foreignKeys": {
3852
+ "work_app_slack_user_mappings_tenant_id_organization_id_fk": {
3853
+ "name": "work_app_slack_user_mappings_tenant_id_organization_id_fk",
3854
+ "tableFrom": "work_app_slack_user_mappings",
3855
+ "tableTo": "organization",
3856
+ "columnsFrom": [
3857
+ "tenant_id"
3858
+ ],
3859
+ "columnsTo": [
3860
+ "id"
3861
+ ],
3862
+ "onDelete": "cascade",
3863
+ "onUpdate": "no action"
3864
+ },
3865
+ "work_app_slack_user_mappings_inkeep_user_id_user_id_fk": {
3866
+ "name": "work_app_slack_user_mappings_inkeep_user_id_user_id_fk",
3867
+ "tableFrom": "work_app_slack_user_mappings",
3868
+ "tableTo": "user",
3869
+ "columnsFrom": [
3870
+ "inkeep_user_id"
3871
+ ],
3872
+ "columnsTo": [
3873
+ "id"
3874
+ ],
3875
+ "onDelete": "cascade",
3876
+ "onUpdate": "no action"
3877
+ }
3878
+ },
3879
+ "compositePrimaryKeys": {},
3880
+ "uniqueConstraints": {
3881
+ "work_app_slack_user_mappings_unique": {
3882
+ "name": "work_app_slack_user_mappings_unique",
3883
+ "nullsNotDistinct": false,
3884
+ "columns": [
3885
+ "tenant_id",
3886
+ "client_id",
3887
+ "slack_team_id",
3888
+ "slack_user_id"
3889
+ ]
3890
+ }
3891
+ },
3892
+ "policies": {},
3893
+ "checkConstraints": {},
3894
+ "isRLSEnabled": false
3895
+ },
3896
+ "public.work_app_slack_workspaces": {
3897
+ "name": "work_app_slack_workspaces",
3898
+ "schema": "",
3899
+ "columns": {
3900
+ "id": {
3901
+ "name": "id",
3902
+ "type": "varchar(256)",
3903
+ "primaryKey": true,
3904
+ "notNull": true
3905
+ },
3906
+ "tenant_id": {
3907
+ "name": "tenant_id",
3908
+ "type": "varchar(256)",
3909
+ "primaryKey": false,
3910
+ "notNull": true
3911
+ },
3912
+ "slack_team_id": {
3913
+ "name": "slack_team_id",
3914
+ "type": "varchar(256)",
3915
+ "primaryKey": false,
3916
+ "notNull": true
3917
+ },
3918
+ "slack_enterprise_id": {
3919
+ "name": "slack_enterprise_id",
3920
+ "type": "varchar(256)",
3921
+ "primaryKey": false,
3922
+ "notNull": false
3923
+ },
3924
+ "slack_app_id": {
3925
+ "name": "slack_app_id",
3926
+ "type": "varchar(256)",
3927
+ "primaryKey": false,
3928
+ "notNull": false
3929
+ },
3930
+ "slack_team_name": {
3931
+ "name": "slack_team_name",
3932
+ "type": "varchar(512)",
3933
+ "primaryKey": false,
3934
+ "notNull": false
3935
+ },
3936
+ "nango_provider_config_key": {
3937
+ "name": "nango_provider_config_key",
3938
+ "type": "varchar(256)",
3939
+ "primaryKey": false,
3940
+ "notNull": true,
3941
+ "default": "'work-apps-slack'"
3942
+ },
3943
+ "nango_connection_id": {
3944
+ "name": "nango_connection_id",
3945
+ "type": "varchar(256)",
3946
+ "primaryKey": false,
3947
+ "notNull": true
3948
+ },
3949
+ "status": {
3950
+ "name": "status",
3951
+ "type": "varchar(20)",
3952
+ "primaryKey": false,
3953
+ "notNull": true,
3954
+ "default": "'active'"
3955
+ },
3956
+ "installed_by_user_id": {
3957
+ "name": "installed_by_user_id",
3958
+ "type": "text",
3959
+ "primaryKey": false,
3960
+ "notNull": false
3961
+ },
3962
+ "should_allow_join_from_workspace": {
3963
+ "name": "should_allow_join_from_workspace",
3964
+ "type": "boolean",
3965
+ "primaryKey": false,
3966
+ "notNull": true,
3967
+ "default": false
3968
+ },
3969
+ "default_agent_id": {
3970
+ "name": "default_agent_id",
3971
+ "type": "varchar(256)",
3972
+ "primaryKey": false,
3973
+ "notNull": false
3974
+ },
3975
+ "default_project_id": {
3976
+ "name": "default_project_id",
3977
+ "type": "varchar(256)",
3978
+ "primaryKey": false,
3979
+ "notNull": false
3980
+ },
3981
+ "default_grant_access_to_members": {
3982
+ "name": "default_grant_access_to_members",
3983
+ "type": "boolean",
3984
+ "primaryKey": false,
3985
+ "notNull": false,
3986
+ "default": true
3987
+ },
3988
+ "created_at": {
3989
+ "name": "created_at",
3990
+ "type": "timestamp",
3991
+ "primaryKey": false,
3992
+ "notNull": true,
3993
+ "default": "now()"
3994
+ },
3995
+ "updated_at": {
3996
+ "name": "updated_at",
3997
+ "type": "timestamp",
3998
+ "primaryKey": false,
3999
+ "notNull": true,
4000
+ "default": "now()"
4001
+ }
4002
+ },
4003
+ "indexes": {
4004
+ "work_app_slack_workspaces_tenant_idx": {
4005
+ "name": "work_app_slack_workspaces_tenant_idx",
4006
+ "columns": [
4007
+ {
4008
+ "expression": "tenant_id",
4009
+ "isExpression": false,
4010
+ "asc": true,
4011
+ "nulls": "last"
4012
+ }
4013
+ ],
4014
+ "isUnique": false,
4015
+ "concurrently": false,
4016
+ "method": "btree",
4017
+ "with": {}
4018
+ },
4019
+ "work_app_slack_workspaces_team_idx": {
4020
+ "name": "work_app_slack_workspaces_team_idx",
4021
+ "columns": [
4022
+ {
4023
+ "expression": "slack_team_id",
4024
+ "isExpression": false,
4025
+ "asc": true,
4026
+ "nulls": "last"
4027
+ }
4028
+ ],
4029
+ "isUnique": false,
4030
+ "concurrently": false,
4031
+ "method": "btree",
4032
+ "with": {}
4033
+ },
4034
+ "work_app_slack_workspaces_defaults_idx": {
4035
+ "name": "work_app_slack_workspaces_defaults_idx",
4036
+ "columns": [
4037
+ {
4038
+ "expression": "tenant_id",
4039
+ "isExpression": false,
4040
+ "asc": true,
4041
+ "nulls": "last"
4042
+ },
4043
+ {
4044
+ "expression": "default_project_id",
4045
+ "isExpression": false,
4046
+ "asc": true,
4047
+ "nulls": "last"
4048
+ },
4049
+ {
4050
+ "expression": "default_agent_id",
4051
+ "isExpression": false,
4052
+ "asc": true,
4053
+ "nulls": "last"
4054
+ }
4055
+ ],
4056
+ "isUnique": false,
4057
+ "concurrently": false,
4058
+ "method": "btree",
4059
+ "with": {}
4060
+ }
4061
+ },
4062
+ "foreignKeys": {
4063
+ "work_app_slack_workspaces_tenant_id_organization_id_fk": {
4064
+ "name": "work_app_slack_workspaces_tenant_id_organization_id_fk",
4065
+ "tableFrom": "work_app_slack_workspaces",
4066
+ "tableTo": "organization",
4067
+ "columnsFrom": [
4068
+ "tenant_id"
4069
+ ],
4070
+ "columnsTo": [
4071
+ "id"
4072
+ ],
4073
+ "onDelete": "cascade",
4074
+ "onUpdate": "no action"
4075
+ },
4076
+ "work_app_slack_workspaces_installed_by_user_id_user_id_fk": {
4077
+ "name": "work_app_slack_workspaces_installed_by_user_id_user_id_fk",
4078
+ "tableFrom": "work_app_slack_workspaces",
4079
+ "tableTo": "user",
4080
+ "columnsFrom": [
4081
+ "installed_by_user_id"
4082
+ ],
4083
+ "columnsTo": [
4084
+ "id"
4085
+ ],
4086
+ "onDelete": "set null",
4087
+ "onUpdate": "no action"
4088
+ }
4089
+ },
4090
+ "compositePrimaryKeys": {},
4091
+ "uniqueConstraints": {
4092
+ "work_app_slack_workspaces_tenant_team_unique": {
4093
+ "name": "work_app_slack_workspaces_tenant_team_unique",
4094
+ "nullsNotDistinct": false,
4095
+ "columns": [
4096
+ "tenant_id",
4097
+ "slack_team_id"
4098
+ ]
4099
+ },
4100
+ "work_app_slack_workspaces_nango_connection_unique": {
4101
+ "name": "work_app_slack_workspaces_nango_connection_unique",
4102
+ "nullsNotDistinct": false,
4103
+ "columns": [
4104
+ "nango_connection_id"
4105
+ ]
4106
+ }
4107
+ },
4108
+ "policies": {},
4109
+ "checkConstraints": {},
4110
+ "isRLSEnabled": false
4111
+ }
4112
+ },
4113
+ "enums": {},
4114
+ "schemas": {},
4115
+ "sequences": {},
4116
+ "roles": {},
4117
+ "policies": {},
4118
+ "views": {},
4119
+ "_meta": {
4120
+ "columns": {},
4121
+ "schemas": {},
4122
+ "tables": {}
4123
+ }
4124
+ }