@sentry/junior 0.146.0 → 0.148.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 (227) hide show
  1. package/dist/{agent-hooks-SLJADYE5.js → agent-hooks-VAUYT6PD.js} +10 -10
  2. package/dist/api/conversations/access.d.ts +2 -1
  3. package/dist/api/conversations/archive.d.ts +3 -5
  4. package/dist/api/conversations/create.d.ts +6 -0
  5. package/dist/api/conversations/detail.d.ts +2 -295
  6. package/dist/api/conversations/event-list.d.ts +2 -192
  7. package/dist/api/conversations/list.d.ts +4 -66
  8. package/dist/api/conversations/routes.d.ts +1 -1
  9. package/dist/api/conversations/stats.d.ts +0 -54
  10. package/dist/api/http.d.ts +2 -6
  11. package/dist/api/locations/detail.d.ts +3 -111
  12. package/dist/api/locations/list.d.ts +0 -45
  13. package/dist/api/locations/query.d.ts +2 -1
  14. package/dist/api/locations/routes.d.ts +1 -1
  15. package/dist/api/people/list.d.ts +0 -29
  16. package/dist/api/people/profile.d.ts +2 -106
  17. package/dist/api/people/profile.query.d.ts +2 -1
  18. package/dist/api/people/routes.d.ts +1 -1
  19. package/dist/api/people/shared.d.ts +1 -1
  20. package/dist/api/people/spend.d.ts +3 -4
  21. package/dist/api/personal-tokens/routes.d.ts +2 -2
  22. package/dist/api/route.d.ts +8 -14
  23. package/dist/api/schema/conversation.d.ts +64 -29
  24. package/dist/api/schema/location.d.ts +4 -0
  25. package/dist/api/schema/person.d.ts +7 -3
  26. package/dist/api/schema.d.ts +2 -2
  27. package/dist/api/schema.js +7 -1
  28. package/dist/api/stats.d.ts +0 -13
  29. package/dist/api/validation.d.ts +7 -0
  30. package/dist/api/viewer.d.ts +3 -0
  31. package/dist/api.d.ts +2 -1
  32. package/dist/api.js +630 -564
  33. package/dist/app.js +369 -309
  34. package/dist/{catalog-runtime-RQIMSDPR.js → catalog-runtime-WADOZVTB.js} +5 -5
  35. package/dist/chat/actor.d.ts +4 -1
  36. package/dist/chat/agent/prompt.d.ts +0 -2
  37. package/dist/chat/agent/request.d.ts +4 -5
  38. package/dist/chat/agent/resume.d.ts +1 -0
  39. package/dist/chat/agent/sandbox.d.ts +2 -2
  40. package/dist/chat/agent/tools.d.ts +0 -2
  41. package/dist/chat/agent-dispatch/context.d.ts +2 -2
  42. package/dist/chat/agent-dispatch/types.d.ts +2 -2
  43. package/dist/chat/agent-invocations/types.d.ts +52 -0
  44. package/dist/chat/api-turns/work.d.ts +103 -0
  45. package/dist/chat/capabilities/jr-rpc-command.d.ts +2 -2
  46. package/dist/chat/configuration/service.d.ts +5 -2
  47. package/dist/chat/configuration/sql.d.ts +9 -0
  48. package/dist/chat/configuration/types.d.ts +17 -13
  49. package/dist/chat/conversations/history.d.ts +63 -0
  50. package/dist/chat/conversations/projection.d.ts +10 -0
  51. package/dist/chat/conversations/provenance.d.ts +6 -0
  52. package/dist/chat/conversations/sql/actor-identity.d.ts +19 -0
  53. package/dist/chat/conversations/store.d.ts +1 -1
  54. package/dist/chat/credentials/unlink-provider.d.ts +2 -1
  55. package/dist/chat/credentials/user-token-store.d.ts +2 -0
  56. package/dist/chat/event-tasks/tool-support.d.ts +2 -0
  57. package/dist/chat/identities/sql.d.ts +8 -0
  58. package/dist/chat/logging.d.ts +2 -0
  59. package/dist/chat/mcp/auth-store.d.ts +0 -2
  60. package/dist/chat/mcp/oauth.d.ts +0 -2
  61. package/dist/chat/oauth-flow.d.ts +3 -1
  62. package/dist/chat/pi/client.d.ts +2 -0
  63. package/dist/chat/plugins/credential-hooks.d.ts +2 -0
  64. package/dist/chat/prompt.d.ts +0 -2
  65. package/dist/chat/resource-events/notification.d.ts +2 -1
  66. package/dist/chat/resource-events/store.d.ts +1 -1
  67. package/dist/chat/runtime/delivered-turn-state.d.ts +1 -4
  68. package/dist/chat/runtime/reply-executor.d.ts +1 -1
  69. package/dist/chat/runtime/slack-runtime.d.ts +2 -1
  70. package/dist/chat/runtime/thread-state.d.ts +8 -11
  71. package/dist/chat/runtime/turn-input.d.ts +4 -2
  72. package/dist/chat/runtime/turn-preparation.d.ts +11 -4
  73. package/dist/chat/sandbox/command-result.d.ts +2 -0
  74. package/dist/chat/sandbox/egress/schemas.d.ts +6 -0
  75. package/dist/chat/scheduled-tasks/tool-support.d.ts +7 -5
  76. package/dist/chat/scheduled-tasks/tools/create.d.ts +4 -2
  77. package/dist/chat/scheduled-tasks/tools/delete.d.ts +4 -2
  78. package/dist/chat/scheduled-tasks/tools/list.d.ts +4 -2
  79. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +4 -2
  80. package/dist/chat/scheduled-tasks/tools/update.d.ts +4 -2
  81. package/dist/chat/services/mcp-auth-orchestration.d.ts +0 -3
  82. package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
  83. package/dist/chat/services/provider-default-config.d.ts +2 -2
  84. package/dist/chat/services/subscribed-decision.d.ts +3 -0
  85. package/dist/chat/services/subscribed-reply-policy.d.ts +1 -0
  86. package/dist/chat/services/turn-result.d.ts +0 -3
  87. package/dist/chat/services/turn-router.d.ts +3 -0
  88. package/dist/chat/slack/assistant-thread/lifecycle.d.ts +0 -1
  89. package/dist/chat/slack/assistant-thread/title.d.ts +0 -3
  90. package/dist/chat/slack/channel.d.ts +26 -0
  91. package/dist/chat/slack/dispatch-turn.d.ts +2 -1
  92. package/dist/chat/slack/timestamp-param.d.ts +0 -2
  93. package/dist/chat/slack/{tools → tool-support}/canvas/api.d.ts +1 -1
  94. package/dist/chat/slack/tool-support/canvas/context.d.ts +11 -0
  95. package/dist/chat/slack/tool-support/channel-access.d.ts +42 -0
  96. package/dist/chat/slack/tool-support/channel-target.d.ts +27 -0
  97. package/dist/chat/slack/{tools → tool-support}/list/api.d.ts +8 -1
  98. package/dist/chat/slack/tool-support/list/params.d.ts +5 -0
  99. package/dist/chat/slack/tools/canvas/create.d.ts +3 -1
  100. package/dist/chat/slack/tools/canvas/edit.d.ts +2 -0
  101. package/dist/chat/slack/tools/canvas/read.d.ts +2 -0
  102. package/dist/chat/slack/tools/canvas/write.d.ts +2 -0
  103. package/dist/chat/slack/tools/{user-lookup.d.ts → channel-join.d.ts} +6 -5
  104. package/dist/chat/slack/tools/channel-list-messages.d.ts +5 -2
  105. package/dist/chat/slack/tools/conversation-message-search.d.ts +4 -8
  106. package/dist/chat/slack/tools/list/add-items.d.ts +4 -1
  107. package/dist/chat/slack/tools/list/create.d.ts +2 -0
  108. package/dist/chat/slack/tools/list/get-items.d.ts +5 -3
  109. package/dist/chat/slack/tools/list/update-item.d.ts +5 -1
  110. package/dist/chat/slack/tools/message-add-reaction.d.ts +3 -1
  111. package/dist/chat/slack/tools/public-search.d.ts +65 -2
  112. package/dist/chat/slack/tools/send-files.d.ts +3 -1
  113. package/dist/chat/slack/tools/thread-read.d.ts +4 -5
  114. package/dist/chat/slack/vision-cache.d.ts +5 -0
  115. package/dist/chat/source.d.ts +2 -0
  116. package/dist/chat/state/conversation.d.ts +4 -5
  117. package/dist/chat/task-execution/checkpoint.d.ts +1 -0
  118. package/dist/chat/task-execution/state.d.ts +9 -4
  119. package/dist/chat/task-execution/store.d.ts +3 -2
  120. package/dist/chat/task-execution/turn-cursor.d.ts +2 -0
  121. package/dist/chat/task-execution/worker.d.ts +2 -0
  122. package/dist/chat/tasks/read.d.ts +1 -1
  123. package/dist/chat/tool-support/structured-result.d.ts +1 -0
  124. package/dist/chat/tool-support/timed-out-tool-result.d.ts +11 -0
  125. package/dist/chat/tools/create-event-task.d.ts +2 -0
  126. package/dist/chat/tools/delete-event-task.d.ts +2 -0
  127. package/dist/chat/tools/handoff/tool.d.ts +2 -0
  128. package/dist/chat/tools/list-event-tasks.d.ts +2 -0
  129. package/dist/chat/tools/list-resource-event-subscriptions.d.ts +2 -0
  130. package/dist/chat/tools/runtime/report-progress.d.ts +2 -0
  131. package/dist/chat/tools/runtime/spawn-agent.d.ts +2 -0
  132. package/dist/chat/tools/search-conversation-events.d.ts +3 -1
  133. package/dist/chat/tools/search-resource-event-types.d.ts +2 -0
  134. package/dist/chat/tools/search-tools.d.ts +2 -0
  135. package/dist/chat/tools/skill/load-skill.d.ts +2 -0
  136. package/dist/chat/tools/skill/search-mcp-tools.d.ts +2 -0
  137. package/dist/chat/tools/stop-watching-resources.d.ts +2 -0
  138. package/dist/chat/tools/system-time.d.ts +2 -0
  139. package/dist/chat/tools/types.d.ts +11 -10
  140. package/dist/chat/tools/update-event-task.d.ts +2 -0
  141. package/dist/chat/tools/user-lookup.d.ts +29 -0
  142. package/dist/chat/tools/watch-resource-events.d.ts +4 -2
  143. package/dist/chat/tools/web/fetch-tool.d.ts +2 -0
  144. package/dist/chat/tools/web/image-generate.d.ts +2 -0
  145. package/dist/chat/tools/web/search.d.ts +2 -0
  146. package/dist/{chunk-GYEKOX7N.js → chunk-2B3PT3V2.js} +1 -1
  147. package/dist/{chunk-JLMVCNXL.js → chunk-45LOR4PU.js} +22 -4
  148. package/dist/{chunk-FGHADGIC.js → chunk-4AQZYNHM.js} +2 -2
  149. package/dist/{chunk-W65V465O.js → chunk-4EA2SFK2.js} +66 -4
  150. package/dist/{chunk-MKRIZ4VG.js → chunk-4GXJUYJV.js} +4 -2
  151. package/dist/{chunk-F7REGDKO.js → chunk-55F4QU2V.js} +2 -1
  152. package/dist/{chunk-M6ZWP4RI.js → chunk-7OEIXFC3.js} +2 -2
  153. package/dist/{chunk-MCFIXAV5.js → chunk-D3WPMGEX.js} +55 -37
  154. package/dist/{chunk-AISNSNDV.js → chunk-D6YX4NNN.js} +22 -10
  155. package/dist/chunk-DUY5CDAM.js +36 -0
  156. package/dist/{chunk-B63BF443.js → chunk-EAI67NTM.js} +9 -1
  157. package/dist/{chunk-FEKQHPVA.js → chunk-EINWQFXI.js} +9 -8
  158. package/dist/chunk-GDFF3BQG.js +136 -0
  159. package/dist/{chunk-X22KCSCO.js → chunk-GXYDVZKM.js} +7 -5
  160. package/dist/{chunk-X2WMBTS3.js → chunk-HLPLT3NY.js} +8 -5
  161. package/dist/{chunk-PB222GIA.js → chunk-HWQGBIH7.js} +1 -1
  162. package/dist/chunk-IL4EDBMV.js +566 -0
  163. package/dist/{chunk-HQE6EJS5.js → chunk-LAZGHEYU.js} +1 -1
  164. package/dist/{chunk-QG7OOKIN.js → chunk-LE5H7LMT.js} +1 -1
  165. package/dist/chunk-LNVEIJ2L.js +48 -0
  166. package/dist/{chunk-JUA6VU2Z.js → chunk-OJCP3C3J.js} +12 -23
  167. package/dist/{chunk-37JJDS4H.js → chunk-POSZWRGL.js} +1 -1
  168. package/dist/{chunk-TCEJ7XXM.js → chunk-QOWHHM3F.js} +1 -1
  169. package/dist/{chunk-H6U2U3EP.js → chunk-RRJV5UR5.js} +304 -65
  170. package/dist/{chunk-OFPYOC3M.js → chunk-ULAU5ZGU.js} +127 -120
  171. package/dist/{chunk-V6SRLKUB.js → chunk-V2FXMOEA.js} +2 -2
  172. package/dist/{chunk-GDQEU4I7.js → chunk-VCYSOXON.js} +296 -526
  173. package/dist/{chunk-BLETMLRX.js → chunk-VMNRXKAH.js} +1374 -989
  174. package/dist/{chunk-37EVZP66.js → chunk-VRHTNBA6.js} +167 -92
  175. package/dist/{chunk-FXDDDSPL.js → chunk-VY6W3T43.js} +4 -4
  176. package/dist/{chunk-ZDGHGY74.js → chunk-WCN4YSH7.js} +13 -6
  177. package/dist/{chunk-PH4Q3A6W.js → chunk-WOONT5ZP.js} +1 -1
  178. package/dist/{chunk-47OSH2ZO.js → chunk-XJ42NBP5.js} +395 -206
  179. package/dist/{chunk-SCGVWUZX.js → chunk-ZCHIC2GM.js} +92 -75
  180. package/dist/chunk-ZPL2RR7F.js +798 -0
  181. package/dist/cli/chat.js +33 -35
  182. package/dist/cli/check.js +6 -6
  183. package/dist/cli/plugins.js +13 -13
  184. package/dist/cli/snapshot-create.js +9 -9
  185. package/dist/cli/upgrade.js +7 -7
  186. package/dist/db/schema/agent-invocations.d.ts +20 -0
  187. package/dist/db/schema/conversation-annotations.d.ts +2 -2
  188. package/dist/db/schema/location-configurations.d.ts +127 -0
  189. package/dist/db/schema.d.ts +150 -3
  190. package/dist/{db-WWOMXWTT.js → db-XUKZRFFK.js} +7 -7
  191. package/dist/instrumentation.js +4 -4
  192. package/dist/nitro.js +2 -2
  193. package/dist/{oauth-callback-server-A6ZZX74U.js → oauth-callback-server-LPZMMGFI.js} +25 -26
  194. package/dist/{runner-KSGB2UAV.js → runner-DGKUTMPX.js} +22 -41
  195. package/dist/{skills-26QPWKVS.js → skills-P7YUFSXM.js} +6 -6
  196. package/dist/spawn-DSK3ZEVD.js +38 -0
  197. package/dist/{validation-OPSRGFGH.js → validation-S7U5M5NR.js} +6 -6
  198. package/dist/version.js +1 -1
  199. package/dist/{work-VMSW7STJ.js → work-GAA7TVAD.js} +18 -19
  200. package/dist/{worker-2JNFB7C7.js → worker-JXPJH3QB.js} +11 -10
  201. package/migrations/0024_misty_typhoid_mary.sql +12 -0
  202. package/migrations/meta/0024_snapshot.json +2275 -0
  203. package/migrations/meta/_journal.json +7 -0
  204. package/package.json +6 -5
  205. package/dist/api/health.d.ts +0 -7
  206. package/dist/api/personal-tokens/create.d.ts +0 -11
  207. package/dist/api/personal-tokens/list.d.ts +0 -12
  208. package/dist/api/personal-tokens/revoke.d.ts +0 -5
  209. package/dist/api/plugin-reports.d.ts +0 -63
  210. package/dist/api/plugins.d.ts +0 -8
  211. package/dist/api/runtime.d.ts +0 -24
  212. package/dist/api/skills.d.ts +0 -6
  213. package/dist/chat/slack/tools/canvas/context.d.ts +0 -18
  214. package/dist/chat/slack/tools/channel-access.d.ts +0 -30
  215. package/dist/chat/state/artifacts.d.ts +0 -30
  216. package/dist/chat/tool-support/turn-deadline-result.d.ts +0 -3
  217. package/dist/chunk-HLXXQI5Q.js +0 -238
  218. package/dist/chunk-LVW7BLLT.js +0 -115
  219. package/dist/chunk-Q6QZTTLS.js +0 -55
  220. package/dist/chunk-QSXZ42KX.js +0 -285
  221. package/dist/chunk-R776HKPK.js +0 -81
  222. package/dist/chunk-T5GXFFLA.js +0 -67
  223. package/dist/spawn-5LAJXZ2P.js +0 -39
  224. /package/dist/chat/slack/{tools → tool-support}/canvas/markdown.d.ts +0 -0
  225. /package/dist/chat/slack/{tools → tool-support}/channel-capabilities.d.ts +0 -0
  226. /package/dist/chat/slack/{tools → tool-support}/context.d.ts +0 -0
  227. /package/dist/chat/slack/{tools → tool-support}/slack-message-url.d.ts +0 -0
