@sentry/junior 0.132.0 → 0.134.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 (83) hide show
  1. package/dist/{agent-hooks-ONXOJDR6.js → agent-hooks-HGXNYOOD.js} +9 -9
  2. package/dist/api/schema/task.d.ts +60 -0
  3. package/dist/api/schema.d.ts +2 -2
  4. package/dist/api/schema.js +3 -1
  5. package/dist/api.js +90 -20
  6. package/dist/app.js +110 -39
  7. package/dist/{catalog-runtime-BATAY4R7.js → catalog-runtime-P6QHU6XE.js} +5 -5
  8. package/dist/chat/agent/prompt.d.ts +7 -5
  9. package/dist/chat/agent/repository-context.d.ts +20 -0
  10. package/dist/chat/agent/sandbox.d.ts +8 -0
  11. package/dist/chat/agent/tools.d.ts +3 -0
  12. package/dist/chat/config.d.ts +2 -0
  13. package/dist/chat/conversations/projection.d.ts +3 -1
  14. package/dist/chat/conversations/sql/bindings.d.ts +13 -0
  15. package/dist/chat/conversations/sql/store.d.ts +3 -0
  16. package/dist/chat/conversations/store.d.ts +15 -0
  17. package/dist/chat/plugins/agent-hooks.d.ts +2 -2
  18. package/dist/chat/repository-instructions.d.ts +44 -0
  19. package/dist/chat/runtime/reply-executor.d.ts +1 -0
  20. package/dist/chat/runtime/slack-runtime.d.ts +2 -0
  21. package/dist/chat/sandbox/noninteractive-command.d.ts +2 -0
  22. package/dist/chat/sandbox/sandbox.d.ts +3 -0
  23. package/dist/chat/sandbox/session.d.ts +1 -0
  24. package/dist/chat/services/context-compaction.d.ts +1 -0
  25. package/dist/chat/slack/dispatch-turn.d.ts +1 -0
  26. package/dist/chat/slack/reply.d.ts +1 -1
  27. package/dist/chat/slack/tools/user-lookup.d.ts +2 -6
  28. package/dist/chat/tasks/execution-stats.d.ts +29 -0
  29. package/dist/chat/tasks/registered.d.ts +3 -0
  30. package/dist/chat/tools/index.d.ts +2 -0
  31. package/dist/chat/tools/sandbox/bash.d.ts +1 -0
  32. package/dist/chat/tools/system-time.d.ts +11 -1
  33. package/dist/{chunk-O2UXPUVQ.js → chunk-52DIKFJV.js} +14 -6
  34. package/dist/{chunk-GOEZU33G.js → chunk-6T3AYZT7.js} +1 -1
  35. package/dist/{chunk-GPXVDJML.js → chunk-7GKQ7UIO.js} +449 -39
  36. package/dist/{chunk-QVEXYYFM.js → chunk-7UTBPDXK.js} +24 -1
  37. package/dist/{chunk-U76PS7AT.js → chunk-AS3I7OIL.js} +2 -2
  38. package/dist/{chunk-HX236W2U.js → chunk-CDQ4YIZM.js} +9 -0
  39. package/dist/{chunk-ODIP5CEM.js → chunk-FDNAUM7X.js} +32 -32
  40. package/dist/{chunk-GTKNPQNN.js → chunk-FL466XX5.js} +36 -24
  41. package/dist/{chunk-2425Q4OR.js → chunk-GSP5SMZJ.js} +1 -1
  42. package/dist/{chunk-XN656LB4.js → chunk-KWGJG4HO.js} +6 -12
  43. package/dist/{chunk-ISNRPCPG.js → chunk-LKK4XMUV.js} +1 -1
  44. package/dist/{chunk-G3WYA2RS.js → chunk-MFERLE3G.js} +1 -1
  45. package/dist/{chunk-ZMV2YBT6.js → chunk-NF2TNZPD.js} +788 -674
  46. package/dist/chunk-NOA34AJY.js +122 -0
  47. package/dist/{chunk-JYQAE2ZU.js → chunk-NYWSCJVW.js} +1 -1
  48. package/dist/{chunk-KB2M27DL.js → chunk-QLEKAO7O.js} +130 -40
  49. package/dist/{chunk-BKE47OOW.js → chunk-S6DMTEOM.js} +2 -2
  50. package/dist/{chunk-ALDPUN3Z.js → chunk-TR6UEEYD.js} +8 -6
  51. package/dist/{chunk-WEJIS7OC.js → chunk-U3ZI7CCW.js} +1 -1
  52. package/dist/{chunk-B7IY6SVJ.js → chunk-VEGF62FV.js} +1 -1
  53. package/dist/{chunk-SKWIIUS7.js → chunk-VGXJMECA.js} +7 -7
  54. package/dist/{chunk-V44FFBO3.js → chunk-VP6NCPRS.js} +1 -1
  55. package/dist/{chunk-WYQP7QSB.js → chunk-VPYKNCTN.js} +101 -61
  56. package/dist/{chunk-NNHUGGO4.js → chunk-XG5PHKPM.js} +19 -3
  57. package/dist/{chunk-AW5Z3T7V.js → chunk-YNLQQ622.js} +9 -8
  58. package/dist/cli/chat.js +25 -25
  59. package/dist/cli/check.js +6 -6
  60. package/dist/cli/init.js +1 -1
  61. package/dist/cli/plugins.js +12 -12
  62. package/dist/cli/snapshot-create.js +9 -9
  63. package/dist/cli/upgrade.js +9 -8
  64. package/dist/db/executor.d.ts +2 -1
  65. package/dist/db/neon.d.ts +1 -0
  66. package/dist/db/postgres.d.ts +1 -0
  67. package/dist/db/schema/conversation-bindings.d.ts +110 -0
  68. package/dist/db/schema/task-executions.d.ts +110 -0
  69. package/dist/db/schema.d.ts +221 -1
  70. package/dist/{db-QFFZACXF.js → db-GFK4NHWJ.js} +7 -7
  71. package/dist/instrumentation.js +4 -4
  72. package/dist/nitro.js +2 -2
  73. package/dist/{oauth-callback-server-5WXLD533.js → oauth-callback-server-HUJLAQ5N.js} +19 -18
  74. package/dist/{runner-Y3LTUNAA.js → runner-T77AFAH4.js} +13 -12
  75. package/dist/{skills-7M5C24GM.js → skills-3KUFJOOR.js} +6 -6
  76. package/dist/{validation-MRILMYDI.js → validation-FMWDHKYU.js} +6 -6
  77. package/dist/version.js +1 -1
  78. package/migrations/0018_curvy_excalibur.sql +12 -0
  79. package/migrations/0019_lowly_valkyrie.sql +14 -0
  80. package/migrations/meta/0018_snapshot.json +1756 -0
  81. package/migrations/meta/0019_snapshot.json +1904 -0
  82. package/migrations/meta/_journal.json +15 -1
  83. package/package.json +5 -5
