@sentry/junior 0.159.0 → 0.160.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 (64) hide show
  1. package/dist/{agent-hooks-IAD3AANZ.js → agent-hooks-U6R3O2V4.js} +10 -10
  2. package/dist/api/conversations/events.d.ts +1 -1
  3. package/dist/api/schema/conversation.d.ts +32 -0
  4. package/dist/api/schema.js +1 -1
  5. package/dist/api.js +32 -23
  6. package/dist/app.js +32 -32
  7. package/dist/{catalog-runtime-6VANKLH5.js → catalog-runtime-HIDNHGOP.js} +5 -5
  8. package/dist/chat/conversations/history.d.ts +31 -1
  9. package/dist/chat/conversations/projection.d.ts +13 -0
  10. package/dist/chat/slack/tools/send-files.d.ts +2 -2
  11. package/dist/chat/tool-support/action-review.d.ts +5 -4
  12. package/dist/chat/tools/search-conversation-events.d.ts +1 -1
  13. package/dist/{chunk-UP6KQVF5.js → chunk-2MK6S2UA.js} +1 -1
  14. package/dist/{chunk-CNHELV2P.js → chunk-2SFMRMDV.js} +1 -1
  15. package/dist/{chunk-UKKOKMRE.js → chunk-3AHIB66R.js} +5 -5
  16. package/dist/{chunk-YCBZ47LC.js → chunk-42E7432W.js} +1 -1
  17. package/dist/{chunk-UG673UVL.js → chunk-472VVYYV.js} +1 -1
  18. package/dist/{chunk-O2DZWUPQ.js → chunk-4UO3UAW7.js} +1 -1
  19. package/dist/{chunk-IJ6KWS3V.js → chunk-56TFPTZU.js} +1 -1
  20. package/dist/{chunk-X7AIXRVJ.js → chunk-756F567I.js} +5 -5
  21. package/dist/{chunk-PQWWCKNB.js → chunk-BGVQGEKB.js} +4 -4
  22. package/dist/{chunk-AIQKUJKK.js → chunk-FJR66CQT.js} +4 -4
  23. package/dist/{chunk-FWDN67U3.js → chunk-FKMWPA4A.js} +4 -4
  24. package/dist/{chunk-OGMHLKNO.js → chunk-HDPH4CHJ.js} +1 -1
  25. package/dist/{chunk-L2PEQ2PY.js → chunk-J77DLAPE.js} +2 -2
  26. package/dist/{chunk-QODFNKQS.js → chunk-JQZIUESN.js} +17 -3
  27. package/dist/{chunk-WTQ3CKC3.js → chunk-LNUZXEEI.js} +1 -1
  28. package/dist/{chunk-SQOVZSWF.js → chunk-M5HCOMDR.js} +88 -35
  29. package/dist/{chunk-YSMAMSOU.js → chunk-MBDWMEO6.js} +10 -10
  30. package/dist/{chunk-K2LAI7RW.js → chunk-OUAZDZTZ.js} +2 -2
  31. package/dist/{chunk-DJZPA72K.js → chunk-P7W3ZL5J.js} +6 -6
  32. package/dist/{chunk-AZW5HKC5.js → chunk-PVIM2RWO.js} +8 -8
  33. package/dist/{chunk-6IADZQJR.js → chunk-PZUJPPON.js} +1 -1
  34. package/dist/{chunk-NT6V5WEE.js → chunk-RJGRXDA7.js} +5 -5
  35. package/dist/{chunk-54O6IKUS.js → chunk-RLOXMHLA.js} +40 -4
  36. package/dist/{chunk-PT7B6A3O.js → chunk-TBRJGMTO.js} +1 -1
  37. package/dist/{chunk-DXSZJAVZ.js → chunk-TPFOVXRB.js} +18 -18
  38. package/dist/{chunk-EBP6IS66.js → chunk-U26KRMYX.js} +6 -6
  39. package/dist/{chunk-Q5X37U6G.js → chunk-UNDTW2PY.js} +1 -1
  40. package/dist/{chunk-NCJV265M.js → chunk-URPLKXLG.js} +9 -9
  41. package/dist/{chunk-EQXVKNLM.js → chunk-UYUS4L6F.js} +11 -0
  42. package/dist/{chunk-27UQ7UB3.js → chunk-WACYTIIK.js} +6 -6
  43. package/dist/{chunk-U7D4VLUF.js → chunk-XPX3DYG7.js} +2 -2
  44. package/dist/{chunk-LUIKMY35.js → chunk-YPMDNE7R.js} +1 -1
  45. package/dist/{chunk-TD7ZQZ5W.js → chunk-ZNBGWMVQ.js} +1 -1
  46. package/dist/cli/chat.js +30 -30
  47. package/dist/cli/check.js +6 -6
  48. package/dist/cli/plugins.js +13 -13
  49. package/dist/cli/snapshot-create.js +9 -9
  50. package/dist/cli/upgrade.js +7 -7
  51. package/dist/{db-BIIMAPFB.js → db-2JKT3BB5.js} +7 -7
  52. package/dist/instrumentation.js +4 -4
  53. package/dist/nitro.js +2 -2
  54. package/dist/{oauth-callback-server-4BENCPP3.js → oauth-callback-server-7MC2UMQC.js} +23 -23
  55. package/dist/{runner-TUBJLEYO.js → runner-GUU4G7XO.js} +13 -13
  56. package/dist/{skills-MBRLNBRV.js → skills-7NW5N3VM.js} +6 -6
  57. package/dist/spawn-WGK4W3XF.js +37 -0
  58. package/dist/{validation-YTJGRJYT.js → validation-AQLI6N2C.js} +6 -6
  59. package/dist/version.js +1 -1
  60. package/dist/{work-5MRHKA54.js → work-FLFK5XNU.js} +17 -17
  61. package/dist/worker-KSJIRBQJ.js +24 -0
  62. package/package.json +4 -4
  63. package/dist/spawn-ZWIXA46E.js +0 -37
  64. package/dist/worker-S2V7HZJ4.js +0 -24
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebAuthorization,
3
3
  deleteWebAuthorization
