@inkeep/agents-core 0.58.21 → 0.59.1

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