@@ -0,0 +1,2275 @@
1
+ {
2
+ "id": "5b615b01-1e96-4396-a09d-82c0a70f4a58",
3
+ "prevId": "86dbef33-04cf-4e3d-b324-b321a3af4af8",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_agent_bindings": {
8
+ "name": "junior_agent_bindings",
9
+ "schema": "",
10
+ "columns": {
11
+ "parent_conversation_id": {
12
+ "name": "parent_conversation_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "child_conversation_id": {
24
+ "name": "child_conversation_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ }
29
+ },
30
+ "indexes": {
31
+ "junior_agent_bindings_child_idx": {
32
+ "name": "junior_agent_bindings_child_idx",
33
+ "columns": [
34
+ {
35
+ "expression": "child_conversation_id",
36
+ "isExpression": false,
37
+ "asc": true,
38
+ "nulls": "last"
39
+ }
40
+ ],
41
+ "isUnique": true,
42
+ "concurrently": false,
43
+ "method": "btree",
44
+ "with": {}
45
+ }
46
+ },
47
+ "foreignKeys": {
48
+ "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk": {
49
+ "name": "junior_agent_bindings_parent_conversation_id_junior_conversations_conversation_id_fk",
50
+ "tableFrom": "junior_agent_bindings",
51
+ "tableTo": "junior_conversations",
52
+ "columnsFrom": [
53
+ "parent_conversation_id"
54
+ ],
55
+ "columnsTo": [
56
+ "conversation_id"
57
+ ],
58
+ "onDelete": "no action",
59
+ "onUpdate": "no action"
60
+ },
61
+ "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk": {
62
+ "name": "junior_agent_bindings_child_conversation_id_junior_conversations_conversation_id_fk",
63
+ "tableFrom": "junior_agent_bindings",
64
+ "tableTo": "junior_conversations",
65
+ "columnsFrom": [
66
+ "child_conversation_id"
67
+ ],
68
+ "columnsTo": [
69
+ "conversation_id"
70
+ ],
71
+ "onDelete": "no action",
72
+ "onUpdate": "no action"
73
+ }
74
+ },
75
+ "compositePrimaryKeys": {
76
+ "junior_agent_bindings_parent_conversation_id_name_pk": {
77
+ "name": "junior_agent_bindings_parent_conversation_id_name_pk",
78
+ "columns": [
79
+ "parent_conversation_id",
80
+ "name"
81
+ ]
82
+ }
83
+ },
84
+ "uniqueConstraints": {},
85
+ "policies": {},
86
+ "checkConstraints": {},
87
+ "isRLSEnabled": false
88
+ },
89
+ "public.junior_agent_invocations": {
90
+ "name": "junior_agent_invocations",
91
+ "schema": "",
92
+ "columns": {
93
+ "invocation_id": {
94
+ "name": "invocation_id",
95
+ "type": "text",
96
+ "primaryKey": true,
97
+ "notNull": true
98
+ },
99
+ "parent_conversation_id": {
100
+ "name": "parent_conversation_id",
101
+ "type": "text",
102
+ "primaryKey": false,
103
+ "notNull": true
104
+ },
105
+ "child_conversation_id": {
106
+ "name": "child_conversation_id",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true
110
+ },
111
+ "agent_name": {
112
+ "name": "agent_name",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false
116
+ },
117
+ "input": {
118
+ "name": "input",
119
+ "type": "text",
120
+ "primaryKey": false,
121
+ "notNull": true
122
+ },
123
+ "actor_json": {
124
+ "name": "actor_json",
125
+ "type": "jsonb",
126
+ "primaryKey": false,
127
+ "notNull": true
128
+ },
129
+ "credential_context_json": {
130
+ "name": "credential_context_json",
131
+ "type": "jsonb",
132
+ "primaryKey": false,
133
+ "notNull": false
134
+ },
135
+ "source_json": {
136
+ "name": "source_json",
137
+ "type": "jsonb",
138
+ "primaryKey": false,
139
+ "notNull": true
140
+ },
141
+ "destination_json": {
142
+ "name": "destination_json",
143
+ "type": "jsonb",
144
+ "primaryKey": false,
145
+ "notNull": true
146
+ },
147
+ "destination_visibility": {
148
+ "name": "destination_visibility",
149
+ "type": "text",
150
+ "primaryKey": false,
151
+ "notNull": false
152
+ },
153
+ "reasoning_level": {
154
+ "name": "reasoning_level",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": false
158
+ },
159
+ "status": {
160
+ "name": "status",
161
+ "type": "text",
162
+ "primaryKey": false,
163
+ "notNull": true
164
+ },
165
+ "mailbox_status": {
166
+ "name": "mailbox_status",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": true
170
+ },
171
+ "result": {
172
+ "name": "result",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": false
176
+ },
177
+ "error_message": {
178
+ "name": "error_message",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false
182
+ },
183
+ "created_at": {
184
+ "name": "created_at",
185
+ "type": "timestamp with time zone",
186
+ "primaryKey": false,
187
+ "notNull": true
188
+ },
189
+ "updated_at": {
190
+ "name": "updated_at",
191
+ "type": "timestamp with time zone",
192
+ "primaryKey": false,
193
+ "notNull": true
194
+ },
195
+ "terminal_at": {
196
+ "name": "terminal_at",
197
+ "type": "timestamp with time zone",
198
+ "primaryKey": false,
199
+ "notNull": false
200
+ }
201
+ },
202
+ "indexes": {
203
+ "junior_agent_invocations_child_idx": {
204
+ "name": "junior_agent_invocations_child_idx",
205
+ "columns": [
206
+ {
207
+ "expression": "child_conversation_id",
208
+ "isExpression": false,
209
+ "asc": true,
210
+ "nulls": "last"
211
+ }
212
+ ],
213
+ "isUnique": false,
214
+ "concurrently": false,
215
+ "method": "btree",
216
+ "with": {}
217
+ },
218
+ "junior_agent_invocations_mailbox_idx": {
219
+ "name": "junior_agent_invocations_mailbox_idx",
220
+ "columns": [
221
+ {
222
+ "expression": "mailbox_status",
223
+ "isExpression": false,
224
+ "asc": true,
225
+ "nulls": "last"
226
+ },
227
+ {
228
+ "expression": "created_at",
229
+ "isExpression": false,
230
+ "asc": true,
231
+ "nulls": "last"
232
+ }
233
+ ],
234
+ "isUnique": false,
235
+ "concurrently": false,
236
+ "method": "btree",
237
+ "with": {}
238
+ }
239
+ },
240
+ "foreignKeys": {
241
+ "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk": {
242
+ "name": "junior_agent_invocations_parent_conversation_id_junior_conversations_conversation_id_fk",
243
+ "tableFrom": "junior_agent_invocations",
244
+ "tableTo": "junior_conversations",
245
+ "columnsFrom": [
246
+ "parent_conversation_id"
247
+ ],
248
+ "columnsTo": [
249
+ "conversation_id"
250
+ ],
251
+ "onDelete": "no action",
252
+ "onUpdate": "no action"
253
+ },
254
+ "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk": {
255
+ "name": "junior_agent_invocations_child_conversation_id_junior_conversations_conversation_id_fk",
256
+ "tableFrom": "junior_agent_invocations",
257
+ "tableTo": "junior_conversations",
258
+ "columnsFrom": [
259
+ "child_conversation_id"
260
+ ],
261
+ "columnsTo": [
262
+ "conversation_id"
263
+ ],
264
+ "onDelete": "no action",
265
+ "onUpdate": "no action"
266
+ }
267
+ },
268
+ "compositePrimaryKeys": {},
269
+ "uniqueConstraints": {},
270
+ "policies": {},
271
+ "checkConstraints": {},
272
+ "isRLSEnabled": false
273
+ },
274
+ "public.junior_api_tokens": {
275
+ "name": "junior_api_tokens",
276
+ "schema": "",
277
+ "columns": {
278
+ "id": {
279
+ "name": "id",
280
+ "type": "text",
281
+ "primaryKey": true,
282
+ "notNull": true
283
+ },
284
+ "owner_email_normalized": {
285
+ "name": "owner_email_normalized",
286
+ "type": "text",
287
+ "primaryKey": false,
288
+ "notNull": true
289
+ },
290
+ "name": {
291
+ "name": "name",
292
+ "type": "text",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "token_hash": {
297
+ "name": "token_hash",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "token_suffix": {
303
+ "name": "token_suffix",
304
+ "type": "text",
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
+ "expires_at": {
315
+ "name": "expires_at",
316
+ "type": "timestamp with time zone",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "last_used_at": {
321
+ "name": "last_used_at",
322
+ "type": "timestamp with time zone",
323
+ "primaryKey": false,
324
+ "notNull": false
325
+ },
326
+ "revoked_at": {
327
+ "name": "revoked_at",
328
+ "type": "timestamp with time zone",
329
+ "primaryKey": false,
330
+ "notNull": false
331
+ }
332
+ },
333
+ "indexes": {
334
+ "junior_api_tokens_token_hash_uidx": {
335
+ "name": "junior_api_tokens_token_hash_uidx",
336
+ "columns": [
337
+ {
338
+ "expression": "token_hash",
339
+ "isExpression": false,
340
+ "asc": true,
341
+ "nulls": "last"
342
+ }
343
+ ],
344
+ "isUnique": true,
345
+ "concurrently": false,
346
+ "method": "btree",
347
+ "with": {}
348
+ },
349
+ "junior_api_tokens_owner_email_idx": {
350
+ "name": "junior_api_tokens_owner_email_idx",
351
+ "columns": [
352
+ {
353
+ "expression": "owner_email_normalized",
354
+ "isExpression": false,
355
+ "asc": true,
356
+ "nulls": "last"
357
+ }
358
+ ],
359
+ "isUnique": false,
360
+ "concurrently": false,
361
+ "method": "btree",
362
+ "with": {}
363
+ }
364
+ },
365
+ "foreignKeys": {},
366
+ "compositePrimaryKeys": {},
367
+ "uniqueConstraints": {},
368
+ "policies": {},
369
+ "checkConstraints": {},
370
+ "isRLSEnabled": false
371
+ },
372
+ "public.junior_conversation_annotations": {
373
+ "name": "junior_conversation_annotations",
374
+ "schema": "",
375
+ "columns": {
376
+ "conversation_id": {
377
+ "name": "conversation_id",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": true
381
+ },
382
+ "plugin": {
383
+ "name": "plugin",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true
387
+ },
388
+ "kind": {
389
+ "name": "kind",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true
393
+ },
394
+ "key": {
395
+ "name": "key",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "annotation_json": {
401
+ "name": "annotation_json",
402
+ "type": "jsonb",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ },
406
+ "created_at": {
407
+ "name": "created_at",
408
+ "type": "timestamp with time zone",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ },
412
+ "updated_at": {
413
+ "name": "updated_at",
414
+ "type": "timestamp with time zone",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ }
418
+ },
419
+ "indexes": {},
420
+ "foreignKeys": {
421
+ "junior_conversation_annotations_conversation_id_fk": {
422
+ "name": "junior_conversation_annotations_conversation_id_fk",
423
+ "tableFrom": "junior_conversation_annotations",
424
+ "tableTo": "junior_conversations",
425
+ "columnsFrom": [
426
+ "conversation_id"
427
+ ],
428
+ "columnsTo": [
429
+ "conversation_id"
430
+ ],
431
+ "onDelete": "cascade",
432
+ "onUpdate": "no action"
433
+ }
434
+ },
435
+ "compositePrimaryKeys": {
436
+ "junior_conversation_annotations_pk": {
437
+ "name": "junior_conversation_annotations_pk",
438
+ "columns": [
439
+ "conversation_id",
440
+ "plugin",
441
+ "kind",
442
+ "key"
443
+ ]
444
+ }
445
+ },
446
+ "uniqueConstraints": {},
447
+ "policies": {},
448
+ "checkConstraints": {},
449
+ "isRLSEnabled": false
450
+ },
451
+ "public.junior_conversation_bindings": {
452
+ "name": "junior_conversation_bindings",
453
+ "schema": "",
454
+ "columns": {
455
+ "conversation_id": {
456
+ "name": "conversation_id",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "provider": {
462
+ "name": "provider",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true
466
+ },
467
+ "provider_tenant_id": {
468
+ "name": "provider_tenant_id",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true,
472
+ "default": "''"
473
+ },
474
+ "provider_destination_id": {
475
+ "name": "provider_destination_id",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true
479
+ },
480
+ "provider_conversation_id": {
481
+ "name": "provider_conversation_id",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": true
485
+ },
486
+ "created_at": {
487
+ "name": "created_at",
488
+ "type": "timestamp with time zone",
489
+ "primaryKey": false,
490
+ "notNull": true
491
+ }
492
+ },
493
+ "indexes": {
494
+ "junior_conversation_bindings_conversation_idx": {
495
+ "name": "junior_conversation_bindings_conversation_idx",
496
+ "columns": [
497
+ {
498
+ "expression": "conversation_id",
499
+ "isExpression": false,
500
+ "asc": true,
501
+ "nulls": "last"
502
+ }
503
+ ],
504
+ "isUnique": false,
505
+ "concurrently": false,
506
+ "method": "btree",
507
+ "with": {}
508
+ }
509
+ },
510
+ "foreignKeys": {
511
+ "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk": {
512
+ "name": "junior_conversation_bindings_conversation_id_junior_conversations_conversation_id_fk",
513
+ "tableFrom": "junior_conversation_bindings",
514
+ "tableTo": "junior_conversations",
515
+ "columnsFrom": [
516
+ "conversation_id"
517
+ ],
518
+ "columnsTo": [
519
+ "conversation_id"
520
+ ],
521
+ "onDelete": "no action",
522
+ "onUpdate": "no action"
523
+ }
524
+ },
525
+ "compositePrimaryKeys": {
526
+ "junior_conversation_bindings_provider_conversation_pk": {
527
+ "name": "junior_conversation_bindings_provider_conversation_pk",
528
+ "columns": [
529
+ "provider",
530
+ "provider_tenant_id",
531
+ "provider_destination_id",
532
+ "provider_conversation_id"
533
+ ]
534
+ }
535
+ },
536
+ "uniqueConstraints": {},
537
+ "policies": {},
538
+ "checkConstraints": {},
539
+ "isRLSEnabled": false
540
+ },
541
+ "public.junior_conversation_events": {
542
+ "name": "junior_conversation_events",
543
+ "schema": "",
544
+ "columns": {
545
+ "conversation_id": {
546
+ "name": "conversation_id",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true
550
+ },
551
+ "seq": {
552
+ "name": "seq",
553
+ "type": "integer",
554
+ "primaryKey": false,
555
+ "notNull": true
556
+ },
557
+ "history_version": {
558
+ "name": "history_version",
559
+ "type": "integer",
560
+ "primaryKey": false,
561
+ "notNull": true
562
+ },
563
+ "schema_version": {
564
+ "name": "schema_version",
565
+ "type": "integer",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "default": 1
569
+ },
570
+ "idempotency_key": {
571
+ "name": "idempotency_key",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": false
575
+ },
576
+ "type": {
577
+ "name": "type",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": true
581
+ },
582
+ "payload": {
583
+ "name": "payload",
584
+ "type": "jsonb",
585
+ "primaryKey": false,
586
+ "notNull": true
587
+ },
588
+ "created_at": {
589
+ "name": "created_at",
590
+ "type": "timestamp with time zone",
591
+ "primaryKey": false,
592
+ "notNull": true
593
+ }
594
+ },
595
+ "indexes": {
596
+ "junior_conversation_events_history_version_idx": {
597
+ "name": "junior_conversation_events_history_version_idx",
598
+ "columns": [
599
+ {
600
+ "expression": "conversation_id",
601
+ "isExpression": false,
602
+ "asc": true,
603
+ "nulls": "last"
604
+ },
605
+ {
606
+ "expression": "history_version",
607
+ "isExpression": false,
608
+ "asc": true,
609
+ "nulls": "last"
610
+ },
611
+ {
612
+ "expression": "seq",
613
+ "isExpression": false,
614
+ "asc": true,
615
+ "nulls": "last"
616
+ }
617
+ ],
618
+ "isUnique": false,
619
+ "concurrently": false,
620
+ "method": "btree",
621
+ "with": {}
622
+ },
623
+ "junior_conversation_events_type_idx": {
624
+ "name": "junior_conversation_events_type_idx",
625
+ "columns": [
626
+ {
627
+ "expression": "conversation_id",
628
+ "isExpression": false,
629
+ "asc": true,
630
+ "nulls": "last"
631
+ },
632
+ {
633
+ "expression": "type",
634
+ "isExpression": false,
635
+ "asc": true,
636
+ "nulls": "last"
637
+ },
638
+ {
639
+ "expression": "seq",
640
+ "isExpression": false,
641
+ "asc": true,
642
+ "nulls": "last"
643
+ }
644
+ ],
645
+ "isUnique": false,
646
+ "concurrently": false,
647
+ "method": "btree",
648
+ "with": {}
649
+ },
650
+ "junior_conversation_events_message_search_idx": {
651
+ "name": "junior_conversation_events_message_search_idx",
652
+ "columns": [
653
+ {
654
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
655
+ "asc": true,
656
+ "isExpression": true,
657
+ "nulls": "last"
658
+ }
659
+ ],
660
+ "isUnique": false,
661
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
662
+ "concurrently": false,
663
+ "method": "gin",
664
+ "with": {}
665
+ },
666
+ "junior_conversation_events_idempotency_idx": {
667
+ "name": "junior_conversation_events_idempotency_idx",
668
+ "columns": [
669
+ {
670
+ "expression": "conversation_id",
671
+ "isExpression": false,
672
+ "asc": true,
673
+ "nulls": "last"
674
+ },
675
+ {
676
+ "expression": "idempotency_key",
677
+ "isExpression": false,
678
+ "asc": true,
679
+ "nulls": "last"
680
+ }
681
+ ],
682
+ "isUnique": true,
683
+ "concurrently": false,
684
+ "method": "btree",
685
+ "with": {}
686
+ }
687
+ },
688
+ "foreignKeys": {
689
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
690
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
691
+ "tableFrom": "junior_conversation_events",
692
+ "tableTo": "junior_conversations",
693
+ "columnsFrom": [
694
+ "conversation_id"
695
+ ],
696
+ "columnsTo": [
697
+ "conversation_id"
698
+ ],
699
+ "onDelete": "no action",
700
+ "onUpdate": "no action"
701
+ }
702
+ },
703
+ "compositePrimaryKeys": {
704
+ "junior_conversation_events_conversation_id_seq_pk": {
705
+ "name": "junior_conversation_events_conversation_id_seq_pk",
706
+ "columns": [
707
+ "conversation_id",
708
+ "seq"
709
+ ]
710
+ }
711
+ },
712
+ "uniqueConstraints": {},
713
+ "policies": {},
714
+ "checkConstraints": {},
715
+ "isRLSEnabled": false
716
+ },
717
+ "public.junior_conversations": {
718
+ "name": "junior_conversations",
719
+ "schema": "",
720
+ "columns": {
721
+ "conversation_id": {
722
+ "name": "conversation_id",
723
+ "type": "text",
724
+ "primaryKey": true,
725
+ "notNull": true
726
+ },
727
+ "schema_version": {
728
+ "name": "schema_version",
729
+ "type": "integer",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "default": 1
733
+ },
734
+ "source": {
735
+ "name": "source",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": false
739
+ },
740
+ "source_json": {
741
+ "name": "source_json",
742
+ "type": "jsonb",
743
+ "primaryKey": false,
744
+ "notNull": false
745
+ },
746
+ "origin_type": {
747
+ "name": "origin_type",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": false
751
+ },
752
+ "origin_id": {
753
+ "name": "origin_id",
754
+ "type": "text",
755
+ "primaryKey": false,
756
+ "notNull": false
757
+ },
758
+ "origin_run_id": {
759
+ "name": "origin_run_id",
760
+ "type": "text",
761
+ "primaryKey": false,
762
+ "notNull": false
763
+ },
764
+ "destination_id": {
765
+ "name": "destination_id",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": false
769
+ },
770
+ "destination_json": {
771
+ "name": "destination_json",
772
+ "type": "jsonb",
773
+ "primaryKey": false,
774
+ "notNull": false
775
+ },
776
+ "actor_identity_id": {
777
+ "name": "actor_identity_id",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": false
781
+ },
782
+ "creator_identity_id": {
783
+ "name": "creator_identity_id",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": false
787
+ },
788
+ "credential_subject_identity_id": {
789
+ "name": "credential_subject_identity_id",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": false
793
+ },
794
+ "actor_json": {
795
+ "name": "actor_json",
796
+ "type": "jsonb",
797
+ "primaryKey": false,
798
+ "notNull": false
799
+ },
800
+ "channel_name": {
801
+ "name": "channel_name",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": false
805
+ },
806
+ "title": {
807
+ "name": "title",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": false
811
+ },
812
+ "created_at": {
813
+ "name": "created_at",
814
+ "type": "timestamp with time zone",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "last_activity_at": {
819
+ "name": "last_activity_at",
820
+ "type": "timestamp with time zone",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "updated_at": {
825
+ "name": "updated_at",
826
+ "type": "timestamp with time zone",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ },
830
+ "execution_updated_at": {
831
+ "name": "execution_updated_at",
832
+ "type": "timestamp with time zone",
833
+ "primaryKey": false,
834
+ "notNull": false
835
+ },
836
+ "execution_status": {
837
+ "name": "execution_status",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": true
841
+ },
842
+ "run_id": {
843
+ "name": "run_id",
844
+ "type": "text",
845
+ "primaryKey": false,
846
+ "notNull": false
847
+ },
848
+ "last_checkpoint_at": {
849
+ "name": "last_checkpoint_at",
850
+ "type": "timestamp with time zone",
851
+ "primaryKey": false,
852
+ "notNull": false
853
+ },
854
+ "last_enqueued_at": {
855
+ "name": "last_enqueued_at",
856
+ "type": "timestamp with time zone",
857
+ "primaryKey": false,
858
+ "notNull": false
859
+ },
860
+ "parent_conversation_id": {
861
+ "name": "parent_conversation_id",
862
+ "type": "text",
863
+ "primaryKey": false,
864
+ "notNull": false
865
+ },
866
+ "root_conversation_id": {
867
+ "name": "root_conversation_id",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": false
871
+ },
872
+ "transcript_purged_at": {
873
+ "name": "transcript_purged_at",
874
+ "type": "timestamp with time zone",
875
+ "primaryKey": false,
876
+ "notNull": false
877
+ },
878
+ "duration_ms": {
879
+ "name": "duration_ms",
880
+ "type": "integer",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "default": 0
884
+ },
885
+ "usage_json": {
886
+ "name": "usage_json",
887
+ "type": "jsonb",
888
+ "primaryKey": false,
889
+ "notNull": false
890
+ },
891
+ "execution_duration_ms": {
892
+ "name": "execution_duration_ms",
893
+ "type": "integer",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "default": 0
897
+ },
898
+ "execution_usage_json": {
899
+ "name": "execution_usage_json",
900
+ "type": "jsonb",
901
+ "primaryKey": false,
902
+ "notNull": false
903
+ },
904
+ "metric_run_id": {
905
+ "name": "metric_run_id",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": false
909
+ },
910
+ "archived_at": {
911
+ "name": "archived_at",
912
+ "type": "timestamp with time zone",
913
+ "primaryKey": false,
914
+ "notNull": false
915
+ }
916
+ },
917
+ "indexes": {
918
+ "junior_conversations_last_activity_idx": {
919
+ "name": "junior_conversations_last_activity_idx",
920
+ "columns": [
921
+ {
922
+ "expression": "last_activity_at",
923
+ "isExpression": false,
924
+ "asc": false,
925
+ "nulls": "last"
926
+ },
927
+ {
928
+ "expression": "conversation_id",
929
+ "isExpression": false,
930
+ "asc": true,
931
+ "nulls": "last"
932
+ }
933
+ ],
934
+ "isUnique": false,
935
+ "concurrently": false,
936
+ "method": "btree",
937
+ "with": {}
938
+ },
939
+ "junior_conversations_active_idx": {
940
+ "name": "junior_conversations_active_idx",
941
+ "columns": [
942
+ {
943
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
944
+ "asc": true,
945
+ "isExpression": true,
946
+ "nulls": "last"
947
+ },
948
+ {
949
+ "expression": "conversation_id",
950
+ "isExpression": false,
951
+ "asc": true,
952
+ "nulls": "last"
953
+ }
954
+ ],
955
+ "isUnique": false,
956
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
957
+ "concurrently": false,
958
+ "method": "btree",
959
+ "with": {}
960
+ },
961
+ "junior_conversations_destination_activity_idx": {
962
+ "name": "junior_conversations_destination_activity_idx",
963
+ "columns": [
964
+ {
965
+ "expression": "destination_id",
966
+ "isExpression": false,
967
+ "asc": true,
968
+ "nulls": "last"
969
+ },
970
+ {
971
+ "expression": "last_activity_at",
972
+ "isExpression": false,
973
+ "asc": false,
974
+ "nulls": "last"
975
+ }
976
+ ],
977
+ "isUnique": false,
978
+ "concurrently": false,
979
+ "method": "btree",
980
+ "with": {}
981
+ },
982
+ "junior_conversations_actor_activity_idx": {
983
+ "name": "junior_conversations_actor_activity_idx",
984
+ "columns": [
985
+ {
986
+ "expression": "actor_identity_id",
987
+ "isExpression": false,
988
+ "asc": true,
989
+ "nulls": "last"
990
+ },
991
+ {
992
+ "expression": "last_activity_at",
993
+ "isExpression": false,
994
+ "asc": false,
995
+ "nulls": "last"
996
+ }
997
+ ],
998
+ "isUnique": false,
999
+ "concurrently": false,
1000
+ "method": "btree",
1001
+ "with": {}
1002
+ },
1003
+ "junior_conversations_origin_idx": {
1004
+ "name": "junior_conversations_origin_idx",
1005
+ "columns": [
1006
+ {
1007
+ "expression": "origin_type",
1008
+ "isExpression": false,
1009
+ "asc": true,
1010
+ "nulls": "last"
1011
+ },
1012
+ {
1013
+ "expression": "origin_id",
1014
+ "isExpression": false,
1015
+ "asc": true,
1016
+ "nulls": "last"
1017
+ },
1018
+ {
1019
+ "expression": "last_activity_at",
1020
+ "isExpression": false,
1021
+ "asc": false,
1022
+ "nulls": "last"
1023
+ }
1024
+ ],
1025
+ "isUnique": false,
1026
+ "concurrently": false,
1027
+ "method": "btree",
1028
+ "with": {}
1029
+ },
1030
+ "junior_conversations_parent_idx": {
1031
+ "name": "junior_conversations_parent_idx",
1032
+ "columns": [
1033
+ {
1034
+ "expression": "parent_conversation_id",
1035
+ "isExpression": false,
1036
+ "asc": true,
1037
+ "nulls": "last"
1038
+ }
1039
+ ],
1040
+ "isUnique": false,
1041
+ "concurrently": false,
1042
+ "method": "btree",
1043
+ "with": {}
1044
+ },
1045
+ "junior_conversations_root_idx": {
1046
+ "name": "junior_conversations_root_idx",
1047
+ "columns": [
1048
+ {
1049
+ "expression": "root_conversation_id",
1050
+ "isExpression": false,
1051
+ "asc": true,
1052
+ "nulls": "last"
1053
+ }
1054
+ ],
1055
+ "isUnique": false,
1056
+ "concurrently": false,
1057
+ "method": "btree",
1058
+ "with": {}
1059
+ }
1060
+ },
1061
+ "foreignKeys": {
1062
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
1063
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
1064
+ "tableFrom": "junior_conversations",
1065
+ "tableTo": "junior_destinations",
1066
+ "columnsFrom": [
1067
+ "destination_id"
1068
+ ],
1069
+ "columnsTo": [
1070
+ "id"
1071
+ ],
1072
+ "onDelete": "no action",
1073
+ "onUpdate": "no action"
1074
+ },
1075
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
1076
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
1077
+ "tableFrom": "junior_conversations",
1078
+ "tableTo": "junior_identities",
1079
+ "columnsFrom": [
1080
+ "actor_identity_id"
1081
+ ],
1082
+ "columnsTo": [
1083
+ "id"
1084
+ ],
1085
+ "onDelete": "no action",
1086
+ "onUpdate": "no action"
1087
+ },
1088
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
1089
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
1090
+ "tableFrom": "junior_conversations",
1091
+ "tableTo": "junior_identities",
1092
+ "columnsFrom": [
1093
+ "creator_identity_id"
1094
+ ],
1095
+ "columnsTo": [
1096
+ "id"
1097
+ ],
1098
+ "onDelete": "no action",
1099
+ "onUpdate": "no action"
1100
+ },
1101
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
1102
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
1103
+ "tableFrom": "junior_conversations",
1104
+ "tableTo": "junior_identities",
1105
+ "columnsFrom": [
1106
+ "credential_subject_identity_id"
1107
+ ],
1108
+ "columnsTo": [
1109
+ "id"
1110
+ ],
1111
+ "onDelete": "no action",
1112
+ "onUpdate": "no action"
1113
+ },
1114
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
1115
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
1116
+ "tableFrom": "junior_conversations",
1117
+ "tableTo": "junior_conversations",
1118
+ "columnsFrom": [
1119
+ "parent_conversation_id"
1120
+ ],
1121
+ "columnsTo": [
1122
+ "conversation_id"
1123
+ ],
1124
+ "onDelete": "no action",
1125
+ "onUpdate": "no action"
1126
+ },
1127
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
1128
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
1129
+ "tableFrom": "junior_conversations",
1130
+ "tableTo": "junior_conversations",
1131
+ "columnsFrom": [
1132
+ "root_conversation_id"
1133
+ ],
1134
+ "columnsTo": [
1135
+ "conversation_id"
1136
+ ],
1137
+ "onDelete": "no action",
1138
+ "onUpdate": "no action"
1139
+ }
1140
+ },
1141
+ "compositePrimaryKeys": {},
1142
+ "uniqueConstraints": {},
1143
+ "policies": {},
1144
+ "checkConstraints": {},
1145
+ "isRLSEnabled": false
1146
+ },
1147
+ "public.junior_destinations": {
1148
+ "name": "junior_destinations",
1149
+ "schema": "",
1150
+ "columns": {
1151
+ "id": {
1152
+ "name": "id",
1153
+ "type": "text",
1154
+ "primaryKey": true,
1155
+ "notNull": true
1156
+ },
1157
+ "provider": {
1158
+ "name": "provider",
1159
+ "type": "text",
1160
+ "primaryKey": false,
1161
+ "notNull": true
1162
+ },
1163
+ "provider_tenant_id": {
1164
+ "name": "provider_tenant_id",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": true,
1168
+ "default": "''"
1169
+ },
1170
+ "provider_destination_id": {
1171
+ "name": "provider_destination_id",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true
1175
+ },
1176
+ "kind": {
1177
+ "name": "kind",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true
1181
+ },
1182
+ "parent_destination_id": {
1183
+ "name": "parent_destination_id",
1184
+ "type": "text",
1185
+ "primaryKey": false,
1186
+ "notNull": false
1187
+ },
1188
+ "display_name": {
1189
+ "name": "display_name",
1190
+ "type": "text",
1191
+ "primaryKey": false,
1192
+ "notNull": false
1193
+ },
1194
+ "visibility": {
1195
+ "name": "visibility",
1196
+ "type": "text",
1197
+ "primaryKey": false,
1198
+ "notNull": true,
1199
+ "default": "'unknown'"
1200
+ },
1201
+ "metadata_json": {
1202
+ "name": "metadata_json",
1203
+ "type": "jsonb",
1204
+ "primaryKey": false,
1205
+ "notNull": false
1206
+ },
1207
+ "created_at": {
1208
+ "name": "created_at",
1209
+ "type": "timestamp with time zone",
1210
+ "primaryKey": false,
1211
+ "notNull": true
1212
+ },
1213
+ "updated_at": {
1214
+ "name": "updated_at",
1215
+ "type": "timestamp with time zone",
1216
+ "primaryKey": false,
1217
+ "notNull": true
1218
+ }
1219
+ },
1220
+ "indexes": {
1221
+ "junior_destinations_provider_destination_uidx": {
1222
+ "name": "junior_destinations_provider_destination_uidx",
1223
+ "columns": [
1224
+ {
1225
+ "expression": "provider",
1226
+ "isExpression": false,
1227
+ "asc": true,
1228
+ "nulls": "last"
1229
+ },
1230
+ {
1231
+ "expression": "provider_tenant_id",
1232
+ "isExpression": false,
1233
+ "asc": true,
1234
+ "nulls": "last"
1235
+ },
1236
+ {
1237
+ "expression": "provider_destination_id",
1238
+ "isExpression": false,
1239
+ "asc": true,
1240
+ "nulls": "last"
1241
+ }
1242
+ ],
1243
+ "isUnique": true,
1244
+ "concurrently": false,
1245
+ "method": "btree",
1246
+ "with": {}
1247
+ },
1248
+ "junior_destinations_provider_kind_idx": {
1249
+ "name": "junior_destinations_provider_kind_idx",
1250
+ "columns": [
1251
+ {
1252
+ "expression": "provider",
1253
+ "isExpression": false,
1254
+ "asc": true,
1255
+ "nulls": "last"
1256
+ },
1257
+ {
1258
+ "expression": "kind",
1259
+ "isExpression": false,
1260
+ "asc": true,
1261
+ "nulls": "last"
1262
+ }
1263
+ ],
1264
+ "isUnique": false,
1265
+ "concurrently": false,
1266
+ "method": "btree",
1267
+ "with": {}
1268
+ }
1269
+ },
1270
+ "foreignKeys": {},
1271
+ "compositePrimaryKeys": {},
1272
+ "uniqueConstraints": {},
1273
+ "policies": {},
1274
+ "checkConstraints": {},
1275
+ "isRLSEnabled": false
1276
+ },
1277
+ "public.junior_event_tasks": {
1278
+ "name": "junior_event_tasks",
1279
+ "schema": "",
1280
+ "columns": {
1281
+ "id": {
1282
+ "name": "id",
1283
+ "type": "text",
1284
+ "primaryKey": true,
1285
+ "notNull": true
1286
+ },
1287
+ "team_id": {
1288
+ "name": "team_id",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true
1292
+ },
1293
+ "namespace": {
1294
+ "name": "namespace",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ },
1299
+ "identifier": {
1300
+ "name": "identifier",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": true
1304
+ },
1305
+ "created_at_ms": {
1306
+ "name": "created_at_ms",
1307
+ "type": "bigint",
1308
+ "primaryKey": false,
1309
+ "notNull": true
1310
+ },
1311
+ "title": {
1312
+ "name": "title",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": false
1316
+ },
1317
+ "task_json": {
1318
+ "name": "task_json",
1319
+ "type": "jsonb",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ }
1323
+ },
1324
+ "indexes": {
1325
+ "junior_event_tasks_team_idx": {
1326
+ "name": "junior_event_tasks_team_idx",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "team_id",
1330
+ "isExpression": false,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ },
1334
+ {
1335
+ "expression": "created_at_ms",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ },
1340
+ {
1341
+ "expression": "id",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ }
1346
+ ],
1347
+ "isUnique": false,
1348
+ "concurrently": false,
1349
+ "method": "btree",
1350
+ "with": {}
1351
+ },
1352
+ "junior_event_tasks_match_idx": {
1353
+ "name": "junior_event_tasks_match_idx",
1354
+ "columns": [
1355
+ {
1356
+ "expression": "namespace",
1357
+ "isExpression": false,
1358
+ "asc": true,
1359
+ "nulls": "last"
1360
+ },
1361
+ {
1362
+ "expression": "identifier",
1363
+ "isExpression": false,
1364
+ "asc": true,
1365
+ "nulls": "last"
1366
+ },
1367
+ {
1368
+ "expression": "created_at_ms",
1369
+ "isExpression": false,
1370
+ "asc": true,
1371
+ "nulls": "last"
1372
+ },
1373
+ {
1374
+ "expression": "id",
1375
+ "isExpression": false,
1376
+ "asc": true,
1377
+ "nulls": "last"
1378
+ }
1379
+ ],
1380
+ "isUnique": false,
1381
+ "concurrently": false,
1382
+ "method": "btree",
1383
+ "with": {}
1384
+ }
1385
+ },
1386
+ "foreignKeys": {},
1387
+ "compositePrimaryKeys": {},
1388
+ "uniqueConstraints": {},
1389
+ "policies": {},
1390
+ "checkConstraints": {},
1391
+ "isRLSEnabled": false
1392
+ },
1393
+ "public.junior_identities": {
1394
+ "name": "junior_identities",
1395
+ "schema": "",
1396
+ "columns": {
1397
+ "id": {
1398
+ "name": "id",
1399
+ "type": "text",
1400
+ "primaryKey": true,
1401
+ "notNull": true
1402
+ },
1403
+ "kind": {
1404
+ "name": "kind",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true
1408
+ },
1409
+ "provider": {
1410
+ "name": "provider",
1411
+ "type": "text",
1412
+ "primaryKey": false,
1413
+ "notNull": true
1414
+ },
1415
+ "provider_tenant_id": {
1416
+ "name": "provider_tenant_id",
1417
+ "type": "text",
1418
+ "primaryKey": false,
1419
+ "notNull": true,
1420
+ "default": "''"
1421
+ },
1422
+ "provider_subject_id": {
1423
+ "name": "provider_subject_id",
1424
+ "type": "text",
1425
+ "primaryKey": false,
1426
+ "notNull": true
1427
+ },
1428
+ "display_name": {
1429
+ "name": "display_name",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": false
1433
+ },
1434
+ "handle": {
1435
+ "name": "handle",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": false
1439
+ },
1440
+ "email": {
1441
+ "name": "email",
1442
+ "type": "text",
1443
+ "primaryKey": false,
1444
+ "notNull": false
1445
+ },
1446
+ "avatar_url": {
1447
+ "name": "avatar_url",
1448
+ "type": "text",
1449
+ "primaryKey": false,
1450
+ "notNull": false
1451
+ },
1452
+ "metadata_json": {
1453
+ "name": "metadata_json",
1454
+ "type": "jsonb",
1455
+ "primaryKey": false,
1456
+ "notNull": false
1457
+ },
1458
+ "created_at": {
1459
+ "name": "created_at",
1460
+ "type": "timestamp with time zone",
1461
+ "primaryKey": false,
1462
+ "notNull": true
1463
+ },
1464
+ "updated_at": {
1465
+ "name": "updated_at",
1466
+ "type": "timestamp with time zone",
1467
+ "primaryKey": false,
1468
+ "notNull": true
1469
+ },
1470
+ "user_id": {
1471
+ "name": "user_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": false
1475
+ },
1476
+ "email_normalized": {
1477
+ "name": "email_normalized",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": false
1481
+ },
1482
+ "email_verified": {
1483
+ "name": "email_verified",
1484
+ "type": "boolean",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "default": false
1488
+ }
1489
+ },
1490
+ "indexes": {
1491
+ "junior_identities_provider_subject_uidx": {
1492
+ "name": "junior_identities_provider_subject_uidx",
1493
+ "columns": [
1494
+ {
1495
+ "expression": "provider",
1496
+ "isExpression": false,
1497
+ "asc": true,
1498
+ "nulls": "last"
1499
+ },
1500
+ {
1501
+ "expression": "provider_tenant_id",
1502
+ "isExpression": false,
1503
+ "asc": true,
1504
+ "nulls": "last"
1505
+ },
1506
+ {
1507
+ "expression": "provider_subject_id",
1508
+ "isExpression": false,
1509
+ "asc": true,
1510
+ "nulls": "last"
1511
+ }
1512
+ ],
1513
+ "isUnique": true,
1514
+ "concurrently": false,
1515
+ "method": "btree",
1516
+ "with": {}
1517
+ },
1518
+ "junior_identities_user_idx": {
1519
+ "name": "junior_identities_user_idx",
1520
+ "columns": [
1521
+ {
1522
+ "expression": "user_id",
1523
+ "isExpression": false,
1524
+ "asc": true,
1525
+ "nulls": "last"
1526
+ }
1527
+ ],
1528
+ "isUnique": false,
1529
+ "concurrently": false,
1530
+ "method": "btree",
1531
+ "with": {}
1532
+ },
1533
+ "junior_identities_verified_email_idx": {
1534
+ "name": "junior_identities_verified_email_idx",
1535
+ "columns": [
1536
+ {
1537
+ "expression": "email_normalized",
1538
+ "isExpression": false,
1539
+ "asc": true,
1540
+ "nulls": "last"
1541
+ }
1542
+ ],
1543
+ "isUnique": false,
1544
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1545
+ "concurrently": false,
1546
+ "method": "btree",
1547
+ "with": {}
1548
+ },
1549
+ "junior_identities_kind_provider_idx": {
1550
+ "name": "junior_identities_kind_provider_idx",
1551
+ "columns": [
1552
+ {
1553
+ "expression": "kind",
1554
+ "isExpression": false,
1555
+ "asc": true,
1556
+ "nulls": "last"
1557
+ },
1558
+ {
1559
+ "expression": "provider",
1560
+ "isExpression": false,
1561
+ "asc": true,
1562
+ "nulls": "last"
1563
+ }
1564
+ ],
1565
+ "isUnique": false,
1566
+ "concurrently": false,
1567
+ "method": "btree",
1568
+ "with": {}
1569
+ }
1570
+ },
1571
+ "foreignKeys": {
1572
+ "junior_identities_user_id_junior_users_id_fk": {
1573
+ "name": "junior_identities_user_id_junior_users_id_fk",
1574
+ "tableFrom": "junior_identities",
1575
+ "tableTo": "junior_users",
1576
+ "columnsFrom": [
1577
+ "user_id"
1578
+ ],
1579
+ "columnsTo": [
1580
+ "id"
1581
+ ],
1582
+ "onDelete": "no action",
1583
+ "onUpdate": "no action"
1584
+ }
1585
+ },
1586
+ "compositePrimaryKeys": {},
1587
+ "uniqueConstraints": {},
1588
+ "policies": {},
1589
+ "checkConstraints": {},
1590
+ "isRLSEnabled": false
1591
+ },
1592
+ "public.junior_location_configurations": {
1593
+ "name": "junior_location_configurations",
1594
+ "schema": "",
1595
+ "columns": {
1596
+ "location_id": {
1597
+ "name": "location_id",
1598
+ "type": "text",
1599
+ "primaryKey": false,
1600
+ "notNull": true
1601
+ },
1602
+ "key": {
1603
+ "name": "key",
1604
+ "type": "text",
1605
+ "primaryKey": false,
1606
+ "notNull": true
1607
+ },
1608
+ "value": {
1609
+ "name": "value",
1610
+ "type": "text",
1611
+ "primaryKey": false,
1612
+ "notNull": true
1613
+ },
1614
+ "updated_at": {
1615
+ "name": "updated_at",
1616
+ "type": "timestamp with time zone",
1617
+ "primaryKey": false,
1618
+ "notNull": true
1619
+ },
1620
+ "updated_by": {
1621
+ "name": "updated_by",
1622
+ "type": "text",
1623
+ "primaryKey": false,
1624
+ "notNull": false
1625
+ },
1626
+ "source": {
1627
+ "name": "source",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": false
1631
+ },
1632
+ "expires_at": {
1633
+ "name": "expires_at",
1634
+ "type": "text",
1635
+ "primaryKey": false,
1636
+ "notNull": false
1637
+ }
1638
+ },
1639
+ "indexes": {},
1640
+ "foreignKeys": {
1641
+ "junior_location_configurations_location_id_junior_destinations_id_fk": {
1642
+ "name": "junior_location_configurations_location_id_junior_destinations_id_fk",
1643
+ "tableFrom": "junior_location_configurations",
1644
+ "tableTo": "junior_destinations",
1645
+ "columnsFrom": [
1646
+ "location_id"
1647
+ ],
1648
+ "columnsTo": [
1649
+ "id"
1650
+ ],
1651
+ "onDelete": "cascade",
1652
+ "onUpdate": "no action"
1653
+ }
1654
+ },
1655
+ "compositePrimaryKeys": {
1656
+ "junior_location_configurations_location_id_key_pk": {
1657
+ "name": "junior_location_configurations_location_id_key_pk",
1658
+ "columns": [
1659
+ "location_id",
1660
+ "key"
1661
+ ]
1662
+ }
1663
+ },
1664
+ "uniqueConstraints": {},
1665
+ "policies": {},
1666
+ "checkConstraints": {},
1667
+ "isRLSEnabled": false
1668
+ },
1669
+ "public.junior_scheduler_runs": {
1670
+ "name": "junior_scheduler_runs",
1671
+ "schema": "",
1672
+ "columns": {
1673
+ "id": {
1674
+ "name": "id",
1675
+ "type": "text",
1676
+ "primaryKey": true,
1677
+ "notNull": true
1678
+ },
1679
+ "task_id": {
1680
+ "name": "task_id",
1681
+ "type": "text",
1682
+ "primaryKey": false,
1683
+ "notNull": true
1684
+ },
1685
+ "status": {
1686
+ "name": "status",
1687
+ "type": "text",
1688
+ "primaryKey": false,
1689
+ "notNull": true
1690
+ },
1691
+ "scheduled_for_ms": {
1692
+ "name": "scheduled_for_ms",
1693
+ "type": "bigint",
1694
+ "primaryKey": false,
1695
+ "notNull": true
1696
+ },
1697
+ "record": {
1698
+ "name": "record",
1699
+ "type": "jsonb",
1700
+ "primaryKey": false,
1701
+ "notNull": true
1702
+ }
1703
+ },
1704
+ "indexes": {
1705
+ "junior_scheduler_runs_task_status_idx": {
1706
+ "name": "junior_scheduler_runs_task_status_idx",
1707
+ "columns": [
1708
+ {
1709
+ "expression": "task_id",
1710
+ "isExpression": false,
1711
+ "asc": true,
1712
+ "nulls": "last"
1713
+ },
1714
+ {
1715
+ "expression": "status",
1716
+ "isExpression": false,
1717
+ "asc": true,
1718
+ "nulls": "last"
1719
+ },
1720
+ {
1721
+ "expression": "scheduled_for_ms",
1722
+ "isExpression": false,
1723
+ "asc": true,
1724
+ "nulls": "last"
1725
+ }
1726
+ ],
1727
+ "isUnique": false,
1728
+ "concurrently": false,
1729
+ "method": "btree",
1730
+ "with": {}
1731
+ },
1732
+ "junior_scheduler_runs_status_idx": {
1733
+ "name": "junior_scheduler_runs_status_idx",
1734
+ "columns": [
1735
+ {
1736
+ "expression": "status",
1737
+ "isExpression": false,
1738
+ "asc": true,
1739
+ "nulls": "last"
1740
+ },
1741
+ {
1742
+ "expression": "scheduled_for_ms",
1743
+ "isExpression": false,
1744
+ "asc": true,
1745
+ "nulls": "last"
1746
+ }
1747
+ ],
1748
+ "isUnique": false,
1749
+ "concurrently": false,
1750
+ "method": "btree",
1751
+ "with": {}
1752
+ }
1753
+ },
1754
+ "foreignKeys": {},
1755
+ "compositePrimaryKeys": {},
1756
+ "uniqueConstraints": {},
1757
+ "policies": {},
1758
+ "checkConstraints": {},
1759
+ "isRLSEnabled": false
1760
+ },
1761
+ "public.junior_scheduler_tasks": {
1762
+ "name": "junior_scheduler_tasks",
1763
+ "schema": "",
1764
+ "columns": {
1765
+ "id": {
1766
+ "name": "id",
1767
+ "type": "text",
1768
+ "primaryKey": true,
1769
+ "notNull": true
1770
+ },
1771
+ "team_id": {
1772
+ "name": "team_id",
1773
+ "type": "text",
1774
+ "primaryKey": false,
1775
+ "notNull": true
1776
+ },
1777
+ "creator_slack_user_id": {
1778
+ "name": "creator_slack_user_id",
1779
+ "type": "text",
1780
+ "primaryKey": false,
1781
+ "notNull": false
1782
+ },
1783
+ "creator_identity_id": {
1784
+ "name": "creator_identity_id",
1785
+ "type": "text",
1786
+ "primaryKey": false,
1787
+ "notNull": false
1788
+ },
1789
+ "status": {
1790
+ "name": "status",
1791
+ "type": "text",
1792
+ "primaryKey": false,
1793
+ "notNull": true
1794
+ },
1795
+ "next_run_at_ms": {
1796
+ "name": "next_run_at_ms",
1797
+ "type": "bigint",
1798
+ "primaryKey": false,
1799
+ "notNull": false
1800
+ },
1801
+ "run_now_at_ms": {
1802
+ "name": "run_now_at_ms",
1803
+ "type": "bigint",
1804
+ "primaryKey": false,
1805
+ "notNull": false
1806
+ },
1807
+ "created_at_ms": {
1808
+ "name": "created_at_ms",
1809
+ "type": "bigint",
1810
+ "primaryKey": false,
1811
+ "notNull": true
1812
+ },
1813
+ "title": {
1814
+ "name": "title",
1815
+ "type": "text",
1816
+ "primaryKey": false,
1817
+ "notNull": false
1818
+ },
1819
+ "record": {
1820
+ "name": "record",
1821
+ "type": "jsonb",
1822
+ "primaryKey": false,
1823
+ "notNull": true
1824
+ }
1825
+ },
1826
+ "indexes": {
1827
+ "junior_scheduler_tasks_creator_idx": {
1828
+ "name": "junior_scheduler_tasks_creator_idx",
1829
+ "columns": [
1830
+ {
1831
+ "expression": "team_id",
1832
+ "isExpression": false,
1833
+ "asc": true,
1834
+ "nulls": "last"
1835
+ },
1836
+ {
1837
+ "expression": "creator_slack_user_id",
1838
+ "isExpression": false,
1839
+ "asc": true,
1840
+ "nulls": "last"
1841
+ },
1842
+ {
1843
+ "expression": "created_at_ms",
1844
+ "isExpression": false,
1845
+ "asc": true,
1846
+ "nulls": "last"
1847
+ },
1848
+ {
1849
+ "expression": "id",
1850
+ "isExpression": false,
1851
+ "asc": true,
1852
+ "nulls": "last"
1853
+ }
1854
+ ],
1855
+ "isUnique": false,
1856
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
1857
+ "concurrently": false,
1858
+ "method": "btree",
1859
+ "with": {}
1860
+ },
1861
+ "junior_scheduler_tasks_creator_identity_idx": {
1862
+ "name": "junior_scheduler_tasks_creator_identity_idx",
1863
+ "columns": [
1864
+ {
1865
+ "expression": "creator_identity_id",
1866
+ "isExpression": false,
1867
+ "asc": true,
1868
+ "nulls": "last"
1869
+ },
1870
+ {
1871
+ "expression": "created_at_ms",
1872
+ "isExpression": false,
1873
+ "asc": true,
1874
+ "nulls": "last"
1875
+ },
1876
+ {
1877
+ "expression": "id",
1878
+ "isExpression": false,
1879
+ "asc": true,
1880
+ "nulls": "last"
1881
+ }
1882
+ ],
1883
+ "isUnique": false,
1884
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted' AND \"junior_scheduler_tasks\".\"creator_identity_id\" IS NOT NULL",
1885
+ "concurrently": false,
1886
+ "method": "btree",
1887
+ "with": {}
1888
+ },
1889
+ "junior_scheduler_tasks_team_status_idx": {
1890
+ "name": "junior_scheduler_tasks_team_status_idx",
1891
+ "columns": [
1892
+ {
1893
+ "expression": "team_id",
1894
+ "isExpression": false,
1895
+ "asc": true,
1896
+ "nulls": "last"
1897
+ },
1898
+ {
1899
+ "expression": "created_at_ms",
1900
+ "isExpression": false,
1901
+ "asc": true,
1902
+ "nulls": "last"
1903
+ },
1904
+ {
1905
+ "expression": "id",
1906
+ "isExpression": false,
1907
+ "asc": true,
1908
+ "nulls": "last"
1909
+ }
1910
+ ],
1911
+ "isUnique": false,
1912
+ "where": "\"junior_scheduler_tasks\".\"status\" <> 'deleted'",
1913
+ "concurrently": false,
1914
+ "method": "btree",
1915
+ "with": {}
1916
+ },
1917
+ "junior_scheduler_tasks_run_now_due_idx": {
1918
+ "name": "junior_scheduler_tasks_run_now_due_idx",
1919
+ "columns": [
1920
+ {
1921
+ "expression": "run_now_at_ms",
1922
+ "isExpression": false,
1923
+ "asc": true,
1924
+ "nulls": "last"
1925
+ },
1926
+ {
1927
+ "expression": "created_at_ms",
1928
+ "isExpression": false,
1929
+ "asc": true,
1930
+ "nulls": "last"
1931
+ },
1932
+ {
1933
+ "expression": "id",
1934
+ "isExpression": false,
1935
+ "asc": true,
1936
+ "nulls": "last"
1937
+ }
1938
+ ],
1939
+ "isUnique": false,
1940
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"run_now_at_ms\" IS NOT NULL",
1941
+ "concurrently": false,
1942
+ "method": "btree",
1943
+ "with": {}
1944
+ },
1945
+ "junior_scheduler_tasks_next_run_due_idx": {
1946
+ "name": "junior_scheduler_tasks_next_run_due_idx",
1947
+ "columns": [
1948
+ {
1949
+ "expression": "next_run_at_ms",
1950
+ "isExpression": false,
1951
+ "asc": true,
1952
+ "nulls": "last"
1953
+ },
1954
+ {
1955
+ "expression": "created_at_ms",
1956
+ "isExpression": false,
1957
+ "asc": true,
1958
+ "nulls": "last"
1959
+ },
1960
+ {
1961
+ "expression": "id",
1962
+ "isExpression": false,
1963
+ "asc": true,
1964
+ "nulls": "last"
1965
+ }
1966
+ ],
1967
+ "isUnique": false,
1968
+ "where": "\"junior_scheduler_tasks\".\"status\" = 'active' AND \"junior_scheduler_tasks\".\"next_run_at_ms\" IS NOT NULL",
1969
+ "concurrently": false,
1970
+ "method": "btree",
1971
+ "with": {}
1972
+ }
1973
+ },
1974
+ "foreignKeys": {},
1975
+ "compositePrimaryKeys": {},
1976
+ "uniqueConstraints": {},
1977
+ "policies": {},
1978
+ "checkConstraints": {},
1979
+ "isRLSEnabled": false
1980
+ },
1981
+ "public.junior_stats": {
1982
+ "name": "junior_stats",
1983
+ "schema": "",
1984
+ "columns": {
1985
+ "date": {
1986
+ "name": "date",
1987
+ "type": "date",
1988
+ "primaryKey": false,
1989
+ "notNull": true
1990
+ },
1991
+ "namespace": {
1992
+ "name": "namespace",
1993
+ "type": "text",
1994
+ "primaryKey": false,
1995
+ "notNull": true
1996
+ },
1997
+ "metric": {
1998
+ "name": "metric",
1999
+ "type": "text",
2000
+ "primaryKey": false,
2001
+ "notNull": true
2002
+ },
2003
+ "name": {
2004
+ "name": "name",
2005
+ "type": "text",
2006
+ "primaryKey": false,
2007
+ "notNull": true
2008
+ },
2009
+ "count": {
2010
+ "name": "count",
2011
+ "type": "integer",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "default": 0
2015
+ }
2016
+ },
2017
+ "indexes": {},
2018
+ "foreignKeys": {},
2019
+ "compositePrimaryKeys": {
2020
+ "junior_stats_date_namespace_metric_name_pk": {
2021
+ "name": "junior_stats_date_namespace_metric_name_pk",
2022
+ "columns": [
2023
+ "date",
2024
+ "namespace",
2025
+ "metric",
2026
+ "name"
2027
+ ]
2028
+ }
2029
+ },
2030
+ "uniqueConstraints": {},
2031
+ "policies": {},
2032
+ "checkConstraints": {},
2033
+ "isRLSEnabled": false
2034
+ },
2035
+ "public.junior_task_executions": {
2036
+ "name": "junior_task_executions",
2037
+ "schema": "",
2038
+ "columns": {
2039
+ "execution_id": {
2040
+ "name": "execution_id",
2041
+ "type": "text",
2042
+ "primaryKey": false,
2043
+ "notNull": true
2044
+ },
2045
+ "kind": {
2046
+ "name": "kind",
2047
+ "type": "text",
2048
+ "primaryKey": false,
2049
+ "notNull": true
2050
+ },
2051
+ "namespace": {
2052
+ "name": "namespace",
2053
+ "type": "text",
2054
+ "primaryKey": false,
2055
+ "notNull": true
2056
+ },
2057
+ "task_id": {
2058
+ "name": "task_id",
2059
+ "type": "text",
2060
+ "primaryKey": false,
2061
+ "notNull": true
2062
+ },
2063
+ "conversation_id": {
2064
+ "name": "conversation_id",
2065
+ "type": "text",
2066
+ "primaryKey": false,
2067
+ "notNull": false
2068
+ },
2069
+ "executed_at_ms": {
2070
+ "name": "executed_at_ms",
2071
+ "type": "bigint",
2072
+ "primaryKey": false,
2073
+ "notNull": true
2074
+ },
2075
+ "status": {
2076
+ "name": "status",
2077
+ "type": "text",
2078
+ "primaryKey": false,
2079
+ "notNull": true
2080
+ }
2081
+ },
2082
+ "indexes": {
2083
+ "junior_task_executions_task_time_idx": {
2084
+ "name": "junior_task_executions_task_time_idx",
2085
+ "columns": [
2086
+ {
2087
+ "expression": "kind",
2088
+ "isExpression": false,
2089
+ "asc": true,
2090
+ "nulls": "last"
2091
+ },
2092
+ {
2093
+ "expression": "namespace",
2094
+ "isExpression": false,
2095
+ "asc": true,
2096
+ "nulls": "last"
2097
+ },
2098
+ {
2099
+ "expression": "task_id",
2100
+ "isExpression": false,
2101
+ "asc": true,
2102
+ "nulls": "last"
2103
+ },
2104
+ {
2105
+ "expression": "executed_at_ms",
2106
+ "isExpression": false,
2107
+ "asc": true,
2108
+ "nulls": "last"
2109
+ }
2110
+ ],
2111
+ "isUnique": false,
2112
+ "concurrently": false,
2113
+ "method": "btree",
2114
+ "with": {}
2115
+ },
2116
+ "junior_task_executions_time_kind_idx": {
2117
+ "name": "junior_task_executions_time_kind_idx",
2118
+ "columns": [
2119
+ {
2120
+ "expression": "executed_at_ms",
2121
+ "isExpression": false,
2122
+ "asc": true,
2123
+ "nulls": "last"
2124
+ },
2125
+ {
2126
+ "expression": "kind",
2127
+ "isExpression": false,
2128
+ "asc": true,
2129
+ "nulls": "last"
2130
+ }
2131
+ ],
2132
+ "isUnique": false,
2133
+ "concurrently": false,
2134
+ "method": "btree",
2135
+ "with": {}
2136
+ },
2137
+ "junior_task_executions_conversation_time_idx": {
2138
+ "name": "junior_task_executions_conversation_time_idx",
2139
+ "columns": [
2140
+ {
2141
+ "expression": "conversation_id",
2142
+ "isExpression": false,
2143
+ "asc": true,
2144
+ "nulls": "last"
2145
+ },
2146
+ {
2147
+ "expression": "executed_at_ms",
2148
+ "isExpression": false,
2149
+ "asc": true,
2150
+ "nulls": "last"
2151
+ }
2152
+ ],
2153
+ "isUnique": false,
2154
+ "concurrently": false,
2155
+ "method": "btree",
2156
+ "with": {}
2157
+ }
2158
+ },
2159
+ "foreignKeys": {
2160
+ "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk": {
2161
+ "name": "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
2162
+ "tableFrom": "junior_task_executions",
2163
+ "tableTo": "junior_conversations",
2164
+ "columnsFrom": [
2165
+ "conversation_id"
2166
+ ],
2167
+ "columnsTo": [
2168
+ "conversation_id"
2169
+ ],
2170
+ "onDelete": "no action",
2171
+ "onUpdate": "no action"
2172
+ }
2173
+ },
2174
+ "compositePrimaryKeys": {
2175
+ "junior_task_executions_kind_namespace_execution_id_pk": {
2176
+ "name": "junior_task_executions_kind_namespace_execution_id_pk",
2177
+ "columns": [
2178
+ "kind",
2179
+ "namespace",
2180
+ "execution_id"
2181
+ ]
2182
+ }
2183
+ },
2184
+ "uniqueConstraints": {},
2185
+ "policies": {},
2186
+ "checkConstraints": {
2187
+ "junior_task_executions_kind_check": {
2188
+ "name": "junior_task_executions_kind_check",
2189
+ "value": "\"junior_task_executions\".\"kind\" in ('scheduled', 'event')"
2190
+ },
2191
+ "junior_task_executions_status_check": {
2192
+ "name": "junior_task_executions_status_check",
2193
+ "value": "\"junior_task_executions\".\"status\" in ('blocked', 'completed', 'failed')"
2194
+ }
2195
+ },
2196
+ "isRLSEnabled": false
2197
+ },
2198
+ "public.junior_users": {
2199
+ "name": "junior_users",
2200
+ "schema": "",
2201
+ "columns": {
2202
+ "id": {
2203
+ "name": "id",
2204
+ "type": "text",
2205
+ "primaryKey": true,
2206
+ "notNull": true
2207
+ },
2208
+ "primary_email": {
2209
+ "name": "primary_email",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": true
2213
+ },
2214
+ "primary_email_normalized": {
2215
+ "name": "primary_email_normalized",
2216
+ "type": "text",
2217
+ "primaryKey": false,
2218
+ "notNull": true
2219
+ },
2220
+ "display_name": {
2221
+ "name": "display_name",
2222
+ "type": "text",
2223
+ "primaryKey": false,
2224
+ "notNull": false
2225
+ },
2226
+ "created_at": {
2227
+ "name": "created_at",
2228
+ "type": "timestamp with time zone",
2229
+ "primaryKey": false,
2230
+ "notNull": true
2231
+ },
2232
+ "updated_at": {
2233
+ "name": "updated_at",
2234
+ "type": "timestamp with time zone",
2235
+ "primaryKey": false,
2236
+ "notNull": true
2237
+ }
2238
+ },
2239
+ "indexes": {
2240
+ "junior_users_primary_email_normalized_uidx": {
2241
+ "name": "junior_users_primary_email_normalized_uidx",
2242
+ "columns": [
2243
+ {
2244
+ "expression": "primary_email_normalized",
2245
+ "isExpression": false,
2246
+ "asc": true,
2247
+ "nulls": "last"
2248
+ }
2249
+ ],
2250
+ "isUnique": true,
2251
+ "concurrently": false,
2252
+ "method": "btree",
2253
+ "with": {}
2254
+ }
2255
+ },
2256
+ "foreignKeys": {},
2257
+ "compositePrimaryKeys": {},
2258
+ "uniqueConstraints": {},
2259
+ "policies": {},
2260
+ "checkConstraints": {},
2261
+ "isRLSEnabled": false
2262
+ }
2263
+ },
2264
+ "enums": {},
2265
+ "schemas": {},
2266
+ "sequences": {},
2267
+ "roles": {},
2268
+ "policies": {},
2269
+ "views": {},
2270
+ "_meta": {
2271
+ "columns": {},
2272
+ "schemas": {},
2273
+ "tables": {}
2274
+ }
2275
+ }