4
- } from "./chunk-UG673UVL.js";
4
+ } from "./chunk-472VVYYV.js";
5
5
  import {
6
6
  appendAndEnqueueInboundMessage
7
- } from "./chunk-FWDN67U3.js";
7
+ } from "./chunk-FKMWPA4A.js";
8
8
  import {
9
9
  buildDeliveredTurnStatePatch,
10
10
  completeAuthPauseTurn,
@@ -12,20 +12,20 @@ import {
12
12
  getTurnUserMessage,
13
13
  processPluginTask,
14
14
  scheduleSessionCompletedPluginTasks
15
- } from "./chunk-NCJV265M.js";
15
+ } from "./chunk-URPLKXLG.js";
16
16
  import {
17
17
  ConversationTurnLifecycleService,
18
18
  coerceThreadConversationState,
19
19
  getPersistedSandboxState,
20
20
  getPersistedThreadState,
21
21
  persistThreadStateById
22
- } from "./chunk-UKKOKMRE.js";
22
+ } from "./chunk-3AHIB66R.js";
23
23
  import {
24
24
  healthReportSchema
25
25
  } from "./chunk-UTL3MHPC.js";
26
26
  import {
27
27
  parseSlackThreadId
28
- } from "./chunk-IJ6KWS3V.js";
28
+ } from "./chunk-56TFPTZU.js";
29
29
  import {
30
30
  TurnInputCommitLostError,
31
31
  abandonTurnRecord,
@@ -48,17 +48,17 @@ import {
48
48
  saveTurnCheckpoint,
49
49
  startActiveTurn,
50
50
  upsertConversationMessage
51
- } from "./chunk-54O6IKUS.js";
51
+ } from "./chunk-RLOXMHLA.js";
52
52
  import {
53
53
  normalizeSlackConversationId
54
- } from "./chunk-K2LAI7RW.js";
54
+ } from "./chunk-OUAZDZTZ.js";
55
55
  import {
56
56
  getConversationEventStore,
57
57
  getConversationStore
58
- } from "./chunk-QODFNKQS.js";
58
+ } from "./chunk-JQZIUESN.js";
59
59
  import {
60
60
  getSlackBotToken
61
- } from "./chunk-L2PEQ2PY.js";
61
+ } from "./chunk-J77DLAPE.js";
62
62
  import {
63
63
  credentialContextForActor
64
64
  } from "./chunk-BDUENQD3.js";
