@inkeep/agents-core 0.50.6 → 0.51.0

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