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