@@ -67,7 +67,7 @@ import {
67
67
  logWarn,
68
68
  setTags,
69
69
  withLogContext
70
- } from "./chunk-TD7ZQZ5W.js";
70
+ } from "./chunk-ZNBGWMVQ.js";
71
71
 
72
72
  // src/handlers/health.ts
73
73
  function readHealthReport() {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-EM225ITJ.js";
4
4
  import {
5
5
  getSlackBotToken
6
- } from "./chunk-L2PEQ2PY.js";
6
+ } from "./chunk-J77DLAPE.js";
7
7
  import {
8
8
  parseSlackChannelReferenceId
9
9
  } from "./chunk-V7YE4WCP.js";
@@ -12,7 +12,7 @@ import {
12
12
  setSpanAttributes,
13
13
  setSpanStatus,
14
14
  withSpan
15
- } from "./chunk-TD7ZQZ5W.js";
15
+ } from "./chunk-ZNBGWMVQ.js";
16
16
 
17
17
  // src/chat/slack/client.ts
18
18
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
@@ -4,19 +4,19 @@ import {
4
4
  isDmChannel,
5
5
  normalizeSlackConversationId,
6
6
  withSlackRetries
7
- } from "./chunk-K2LAI7RW.js";
7
+ } from "./chunk-OUAZDZTZ.js";
8
8
  import {
9
9
  parseDestination
10
- } from "./chunk-QODFNKQS.js";
10
+ } from "./chunk-JQZIUESN.js";
11
11
  import {
12
12
  getStateAdapter
13
- } from "./chunk-Q5X37U6G.js";
13
+ } from "./chunk-UNDTW2PY.js";
14
14
  import {
15
15
  normalizeSlackEmojiName
16
- } from "./chunk-L2PEQ2PY.js";
16
+ } from "./chunk-J77DLAPE.js";
17
17
  import {
18
18
  pluginCatalogRuntime
19
- } from "./chunk-CNHELV2P.js";
19
+ } from "./chunk-2SFMRMDV.js";
20
20
  import {
21
21
  parseSlackMessageTs,
22
22
  parseSlackUserId
@@ -25,7 +25,7 @@ import {
25
25
  isRecord,
26
26
  logInfo,
27
27
  logWarn
28
- } from "./chunk-TD7ZQZ5W.js";
28
+ } from "./chunk-ZNBGWMVQ.js";
29
29
 
30
30
  // src/chat/slack/outbound.ts
31
31
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -3,38 +3,38 @@ import {
3
3
  } from "./chunk-RF6J3DIO.js";
4
4
  import {
5
5
  resolveBaseUrl
6
- } from "./chunk-DJZPA72K.js";
6
+ } from "./chunk-P7W3ZL5J.js";
7
7
  import {
8
8
  isExperimentalFeatureEnabled
9
9
  } from "./chunk-5IDFPCON.js";
10
10
  import {
11
11
  createPluginLogger,
12
12
  getPlugins
13
- } from "./chunk-EBP6IS66.js";
13
+ } from "./chunk-U26KRMYX.js";
14
14
  import {
15
15
  getSlackClient,
16
16
  withSlackRetries
17
- } from "./chunk-K2LAI7RW.js";
17
+ } from "./chunk-OUAZDZTZ.js";
18
18
  import {
19
19
  getDb,
20
20
  parseDestination
21
- } from "./chunk-QODFNKQS.js";
21
+ } from "./chunk-JQZIUESN.js";
22
22
  import {
23
23
  sleep
24
24
  } from "./chunk-EM225ITJ.js";
