@sentry/junior 0.96.0 → 0.97.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 (135) hide show
  1. package/dist/{agent-hooks-5URSMY3O.js → agent-hooks-XSUIVRQS.js} +8 -6
  2. package/dist/{reporting → api}/conversations/activity.d.ts +1 -1
  3. package/dist/api/conversations/detail-projection.d.ts +10 -0
  4. package/dist/api/conversations/detail.d.ts +3 -0
  5. package/dist/api/conversations/detail.query.d.ts +3 -0
  6. package/dist/api/conversations/list.d.ts +3 -0
  7. package/dist/api/conversations/list.query.d.ts +94 -0
  8. package/dist/api/conversations/projection.d.ts +14 -0
  9. package/dist/api/conversations/schema.d.ts +683 -0
  10. package/dist/{reporting → api}/conversations/shared.d.ts +1 -5
  11. package/dist/api/conversations/stats.d.ts +3 -0
  12. package/dist/api/conversations/stats.query.d.ts +3 -0
  13. package/dist/api/conversations/subagent.d.ts +3 -0
  14. package/dist/{reporting → api}/conversations/transcript.d.ts +4 -4
  15. package/dist/api/people/list.d.ts +1 -2
  16. package/dist/api/people/list.query.d.ts +3 -4
  17. package/dist/api/people/profile.d.ts +1 -2
  18. package/dist/api/people/profile.query.d.ts +3 -4
  19. package/dist/api/people/schema.d.ts +193 -0
  20. package/dist/api/people/shared.d.ts +31 -9
  21. package/dist/api/schema.d.ts +20 -0
  22. package/dist/api/schema.js +50 -0
  23. package/dist/api-reference.d.ts +4 -3
  24. package/dist/api.d.ts +3 -0
  25. package/dist/api.js +156 -0
  26. package/dist/app.d.ts +1 -4
  27. package/dist/app.js +101 -367
  28. package/dist/build/virtual-config.d.ts +2 -2
  29. package/dist/{catalog-runtime-MSMAYYIK.js → catalog-runtime-PFHVMHDR.js} +3 -2
  30. package/dist/chat/agent/resume.d.ts +3 -1
  31. package/dist/chat/agent/tools.d.ts +2 -1
  32. package/dist/chat/config.d.ts +1 -8
  33. package/dist/chat/conversations/history.d.ts +241 -27
  34. package/dist/chat/conversations/legacy-advisor-session.d.ts +7 -0
  35. package/dist/chat/conversations/legacy-import.d.ts +2 -2
  36. package/dist/chat/conversations/projection.d.ts +19 -3
  37. package/dist/chat/conversations/sql/legacy-history-import.d.ts +1 -1
  38. package/dist/chat/conversations/sql/store.d.ts +15 -9
  39. package/dist/chat/conversations/store.d.ts +9 -4
  40. package/dist/chat/model-profile.d.ts +14 -0
  41. package/dist/chat/pi/transcript.d.ts +5 -3
  42. package/dist/chat/resource-events/store.d.ts +2 -2
  43. package/dist/chat/services/context-compaction.d.ts +15 -0
  44. package/dist/chat/services/turn-result.d.ts +1 -0
  45. package/dist/chat/services/turn-session-record.d.ts +6 -6
  46. package/dist/chat/state/turn-session.d.ts +16 -5
  47. package/dist/chat/task-execution/store.d.ts +2 -2
  48. package/dist/chat/tools/handoff/tool.d.ts +45 -0
  49. package/dist/chat/tools/types.d.ts +7 -2
  50. package/dist/chat/usage.d.ts +25 -25
  51. package/dist/{chunk-RITD7E5L.js → chunk-35BNLDOJ.js} +338 -577
  52. package/dist/{chunk-PMNN6ST4.js → chunk-3ECW2K2O.js} +7 -2
  53. package/dist/{chunk-5C6XTTFI.js → chunk-3F4OPKGF.js} +89 -55
  54. package/dist/chunk-3V7OFJZC.js +264 -0
  55. package/dist/chunk-4ZNGQH7C.js +25 -0
  56. package/dist/{chunk-S5KZ5LPG.js → chunk-5HLDPVYS.js} +14 -447
  57. package/dist/{chunk-DZENG5ML.js → chunk-6U26PYI5.js} +24 -14
  58. package/dist/chunk-AUUCAFDE.js +546 -0
  59. package/dist/{chunk-6APU57E6.js → chunk-B3IT5END.js} +41 -260
  60. package/dist/chunk-CEA3A3UA.js +86 -0
  61. package/dist/{chunk-YDT7SNCN.js → chunk-D5KZYS4T.js} +1 -1
  62. package/dist/{chunk-YDVEH3SB.js → chunk-EEZCY5WX.js} +78 -28
  63. package/dist/{chunk-2NAZZPPS.js → chunk-EOWXRY5E.js} +1 -1
  64. package/dist/{chunk-GQ3GK22G.js → chunk-FBHZJFHI.js} +2 -2
  65. package/dist/{chunk-CZEX6KIQ.js → chunk-G3E7SCME.js} +0 -23
  66. package/dist/chunk-GUAP3H7O.js +319 -0
  67. package/dist/{chunk-BYZWPRJA.js → chunk-H66UCBPW.js} +6 -4
  68. package/dist/{chunk-L7CDEIVJ.js → chunk-LMJPRYHP.js} +4 -2
  69. package/dist/chunk-LUAE4MGW.js +199 -0
  70. package/dist/{chunk-GY34VGP5.js → chunk-LVA4I4H7.js} +3 -1
  71. package/dist/chunk-LVUKF5CE.js +63 -0
  72. package/dist/{chunk-AAZXTVJT.js → chunk-NG2AV7IB.js} +2 -72
  73. package/dist/chunk-ON6YKIQ7.js +260 -0
  74. package/dist/chunk-PDO5BLNM.js +22 -0
  75. package/dist/chunk-QNVHH5PU.js +20 -0
  76. package/dist/{chunk-P3YFQLEN.js → chunk-T533JLM3.js} +8 -10
  77. package/dist/chunk-UAMKJPDF.js +11 -0
  78. package/dist/chunk-VFH4ZKZT.js +66 -0
  79. package/dist/{chunk-UKHVMPX5.js → chunk-WGXMTFNU.js} +15 -17
  80. package/dist/{chunk-MNTINMWR.js → chunk-WJOSZOON.js} +184 -300
  81. package/dist/chunk-WTYEKPXU.js +451 -0
  82. package/dist/{chunk-IYM2SIVG.js → chunk-XIRPQQVE.js} +605 -363
  83. package/dist/cli/chat.js +24 -21
  84. package/dist/cli/check.js +4 -3
  85. package/dist/cli/init.js +12 -0
  86. package/dist/cli/plugins.js +12 -9
  87. package/dist/cli/snapshot-warmup.js +8 -6
  88. package/dist/cli/upgrade.js +265 -137
  89. package/dist/db/db.d.ts +4 -0
  90. package/dist/db/schema/conversations.d.ts +128 -0
  91. package/dist/db/schema.d.ts +129 -60
  92. package/dist/{db-2D6RMG67.js → db-BWXYIKFQ.js} +3 -3
  93. package/dist/detail-GA6NXWQJ.js +43 -0
  94. package/dist/discovery-RMHYSRL7.js +43 -0
  95. package/dist/handlers/health.d.ts +3 -0
  96. package/dist/instrumentation.js +1 -1
  97. package/dist/{legacy-import-VZ2MEGP7.js → legacy-import-3NQJVGQL.js} +4 -4
  98. package/dist/{api/people/list.js → list-A3WFRIYX.js} +26 -16
  99. package/dist/list-UXJI5Q5X.js +27 -0
  100. package/dist/nitro.d.ts +1 -1
  101. package/dist/nitro.js +2 -1
  102. package/dist/plugin-conversations-DDNGC35A.js +36 -0
  103. package/dist/{api/people/profile.js → profile-4RYDXWTF.js} +33 -18
  104. package/dist/reporting/plugin-conversations.d.ts +3 -0
  105. package/dist/reporting-schema.d.ts +140 -0
  106. package/dist/reporting.d.ts +12 -81
  107. package/dist/{runner-JZBRQP4F.js → runner-JALSYH2P.js} +17 -12
  108. package/dist/skills-MAZXZ2KE.js +26 -0
  109. package/dist/stats-XKXH3PTY.js +217 -0
  110. package/dist/subagent-TZ55XY37.js +48 -0
  111. package/dist/usage-schema.d.ts +25 -0
  112. package/dist/{validation-6XOOQGME.js → validation-FMEAEKCY.js} +4 -3
  113. package/migrations/0000_initial.sql +115 -0
  114. package/migrations/0001_conversation_metrics.sql +4 -0
  115. package/migrations/README.md +12 -30
  116. package/migrations/meta/0000_snapshot.json +1 -33
  117. package/migrations/meta/0001_snapshot.json +972 -0
  118. package/migrations/meta/_journal.json +9 -2
  119. package/package.json +13 -17
  120. package/dist/api/people/types.d.ts +0 -85
  121. package/dist/chat/advisor-request.d.ts +0 -4
  122. package/dist/chat/conversations/sql/migrations.d.ts +0 -22
  123. package/dist/chat/tools/advisor/session-store.d.ts +0 -9
  124. package/dist/chat/tools/advisor/tool.d.ts +0 -72
  125. package/dist/chunk-RAIB6WSG.js +0 -142
  126. package/dist/chunk-WM6KHPBQ.js +0 -48
  127. package/dist/db/schema/migrations.d.ts +0 -58
  128. package/dist/reporting/conversations/context.d.ts +0 -8
  129. package/dist/reporting/conversations/details.d.ts +0 -6
  130. package/dist/reporting/conversations/index.d.ts +0 -4
  131. package/dist/reporting/conversations/statistics.d.ts +0 -4
  132. package/dist/reporting/conversations/summaries.d.ts +0 -20
  133. package/dist/reporting/conversations/types.d.ts +0 -191
  134. package/dist/reporting/conversations.d.ts +0 -1
  135. package/dist/reporting.js +0 -1155
