@sentry/junior 0.255.0 → 0.257.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 (68) hide show
  1. package/dist/{admin-CeJh4SuR.js → admin-DgIkm6Vy.js} +1 -1
  2. package/dist/{agent-hooks-CDVx26Uu.js → agent-hooks-BjtTzvru.js} +13 -13
  3. package/dist/{agent-invocations-BY60iNw-.js → agent-invocations-Bdu3ROfo.js} +2 -1
  4. package/dist/{agent-runner-Caiof09f.js → agent-runner-D7OboVb3.js} +41 -33
  5. package/dist/api/schema.d.ts +41 -1
  6. package/dist/api/schema.js +2 -2
  7. package/dist/api.js +121 -33
  8. package/dist/{app-B0gT1Slp.d.ts → app-BsU5QNBd.d.ts} +7 -1
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +587 -210
  11. package/dist/{assistant-reply-BddmM66R.js → assistant-reply-CbTPebzL.js} +1 -1
  12. package/dist/{briefs-iVq_8-ft.js → briefs-oLOldnDM.js} +4 -4
  13. package/dist/{catalog-runtime-hKmI-iZa.js → catalog-runtime-CZzhGQ7F.js} +1 -1
  14. package/dist/cli/chat.js +16 -16
  15. package/dist/cli/check.js +3 -3
  16. package/dist/cli/main.js +2 -2
  17. package/dist/cli/plugins.js +4 -4
  18. package/dist/cli/snapshot-create.js +3 -3
  19. package/dist/cli/upgrade.js +3 -3
  20. package/dist/{client-Clj7onnT.js → client-D8HnkOQX.js} +2 -2
  21. package/dist/{config-BDAfLTI9.js → config-CJRnWK9H.js} +2 -2
  22. package/dist/{connections-BC0RTejT.js → connections-ClYrKzpX.js} +16 -11
  23. package/dist/{conversation-T18Xlkx9.js → conversation-CKNLYBJt.js} +3 -2
  24. package/dist/{conversation-privacy-1ERtieuM.js → conversation-privacy-C8b1nphZ.js} +1 -1
  25. package/dist/{credential-sync-BZuqqIHk.js → credential-sync-BXfohNmJ.js} +82 -40
  26. package/dist/{executor-Dh4Ofsnx.js → executor-Do0THDRR.js} +33 -23
  27. package/dist/{experimental-Qn9rKLgx.js → experimental-CQIvMUO7.js} +1 -0
  28. package/dist/{images-C-WOnTc_.js → images-BN_BiBXF.js} +3 -3
  29. package/dist/instrumentation.js +2 -2
  30. package/dist/{job-queue-BaCL36FY.js → job-queue-B6SV9uVa.js} +1 -1
  31. package/dist/{logging-D3aYP0aG.js → logging-CWxiIuCF.js} +50 -15
  32. package/dist/{message-B9xqD2BP.js → message-TUOdbSBW.js} +3 -3
  33. package/dist/nitro.d.ts +1 -1
  34. package/dist/nitro.js +3 -3
  35. package/dist/{oauth-callback-server-i5qdAou6.js → oauth-callback-server-Dj5UJODo.js} +2 -2
  36. package/dist/{pending-auth-D2t1Moxf.js → pending-auth-s_QFribU.js} +3 -3
  37. package/dist/{profile-DnkX3e2S.js → profile-h-72wM78.js} +4 -4
  38. package/dist/{prompt-C04mP1hu.js → prompt-DyoEj9c2.js} +1 -1
  39. package/dist/{registry-CmKmKHpp.js → registry-sLTr-sV9.js} +43 -3
  40. package/dist/{resolve-jfNHtEBx.js → resolve-ncQPZROQ.js} +2 -2
  41. package/dist/{result-Df5nEDX2.js → result-C883vngT.js} +7 -7
  42. package/dist/{runner-CmzoXEI4.js → runner-CzYImdOF.js} +10 -10
  43. package/dist/{sandbox-egress-signals-DjMNKLZz.js → sandbox-egress-signals-CZbMINHI.js} +1 -1
  44. package/dist/{schema-BBgv0MNf.js → schema-Dy69D4Ge.js} +4 -3
  45. package/dist/{session-stop-BEBfE97J.js → session-stop-CQjKd4a2.js} +46 -20
  46. package/dist/{skills-Dc-AMYi4.js → skills-C22SLruK.js} +2 -2
  47. package/dist/{spawn-OgTwBUj0.js → spawn-DY9CLXDL.js} +2 -2
  48. package/dist/{store-BashBewg.js → store-DXFIQy-G.js} +6 -6
  49. package/dist/{task-queue-VvIKqlQ4.js → task-queue-B17vV0La.js} +3 -3
  50. package/dist/{task-runner-D2CpD6GN.js → task-runner-DUjvzYXj.js} +11 -11
  51. package/dist/{tasks-dJooqiip.js → tasks-D_WIJtvO.js} +25 -10
  52. package/dist/{thread-state-CsMC-ob0.js → thread-state-Ch4yuCqG.js} +7 -7
  53. package/dist/{turn-failure-response-zB364t7_.js → turn-failure-response-C5nBKC4S.js} +8 -8
  54. package/dist/{turn-lifecycle-BfodfmiY.js → turn-lifecycle-CO-ylUmV.js} +1 -1
  55. package/dist/{turn-session-routing-BAh_qsBJ.js → turn-session-routing-B3LWooK5.js} +1 -1
  56. package/dist/{validation-LzIilOb6.js → validation-CXYxaNYx.js} +1 -1
  57. package/dist/{version-CDM8Rq6E.js → version-BcdZy2zg.js} +1 -1
  58. package/dist/version.js +1 -1
  59. package/dist/{viewer-Rnim7alE.js → viewer-DSZXygMU.js} +53 -5
  60. package/dist/{web-input-Dc1VwcT4.js → web-input-B9Bv0_lR.js} +73 -75
  61. package/dist/{work-BAn43SsN.js → work-nAfDSUFP.js} +9 -9
  62. package/dist/{worker-mBXq4_zg.js → worker-vGXZ6XFT.js} +5 -5
  63. package/migrations/0059_automation_run_version.sql +2 -0
  64. package/migrations/0060_identity_signed_in_at.sql +1 -0
  65. package/migrations/meta/0059_snapshot.json +3619 -0
  66. package/migrations/meta/0060_snapshot.json +3465 -0
  67. package/migrations/meta/_journal.json +15 -1
  68. package/package.json +6 -5