25
25
  import {
26
26
  acquireActiveLock,
27
27
  getStateAdapter
28
- } from "./chunk-Q5X37U6G.js";
28
+ } from "./chunk-UNDTW2PY.js";
29
29
  import {
30
30
  pluginCatalogRuntime
31
- } from "./chunk-CNHELV2P.js";
31
+ } from "./chunk-2SFMRMDV.js";
32
32
  import {
33
33
  fetchWithBoundedOAuthErrorBodies
34
- } from "./chunk-YCBZ47LC.js";
34
+ } from "./chunk-42E7432W.js";
35
35
  import {
36
36
  isRecord
37
- } from "./chunk-TD7ZQZ5W.js";
37
+ } from "./chunk-ZNBGWMVQ.js";
38
38
 
39
39
  // src/chat/capabilities/router.ts
40
40
  var ProviderCredentialRouter = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-CNHELV2P.js";
3
+ } from "./chunk-2SFMRMDV.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ToolInputError
3
- } from "./chunk-54O6IKUS.js";
3
+ } from "./chunk-RLOXMHLA.js";
4
4
  import {
5
5
  canRouteResourceEvents,
6
6
  getPlugins
7
- } from "./chunk-EBP6IS66.js";
7
+ } from "./chunk-U26KRMYX.js";
8
8
  import {
9
9
  getDb
10
- } from "./chunk-QODFNKQS.js";
10
+ } from "./chunk-JQZIUESN.js";
11
11
  import {
12
12
  juniorAttachments,
13
13
  juniorConversations,
@@ -15,13 +15,13 @@ import {
15
15
  juniorSchedulerRuns,
16
16
  juniorSchedulerTasks,
17
17
  juniorStats
18
- } from "./chunk-O2DZWUPQ.js";
18
+ } from "./chunk-4UO3UAW7.js";
19
19
  import {
20
20
  juniorDestinations
21
21
  } from "./chunk-VFUK3X5B.js";
22
22
  import {
23
23
  logInfo
24
- } from "./chunk-TD7ZQZ5W.js";
24
+ } from "./chunk-ZNBGWMVQ.js";
25
25
 
26
26
  // src/chat/event-tasks/store.ts
27
27
  import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
@@ -13,7 +13,7 @@ import {
13
13
  instructionProvenanceFor,
14
14
  sanitizePostgresJson,
15
15
  withConversationEventLock
16
- } from "./chunk-QODFNKQS.js";
16
+ } from "./chunk-JQZIUESN.js";
17
17
  import {
18
18
  SANDBOX_WORKSPACE_ROOT,
19
19
  sleep
@@ -23,14 +23,14 @@ import {
23
23
  fenceLock,
24
24
  getStateAdapter,
25
25
  withLock
26
- } from "./chunk-Q5X37U6G.js";
26
+ } from "./chunk-UNDTW2PY.js";
27
27
  import {
28
28
  botConfig,
29
29
  completeText,
30
30
  escapeXml,
31
31
  resolveGatewayModel,
32
32
  unwrapCurrentInstruction
33
- } from "./chunk-L2PEQ2PY.js";
33
+ } from "./chunk-J77DLAPE.js";
34
34
  import {
35
35
  parseSlackMessageTs,
36
36
  toStoredSlackActor
@@ -40,7 +40,7 @@ import {
40
40
  logException,
41
41
  logWarn,
42
42
  setSpanAttributes
43
- } from "./chunk-TD7ZQZ5W.js";
43
+ } from "./chunk-ZNBGWMVQ.js";
44
44
 
45
45
  // src/chat/turn-context-tag.ts
46
46
  var TURN_CONTEXT_TAG = "runtime-turn-context";
@@ -1615,6 +1615,41 @@ async function recordToolExecutionStarted(args) {
1615
1615
  }
1616
1616
  ]);
1617
1617
  }
