@sentry/junior 0.115.0 → 0.116.1

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 (111) hide show
  1. package/dist/{agent-hooks-4EUUXP2F.js → agent-hooks-GUAAS3XH.js} +9 -9
  2. package/dist/api/conversations/detail.d.ts +18 -0
  3. package/dist/api/conversations/event-page.d.ts +1 -1
  4. package/dist/api/conversations/events.d.ts +1 -1
  5. package/dist/api/people/profile.d.ts +2 -2
  6. package/dist/api/people/shared.d.ts +1 -1
  7. package/dist/api/personal-tokens/create.d.ts +11 -0
  8. package/dist/api/personal-tokens/list.d.ts +12 -0
  9. package/dist/api/personal-tokens/revoke.d.ts +5 -0
  10. package/dist/api/personal-tokens/routes.d.ts +4 -0
  11. package/dist/api/plugins.d.ts +0 -1
  12. package/dist/api/route.d.ts +1 -1
  13. package/dist/api/schema/conversation.d.ts +18 -0
  14. package/dist/api/schema/person.d.ts +3 -3
  15. package/dist/api/schema/personal-token.d.ts +38 -0
  16. package/dist/api/schema.d.ts +2 -0
  17. package/dist/api/schema.js +15 -3
  18. package/dist/api.d.ts +1 -0
  19. package/dist/api.js +179 -39
  20. package/dist/app.js +1035 -853
  21. package/dist/{catalog-runtime-Y32UEQLB.js → catalog-runtime-WMPC4J4U.js} +5 -5
  22. package/dist/chat/agent/request.d.ts +1 -0
  23. package/dist/chat/agent/resume.d.ts +1 -0
  24. package/dist/chat/agent/sandbox.d.ts +1 -0
  25. package/dist/chat/agent/tools.d.ts +1 -0
  26. package/dist/chat/agent-dispatch/context.d.ts +2 -0
  27. package/dist/chat/agent-dispatch/heartbeat.d.ts +11 -5
  28. package/dist/chat/agent-dispatch/signing.d.ts +14 -5
  29. package/dist/chat/agent-dispatch/store.d.ts +36 -15
  30. package/dist/chat/agent-dispatch/types.d.ts +23 -10
  31. package/dist/chat/agent-dispatch/work.d.ts +58 -0
  32. package/dist/chat/app/factory.d.ts +12 -3
  33. package/dist/chat/conversations/history.d.ts +285 -290
  34. package/dist/chat/conversations/projection.d.ts +2 -2
  35. package/dist/chat/mcp/tool-manager.d.ts +2 -1
  36. package/dist/chat/pi/conversation-events.d.ts +6 -2
  37. package/dist/chat/plugins/annotations.d.ts +8 -0
  38. package/dist/chat/plugins/registry.d.ts +0 -3
  39. package/dist/chat/plugins/types.d.ts +0 -2
  40. package/dist/chat/runtime/agent-continue-runner.d.ts +4 -0
  41. package/dist/chat/runtime/reply-executor.d.ts +6 -1
  42. package/dist/chat/runtime/slack-resume.d.ts +5 -1
  43. package/dist/chat/runtime/turn-input.d.ts +3 -0
  44. package/dist/chat/sandbox/sandbox.d.ts +2 -1
  45. package/dist/chat/sandbox/session.d.ts +2 -11
  46. package/dist/chat/sandbox/workspace.d.ts +10 -2
  47. package/dist/chat/services/turn-session-record.d.ts +14 -1
  48. package/dist/chat/slack/dispatch-turn.d.ts +25 -0
  49. package/dist/chat/state/turn-session.d.ts +11 -0
  50. package/dist/chat/tool-support/text-range-result.d.ts +3 -0
  51. package/dist/chat/tool-support/zod-tool.d.ts +1 -0
  52. package/dist/chat/tools/definition.d.ts +3 -10
  53. package/dist/chat/tools/query-conversation-events.d.ts +68 -0
  54. package/dist/chat/tools/sandbox/file-utils.d.ts +8 -1
  55. package/dist/chat/tools/sandbox/find-files.d.ts +2 -1
  56. package/dist/chat/tools/sandbox/grep.d.ts +2 -1
  57. package/dist/{chunk-6V762AB4.js → chunk-2YYPXQNQ.js} +1 -1
  58. package/dist/{chunk-MIAKQNYX.js → chunk-6ZK6FZIV.js} +1 -1
  59. package/dist/{chunk-67CVNDJ7.js → chunk-7CSVG54J.js} +1 -1
  60. package/dist/{chunk-HWCQRGLL.js → chunk-BFYVIOTS.js} +105 -37
  61. package/dist/{chunk-LYA2AB5G.js → chunk-CGXLCMWI.js} +8 -52
  62. package/dist/{chunk-SYJT7AKB.js → chunk-CY7NXM32.js} +1 -1
  63. package/dist/{chunk-2QG4MZQ7.js → chunk-DLLW5ITL.js} +2 -2
  64. package/dist/{chunk-NVUQSFWX.js → chunk-F3SWGSPG.js} +3 -15
  65. package/dist/{chunk-CWEZEPD4.js → chunk-FAEALXEH.js} +68 -2
  66. package/dist/{chunk-43RYMWJ2.js → chunk-GDAXWEIJ.js} +809 -213
  67. package/dist/{chunk-AGLQYELI.js → chunk-H35BDAUS.js} +170 -170
  68. package/dist/{chunk-YCLO7D7M.js → chunk-JPKGW6L6.js} +77 -26
  69. package/dist/{chunk-G5SX4UPR.js → chunk-KNCELO2M.js} +2 -2
  70. package/dist/{chunk-FHC4JUSF.js → chunk-N3C4XCRE.js} +1 -2
  71. package/dist/{chunk-6FKLPVF3.js → chunk-OY2PQQ4P.js} +1 -1
  72. package/dist/{chunk-6OPTF4BQ.js → chunk-PE44LDDQ.js} +0 -1
  73. package/dist/{chunk-JQFJO5WH.js → chunk-RXRQJF7Y.js} +74 -17
  74. package/dist/{chunk-CEYOL62C.js → chunk-RYFAVWP3.js} +120 -20
  75. package/dist/{chunk-G36V2YGB.js → chunk-TC4ZEM2D.js} +33 -1
  76. package/dist/{chunk-PVZHG2XZ.js → chunk-VBMMMVVQ.js} +112 -35
  77. package/dist/{chunk-SG5WAA7H.js → chunk-WKU7TY22.js} +0 -3
  78. package/dist/{chunk-TVE25LPW.js → chunk-WLT72MRP.js} +1 -1
  79. package/dist/{chunk-EW5MLKT5.js → chunk-XA3VLFPK.js} +1 -55
  80. package/dist/{chunk-RAVKCKXA.js → chunk-ZYHLNTC2.js} +20 -5
  81. package/dist/cli/chat.js +23 -23
  82. package/dist/cli/check.js +6 -6
  83. package/dist/cli/plugins.js +13 -13
  84. package/dist/cli/snapshot-warmup.js +8 -8
  85. package/dist/cli/upgrade.js +7 -7
  86. package/dist/db/schema/api-tokens.d.ts +160 -0
  87. package/dist/db/schema/conversation-annotations.d.ts +142 -0
  88. package/dist/db/schema.d.ts +305 -1
  89. package/dist/{db-KBSJHAZU.js → db-FH4R5ZQ4.js} +6 -6
  90. package/dist/handlers/agent-dispatch.d.ts +7 -3
  91. package/dist/instrumentation.js +2 -2
  92. package/dist/nitro.js +5 -5
  93. package/dist/{oauth-callback-server-EYRMJTCS.js → oauth-callback-server-C2SSJ3FQ.js} +18 -18
  94. package/dist/personal-tokens/store.d.ts +27 -0
  95. package/dist/{plugins-PZMDS7AT.js → plugins-IUJA4VBU.js} +1 -1
  96. package/dist/reporting-schema.d.ts +0 -2
  97. package/dist/{runner-RQGZ5Z2S.js → runner-NAALFIXM.js} +12 -12
  98. package/dist/{skills-JJQIE3BT.js → skills-UN2JXYYF.js} +6 -6
  99. package/dist/{validation-MZ47PZP5.js → validation-EEF4ROHR.js} +6 -6
  100. package/dist/version.js +1 -1
  101. package/migrations/0008_sticky_rage.sql +14 -0
  102. package/migrations/0009_slippery_harrier.sql +12 -0
  103. package/migrations/0010_native_conversation_history.sql +142 -0
  104. package/migrations/meta/0008_snapshot.json +1076 -0
  105. package/migrations/meta/0009_snapshot.json +1146 -0
  106. package/migrations/meta/0010_snapshot.json +1190 -0
  107. package/migrations/meta/_journal.json +22 -1
  108. package/package.json +5 -6
  109. package/dist/chat/agent-dispatch/runner.d.ts +0 -13
  110. package/dist/chat/capabilities/catalog.d.ts +0 -16
  111. package/dist/{chunk-KNFROR7R.js → chunk-5I6ORJUY.js} +1 -1
