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