1618
+ function attachmentsDeliveredIdempotencyKey(args) {
1619
+ if (args.toolCallId) {
1620
+ return `attachments_delivered:tool:${args.toolCallId}`;
1621
+ }
1622
+ if (args.turnId) {
1623
+ return `attachments_delivered:turn:${args.turnId}:` + args.attachments.map((attachment) => attachment.id).sort().join(",");
1624
+ }
1625
+ return `attachments_delivered:${args.conversationId}:` + args.attachments.map((attachment) => attachment.id).sort().join(",");
1626
+ }
1627
+ async function recordAttachmentsDelivered(args) {
1628
+ if (args.attachments.length === 0) return;
1629
+ await getConversationEventStore().append(args.conversationId, [
1630
+ {
1631
+ // Retries after a successful Slack upload must not create duplicate rows.
1632
+ idempotencyKey: attachmentsDeliveredIdempotencyKey({
1633
+ attachments: args.attachments,
1634
+ conversationId: args.conversationId,
1635
+ ...args.toolCallId ? { toolCallId: args.toolCallId } : {},
1636
+ ...args.turnId ? { turnId: args.turnId } : {}
1637
+ }),
1638
+ data: {
1639
+ type: "attachments_delivered",
1640
+ attachments: args.attachments.map((attachment) => ({
1641
+ id: attachment.id,
1642
+ filename: attachment.filename,
1643
+ contentType: attachment.contentType,
1644
+ bytes: attachment.bytes
1645
+ })),
1646
+ ...args.toolCallId ? { toolCallId: args.toolCallId } : {},
1647
+ ...args.turnId ? { turnId: args.turnId } : {}
1648
+ },
1649
+ createdAtMs: args.createdAtMs ?? Date.now()
1650
+ }
1651
+ ]);
1652
+ }
1618
1653
  async function recordGuardianActionReviewed(args) {
1619
1654
  await getConversationEventStore().append(args.conversationId, [
1620
1655
  {
@@ -3175,6 +3210,7 @@ export {
3175
3210
  loadTurnRoute,
3176
3211
  recordTurnRoute,
3177
3212
  recordToolExecutionStarted,
3213
+ recordAttachmentsDelivered,
3178
3214
  recordGuardianActionReviewed,
3179
3215
  ToolInputError,
3180
3216
  MAX_TEXT_CHARS,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logWarn
3
- } from "./chunk-TD7ZQZ5W.js";
3
+ } from "./chunk-ZNBGWMVQ.js";
4
4
 
5
5
  // src/chat/conversation-privacy.ts
6
6
  import { AsyncLocalStorage } from "async_hooks";
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-FA6POGLH.js";
4
4
  import {
5
5
  getTurnRequestDeadline
6
- } from "./chunk-WTQ3CKC3.js";
6
+ } from "./chunk-LNUZXEEI.js";
7
7
  import {
8
8
  buildSentryConversationUrl,
9
9
  deleteWebAuthorization
10
- } from "./chunk-UG673UVL.js";
10
+ } from "./chunk-472VVYYV.js";
11
11
  import {
12
12
  ensureConversationWake,
13
13
  requestConversationWork
14
- } from "./chunk-FWDN67U3.js";
14
+ } from "./chunk-FKMWPA4A.js";
15
15
  import {
16
16
  buildDeliveredTurnStatePatch,
17
17
  finalizeFailedTurnReplyWithEvent,
@@ -24,7 +24,7 @@ import {
24
24
  requireTurnFailureEventId,
25
25
  resolveTurnSessionRouting,
26
26
  scheduleSessionCompletedPluginTasks
27
- } from "./chunk-NCJV265M.js";
27
+ } from "./chunk-URPLKXLG.js";
28
28
  import {
29
29
  ConversationTurnLifecycleService,
30
30
  coerceThreadConversationState,
@@ -33,7 +33,7 @@ import {
33
33
  getPersistedSandboxState,
34
34
  getPersistedThreadState,
35
35
  persistThreadStateById
36
- } from "./chunk-UKKOKMRE.js";
36
+ } from "./chunk-3AHIB66R.js";
37
37
  import {
38
38
  getVercelConversationWorkQueue
39
39
  } from "./chunk-WR76IVA5.js";