@@ -0,0 +1,1076 @@
1
+ {
2
+ "id": "000fd8df-3f20-485a-8669-ef5e66d7177c",
3
+ "prevId": "b85697dd-3399-4757-93bf-3bdad67612ea",
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_events": {
106
+ "name": "junior_conversation_events",
107
+ "schema": "",
108
+ "columns": {
109
+ "conversation_id": {
110
+ "name": "conversation_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "seq": {
116
+ "name": "seq",
117
+ "type": "integer",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "history_version": {
122
+ "name": "history_version",
123
+ "type": "integer",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "schema_version": {
128
+ "name": "schema_version",
129
+ "type": "integer",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "default": 1
133
+ },
134
+ "idempotency_key": {
135
+ "name": "idempotency_key",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": false
139
+ },
140
+ "type": {
141
+ "name": "type",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "payload": {
147
+ "name": "payload",
148
+ "type": "jsonb",
149
+ "primaryKey": false,
150
+ "notNull": true
151
+ },
152
+ "created_at": {
153
+ "name": "created_at",
154
+ "type": "timestamp with time zone",
155
+ "primaryKey": false,
156
+ "notNull": true
157
+ }
158
+ },
159
+ "indexes": {
160
+ "junior_conversation_events_history_version_idx": {
161
+ "name": "junior_conversation_events_history_version_idx",
162
+ "columns": [
163
+ {
164
+ "expression": "conversation_id",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ },
169
+ {
170
+ "expression": "history_version",
171
+ "isExpression": false,
172
+ "asc": true,
173
+ "nulls": "last"
174
+ },
175
+ {
176
+ "expression": "seq",
177
+ "isExpression": false,
178
+ "asc": true,
179
+ "nulls": "last"
180
+ }
181
+ ],
182
+ "isUnique": false,
183
+ "concurrently": false,
184
+ "method": "btree",
185
+ "with": {}
186
+ },
187
+ "junior_conversation_events_type_idx": {
188
+ "name": "junior_conversation_events_type_idx",
189
+ "columns": [
190
+ {
191
+ "expression": "conversation_id",
192
+ "isExpression": false,
193
+ "asc": true,
194
+ "nulls": "last"
195
+ },
196
+ {
197
+ "expression": "type",
198
+ "isExpression": false,
199
+ "asc": true,
200
+ "nulls": "last"
201
+ },
202
+ {
203
+ "expression": "seq",
204
+ "isExpression": false,
205
+ "asc": true,
206
+ "nulls": "last"
207
+ }
208
+ ],
209
+ "isUnique": false,
210
+ "concurrently": false,
211
+ "method": "btree",
212
+ "with": {}
213
+ },
214
+ "junior_conversation_events_message_search_idx": {
215
+ "name": "junior_conversation_events_message_search_idx",
216
+ "columns": [
217
+ {
218
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
219
+ "asc": true,
220
+ "isExpression": true,
221
+ "nulls": "last"
222
+ }
223
+ ],
224
+ "isUnique": false,
225
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
226
+ "concurrently": false,
227
+ "method": "gin",
228
+ "with": {}
229
+ },
230
+ "junior_conversation_events_idempotency_idx": {
231
+ "name": "junior_conversation_events_idempotency_idx",
232
+ "columns": [
233
+ {
234
+ "expression": "conversation_id",
235
+ "isExpression": false,
236
+ "asc": true,
237
+ "nulls": "last"
238
+ },
239
+ {
240
+ "expression": "idempotency_key",
241
+ "isExpression": false,
242
+ "asc": true,
243
+ "nulls": "last"
244
+ }
245
+ ],
246
+ "isUnique": true,
247
+ "concurrently": false,
248
+ "method": "btree",
249
+ "with": {}
250
+ }
251
+ },
252
+ "foreignKeys": {
253
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
254
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
255
+ "tableFrom": "junior_conversation_events",
256
+ "tableTo": "junior_conversations",
257
+ "columnsFrom": ["conversation_id"],
258
+ "columnsTo": ["conversation_id"],
259
+ "onDelete": "no action",
260
+ "onUpdate": "no action"
261
+ }
262
+ },
263
+ "compositePrimaryKeys": {
264
+ "junior_conversation_events_conversation_id_seq_pk": {
265
+ "name": "junior_conversation_events_conversation_id_seq_pk",
266
+ "columns": ["conversation_id", "seq"]
267
+ }
268
+ },
269
+ "uniqueConstraints": {},
270
+ "policies": {},
271
+ "checkConstraints": {},
272
+ "isRLSEnabled": false
273
+ },
274
+ "public.junior_conversations": {
275
+ "name": "junior_conversations",
276
+ "schema": "",
277
+ "columns": {
278
+ "conversation_id": {
279
+ "name": "conversation_id",
280
+ "type": "text",
281
+ "primaryKey": true,
282
+ "notNull": true
283
+ },
284
+ "schema_version": {
285
+ "name": "schema_version",
286
+ "type": "integer",
287
+ "primaryKey": false,
288
+ "notNull": true,
289
+ "default": 1
290
+ },
291
+ "source": {
292
+ "name": "source",
293
+ "type": "text",
294
+ "primaryKey": false,
295
+ "notNull": false
296
+ },
297
+ "origin_type": {
298
+ "name": "origin_type",
299
+ "type": "text",
300
+ "primaryKey": false,
301
+ "notNull": false
302
+ },
303
+ "origin_id": {
304
+ "name": "origin_id",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": false
308
+ },
309
+ "origin_run_id": {
310
+ "name": "origin_run_id",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": false
314
+ },
315
+ "destination_id": {
316
+ "name": "destination_id",
317
+ "type": "text",
318
+ "primaryKey": false,
319
+ "notNull": false
320
+ },
321
+ "destination_json": {
322
+ "name": "destination_json",
323
+ "type": "jsonb",
324
+ "primaryKey": false,
325
+ "notNull": false
326
+ },
327
+ "actor_identity_id": {
328
+ "name": "actor_identity_id",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": false
332
+ },
333
+ "creator_identity_id": {
334
+ "name": "creator_identity_id",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": false
338
+ },
339
+ "credential_subject_identity_id": {
340
+ "name": "credential_subject_identity_id",
341
+ "type": "text",
342
+ "primaryKey": false,
343
+ "notNull": false
344
+ },
345
+ "actor_json": {
346
+ "name": "actor_json",
347
+ "type": "jsonb",
348
+ "primaryKey": false,
349
+ "notNull": false
350
+ },
351
+ "channel_name": {
352
+ "name": "channel_name",
353
+ "type": "text",
354
+ "primaryKey": false,
355
+ "notNull": false
356
+ },
357
+ "title": {
358
+ "name": "title",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": false
362
+ },
363
+ "created_at": {
364
+ "name": "created_at",
365
+ "type": "timestamp with time zone",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "last_activity_at": {
370
+ "name": "last_activity_at",
371
+ "type": "timestamp with time zone",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "updated_at": {
376
+ "name": "updated_at",
377
+ "type": "timestamp with time zone",
378
+ "primaryKey": false,
379
+ "notNull": true
380
+ },
381
+ "execution_updated_at": {
382
+ "name": "execution_updated_at",
383
+ "type": "timestamp with time zone",
384
+ "primaryKey": false,
385
+ "notNull": false
386
+ },
387
+ "execution_status": {
388
+ "name": "execution_status",
389
+ "type": "text",
390
+ "primaryKey": false,
391
+ "notNull": true
392
+ },
393
+ "run_id": {
394
+ "name": "run_id",
395
+ "type": "text",
396
+ "primaryKey": false,
397
+ "notNull": false
398
+ },
399
+ "last_checkpoint_at": {
400
+ "name": "last_checkpoint_at",
401
+ "type": "timestamp with time zone",
402
+ "primaryKey": false,
403
+ "notNull": false
404
+ },
405
+ "last_enqueued_at": {
406
+ "name": "last_enqueued_at",
407
+ "type": "timestamp with time zone",
408
+ "primaryKey": false,
409
+ "notNull": false
410
+ },
411
+ "parent_conversation_id": {
412
+ "name": "parent_conversation_id",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": false
416
+ },
417
+ "root_conversation_id": {
418
+ "name": "root_conversation_id",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": false
422
+ },
423
+ "transcript_purged_at": {
424
+ "name": "transcript_purged_at",
425
+ "type": "timestamp with time zone",
426
+ "primaryKey": false,
427
+ "notNull": false
428
+ },
429
+ "duration_ms": {
430
+ "name": "duration_ms",
431
+ "type": "integer",
432
+ "primaryKey": false,
433
+ "notNull": true,
434
+ "default": 0
435
+ },
436
+ "usage_json": {
437
+ "name": "usage_json",
438
+ "type": "jsonb",
439
+ "primaryKey": false,
440
+ "notNull": false
441
+ },
442
+ "execution_duration_ms": {
443
+ "name": "execution_duration_ms",
444
+ "type": "integer",
445
+ "primaryKey": false,
446
+ "notNull": true,
447
+ "default": 0
448
+ },
449
+ "execution_usage_json": {
450
+ "name": "execution_usage_json",
451
+ "type": "jsonb",
452
+ "primaryKey": false,
453
+ "notNull": false
454
+ },
455
+ "metric_run_id": {
456
+ "name": "metric_run_id",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": false
460
+ },
461
+ "archived_at": {
462
+ "name": "archived_at",
463
+ "type": "timestamp with time zone",
464
+ "primaryKey": false,
465
+ "notNull": false
466
+ }
467
+ },
468
+ "indexes": {
469
+ "junior_conversations_last_activity_idx": {
470
+ "name": "junior_conversations_last_activity_idx",
471
+ "columns": [
472
+ {
473
+ "expression": "last_activity_at",
474
+ "isExpression": false,
475
+ "asc": false,
476
+ "nulls": "last"
477
+ },
478
+ {
479
+ "expression": "conversation_id",
480
+ "isExpression": false,
481
+ "asc": true,
482
+ "nulls": "last"
483
+ }
484
+ ],
485
+ "isUnique": false,
486
+ "concurrently": false,
487
+ "method": "btree",
488
+ "with": {}
489
+ },
490
+ "junior_conversations_active_idx": {
491
+ "name": "junior_conversations_active_idx",
492
+ "columns": [
493
+ {
494
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
495
+ "asc": true,
496
+ "isExpression": true,
497
+ "nulls": "last"
498
+ },
499
+ {
500
+ "expression": "conversation_id",
501
+ "isExpression": false,
502
+ "asc": true,
503
+ "nulls": "last"
504
+ }
505
+ ],
506
+ "isUnique": false,
507
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
508
+ "concurrently": false,
509
+ "method": "btree",
510
+ "with": {}
511
+ },
512
+ "junior_conversations_destination_activity_idx": {
513
+ "name": "junior_conversations_destination_activity_idx",
514
+ "columns": [
515
+ {
516
+ "expression": "destination_id",
517
+ "isExpression": false,
518
+ "asc": true,
519
+ "nulls": "last"
520
+ },
521
+ {
522
+ "expression": "last_activity_at",
523
+ "isExpression": false,
524
+ "asc": false,
525
+ "nulls": "last"
526
+ }
527
+ ],
528
+ "isUnique": false,
529
+ "concurrently": false,
530
+ "method": "btree",
531
+ "with": {}
532
+ },
533
+ "junior_conversations_actor_activity_idx": {
534
+ "name": "junior_conversations_actor_activity_idx",
535
+ "columns": [
536
+ {
537
+ "expression": "actor_identity_id",
538
+ "isExpression": false,
539
+ "asc": true,
540
+ "nulls": "last"
541
+ },
542
+ {
543
+ "expression": "last_activity_at",
544
+ "isExpression": false,
545
+ "asc": false,
546
+ "nulls": "last"
547
+ }
548
+ ],
549
+ "isUnique": false,
550
+ "concurrently": false,
551
+ "method": "btree",
552
+ "with": {}
553
+ },
554
+ "junior_conversations_origin_idx": {
555
+ "name": "junior_conversations_origin_idx",
556
+ "columns": [
557
+ {
558
+ "expression": "origin_type",
559
+ "isExpression": false,
560
+ "asc": true,
561
+ "nulls": "last"
562
+ },
563
+ {
564
+ "expression": "origin_id",
565
+ "isExpression": false,
566
+ "asc": true,
567
+ "nulls": "last"
568
+ },
569
+ {
570
+ "expression": "last_activity_at",
571
+ "isExpression": false,
572
+ "asc": false,
573
+ "nulls": "last"
574
+ }
575
+ ],
576
+ "isUnique": false,
577
+ "concurrently": false,
578
+ "method": "btree",
579
+ "with": {}
580
+ },
581
+ "junior_conversations_parent_idx": {
582
+ "name": "junior_conversations_parent_idx",
583
+ "columns": [
584
+ {
585
+ "expression": "parent_conversation_id",
586
+ "isExpression": false,
587
+ "asc": true,
588
+ "nulls": "last"
589
+ }
590
+ ],
591
+ "isUnique": false,
592
+ "concurrently": false,
593
+ "method": "btree",
594
+ "with": {}
595
+ },
596
+ "junior_conversations_root_idx": {
597
+ "name": "junior_conversations_root_idx",
598
+ "columns": [
599
+ {
600
+ "expression": "root_conversation_id",
601
+ "isExpression": false,
602
+ "asc": true,
603
+ "nulls": "last"
604
+ }
605
+ ],
606
+ "isUnique": false,
607
+ "concurrently": false,
608
+ "method": "btree",
609
+ "with": {}
610
+ }
611
+ },
612
+ "foreignKeys": {
613
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
614
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
615
+ "tableFrom": "junior_conversations",
616
+ "tableTo": "junior_destinations",
617
+ "columnsFrom": ["destination_id"],
618
+ "columnsTo": ["id"],
619
+ "onDelete": "no action",
620
+ "onUpdate": "no action"
621
+ },
622
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
623
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
624
+ "tableFrom": "junior_conversations",
625
+ "tableTo": "junior_identities",
626
+ "columnsFrom": ["actor_identity_id"],
627
+ "columnsTo": ["id"],
628
+ "onDelete": "no action",
629
+ "onUpdate": "no action"
630
+ },
631
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
632
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
633
+ "tableFrom": "junior_conversations",
634
+ "tableTo": "junior_identities",
635
+ "columnsFrom": ["creator_identity_id"],
636
+ "columnsTo": ["id"],
637
+ "onDelete": "no action",
638
+ "onUpdate": "no action"
639
+ },
640
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
641
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
642
+ "tableFrom": "junior_conversations",
643
+ "tableTo": "junior_identities",
644
+ "columnsFrom": ["credential_subject_identity_id"],
645
+ "columnsTo": ["id"],
646
+ "onDelete": "no action",
647
+ "onUpdate": "no action"
648
+ },
649
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
650
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
651
+ "tableFrom": "junior_conversations",
652
+ "tableTo": "junior_conversations",
653
+ "columnsFrom": ["parent_conversation_id"],
654
+ "columnsTo": ["conversation_id"],
655
+ "onDelete": "no action",
656
+ "onUpdate": "no action"
657
+ },
658
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
659
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
660
+ "tableFrom": "junior_conversations",
661
+ "tableTo": "junior_conversations",
662
+ "columnsFrom": ["root_conversation_id"],
663
+ "columnsTo": ["conversation_id"],
664
+ "onDelete": "no action",
665
+ "onUpdate": "no action"
666
+ }
667
+ },
668
+ "compositePrimaryKeys": {},
669
+ "uniqueConstraints": {},
670
+ "policies": {},
671
+ "checkConstraints": {},
672
+ "isRLSEnabled": false
673
+ },
674
+ "public.junior_destinations": {
675
+ "name": "junior_destinations",
676
+ "schema": "",
677
+ "columns": {
678
+ "id": {
679
+ "name": "id",
680
+ "type": "text",
681
+ "primaryKey": true,
682
+ "notNull": true
683
+ },
684
+ "provider": {
685
+ "name": "provider",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": true
689
+ },
690
+ "provider_tenant_id": {
691
+ "name": "provider_tenant_id",
692
+ "type": "text",
693
+ "primaryKey": false,
694
+ "notNull": true,
695
+ "default": "''"
696
+ },
697
+ "provider_destination_id": {
698
+ "name": "provider_destination_id",
699
+ "type": "text",
700
+ "primaryKey": false,
701
+ "notNull": true
702
+ },
703
+ "kind": {
704
+ "name": "kind",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "parent_destination_id": {
710
+ "name": "parent_destination_id",
711
+ "type": "text",
712
+ "primaryKey": false,
713
+ "notNull": false
714
+ },
715
+ "display_name": {
716
+ "name": "display_name",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": false
720
+ },
721
+ "visibility": {
722
+ "name": "visibility",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "default": "'unknown'"
727
+ },
728
+ "metadata_json": {
729
+ "name": "metadata_json",
730
+ "type": "jsonb",
731
+ "primaryKey": false,
732
+ "notNull": false
733
+ },
734
+ "created_at": {
735
+ "name": "created_at",
736
+ "type": "timestamp with time zone",
737
+ "primaryKey": false,
738
+ "notNull": true
739
+ },
740
+ "updated_at": {
741
+ "name": "updated_at",
742
+ "type": "timestamp with time zone",
743
+ "primaryKey": false,
744
+ "notNull": true
745
+ }
746
+ },
747
+ "indexes": {
748
+ "junior_destinations_provider_destination_uidx": {
749
+ "name": "junior_destinations_provider_destination_uidx",
750
+ "columns": [
751
+ {
752
+ "expression": "provider",
753
+ "isExpression": false,
754
+ "asc": true,
755
+ "nulls": "last"
756
+ },
757
+ {
758
+ "expression": "provider_tenant_id",
759
+ "isExpression": false,
760
+ "asc": true,
761
+ "nulls": "last"
762
+ },
763
+ {
764
+ "expression": "provider_destination_id",
765
+ "isExpression": false,
766
+ "asc": true,
767
+ "nulls": "last"
768
+ }
769
+ ],
770
+ "isUnique": true,
771
+ "concurrently": false,
772
+ "method": "btree",
773
+ "with": {}
774
+ },
775
+ "junior_destinations_provider_kind_idx": {
776
+ "name": "junior_destinations_provider_kind_idx",
777
+ "columns": [
778
+ {
779
+ "expression": "provider",
780
+ "isExpression": false,
781
+ "asc": true,
782
+ "nulls": "last"
783
+ },
784
+ {
785
+ "expression": "kind",
786
+ "isExpression": false,
787
+ "asc": true,
788
+ "nulls": "last"
789
+ }
790
+ ],
791
+ "isUnique": false,
792
+ "concurrently": false,
793
+ "method": "btree",
794
+ "with": {}
795
+ }
796
+ },
797
+ "foreignKeys": {},
798
+ "compositePrimaryKeys": {},
799
+ "uniqueConstraints": {},
800
+ "policies": {},
801
+ "checkConstraints": {},
802
+ "isRLSEnabled": false
803
+ },
804
+ "public.junior_identities": {
805
+ "name": "junior_identities",
806
+ "schema": "",
807
+ "columns": {
808
+ "id": {
809
+ "name": "id",
810
+ "type": "text",
811
+ "primaryKey": true,
812
+ "notNull": true
813
+ },
814
+ "kind": {
815
+ "name": "kind",
816
+ "type": "text",
817
+ "primaryKey": false,
818
+ "notNull": true
819
+ },
820
+ "provider": {
821
+ "name": "provider",
822
+ "type": "text",
823
+ "primaryKey": false,
824
+ "notNull": true
825
+ },
826
+ "provider_tenant_id": {
827
+ "name": "provider_tenant_id",
828
+ "type": "text",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "default": "''"
832
+ },
833
+ "provider_subject_id": {
834
+ "name": "provider_subject_id",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": true
838
+ },
839
+ "display_name": {
840
+ "name": "display_name",
841
+ "type": "text",
842
+ "primaryKey": false,
843
+ "notNull": false
844
+ },
845
+ "handle": {
846
+ "name": "handle",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": false
850
+ },
851
+ "email": {
852
+ "name": "email",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": false
856
+ },
857
+ "avatar_url": {
858
+ "name": "avatar_url",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": false
862
+ },
863
+ "metadata_json": {
864
+ "name": "metadata_json",
865
+ "type": "jsonb",
866
+ "primaryKey": false,
867
+ "notNull": false
868
+ },
869
+ "created_at": {
870
+ "name": "created_at",
871
+ "type": "timestamp with time zone",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "updated_at": {
876
+ "name": "updated_at",
877
+ "type": "timestamp with time zone",
878
+ "primaryKey": false,
879
+ "notNull": true
880
+ },
881
+ "user_id": {
882
+ "name": "user_id",
883
+ "type": "text",
884
+ "primaryKey": false,
885
+ "notNull": false
886
+ },
887
+ "email_normalized": {
888
+ "name": "email_normalized",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ },
893
+ "email_verified": {
894
+ "name": "email_verified",
895
+ "type": "boolean",
896
+ "primaryKey": false,
897
+ "notNull": true,
898
+ "default": false
899
+ }
900
+ },
901
+ "indexes": {
902
+ "junior_identities_provider_subject_uidx": {
903
+ "name": "junior_identities_provider_subject_uidx",
904
+ "columns": [
905
+ {
906
+ "expression": "provider",
907
+ "isExpression": false,
908
+ "asc": true,
909
+ "nulls": "last"
910
+ },
911
+ {
912
+ "expression": "provider_tenant_id",
913
+ "isExpression": false,
914
+ "asc": true,
915
+ "nulls": "last"
916
+ },
917
+ {
918
+ "expression": "provider_subject_id",
919
+ "isExpression": false,
920
+ "asc": true,
921
+ "nulls": "last"
922
+ }
923
+ ],
924
+ "isUnique": true,
925
+ "concurrently": false,
926
+ "method": "btree",
927
+ "with": {}
928
+ },
929
+ "junior_identities_user_idx": {
930
+ "name": "junior_identities_user_idx",
931
+ "columns": [
932
+ {
933
+ "expression": "user_id",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ }
938
+ ],
939
+ "isUnique": false,
940
+ "concurrently": false,
941
+ "method": "btree",
942
+ "with": {}
943
+ },
944
+ "junior_identities_verified_email_idx": {
945
+ "name": "junior_identities_verified_email_idx",
946
+ "columns": [
947
+ {
948
+ "expression": "email_normalized",
949
+ "isExpression": false,
950
+ "asc": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": false,
955
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
956
+ "concurrently": false,
957
+ "method": "btree",
958
+ "with": {}
959
+ },
960
+ "junior_identities_kind_provider_idx": {
961
+ "name": "junior_identities_kind_provider_idx",
962
+ "columns": [
963
+ {
964
+ "expression": "kind",
965
+ "isExpression": false,
966
+ "asc": true,
967
+ "nulls": "last"
968
+ },
969
+ {
970
+ "expression": "provider",
971
+ "isExpression": false,
972
+ "asc": true,
973
+ "nulls": "last"
974
+ }
975
+ ],
976
+ "isUnique": false,
977
+ "concurrently": false,
978
+ "method": "btree",
979
+ "with": {}
980
+ }
981
+ },
982
+ "foreignKeys": {
983
+ "junior_identities_user_id_junior_users_id_fk": {
984
+ "name": "junior_identities_user_id_junior_users_id_fk",
985
+ "tableFrom": "junior_identities",
986
+ "tableTo": "junior_users",
987
+ "columnsFrom": ["user_id"],
988
+ "columnsTo": ["id"],
989
+ "onDelete": "no action",
990
+ "onUpdate": "no action"
991
+ }
992
+ },
993
+ "compositePrimaryKeys": {},
994
+ "uniqueConstraints": {},
995
+ "policies": {},
996
+ "checkConstraints": {},
997
+ "isRLSEnabled": false
998
+ },
999
+ "public.junior_users": {
1000
+ "name": "junior_users",
1001
+ "schema": "",
1002
+ "columns": {
1003
+ "id": {
1004
+ "name": "id",
1005
+ "type": "text",
1006
+ "primaryKey": true,
1007
+ "notNull": true
1008
+ },
1009
+ "primary_email": {
1010
+ "name": "primary_email",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true
1014
+ },
1015
+ "primary_email_normalized": {
1016
+ "name": "primary_email_normalized",
1017
+ "type": "text",
1018
+ "primaryKey": false,
1019
+ "notNull": true
1020
+ },
1021
+ "display_name": {
1022
+ "name": "display_name",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": false
1026
+ },
1027
+ "created_at": {
1028
+ "name": "created_at",
1029
+ "type": "timestamp with time zone",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "updated_at": {
1034
+ "name": "updated_at",
1035
+ "type": "timestamp with time zone",
1036
+ "primaryKey": false,
1037
+ "notNull": true
1038
+ }
1039
+ },
1040
+ "indexes": {
1041
+ "junior_users_primary_email_normalized_uidx": {
1042
+ "name": "junior_users_primary_email_normalized_uidx",
1043
+ "columns": [
1044
+ {
1045
+ "expression": "primary_email_normalized",
1046
+ "isExpression": false,
1047
+ "asc": true,
1048
+ "nulls": "last"
1049
+ }
1050
+ ],
1051
+ "isUnique": true,
1052
+ "concurrently": false,
1053
+ "method": "btree",
1054
+ "with": {}
1055
+ }
1056
+ },
1057
+ "foreignKeys": {},
1058
+ "compositePrimaryKeys": {},
1059
+ "uniqueConstraints": {},
1060
+ "policies": {},
1061
+ "checkConstraints": {},
1062
+ "isRLSEnabled": false
1063
+ }
1064
+ },
1065
+ "enums": {},
1066
+ "schemas": {},
1067
+ "sequences": {},
1068
+ "roles": {},
1069
+ "policies": {},
1070
+ "views": {},
1071
+ "_meta": {
1072
+ "columns": {},
1073
+ "schemas": {},
1074
+ "tables": {}
1075
+ }
1076
+ }