@sentry/junior 0.155.0 → 0.157.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 (94) hide show
  1. package/dist/{agent-hooks-AWVTLAV2.js → agent-hooks-QI5EPOKQ.js} +10 -10
  2. package/dist/api/conversations/attachments.d.ts +32 -0
  3. package/dist/api/conversations/priority.d.ts +21 -0
  4. package/dist/api/conversations/routes.d.ts +4 -1
  5. package/dist/api/locations/detail.d.ts +4 -1
  6. package/dist/api/schema/conversation.d.ts +33 -8
  7. package/dist/api/schema/location.d.ts +4 -1
  8. package/dist/api/schema/person.d.ts +4 -1
  9. package/dist/api/schema/task.d.ts +8 -8
  10. package/dist/api/schema.js +1 -1
  11. package/dist/api.js +182 -48
  12. package/dist/app.js +128 -44
  13. package/dist/{catalog-runtime-V6YD6KH5.js → catalog-runtime-HUGHAFUN.js} +5 -5
  14. package/dist/chat/agent/types.d.ts +2 -0
  15. package/dist/chat/agent-invocations/types.d.ts +12 -12
  16. package/dist/chat/attachments/storage.d.ts +14 -0
  17. package/dist/chat/attachments/store.d.ts +68 -0
  18. package/dist/chat/attachments/vercel.d.ts +3 -0
  19. package/dist/chat/conversations/retention.d.ts +4 -0
  20. package/dist/chat/event-tasks/tool-support.d.ts +1 -1
  21. package/dist/chat/event-tasks/types.d.ts +1 -1
  22. package/dist/chat/ingress/bot-mention.d.ts +13 -0
  23. package/dist/chat/plugins/unfinished-work.d.ts +11 -0
  24. package/dist/chat/runtime/agent-runner.d.ts +2 -0
  25. package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
  26. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
  27. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
  28. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
  29. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
  30. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
  31. package/dist/chat/services/conversation-memory.d.ts +1 -1
  32. package/dist/chat/slack/tools/send-files.d.ts +17 -11
  33. package/dist/chat/state/conversation.d.ts +2 -1
  34. package/dist/chat/task-execution/slack-work.d.ts +2 -2
  35. package/dist/chat/tools/types.d.ts +2 -0
  36. package/dist/{chunk-773XC7P4.js → chunk-3GS7O66Z.js} +159 -128
  37. package/dist/{chunk-JFZBGFNX.js → chunk-46ADYIPE.js} +2 -1
  38. package/dist/{chunk-KTVHAHUV.js → chunk-4M25PSFB.js} +1 -1
  39. package/dist/{chunk-4K5N6HTX.js → chunk-5TIH5GOE.js} +5 -5
  40. package/dist/{chunk-TVXAN43I.js → chunk-6MI43QZO.js} +1 -1
  41. package/dist/{chunk-RN3AWYEP.js → chunk-77QB5FNI.js} +1 -1
  42. package/dist/{chunk-Y7ZUBP2K.js → chunk-7J65DOBL.js} +6 -6
  43. package/dist/{chunk-2AHVM3HK.js → chunk-AFQ47JQ7.js} +10 -8
  44. package/dist/{chunk-ELOTIL5F.js → chunk-BLCVTEE7.js} +4 -4
  45. package/dist/{chunk-ZLSFOSDK.js → chunk-CZCMFRUQ.js} +18 -1
  46. package/dist/{chunk-2WLJDM23.js → chunk-D7BNWRYL.js} +1 -1
  47. package/dist/{chunk-EORR34UB.js → chunk-F7VOY4VQ.js} +1 -1
  48. package/dist/{chunk-JJX77MB7.js → chunk-G2FN3I66.js} +3 -3
  49. package/dist/{chunk-J2SYI36O.js → chunk-GEY6IFXH.js} +4 -4
  50. package/dist/{chunk-37G5HJ2X.js → chunk-GO2W3VZY.js} +4 -4
  51. package/dist/{chunk-LQT3SWFA.js → chunk-HJ3EZHIX.js} +351 -5
  52. package/dist/{chunk-SDRJ2LE3.js → chunk-I3OQVVMV.js} +1 -1
  53. package/dist/{chunk-TKJ7277U.js → chunk-MDZQ62PB.js} +2 -2
  54. package/dist/{chunk-V57LZDHN.js → chunk-MGJW3SW4.js} +6 -6
  55. package/dist/{chunk-7NYEB2TM.js → chunk-MKA3T2R6.js} +1 -1
  56. package/dist/{chunk-RQ62VKM7.js → chunk-MXO6VFB3.js} +1 -1
  57. package/dist/{chunk-AENPRXCG.js → chunk-OWASYHHV.js} +68 -39
  58. package/dist/{chunk-UWTXAYBP.js → chunk-PP4UQTH3.js} +9 -9
  59. package/dist/{chunk-JIC33O5L.js → chunk-RQBRGPUF.js} +2 -2
  60. package/dist/{chunk-NWSKFYOH.js → chunk-S4PFOWRA.js} +1 -1
  61. package/dist/{chunk-NKFRRZIT.js → chunk-TA5R6BME.js} +19 -18
  62. package/dist/{chunk-XFZLQANQ.js → chunk-UJYA75N5.js} +2 -2
  63. package/dist/{chunk-Y6MVGU7L.js → chunk-VBKFO65J.js} +35 -10
  64. package/dist/{chunk-KBT2I5ER.js → chunk-VDAEXEBB.js} +6 -6
  65. package/dist/{chunk-J7MWZFFP.js → chunk-VIBHFGQC.js} +4 -4
  66. package/dist/{chunk-APHDJYN7.js → chunk-VYDM7HUF.js} +1 -1
  67. package/dist/{chunk-CPQBTTI6.js → chunk-WNNYOPXX.js} +5 -5
  68. package/dist/{chunk-MLBH7J7J.js → chunk-XRERMHPN.js} +1 -1
  69. package/dist/cli/chat.js +30 -30
  70. package/dist/cli/check.js +6 -6
  71. package/dist/cli/plugins.js +13 -13
  72. package/dist/cli/snapshot-create.js +9 -9
  73. package/dist/cli/upgrade.js +7 -7
  74. package/dist/db/schema/agent-invocations.d.ts +4 -4
  75. package/dist/db/schema/attachments.d.ts +178 -0
  76. package/dist/db/schema.d.ts +183 -5
  77. package/dist/{db-WT7P56AH.js → db-VQAV4PJ3.js} +7 -7
  78. package/dist/handlers/retention.d.ts +4 -1
  79. package/dist/instrumentation.js +4 -4
  80. package/dist/nitro.js +2 -2
  81. package/dist/{oauth-callback-server-R2PK2MCA.js → oauth-callback-server-K5KQAAAX.js} +23 -23
  82. package/dist/{runner-O7YYUIHT.js → runner-U7QI7P4S.js} +14 -15
  83. package/dist/{skills-S6HLQRH7.js → skills-ENKRBZ7K.js} +6 -6
  84. package/dist/spawn-4XGNONLS.js +37 -0
  85. package/dist/{validation-46WD2OAR.js → validation-VKCDVGA6.js} +6 -6
  86. package/dist/version.js +1 -1
  87. package/dist/{work-YT5QUBS3.js → work-IBD6PWP2.js} +17 -17
  88. package/dist/worker-TJFXOZRC.js +24 -0
  89. package/migrations/0027_attachment_storage.sql +16 -0
  90. package/migrations/meta/0027_snapshot.json +2554 -0
  91. package/migrations/meta/_journal.json +8 -1
  92. package/package.json +5 -4
  93. package/dist/spawn-B4SBFFA2.js +0 -37
  94. package/dist/worker-4C5BEDWN.js +0 -24
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SQL_STATEMENT_TIMEOUT_MS
3
- } from "./chunk-XFZLQANQ.js";
3
+ } from "./chunk-UJYA75N5.js";
4
4
  import {
5
5
  juniorDestinations,
6
6
  timestamptz
@@ -14,14 +14,8 @@ import {
14
14
  import { drizzle } from "drizzle-orm/neon-serverless";
15
15
  import { migrate } from "drizzle-orm/neon-serverless/migrator";
16
16
 
17
- // src/db/schema/conversation-annotations.ts
18
- import {
19
- foreignKey,
20
- jsonb as jsonb3,
21
- pgTable as pgTable4,
22
- primaryKey,
23
- text as text4
24
- } from "drizzle-orm/pg-core";
17
+ // src/db/schema/attachments.ts
18
+ import { index as index3, integer as integer2, pgTable as pgTable4, text as text4 } from "drizzle-orm/pg-core";
25
19
 
26
20
  // src/db/schema/conversations.ts
27
21
  import { sql as sql2 } from "drizzle-orm";
@@ -179,14 +173,49 @@ var juniorConversations = pgTable3(
179
173
  ]
180
174
  );
181
175
 
176
+ // src/db/schema/attachments.ts
177
+ var juniorAttachments = pgTable4(
178
+ "junior_attachments",
179
+ {
180
+ id: text4("id").primaryKey(),
181
+ conversationId: text4("conversation_id").notNull().references(() => juniorConversations.conversationId, {
182
+ onDelete: "cascade"
183
+ }),
184
+ provider: text4("provider").notNull(),
185
+ storageKey: text4("storage_key").notNull(),
186
+ filename: text4("filename").notNull(),
187
+ contentType: text4("content_type").notNull(),
188
+ bytes: integer2("bytes").notNull(),
189
+ sha256: text4("sha256").notNull(),
190
+ createdAt: timestamptz("created_at").notNull(),
191
+ /** Set when conversation purge marks the attachment unavailable. */
192
+ deleteRequestedAt: timestamptz("delete_requested_at")
193
+ },
194
+ (table) => [
195
+ index3("junior_attachments_conversation_idx").on(table.conversationId),
196
+ index3("junior_attachments_gc_idx").on(
197
+ table.provider,
198
+ table.deleteRequestedAt,
199
+ table.createdAt
200
+ )
201
+ ]
202
+ );
203
+
182
204
  // src/db/schema/conversation-annotations.ts
183
- var juniorConversationAnnotations = pgTable4(
205
+ import {
206
+ foreignKey,
207
+ jsonb as jsonb3,
208
+ pgTable as pgTable5,
209
+ primaryKey,
210
+ text as text5
211
+ } from "drizzle-orm/pg-core";
212
+ var juniorConversationAnnotations = pgTable5(
184
213
  "junior_conversation_annotations",
185
214
  {
186
- conversationId: text4("conversation_id").notNull(),
187
- plugin: text4("plugin").notNull(),
188
- kind: text4("kind").notNull(),
189
- key: text4("key").notNull(),
215
+ conversationId: text5("conversation_id").notNull(),
216
+ plugin: text5("plugin").notNull(),
217
+ kind: text5("kind").notNull(),
218
+ key: text5("key").notNull(),
190
219
  annotation: jsonb3("annotation_json").$type().notNull(),
191
220
  createdAt: timestamptz("created_at").notNull(),
192
221
  updatedAt: timestamptz("updated_at").notNull()
@@ -205,15 +234,15 @@ var juniorConversationAnnotations = pgTable4(
205
234
  );
206
235
 
207
236
  // src/db/schema/api-tokens.ts
208
- import { index as index3, pgTable as pgTable5, text as text5, uniqueIndex as uniqueIndex3 } from "drizzle-orm/pg-core";
209
- var juniorApiTokens = pgTable5(
237
+ import { index as index4, pgTable as pgTable6, text as text6, uniqueIndex as uniqueIndex3 } from "drizzle-orm/pg-core";
238
+ var juniorApiTokens = pgTable6(
210
239
  "junior_api_tokens",
211
240
  {
212
- id: text5("id").primaryKey(),
213
- ownerEmailNormalized: text5("owner_email_normalized").notNull(),
214
- name: text5("name").notNull(),
215
- tokenHash: text5("token_hash").notNull(),
216
- tokenSuffix: text5("token_suffix").notNull(),
241
+ id: text6("id").primaryKey(),
242
+ ownerEmailNormalized: text6("owner_email_normalized").notNull(),
243
+ name: text6("name").notNull(),
244
+ tokenHash: text6("token_hash").notNull(),
245
+ tokenSuffix: text6("token_suffix").notNull(),
217
246
  createdAt: timestamptz("created_at").notNull(),
218
247
  expiresAt: timestamptz("expires_at").notNull(),
219
248
  lastUsedAt: timestamptz("last_used_at"),
@@ -221,33 +250,33 @@ var juniorApiTokens = pgTable5(
221
250
  },
222
251
  (table) => [
223
252
  uniqueIndex3("junior_api_tokens_token_hash_uidx").on(table.tokenHash),
224
- index3("junior_api_tokens_owner_email_idx").on(table.ownerEmailNormalized)
253
+ index4("junior_api_tokens_owner_email_idx").on(table.ownerEmailNormalized)
225
254
  ]
226
255
  );
227
256
 
228
257
  // src/db/schema/conversation-events.ts
229
258
  import {
230
259
  foreignKey as foreignKey2,
231
- index as index4,
232
- integer as integer2,
260
+ index as index5,
261
+ integer as integer3,
233
262
  jsonb as jsonb4,
234
- pgTable as pgTable6,
263
+ pgTable as pgTable7,
235
264
  primaryKey as primaryKey2,
236
- text as text6,
265
+ text as text7,
237
266
  uniqueIndex as uniqueIndex4
238
267
  } from "drizzle-orm/pg-core";
239
268
  import { sql as sql3 } from "drizzle-orm";
240
- var juniorConversationEvents = pgTable6(
269
+ var juniorConversationEvents = pgTable7(
241
270
  "junior_conversation_events",
242
271
  {
243
- conversationId: text6("conversation_id").notNull(),
244
- seq: integer2("seq").notNull(),
245
- historyVersion: integer2("history_version").notNull(),
246
- schemaVersion: integer2("schema_version").default(1).notNull(),
247
- idempotencyKey: text6("idempotency_key"),
248
- type: text6("type").notNull(),
272
+ conversationId: text7("conversation_id").notNull(),
273
+ seq: integer3("seq").notNull(),
274
+ historyVersion: integer3("history_version").notNull(),
275
+ schemaVersion: integer3("schema_version").default(1).notNull(),
276
+ idempotencyKey: text7("idempotency_key"),
277
+ type: text7("type").notNull(),
249
278
  payload: jsonb4("payload").$type().notNull(),
250
- actorIdentityId: text6("actor_identity_id").references(
279
+ actorIdentityId: text7("actor_identity_id").references(
251
280
  () => juniorIdentities.id
252
281
  ),
253
282
  createdAt: timestamptz("created_at").notNull()
@@ -262,22 +291,22 @@ var juniorConversationEvents = pgTable6(
262
291
  columns: [table.conversationId],
263
292
  foreignColumns: [juniorConversations.conversationId]
264
293
  }),
265
- index4("junior_conversation_events_history_version_idx").on(
294
+ index5("junior_conversation_events_history_version_idx").on(
266
295
  table.conversationId,
267
296
  table.historyVersion,
268
297
  table.seq
269
298
  ),
270
- index4("junior_conversation_events_type_idx").on(
299
+ index5("junior_conversation_events_type_idx").on(
271
300
  table.conversationId,
272
301
  table.type,
273
302
  table.seq
274
303
  ),
275
- index4("junior_conversation_events_actor_identity_idx").on(
304
+ index5("junior_conversation_events_actor_identity_idx").on(
276
305
  table.actorIdentityId,
277
306
  table.conversationId,
278
307
  table.seq
279
308
  ),
280
- index4("junior_conversation_events_message_search_idx").using("gin", sql3`to_tsvector('english', ${table.payload}->>'text')`).where(sql3`${table.type} = 'message'`),
309
+ index5("junior_conversation_events_message_search_idx").using("gin", sql3`to_tsvector('english', ${table.payload}->>'text')`).where(sql3`${table.type} = 'message'`),
281
310
  uniqueIndex4("junior_conversation_events_idempotency_idx").on(
282
311
  table.conversationId,
283
312
  table.idempotencyKey
@@ -286,15 +315,15 @@ var juniorConversationEvents = pgTable6(
286
315
  );
287
316
 
288
317
  // src/db/schema/conversation-bindings.ts
289
- import { index as index5, pgTable as pgTable7, primaryKey as primaryKey3, text as text7 } from "drizzle-orm/pg-core";
290
- var juniorConversationBindings = pgTable7(
318
+ import { index as index6, pgTable as pgTable8, primaryKey as primaryKey3, text as text8 } from "drizzle-orm/pg-core";
319
+ var juniorConversationBindings = pgTable8(
291
320
  "junior_conversation_bindings",
292
321
  {
293
- conversationId: text7("conversation_id").notNull().references(() => juniorConversations.conversationId),
294
- provider: text7("provider").notNull(),
295
- providerTenantId: text7("provider_tenant_id").notNull().default(""),
296
- providerDestinationId: text7("provider_destination_id").notNull(),
297
- providerConversationId: text7("provider_conversation_id").notNull(),
322
+ conversationId: text8("conversation_id").notNull().references(() => juniorConversations.conversationId),
323
+ provider: text8("provider").notNull(),
324
+ providerTenantId: text8("provider_tenant_id").notNull().default(""),
325
+ providerDestinationId: text8("provider_destination_id").notNull(),
326
+ providerConversationId: text8("provider_conversation_id").notNull(),
298
327
  createdAt: timestamptz("created_at").notNull()
299
328
  },
300
329
  (table) => [
@@ -307,19 +336,19 @@ var juniorConversationBindings = pgTable7(
307
336
  table.providerConversationId
308
337
  ]
309
338
  }),
310
- index5("junior_conversation_bindings_conversation_idx").on(
339
+ index6("junior_conversation_bindings_conversation_idx").on(
311
340
  table.conversationId
312
341
  )
313
342
  ]
314
343
  );
315
344
 
316
345
  // src/db/schema/conversation-participants.ts
317
- import { index as index6, pgTable as pgTable8, primaryKey as primaryKey4, text as text8 } from "drizzle-orm/pg-core";
318
- var juniorConversationParticipants = pgTable8(
346
+ import { index as index7, pgTable as pgTable9, primaryKey as primaryKey4, text as text9 } from "drizzle-orm/pg-core";
347
+ var juniorConversationParticipants = pgTable9(
319
348
  "junior_conversation_participants",
320
349
  {
321
- userId: text8("user_id").notNull().references(() => juniorUsers.id),
322
- rootConversationId: text8("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
350
+ userId: text9("user_id").notNull().references(() => juniorUsers.id),
351
+ rootConversationId: text9("root_conversation_id").notNull().references(() => juniorConversations.conversationId),
323
352
  lastMessageAt: timestamptz("last_message_at").notNull()
324
353
  },
325
354
  (table) => [
@@ -327,11 +356,11 @@ var juniorConversationParticipants = pgTable8(
327
356
  name: "junior_conversation_participants_user_root_pk",
328
357
  columns: [table.userId, table.rootConversationId]
329
358
  }),
330
- index6("junior_conversation_participants_user_activity_idx").on(
359
+ index7("junior_conversation_participants_user_activity_idx").on(
331
360
  table.userId,
332
361
  table.lastMessageAt.desc()
333
362
  ),
334
- index6("junior_conversation_participants_root_idx").on(
363
+ index7("junior_conversation_participants_root_idx").on(
335
364
  table.rootConversationId
336
365
  )
337
366
  ]
@@ -339,23 +368,23 @@ var juniorConversationParticipants = pgTable8(
339
368
 
340
369
  // src/db/schema/agent-invocations.ts
341
370
  import {
342
- index as index7,
371
+ index as index8,
343
372
  jsonb as jsonb5,
344
- pgTable as pgTable9,
373
+ pgTable as pgTable10,
345
374
  primaryKey as primaryKey5,
346
- text as text9,
375
+ text as text10,
347
376
  uniqueIndex as uniqueIndex5
348
377
  } from "drizzle-orm/pg-core";
349
378
  var AGENT_INVOCATION_MAILBOX_STATUSES = [
350
379
  "pending",
351
380
  "appended"
352
381
  ];
353
- var juniorAgentBindings = pgTable9(
382
+ var juniorAgentBindings = pgTable10(
354
383
  "junior_agent_bindings",
355
384
  {
356
- parentConversationId: text9("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
357
- name: text9("name").notNull(),
358
- childConversationId: text9("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
385
+ parentConversationId: text10("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
386
+ name: text10("name").notNull(),
387
+ childConversationId: text10("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
359
388
  },
360
389
  (table) => [
361
390
  primaryKey5({
@@ -366,35 +395,35 @@ var juniorAgentBindings = pgTable9(
366
395
  )
367
396
  ]
368
397
  );
369
- var juniorAgentInvocations = pgTable9(
398
+ var juniorAgentInvocations = pgTable10(
370
399
  "junior_agent_invocations",
371
400
  {
372
- invocationId: text9("invocation_id").primaryKey(),
373
- parentConversationId: text9("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
374
- childConversationId: text9("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
375
- agentName: text9("agent_name"),
376
- input: text9("input").notNull(),
401
+ invocationId: text10("invocation_id").primaryKey(),
402
+ parentConversationId: text10("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
403
+ childConversationId: text10("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
404
+ agentName: text10("agent_name"),
405
+ input: text10("input").notNull(),
377
406
  actor: jsonb5("actor_json").$type().notNull(),
378
407
  credentialContext: jsonb5(
379
408
  "credential_context_json"
380
409
  ).$type(),
381
410
  source: jsonb5("source_json").$type().notNull(),
382
411
  destination: jsonb5("destination_json").$type().notNull(),
383
- destinationVisibility: text9(
412
+ destinationVisibility: text10(
384
413
  "destination_visibility"
385
414
  ).$type(),
386
- reasoningLevel: text9("reasoning_level").$type(),
387
- status: text9("status").$type().notNull(),
388
- mailboxStatus: text9("mailbox_status").$type().notNull(),
389
- result: text9("result"),
390
- errorMessage: text9("error_message"),
415
+ reasoningLevel: text10("reasoning_level").$type(),
416
+ status: text10("status").$type().notNull(),
417
+ mailboxStatus: text10("mailbox_status").$type().notNull(),
418
+ result: text10("result"),
419
+ errorMessage: text10("error_message"),
391
420
  createdAt: timestamptz("created_at").notNull(),
392
421
  updatedAt: timestamptz("updated_at").notNull(),
393
422
  terminalAt: timestamptz("terminal_at")
394
423
  },
395
424
  (table) => [
396
- index7("junior_agent_invocations_child_idx").on(table.childConversationId),
397
- index7("junior_agent_invocations_mailbox_idx").on(
425
+ index8("junior_agent_invocations_child_idx").on(table.childConversationId),
426
+ index8("junior_agent_invocations_mailbox_idx").on(
398
427
  table.mailboxStatus,
399
428
  table.createdAt
400
429
  )
@@ -402,42 +431,42 @@ var juniorAgentInvocations = pgTable9(
402
431
  );
403
432
 
404
433
  // src/db/schema/location-configurations.ts
405
- import { pgTable as pgTable10, primaryKey as primaryKey6, text as text10 } from "drizzle-orm/pg-core";
406
- var juniorLocationConfigurations = pgTable10(
434
+ import { pgTable as pgTable11, primaryKey as primaryKey6, text as text11 } from "drizzle-orm/pg-core";
435
+ var juniorLocationConfigurations = pgTable11(
407
436
  "junior_location_configurations",
408
437
  {
409
- locationId: text10("location_id").notNull().references(() => juniorDestinations.id, { onDelete: "cascade" }),
410
- key: text10("key").notNull(),
411
- value: text10("value").notNull(),
438
+ locationId: text11("location_id").notNull().references(() => juniorDestinations.id, { onDelete: "cascade" }),
439
+ key: text11("key").notNull(),
440
+ value: text11("value").notNull(),
412
441
  updatedAt: timestamptz("updated_at").notNull(),
413
- updatedBy: text10("updated_by"),
414
- source: text10("source"),
415
- expiresAt: text10("expires_at")
442
+ updatedBy: text11("updated_by"),
443
+ source: text11("source"),
444
+ expiresAt: text11("expires_at")
416
445
  },
417
446
  (table) => [primaryKey6({ columns: [table.locationId, table.key] })]
418
447
  );
419
448
 
420
449
  // src/db/schema/event-tasks.ts
421
- import { bigint, index as index8, jsonb as jsonb6, pgTable as pgTable11, text as text11 } from "drizzle-orm/pg-core";
422
- var juniorEventTasks = pgTable11(
450
+ import { bigint, index as index9, jsonb as jsonb6, pgTable as pgTable12, text as text12 } from "drizzle-orm/pg-core";
451
+ var juniorEventTasks = pgTable12(
423
452
  "junior_event_tasks",
424
453
  {
425
- id: text11("id").primaryKey(),
426
- teamId: text11("team_id").notNull(),
427
- namespace: text11("namespace").notNull(),
428
- identifier: text11("identifier").notNull(),
454
+ id: text12("id").primaryKey(),
455
+ teamId: text12("team_id").notNull(),
456
+ namespace: text12("namespace").notNull(),
457
+ identifier: text12("identifier").notNull(),
429
458
  createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
430
459
  /** Short display title generated from the task instruction. */
431
- title: text11("title"),
460
+ title: text12("title"),
432
461
  task: jsonb6("task_json").$type().notNull()
433
462
  },
434
463
  (table) => [
435
- index8("junior_event_tasks_team_idx").on(
464
+ index9("junior_event_tasks_team_idx").on(
436
465
  table.teamId,
437
466
  table.createdAtMs,
438
467
  table.id
439
468
  ),
440
- index8("junior_event_tasks_match_idx").on(
469
+ index9("junior_event_tasks_match_idx").on(
441
470
  table.namespace,
442
471
  table.identifier,
443
472
  table.createdAtMs,
@@ -447,15 +476,15 @@ var juniorEventTasks = pgTable11(
447
476
  );
448
477
 
449
478
  // src/db/schema/stats.ts
450
- import { date, integer as integer3, pgTable as pgTable12, primaryKey as primaryKey7, text as text12 } from "drizzle-orm/pg-core";
451
- var juniorStats = pgTable12(
479
+ import { date, integer as integer4, pgTable as pgTable13, primaryKey as primaryKey7, text as text13 } from "drizzle-orm/pg-core";
480
+ var juniorStats = pgTable13(
452
481
  "junior_stats",
453
482
  {
454
483
  date: date("date", { mode: "string" }).notNull(),
455
- namespace: text12("namespace").notNull(),
456
- metric: text12("metric").notNull(),
457
- name: text12("name").notNull(),
458
- count: integer3("count").notNull().default(0)
484
+ namespace: text13("namespace").notNull(),
485
+ metric: text13("metric").notNull(),
486
+ name: text13("name").notNull(),
487
+ count: integer4("count").notNull().default(0)
459
488
  },
460
489
  (table) => [
461
490
  primaryKey7({
@@ -471,21 +500,21 @@ import {
471
500
  bigint as bigint2,
472
501
  check,
473
502
  foreignKey as foreignKey3,
474
- index as index9,
475
- pgTable as pgTable13,
503
+ index as index10,
504
+ pgTable as pgTable14,
476
505
  primaryKey as primaryKey8,
477
- text as text13
506
+ text as text14
478
507
  } from "drizzle-orm/pg-core";
479
- var juniorTaskExecutions = pgTable13(
508
+ var juniorTaskExecutions = pgTable14(
480
509
  "junior_task_executions",
481
510
  {
482
- executionId: text13("execution_id").notNull(),
483
- kind: text13("kind").notNull(),
484
- namespace: text13("namespace").notNull(),
485
- taskId: text13("task_id").notNull(),
486
- conversationId: text13("conversation_id"),
511
+ executionId: text14("execution_id").notNull(),
512
+ kind: text14("kind").notNull(),
513
+ namespace: text14("namespace").notNull(),
514
+ taskId: text14("task_id").notNull(),
515
+ conversationId: text14("conversation_id"),
487
516
  executedAtMs: bigint2("executed_at_ms", { mode: "number" }).notNull(),
488
- status: text13("status").$type().notNull()
517
+ status: text14("status").$type().notNull()
489
518
  },
490
519
  (table) => [
491
520
  check(
@@ -505,17 +534,17 @@ var juniorTaskExecutions = pgTable13(
505
534
  columns: [table.conversationId],
506
535
  foreignColumns: [juniorConversations.conversationId]
507
536
  }),
508
- index9("junior_task_executions_task_time_idx").on(
537
+ index10("junior_task_executions_task_time_idx").on(
509
538
  table.kind,
510
539
  table.namespace,
511
540
  table.taskId,
512
541
  table.executedAtMs
513
542
  ),
514
- index9("junior_task_executions_time_kind_idx").on(
543
+ index10("junior_task_executions_time_kind_idx").on(
515
544
  table.executedAtMs,
516
545
  table.kind
517
546
  ),
518
- index9("junior_task_executions_conversation_time_idx").on(
547
+ index10("junior_task_executions_conversation_time_idx").on(
519
548
  table.conversationId,
520
549
  table.executedAtMs
521
550
  )
@@ -524,54 +553,54 @@ var juniorTaskExecutions = pgTable13(
524
553
 
525
554
  // src/db/schema/scheduled-tasks.ts
526
555
  import { sql as sql5 } from "drizzle-orm";
527
- import { bigint as bigint3, index as index10, jsonb as jsonb7, pgTable as pgTable14, text as text14 } from "drizzle-orm/pg-core";
528
- var juniorSchedulerTasks = pgTable14(
556
+ import { bigint as bigint3, index as index11, jsonb as jsonb7, pgTable as pgTable15, text as text15 } from "drizzle-orm/pg-core";
557
+ var juniorSchedulerTasks = pgTable15(
529
558
  "junior_scheduler_tasks",
530
559
  {
531
- id: text14("id").primaryKey(),
532
- teamId: text14("team_id").notNull(),
560
+ id: text15("id").primaryKey(),
561
+ teamId: text15("team_id").notNull(),
533
562
  // TODO(v0.128.0): Remove after v0.127.x runtimes no longer write this column.
534
- creatorSlackUserId: text14("creator_slack_user_id"),
535
- creatorIdentityId: text14("creator_identity_id"),
536
- status: text14("status").notNull(),
563
+ creatorSlackUserId: text15("creator_slack_user_id"),
564
+ creatorIdentityId: text15("creator_identity_id"),
565
+ status: text15("status").notNull(),
537
566
  nextRunAtMs: bigint3("next_run_at_ms", { mode: "number" }),
538
567
  runNowAtMs: bigint3("run_now_at_ms", { mode: "number" }),
539
568
  createdAtMs: bigint3("created_at_ms", { mode: "number" }).notNull(),
540
569
  /** Short display title generated from the task instruction. */
541
- title: text14("title"),
570
+ title: text15("title"),
542
571
  record: jsonb7("record").$type().notNull()
543
572
  },
544
573
  (table) => [
545
574
  // TODO(v0.128.0): Remove with creatorSlackUserId.
546
- index10("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
547
- index10("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
575
+ index11("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
576
+ index11("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(
548
577
  sql5`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`
549
578
  ),
550
- index10("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
551
- index10("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
579
+ index11("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql5`${table.status} <> 'deleted'`),
580
+ index11("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(
552
581
  sql5`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`
553
582
  ),
554
- index10("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
583
+ index11("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(
555
584
  sql5`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`
556
585
  )
557
586
  ]
558
587
  );
559
- var juniorSchedulerRuns = pgTable14(
588
+ var juniorSchedulerRuns = pgTable15(
560
589
  "junior_scheduler_runs",
561
590
  {
562
- id: text14("id").primaryKey(),
563
- taskId: text14("task_id").notNull(),
564
- status: text14("status").notNull(),
591
+ id: text15("id").primaryKey(),
592
+ taskId: text15("task_id").notNull(),
593
+ status: text15("status").notNull(),
565
594
  scheduledForMs: bigint3("scheduled_for_ms", { mode: "number" }).notNull(),
566
595
  record: jsonb7("record").$type().notNull()
567
596
  },
568
597
  (table) => [
569
- index10("junior_scheduler_runs_task_status_idx").on(
598
+ index11("junior_scheduler_runs_task_status_idx").on(
570
599
  table.taskId,
571
600
  table.status,
572
601
  table.scheduledForMs
573
602
  ),
574
- index10("junior_scheduler_runs_status_idx").on(
603
+ index11("junior_scheduler_runs_status_idx").on(
575
604
  table.status,
576
605
  table.scheduledForMs
577
606
  )
@@ -580,6 +609,7 @@ var juniorSchedulerRuns = pgTable14(
580
609
 
581
610
  // src/db/schema.ts
582
611
  var juniorSqlSchema = {
612
+ juniorAttachments,
583
613
  juniorConversationAnnotations,
584
614
  juniorApiTokens,
585
615
  juniorAgentBindings,
@@ -852,6 +882,7 @@ export {
852
882
  juniorUsers,
853
883
  juniorIdentities,
854
884
  juniorConversations,
885
+ juniorAttachments,
855
886
  juniorConversationAnnotations,
856
887
  juniorApiTokens,
857
888
  juniorConversationEvents,
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.155.0",
4
+ version: "0.157.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -83,6 +83,7 @@ var package_default = {
83
83
  "@sentry/node": "catalog:",
84
84
  "@sinclair/typebox": "^0.34.49",
85
85
  "@slack/web-api": "^7.16.0",
86
+ "@vercel/blob": "^2.4.0",
86
87
  "@vercel/functions": "^3.6.0",
87
88
  "@vercel/oidc": "^3.4.1",
88
89
  "@vercel/queue": "^0.2.0",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-SDRJ2LE3.js";
3
+ } from "./chunk-I3OQVVMV.js";
4
4
  import {
5
5
  getClient
6
6
  } from "./chunk-6GWA276C.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-J2SYI36O.js";
3
+ } from "./chunk-GEY6IFXH.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-JJX77MB7.js";
9
+ } from "./chunk-G2FN3I66.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-773XC7P4.js";
12
+ } from "./chunk-3GS7O66Z.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-SDRJ2LE3.js";
15
+ } from "./chunk-I3OQVVMV.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-7NYEB2TM.js";
23
+ } from "./chunk-MKA3T2R6.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-RN3AWYEP.js";
3
+ } from "./chunk-77QB5FNI.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-7NYEB2TM.js";
8
+ } from "./chunk-MKA3T2R6.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-ELOTIL5F.js";
3
+ } from "./chunk-BLCVTEE7.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService,
6
6
  getPersistedSandboxState,
7
7
  getPersistedThreadState,
8
8
  persistThreadStateById
9
- } from "./chunk-4K5N6HTX.js";
9
+ } from "./chunk-5TIH5GOE.js";
10
10
  import {
11
11
  AgentInvocationBusyError,
12
12
  AgentInvocationLimitError,
@@ -15,7 +15,7 @@ import {
15
15
  agentBindingSchema,
16
16
  agentInvocationSchema,
17
17
  createAgentInvocationSchema
18
- } from "./chunk-CPQBTTI6.js";
18
+ } from "./chunk-WNNYOPXX.js";
19
19
  import {
20
20
  TurnInputCommitLostError,
21
21
  failTurnRecord,
@@ -26,16 +26,16 @@ import {
26
26
  isTurnInputCommitLostError,
27
27
  openConversationProjection,
28
28
  saveTurnCheckpoint
29
- } from "./chunk-J2SYI36O.js";
29
+ } from "./chunk-GEY6IFXH.js";
30
30
  import {
31
31
  getConversationEventStore,
32
32
  getConversationStore,
33
33
  getSqlExecutor
34
- } from "./chunk-JJX77MB7.js";
34
+ } from "./chunk-G2FN3I66.js";
35
35
  import {
36
36
  juniorAgentBindings,
37
37
  juniorAgentInvocations
38
- } from "./chunk-773XC7P4.js";
38
+ } from "./chunk-3GS7O66Z.js";
39
39
 
40
40
  // src/chat/agent-invocations/work.ts
41
41
  import { z } from "zod";