@@ -47,7 +47,7 @@ import {
47
47
  lookupSlackUserProfile,
48
48
  resolvePluginOAuthAccount,
49
49
  runAgentWithTimeout
50
- } from "./chunk-AZW5HKC5.js";
50
+ } from "./chunk-PVIM2RWO.js";
51
51
  import {
52
52
  RetryableDeliveryError
53
53
  } from "./chunk-RF6J3DIO.js";
@@ -63,13 +63,13 @@ import {
63
63
  removeReactionFromMessage,
64
64
  resolveBaseUrl,
65
65
  truncateStatusText
66
- } from "./chunk-DJZPA72K.js";
66
+ } from "./chunk-P7W3ZL5J.js";
67
67
  import {
68
68
  parseSlackThreadId,
69
69
  readSlackRawMessageContext,
70
70
  resolveSlackChannelIdFromMessage,
71
71
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-IJ6KWS3V.js";
72
+ } from "./chunk-56TFPTZU.js";
73
73
  import {
74
74
  CooperativeTurnYieldError,
75
75
  TurnSliceLimitExceededError,
@@ -96,29 +96,29 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-54O6IKUS.js";
99
+ } from "./chunk-RLOXMHLA.js";
100
100
  import {
101
101
  getDashboardConversationLink,
102
102
  getPluginSlackConversationLink
103
- } from "./chunk-EBP6IS66.js";
103
+ } from "./chunk-U26KRMYX.js";
104
104
  import {
105
105
  SlackActionError,
106
106
  getHeaderString,
107
107
  getSlackClient,
108
108
  isDmChannel,
109
109
  normalizeSlackConversationId
110
- } from "./chunk-K2LAI7RW.js";
110
+ } from "./chunk-OUAZDZTZ.js";
111
111
  import {
112
112
  getConversationEventStore,
113
113
  getSqlExecutor,
114
114
  requireSlackDestination,
115
115
  upsertIdentity,
116
116
  upsertLinkedIdentity
117
- } from "./chunk-QODFNKQS.js";
117
+ } from "./chunk-JQZIUESN.js";
118
118
  import {
119
119
  acquireActiveLock,
120
120
  getStateAdapter
121
- } from "./chunk-Q5X37U6G.js";
121
+ } from "./chunk-UNDTW2PY.js";
122
122
  import {
123
123
  botConfig,
124
124
  escapeXml,
@@ -126,18 +126,18 @@ import {
126
126
  getRuntimeMetadata,
127
127
  normalizeSlackEmojiName,
128
128
  standardModelId
129
- } from "./chunk-L2PEQ2PY.js";
129
+ } from "./chunk-J77DLAPE.js";
130
130
  import {
131
131
  discoverSkills
132
- } from "./chunk-U7D4VLUF.js";
132
+ } from "./chunk-XPX3DYG7.js";
133
133
  import {
134
134
  pluginCatalogRuntime
135
- } from "./chunk-CNHELV2P.js";
135
+ } from "./chunk-2SFMRMDV.js";
136
136
  import {
137
137
  buildOAuthTokenRequest,
138
138
  hasRequiredOAuthScope,
139
139
  parseOAuthTokenResponse
140
- } from "./chunk-YCBZ47LC.js";
140
+ } from "./chunk-42E7432W.js";
141
141
  import {
142
142
  createSlackResumeActor,
143
143
  isUserActor,
@@ -153,7 +153,7 @@ import {
153
153
  setTags,
154
154
  toOptionalString,
155
155
  withLogContext
156
- } from "./chunk-TD7ZQZ5W.js";
156
+ } from "./chunk-ZNBGWMVQ.js";
157
157
  import {
158
158
  homeDir
159
159
  } from "./chunk-H4HBKISO.js";