@@ -0,0 +1,972 @@
1
+ {
2
+ "id": "787c677c-20a2-48b4-8222-8bbb6aa5f45c",
3
+ "prevId": "dda04b3e-f251-4bec-80d0-9b5f57b72dd9",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_agent_steps": {
8
+ "name": "junior_agent_steps",
9
+ "schema": "",
10
+ "columns": {
11
+ "conversation_id": {
12
+ "name": "conversation_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "seq": {
18
+ "name": "seq",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "context_epoch": {
24
+ "name": "context_epoch",
25
+ "type": "integer",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "type": {
30
+ "name": "type",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "role": {
36
+ "name": "role",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "payload": {
42
+ "name": "payload",
43
+ "type": "jsonb",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "created_at": {
48
+ "name": "created_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ }
53
+ },
54
+ "indexes": {
55
+ "junior_agent_steps_epoch_idx": {
56
+ "name": "junior_agent_steps_epoch_idx",
57
+ "columns": [
58
+ {
59
+ "expression": "conversation_id",
60
+ "isExpression": false,
61
+ "asc": true,
62
+ "nulls": "last"
63
+ },
64
+ {
65
+ "expression": "context_epoch",
66
+ "isExpression": false,
67
+ "asc": true,
68
+ "nulls": "last"
69
+ },
70
+ {
71
+ "expression": "seq",
72
+ "isExpression": false,
73
+ "asc": true,
74
+ "nulls": "last"
75
+ }
76
+ ],
77
+ "isUnique": false,
78
+ "concurrently": false,
79
+ "method": "btree",
80
+ "with": {}
81
+ }
82
+ },
83
+ "foreignKeys": {
84
+ "junior_agent_steps_conversation_id_junior_conversations_conversation_id_fk": {
85
+ "name": "junior_agent_steps_conversation_id_junior_conversations_conversation_id_fk",
86
+ "tableFrom": "junior_agent_steps",
87
+ "tableTo": "junior_conversations",
88
+ "columnsFrom": ["conversation_id"],
89
+ "columnsTo": ["conversation_id"],
90
+ "onDelete": "no action",
91
+ "onUpdate": "no action"
92
+ }
93
+ },
94
+ "compositePrimaryKeys": {
95
+ "junior_agent_steps_conversation_id_seq_pk": {
96
+ "name": "junior_agent_steps_conversation_id_seq_pk",
97
+ "columns": ["conversation_id", "seq"]
98
+ }
99
+ },
100
+ "uniqueConstraints": {},
101
+ "policies": {},
102
+ "checkConstraints": {},
103
+ "isRLSEnabled": false
104
+ },
105
+ "public.junior_conversation_messages": {
106
+ "name": "junior_conversation_messages",
107
+ "schema": "",
108
+ "columns": {
109
+ "conversation_id": {
110
+ "name": "conversation_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "message_id": {
116
+ "name": "message_id",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "role": {
122
+ "name": "role",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "author_identity_id": {
128
+ "name": "author_identity_id",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": false
132
+ },
133
+ "text": {
134
+ "name": "text",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "meta": {
140
+ "name": "meta",
141
+ "type": "jsonb",
142
+ "primaryKey": false,
143
+ "notNull": false
144
+ },
145
+ "replied_at": {
146
+ "name": "replied_at",
147
+ "type": "timestamp with time zone",
148
+ "primaryKey": false,
149
+ "notNull": false
150
+ },
151
+ "created_at": {
152
+ "name": "created_at",
153
+ "type": "timestamp with time zone",
154
+ "primaryKey": false,
155
+ "notNull": true
156
+ }
157
+ },
158
+ "indexes": {
159
+ "junior_conversation_messages_activity_idx": {
160
+ "name": "junior_conversation_messages_activity_idx",
161
+ "columns": [
162
+ {
163
+ "expression": "conversation_id",
164
+ "isExpression": false,
165
+ "asc": true,
166
+ "nulls": "last"
167
+ },
168
+ {
169
+ "expression": "created_at",
170
+ "isExpression": false,
171
+ "asc": true,
172
+ "nulls": "last"
173
+ }
174
+ ],
175
+ "isUnique": false,
176
+ "concurrently": false,
177
+ "method": "btree",
178
+ "with": {}
179
+ }
180
+ },
181
+ "foreignKeys": {
182
+ "junior_conversation_messages_conversation_id_junior_conversations_conversation_id_fk": {
183
+ "name": "junior_conversation_messages_conversation_id_junior_conversations_conversation_id_fk",
184
+ "tableFrom": "junior_conversation_messages",
185
+ "tableTo": "junior_conversations",
186
+ "columnsFrom": ["conversation_id"],
187
+ "columnsTo": ["conversation_id"],
188
+ "onDelete": "no action",
189
+ "onUpdate": "no action"
190
+ },
191
+ "junior_conversation_messages_author_identity_id_junior_identities_id_fk": {
192
+ "name": "junior_conversation_messages_author_identity_id_junior_identities_id_fk",
193
+ "tableFrom": "junior_conversation_messages",
194
+ "tableTo": "junior_identities",
195
+ "columnsFrom": ["author_identity_id"],
196
+ "columnsTo": ["id"],
197
+ "onDelete": "no action",
198
+ "onUpdate": "no action"
199
+ }
200
+ },
201
+ "compositePrimaryKeys": {
202
+ "junior_conversation_messages_conversation_id_message_id_pk": {
203
+ "name": "junior_conversation_messages_conversation_id_message_id_pk",
204
+ "columns": ["conversation_id", "message_id"]
205
+ }
206
+ },
207
+ "uniqueConstraints": {},
208
+ "policies": {},
209
+ "checkConstraints": {},
210
+ "isRLSEnabled": false
211
+ },
212
+ "public.junior_conversations": {
213
+ "name": "junior_conversations",
214
+ "schema": "",
215
+ "columns": {
216
+ "conversation_id": {
217
+ "name": "conversation_id",
218
+ "type": "text",
219
+ "primaryKey": true,
220
+ "notNull": true
221
+ },
222
+ "schema_version": {
223
+ "name": "schema_version",
224
+ "type": "integer",
225
+ "primaryKey": false,
226
+ "notNull": true,
227
+ "default": 1
228
+ },
229
+ "source": {
230
+ "name": "source",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "origin_type": {
236
+ "name": "origin_type",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "origin_id": {
242
+ "name": "origin_id",
243
+ "type": "text",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "origin_run_id": {
248
+ "name": "origin_run_id",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "destination_id": {
254
+ "name": "destination_id",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "destination_json": {
260
+ "name": "destination_json",
261
+ "type": "jsonb",
262
+ "primaryKey": false,
263
+ "notNull": false
264
+ },
265
+ "actor_identity_id": {
266
+ "name": "actor_identity_id",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": false
270
+ },
271
+ "creator_identity_id": {
272
+ "name": "creator_identity_id",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": false
276
+ },
277
+ "credential_subject_identity_id": {
278
+ "name": "credential_subject_identity_id",
279
+ "type": "text",
280
+ "primaryKey": false,
281
+ "notNull": false
282
+ },
283
+ "actor_json": {
284
+ "name": "actor_json",
285
+ "type": "jsonb",
286
+ "primaryKey": false,
287
+ "notNull": false
288
+ },
289
+ "channel_name": {
290
+ "name": "channel_name",
291
+ "type": "text",
292
+ "primaryKey": false,
293
+ "notNull": false
294
+ },
295
+ "title": {
296
+ "name": "title",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": false
300
+ },
301
+ "created_at": {
302
+ "name": "created_at",
303
+ "type": "timestamp with time zone",
304
+ "primaryKey": false,
305
+ "notNull": true
306
+ },
307
+ "last_activity_at": {
308
+ "name": "last_activity_at",
309
+ "type": "timestamp with time zone",
310
+ "primaryKey": false,
311
+ "notNull": true
312
+ },
313
+ "updated_at": {
314
+ "name": "updated_at",
315
+ "type": "timestamp with time zone",
316
+ "primaryKey": false,
317
+ "notNull": true
318
+ },
319
+ "execution_updated_at": {
320
+ "name": "execution_updated_at",
321
+ "type": "timestamp with time zone",
322
+ "primaryKey": false,
323
+ "notNull": false
324
+ },
325
+ "execution_status": {
326
+ "name": "execution_status",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "run_id": {
332
+ "name": "run_id",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": false
336
+ },
337
+ "last_checkpoint_at": {
338
+ "name": "last_checkpoint_at",
339
+ "type": "timestamp with time zone",
340
+ "primaryKey": false,
341
+ "notNull": false
342
+ },
343
+ "last_enqueued_at": {
344
+ "name": "last_enqueued_at",
345
+ "type": "timestamp with time zone",
346
+ "primaryKey": false,
347
+ "notNull": false
348
+ },
349
+ "parent_conversation_id": {
350
+ "name": "parent_conversation_id",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": false
354
+ },
355
+ "transcript_purged_at": {
356
+ "name": "transcript_purged_at",
357
+ "type": "timestamp with time zone",
358
+ "primaryKey": false,
359
+ "notNull": false
360
+ },
361
+ "duration_ms": {
362
+ "name": "duration_ms",
363
+ "type": "integer",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "default": 0
367
+ },
368
+ "usage_json": {
369
+ "name": "usage_json",
370
+ "type": "jsonb",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "execution_duration_ms": {
375
+ "name": "execution_duration_ms",
376
+ "type": "integer",
377
+ "primaryKey": false,
378
+ "notNull": true,
379
+ "default": 0
380
+ },
381
+ "execution_usage_json": {
382
+ "name": "execution_usage_json",
383
+ "type": "jsonb",
384
+ "primaryKey": false,
385
+ "notNull": false
386
+ }
387
+ },
388
+ "indexes": {
389
+ "junior_conversations_last_activity_idx": {
390
+ "name": "junior_conversations_last_activity_idx",
391
+ "columns": [
392
+ {
393
+ "expression": "last_activity_at",
394
+ "isExpression": false,
395
+ "asc": false,
396
+ "nulls": "last"
397
+ },
398
+ {
399
+ "expression": "conversation_id",
400
+ "isExpression": false,
401
+ "asc": true,
402
+ "nulls": "last"
403
+ }
404
+ ],
405
+ "isUnique": false,
406
+ "concurrently": false,
407
+ "method": "btree",
408
+ "with": {}
409
+ },
410
+ "junior_conversations_active_idx": {
411
+ "name": "junior_conversations_active_idx",
412
+ "columns": [
413
+ {
414
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
415
+ "asc": true,
416
+ "isExpression": true,
417
+ "nulls": "last"
418
+ },
419
+ {
420
+ "expression": "conversation_id",
421
+ "isExpression": false,
422
+ "asc": true,
423
+ "nulls": "last"
424
+ }
425
+ ],
426
+ "isUnique": false,
427
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
428
+ "concurrently": false,
429
+ "method": "btree",
430
+ "with": {}
431
+ },
432
+ "junior_conversations_destination_activity_idx": {
433
+ "name": "junior_conversations_destination_activity_idx",
434
+ "columns": [
435
+ {
436
+ "expression": "destination_id",
437
+ "isExpression": false,
438
+ "asc": true,
439
+ "nulls": "last"
440
+ },
441
+ {
442
+ "expression": "last_activity_at",
443
+ "isExpression": false,
444
+ "asc": false,
445
+ "nulls": "last"
446
+ }
447
+ ],
448
+ "isUnique": false,
449
+ "concurrently": false,
450
+ "method": "btree",
451
+ "with": {}
452
+ },
453
+ "junior_conversations_actor_activity_idx": {
454
+ "name": "junior_conversations_actor_activity_idx",
455
+ "columns": [
456
+ {
457
+ "expression": "actor_identity_id",
458
+ "isExpression": false,
459
+ "asc": true,
460
+ "nulls": "last"
461
+ },
462
+ {
463
+ "expression": "last_activity_at",
464
+ "isExpression": false,
465
+ "asc": false,
466
+ "nulls": "last"
467
+ }
468
+ ],
469
+ "isUnique": false,
470
+ "concurrently": false,
471
+ "method": "btree",
472
+ "with": {}
473
+ },
474
+ "junior_conversations_origin_idx": {
475
+ "name": "junior_conversations_origin_idx",
476
+ "columns": [
477
+ {
478
+ "expression": "origin_type",
479
+ "isExpression": false,
480
+ "asc": true,
481
+ "nulls": "last"
482
+ },
483
+ {
484
+ "expression": "origin_id",
485
+ "isExpression": false,
486
+ "asc": true,
487
+ "nulls": "last"
488
+ },
489
+ {
490
+ "expression": "last_activity_at",
491
+ "isExpression": false,
492
+ "asc": false,
493
+ "nulls": "last"
494
+ }
495
+ ],
496
+ "isUnique": false,
497
+ "concurrently": false,
498
+ "method": "btree",
499
+ "with": {}
500
+ },
501
+ "junior_conversations_parent_idx": {
502
+ "name": "junior_conversations_parent_idx",
503
+ "columns": [
504
+ {
505
+ "expression": "parent_conversation_id",
506
+ "isExpression": false,
507
+ "asc": true,
508
+ "nulls": "last"
509
+ }
510
+ ],
511
+ "isUnique": false,
512
+ "concurrently": false,
513
+ "method": "btree",
514
+ "with": {}
515
+ }
516
+ },
517
+ "foreignKeys": {
518
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
519
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
520
+ "tableFrom": "junior_conversations",
521
+ "tableTo": "junior_destinations",
522
+ "columnsFrom": ["destination_id"],
523
+ "columnsTo": ["id"],
524
+ "onDelete": "no action",
525
+ "onUpdate": "no action"
526
+ },
527
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
528
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
529
+ "tableFrom": "junior_conversations",
530
+ "tableTo": "junior_identities",
531
+ "columnsFrom": ["actor_identity_id"],
532
+ "columnsTo": ["id"],
533
+ "onDelete": "no action",
534
+ "onUpdate": "no action"
535
+ },
536
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
537
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
538
+ "tableFrom": "junior_conversations",
539
+ "tableTo": "junior_identities",
540
+ "columnsFrom": ["creator_identity_id"],
541
+ "columnsTo": ["id"],
542
+ "onDelete": "no action",
543
+ "onUpdate": "no action"
544
+ },
545
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
546
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
547
+ "tableFrom": "junior_conversations",
548
+ "tableTo": "junior_identities",
549
+ "columnsFrom": ["credential_subject_identity_id"],
550
+ "columnsTo": ["id"],
551
+ "onDelete": "no action",
552
+ "onUpdate": "no action"
553
+ },
554
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
555
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
556
+ "tableFrom": "junior_conversations",
557
+ "tableTo": "junior_conversations",
558
+ "columnsFrom": ["parent_conversation_id"],
559
+ "columnsTo": ["conversation_id"],
560
+ "onDelete": "no action",
561
+ "onUpdate": "no action"
562
+ }
563
+ },
564
+ "compositePrimaryKeys": {},
565
+ "uniqueConstraints": {},
566
+ "policies": {},
567
+ "checkConstraints": {},
568
+ "isRLSEnabled": false
569
+ },
570
+ "public.junior_destinations": {
571
+ "name": "junior_destinations",
572
+ "schema": "",
573
+ "columns": {
574
+ "id": {
575
+ "name": "id",
576
+ "type": "text",
577
+ "primaryKey": true,
578
+ "notNull": true
579
+ },
580
+ "provider": {
581
+ "name": "provider",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": true
585
+ },
586
+ "provider_tenant_id": {
587
+ "name": "provider_tenant_id",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "default": "''"
592
+ },
593
+ "provider_destination_id": {
594
+ "name": "provider_destination_id",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": true
598
+ },
599
+ "kind": {
600
+ "name": "kind",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": true
604
+ },
605
+ "parent_destination_id": {
606
+ "name": "parent_destination_id",
607
+ "type": "text",
608
+ "primaryKey": false,
609
+ "notNull": false
610
+ },
611
+ "display_name": {
612
+ "name": "display_name",
613
+ "type": "text",
614
+ "primaryKey": false,
615
+ "notNull": false
616
+ },
617
+ "visibility": {
618
+ "name": "visibility",
619
+ "type": "text",
620
+ "primaryKey": false,
621
+ "notNull": true,
622
+ "default": "'unknown'"
623
+ },
624
+ "metadata_json": {
625
+ "name": "metadata_json",
626
+ "type": "jsonb",
627
+ "primaryKey": false,
628
+ "notNull": false
629
+ },
630
+ "created_at": {
631
+ "name": "created_at",
632
+ "type": "timestamp with time zone",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "updated_at": {
637
+ "name": "updated_at",
638
+ "type": "timestamp with time zone",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ }
642
+ },
643
+ "indexes": {
644
+ "junior_destinations_provider_destination_uidx": {
645
+ "name": "junior_destinations_provider_destination_uidx",
646
+ "columns": [
647
+ {
648
+ "expression": "provider",
649
+ "isExpression": false,
650
+ "asc": true,
651
+ "nulls": "last"
652
+ },
653
+ {
654
+ "expression": "provider_tenant_id",
655
+ "isExpression": false,
656
+ "asc": true,
657
+ "nulls": "last"
658
+ },
659
+ {
660
+ "expression": "provider_destination_id",
661
+ "isExpression": false,
662
+ "asc": true,
663
+ "nulls": "last"
664
+ }
665
+ ],
666
+ "isUnique": true,
667
+ "concurrently": false,
668
+ "method": "btree",
669
+ "with": {}
670
+ },
671
+ "junior_destinations_provider_kind_idx": {
672
+ "name": "junior_destinations_provider_kind_idx",
673
+ "columns": [
674
+ {
675
+ "expression": "provider",
676
+ "isExpression": false,
677
+ "asc": true,
678
+ "nulls": "last"
679
+ },
680
+ {
681
+ "expression": "kind",
682
+ "isExpression": false,
683
+ "asc": true,
684
+ "nulls": "last"
685
+ }
686
+ ],
687
+ "isUnique": false,
688
+ "concurrently": false,
689
+ "method": "btree",
690
+ "with": {}
691
+ }
692
+ },
693
+ "foreignKeys": {},
694
+ "compositePrimaryKeys": {},
695
+ "uniqueConstraints": {},
696
+ "policies": {},
697
+ "checkConstraints": {},
698
+ "isRLSEnabled": false
699
+ },
700
+ "public.junior_identities": {
701
+ "name": "junior_identities",
702
+ "schema": "",
703
+ "columns": {
704
+ "id": {
705
+ "name": "id",
706
+ "type": "text",
707
+ "primaryKey": true,
708
+ "notNull": true
709
+ },
710
+ "kind": {
711
+ "name": "kind",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": true
715
+ },
716
+ "provider": {
717
+ "name": "provider",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true
721
+ },
722
+ "provider_tenant_id": {
723
+ "name": "provider_tenant_id",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "default": "''"
728
+ },
729
+ "provider_subject_id": {
730
+ "name": "provider_subject_id",
731
+ "type": "text",
732
+ "primaryKey": false,
733
+ "notNull": true
734
+ },
735
+ "display_name": {
736
+ "name": "display_name",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": false
740
+ },
741
+ "handle": {
742
+ "name": "handle",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": false
746
+ },
747
+ "email": {
748
+ "name": "email",
749
+ "type": "text",
750
+ "primaryKey": false,
751
+ "notNull": false
752
+ },
753
+ "avatar_url": {
754
+ "name": "avatar_url",
755
+ "type": "text",
756
+ "primaryKey": false,
757
+ "notNull": false
758
+ },
759
+ "metadata_json": {
760
+ "name": "metadata_json",
761
+ "type": "jsonb",
762
+ "primaryKey": false,
763
+ "notNull": false
764
+ },
765
+ "created_at": {
766
+ "name": "created_at",
767
+ "type": "timestamp with time zone",
768
+ "primaryKey": false,
769
+ "notNull": true
770
+ },
771
+ "updated_at": {
772
+ "name": "updated_at",
773
+ "type": "timestamp with time zone",
774
+ "primaryKey": false,
775
+ "notNull": true
776
+ },
777
+ "user_id": {
778
+ "name": "user_id",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": false
782
+ },
783
+ "email_normalized": {
784
+ "name": "email_normalized",
785
+ "type": "text",
786
+ "primaryKey": false,
787
+ "notNull": false
788
+ },
789
+ "email_verified": {
790
+ "name": "email_verified",
791
+ "type": "boolean",
792
+ "primaryKey": false,
793
+ "notNull": true,
794
+ "default": false
795
+ }
796
+ },
797
+ "indexes": {
798
+ "junior_identities_provider_subject_uidx": {
799
+ "name": "junior_identities_provider_subject_uidx",
800
+ "columns": [
801
+ {
802
+ "expression": "provider",
803
+ "isExpression": false,
804
+ "asc": true,
805
+ "nulls": "last"
806
+ },
807
+ {
808
+ "expression": "provider_tenant_id",
809
+ "isExpression": false,
810
+ "asc": true,
811
+ "nulls": "last"
812
+ },
813
+ {
814
+ "expression": "provider_subject_id",
815
+ "isExpression": false,
816
+ "asc": true,
817
+ "nulls": "last"
818
+ }
819
+ ],
820
+ "isUnique": true,
821
+ "concurrently": false,
822
+ "method": "btree",
823
+ "with": {}
824
+ },
825
+ "junior_identities_user_idx": {
826
+ "name": "junior_identities_user_idx",
827
+ "columns": [
828
+ {
829
+ "expression": "user_id",
830
+ "isExpression": false,
831
+ "asc": true,
832
+ "nulls": "last"
833
+ }
834
+ ],
835
+ "isUnique": false,
836
+ "concurrently": false,
837
+ "method": "btree",
838
+ "with": {}
839
+ },
840
+ "junior_identities_verified_email_idx": {
841
+ "name": "junior_identities_verified_email_idx",
842
+ "columns": [
843
+ {
844
+ "expression": "email_normalized",
845
+ "isExpression": false,
846
+ "asc": true,
847
+ "nulls": "last"
848
+ }
849
+ ],
850
+ "isUnique": false,
851
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
852
+ "concurrently": false,
853
+ "method": "btree",
854
+ "with": {}
855
+ },
856
+ "junior_identities_kind_provider_idx": {
857
+ "name": "junior_identities_kind_provider_idx",
858
+ "columns": [
859
+ {
860
+ "expression": "kind",
861
+ "isExpression": false,
862
+ "asc": true,
863
+ "nulls": "last"
864
+ },
865
+ {
866
+ "expression": "provider",
867
+ "isExpression": false,
868
+ "asc": true,
869
+ "nulls": "last"
870
+ }
871
+ ],
872
+ "isUnique": false,
873
+ "concurrently": false,
874
+ "method": "btree",
875
+ "with": {}
876
+ }
877
+ },
878
+ "foreignKeys": {
879
+ "junior_identities_user_id_junior_users_id_fk": {
880
+ "name": "junior_identities_user_id_junior_users_id_fk",
881
+ "tableFrom": "junior_identities",
882
+ "tableTo": "junior_users",
883
+ "columnsFrom": ["user_id"],
884
+ "columnsTo": ["id"],
885
+ "onDelete": "no action",
886
+ "onUpdate": "no action"
887
+ }
888
+ },
889
+ "compositePrimaryKeys": {},
890
+ "uniqueConstraints": {},
891
+ "policies": {},
892
+ "checkConstraints": {},
893
+ "isRLSEnabled": false
894
+ },
895
+ "public.junior_users": {
896
+ "name": "junior_users",
897
+ "schema": "",
898
+ "columns": {
899
+ "id": {
900
+ "name": "id",
901
+ "type": "text",
902
+ "primaryKey": true,
903
+ "notNull": true
904
+ },
905
+ "primary_email": {
906
+ "name": "primary_email",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": true
910
+ },
911
+ "primary_email_normalized": {
912
+ "name": "primary_email_normalized",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": true
916
+ },
917
+ "display_name": {
918
+ "name": "display_name",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": false
922
+ },
923
+ "created_at": {
924
+ "name": "created_at",
925
+ "type": "timestamp with time zone",
926
+ "primaryKey": false,
927
+ "notNull": true
928
+ },
929
+ "updated_at": {
930
+ "name": "updated_at",
931
+ "type": "timestamp with time zone",
932
+ "primaryKey": false,
933
+ "notNull": true
934
+ }
935
+ },
936
+ "indexes": {
937
+ "junior_users_primary_email_normalized_uidx": {
938
+ "name": "junior_users_primary_email_normalized_uidx",
939
+ "columns": [
940
+ {
941
+ "expression": "primary_email_normalized",
942
+ "isExpression": false,
943
+ "asc": true,
944
+ "nulls": "last"
945
+ }
946
+ ],
947
+ "isUnique": true,
948
+ "concurrently": false,
949
+ "method": "btree",
950
+ "with": {}
951
+ }
952
+ },
953
+ "foreignKeys": {},
954
+ "compositePrimaryKeys": {},
955
+ "uniqueConstraints": {},
956
+ "policies": {},
957
+ "checkConstraints": {},
958
+ "isRLSEnabled": false
959
+ }
960
+ },
961
+ "enums": {},
962
+ "schemas": {},
963
+ "sequences": {},
964
+ "roles": {},
965
+ "policies": {},
966
+ "views": {},
967
+ "_meta": {
968
+ "columns": {},
969
+ "schemas": {},
970
+ "tables": {}
971
+ }
972
+ }