@inkeep/agents-core 0.64.2 → 0.64.7

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