@@ -4,30 +4,30 @@ import {
4
4
  isConversationScopedChannel,
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId
7
- } from "./chunk-K2LAI7RW.js";
7
+ } from "./chunk-OUAZDZTZ.js";
8
8
  import {
9
9
  getConversationEventStore,
10
10
  getDb
11
- } from "./chunk-QODFNKQS.js";
11
+ } from "./chunk-JQZIUESN.js";
12
12
  import {
13
13
  juniorConversationAnnotations,
14
14
  juniorConversationEvents,
15
15
  juniorIdentities,
16
16
  juniorUsers
17
- } from "./chunk-O2DZWUPQ.js";
17
+ } from "./chunk-4UO3UAW7.js";
18
18
  import {
19
19
  SANDBOX_WORKSPACE_ROOT
20
20
  } from "./chunk-EM225ITJ.js";
21
21
  import {
22
22
  getStateAdapter
23
- } from "./chunk-Q5X37U6G.js";
23
+ } from "./chunk-UNDTW2PY.js";
24
24
  import {
25
25
  botConfig,
26
26
  completeObject,
27
27
  embedTexts,
28
28
  getSlackBotToken,
29
29
  standardModelId
30
- } from "./chunk-L2PEQ2PY.js";
30
+ } from "./chunk-J77DLAPE.js";
31
31
  import {
32
32
  isActorUserId,
33
33
  parseActorUserId,
@@ -40,7 +40,7 @@ import {
40
40
  logInfo,
41
41
  logWarn,
42
42
  normalizeIdentityEmail
43
- } from "./chunk-TD7ZQZ5W.js";
43
+ } from "./chunk-ZNBGWMVQ.js";
44
44
 
45
45
  // src/chat/plugins/agent-hooks.ts
46
46
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-L2PEQ2PY.js";
3
+ } from "./chunk-J77DLAPE.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -2,7 +2,7 @@ import {
2
2
  coerceThreadConversationState,
3
3
  getPersistedThreadState,
4
4
  persistThreadStateById
5
- } from "./chunk-UKKOKMRE.js";
5
+ } from "./chunk-3AHIB66R.js";
6
6
  import {
7
7
  pluginTaskId,
8
8
  pluginTaskParamsSchema,
@@ -22,7 +22,7 @@ import {
22
22
  markTurnCompleted,
23
23
  normalizeToolNameFromResult,
24
24
  stripRuntimeTurnContext
25
- } from "./chunk-54O6IKUS.js";
25
+ } from "./chunk-RLOXMHLA.js";
26
26
  import {
27
27
  JUNIOR_THREAD_STATE_TTL_MS
28
28
  } from "./chunk-3Y47VMHV.js";
@@ -33,25 +33,25 @@ import {
33
33
  createPluginModel,
34
34
  createPluginState,
35
35
  getPlugins
36
- } from "./chunk-EBP6IS66.js";
36
+ } from "./chunk-U26KRMYX.js";
37
37
  import {
38
38
  getConversationStore,
39
39
  getDb,
40
40
  sameActorIdentity
41
- } from "./chunk-QODFNKQS.js";
41
+ } from "./chunk-JQZIUESN.js";
42
42
  import {
43
43
  juniorConversations,
44
44
  juniorTaskExecutions
45
- } from "./chunk-O2DZWUPQ.js";
45
+ } from "./chunk-4UO3UAW7.js";
46
46
  import {
47
47
  getStateAdapter
48
- } from "./chunk-Q5X37U6G.js";
48
+ } from "./chunk-UNDTW2PY.js";
49
49
  import {
50
50
  ProviderError,
51
51
  findProviderError,
52
52
  getProviderErrorAttributes,
53
53
  getProviderErrorUserMessage
54
- } from "./chunk-L2PEQ2PY.js";
54
+ } from "./chunk-J77DLAPE.js";
55
55
  import {
56
56
  credentialSubjectSchema
57
57
  } from "./chunk-BDUENQD3.js";
