@inkeep/agents-core 0.63.2 → 0.64.1

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