@inkeep/agents-core 0.47.5 → 0.48.0

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