@@ -0,0 +1,1756 @@
1
+ {
2
+ "id": "dd0b031f-d92a-4db5-96dd-7f6b77042d4a",
3
+ "prevId": "40cf8479-8a45-4e3d-a267-facc28ebc11d",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_api_tokens": {
8
+ "name": "junior_api_tokens",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "owner_email_normalized": {
18
+ "name": "owner_email_normalized",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "name": {
24
+ "name": "name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "token_hash": {
30
+ "name": "token_hash",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "token_suffix": {
36
+ "name": "token_suffix",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "created_at": {
42
+ "name": "created_at",
43
+ "type": "timestamp with time zone",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "expires_at": {
48
+ "name": "expires_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "last_used_at": {
54
+ "name": "last_used_at",
55
+ "type": "timestamp with time zone",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "revoked_at": {
60
+ "name": "revoked_at",
61
+ "type": "timestamp with time zone",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ }
65
+ },
66
+ "indexes": {
67
+ "junior_api_tokens_token_hash_uidx": {
68
+ "name": "junior_api_tokens_token_hash_uidx",
69
+ "columns": [
70
+ {
71
+ "expression": "token_hash",
72
+ "isExpression": false,
73
+ "asc": true,
74
+ "nulls": "last"
75
+ }
76
+ ],
77
+ "isUnique": true,
78
+ "concurrently": false,
79
+ "method": "btree",
80
+ "with": {}
81
+ },
82
+ "junior_api_tokens_owner_email_idx": {
83
+ "name": "junior_api_tokens_owner_email_idx",
84
+ "columns": [
85
+ {
86
+ "expression": "owner_email_normalized",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": false,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ }
97
+ },
98
+ "foreignKeys": {},
99
+ "compositePrimaryKeys": {},
100
+ "uniqueConstraints": {},
101
+ "policies": {},
102
+ "checkConstraints": {},
103
+ "isRLSEnabled": false
104
+ },
105
+ "public.junior_conversation_annotations": {
106
+ "name": "junior_conversation_annotations",
107
+ "schema": "",
108
+ "columns": {
109
+ "conversation_id": {
110
+ "name": "conversation_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "plugin": {
116
+ "name": "plugin",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "kind": {
122
+ "name": "kind",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "key": {
128
+ "name": "key",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true
132
+ },
133
+ "annotation_json": {
134
+ "name": "annotation_json",
135
+ "type": "jsonb",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "created_at": {
140
+ "name": "created_at",
141
+ "type": "timestamp with time zone",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ },
145
+ "updated_at": {
146
+ "name": "updated_at",
147
+ "type": "timestamp with time zone",
148
+ "primaryKey": false,
149
+ "notNull": true
150
+ }
151
+ },
152
+ "indexes": {},
153
+ "foreignKeys": {
154
+ "junior_conversation_annotations_conversation_id_fk": {
155
+ "name": "junior_conversation_annotations_conversation_id_fk",
156
+ "tableFrom": "junior_conversation_annotations",
157
+ "tableTo": "junior_conversations",
158
+ "columnsFrom": [
159
+ "conversation_id"
160
+ ],
161
+ "columnsTo": [
162
+ "conversation_id"
163
+ ],
164
+ "onDelete": "cascade",
165
+ "onUpdate": "no action"
166
+ }
167
+ },
168
+ "compositePrimaryKeys": {
169
+ "junior_conversation_annotations_pk": {
170
+ "name": "junior_conversation_annotations_pk",
171
+ "columns": [
172
+ "conversation_id",
173
+ "plugin",
174
+ "kind",
175
+ "key"
176
+ ]
177
+ }
178
+ },
179
+ "uniqueConstraints": {},
180
+ "policies": {},
181
+ "checkConstraints": {},
182
+ "isRLSEnabled": false
183
+ },
184
+ "public.junior_conversation_bindings": {
185
+ "name": "junior_conversation_bindings",
186
+ "schema": "",
187
+ "columns": {
188
+ "conversation_id": {
189
+ "name": "conversation_id",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "provider": {
195
+ "name": "provider",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "provider_tenant_id": {
201
+ "name": "provider_tenant_id",
202
+ "type": "text",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "''"
206
+ },
207
+ "provider_destination_id": {
208
+ "name": "provider_destination_id",
209
+ "type": "text",
210
+ "primaryKey": false,
211
+ "notNull": true
212
+ },
213
+ "provider_conversation_id": {
214
+ "name": "provider_conversation_id",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": true
218
+ },
219
+ "created_at": {
220
+ "name": "created_at",
221
+ "type": "timestamp with time zone",
222
+ "primaryKey": false,
223
+ "notNull": true
224
+ }
225
+ },
226
+ "indexes": {
227
+ "junior_conversation_bindings_conversation_idx": {
228
+ "name": "junior_conversation_bindings_conversation_idx",
229
+ "columns": [
230
+ {
231
+ "expression": "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
+ },
243
+ "foreignKeys": {
244
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
245
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
246
+ "tableFrom": "junior_conversation_bindings",
247
+ "tableTo": "junior_conversations",
248
+ "columnsFrom": [
249
+ "conversation_id"
250
+ ],
251
+ "columnsTo": [
252
+ "conversation_id"
253
+ ],
254
+ "onDelete": "no action",
255
+ "onUpdate": "no action"
256
+ }
257
+ },
258
+ "compositePrimaryKeys": {
259
+ "junior_conversation_bindings_provider_conversation_pk": {
260
+ "name": "junior_conversation_bindings_provider_conversation_pk",
261
+ "columns": [
262
+ "provider",
263
+ "provider_tenant_id",
264
+ "provider_destination_id",
265
+ "provider_conversation_id"
266
+ ]
267
+ }
268
+ },
269
+ "uniqueConstraints": {},
270
+ "policies": {},
271
+ "checkConstraints": {},
272
+ "isRLSEnabled": false
273
+ },
274
+ "public.junior_conversation_events": {
275
+ "name": "junior_conversation_events",
276
+ "schema": "",
277
+ "columns": {
278
+ "conversation_id": {
279
+ "name": "conversation_id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true
283
+ },
284
+ "seq": {
285
+ "name": "seq",
286
+ "type": "integer",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "history_version": {
291
+ "name": "history_version",
292
+ "type": "integer",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "schema_version": {
297
+ "name": "schema_version",
298
+ "type": "integer",
299
+ "primaryKey": false,
300
+ "notNull": true,
301
+ "default": 1
302
+ },
303
+ "idempotency_key": {
304
+ "name": "idempotency_key",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": false
308
+ },
309
+ "type": {
310
+ "name": "type",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": true
314
+ },
315
+ "payload": {
316
+ "name": "payload",
317
+ "type": "jsonb",
318
+ "primaryKey": false,
319
+ "notNull": true
320
+ },
321
+ "created_at": {
322
+ "name": "created_at",
323
+ "type": "timestamp with time zone",
324
+ "primaryKey": false,
325
+ "notNull": true
326
+ }
327
+ },
328
+ "indexes": {
329
+ "junior_conversation_events_history_version_idx": {
330
+ "name": "junior_conversation_events_history_version_idx",
331
+ "columns": [
332
+ {
333
+ "expression": "conversation_id",
334
+ "isExpression": false,
335
+ "asc": true,
336
+ "nulls": "last"
337
+ },
338
+ {
339
+ "expression": "history_version",
340
+ "isExpression": false,
341
+ "asc": true,
342
+ "nulls": "last"
343
+ },
344
+ {
345
+ "expression": "seq",
346
+ "isExpression": false,
347
+ "asc": true,
348
+ "nulls": "last"
349
+ }
350
+ ],
351
+ "isUnique": false,
352
+ "concurrently": false,
353
+ "method": "btree",
354
+ "with": {}
355
+ },
356
+ "junior_conversation_events_type_idx": {
357
+ "name": "junior_conversation_events_type_idx",
358
+ "columns": [
359
+ {
360
+ "expression": "conversation_id",
361
+ "isExpression": false,
362
+ "asc": true,
363
+ "nulls": "last"
364
+ },
365
+ {
366
+ "expression": "type",
367
+ "isExpression": false,
368
+ "asc": true,
369
+ "nulls": "last"
370
+ },
371
+ {
372
+ "expression": "seq",
373
+ "isExpression": false,
374
+ "asc": true,
375
+ "nulls": "last"
376
+ }
377
+ ],
378
+ "isUnique": false,
379
+ "concurrently": false,
380
+ "method": "btree",
381
+ "with": {}
382
+ },
383
+ "junior_conversation_events_message_search_idx": {
384
+ "name": "junior_conversation_events_message_search_idx",
385
+ "columns": [
386
+ {
387
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
388
+ "asc": true,
389
+ "isExpression": true,
390
+ "nulls": "last"
391
+ }
392
+ ],
393
+ "isUnique": false,
394
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
395
+ "concurrently": false,
396
+ "method": "gin",
397
+ "with": {}
398
+ },
399
+ "junior_conversation_events_idempotency_idx": {
400
+ "name": "junior_conversation_events_idempotency_idx",
401
+ "columns": [
402
+ {
403
+ "expression": "conversation_id",
404
+ "isExpression": false,
405
+ "asc": true,
406
+ "nulls": "last"
407
+ },
408
+ {
409
+ "expression": "idempotency_key",
410
+ "isExpression": false,
411
+ "asc": true,
412
+ "nulls": "last"
413
+ }
414
+ ],
415
+ "isUnique": true,
416
+ "concurrently": false,
417
+ "method": "btree",
418
+ "with": {}
419
+ }
420
+ },
421
+ "foreignKeys": {
422
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
423
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
424
+ "tableFrom": "junior_conversation_events",
425
+ "tableTo": "junior_conversations",
426
+ "columnsFrom": [
427
+ "conversation_id"
428
+ ],
429
+ "columnsTo": [
430
+ "conversation_id"
431
+ ],
432
+ "onDelete": "no action",
433
+ "onUpdate": "no action"
434
+ }
435
+ },
436
+ "compositePrimaryKeys": {
437
+ "junior_conversation_events_conversation_id_seq_pk": {
438
+ "name": "junior_conversation_events_conversation_id_seq_pk",
439
+ "columns": [
440
+ "conversation_id",
441
+ "seq"
442
+ ]
443
+ }
444
+ },
445
+ "uniqueConstraints": {},
446
+ "policies": {},
447
+ "checkConstraints": {},
448
+ "isRLSEnabled": false
449
+ },
450
+ "public.junior_conversations": {
451
+ "name": "junior_conversations",
452
+ "schema": "",
453
+ "columns": {
454
+ "conversation_id": {
455
+ "name": "conversation_id",
456
+ "type": "text",
457
+ "primaryKey": true,
458
+ "notNull": true
459
+ },
460
+ "schema_version": {
461
+ "name": "schema_version",
462
+ "type": "integer",
463
+ "primaryKey": false,
464
+ "notNull": true,
465
+ "default": 1
466
+ },
467
+ "source": {
468
+ "name": "source",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": false
472
+ },
473
+ "source_json": {
474
+ "name": "source_json",
475
+ "type": "jsonb",
476
+ "primaryKey": false,
477
+ "notNull": false
478
+ },
479
+ "origin_type": {
480
+ "name": "origin_type",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": false
484
+ },
485
+ "origin_id": {
486
+ "name": "origin_id",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "origin_run_id": {
492
+ "name": "origin_run_id",
493
+ "type": "text",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "destination_id": {
498
+ "name": "destination_id",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "destination_json": {
504
+ "name": "destination_json",
505
+ "type": "jsonb",
506
+ "primaryKey": false,
507
+ "notNull": false
508
+ },
509
+ "actor_identity_id": {
510
+ "name": "actor_identity_id",
511
+ "type": "text",
512
+ "primaryKey": false,
513
+ "notNull": false
514
+ },
515
+ "creator_identity_id": {
516
+ "name": "creator_identity_id",
517
+ "type": "text",
518
+ "primaryKey": false,
519
+ "notNull": false
520
+ },
521
+ "credential_subject_identity_id": {
522
+ "name": "credential_subject_identity_id",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": false
526
+ },
527
+ "actor_json": {
528
+ "name": "actor_json",
529
+ "type": "jsonb",
530
+ "primaryKey": false,
531
+ "notNull": false
532
+ },
533
+ "channel_name": {
534
+ "name": "channel_name",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": false
538
+ },
539
+ "title": {
540
+ "name": "title",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false
544
+ },
545
+ "created_at": {
546
+ "name": "created_at",
547
+ "type": "timestamp with time zone",
548
+ "primaryKey": false,
549
+ "notNull": true
550
+ },
551
+ "last_activity_at": {
552
+ "name": "last_activity_at",
553
+ "type": "timestamp with time zone",
554
+ "primaryKey": false,
555
+ "notNull": true
556
+ },
557
+ "updated_at": {
558
+ "name": "updated_at",
559
+ "type": "timestamp with time zone",
560
+ "primaryKey": false,
561
+ "notNull": true
562
+ },
563
+ "execution_updated_at": {
564
+ "name": "execution_updated_at",
565
+ "type": "timestamp with time zone",
566
+ "primaryKey": false,
567
+ "notNull": false
568
+ },
569
+ "execution_status": {
570
+ "name": "execution_status",
571
+ "type": "text",
572
+ "primaryKey": false,
573
+ "notNull": true
574
+ },
575
+ "run_id": {
576
+ "name": "run_id",
577
+ "type": "text",
578
+ "primaryKey": false,
579
+ "notNull": false
580
+ },
581
+ "last_checkpoint_at": {
582
+ "name": "last_checkpoint_at",
583
+ "type": "timestamp with time zone",
584
+ "primaryKey": false,
585
+ "notNull": false
586
+ },
587
+ "last_enqueued_at": {
588
+ "name": "last_enqueued_at",
589
+ "type": "timestamp with time zone",
590
+ "primaryKey": false,
591
+ "notNull": false
592
+ },
593
+ "parent_conversation_id": {
594
+ "name": "parent_conversation_id",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false
598
+ },
599
+ "root_conversation_id": {
600
+ "name": "root_conversation_id",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": false
604
+ },
605
+ "transcript_purged_at": {
606
+ "name": "transcript_purged_at",
607
+ "type": "timestamp with time zone",
608
+ "primaryKey": false,
609
+ "notNull": false
610
+ },
611
+ "duration_ms": {
612
+ "name": "duration_ms",
613
+ "type": "integer",
614
+ "primaryKey": false,
615
+ "notNull": true,
616
+ "default": 0
617
+ },
618
+ "usage_json": {
619
+ "name": "usage_json",
620
+ "type": "jsonb",
621
+ "primaryKey": false,
622
+ "notNull": false
623
+ },
624
+ "execution_duration_ms": {
625
+ "name": "execution_duration_ms",
626
+ "type": "integer",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "default": 0
630
+ },
631
+ "execution_usage_json": {
632
+ "name": "execution_usage_json",
633
+ "type": "jsonb",
634
+ "primaryKey": false,
635
+ "notNull": false
636
+ },
637
+ "metric_run_id": {
638
+ "name": "metric_run_id",
639
+ "type": "text",
640
+ "primaryKey": false,
641
+ "notNull": false
642
+ },
643
+ "archived_at": {
644
+ "name": "archived_at",
645
+ "type": "timestamp with time zone",
646
+ "primaryKey": false,
647
+ "notNull": false
648
+ }
649
+ },
650
+ "indexes": {
651
+ "junior_conversations_last_activity_idx": {
652
+ "name": "junior_conversations_last_activity_idx",
653
+ "columns": [
654
+ {
655
+ "expression": "last_activity_at",
656
+ "isExpression": false,
657
+ "asc": false,
658
+ "nulls": "last"
659
+ },
660
+ {
661
+ "expression": "conversation_id",
662
+ "isExpression": false,
663
+ "asc": true,
664
+ "nulls": "last"
665
+ }
666
+ ],
667
+ "isUnique": false,
668
+ "concurrently": false,
669
+ "method": "btree",
670
+ "with": {}
671
+ },
672
+ "junior_conversations_active_idx": {
673
+ "name": "junior_conversations_active_idx",
674
+ "columns": [
675
+ {
676
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
677
+ "asc": true,
678
+ "isExpression": true,
679
+ "nulls": "last"
680
+ },
681
+ {
682
+ "expression": "conversation_id",
683
+ "isExpression": false,
684
+ "asc": true,
685
+ "nulls": "last"
686
+ }
687
+ ],
688
+ "isUnique": false,
689
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
690
+ "concurrently": false,
691
+ "method": "btree",
692
+ "with": {}
693
+ },
694
+ "junior_conversations_destination_activity_idx": {
695
+ "name": "junior_conversations_destination_activity_idx",
696
+ "columns": [
697
+ {
698
+ "expression": "destination_id",
699
+ "isExpression": false,
700
+ "asc": true,
701
+ "nulls": "last"
702
+ },
703
+ {
704
+ "expression": "last_activity_at",
705
+ "isExpression": false,
706
+ "asc": false,
707
+ "nulls": "last"
708
+ }
709
+ ],
710
+ "isUnique": false,
711
+ "concurrently": false,
712
+ "method": "btree",
713
+ "with": {}
714
+ },
715
+ "junior_conversations_actor_activity_idx": {
716
+ "name": "junior_conversations_actor_activity_idx",
717
+ "columns": [
718
+ {
719
+ "expression": "actor_identity_id",
720
+ "isExpression": false,
721
+ "asc": true,
722
+ "nulls": "last"
723
+ },
724
+ {
725
+ "expression": "last_activity_at",
726
+ "isExpression": false,
727
+ "asc": false,
728
+ "nulls": "last"
729
+ }
730
+ ],
731
+ "isUnique": false,
732
+ "concurrently": false,
733
+ "method": "btree",
734
+ "with": {}
735
+ },
736
+ "junior_conversations_origin_idx": {
737
+ "name": "junior_conversations_origin_idx",
738
+ "columns": [
739
+ {
740
+ "expression": "origin_type",
741
+ "isExpression": false,
742
+ "asc": true,
743
+ "nulls": "last"
744
+ },
745
+ {
746
+ "expression": "origin_id",
747
+ "isExpression": false,
748
+ "asc": true,
749
+ "nulls": "last"
750
+ },
751
+ {
752
+ "expression": "last_activity_at",
753
+ "isExpression": false,
754
+ "asc": false,
755
+ "nulls": "last"
756
+ }
757
+ ],
758
+ "isUnique": false,
759
+ "concurrently": false,
760
+ "method": "btree",
761
+ "with": {}
762
+ },
763
+ "junior_conversations_parent_idx": {
764
+ "name": "junior_conversations_parent_idx",
765
+ "columns": [
766
+ {
767
+ "expression": "parent_conversation_id",
768
+ "isExpression": false,
769
+ "asc": true,
770
+ "nulls": "last"
771
+ }
772
+ ],
773
+ "isUnique": false,
774
+ "concurrently": false,
775
+ "method": "btree",
776
+ "with": {}
777
+ },
778
+ "junior_conversations_root_idx": {
779
+ "name": "junior_conversations_root_idx",
780
+ "columns": [
781
+ {
782
+ "expression": "root_conversation_id",
783
+ "isExpression": false,
784
+ "asc": true,
785
+ "nulls": "last"
786
+ }
787
+ ],
788
+ "isUnique": false,
789
+ "concurrently": false,
790
+ "method": "btree",
791
+ "with": {}
792
+ }
793
+ },
794
+ "foreignKeys": {
795
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
796
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
797
+ "tableFrom": "junior_conversations",
798
+ "tableTo": "junior_destinations",
799
+ "columnsFrom": [
800
+ "destination_id"
801
+ ],
802
+ "columnsTo": [
803
+ "id"
804
+ ],
805
+ "onDelete": "no action",
806
+ "onUpdate": "no action"
807
+ },
808
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
809
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
810
+ "tableFrom": "junior_conversations",
811
+ "tableTo": "junior_identities",
812
+ "columnsFrom": [
813
+ "actor_identity_id"
814
+ ],
815
+ "columnsTo": [
816
+ "id"
817
+ ],
818
+ "onDelete": "no action",
819
+ "onUpdate": "no action"
820
+ },
821
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
822
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
823
+ "tableFrom": "junior_conversations",
824
+ "tableTo": "junior_identities",
825
+ "columnsFrom": [
826
+ "creator_identity_id"
827
+ ],
828
+ "columnsTo": [
829
+ "id"
830
+ ],
831
+ "onDelete": "no action",
832
+ "onUpdate": "no action"
833
+ },
834
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
835
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
836
+ "tableFrom": "junior_conversations",
837
+ "tableTo": "junior_identities",
838
+ "columnsFrom": [
839
+ "credential_subject_identity_id"
840
+ ],
841
+ "columnsTo": [
842
+ "id"
843
+ ],
844
+ "onDelete": "no action",
845
+ "onUpdate": "no action"
846
+ },
847
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
848
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
849
+ "tableFrom": "junior_conversations",
850
+ "tableTo": "junior_conversations",
851
+ "columnsFrom": [
852
+ "parent_conversation_id"
853
+ ],
854
+ "columnsTo": [
855
+ "conversation_id"
856
+ ],
857
+ "onDelete": "no action",
858
+ "onUpdate": "no action"
859
+ },
860
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
861
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
862
+ "tableFrom": "junior_conversations",
863
+ "tableTo": "junior_conversations",
864
+ "columnsFrom": [
865
+ "root_conversation_id"
866
+ ],
867
+ "columnsTo": [
868
+ "conversation_id"
869
+ ],
870
+ "onDelete": "no action",
871
+ "onUpdate": "no action"
872
+ }
873
+ },
874
+ "compositePrimaryKeys": {},
875
+ "uniqueConstraints": {},
876
+ "policies": {},
877
+ "checkConstraints": {},
878
+ "isRLSEnabled": false
879
+ },
880
+ "public.junior_destinations": {
881
+ "name": "junior_destinations",
882
+ "schema": "",
883
+ "columns": {
884
+ "id": {
885
+ "name": "id",
886
+ "type": "text",
887
+ "primaryKey": true,
888
+ "notNull": true
889
+ },
890
+ "provider": {
891
+ "name": "provider",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": true
895
+ },
896
+ "provider_tenant_id": {
897
+ "name": "provider_tenant_id",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "default": "''"
902
+ },
903
+ "provider_destination_id": {
904
+ "name": "provider_destination_id",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": true
908
+ },
909
+ "kind": {
910
+ "name": "kind",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": true
914
+ },
915
+ "parent_destination_id": {
916
+ "name": "parent_destination_id",
917
+ "type": "text",
918
+ "primaryKey": false,
919
+ "notNull": false
920
+ },
921
+ "display_name": {
922
+ "name": "display_name",
923
+ "type": "text",
924
+ "primaryKey": false,
925
+ "notNull": false
926
+ },
927
+ "visibility": {
928
+ "name": "visibility",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "default": "'unknown'"
933
+ },
934
+ "metadata_json": {
935
+ "name": "metadata_json",
936
+ "type": "jsonb",
937
+ "primaryKey": false,
938
+ "notNull": false
939
+ },
940
+ "created_at": {
941
+ "name": "created_at",
942
+ "type": "timestamp with time zone",
943
+ "primaryKey": false,
944
+ "notNull": true
945
+ },
946
+ "updated_at": {
947
+ "name": "updated_at",
948
+ "type": "timestamp with time zone",
949
+ "primaryKey": false,
950
+ "notNull": true
951
+ }
952
+ },
953
+ "indexes": {
954
+ "junior_destinations_provider_destination_uidx": {
955
+ "name": "junior_destinations_provider_destination_uidx",
956
+ "columns": [
957
+ {
958
+ "expression": "provider",
959
+ "isExpression": false,
960
+ "asc": true,
961
+ "nulls": "last"
962
+ },
963
+ {
964
+ "expression": "provider_tenant_id",
965
+ "isExpression": false,
966
+ "asc": true,
967
+ "nulls": "last"
968
+ },
969
+ {
970
+ "expression": "provider_destination_id",
971
+ "isExpression": false,
972
+ "asc": true,
973
+ "nulls": "last"
974
+ }
975
+ ],
976
+ "isUnique": true,
977
+ "concurrently": false,
978
+ "method": "btree",
979
+ "with": {}
980
+ },
981
+ "junior_destinations_provider_kind_idx": {
982
+ "name": "junior_destinations_provider_kind_idx",
983
+ "columns": [
984
+ {
985
+ "expression": "provider",
986
+ "isExpression": false,
987
+ "asc": true,
988
+ "nulls": "last"
989
+ },
990
+ {
991
+ "expression": "kind",
992
+ "isExpression": false,
993
+ "asc": true,
994
+ "nulls": "last"
995
+ }
996
+ ],
997
+ "isUnique": false,
998
+ "concurrently": false,
999
+ "method": "btree",
1000
+ "with": {}
1001
+ }
1002
+ },
1003
+ "foreignKeys": {},
1004
+ "compositePrimaryKeys": {},
1005
+ "uniqueConstraints": {},
1006
+ "policies": {},
1007
+ "checkConstraints": {},
1008
+ "isRLSEnabled": false
1009
+ },
1010
+ "public.junior_event_tasks": {
1011
+ "name": "junior_event_tasks",
1012
+ "schema": "",
1013
+ "columns": {
1014
+ "id": {
1015
+ "name": "id",
1016
+ "type": "text",
1017
+ "primaryKey": true,
1018
+ "notNull": true
1019
+ },
1020
+ "team_id": {
1021
+ "name": "team_id",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": true
1025
+ },
1026
+ "namespace": {
1027
+ "name": "namespace",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true
1031
+ },
1032
+ "identifier": {
1033
+ "name": "identifier",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": true
1037
+ },
1038
+ "created_at_ms": {
1039
+ "name": "created_at_ms",
1040
+ "type": "bigint",
1041
+ "primaryKey": false,
1042
+ "notNull": true
1043
+ },
1044
+ "task_json": {
1045
+ "name": "task_json",
1046
+ "type": "jsonb",
1047
+ "primaryKey": false,
1048
+ "notNull": true
1049
+ }
1050
+ },
1051
+ "indexes": {
1052
+ "junior_event_tasks_team_idx": {
1053
+ "name": "junior_event_tasks_team_idx",
1054
+ "columns": [
1055
+ {
1056
+ "expression": "team_id",
1057
+ "isExpression": false,
1058
+ "asc": true,
1059
+ "nulls": "last"
1060
+ },
1061
+ {
1062
+ "expression": "created_at_ms",
1063
+ "isExpression": false,
1064
+ "asc": true,
1065
+ "nulls": "last"
1066
+ },
1067
+ {
1068
+ "expression": "id",
1069
+ "isExpression": false,
1070
+ "asc": true,
1071
+ "nulls": "last"
1072
+ }
1073
+ ],
1074
+ "isUnique": false,
1075
+ "concurrently": false,
1076
+ "method": "btree",
1077
+ "with": {}
1078
+ },
1079
+ "junior_event_tasks_match_idx": {
1080
+ "name": "junior_event_tasks_match_idx",
1081
+ "columns": [
1082
+ {
1083
+ "expression": "namespace",
1084
+ "isExpression": false,
1085
+ "asc": true,
1086
+ "nulls": "last"
1087
+ },
1088
+ {
1089
+ "expression": "identifier",
1090
+ "isExpression": false,
1091
+ "asc": true,
1092
+ "nulls": "last"
1093
+ },
1094
+ {
1095
+ "expression": "created_at_ms",
1096
+ "isExpression": false,
1097
+ "asc": true,
1098
+ "nulls": "last"
1099
+ },
1100
+ {
1101
+ "expression": "id",
1102
+ "isExpression": false,
1103
+ "asc": true,
1104
+ "nulls": "last"
1105
+ }
1106
+ ],
1107
+ "isUnique": false,
1108
+ "concurrently": false,
1109
+ "method": "btree",
1110
+ "with": {}
1111
+ }
1112
+ },
1113
+ "foreignKeys": {},
1114
+ "compositePrimaryKeys": {},
1115
+ "uniqueConstraints": {},
1116
+ "policies": {},
1117
+ "checkConstraints": {},
1118
+ "isRLSEnabled": false
1119
+ },
1120
+ "public.junior_identities": {
1121
+ "name": "junior_identities",
1122
+ "schema": "",
1123
+ "columns": {
1124
+ "id": {
1125
+ "name": "id",
1126
+ "type": "text",
1127
+ "primaryKey": true,
1128
+ "notNull": true
1129
+ },
1130
+ "kind": {
1131
+ "name": "kind",
1132
+ "type": "text",
1133
+ "primaryKey": false,
1134
+ "notNull": true
1135
+ },
1136
+ "provider": {
1137
+ "name": "provider",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": true
1141
+ },
1142
+ "provider_tenant_id": {
1143
+ "name": "provider_tenant_id",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "default": "''"
1148
+ },
1149
+ "provider_subject_id": {
1150
+ "name": "provider_subject_id",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": true
1154
+ },
1155
+ "display_name": {
1156
+ "name": "display_name",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": false
1160
+ },
1161
+ "handle": {
1162
+ "name": "handle",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false
1166
+ },
1167
+ "email": {
1168
+ "name": "email",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": false
1172
+ },
1173
+ "avatar_url": {
1174
+ "name": "avatar_url",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": false
1178
+ },
1179
+ "metadata_json": {
1180
+ "name": "metadata_json",
1181
+ "type": "jsonb",
1182
+ "primaryKey": false,
1183
+ "notNull": false
1184
+ },
1185
+ "created_at": {
1186
+ "name": "created_at",
1187
+ "type": "timestamp with time zone",
1188
+ "primaryKey": false,
1189
+ "notNull": true
1190
+ },
1191
+ "updated_at": {
1192
+ "name": "updated_at",
1193
+ "type": "timestamp with time zone",
1194
+ "primaryKey": false,
1195
+ "notNull": true
1196
+ },
1197
+ "user_id": {
1198
+ "name": "user_id",
1199
+ "type": "text",
1200
+ "primaryKey": false,
1201
+ "notNull": false
1202
+ },
1203
+ "email_normalized": {
1204
+ "name": "email_normalized",
1205
+ "type": "text",
1206
+ "primaryKey": false,
1207
+ "notNull": false
1208
+ },
1209
+ "email_verified": {
1210
+ "name": "email_verified",
1211
+ "type": "boolean",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "default": false
1215
+ }
1216
+ },
1217
+ "indexes": {
1218
+ "junior_identities_provider_subject_uidx": {
1219
+ "name": "junior_identities_provider_subject_uidx",
1220
+ "columns": [
1221
+ {
1222
+ "expression": "provider",
1223
+ "isExpression": false,
1224
+ "asc": true,
1225
+ "nulls": "last"
1226
+ },
1227
+ {
1228
+ "expression": "provider_tenant_id",
1229
+ "isExpression": false,
1230
+ "asc": true,
1231
+ "nulls": "last"
1232
+ },
1233
+ {
1234
+ "expression": "provider_subject_id",
1235
+ "isExpression": false,
1236
+ "asc": true,
1237
+ "nulls": "last"
1238
+ }
1239
+ ],
1240
+ "isUnique": true,
1241
+ "concurrently": false,
1242
+ "method": "btree",
1243
+ "with": {}
1244
+ },
1245
+ "junior_identities_user_idx": {
1246
+ "name": "junior_identities_user_idx",
1247
+ "columns": [
1248
+ {
1249
+ "expression": "user_id",
1250
+ "isExpression": false,
1251
+ "asc": true,
1252
+ "nulls": "last"
1253
+ }
1254
+ ],
1255
+ "isUnique": false,
1256
+ "concurrently": false,
1257
+ "method": "btree",
1258
+ "with": {}
1259
+ },
1260
+ "junior_identities_verified_email_idx": {
1261
+ "name": "junior_identities_verified_email_idx",
1262
+ "columns": [
1263
+ {
1264
+ "expression": "email_normalized",
1265
+ "isExpression": false,
1266
+ "asc": true,
1267
+ "nulls": "last"
1268
+ }
1269
+ ],
1270
+ "isUnique": false,
1271
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1272
+ "concurrently": false,
1273
+ "method": "btree",
1274
+ "with": {}
1275
+ },
1276
+ "junior_identities_kind_provider_idx": {
1277
+ "name": "junior_identities_kind_provider_idx",
1278
+ "columns": [
1279
+ {
1280
+ "expression": "kind",
1281
+ "isExpression": false,
1282
+ "asc": true,
1283
+ "nulls": "last"
1284
+ },
1285
+ {
1286
+ "expression": "provider",
1287
+ "isExpression": false,
1288
+ "asc": true,
1289
+ "nulls": "last"
1290
+ }
1291
+ ],
1292
+ "isUnique": false,
1293
+ "concurrently": false,
1294
+ "method": "btree",
1295
+ "with": {}
1296
+ }
1297
+ },
1298
+ "foreignKeys": {
1299
+ "junior_identities_user_id_junior_users_id_fk": {
1300
+ "name": "junior_identities_user_id_junior_users_id_fk",
1301
+ "tableFrom": "junior_identities",
1302
+ "tableTo": "junior_users",
1303
+ "columnsFrom": [
1304
+ "user_id"
1305
+ ],
1306
+ "columnsTo": [
1307
+ "id"
1308
+ ],
1309
+ "onDelete": "no action",
1310
+ "onUpdate": "no action"
1311
+ }
1312
+ },
1313
+ "compositePrimaryKeys": {},
1314
+ "uniqueConstraints": {},
1315
+ "policies": {},
1316
+ "checkConstraints": {},
1317
+ "isRLSEnabled": false
1318
+ },
1319
+ "public.junior_scheduler_runs": {
1320
+ "name": "junior_scheduler_runs",
1321
+ "schema": "",
1322
+ "columns": {
1323
+ "id": {
1324
+ "name": "id",
1325
+ "type": "text",
1326
+ "primaryKey": true,
1327
+ "notNull": true
1328
+ },
1329
+ "task_id": {
1330
+ "name": "task_id",
1331
+ "type": "text",
1332
+ "primaryKey": false,
1333
+ "notNull": true
1334
+ },
1335
+ "status": {
1336
+ "name": "status",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true
1340
+ },
1341
+ "scheduled_for_ms": {
1342
+ "name": "scheduled_for_ms",
1343
+ "type": "bigint",
1344
+ "primaryKey": false,
1345
+ "notNull": true
1346
+ },
1347
+ "record": {
1348
+ "name": "record",
1349
+ "type": "jsonb",
1350
+ "primaryKey": false,
1351
+ "notNull": true
1352
+ }
1353
+ },
1354
+ "indexes": {
1355
+ "junior_scheduler_runs_task_status_idx": {
1356
+ "name": "junior_scheduler_runs_task_status_idx",
1357
+ "columns": [
1358
+ {
1359
+ "expression": "task_id",
1360
+ "isExpression": false,
1361
+ "asc": true,
1362
+ "nulls": "last"
1363
+ },
1364
+ {
1365
+ "expression": "status",
1366
+ "isExpression": false,
1367
+ "asc": true,
1368
+ "nulls": "last"
1369
+ },
1370
+ {
1371
+ "expression": "scheduled_for_ms",
1372
+ "isExpression": false,
1373
+ "asc": true,
1374
+ "nulls": "last"
1375
+ }
1376
+ ],
1377
+ "isUnique": false,
1378
+ "concurrently": false,
1379
+ "method": "btree",
1380
+ "with": {}
1381
+ },
1382
+ "junior_scheduler_runs_status_idx": {
1383
+ "name": "junior_scheduler_runs_status_idx",
1384
+ "columns": [
1385
+ {
1386
+ "expression": "status",
1387
+ "isExpression": false,
1388
+ "asc": true,
1389
+ "nulls": "last"
1390
+ },
1391
+ {
1392
+ "expression": "scheduled_for_ms",
1393
+ "isExpression": false,
1394
+ "asc": true,
1395
+ "nulls": "last"
1396
+ }
1397
+ ],
1398
+ "isUnique": false,
1399
+ "concurrently": false,
1400
+ "method": "btree",
1401
+ "with": {}
1402
+ }
1403
+ },
1404
+ "foreignKeys": {},
1405
+ "compositePrimaryKeys": {},
1406
+ "uniqueConstraints": {},
1407
+ "policies": {},
1408
+ "checkConstraints": {},
1409
+ "isRLSEnabled": false
1410
+ },
1411
+ "public.junior_scheduler_tasks": {
1412
+ "name": "junior_scheduler_tasks",
1413
+ "schema": "",
1414
+ "columns": {
1415
+ "id": {
1416
+ "name": "id",
1417
+ "type": "text",
1418
+ "primaryKey": true,
1419
+ "notNull": true
1420
+ },
1421
+ "team_id": {
1422
+ "name": "team_id",
1423
+ "type": "text",
1424
+ "primaryKey": false,
1425
+ "notNull": true
1426
+ },
1427
+ "creator_slack_user_id": {
1428
+ "name": "creator_slack_user_id",
1429
+ "type": "text",
1430
+ "primaryKey": false,
1431
+ "notNull": false
1432
+ },
1433
+ "creator_identity_id": {
1434
+ "name": "creator_identity_id",
1435
+ "type": "text",
1436
+ "primaryKey": false,
1437
+ "notNull": false
1438
+ },
1439
+ "status": {
1440
+ "name": "status",
1441
+ "type": "text",
1442
+ "primaryKey": false,
1443
+ "notNull": true
1444
+ },
1445
+ "next_run_at_ms": {
1446
+ "name": "next_run_at_ms",
1447
+ "type": "bigint",
1448
+ "primaryKey": false,
1449
+ "notNull": false
1450
+ },
1451
+ "run_now_at_ms": {
1452
+ "name": "run_now_at_ms",
1453
+ "type": "bigint",
1454
+ "primaryKey": false,
1455
+ "notNull": false
1456
+ },
1457
+ "created_at_ms": {
1458
+ "name": "created_at_ms",
1459
+ "type": "bigint",
1460
+ "primaryKey": false,
1461
+ "notNull": true
1462
+ },
1463
+ "record": {
1464
+ "name": "record",
1465
+ "type": "jsonb",
1466
+ "primaryKey": false,
1467
+ "notNull": true
1468
+ }
1469
+ },
1470
+ "indexes": {
1471
+ "junior_scheduler_tasks_creator_idx": {
1472
+ "name": "junior_scheduler_tasks_creator_idx",
1473
+ "columns": [
1474
+ {
1475
+ "expression": "team_id",
1476
+ "isExpression": false,
1477
+ "asc": true,
1478
+ "nulls": "last"
1479
+ },
1480
+ {
1481
+ "expression": "creator_slack_user_id",
1482
+ "isExpression": false,
1483
+ "asc": true,
1484
+ "nulls": "last"
1485
+ },
1486
+ {
1487
+ "expression": "created_at_ms",
1488
+ "isExpression": false,
1489
+ "asc": true,
1490
+ "nulls": "last"
1491
+ },
1492
+ {
1493
+ "expression": "id",
1494
+ "isExpression": false,
1495
+ "asc": true,
1496
+ "nulls": "last"
1497
+ }
1498
+ ],
1499
+ "isUnique": false,
1500
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
1501
+ "concurrently": false,
1502
+ "method": "btree",
1503
+ "with": {}
1504
+ },
1505
+ "junior_scheduler_tasks_creator_identity_idx": {
1506
+ "name": "junior_scheduler_tasks_creator_identity_idx",
1507
+ "columns": [
1508
+ {
1509
+ "expression": "creator_identity_id",
1510
+ "isExpression": false,
1511
+ "asc": true,
1512
+ "nulls": "last"
1513
+ },
1514
+ {
1515
+ "expression": "created_at_ms",
1516
+ "isExpression": false,
1517
+ "asc": true,
1518
+ "nulls": "last"
1519
+ },
1520
+ {
1521
+ "expression": "id",
1522
+ "isExpression": false,
1523
+ "asc": true,
1524
+ "nulls": "last"
1525
+ }
1526
+ ],
1527
+ "isUnique": false,
1528
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
1529
+ "concurrently": false,
1530
+ "method": "btree",
1531
+ "with": {}
1532
+ },
1533
+ "junior_scheduler_tasks_team_status_idx": {
1534
+ "name": "junior_scheduler_tasks_team_status_idx",
1535
+ "columns": [
1536
+ {
1537
+ "expression": "team_id",
1538
+ "isExpression": false,
1539
+ "asc": true,
1540
+ "nulls": "last"
1541
+ },
1542
+ {
1543
+ "expression": "created_at_ms",
1544
+ "isExpression": false,
1545
+ "asc": true,
1546
+ "nulls": "last"
1547
+ },
1548
+ {
1549
+ "expression": "id",
1550
+ "isExpression": false,
1551
+ "asc": true,
1552
+ "nulls": "last"
1553
+ }
1554
+ ],
1555
+ "isUnique": false,
1556
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
1557
+ "concurrently": false,
1558
+ "method": "btree",
1559
+ "with": {}
1560
+ },
1561
+ "junior_scheduler_tasks_run_now_due_idx": {
1562
+ "name": "junior_scheduler_tasks_run_now_due_idx",
1563
+ "columns": [
1564
+ {
1565
+ "expression": "run_now_at_ms",
1566
+ "isExpression": false,
1567
+ "asc": true,
1568
+ "nulls": "last"
1569
+ },
1570
+ {
1571
+ "expression": "created_at_ms",
1572
+ "isExpression": false,
1573
+ "asc": true,
1574
+ "nulls": "last"
1575
+ },
1576
+ {
1577
+ "expression": "id",
1578
+ "isExpression": false,
1579
+ "asc": true,
1580
+ "nulls": "last"
1581
+ }
1582
+ ],
1583
+ "isUnique": false,
1584
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
1585
+ "concurrently": false,
1586
+ "method": "btree",
1587
+ "with": {}
1588
+ },
1589
+ "junior_scheduler_tasks_next_run_due_idx": {
1590
+ "name": "junior_scheduler_tasks_next_run_due_idx",
1591
+ "columns": [
1592
+ {
1593
+ "expression": "next_run_at_ms",
1594
+ "isExpression": false,
1595
+ "asc": true,
1596
+ "nulls": "last"
1597
+ },
1598
+ {
1599
+ "expression": "created_at_ms",
1600
+ "isExpression": false,
1601
+ "asc": true,
1602
+ "nulls": "last"
1603
+ },
1604
+ {
1605
+ "expression": "id",
1606
+ "isExpression": false,
1607
+ "asc": true,
1608
+ "nulls": "last"
1609
+ }
1610
+ ],
1611
+ "isUnique": false,
1612
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
1613
+ "concurrently": false,
1614
+ "method": "btree",
1615
+ "with": {}
1616
+ }
1617
+ },
1618
+ "foreignKeys": {},
1619
+ "compositePrimaryKeys": {},
1620
+ "uniqueConstraints": {},
1621
+ "policies": {},
1622
+ "checkConstraints": {},
1623
+ "isRLSEnabled": false
1624
+ },
1625
+ "public.junior_stats": {
1626
+ "name": "junior_stats",
1627
+ "schema": "",
1628
+ "columns": {
1629
+ "date": {
1630
+ "name": "date",
1631
+ "type": "date",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ },
1635
+ "namespace": {
1636
+ "name": "namespace",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": true
1640
+ },
1641
+ "metric": {
1642
+ "name": "metric",
1643
+ "type": "text",
1644
+ "primaryKey": false,
1645
+ "notNull": true
1646
+ },
1647
+ "name": {
1648
+ "name": "name",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": true
1652
+ },
1653
+ "count": {
1654
+ "name": "count",
1655
+ "type": "integer",
1656
+ "primaryKey": false,
1657
+ "notNull": true,
1658
+ "default": 0
1659
+ }
1660
+ },
1661
+ "indexes": {},
1662
+ "foreignKeys": {},
1663
+ "compositePrimaryKeys": {
1664
+ "junior_stats_date_namespace_metric_name_pk": {
1665
+ "name": "junior_stats_date_namespace_metric_name_pk",
1666
+ "columns": [
1667
+ "date",
1668
+ "namespace",
1669
+ "metric",
1670
+ "name"
1671
+ ]
1672
+ }
1673
+ },
1674
+ "uniqueConstraints": {},
1675
+ "policies": {},
1676
+ "checkConstraints": {},
1677
+ "isRLSEnabled": false
1678
+ },
1679
+ "public.junior_users": {
1680
+ "name": "junior_users",
1681
+ "schema": "",
1682
+ "columns": {
1683
+ "id": {
1684
+ "name": "id",
1685
+ "type": "text",
1686
+ "primaryKey": true,
1687
+ "notNull": true
1688
+ },
1689
+ "primary_email": {
1690
+ "name": "primary_email",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true
1694
+ },
1695
+ "primary_email_normalized": {
1696
+ "name": "primary_email_normalized",
1697
+ "type": "text",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ },
1701
+ "display_name": {
1702
+ "name": "display_name",
1703
+ "type": "text",
1704
+ "primaryKey": false,
1705
+ "notNull": false
1706
+ },
1707
+ "created_at": {
1708
+ "name": "created_at",
1709
+ "type": "timestamp with time zone",
1710
+ "primaryKey": false,
1711
+ "notNull": true
1712
+ },
1713
+ "updated_at": {
1714
+ "name": "updated_at",
1715
+ "type": "timestamp with time zone",
1716
+ "primaryKey": false,
1717
+ "notNull": true
1718
+ }
1719
+ },
1720
+ "indexes": {
1721
+ "junior_users_primary_email_normalized_uidx": {
1722
+ "name": "junior_users_primary_email_normalized_uidx",
1723
+ "columns": [
1724
+ {
1725
+ "expression": "primary_email_normalized",
1726
+ "isExpression": false,
1727
+ "asc": true,
1728
+ "nulls": "last"
1729
+ }
1730
+ ],
1731
+ "isUnique": true,
1732
+ "concurrently": false,
1733
+ "method": "btree",
1734
+ "with": {}
1735
+ }
1736
+ },
1737
+ "foreignKeys": {},
1738
+ "compositePrimaryKeys": {},
1739
+ "uniqueConstraints": {},
1740
+ "policies": {},
1741
+ "checkConstraints": {},
1742
+ "isRLSEnabled": false
1743
+ }
1744
+ },
1745
+ "enums": {},
1746
+ "schemas": {},
1747
+ "sequences": {},
1748
+ "roles": {},
1749
+ "policies": {},
1750
+ "views": {},
1751
+ "_meta": {
1752
+ "columns": {},
1753
+ "schemas": {},
1754
+ "tables": {}
1755
+ }
1756
+ }