@@ -0,0 +1,3465 @@
1
+ {
2
+ "id": "f2dd4b37-6caf-4453-9552-3ffafb9ffe5c",
3
+ "prevId": "6936b8a8-1c94-4be1-a259-10512747eb34",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_agent_bindings": {
8
+ "name": "junior_agent_bindings",
9
+ "schema": "",
10
+ "columns": {
11
+ "parent_conversation_id": {
12
+ "name": "parent_conversation_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "child_conversation_id": {
24
+ "name": "child_conversation_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ }
29
+ },
30
+ "indexes": {
31
+ "junior_agent_bindings_child_idx": {
32
+ "name": "junior_agent_bindings_child_idx",
33
+ "columns": [
34
+ {
35
+ "expression": "child_conversation_id",
36
+ "isExpression": false,
37
+ "asc": true,
38
+ "nulls": "last"
39
+ }
40
+ ],
41
+ "isUnique": true,
42
+ "concurrently": false,
43
+ "method": "btree",
44
+ "with": {}
45
+ }
46
+ },
47
+ "foreignKeys": {
48
+ "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk": {
49
+ "name": "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk",
50
+ "tableFrom": "junior_agent_bindings",
51
+ "tableTo": "junior_conversations",
52
+ "columnsFrom": ["parent_conversation_id"],
53
+ "columnsTo": ["conversation_id"],
54
+ "onDelete": "no action",
55
+ "onUpdate": "no action"
56
+ },
57
+ "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk": {
58
+ "name": "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk",
59
+ "tableFrom": "junior_agent_bindings",
60
+ "tableTo": "junior_conversations",
61
+ "columnsFrom": ["child_conversation_id"],
62
+ "columnsTo": ["conversation_id"],
63
+ "onDelete": "no action",
64
+ "onUpdate": "no action"
65
+ }
66
+ },
67
+ "compositePrimaryKeys": {
68
+ "junior_agent_bindings_parent_conversation_id_name_pk": {
69
+ "name": "junior_agent_bindings_parent_conversation_id_name_pk",
70
+ "columns": ["parent_conversation_id", "name"]
71
+ }
72
+ },
73
+ "uniqueConstraints": {},
74
+ "policies": {},
75
+ "checkConstraints": {},
76
+ "isRLSEnabled": false
77
+ },
78
+ "public.junior_agent_invocations": {
79
+ "name": "junior_agent_invocations",
80
+ "schema": "",
81
+ "columns": {
82
+ "invocation_id": {
83
+ "name": "invocation_id",
84
+ "type": "text",
85
+ "primaryKey": true,
86
+ "notNull": true
87
+ },
88
+ "parent_conversation_id": {
89
+ "name": "parent_conversation_id",
90
+ "type": "text",
91
+ "primaryKey": false,
92
+ "notNull": true
93
+ },
94
+ "child_conversation_id": {
95
+ "name": "child_conversation_id",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": true
99
+ },
100
+ "agent_name": {
101
+ "name": "agent_name",
102
+ "type": "text",
103
+ "primaryKey": false,
104
+ "notNull": false
105
+ },
106
+ "input": {
107
+ "name": "input",
108
+ "type": "text",
109
+ "primaryKey": false,
110
+ "notNull": true
111
+ },
112
+ "title": {
113
+ "name": "title",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": false
117
+ },
118
+ "actor_json": {
119
+ "name": "actor_json",
120
+ "type": "jsonb",
121
+ "primaryKey": false,
122
+ "notNull": true
123
+ },
124
+ "credential_context_json": {
125
+ "name": "credential_context_json",
126
+ "type": "jsonb",
127
+ "primaryKey": false,
128
+ "notNull": false
129
+ },
130
+ "source_json": {
131
+ "name": "source_json",
132
+ "type": "jsonb",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "destination_json": {
137
+ "name": "destination_json",
138
+ "type": "jsonb",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "destination_visibility": {
143
+ "name": "destination_visibility",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": false
147
+ },
148
+ "model_profile": {
149
+ "name": "model_profile",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": false
153
+ },
154
+ "reasoning_level": {
155
+ "name": "reasoning_level",
156
+ "type": "text",
157
+ "primaryKey": false,
158
+ "notNull": false
159
+ },
160
+ "parent_tool_call_id": {
161
+ "name": "parent_tool_call_id",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": false
165
+ },
166
+ "status": {
167
+ "name": "status",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": true
171
+ },
172
+ "mailbox_status": {
173
+ "name": "mailbox_status",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": true
177
+ },
178
+ "parent_mailbox_status": {
179
+ "name": "parent_mailbox_status",
180
+ "type": "text",
181
+ "primaryKey": false,
182
+ "notNull": false
183
+ },
184
+ "result": {
185
+ "name": "result",
186
+ "type": "text",
187
+ "primaryKey": false,
188
+ "notNull": false
189
+ },
190
+ "error_message": {
191
+ "name": "error_message",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": false
195
+ },
196
+ "created_at": {
197
+ "name": "created_at",
198
+ "type": "timestamp with time zone",
199
+ "primaryKey": false,
200
+ "notNull": true
201
+ },
202
+ "updated_at": {
203
+ "name": "updated_at",
204
+ "type": "timestamp with time zone",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "terminal_at": {
209
+ "name": "terminal_at",
210
+ "type": "timestamp with time zone",
211
+ "primaryKey": false,
212
+ "notNull": false
213
+ }
214
+ },
215
+ "indexes": {
216
+ "junior_agent_invocations_child_idx": {
217
+ "name": "junior_agent_invocations_child_idx",
218
+ "columns": [
219
+ {
220
+ "expression": "child_conversation_id",
221
+ "isExpression": false,
222
+ "asc": true,
223
+ "nulls": "last"
224
+ }
225
+ ],
226
+ "isUnique": false,
227
+ "concurrently": false,
228
+ "method": "btree",
229
+ "with": {}
230
+ },
231
+ "junior_agent_invocations_mailbox_idx": {
232
+ "name": "junior_agent_invocations_mailbox_idx",
233
+ "columns": [
234
+ {
235
+ "expression": "mailbox_status",
236
+ "isExpression": false,
237
+ "asc": true,
238
+ "nulls": "last"
239
+ },
240
+ {
241
+ "expression": "created_at",
242
+ "isExpression": false,
243
+ "asc": true,
244
+ "nulls": "last"
245
+ }
246
+ ],
247
+ "isUnique": false,
248
+ "concurrently": false,
249
+ "method": "btree",
250
+ "with": {}
251
+ },
252
+ "junior_agent_invocations_parent_mailbox_idx": {
253
+ "name": "junior_agent_invocations_parent_mailbox_idx",
254
+ "columns": [
255
+ {
256
+ "expression": "parent_mailbox_status",
257
+ "isExpression": false,
258
+ "asc": true,
259
+ "nulls": "last"
260
+ },
261
+ {
262
+ "expression": "terminal_at",
263
+ "isExpression": false,
264
+ "asc": true,
265
+ "nulls": "last"
266
+ }
267
+ ],
268
+ "isUnique": false,
269
+ "concurrently": false,
270
+ "method": "btree",
271
+ "with": {}
272
+ }
273
+ },
274
+ "foreignKeys": {
275
+ "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk": {
276
+ "name": "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk",
277
+ "tableFrom": "junior_agent_invocations",
278
+ "tableTo": "junior_conversations",
279
+ "columnsFrom": ["parent_conversation_id"],
280
+ "columnsTo": ["conversation_id"],
281
+ "onDelete": "no action",
282
+ "onUpdate": "no action"
283
+ },
284
+ "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk": {
285
+ "name": "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk",
286
+ "tableFrom": "junior_agent_invocations",
287
+ "tableTo": "junior_conversations",
288
+ "columnsFrom": ["child_conversation_id"],
289
+ "columnsTo": ["conversation_id"],
290
+ "onDelete": "no action",
291
+ "onUpdate": "no action"
292
+ }
293
+ },
294
+ "compositePrimaryKeys": {},
295
+ "uniqueConstraints": {},
296
+ "policies": {},
297
+ "checkConstraints": {},
298
+ "isRLSEnabled": false
299
+ },
300
+ "public.junior_api_tokens": {
301
+ "name": "junior_api_tokens",
302
+ "schema": "",
303
+ "columns": {
304
+ "id": {
305
+ "name": "id",
306
+ "type": "text",
307
+ "primaryKey": true,
308
+ "notNull": true
309
+ },
310
+ "owner_email_normalized": {
311
+ "name": "owner_email_normalized",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": true
315
+ },
316
+ "name": {
317
+ "name": "name",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": true
321
+ },
322
+ "token_hash": {
323
+ "name": "token_hash",
324
+ "type": "text",
325
+ "primaryKey": false,
326
+ "notNull": true
327
+ },
328
+ "token_suffix": {
329
+ "name": "token_suffix",
330
+ "type": "text",
331
+ "primaryKey": false,
332
+ "notNull": true
333
+ },
334
+ "created_at": {
335
+ "name": "created_at",
336
+ "type": "timestamp with time zone",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "expires_at": {
341
+ "name": "expires_at",
342
+ "type": "timestamp with time zone",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "last_used_at": {
347
+ "name": "last_used_at",
348
+ "type": "timestamp with time zone",
349
+ "primaryKey": false,
350
+ "notNull": false
351
+ },
352
+ "revoked_at": {
353
+ "name": "revoked_at",
354
+ "type": "timestamp with time zone",
355
+ "primaryKey": false,
356
+ "notNull": false
357
+ }
358
+ },
359
+ "indexes": {
360
+ "junior_api_tokens_token_hash_uidx": {
361
+ "name": "junior_api_tokens_token_hash_uidx",
362
+ "columns": [
363
+ {
364
+ "expression": "token_hash",
365
+ "isExpression": false,
366
+ "asc": true,
367
+ "nulls": "last"
368
+ }
369
+ ],
370
+ "isUnique": true,
371
+ "concurrently": false,
372
+ "method": "btree",
373
+ "with": {}
374
+ },
375
+ "junior_api_tokens_owner_email_idx": {
376
+ "name": "junior_api_tokens_owner_email_idx",
377
+ "columns": [
378
+ {
379
+ "expression": "owner_email_normalized",
380
+ "isExpression": false,
381
+ "asc": true,
382
+ "nulls": "last"
383
+ }
384
+ ],
385
+ "isUnique": false,
386
+ "concurrently": false,
387
+ "method": "btree",
388
+ "with": {}
389
+ }
390
+ },
391
+ "foreignKeys": {},
392
+ "compositePrimaryKeys": {},
393
+ "uniqueConstraints": {},
394
+ "policies": {},
395
+ "checkConstraints": {},
396
+ "isRLSEnabled": false
397
+ },
398
+ "public.junior_artifacts": {
399
+ "name": "junior_artifacts",
400
+ "schema": "",
401
+ "columns": {
402
+ "id": {
403
+ "name": "id",
404
+ "type": "text",
405
+ "primaryKey": true,
406
+ "notNull": true
407
+ },
408
+ "conversation_id": {
409
+ "name": "conversation_id",
410
+ "type": "text",
411
+ "primaryKey": false,
412
+ "notNull": true
413
+ },
414
+ "sha256": {
415
+ "name": "sha256",
416
+ "type": "text",
417
+ "primaryKey": false,
418
+ "notNull": true
419
+ },
420
+ "ext": {
421
+ "name": "ext",
422
+ "type": "text",
423
+ "primaryKey": false,
424
+ "notNull": true
425
+ },
426
+ "storage_key": {
427
+ "name": "storage_key",
428
+ "type": "text",
429
+ "primaryKey": false,
430
+ "notNull": true
431
+ },
432
+ "content_type": {
433
+ "name": "content_type",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": true
437
+ },
438
+ "bytes": {
439
+ "name": "bytes",
440
+ "type": "integer",
441
+ "primaryKey": false,
442
+ "notNull": true
443
+ },
444
+ "public": {
445
+ "name": "public",
446
+ "type": "boolean",
447
+ "primaryKey": false,
448
+ "notNull": true
449
+ },
450
+ "created_at": {
451
+ "name": "created_at",
452
+ "type": "timestamp with time zone",
453
+ "primaryKey": false,
454
+ "notNull": true
455
+ },
456
+ "delete_requested_at": {
457
+ "name": "delete_requested_at",
458
+ "type": "timestamp with time zone",
459
+ "primaryKey": false,
460
+ "notNull": false
461
+ }
462
+ },
463
+ "indexes": {
464
+ "junior_artifacts_conversation_sha_uidx": {
465
+ "name": "junior_artifacts_conversation_sha_uidx",
466
+ "columns": [
467
+ {
468
+ "expression": "conversation_id",
469
+ "isExpression": false,
470
+ "asc": true,
471
+ "nulls": "last"
472
+ },
473
+ {
474
+ "expression": "sha256",
475
+ "isExpression": false,
476
+ "asc": true,
477
+ "nulls": "last"
478
+ }
479
+ ],
480
+ "isUnique": true,
481
+ "concurrently": false,
482
+ "method": "btree",
483
+ "with": {}
484
+ },
485
+ "junior_artifacts_gc_idx": {
486
+ "name": "junior_artifacts_gc_idx",
487
+ "columns": [
488
+ {
489
+ "expression": "delete_requested_at",
490
+ "isExpression": false,
491
+ "asc": true,
492
+ "nulls": "last"
493
+ },
494
+ {
495
+ "expression": "created_at",
496
+ "isExpression": false,
497
+ "asc": true,
498
+ "nulls": "last"
499
+ }
500
+ ],
501
+ "isUnique": false,
502
+ "concurrently": false,
503
+ "method": "btree",
504
+ "with": {}
505
+ },
506
+ "junior_artifacts_conversation_idx": {
507
+ "name": "junior_artifacts_conversation_idx",
508
+ "columns": [
509
+ {
510
+ "expression": "conversation_id",
511
+ "isExpression": false,
512
+ "asc": true,
513
+ "nulls": "last"
514
+ }
515
+ ],
516
+ "isUnique": false,
517
+ "concurrently": false,
518
+ "method": "btree",
519
+ "with": {}
520
+ }
521
+ },
522
+ "foreignKeys": {},
523
+ "compositePrimaryKeys": {},
524
+ "uniqueConstraints": {},
525
+ "policies": {},
526
+ "checkConstraints": {},
527
+ "isRLSEnabled": false
528
+ },
529
+ "public.junior_attachments": {
530
+ "name": "junior_attachments",
531
+ "schema": "",
532
+ "columns": {
533
+ "id": {
534
+ "name": "id",
535
+ "type": "text",
536
+ "primaryKey": true,
537
+ "notNull": true
538
+ },
539
+ "conversation_id": {
540
+ "name": "conversation_id",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": true
544
+ },
545
+ "storage_provider": {
546
+ "name": "storage_provider",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true
550
+ },
551
+ "storage_key": {
552
+ "name": "storage_key",
553
+ "type": "text",
554
+ "primaryKey": false,
555
+ "notNull": true
556
+ },
557
+ "provider": {
558
+ "name": "provider",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": false
562
+ },
563
+ "provider_id": {
564
+ "name": "provider_id",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": false
568
+ },
569
+ "filename": {
570
+ "name": "filename",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": true
574
+ },
575
+ "content_type": {
576
+ "name": "content_type",
577
+ "type": "text",
578
+ "primaryKey": false,
579
+ "notNull": true
580
+ },
581
+ "bytes": {
582
+ "name": "bytes",
583
+ "type": "integer",
584
+ "primaryKey": false,
585
+ "notNull": true
586
+ },
587
+ "sha256": {
588
+ "name": "sha256",
589
+ "type": "text",
590
+ "primaryKey": false,
591
+ "notNull": true
592
+ },
593
+ "vision_summary": {
594
+ "name": "vision_summary",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false
598
+ },
599
+ "created_at": {
600
+ "name": "created_at",
601
+ "type": "timestamp with time zone",
602
+ "primaryKey": false,
603
+ "notNull": true
604
+ },
605
+ "delete_requested_at": {
606
+ "name": "delete_requested_at",
607
+ "type": "timestamp with time zone",
608
+ "primaryKey": false,
609
+ "notNull": false
610
+ }
611
+ },
612
+ "indexes": {
613
+ "junior_attachments_conversation_idx": {
614
+ "name": "junior_attachments_conversation_idx",
615
+ "columns": [
616
+ {
617
+ "expression": "conversation_id",
618
+ "isExpression": false,
619
+ "asc": true,
620
+ "nulls": "last"
621
+ }
622
+ ],
623
+ "isUnique": false,
624
+ "concurrently": false,
625
+ "method": "btree",
626
+ "with": {}
627
+ },
628
+ "junior_attachments_provider_idx": {
629
+ "name": "junior_attachments_provider_idx",
630
+ "columns": [
631
+ {
632
+ "expression": "conversation_id",
633
+ "isExpression": false,
634
+ "asc": true,
635
+ "nulls": "last"
636
+ },
637
+ {
638
+ "expression": "provider",
639
+ "isExpression": false,
640
+ "asc": true,
641
+ "nulls": "last"
642
+ },
643
+ {
644
+ "expression": "provider_id",
645
+ "isExpression": false,
646
+ "asc": true,
647
+ "nulls": "last"
648
+ }
649
+ ],
650
+ "isUnique": false,
651
+ "concurrently": false,
652
+ "method": "btree",
653
+ "with": {}
654
+ },
655
+ "junior_attachments_gc_idx": {
656
+ "name": "junior_attachments_gc_idx",
657
+ "columns": [
658
+ {
659
+ "expression": "storage_provider",
660
+ "isExpression": false,
661
+ "asc": true,
662
+ "nulls": "last"
663
+ },
664
+ {
665
+ "expression": "delete_requested_at",
666
+ "isExpression": false,
667
+ "asc": true,
668
+ "nulls": "last"
669
+ },
670
+ {
671
+ "expression": "created_at",
672
+ "isExpression": false,
673
+ "asc": true,
674
+ "nulls": "last"
675
+ }
676
+ ],
677
+ "isUnique": false,
678
+ "concurrently": false,
679
+ "method": "btree",
680
+ "with": {}
681
+ }
682
+ },
683
+ "foreignKeys": {
684
+ "junior_attachments_conversation_id_junior_conversations_conversation_id_fk": {
685
+ "name": "junior_attachments_conversation_id_junior_conversations_conversation_id_fk",
686
+ "tableFrom": "junior_attachments",
687
+ "tableTo": "junior_conversations",
688
+ "columnsFrom": ["conversation_id"],
689
+ "columnsTo": ["conversation_id"],
690
+ "onDelete": "cascade",
691
+ "onUpdate": "no action"
692
+ }
693
+ },
694
+ "compositePrimaryKeys": {},
695
+ "uniqueConstraints": {},
696
+ "policies": {},
697
+ "checkConstraints": {},
698
+ "isRLSEnabled": false
699
+ },
700
+ "public.junior_automation_runs": {
701
+ "name": "junior_automation_runs",
702
+ "schema": "",
703
+ "columns": {
704
+ "id": {
705
+ "name": "id",
706
+ "type": "text",
707
+ "primaryKey": true,
708
+ "notNull": true
709
+ },
710
+ "automation_id": {
711
+ "name": "automation_id",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": true
715
+ },
716
+ "conversation_id": {
717
+ "name": "conversation_id",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": false
721
+ },
722
+ "status": {
723
+ "name": "status",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true
727
+ },
728
+ "automation_version": {
729
+ "name": "automation_version",
730
+ "type": "integer",
731
+ "primaryKey": false,
732
+ "notNull": false
733
+ },
734
+ "scheduled_for_ms": {
735
+ "name": "scheduled_for_ms",
736
+ "type": "bigint",
737
+ "primaryKey": false,
738
+ "notNull": false
739
+ },
740
+ "attempt": {
741
+ "name": "attempt",
742
+ "type": "integer",
743
+ "primaryKey": false,
744
+ "notNull": false
745
+ },
746
+ "claimed_at_ms": {
747
+ "name": "claimed_at_ms",
748
+ "type": "bigint",
749
+ "primaryKey": false,
750
+ "notNull": false
751
+ },
752
+ "dispatch_id": {
753
+ "name": "dispatch_id",
754
+ "type": "text",
755
+ "primaryKey": false,
756
+ "notNull": false
757
+ },
758
+ "started_at_ms": {
759
+ "name": "started_at_ms",
760
+ "type": "bigint",
761
+ "primaryKey": false,
762
+ "notNull": false
763
+ },
764
+ "completed_at_ms": {
765
+ "name": "completed_at_ms",
766
+ "type": "bigint",
767
+ "primaryKey": false,
768
+ "notNull": false
769
+ },
770
+ "error_message": {
771
+ "name": "error_message",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false
775
+ },
776
+ "result_message_ts": {
777
+ "name": "result_message_ts",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": false
781
+ }
782
+ },
783
+ "indexes": {
784
+ "junior_automation_runs_automation_idx": {
785
+ "name": "junior_automation_runs_automation_idx",
786
+ "columns": [
787
+ {
788
+ "expression": "automation_id",
789
+ "isExpression": false,
790
+ "asc": true,
791
+ "nulls": "last"
792
+ },
793
+ {
794
+ "expression": "completed_at_ms",
795
+ "isExpression": false,
796
+ "asc": true,
797
+ "nulls": "last"
798
+ }
799
+ ],
800
+ "isUnique": false,
801
+ "concurrently": false,
802
+ "method": "btree",
803
+ "with": {}
804
+ },
805
+ "junior_automation_runs_completed_idx": {
806
+ "name": "junior_automation_runs_completed_idx",
807
+ "columns": [
808
+ {
809
+ "expression": "completed_at_ms",
810
+ "isExpression": false,
811
+ "asc": true,
812
+ "nulls": "last"
813
+ }
814
+ ],
815
+ "isUnique": false,
816
+ "concurrently": false,
817
+ "method": "btree",
818
+ "with": {}
819
+ },
820
+ "junior_automation_runs_incomplete_idx": {
821
+ "name": "junior_automation_runs_incomplete_idx",
822
+ "columns": [
823
+ {
824
+ "expression": "automation_id",
825
+ "isExpression": false,
826
+ "asc": true,
827
+ "nulls": "last"
828
+ },
829
+ {
830
+ "expression": "scheduled_for_ms",
831
+ "isExpression": false,
832
+ "asc": true,
833
+ "nulls": "last"
834
+ }
835
+ ],
836
+ "isUnique": false,
837
+ "where": "\"junior_automation_runs\".\"status\" in ('pending', 'running')",
838
+ "concurrently": false,
839
+ "method": "btree",
840
+ "with": {}
841
+ }
842
+ },
843
+ "foreignKeys": {
844
+ "junior_automation_runs_automation_id_junior_automations_id_fk": {
845
+ "name": "junior_automation_runs_automation_id_junior_automations_id_fk",
846
+ "tableFrom": "junior_automation_runs",
847
+ "tableTo": "junior_automations",
848
+ "columnsFrom": ["automation_id"],
849
+ "columnsTo": ["id"],
850
+ "onDelete": "cascade",
851
+ "onUpdate": "no action"
852
+ },
853
+ "junior_automation_runs_conversation_id_junior_conversations_conversation_id_fk": {
854
+ "name": "junior_automation_runs_conversation_id_junior_conversations_conversation_id_fk",
855
+ "tableFrom": "junior_automation_runs",
856
+ "tableTo": "junior_conversations",
857
+ "columnsFrom": ["conversation_id"],
858
+ "columnsTo": ["conversation_id"],
859
+ "onDelete": "no action",
860
+ "onUpdate": "no action"
861
+ },
862
+ "junior_automation_runs_automation_version_fk": {
863
+ "name": "junior_automation_runs_automation_version_fk",
864
+ "tableFrom": "junior_automation_runs",
865
+ "tableTo": "junior_automation_versions",
866
+ "columnsFrom": ["automation_id", "automation_version"],
867
+ "columnsTo": ["automation_id", "version"],
868
+ "onDelete": "no action",
869
+ "onUpdate": "no action"
870
+ }
871
+ },
872
+ "compositePrimaryKeys": {},
873
+ "uniqueConstraints": {
874
+ "junior_automation_runs_conversation_id_unique": {
875
+ "name": "junior_automation_runs_conversation_id_unique",
876
+ "nullsNotDistinct": false,
877
+ "columns": ["conversation_id"]
878
+ }
879
+ },
880
+ "policies": {},
881
+ "checkConstraints": {
882
+ "junior_automation_runs_status_check": {
883
+ "name": "junior_automation_runs_status_check",
884
+ "value": "\"junior_automation_runs\".\"status\" in ('pending', 'running', 'completed', 'failed', 'blocked', 'skipped')"
885
+ }
886
+ },
887
+ "isRLSEnabled": false
888
+ },
889
+ "public.junior_automation_versions": {
890
+ "name": "junior_automation_versions",
891
+ "schema": "",
892
+ "columns": {
893
+ "automation_id": {
894
+ "name": "automation_id",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "version": {
900
+ "name": "version",
901
+ "type": "integer",
902
+ "primaryKey": false,
903
+ "notNull": true
904
+ },
905
+ "created_at_ms": {
906
+ "name": "created_at_ms",
907
+ "type": "bigint",
908
+ "primaryKey": false,
909
+ "notNull": true
910
+ },
911
+ "edited_by": {
912
+ "name": "edited_by",
913
+ "type": "jsonb",
914
+ "primaryKey": false,
915
+ "notNull": false
916
+ },
917
+ "definition": {
918
+ "name": "definition",
919
+ "type": "jsonb",
920
+ "primaryKey": false,
921
+ "notNull": true
922
+ }
923
+ },
924
+ "indexes": {},
925
+ "foreignKeys": {
926
+ "junior_automation_versions_automation_id_fk": {
927
+ "name": "junior_automation_versions_automation_id_fk",
928
+ "tableFrom": "junior_automation_versions",
929
+ "tableTo": "junior_automations",
930
+ "columnsFrom": ["automation_id"],
931
+ "columnsTo": ["id"],
932
+ "onDelete": "cascade",
933
+ "onUpdate": "no action"
934
+ }
935
+ },
936
+ "compositePrimaryKeys": {
937
+ "junior_automation_versions_pk": {
938
+ "name": "junior_automation_versions_pk",
939
+ "columns": ["automation_id", "version"]
940
+ }
941
+ },
942
+ "uniqueConstraints": {},
943
+ "policies": {},
944
+ "checkConstraints": {},
945
+ "isRLSEnabled": false
946
+ },
947
+ "public.junior_automations": {
948
+ "name": "junior_automations",
949
+ "schema": "",
950
+ "columns": {
951
+ "id": {
952
+ "name": "id",
953
+ "type": "text",
954
+ "primaryKey": true,
955
+ "notNull": true
956
+ },
957
+ "kind": {
958
+ "name": "kind",
959
+ "type": "text",
960
+ "primaryKey": false,
961
+ "notNull": true
962
+ },
963
+ "team_id": {
964
+ "name": "team_id",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "channel_id": {
970
+ "name": "channel_id",
971
+ "type": "text",
972
+ "primaryKey": false,
973
+ "notNull": true
974
+ },
975
+ "creator_slack_user_id": {
976
+ "name": "creator_slack_user_id",
977
+ "type": "text",
978
+ "primaryKey": false,
979
+ "notNull": true
980
+ },
981
+ "creator_identity_id": {
982
+ "name": "creator_identity_id",
983
+ "type": "text",
984
+ "primaryKey": false,
985
+ "notNull": true
986
+ },
987
+ "status": {
988
+ "name": "status",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": true
992
+ },
993
+ "status_reason": {
994
+ "name": "status_reason",
995
+ "type": "text",
996
+ "primaryKey": false,
997
+ "notNull": false
998
+ },
999
+ "title": {
1000
+ "name": "title",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": false
1004
+ },
1005
+ "instruction": {
1006
+ "name": "instruction",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true
1010
+ },
1011
+ "created_at_ms": {
1012
+ "name": "created_at_ms",
1013
+ "type": "bigint",
1014
+ "primaryKey": false,
1015
+ "notNull": true
1016
+ },
1017
+ "next_run_at_ms": {
1018
+ "name": "next_run_at_ms",
1019
+ "type": "bigint",
1020
+ "primaryKey": false,
1021
+ "notNull": false
1022
+ },
1023
+ "run_now_at_ms": {
1024
+ "name": "run_now_at_ms",
1025
+ "type": "bigint",
1026
+ "primaryKey": false,
1027
+ "notNull": false
1028
+ },
1029
+ "namespace": {
1030
+ "name": "namespace",
1031
+ "type": "text",
1032
+ "primaryKey": false,
1033
+ "notNull": false
1034
+ },
1035
+ "identifier": {
1036
+ "name": "identifier",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": false
1040
+ },
1041
+ "record": {
1042
+ "name": "record",
1043
+ "type": "jsonb",
1044
+ "primaryKey": false,
1045
+ "notNull": true
1046
+ }
1047
+ },
1048
+ "indexes": {
1049
+ "junior_automations_team_idx": {
1050
+ "name": "junior_automations_team_idx",
1051
+ "columns": [
1052
+ {
1053
+ "expression": "team_id",
1054
+ "isExpression": false,
1055
+ "asc": true,
1056
+ "nulls": "last"
1057
+ },
1058
+ {
1059
+ "expression": "created_at_ms",
1060
+ "isExpression": false,
1061
+ "asc": true,
1062
+ "nulls": "last"
1063
+ },
1064
+ {
1065
+ "expression": "id",
1066
+ "isExpression": false,
1067
+ "asc": true,
1068
+ "nulls": "last"
1069
+ }
1070
+ ],
1071
+ "isUnique": false,
1072
+ "where": "\"junior_automations\".\"status\" <> 'deleted'",
1073
+ "concurrently": false,
1074
+ "method": "btree",
1075
+ "with": {}
1076
+ },
1077
+ "junior_automations_creator_identity_idx": {
1078
+ "name": "junior_automations_creator_identity_idx",
1079
+ "columns": [
1080
+ {
1081
+ "expression": "creator_identity_id",
1082
+ "isExpression": false,
1083
+ "asc": true,
1084
+ "nulls": "last"
1085
+ },
1086
+ {
1087
+ "expression": "created_at_ms",
1088
+ "isExpression": false,
1089
+ "asc": true,
1090
+ "nulls": "last"
1091
+ },
1092
+ {
1093
+ "expression": "id",
1094
+ "isExpression": false,
1095
+ "asc": true,
1096
+ "nulls": "last"
1097
+ }
1098
+ ],
1099
+ "isUnique": false,
1100
+ "concurrently": false,
1101
+ "method": "btree",
1102
+ "with": {}
1103
+ },
1104
+ "junior_automations_run_now_due_idx": {
1105
+ "name": "junior_automations_run_now_due_idx",
1106
+ "columns": [
1107
+ {
1108
+ "expression": "run_now_at_ms",
1109
+ "isExpression": false,
1110
+ "asc": true,
1111
+ "nulls": "last"
1112
+ },
1113
+ {
1114
+ "expression": "created_at_ms",
1115
+ "isExpression": false,
1116
+ "asc": true,
1117
+ "nulls": "last"
1118
+ },
1119
+ {
1120
+ "expression": "id",
1121
+ "isExpression": false,
1122
+ "asc": true,
1123
+ "nulls": "last"
1124
+ }
1125
+ ],
1126
+ "isUnique": false,
1127
+ "where": "\"junior_automations\".\"status\" = 'active' AND \"junior_automations\".\"run_now_at_ms\" IS NOT NULL",
1128
+ "concurrently": false,
1129
+ "method": "btree",
1130
+ "with": {}
1131
+ },
1132
+ "junior_automations_next_run_due_idx": {
1133
+ "name": "junior_automations_next_run_due_idx",
1134
+ "columns": [
1135
+ {
1136
+ "expression": "next_run_at_ms",
1137
+ "isExpression": false,
1138
+ "asc": true,
1139
+ "nulls": "last"
1140
+ },
1141
+ {
1142
+ "expression": "created_at_ms",
1143
+ "isExpression": false,
1144
+ "asc": true,
1145
+ "nulls": "last"
1146
+ },
1147
+ {
1148
+ "expression": "id",
1149
+ "isExpression": false,
1150
+ "asc": true,
1151
+ "nulls": "last"
1152
+ }
1153
+ ],
1154
+ "isUnique": false,
1155
+ "where": "\"junior_automations\".\"status\" = 'active' AND \"junior_automations\".\"next_run_at_ms\" IS NOT NULL",
1156
+ "concurrently": false,
1157
+ "method": "btree",
1158
+ "with": {}
1159
+ },
1160
+ "junior_automations_match_idx": {
1161
+ "name": "junior_automations_match_idx",
1162
+ "columns": [
1163
+ {
1164
+ "expression": "namespace",
1165
+ "isExpression": false,
1166
+ "asc": true,
1167
+ "nulls": "last"
1168
+ },
1169
+ {
1170
+ "expression": "identifier",
1171
+ "isExpression": false,
1172
+ "asc": true,
1173
+ "nulls": "last"
1174
+ },
1175
+ {
1176
+ "expression": "created_at_ms",
1177
+ "isExpression": false,
1178
+ "asc": true,
1179
+ "nulls": "last"
1180
+ },
1181
+ {
1182
+ "expression": "id",
1183
+ "isExpression": false,
1184
+ "asc": true,
1185
+ "nulls": "last"
1186
+ }
1187
+ ],
1188
+ "isUnique": false,
1189
+ "where": "\"junior_automations\".\"status\" <> 'deleted'",
1190
+ "concurrently": false,
1191
+ "method": "btree",
1192
+ "with": {}
1193
+ }
1194
+ },
1195
+ "foreignKeys": {
1196
+ "junior_automations_creator_identity_id_junior_identities_id_fk": {
1197
+ "name": "junior_automations_creator_identity_id_junior_identities_id_fk",
1198
+ "tableFrom": "junior_automations",
1199
+ "tableTo": "junior_identities",
1200
+ "columnsFrom": ["creator_identity_id"],
1201
+ "columnsTo": ["id"],
1202
+ "onDelete": "no action",
1203
+ "onUpdate": "no action"
1204
+ }
1205
+ },
1206
+ "compositePrimaryKeys": {},
1207
+ "uniqueConstraints": {},
1208
+ "policies": {},
1209
+ "checkConstraints": {
1210
+ "junior_automations_kind_check": {
1211
+ "name": "junior_automations_kind_check",
1212
+ "value": "\"junior_automations\".\"kind\" in ('scheduled', 'event')"
1213
+ },
1214
+ "junior_automations_status_check": {
1215
+ "name": "junior_automations_status_check",
1216
+ "value": "\"junior_automations\".\"status\" in ('active', 'blocked', 'paused', 'completed', 'deleted')"
1217
+ },
1218
+ "junior_automations_record_check": {
1219
+ "name": "junior_automations_record_check",
1220
+ "value": "jsonb_typeof(\"junior_automations\".\"record\") = 'object'"
1221
+ },
1222
+ "junior_automations_trigger_check": {
1223
+ "name": "junior_automations_trigger_check",
1224
+ "value": "(\"junior_automations\".\"kind\" = 'scheduled' and \"junior_automations\".\"namespace\" is null and \"junior_automations\".\"identifier\" is null) or (\"junior_automations\".\"kind\" = 'event' and \"junior_automations\".\"namespace\" is not null and \"junior_automations\".\"identifier\" is not null and \"junior_automations\".\"next_run_at_ms\" is null and \"junior_automations\".\"run_now_at_ms\" is null and \"junior_automations\".\"status\" <> 'completed')"
1225
+ }
1226
+ },
1227
+ "isRLSEnabled": false
1228
+ },
1229
+ "public.junior_code_changes": {
1230
+ "name": "junior_code_changes",
1231
+ "schema": "",
1232
+ "columns": {
1233
+ "id": {
1234
+ "name": "id",
1235
+ "type": "uuid",
1236
+ "primaryKey": true,
1237
+ "notNull": true
1238
+ },
1239
+ "closed_at": {
1240
+ "name": "closed_at",
1241
+ "type": "timestamp with time zone",
1242
+ "primaryKey": false,
1243
+ "notNull": false
1244
+ },
1245
+ "conversation_ids": {
1246
+ "name": "conversation_ids",
1247
+ "type": "text[]",
1248
+ "primaryKey": false,
1249
+ "notNull": true,
1250
+ "default": "ARRAY[]::text[]"
1251
+ },
1252
+ "merged_at": {
1253
+ "name": "merged_at",
1254
+ "type": "timestamp with time zone",
1255
+ "primaryKey": false,
1256
+ "notNull": false
1257
+ },
1258
+ "number": {
1259
+ "name": "number",
1260
+ "type": "integer",
1261
+ "primaryKey": false,
1262
+ "notNull": true
1263
+ },
1264
+ "opened_at": {
1265
+ "name": "opened_at",
1266
+ "type": "timestamp with time zone",
1267
+ "primaryKey": false,
1268
+ "notNull": true
1269
+ },
1270
+ "provider": {
1271
+ "name": "provider",
1272
+ "type": "text",
1273
+ "primaryKey": false,
1274
+ "notNull": true
1275
+ },
1276
+ "provider_id": {
1277
+ "name": "provider_id",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true
1281
+ },
1282
+ "repository_id": {
1283
+ "name": "repository_id",
1284
+ "type": "uuid",
1285
+ "primaryKey": false,
1286
+ "notNull": true
1287
+ },
1288
+ "state": {
1289
+ "name": "state",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": true
1293
+ },
1294
+ "title": {
1295
+ "name": "title",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": false
1299
+ },
1300
+ "updated_at": {
1301
+ "name": "updated_at",
1302
+ "type": "timestamp with time zone",
1303
+ "primaryKey": false,
1304
+ "notNull": true
1305
+ },
1306
+ "url": {
1307
+ "name": "url",
1308
+ "type": "text",
1309
+ "primaryKey": false,
1310
+ "notNull": false
1311
+ }
1312
+ },
1313
+ "indexes": {
1314
+ "junior_code_changes_provider_id_idx": {
1315
+ "name": "junior_code_changes_provider_id_idx",
1316
+ "columns": [
1317
+ {
1318
+ "expression": "provider",
1319
+ "isExpression": false,
1320
+ "asc": true,
1321
+ "nulls": "last"
1322
+ },
1323
+ {
1324
+ "expression": "provider_id",
1325
+ "isExpression": false,
1326
+ "asc": true,
1327
+ "nulls": "last"
1328
+ }
1329
+ ],
1330
+ "isUnique": true,
1331
+ "concurrently": false,
1332
+ "method": "btree",
1333
+ "with": {}
1334
+ },
1335
+ "junior_code_changes_opened_at_idx": {
1336
+ "name": "junior_code_changes_opened_at_idx",
1337
+ "columns": [
1338
+ {
1339
+ "expression": "opened_at",
1340
+ "isExpression": false,
1341
+ "asc": true,
1342
+ "nulls": "last"
1343
+ }
1344
+ ],
1345
+ "isUnique": false,
1346
+ "concurrently": false,
1347
+ "method": "btree",
1348
+ "with": {}
1349
+ },
1350
+ "junior_code_changes_merged_at_idx": {
1351
+ "name": "junior_code_changes_merged_at_idx",
1352
+ "columns": [
1353
+ {
1354
+ "expression": "merged_at",
1355
+ "isExpression": false,
1356
+ "asc": true,
1357
+ "nulls": "last"
1358
+ }
1359
+ ],
1360
+ "isUnique": false,
1361
+ "concurrently": false,
1362
+ "method": "btree",
1363
+ "with": {}
1364
+ },
1365
+ "junior_code_changes_closed_at_idx": {
1366
+ "name": "junior_code_changes_closed_at_idx",
1367
+ "columns": [
1368
+ {
1369
+ "expression": "closed_at",
1370
+ "isExpression": false,
1371
+ "asc": true,
1372
+ "nulls": "last"
1373
+ }
1374
+ ],
1375
+ "isUnique": false,
1376
+ "concurrently": false,
1377
+ "method": "btree",
1378
+ "with": {}
1379
+ },
1380
+ "junior_code_changes_open_idx": {
1381
+ "name": "junior_code_changes_open_idx",
1382
+ "columns": [
1383
+ {
1384
+ "expression": "id",
1385
+ "isExpression": false,
1386
+ "asc": true,
1387
+ "nulls": "last"
1388
+ }
1389
+ ],
1390
+ "isUnique": false,
1391
+ "where": "\"junior_code_changes\".\"state\" = 'open'",
1392
+ "concurrently": false,
1393
+ "method": "btree",
1394
+ "with": {}
1395
+ }
1396
+ },
1397
+ "foreignKeys": {
1398
+ "junior_code_changes_repository_id_junior_code_repositories_id_fk": {
1399
+ "name": "junior_code_changes_repository_id_junior_code_repositories_id_fk",
1400
+ "tableFrom": "junior_code_changes",
1401
+ "tableTo": "junior_code_repositories",
1402
+ "columnsFrom": ["repository_id"],
1403
+ "columnsTo": ["id"],
1404
+ "onDelete": "cascade",
1405
+ "onUpdate": "no action"
1406
+ }
1407
+ },
1408
+ "compositePrimaryKeys": {},
1409
+ "uniqueConstraints": {},
1410
+ "policies": {},
1411
+ "checkConstraints": {},
1412
+ "isRLSEnabled": false
1413
+ },
1414
+ "public.junior_code_repositories": {
1415
+ "name": "junior_code_repositories",
1416
+ "schema": "",
1417
+ "columns": {
1418
+ "id": {
1419
+ "name": "id",
1420
+ "type": "uuid",
1421
+ "primaryKey": true,
1422
+ "notNull": true
1423
+ },
1424
+ "name": {
1425
+ "name": "name",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true
1429
+ },
1430
+ "provider": {
1431
+ "name": "provider",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": true
1435
+ },
1436
+ "provider_id": {
1437
+ "name": "provider_id",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": true
1441
+ },
1442
+ "url": {
1443
+ "name": "url",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": false
1447
+ },
1448
+ "updated_at": {
1449
+ "name": "updated_at",
1450
+ "type": "timestamp with time zone",
1451
+ "primaryKey": false,
1452
+ "notNull": true
1453
+ }
1454
+ },
1455
+ "indexes": {
1456
+ "junior_code_repositories_provider_id_idx": {
1457
+ "name": "junior_code_repositories_provider_id_idx",
1458
+ "columns": [
1459
+ {
1460
+ "expression": "provider",
1461
+ "isExpression": false,
1462
+ "asc": true,
1463
+ "nulls": "last"
1464
+ },
1465
+ {
1466
+ "expression": "provider_id",
1467
+ "isExpression": false,
1468
+ "asc": true,
1469
+ "nulls": "last"
1470
+ }
1471
+ ],
1472
+ "isUnique": true,
1473
+ "concurrently": false,
1474
+ "method": "btree",
1475
+ "with": {}
1476
+ }
1477
+ },
1478
+ "foreignKeys": {},
1479
+ "compositePrimaryKeys": {},
1480
+ "uniqueConstraints": {},
1481
+ "policies": {},
1482
+ "checkConstraints": {},
1483
+ "isRLSEnabled": false
1484
+ },
1485
+ "public.junior_conversation_annotations": {
1486
+ "name": "junior_conversation_annotations",
1487
+ "schema": "",
1488
+ "columns": {
1489
+ "conversation_id": {
1490
+ "name": "conversation_id",
1491
+ "type": "text",
1492
+ "primaryKey": false,
1493
+ "notNull": true
1494
+ },
1495
+ "plugin": {
1496
+ "name": "plugin",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": true
1500
+ },
1501
+ "kind": {
1502
+ "name": "kind",
1503
+ "type": "text",
1504
+ "primaryKey": false,
1505
+ "notNull": true
1506
+ },
1507
+ "key": {
1508
+ "name": "key",
1509
+ "type": "text",
1510
+ "primaryKey": false,
1511
+ "notNull": true
1512
+ },
1513
+ "annotation_json": {
1514
+ "name": "annotation_json",
1515
+ "type": "jsonb",
1516
+ "primaryKey": false,
1517
+ "notNull": true
1518
+ },
1519
+ "created_at": {
1520
+ "name": "created_at",
1521
+ "type": "timestamp with time zone",
1522
+ "primaryKey": false,
1523
+ "notNull": true
1524
+ },
1525
+ "updated_at": {
1526
+ "name": "updated_at",
1527
+ "type": "timestamp with time zone",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ }
1531
+ },
1532
+ "indexes": {},
1533
+ "foreignKeys": {
1534
+ "junior_conversation_annotations_conversation_id_fk": {
1535
+ "name": "junior_conversation_annotations_conversation_id_fk",
1536
+ "tableFrom": "junior_conversation_annotations",
1537
+ "tableTo": "junior_conversations",
1538
+ "columnsFrom": ["conversation_id"],
1539
+ "columnsTo": ["conversation_id"],
1540
+ "onDelete": "cascade",
1541
+ "onUpdate": "no action"
1542
+ }
1543
+ },
1544
+ "compositePrimaryKeys": {
1545
+ "junior_conversation_annotations_pk": {
1546
+ "name": "junior_conversation_annotations_pk",
1547
+ "columns": ["conversation_id", "plugin", "kind", "key"]
1548
+ }
1549
+ },
1550
+ "uniqueConstraints": {},
1551
+ "policies": {},
1552
+ "checkConstraints": {},
1553
+ "isRLSEnabled": false
1554
+ },
1555
+ "public.junior_conversation_bindings": {
1556
+ "name": "junior_conversation_bindings",
1557
+ "schema": "",
1558
+ "columns": {
1559
+ "conversation_id": {
1560
+ "name": "conversation_id",
1561
+ "type": "text",
1562
+ "primaryKey": false,
1563
+ "notNull": true
1564
+ },
1565
+ "provider": {
1566
+ "name": "provider",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true
1570
+ },
1571
+ "provider_tenant_id": {
1572
+ "name": "provider_tenant_id",
1573
+ "type": "text",
1574
+ "primaryKey": false,
1575
+ "notNull": true,
1576
+ "default": "''"
1577
+ },
1578
+ "provider_destination_id": {
1579
+ "name": "provider_destination_id",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true
1583
+ },
1584
+ "provider_conversation_id": {
1585
+ "name": "provider_conversation_id",
1586
+ "type": "text",
1587
+ "primaryKey": false,
1588
+ "notNull": true
1589
+ },
1590
+ "created_at": {
1591
+ "name": "created_at",
1592
+ "type": "timestamp with time zone",
1593
+ "primaryKey": false,
1594
+ "notNull": true
1595
+ }
1596
+ },
1597
+ "indexes": {
1598
+ "junior_conversation_bindings_conversation_idx": {
1599
+ "name": "junior_conversation_bindings_conversation_idx",
1600
+ "columns": [
1601
+ {
1602
+ "expression": "conversation_id",
1603
+ "isExpression": false,
1604
+ "asc": true,
1605
+ "nulls": "last"
1606
+ }
1607
+ ],
1608
+ "isUnique": false,
1609
+ "concurrently": false,
1610
+ "method": "btree",
1611
+ "with": {}
1612
+ }
1613
+ },
1614
+ "foreignKeys": {
1615
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
1616
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
1617
+ "tableFrom": "junior_conversation_bindings",
1618
+ "tableTo": "junior_conversations",
1619
+ "columnsFrom": ["conversation_id"],
1620
+ "columnsTo": ["conversation_id"],
1621
+ "onDelete": "no action",
1622
+ "onUpdate": "no action"
1623
+ }
1624
+ },
1625
+ "compositePrimaryKeys": {
1626
+ "junior_conversation_bindings_provider_conversation_pk": {
1627
+ "name": "junior_conversation_bindings_provider_conversation_pk",
1628
+ "columns": [
1629
+ "provider",
1630
+ "provider_tenant_id",
1631
+ "provider_destination_id",
1632
+ "provider_conversation_id"
1633
+ ]
1634
+ }
1635
+ },
1636
+ "uniqueConstraints": {},
1637
+ "policies": {},
1638
+ "checkConstraints": {},
1639
+ "isRLSEnabled": false
1640
+ },
1641
+ "public.junior_conversation_briefs": {
1642
+ "name": "junior_conversation_briefs",
1643
+ "schema": "",
1644
+ "columns": {
1645
+ "conversation_id": {
1646
+ "name": "conversation_id",
1647
+ "type": "text",
1648
+ "primaryKey": false,
1649
+ "notNull": true
1650
+ },
1651
+ "version": {
1652
+ "name": "version",
1653
+ "type": "integer",
1654
+ "primaryKey": false,
1655
+ "notNull": true
1656
+ },
1657
+ "turn_id": {
1658
+ "name": "turn_id",
1659
+ "type": "text",
1660
+ "primaryKey": false,
1661
+ "notNull": true
1662
+ },
1663
+ "through_seq": {
1664
+ "name": "through_seq",
1665
+ "type": "integer",
1666
+ "primaryKey": false,
1667
+ "notNull": true
1668
+ },
1669
+ "content": {
1670
+ "name": "content",
1671
+ "type": "jsonb",
1672
+ "primaryKey": false,
1673
+ "notNull": true
1674
+ },
1675
+ "search_text": {
1676
+ "name": "search_text",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": true
1680
+ },
1681
+ "model_id": {
1682
+ "name": "model_id",
1683
+ "type": "text",
1684
+ "primaryKey": false,
1685
+ "notNull": true
1686
+ },
1687
+ "cost_usd": {
1688
+ "name": "cost_usd",
1689
+ "type": "double precision",
1690
+ "primaryKey": false,
1691
+ "notNull": false
1692
+ },
1693
+ "created_at": {
1694
+ "name": "created_at",
1695
+ "type": "timestamp with time zone",
1696
+ "primaryKey": false,
1697
+ "notNull": true,
1698
+ "default": "now()"
1699
+ }
1700
+ },
1701
+ "indexes": {
1702
+ "junior_conversation_briefs_conversation_turn_idx": {
1703
+ "name": "junior_conversation_briefs_conversation_turn_idx",
1704
+ "columns": [
1705
+ {
1706
+ "expression": "conversation_id",
1707
+ "isExpression": false,
1708
+ "asc": true,
1709
+ "nulls": "last"
1710
+ },
1711
+ {
1712
+ "expression": "turn_id",
1713
+ "isExpression": false,
1714
+ "asc": true,
1715
+ "nulls": "last"
1716
+ }
1717
+ ],
1718
+ "isUnique": true,
1719
+ "concurrently": false,
1720
+ "method": "btree",
1721
+ "with": {}
1722
+ },
1723
+ "junior_conversation_briefs_conversation_version_idx": {
1724
+ "name": "junior_conversation_briefs_conversation_version_idx",
1725
+ "columns": [
1726
+ {
1727
+ "expression": "conversation_id",
1728
+ "isExpression": false,
1729
+ "asc": true,
1730
+ "nulls": "last"
1731
+ },
1732
+ {
1733
+ "expression": "version",
1734
+ "isExpression": false,
1735
+ "asc": false,
1736
+ "nulls": "last"
1737
+ }
1738
+ ],
1739
+ "isUnique": false,
1740
+ "concurrently": false,
1741
+ "method": "btree",
1742
+ "with": {}
1743
+ },
1744
+ "junior_conversation_briefs_search_idx": {
1745
+ "name": "junior_conversation_briefs_search_idx",
1746
+ "columns": [
1747
+ {
1748
+ "expression": "to_tsvector('english', \"search_text\")",
1749
+ "asc": true,
1750
+ "isExpression": true,
1751
+ "nulls": "last"
1752
+ }
1753
+ ],
1754
+ "isUnique": false,
1755
+ "concurrently": false,
1756
+ "method": "gin",
1757
+ "with": {}
1758
+ }
1759
+ },
1760
+ "foreignKeys": {
1761
+ "junior_conversation_briefs_conversation_id_junior_conversations_conversation_id_fk": {
1762
+ "name": "junior_conversation_briefs_conversation_id_junior_conversations_conversation_id_fk",
1763
+ "tableFrom": "junior_conversation_briefs",
1764
+ "tableTo": "junior_conversations",
1765
+ "columnsFrom": ["conversation_id"],
1766
+ "columnsTo": ["conversation_id"],
1767
+ "onDelete": "cascade",
1768
+ "onUpdate": "no action"
1769
+ }
1770
+ },
1771
+ "compositePrimaryKeys": {
1772
+ "junior_conversation_briefs_conversation_id_version_pk": {
1773
+ "name": "junior_conversation_briefs_conversation_id_version_pk",
1774
+ "columns": ["conversation_id", "version"]
1775
+ }
1776
+ },
1777
+ "uniqueConstraints": {},
1778
+ "policies": {},
1779
+ "checkConstraints": {},
1780
+ "isRLSEnabled": false
1781
+ },
1782
+ "public.junior_conversation_events": {
1783
+ "name": "junior_conversation_events",
1784
+ "schema": "",
1785
+ "columns": {
1786
+ "conversation_id": {
1787
+ "name": "conversation_id",
1788
+ "type": "text",
1789
+ "primaryKey": false,
1790
+ "notNull": true
1791
+ },
1792
+ "seq": {
1793
+ "name": "seq",
1794
+ "type": "integer",
1795
+ "primaryKey": false,
1796
+ "notNull": true
1797
+ },
1798
+ "history_version": {
1799
+ "name": "history_version",
1800
+ "type": "integer",
1801
+ "primaryKey": false,
1802
+ "notNull": true
1803
+ },
1804
+ "schema_version": {
1805
+ "name": "schema_version",
1806
+ "type": "integer",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "default": 1
1810
+ },
1811
+ "idempotency_key": {
1812
+ "name": "idempotency_key",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": false
1816
+ },
1817
+ "type": {
1818
+ "name": "type",
1819
+ "type": "text",
1820
+ "primaryKey": false,
1821
+ "notNull": true
1822
+ },
1823
+ "payload": {
1824
+ "name": "payload",
1825
+ "type": "jsonb",
1826
+ "primaryKey": false,
1827
+ "notNull": true
1828
+ },
1829
+ "actor_identity_id": {
1830
+ "name": "actor_identity_id",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": false
1834
+ },
1835
+ "created_at": {
1836
+ "name": "created_at",
1837
+ "type": "timestamp with time zone",
1838
+ "primaryKey": false,
1839
+ "notNull": true
1840
+ }
1841
+ },
1842
+ "indexes": {
1843
+ "junior_conversation_events_history_version_idx": {
1844
+ "name": "junior_conversation_events_history_version_idx",
1845
+ "columns": [
1846
+ {
1847
+ "expression": "conversation_id",
1848
+ "isExpression": false,
1849
+ "asc": true,
1850
+ "nulls": "last"
1851
+ },
1852
+ {
1853
+ "expression": "history_version",
1854
+ "isExpression": false,
1855
+ "asc": true,
1856
+ "nulls": "last"
1857
+ },
1858
+ {
1859
+ "expression": "seq",
1860
+ "isExpression": false,
1861
+ "asc": true,
1862
+ "nulls": "last"
1863
+ }
1864
+ ],
1865
+ "isUnique": false,
1866
+ "concurrently": false,
1867
+ "method": "btree",
1868
+ "with": {}
1869
+ },
1870
+ "junior_conversation_events_type_idx": {
1871
+ "name": "junior_conversation_events_type_idx",
1872
+ "columns": [
1873
+ {
1874
+ "expression": "conversation_id",
1875
+ "isExpression": false,
1876
+ "asc": true,
1877
+ "nulls": "last"
1878
+ },
1879
+ {
1880
+ "expression": "type",
1881
+ "isExpression": false,
1882
+ "asc": true,
1883
+ "nulls": "last"
1884
+ },
1885
+ {
1886
+ "expression": "seq",
1887
+ "isExpression": false,
1888
+ "asc": true,
1889
+ "nulls": "last"
1890
+ }
1891
+ ],
1892
+ "isUnique": false,
1893
+ "concurrently": false,
1894
+ "method": "btree",
1895
+ "with": {}
1896
+ },
1897
+ "junior_conversation_events_actor_identity_idx": {
1898
+ "name": "junior_conversation_events_actor_identity_idx",
1899
+ "columns": [
1900
+ {
1901
+ "expression": "actor_identity_id",
1902
+ "isExpression": false,
1903
+ "asc": true,
1904
+ "nulls": "last"
1905
+ },
1906
+ {
1907
+ "expression": "conversation_id",
1908
+ "isExpression": false,
1909
+ "asc": true,
1910
+ "nulls": "last"
1911
+ },
1912
+ {
1913
+ "expression": "seq",
1914
+ "isExpression": false,
1915
+ "asc": true,
1916
+ "nulls": "last"
1917
+ }
1918
+ ],
1919
+ "isUnique": false,
1920
+ "concurrently": false,
1921
+ "method": "btree",
1922
+ "with": {}
1923
+ },
1924
+ "junior_conversation_events_message_search_idx": {
1925
+ "name": "junior_conversation_events_message_search_idx",
1926
+ "columns": [
1927
+ {
1928
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
1929
+ "asc": true,
1930
+ "isExpression": true,
1931
+ "nulls": "last"
1932
+ }
1933
+ ],
1934
+ "isUnique": false,
1935
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
1936
+ "concurrently": false,
1937
+ "method": "gin",
1938
+ "with": {}
1939
+ },
1940
+ "junior_conversation_events_idempotency_idx": {
1941
+ "name": "junior_conversation_events_idempotency_idx",
1942
+ "columns": [
1943
+ {
1944
+ "expression": "conversation_id",
1945
+ "isExpression": false,
1946
+ "asc": true,
1947
+ "nulls": "last"
1948
+ },
1949
+ {
1950
+ "expression": "idempotency_key",
1951
+ "isExpression": false,
1952
+ "asc": true,
1953
+ "nulls": "last"
1954
+ }
1955
+ ],
1956
+ "isUnique": true,
1957
+ "concurrently": false,
1958
+ "method": "btree",
1959
+ "with": {}
1960
+ }
1961
+ },
1962
+ "foreignKeys": {
1963
+ "junior_conversation_events_actor_identity_id_junior_identities_id_fk": {
1964
+ "name": "junior_conversation_events_actor_identity_id_junior_identities_id_fk",
1965
+ "tableFrom": "junior_conversation_events",
1966
+ "tableTo": "junior_identities",
1967
+ "columnsFrom": ["actor_identity_id"],
1968
+ "columnsTo": ["id"],
1969
+ "onDelete": "no action",
1970
+ "onUpdate": "no action"
1971
+ },
1972
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
1973
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
1974
+ "tableFrom": "junior_conversation_events",
1975
+ "tableTo": "junior_conversations",
1976
+ "columnsFrom": ["conversation_id"],
1977
+ "columnsTo": ["conversation_id"],
1978
+ "onDelete": "no action",
1979
+ "onUpdate": "no action"
1980
+ }
1981
+ },
1982
+ "compositePrimaryKeys": {
1983
+ "junior_conversation_events_conversation_id_seq_pk": {
1984
+ "name": "junior_conversation_events_conversation_id_seq_pk",
1985
+ "columns": ["conversation_id", "seq"]
1986
+ }
1987
+ },
1988
+ "uniqueConstraints": {},
1989
+ "policies": {},
1990
+ "checkConstraints": {},
1991
+ "isRLSEnabled": false
1992
+ },
1993
+ "public.junior_conversation_metrics": {
1994
+ "name": "junior_conversation_metrics",
1995
+ "schema": "",
1996
+ "columns": {
1997
+ "conversation_id": {
1998
+ "name": "conversation_id",
1999
+ "type": "text",
2000
+ "primaryKey": false,
2001
+ "notNull": true
2002
+ },
2003
+ "run_id": {
2004
+ "name": "run_id",
2005
+ "type": "text",
2006
+ "primaryKey": false,
2007
+ "notNull": true
2008
+ },
2009
+ "metric": {
2010
+ "name": "metric",
2011
+ "type": "text",
2012
+ "primaryKey": false,
2013
+ "notNull": true
2014
+ },
2015
+ "value": {
2016
+ "name": "value",
2017
+ "type": "double precision",
2018
+ "primaryKey": false,
2019
+ "notNull": true
2020
+ },
2021
+ "occurred_at": {
2022
+ "name": "occurred_at",
2023
+ "type": "timestamp with time zone",
2024
+ "primaryKey": false,
2025
+ "notNull": true
2026
+ },
2027
+ "updated_at": {
2028
+ "name": "updated_at",
2029
+ "type": "timestamp with time zone",
2030
+ "primaryKey": false,
2031
+ "notNull": true
2032
+ }
2033
+ },
2034
+ "indexes": {
2035
+ "junior_conversation_metrics_occurred_at_metric_idx": {
2036
+ "name": "junior_conversation_metrics_occurred_at_metric_idx",
2037
+ "columns": [
2038
+ {
2039
+ "expression": "occurred_at",
2040
+ "isExpression": false,
2041
+ "asc": true,
2042
+ "nulls": "last"
2043
+ },
2044
+ {
2045
+ "expression": "metric",
2046
+ "isExpression": false,
2047
+ "asc": true,
2048
+ "nulls": "last"
2049
+ }
2050
+ ],
2051
+ "isUnique": false,
2052
+ "concurrently": false,
2053
+ "method": "btree",
2054
+ "with": {}
2055
+ }
2056
+ },
2057
+ "foreignKeys": {
2058
+ "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk": {
2059
+ "name": "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk",
2060
+ "tableFrom": "junior_conversation_metrics",
2061
+ "tableTo": "junior_conversations",
2062
+ "columnsFrom": ["conversation_id"],
2063
+ "columnsTo": ["conversation_id"],
2064
+ "onDelete": "no action",
2065
+ "onUpdate": "no action"
2066
+ }
2067
+ },
2068
+ "compositePrimaryKeys": {
2069
+ "junior_conversation_metrics_conversation_id_run_id_metric_pk": {
2070
+ "name": "junior_conversation_metrics_conversation_id_run_id_metric_pk",
2071
+ "columns": ["conversation_id", "run_id", "metric"]
2072
+ }
2073
+ },
2074
+ "uniqueConstraints": {},
2075
+ "policies": {},
2076
+ "checkConstraints": {},
2077
+ "isRLSEnabled": false
2078
+ },
2079
+ "public.junior_conversation_participants": {
2080
+ "name": "junior_conversation_participants",
2081
+ "schema": "",
2082
+ "columns": {
2083
+ "user_id": {
2084
+ "name": "user_id",
2085
+ "type": "text",
2086
+ "primaryKey": false,
2087
+ "notNull": true
2088
+ },
2089
+ "root_conversation_id": {
2090
+ "name": "root_conversation_id",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": true
2094
+ },
2095
+ "last_message_at": {
2096
+ "name": "last_message_at",
2097
+ "type": "timestamp with time zone",
2098
+ "primaryKey": false,
2099
+ "notNull": true
2100
+ },
2101
+ "archived_at": {
2102
+ "name": "archived_at",
2103
+ "type": "timestamp with time zone",
2104
+ "primaryKey": false,
2105
+ "notNull": false
2106
+ }
2107
+ },
2108
+ "indexes": {
2109
+ "junior_conversation_participants_user_activity_idx": {
2110
+ "name": "junior_conversation_participants_user_activity_idx",
2111
+ "columns": [
2112
+ {
2113
+ "expression": "user_id",
2114
+ "isExpression": false,
2115
+ "asc": true,
2116
+ "nulls": "last"
2117
+ },
2118
+ {
2119
+ "expression": "last_message_at",
2120
+ "isExpression": false,
2121
+ "asc": false,
2122
+ "nulls": "last"
2123
+ }
2124
+ ],
2125
+ "isUnique": false,
2126
+ "concurrently": false,
2127
+ "method": "btree",
2128
+ "with": {}
2129
+ },
2130
+ "junior_conversation_participants_root_idx": {
2131
+ "name": "junior_conversation_participants_root_idx",
2132
+ "columns": [
2133
+ {
2134
+ "expression": "root_conversation_id",
2135
+ "isExpression": false,
2136
+ "asc": true,
2137
+ "nulls": "last"
2138
+ }
2139
+ ],
2140
+ "isUnique": false,
2141
+ "concurrently": false,
2142
+ "method": "btree",
2143
+ "with": {}
2144
+ }
2145
+ },
2146
+ "foreignKeys": {
2147
+ "junior_conversation_participants_user_id_junior_users_id_fk": {
2148
+ "name": "junior_conversation_participants_user_id_junior_users_id_fk",
2149
+ "tableFrom": "junior_conversation_participants",
2150
+ "tableTo": "junior_users",
2151
+ "columnsFrom": ["user_id"],
2152
+ "columnsTo": ["id"],
2153
+ "onDelete": "no action",
2154
+ "onUpdate": "no action"
2155
+ },
2156
+ "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk": {
2157
+ "name": "junior_conversation_participants_root_conversation_id_junior_conversations_conversation_id_fk",
2158
+ "tableFrom": "junior_conversation_participants",
2159
+ "tableTo": "junior_conversations",
2160
+ "columnsFrom": ["root_conversation_id"],
2161
+ "columnsTo": ["conversation_id"],
2162
+ "onDelete": "no action",
2163
+ "onUpdate": "no action"
2164
+ }
2165
+ },
2166
+ "compositePrimaryKeys": {
2167
+ "junior_conversation_participants_user_root_pk": {
2168
+ "name": "junior_conversation_participants_user_root_pk",
2169
+ "columns": ["user_id", "root_conversation_id"]
2170
+ }
2171
+ },
2172
+ "uniqueConstraints": {},
2173
+ "policies": {},
2174
+ "checkConstraints": {},
2175
+ "isRLSEnabled": false
2176
+ },
2177
+ "public.junior_conversations": {
2178
+ "name": "junior_conversations",
2179
+ "schema": "",
2180
+ "columns": {
2181
+ "conversation_id": {
2182
+ "name": "conversation_id",
2183
+ "type": "text",
2184
+ "primaryKey": true,
2185
+ "notNull": true
2186
+ },
2187
+ "schema_version": {
2188
+ "name": "schema_version",
2189
+ "type": "integer",
2190
+ "primaryKey": false,
2191
+ "notNull": true,
2192
+ "default": 1
2193
+ },
2194
+ "source": {
2195
+ "name": "source",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false
2199
+ },
2200
+ "source_json": {
2201
+ "name": "source_json",
2202
+ "type": "jsonb",
2203
+ "primaryKey": false,
2204
+ "notNull": false
2205
+ },
2206
+ "location_json": {
2207
+ "name": "location_json",
2208
+ "type": "jsonb",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "destination_id": {
2213
+ "name": "destination_id",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": false
2217
+ },
2218
+ "destination_json": {
2219
+ "name": "destination_json",
2220
+ "type": "jsonb",
2221
+ "primaryKey": false,
2222
+ "notNull": false
2223
+ },
2224
+ "actor_identity_id": {
2225
+ "name": "actor_identity_id",
2226
+ "type": "text",
2227
+ "primaryKey": false,
2228
+ "notNull": false
2229
+ },
2230
+ "creator_identity_id": {
2231
+ "name": "creator_identity_id",
2232
+ "type": "text",
2233
+ "primaryKey": false,
2234
+ "notNull": false
2235
+ },
2236
+ "credential_subject_identity_id": {
2237
+ "name": "credential_subject_identity_id",
2238
+ "type": "text",
2239
+ "primaryKey": false,
2240
+ "notNull": false
2241
+ },
2242
+ "actor_json": {
2243
+ "name": "actor_json",
2244
+ "type": "jsonb",
2245
+ "primaryKey": false,
2246
+ "notNull": false
2247
+ },
2248
+ "channel_name": {
2249
+ "name": "channel_name",
2250
+ "type": "text",
2251
+ "primaryKey": false,
2252
+ "notNull": false
2253
+ },
2254
+ "title": {
2255
+ "name": "title",
2256
+ "type": "text",
2257
+ "primaryKey": false,
2258
+ "notNull": false
2259
+ },
2260
+ "created_at": {
2261
+ "name": "created_at",
2262
+ "type": "timestamp with time zone",
2263
+ "primaryKey": false,
2264
+ "notNull": true
2265
+ },
2266
+ "last_activity_at": {
2267
+ "name": "last_activity_at",
2268
+ "type": "timestamp with time zone",
2269
+ "primaryKey": false,
2270
+ "notNull": true
2271
+ },
2272
+ "updated_at": {
2273
+ "name": "updated_at",
2274
+ "type": "timestamp with time zone",
2275
+ "primaryKey": false,
2276
+ "notNull": true
2277
+ },
2278
+ "execution_updated_at": {
2279
+ "name": "execution_updated_at",
2280
+ "type": "timestamp with time zone",
2281
+ "primaryKey": false,
2282
+ "notNull": false
2283
+ },
2284
+ "execution_status": {
2285
+ "name": "execution_status",
2286
+ "type": "text",
2287
+ "primaryKey": false,
2288
+ "notNull": true
2289
+ },
2290
+ "run_id": {
2291
+ "name": "run_id",
2292
+ "type": "text",
2293
+ "primaryKey": false,
2294
+ "notNull": false
2295
+ },
2296
+ "last_checkpoint_at": {
2297
+ "name": "last_checkpoint_at",
2298
+ "type": "timestamp with time zone",
2299
+ "primaryKey": false,
2300
+ "notNull": false
2301
+ },
2302
+ "last_enqueued_at": {
2303
+ "name": "last_enqueued_at",
2304
+ "type": "timestamp with time zone",
2305
+ "primaryKey": false,
2306
+ "notNull": false
2307
+ },
2308
+ "parent_conversation_id": {
2309
+ "name": "parent_conversation_id",
2310
+ "type": "text",
2311
+ "primaryKey": false,
2312
+ "notNull": false
2313
+ },
2314
+ "forked_from_conversation_id": {
2315
+ "name": "forked_from_conversation_id",
2316
+ "type": "text",
2317
+ "primaryKey": false,
2318
+ "notNull": false
2319
+ },
2320
+ "root_conversation_id": {
2321
+ "name": "root_conversation_id",
2322
+ "type": "text",
2323
+ "primaryKey": false,
2324
+ "notNull": false
2325
+ },
2326
+ "transcript_purged_at": {
2327
+ "name": "transcript_purged_at",
2328
+ "type": "timestamp with time zone",
2329
+ "primaryKey": false,
2330
+ "notNull": false
2331
+ },
2332
+ "stopped_at": {
2333
+ "name": "stopped_at",
2334
+ "type": "timestamp with time zone",
2335
+ "primaryKey": false,
2336
+ "notNull": false
2337
+ },
2338
+ "duration_ms": {
2339
+ "name": "duration_ms",
2340
+ "type": "integer",
2341
+ "primaryKey": false,
2342
+ "notNull": true,
2343
+ "default": 0
2344
+ },
2345
+ "usage_json": {
2346
+ "name": "usage_json",
2347
+ "type": "jsonb",
2348
+ "primaryKey": false,
2349
+ "notNull": false
2350
+ },
2351
+ "execution_duration_ms": {
2352
+ "name": "execution_duration_ms",
2353
+ "type": "integer",
2354
+ "primaryKey": false,
2355
+ "notNull": true,
2356
+ "default": 0
2357
+ },
2358
+ "execution_usage_json": {
2359
+ "name": "execution_usage_json",
2360
+ "type": "jsonb",
2361
+ "primaryKey": false,
2362
+ "notNull": false
2363
+ },
2364
+ "metric_run_id": {
2365
+ "name": "metric_run_id",
2366
+ "type": "text",
2367
+ "primaryKey": false,
2368
+ "notNull": false
2369
+ },
2370
+ "archived_at": {
2371
+ "name": "archived_at",
2372
+ "type": "timestamp with time zone",
2373
+ "primaryKey": false,
2374
+ "notNull": false
2375
+ }
2376
+ },
2377
+ "indexes": {
2378
+ "junior_conversations_last_activity_idx": {
2379
+ "name": "junior_conversations_last_activity_idx",
2380
+ "columns": [
2381
+ {
2382
+ "expression": "last_activity_at",
2383
+ "isExpression": false,
2384
+ "asc": false,
2385
+ "nulls": "last"
2386
+ },
2387
+ {
2388
+ "expression": "conversation_id",
2389
+ "isExpression": false,
2390
+ "asc": true,
2391
+ "nulls": "last"
2392
+ }
2393
+ ],
2394
+ "isUnique": false,
2395
+ "concurrently": false,
2396
+ "method": "btree",
2397
+ "with": {}
2398
+ },
2399
+ "junior_conversations_active_idx": {
2400
+ "name": "junior_conversations_active_idx",
2401
+ "columns": [
2402
+ {
2403
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
2404
+ "asc": true,
2405
+ "isExpression": true,
2406
+ "nulls": "last"
2407
+ },
2408
+ {
2409
+ "expression": "conversation_id",
2410
+ "isExpression": false,
2411
+ "asc": true,
2412
+ "nulls": "last"
2413
+ }
2414
+ ],
2415
+ "isUnique": false,
2416
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
2417
+ "concurrently": false,
2418
+ "method": "btree",
2419
+ "with": {}
2420
+ },
2421
+ "junior_conversations_destination_activity_idx": {
2422
+ "name": "junior_conversations_destination_activity_idx",
2423
+ "columns": [
2424
+ {
2425
+ "expression": "destination_id",
2426
+ "isExpression": false,
2427
+ "asc": true,
2428
+ "nulls": "last"
2429
+ },
2430
+ {
2431
+ "expression": "last_activity_at",
2432
+ "isExpression": false,
2433
+ "asc": false,
2434
+ "nulls": "last"
2435
+ }
2436
+ ],
2437
+ "isUnique": false,
2438
+ "concurrently": false,
2439
+ "method": "btree",
2440
+ "with": {}
2441
+ },
2442
+ "junior_conversations_actor_activity_idx": {
2443
+ "name": "junior_conversations_actor_activity_idx",
2444
+ "columns": [
2445
+ {
2446
+ "expression": "actor_identity_id",
2447
+ "isExpression": false,
2448
+ "asc": true,
2449
+ "nulls": "last"
2450
+ },
2451
+ {
2452
+ "expression": "last_activity_at",
2453
+ "isExpression": false,
2454
+ "asc": false,
2455
+ "nulls": "last"
2456
+ }
2457
+ ],
2458
+ "isUnique": false,
2459
+ "concurrently": false,
2460
+ "method": "btree",
2461
+ "with": {}
2462
+ },
2463
+ "junior_conversations_parent_idx": {
2464
+ "name": "junior_conversations_parent_idx",
2465
+ "columns": [
2466
+ {
2467
+ "expression": "parent_conversation_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
+ "junior_conversations_forked_from_idx": {
2479
+ "name": "junior_conversations_forked_from_idx",
2480
+ "columns": [
2481
+ {
2482
+ "expression": "forked_from_conversation_id",
2483
+ "isExpression": false,
2484
+ "asc": true,
2485
+ "nulls": "last"
2486
+ }
2487
+ ],
2488
+ "isUnique": false,
2489
+ "concurrently": false,
2490
+ "method": "btree",
2491
+ "with": {}
2492
+ },
2493
+ "junior_conversations_root_idx": {
2494
+ "name": "junior_conversations_root_idx",
2495
+ "columns": [
2496
+ {
2497
+ "expression": "root_conversation_id",
2498
+ "isExpression": false,
2499
+ "asc": true,
2500
+ "nulls": "last"
2501
+ }
2502
+ ],
2503
+ "isUnique": false,
2504
+ "concurrently": false,
2505
+ "method": "btree",
2506
+ "with": {}
2507
+ }
2508
+ },
2509
+ "foreignKeys": {
2510
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
2511
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
2512
+ "tableFrom": "junior_conversations",
2513
+ "tableTo": "junior_destinations",
2514
+ "columnsFrom": ["destination_id"],
2515
+ "columnsTo": ["id"],
2516
+ "onDelete": "no action",
2517
+ "onUpdate": "no action"
2518
+ },
2519
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
2520
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
2521
+ "tableFrom": "junior_conversations",
2522
+ "tableTo": "junior_identities",
2523
+ "columnsFrom": ["actor_identity_id"],
2524
+ "columnsTo": ["id"],
2525
+ "onDelete": "no action",
2526
+ "onUpdate": "no action"
2527
+ },
2528
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
2529
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
2530
+ "tableFrom": "junior_conversations",
2531
+ "tableTo": "junior_identities",
2532
+ "columnsFrom": ["creator_identity_id"],
2533
+ "columnsTo": ["id"],
2534
+ "onDelete": "no action",
2535
+ "onUpdate": "no action"
2536
+ },
2537
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
2538
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
2539
+ "tableFrom": "junior_conversations",
2540
+ "tableTo": "junior_identities",
2541
+ "columnsFrom": ["credential_subject_identity_id"],
2542
+ "columnsTo": ["id"],
2543
+ "onDelete": "no action",
2544
+ "onUpdate": "no action"
2545
+ },
2546
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
2547
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
2548
+ "tableFrom": "junior_conversations",
2549
+ "tableTo": "junior_conversations",
2550
+ "columnsFrom": ["parent_conversation_id"],
2551
+ "columnsTo": ["conversation_id"],
2552
+ "onDelete": "no action",
2553
+ "onUpdate": "no action"
2554
+ },
2555
+ "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk": {
2556
+ "name": "junior_conversations_forked_from_conversation_id_junior_conversations_conversation_id_fk",
2557
+ "tableFrom": "junior_conversations",
2558
+ "tableTo": "junior_conversations",
2559
+ "columnsFrom": ["forked_from_conversation_id"],
2560
+ "columnsTo": ["conversation_id"],
2561
+ "onDelete": "set null",
2562
+ "onUpdate": "no action"
2563
+ },
2564
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
2565
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
2566
+ "tableFrom": "junior_conversations",
2567
+ "tableTo": "junior_conversations",
2568
+ "columnsFrom": ["root_conversation_id"],
2569
+ "columnsTo": ["conversation_id"],
2570
+ "onDelete": "no action",
2571
+ "onUpdate": "no action"
2572
+ }
2573
+ },
2574
+ "compositePrimaryKeys": {},
2575
+ "uniqueConstraints": {},
2576
+ "policies": {},
2577
+ "checkConstraints": {},
2578
+ "isRLSEnabled": false
2579
+ },
2580
+ "public.junior_destinations": {
2581
+ "name": "junior_destinations",
2582
+ "schema": "",
2583
+ "columns": {
2584
+ "id": {
2585
+ "name": "id",
2586
+ "type": "text",
2587
+ "primaryKey": true,
2588
+ "notNull": true
2589
+ },
2590
+ "provider": {
2591
+ "name": "provider",
2592
+ "type": "text",
2593
+ "primaryKey": false,
2594
+ "notNull": true
2595
+ },
2596
+ "provider_tenant_id": {
2597
+ "name": "provider_tenant_id",
2598
+ "type": "text",
2599
+ "primaryKey": false,
2600
+ "notNull": true,
2601
+ "default": "''"
2602
+ },
2603
+ "provider_destination_id": {
2604
+ "name": "provider_destination_id",
2605
+ "type": "text",
2606
+ "primaryKey": false,
2607
+ "notNull": true
2608
+ },
2609
+ "kind": {
2610
+ "name": "kind",
2611
+ "type": "text",
2612
+ "primaryKey": false,
2613
+ "notNull": true
2614
+ },
2615
+ "parent_destination_id": {
2616
+ "name": "parent_destination_id",
2617
+ "type": "text",
2618
+ "primaryKey": false,
2619
+ "notNull": false
2620
+ },
2621
+ "display_name": {
2622
+ "name": "display_name",
2623
+ "type": "text",
2624
+ "primaryKey": false,
2625
+ "notNull": false
2626
+ },
2627
+ "visibility": {
2628
+ "name": "visibility",
2629
+ "type": "text",
2630
+ "primaryKey": false,
2631
+ "notNull": true,
2632
+ "default": "'unknown'"
2633
+ },
2634
+ "metadata_json": {
2635
+ "name": "metadata_json",
2636
+ "type": "jsonb",
2637
+ "primaryKey": false,
2638
+ "notNull": false
2639
+ },
2640
+ "created_at": {
2641
+ "name": "created_at",
2642
+ "type": "timestamp with time zone",
2643
+ "primaryKey": false,
2644
+ "notNull": true
2645
+ },
2646
+ "updated_at": {
2647
+ "name": "updated_at",
2648
+ "type": "timestamp with time zone",
2649
+ "primaryKey": false,
2650
+ "notNull": true
2651
+ }
2652
+ },
2653
+ "indexes": {
2654
+ "junior_destinations_provider_destination_uidx": {
2655
+ "name": "junior_destinations_provider_destination_uidx",
2656
+ "columns": [
2657
+ {
2658
+ "expression": "provider",
2659
+ "isExpression": false,
2660
+ "asc": true,
2661
+ "nulls": "last"
2662
+ },
2663
+ {
2664
+ "expression": "provider_tenant_id",
2665
+ "isExpression": false,
2666
+ "asc": true,
2667
+ "nulls": "last"
2668
+ },
2669
+ {
2670
+ "expression": "provider_destination_id",
2671
+ "isExpression": false,
2672
+ "asc": true,
2673
+ "nulls": "last"
2674
+ }
2675
+ ],
2676
+ "isUnique": true,
2677
+ "concurrently": false,
2678
+ "method": "btree",
2679
+ "with": {}
2680
+ },
2681
+ "junior_destinations_provider_kind_idx": {
2682
+ "name": "junior_destinations_provider_kind_idx",
2683
+ "columns": [
2684
+ {
2685
+ "expression": "provider",
2686
+ "isExpression": false,
2687
+ "asc": true,
2688
+ "nulls": "last"
2689
+ },
2690
+ {
2691
+ "expression": "kind",
2692
+ "isExpression": false,
2693
+ "asc": true,
2694
+ "nulls": "last"
2695
+ }
2696
+ ],
2697
+ "isUnique": false,
2698
+ "concurrently": false,
2699
+ "method": "btree",
2700
+ "with": {}
2701
+ }
2702
+ },
2703
+ "foreignKeys": {},
2704
+ "compositePrimaryKeys": {},
2705
+ "uniqueConstraints": {},
2706
+ "policies": {},
2707
+ "checkConstraints": {},
2708
+ "isRLSEnabled": false
2709
+ },
2710
+ "public.junior_identities": {
2711
+ "name": "junior_identities",
2712
+ "schema": "",
2713
+ "columns": {
2714
+ "id": {
2715
+ "name": "id",
2716
+ "type": "text",
2717
+ "primaryKey": true,
2718
+ "notNull": true
2719
+ },
2720
+ "kind": {
2721
+ "name": "kind",
2722
+ "type": "text",
2723
+ "primaryKey": false,
2724
+ "notNull": true
2725
+ },
2726
+ "provider": {
2727
+ "name": "provider",
2728
+ "type": "text",
2729
+ "primaryKey": false,
2730
+ "notNull": true
2731
+ },
2732
+ "provider_tenant_id": {
2733
+ "name": "provider_tenant_id",
2734
+ "type": "text",
2735
+ "primaryKey": false,
2736
+ "notNull": true,
2737
+ "default": "''"
2738
+ },
2739
+ "provider_subject_id": {
2740
+ "name": "provider_subject_id",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": true
2744
+ },
2745
+ "display_name": {
2746
+ "name": "display_name",
2747
+ "type": "text",
2748
+ "primaryKey": false,
2749
+ "notNull": false
2750
+ },
2751
+ "handle": {
2752
+ "name": "handle",
2753
+ "type": "text",
2754
+ "primaryKey": false,
2755
+ "notNull": false
2756
+ },
2757
+ "email": {
2758
+ "name": "email",
2759
+ "type": "text",
2760
+ "primaryKey": false,
2761
+ "notNull": false
2762
+ },
2763
+ "avatar_url": {
2764
+ "name": "avatar_url",
2765
+ "type": "text",
2766
+ "primaryKey": false,
2767
+ "notNull": false
2768
+ },
2769
+ "metadata_json": {
2770
+ "name": "metadata_json",
2771
+ "type": "jsonb",
2772
+ "primaryKey": false,
2773
+ "notNull": false
2774
+ },
2775
+ "created_at": {
2776
+ "name": "created_at",
2777
+ "type": "timestamp with time zone",
2778
+ "primaryKey": false,
2779
+ "notNull": true
2780
+ },
2781
+ "updated_at": {
2782
+ "name": "updated_at",
2783
+ "type": "timestamp with time zone",
2784
+ "primaryKey": false,
2785
+ "notNull": true
2786
+ },
2787
+ "user_id": {
2788
+ "name": "user_id",
2789
+ "type": "text",
2790
+ "primaryKey": false,
2791
+ "notNull": false
2792
+ },
2793
+ "email_normalized": {
2794
+ "name": "email_normalized",
2795
+ "type": "text",
2796
+ "primaryKey": false,
2797
+ "notNull": false
2798
+ },
2799
+ "email_verified": {
2800
+ "name": "email_verified",
2801
+ "type": "boolean",
2802
+ "primaryKey": false,
2803
+ "notNull": true,
2804
+ "default": false
2805
+ },
2806
+ "signed_in_at": {
2807
+ "name": "signed_in_at",
2808
+ "type": "timestamp with time zone",
2809
+ "primaryKey": false,
2810
+ "notNull": false
2811
+ }
2812
+ },
2813
+ "indexes": {
2814
+ "junior_identities_provider_subject_uidx": {
2815
+ "name": "junior_identities_provider_subject_uidx",
2816
+ "columns": [
2817
+ {
2818
+ "expression": "provider",
2819
+ "isExpression": false,
2820
+ "asc": true,
2821
+ "nulls": "last"
2822
+ },
2823
+ {
2824
+ "expression": "provider_tenant_id",
2825
+ "isExpression": false,
2826
+ "asc": true,
2827
+ "nulls": "last"
2828
+ },
2829
+ {
2830
+ "expression": "provider_subject_id",
2831
+ "isExpression": false,
2832
+ "asc": true,
2833
+ "nulls": "last"
2834
+ }
2835
+ ],
2836
+ "isUnique": true,
2837
+ "concurrently": false,
2838
+ "method": "btree",
2839
+ "with": {}
2840
+ },
2841
+ "junior_identities_user_idx": {
2842
+ "name": "junior_identities_user_idx",
2843
+ "columns": [
2844
+ {
2845
+ "expression": "user_id",
2846
+ "isExpression": false,
2847
+ "asc": true,
2848
+ "nulls": "last"
2849
+ }
2850
+ ],
2851
+ "isUnique": false,
2852
+ "concurrently": false,
2853
+ "method": "btree",
2854
+ "with": {}
2855
+ },
2856
+ "junior_identities_verified_email_idx": {
2857
+ "name": "junior_identities_verified_email_idx",
2858
+ "columns": [
2859
+ {
2860
+ "expression": "email_normalized",
2861
+ "isExpression": false,
2862
+ "asc": true,
2863
+ "nulls": "last"
2864
+ }
2865
+ ],
2866
+ "isUnique": false,
2867
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
2868
+ "concurrently": false,
2869
+ "method": "btree",
2870
+ "with": {}
2871
+ },
2872
+ "junior_identities_kind_provider_idx": {
2873
+ "name": "junior_identities_kind_provider_idx",
2874
+ "columns": [
2875
+ {
2876
+ "expression": "kind",
2877
+ "isExpression": false,
2878
+ "asc": true,
2879
+ "nulls": "last"
2880
+ },
2881
+ {
2882
+ "expression": "provider",
2883
+ "isExpression": false,
2884
+ "asc": true,
2885
+ "nulls": "last"
2886
+ }
2887
+ ],
2888
+ "isUnique": false,
2889
+ "concurrently": false,
2890
+ "method": "btree",
2891
+ "with": {}
2892
+ }
2893
+ },
2894
+ "foreignKeys": {
2895
+ "junior_identities_user_id_junior_users_id_fk": {
2896
+ "name": "junior_identities_user_id_junior_users_id_fk",
2897
+ "tableFrom": "junior_identities",
2898
+ "tableTo": "junior_users",
2899
+ "columnsFrom": ["user_id"],
2900
+ "columnsTo": ["id"],
2901
+ "onDelete": "no action",
2902
+ "onUpdate": "no action"
2903
+ }
2904
+ },
2905
+ "compositePrimaryKeys": {},
2906
+ "uniqueConstraints": {},
2907
+ "policies": {},
2908
+ "checkConstraints": {},
2909
+ "isRLSEnabled": false
2910
+ },
2911
+ "public.junior_location_configurations": {
2912
+ "name": "junior_location_configurations",
2913
+ "schema": "",
2914
+ "columns": {
2915
+ "location_id": {
2916
+ "name": "location_id",
2917
+ "type": "text",
2918
+ "primaryKey": false,
2919
+ "notNull": true
2920
+ },
2921
+ "key": {
2922
+ "name": "key",
2923
+ "type": "text",
2924
+ "primaryKey": false,
2925
+ "notNull": true
2926
+ },
2927
+ "value": {
2928
+ "name": "value",
2929
+ "type": "text",
2930
+ "primaryKey": false,
2931
+ "notNull": true
2932
+ },
2933
+ "updated_at": {
2934
+ "name": "updated_at",
2935
+ "type": "timestamp with time zone",
2936
+ "primaryKey": false,
2937
+ "notNull": true
2938
+ },
2939
+ "updated_by": {
2940
+ "name": "updated_by",
2941
+ "type": "text",
2942
+ "primaryKey": false,
2943
+ "notNull": false
2944
+ },
2945
+ "source": {
2946
+ "name": "source",
2947
+ "type": "text",
2948
+ "primaryKey": false,
2949
+ "notNull": false
2950
+ },
2951
+ "expires_at": {
2952
+ "name": "expires_at",
2953
+ "type": "text",
2954
+ "primaryKey": false,
2955
+ "notNull": false
2956
+ }
2957
+ },
2958
+ "indexes": {},
2959
+ "foreignKeys": {
2960
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
2961
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
2962
+ "tableFrom": "junior_location_configurations",
2963
+ "tableTo": "junior_destinations",
2964
+ "columnsFrom": ["location_id"],
2965
+ "columnsTo": ["id"],
2966
+ "onDelete": "cascade",
2967
+ "onUpdate": "no action"
2968
+ }
2969
+ },
2970
+ "compositePrimaryKeys": {
2971
+ "junior_location_configurations_location_id_key_pk": {
2972
+ "name": "junior_location_configurations_location_id_key_pk",
2973
+ "columns": ["location_id", "key"]
2974
+ }
2975
+ },
2976
+ "uniqueConstraints": {},
2977
+ "policies": {},
2978
+ "checkConstraints": {},
2979
+ "isRLSEnabled": false
2980
+ },
2981
+ "public.junior_snapshots": {
2982
+ "name": "junior_snapshots",
2983
+ "schema": "",
2984
+ "columns": {
2985
+ "id": {
2986
+ "name": "id",
2987
+ "type": "text",
2988
+ "primaryKey": true,
2989
+ "notNull": true
2990
+ },
2991
+ "workspace_id": {
2992
+ "name": "workspace_id",
2993
+ "type": "text",
2994
+ "primaryKey": false,
2995
+ "notNull": true
2996
+ },
2997
+ "profile_hash": {
2998
+ "name": "profile_hash",
2999
+ "type": "text",
3000
+ "primaryKey": false,
3001
+ "notNull": true
3002
+ },
3003
+ "status": {
3004
+ "name": "status",
3005
+ "type": "text",
3006
+ "primaryKey": false,
3007
+ "notNull": true
3008
+ },
3009
+ "snapshot_id": {
3010
+ "name": "snapshot_id",
3011
+ "type": "text",
3012
+ "primaryKey": false,
3013
+ "notNull": false
3014
+ },
3015
+ "build_duration_ms": {
3016
+ "name": "build_duration_ms",
3017
+ "type": "integer",
3018
+ "primaryKey": false,
3019
+ "notNull": false
3020
+ },
3021
+ "size_bytes": {
3022
+ "name": "size_bytes",
3023
+ "type": "bigint",
3024
+ "primaryKey": false,
3025
+ "notNull": false
3026
+ },
3027
+ "generated_at": {
3028
+ "name": "generated_at",
3029
+ "type": "timestamp with time zone",
3030
+ "primaryKey": false,
3031
+ "notNull": false
3032
+ },
3033
+ "build_started_at": {
3034
+ "name": "build_started_at",
3035
+ "type": "timestamp with time zone",
3036
+ "primaryKey": false,
3037
+ "notNull": false
3038
+ },
3039
+ "build_phase": {
3040
+ "name": "build_phase",
3041
+ "type": "text",
3042
+ "primaryKey": false,
3043
+ "notNull": false
3044
+ },
3045
+ "build_sandbox_name": {
3046
+ "name": "build_sandbox_name",
3047
+ "type": "text",
3048
+ "primaryKey": false,
3049
+ "notNull": false
3050
+ },
3051
+ "build_command_id": {
3052
+ "name": "build_command_id",
3053
+ "type": "text",
3054
+ "primaryKey": false,
3055
+ "notNull": false
3056
+ },
3057
+ "build_error": {
3058
+ "name": "build_error",
3059
+ "type": "text",
3060
+ "primaryKey": false,
3061
+ "notNull": false
3062
+ },
3063
+ "created_at": {
3064
+ "name": "created_at",
3065
+ "type": "timestamp with time zone",
3066
+ "primaryKey": false,
3067
+ "notNull": true
3068
+ },
3069
+ "updated_at": {
3070
+ "name": "updated_at",
3071
+ "type": "timestamp with time zone",
3072
+ "primaryKey": false,
3073
+ "notNull": true
3074
+ }
3075
+ },
3076
+ "indexes": {
3077
+ "junior_snapshots_snapshot_id_uidx": {
3078
+ "name": "junior_snapshots_snapshot_id_uidx",
3079
+ "columns": [
3080
+ {
3081
+ "expression": "snapshot_id",
3082
+ "isExpression": false,
3083
+ "asc": true,
3084
+ "nulls": "last"
3085
+ }
3086
+ ],
3087
+ "isUnique": true,
3088
+ "concurrently": false,
3089
+ "method": "btree",
3090
+ "with": {}
3091
+ },
3092
+ "junior_snapshots_workspace_idx": {
3093
+ "name": "junior_snapshots_workspace_idx",
3094
+ "columns": [
3095
+ {
3096
+ "expression": "workspace_id",
3097
+ "isExpression": false,
3098
+ "asc": true,
3099
+ "nulls": "last"
3100
+ }
3101
+ ],
3102
+ "isUnique": false,
3103
+ "concurrently": false,
3104
+ "method": "btree",
3105
+ "with": {}
3106
+ },
3107
+ "junior_snapshots_workspace_profile_status_idx": {
3108
+ "name": "junior_snapshots_workspace_profile_status_idx",
3109
+ "columns": [
3110
+ {
3111
+ "expression": "workspace_id",
3112
+ "isExpression": false,
3113
+ "asc": true,
3114
+ "nulls": "last"
3115
+ },
3116
+ {
3117
+ "expression": "profile_hash",
3118
+ "isExpression": false,
3119
+ "asc": true,
3120
+ "nulls": "last"
3121
+ },
3122
+ {
3123
+ "expression": "status",
3124
+ "isExpression": false,
3125
+ "asc": true,
3126
+ "nulls": "last"
3127
+ }
3128
+ ],
3129
+ "isUnique": false,
3130
+ "concurrently": false,
3131
+ "method": "btree",
3132
+ "with": {}
3133
+ },
3134
+ "junior_snapshots_active_build_uidx": {
3135
+ "name": "junior_snapshots_active_build_uidx",
3136
+ "columns": [
3137
+ {
3138
+ "expression": "workspace_id",
3139
+ "isExpression": false,
3140
+ "asc": true,
3141
+ "nulls": "last"
3142
+ },
3143
+ {
3144
+ "expression": "profile_hash",
3145
+ "isExpression": false,
3146
+ "asc": true,
3147
+ "nulls": "last"
3148
+ }
3149
+ ],
3150
+ "isUnique": true,
3151
+ "where": "\"junior_snapshots\".\"status\" = 'building'",
3152
+ "concurrently": false,
3153
+ "method": "btree",
3154
+ "with": {}
3155
+ },
3156
+ "junior_snapshots_workspace_status_idx": {
3157
+ "name": "junior_snapshots_workspace_status_idx",
3158
+ "columns": [
3159
+ {
3160
+ "expression": "workspace_id",
3161
+ "isExpression": false,
3162
+ "asc": true,
3163
+ "nulls": "last"
3164
+ },
3165
+ {
3166
+ "expression": "status",
3167
+ "isExpression": false,
3168
+ "asc": true,
3169
+ "nulls": "last"
3170
+ }
3171
+ ],
3172
+ "isUnique": false,
3173
+ "concurrently": false,
3174
+ "method": "btree",
3175
+ "with": {}
3176
+ }
3177
+ },
3178
+ "foreignKeys": {
3179
+ "junior_snapshots_workspace_id_junior_workspaces_id_fk": {
3180
+ "name": "junior_snapshots_workspace_id_junior_workspaces_id_fk",
3181
+ "tableFrom": "junior_snapshots",
3182
+ "tableTo": "junior_workspaces",
3183
+ "columnsFrom": ["workspace_id"],
3184
+ "columnsTo": ["id"],
3185
+ "onDelete": "cascade",
3186
+ "onUpdate": "no action"
3187
+ }
3188
+ },
3189
+ "compositePrimaryKeys": {},
3190
+ "uniqueConstraints": {},
3191
+ "policies": {},
3192
+ "checkConstraints": {
3193
+ "junior_snapshots_status_check": {
3194
+ "name": "junior_snapshots_status_check",
3195
+ "value": "\"junior_snapshots\".\"status\" in ('building', 'failed', 'ready')"
3196
+ },
3197
+ "junior_snapshots_build_phase_check": {
3198
+ "name": "junior_snapshots_build_phase_check",
3199
+ "value": "\"junior_snapshots\".\"build_phase\" is null or \"junior_snapshots\".\"build_phase\" in ('created', 'dependencies_installed', 'repositories_prepared')"
3200
+ },
3201
+ "junior_snapshots_ready_fields_check": {
3202
+ "name": "junior_snapshots_ready_fields_check",
3203
+ "value": "\"junior_snapshots\".\"status\" <> 'ready' or (\"junior_snapshots\".\"snapshot_id\" is not null and \"junior_snapshots\".\"build_duration_ms\" is not null and \"junior_snapshots\".\"generated_at\" is not null)"
3204
+ },
3205
+ "junior_snapshots_build_fields_check": {
3206
+ "name": "junior_snapshots_build_fields_check",
3207
+ "value": "\"junior_snapshots\".\"status\" = 'ready' or (\"junior_snapshots\".\"build_started_at\" is not null and \"junior_snapshots\".\"build_phase\" is not null)"
3208
+ },
3209
+ "junior_snapshots_build_duration_check": {
3210
+ "name": "junior_snapshots_build_duration_check",
3211
+ "value": "\"junior_snapshots\".\"build_duration_ms\" is null or \"junior_snapshots\".\"build_duration_ms\" >= 0"
3212
+ },
3213
+ "junior_snapshots_size_bytes_check": {
3214
+ "name": "junior_snapshots_size_bytes_check",
3215
+ "value": "\"junior_snapshots\".\"size_bytes\" is null or \"junior_snapshots\".\"size_bytes\" >= 0"
3216
+ }
3217
+ },
3218
+ "isRLSEnabled": false
3219
+ },
3220
+ "public.junior_stats": {
3221
+ "name": "junior_stats",
3222
+ "schema": "",
3223
+ "columns": {
3224
+ "date": {
3225
+ "name": "date",
3226
+ "type": "date",
3227
+ "primaryKey": false,
3228
+ "notNull": true
3229
+ },
3230
+ "namespace": {
3231
+ "name": "namespace",
3232
+ "type": "text",
3233
+ "primaryKey": false,
3234
+ "notNull": true
3235
+ },
3236
+ "metric": {
3237
+ "name": "metric",
3238
+ "type": "text",
3239
+ "primaryKey": false,
3240
+ "notNull": true
3241
+ },
3242
+ "name": {
3243
+ "name": "name",
3244
+ "type": "text",
3245
+ "primaryKey": false,
3246
+ "notNull": true
3247
+ },
3248
+ "count": {
3249
+ "name": "count",
3250
+ "type": "integer",
3251
+ "primaryKey": false,
3252
+ "notNull": true,
3253
+ "default": 0
3254
+ }
3255
+ },
3256
+ "indexes": {},
3257
+ "foreignKeys": {},
3258
+ "compositePrimaryKeys": {
3259
+ "junior_stats_date_namespace_metric_name_pk": {
3260
+ "name": "junior_stats_date_namespace_metric_name_pk",
3261
+ "columns": ["date", "namespace", "metric", "name"]
3262
+ }
3263
+ },
3264
+ "uniqueConstraints": {},
3265
+ "policies": {},
3266
+ "checkConstraints": {},
3267
+ "isRLSEnabled": false
3268
+ },
3269
+ "public.junior_users": {
3270
+ "name": "junior_users",
3271
+ "schema": "",
3272
+ "columns": {
3273
+ "id": {
3274
+ "name": "id",
3275
+ "type": "text",
3276
+ "primaryKey": true,
3277
+ "notNull": true
3278
+ },
3279
+ "primary_email": {
3280
+ "name": "primary_email",
3281
+ "type": "text",
3282
+ "primaryKey": false,
3283
+ "notNull": true
3284
+ },
3285
+ "primary_email_normalized": {
3286
+ "name": "primary_email_normalized",
3287
+ "type": "text",
3288
+ "primaryKey": false,
3289
+ "notNull": true
3290
+ },
3291
+ "display_name": {
3292
+ "name": "display_name",
3293
+ "type": "text",
3294
+ "primaryKey": false,
3295
+ "notNull": false
3296
+ },
3297
+ "timezone": {
3298
+ "name": "timezone",
3299
+ "type": "text",
3300
+ "primaryKey": false,
3301
+ "notNull": false
3302
+ },
3303
+ "is_admin": {
3304
+ "name": "is_admin",
3305
+ "type": "boolean",
3306
+ "primaryKey": false,
3307
+ "notNull": true,
3308
+ "default": false
3309
+ },
3310
+ "created_at": {
3311
+ "name": "created_at",
3312
+ "type": "timestamp with time zone",
3313
+ "primaryKey": false,
3314
+ "notNull": true
3315
+ },
3316
+ "updated_at": {
3317
+ "name": "updated_at",
3318
+ "type": "timestamp with time zone",
3319
+ "primaryKey": false,
3320
+ "notNull": true
3321
+ }
3322
+ },
3323
+ "indexes": {
3324
+ "junior_users_primary_email_normalized_uidx": {
3325
+ "name": "junior_users_primary_email_normalized_uidx",
3326
+ "columns": [
3327
+ {
3328
+ "expression": "primary_email_normalized",
3329
+ "isExpression": false,
3330
+ "asc": true,
3331
+ "nulls": "last"
3332
+ }
3333
+ ],
3334
+ "isUnique": true,
3335
+ "concurrently": false,
3336
+ "method": "btree",
3337
+ "with": {}
3338
+ }
3339
+ },
3340
+ "foreignKeys": {},
3341
+ "compositePrimaryKeys": {},
3342
+ "uniqueConstraints": {},
3343
+ "policies": {},
3344
+ "checkConstraints": {},
3345
+ "isRLSEnabled": false
3346
+ },
3347
+ "public.junior_workspace_repos": {
3348
+ "name": "junior_workspace_repos",
3349
+ "schema": "",
3350
+ "columns": {
3351
+ "workspace_id": {
3352
+ "name": "workspace_id",
3353
+ "type": "text",
3354
+ "primaryKey": false,
3355
+ "notNull": true
3356
+ },
3357
+ "provider": {
3358
+ "name": "provider",
3359
+ "type": "text",
3360
+ "primaryKey": false,
3361
+ "notNull": true
3362
+ },
3363
+ "repo": {
3364
+ "name": "repo",
3365
+ "type": "text",
3366
+ "primaryKey": false,
3367
+ "notNull": true
3368
+ }
3369
+ },
3370
+ "indexes": {},
3371
+ "foreignKeys": {
3372
+ "junior_workspace_repos_workspace_id_junior_workspaces_id_fk": {
3373
+ "name": "junior_workspace_repos_workspace_id_junior_workspaces_id_fk",
3374
+ "tableFrom": "junior_workspace_repos",
3375
+ "tableTo": "junior_workspaces",
3376
+ "columnsFrom": ["workspace_id"],
3377
+ "columnsTo": ["id"],
3378
+ "onDelete": "cascade",
3379
+ "onUpdate": "no action"
3380
+ }
3381
+ },
3382
+ "compositePrimaryKeys": {
3383
+ "junior_workspace_repos_workspace_id_provider_repo_pk": {
3384
+ "name": "junior_workspace_repos_workspace_id_provider_repo_pk",
3385
+ "columns": ["workspace_id", "provider", "repo"]
3386
+ }
3387
+ },
3388
+ "uniqueConstraints": {},
3389
+ "policies": {},
3390
+ "checkConstraints": {},
3391
+ "isRLSEnabled": false
3392
+ },
3393
+ "public.junior_workspaces": {
3394
+ "name": "junior_workspaces",
3395
+ "schema": "",
3396
+ "columns": {
3397
+ "id": {
3398
+ "name": "id",
3399
+ "type": "text",
3400
+ "primaryKey": true,
3401
+ "notNull": true
3402
+ },
3403
+ "name": {
3404
+ "name": "name",
3405
+ "type": "text",
3406
+ "primaryKey": false,
3407
+ "notNull": true
3408
+ },
3409
+ "setup_script": {
3410
+ "name": "setup_script",
3411
+ "type": "text",
3412
+ "primaryKey": false,
3413
+ "notNull": true,
3414
+ "default": "''"
3415
+ },
3416
+ "created_at": {
3417
+ "name": "created_at",
3418
+ "type": "timestamp with time zone",
3419
+ "primaryKey": false,
3420
+ "notNull": true
3421
+ },
3422
+ "updated_at": {
3423
+ "name": "updated_at",
3424
+ "type": "timestamp with time zone",
3425
+ "primaryKey": false,
3426
+ "notNull": true
3427
+ }
3428
+ },
3429
+ "indexes": {
3430
+ "junior_workspaces_name_idx": {
3431
+ "name": "junior_workspaces_name_idx",
3432
+ "columns": [
3433
+ {
3434
+ "expression": "name",
3435
+ "isExpression": false,
3436
+ "asc": true,
3437
+ "nulls": "last"
3438
+ }
3439
+ ],
3440
+ "isUnique": true,
3441
+ "concurrently": false,
3442
+ "method": "btree",
3443
+ "with": {}
3444
+ }
3445
+ },
3446
+ "foreignKeys": {},
3447
+ "compositePrimaryKeys": {},
3448
+ "uniqueConstraints": {},
3449
+ "policies": {},
3450
+ "checkConstraints": {},
3451
+ "isRLSEnabled": false
3452
+ }
3453
+ },
3454
+ "enums": {},
3455
+ "schemas": {},
3456
+ "sequences": {},
3457
+ "roles": {},
3458
+ "policies": {},
3459
+ "views": {},
3460
+ "_meta": {
3461
+ "columns": {},
3462
+ "schemas": {},
3463
+ "tables": {}
3464
+ }
3465
+ }