@@ -61,7 +61,7 @@ import {
61
61
  import {
62
62
  buildTurnFailureResponse,
63
63
  logWarn
64
- } from "./chunk-TD7ZQZ5W.js";
64
+ } from "./chunk-ZNBGWMVQ.js";
65
65
 
66
66
  // src/chat/runtime/delivered-turn-state.ts
67
67
  function buildDeliveredTurnStatePatch(args) {
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
87
87
 
88
88
  // src/chat/services/turn-session-routing.ts
89
89
  async function resolveTurnSessionRouting(args) {
90
- const conversationStore = args.conversationStore ?? (await import("./db-BIIMAPFB.js")).getConversationStore();
90
+ const conversationStore = args.conversationStore ?? (await import("./db-2JKT3BB5.js")).getConversationStore();
91
91
  const conversation = await conversationStore.get({
92
92
  conversationId: args.conversationId
93
93
  });
@@ -362,6 +362,16 @@ var conversationReportStructuredEventDataSchema = z2.object({
362
362
  turnId: z2.string().min(1).optional(),
363
363
  presentation: conversationEventPresentationSchema
364
364
  }).strict();
365
+ var conversationReportDeliveredAttachmentSchema = z2.object({
366
+ id: z2.string().min(1),
367
+ filename: z2.string().min(1),
368
+ contentType: z2.string().min(1),
369
+ bytes: z2.number().int().nonnegative()
370
+ }).strict();
371
+ var conversationReportAttachmentsDeliveredEventDataSchema = z2.object({
372
+ type: z2.literal("attachments_delivered"),
373
+ attachments: z2.array(conversationReportDeliveredAttachmentSchema).min(1)
374
+ }).strict();
365
375
  var conversationReportCompactionEventDataSchema = z2.object({
366
376
  type: z2.literal("compaction"),
367
377
  modelProfile: z2.string().min(1).optional(),
@@ -403,6 +413,7 @@ var conversationReportEventDataSchema = z2.discriminatedUnion("type", [
403
413
  conversationReportTurnLifecycleEventDataSchema,
404
414
  conversationReportTurnContextEventDataSchema,
405
415
  conversationReportStructuredEventDataSchema,
416
+ conversationReportAttachmentsDeliveredEventDataSchema,
406
417
  conversationReportTurnRoutedEventDataSchema,
407
418
  conversationReportGuardianActionReviewedEventDataSchema,
408
419
  conversationReportCompactionEventDataSchema,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-FWDN67U3.js";
3
+ } from "./chunk-FKMWPA4A.js";
4
4
  import {
5
5
  ConversationTurnLifecycleService,
6
6
  getPersistedSandboxState,
7
7
  getPersistedThreadState,
8
8
  persistThreadStateById
9
- } from "./chunk-UKKOKMRE.js";
9
+ } from "./chunk-3AHIB66R.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-X7AIXRVJ.js";
18
+ } from "./chunk-756F567I.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-54O6IKUS.js";
29
+ } from "./chunk-RLOXMHLA.js";
30
30
  import {
31
31
  getConversationEventStore,
32
32
  getConversationStore,
33
33
  getSqlExecutor
34
- } from "./chunk-QODFNKQS.js";
34
+ } from "./chunk-JQZIUESN.js";
35
35
  import {
36
36
  juniorAgentBindings,
37
37
  juniorAgentInvocations
38
- } from "./chunk-O2DZWUPQ.js";
38
+ } from "./chunk-4UO3UAW7.js";
39
39
 
40
40
  // src/chat/agent-invocations/work.ts
41
41
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-CNHELV2P.js";
3
+ } from "./chunk-2SFMRMDV.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-TD7ZQZ5W.js";
6
+ } from "./chunk-ZNBGWMVQ.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.159.0",
4
+ version: "0.160.0",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-6GWA276C.js";
10
10
  import {
11
11
  getDeploymentTelemetryAttributes
12
- } from "./chunk-OGMHLKNO.js";
12
+ } from "./chunk-HDPH4CHJ.js";
13
13
 
14
14
  // src/chat/logging.ts
15
15
  import path from "path";