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