@sentry/junior 0.179.0 → 0.181.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 (137) hide show
  1. package/dist/{agent-hooks-32IDCLMW.js → agent-hooks-IQUW6ERD.js} +16 -18
  2. package/dist/api/schema/workspace.d.ts +2 -0
  3. package/dist/api/schema.js +1 -2
  4. package/dist/api.js +202 -199
  5. package/dist/app.d.ts +4 -0
  6. package/dist/app.js +300 -1259
  7. package/dist/catalog-runtime-PMQWNIXA.js +14 -0
  8. package/dist/chat/agent/sandbox.d.ts +0 -2
  9. package/dist/chat/api-turns/routing.d.ts +4 -0
  10. package/dist/chat/api-turns/work.d.ts +5 -0
  11. package/dist/chat/config.d.ts +5 -2
  12. package/dist/chat/configuration/defaults.d.ts +1 -1
  13. package/dist/chat/conversations/projection.d.ts +6 -4
  14. package/dist/chat/ingress/message-router.d.ts +3 -0
  15. package/dist/chat/model-profile.d.ts +8 -10
  16. package/dist/chat/pi/conversation-events.d.ts +3 -2
  17. package/dist/chat/plugins/agent-hooks.d.ts +1 -1
  18. package/dist/chat/plugins/task-queue.d.ts +40 -3
  19. package/dist/chat/plugins/task-runner.d.ts +1 -1
  20. package/dist/chat/queue/callback.d.ts +26 -0
  21. package/dist/chat/queue/sign.d.ts +30 -0
  22. package/dist/chat/sandbox/sandbox.d.ts +0 -2
  23. package/dist/chat/sandbox/session.d.ts +0 -2
  24. package/dist/chat/sandbox/skill-sync.d.ts +1 -1
  25. package/dist/chat/sandbox/snapshot/events.d.ts +23 -0
  26. package/dist/chat/sandbox/snapshot/job-callback.d.ts +5 -0
  27. package/dist/chat/sandbox/snapshot/job-queue.d.ts +26 -0
  28. package/dist/chat/sandbox/snapshot/job-runner.d.ts +11 -0
  29. package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +6 -0
  30. package/dist/chat/sandbox/snapshot/workspace.d.ts +9 -3
  31. package/dist/chat/services/turn-router.d.ts +4 -3
  32. package/dist/chat/services/turn-session-routing.d.ts +1 -0
  33. package/dist/chat/task-execution/queue-signing.d.ts +10 -21
  34. package/dist/chat/task-execution/state.d.ts +48 -0
  35. package/dist/chat/task-execution/store.d.ts +28 -2
  36. package/dist/chat/task-execution/worker.d.ts +4 -1
  37. package/dist/chat/tools/handoff/tool.d.ts +1 -1
  38. package/dist/chat/tools/types.d.ts +2 -0
  39. package/dist/chat/workspaces/types.d.ts +2 -0
  40. package/dist/{chunk-Q5B3WTGG.js → chunk-3KCQEG6W.js} +42 -41
  41. package/dist/{chunk-XZY6G5YZ.js → chunk-3KSSALN4.js} +180 -87
  42. package/dist/{chunk-3AFVR5UC.js → chunk-3X55QRAG.js} +18 -16
  43. package/dist/{chunk-SLGGOASN.js → chunk-4IX32NSL.js} +46 -46
  44. package/dist/{chunk-6ZWRNC4D.js → chunk-6Y5B5PEX.js} +1 -1
  45. package/dist/chunk-7H2VZTWN.js +103 -0
  46. package/dist/{chunk-CGA4ERJ5.js → chunk-CEMMLV5L.js} +1 -1
  47. package/dist/{chunk-FIANEE7Z.js → chunk-CM5HNV2W.js} +6 -6
  48. package/dist/{chunk-TKB25A3L.js → chunk-CZYNWPWD.js} +2 -1
  49. package/dist/{chunk-3I7XE3PA.js → chunk-D6ZD7VXP.js} +49 -38
  50. package/dist/chunk-DKIJ2RP5.js +68 -0
  51. package/dist/{chunk-G2CAC4CV.js → chunk-DSA6WTRP.js} +74 -68
  52. package/dist/{chunk-OOUNJNMR.js → chunk-DWPN6SCH.js} +1 -1
  53. package/dist/{chunk-HQNE5APD.js → chunk-EBMRB6Z6.js} +100 -79
  54. package/dist/{chunk-ZQMG3CL5.js → chunk-EM7EECT5.js} +16 -16
  55. package/dist/{chunk-XSPSCWLH.js → chunk-ETJTXYHY.js} +4 -4
  56. package/dist/{chunk-FTGD2FBP.js → chunk-EU7KJDOG.js} +2 -2
  57. package/dist/{chunk-CJLBLELR.js → chunk-FWILPBVQ.js} +8 -61
  58. package/dist/{chunk-4GWXAILB.js → chunk-GPA3ZSYY.js} +1 -1
  59. package/dist/{chunk-U4TKB6F6.js → chunk-GREV5PJK.js} +108 -5
  60. package/dist/{chunk-KJLHIHFF.js → chunk-GWFRPQNP.js} +43 -230
  61. package/dist/{chunk-YFNAMRGE.js → chunk-HEBMSITT.js} +1 -1
  62. package/dist/chunk-HJ27A6YB.js +218 -0
  63. package/dist/{chunk-R5NWWYIS.js → chunk-HZHUMCNV.js} +5 -5
  64. package/dist/{chunk-RTRBYSF3.js → chunk-IJ6SS4WB.js} +1 -1
  65. package/dist/{chunk-B6ECUSVX.js → chunk-IKKETMQC.js} +8 -8
  66. package/dist/{chunk-R6U7N4FS.js → chunk-KKSVCHDO.js} +10 -3
  67. package/dist/{chunk-JMJNFEDC.js → chunk-KMBU4PJP.js} +9 -54
  68. package/dist/chunk-KQZX24QQ.js +164 -0
  69. package/dist/{chunk-GPLAT6H7.js → chunk-LCNPXLE7.js} +22 -18
  70. package/dist/{chunk-2HIPYNQI.js → chunk-LG5MYY6U.js} +33 -32
  71. package/dist/chunk-LZOQFC5F.js +209 -0
  72. package/dist/chunk-M3QYTBQ6.js +55 -0
  73. package/dist/{chunk-M63DETLL.js → chunk-N7TMSOZH.js} +6 -6
  74. package/dist/{chunk-FIDMHAO6.js → chunk-NQTA72Q3.js} +84 -274
  75. package/dist/{chunk-RZRYOLCE.js → chunk-PBKZQAUA.js} +2315 -1150
  76. package/dist/chunk-PEQXYSSE.js +45 -0
  77. package/dist/{chunk-3TM3FYLQ.js → chunk-PL57B6NC.js} +1 -1
  78. package/dist/{chunk-JT4WMD3C.js → chunk-PPYDHUEL.js} +144 -218
  79. package/dist/{chunk-5IRROPA5.js → chunk-Q2KY27IX.js} +129 -31
  80. package/dist/{chunk-VP4OVRDD.js → chunk-RNMASWLP.js} +69 -73
  81. package/dist/{chunk-FAS6AIMF.js → chunk-TDT2R77B.js} +8 -8
  82. package/dist/{chunk-TIEKUH4Q.js → chunk-TJHSAHQN.js} +4 -3
  83. package/dist/{chunk-H4HBKISO.js → chunk-TXKUKMVO.js} +1 -1
  84. package/dist/chunk-X6GDDWQH.js +60 -0
  85. package/dist/{chunk-GENV6KF2.js → chunk-XYTJUHRZ.js} +108 -76
  86. package/dist/cli/chat.js +47 -43
  87. package/dist/cli/check.js +13 -15
  88. package/dist/cli/env.js +0 -1
  89. package/dist/cli/init.js +0 -1
  90. package/dist/cli/main.js +2 -3
  91. package/dist/cli/plugins.js +18 -20
  92. package/dist/cli/run.js +0 -1
  93. package/dist/cli/snapshot-create.js +14 -16
  94. package/dist/cli/upgrade.js +16 -18
  95. package/dist/{conversation-work-KATFHLG3.js → conversation-work-VIOQ5ZF3.js} +0 -2
  96. package/dist/db/schema/snapshots.d.ts +17 -0
  97. package/dist/db/schema.d.ts +17 -0
  98. package/dist/{db-EJAV7JL6.js → db-QNPVCQPT.js} +8 -10
  99. package/dist/deployment.d.ts +1 -0
  100. package/dist/{discovery-GUFTFBTL.js → discovery-DWVDM7UK.js} +1 -2
  101. package/dist/{experimental-XVDOSRBS.js → experimental-SIJSRDJD.js} +0 -1
  102. package/dist/instrumentation.js +7 -9
  103. package/dist/nitro.js +39 -13
  104. package/dist/{oauth-callback-server-GAVSUBTQ.js → oauth-callback-server-KYMPJOTC.js} +34 -32
  105. package/dist/{oauth-relay-3ZU72UGL.js → oauth-relay-5XPVRPYB.js} +0 -1
  106. package/dist/{plugins-HW4VWW6G.js → plugins-YTYJMMJF.js} +1 -2
  107. package/dist/{runner-34JL64JF.js → runner-3RS2D2ZR.js} +39 -33
  108. package/dist/{sandbox-egress-signals-DXOOBSBI.js → sandbox-egress-signals-FIL7EGPR.js} +5 -6
  109. package/dist/{sentry-JMWTS32N.js → sentry-MB3NL3IR.js} +1 -2
  110. package/dist/skills-5B3Y6XX6.js +27 -0
  111. package/dist/spawn-VYARS3DU.js +37 -0
  112. package/dist/task-runner-4IXKKZHL.js +32 -0
  113. package/dist/validation-Q65QD27B.js +17 -0
  114. package/dist/vercel.js +0 -1
  115. package/dist/version.js +1 -2
  116. package/dist/work-DCMQWAAP.js +45 -0
  117. package/dist/worker-QL3CHLZL.js +22 -0
  118. package/migrations/0035_workspace_snapshot_size_bytes.sql +2 -0
  119. package/migrations/meta/0035_snapshot.json +3048 -0
  120. package/migrations/meta/_journal.json +7 -0
  121. package/package.json +7 -6
  122. package/dist/catalog-runtime-FBVA6WAQ.js +0 -16
  123. package/dist/chat/plugins/task-callback.d.ts +0 -5
  124. package/dist/chat/plugins/task-message.d.ts +0 -23
  125. package/dist/chat/plugins/task-signing.d.ts +0 -31
  126. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +0 -15
  127. package/dist/chat/services/workspace-snapshot-wait.d.ts +0 -27
  128. package/dist/chunk-5I6ORJUY.js +0 -127
  129. package/dist/chunk-6GWA276C.js +0 -72
  130. package/dist/chunk-MLKGABMK.js +0 -9
  131. package/dist/chunk-UT6X7XN7.js +0 -51
  132. package/dist/chunk-WR76IVA5.js +0 -130
  133. package/dist/skills-U545HALM.js +0 -29
  134. package/dist/spawn-I2S4IDUQ.js +0 -37
  135. package/dist/validation-EVXVGA44.js +0 -19
  136. package/dist/work-QOAUPDBU.js +0 -45
  137. package/dist/worker-5GX2IKLZ.js +0 -24
@@ -0,0 +1,68 @@
1
+ import {
2
+ conversationQueueMessageSchema
3
+ } from "./chunk-JAL3CH4G.js";
4
+ import {
5
+ QUEUE_SIGNATURE_MAX_AGE_MS,
6
+ createVercelQueueClient,
7
+ signQueueMessage,
8
+ verifyQueueMessage
9
+ } from "./chunk-7H2VZTWN.js";
10
+
11
+ // src/chat/task-execution/queue-signing.ts
12
+ var conversationQueueSign = {
13
+ context: "junior.conversation_work_queue.v2",
14
+ schema: conversationQueueMessageSchema,
15
+ separator: ":",
16
+ signatureVersion: "v2",
17
+ parts: (message) => [message.conversationId]
18
+ };
19
+ var CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS = QUEUE_SIGNATURE_MAX_AGE_MS;
20
+ function signConversationQueueMessage(message, nowMs = Date.now()) {
21
+ return signQueueMessage(conversationQueueSign, message, nowMs);
22
+ }
23
+ function verifyConversationQueueMessage(value, nowMs = Date.now()) {
24
+ return verifyQueueMessage(conversationQueueSign, value, nowMs);
25
+ }
26
+
27
+ // src/chat/task-execution/vercel-queue.ts
28
+ var DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC = "junior_conversation_work";
29
+ var CONVERSATION_WORK_QUEUE_RETENTION_SECONDS = CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS / 1e3;
30
+ var defaultQueue;
31
+ function resolveConversationWorkQueueTopic(options = {}) {
32
+ const topic = options.topic?.trim();
33
+ return topic || process.env.JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC?.trim() || DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC;
34
+ }
35
+ function toDelaySeconds(options) {
36
+ if (!options?.delayMs || options.delayMs <= 0) {
37
+ return void 0;
38
+ }
39
+ return Math.ceil(options.delayMs / 1e3);
40
+ }
41
+ function createVercelConversationWorkQueue(options = {}) {
42
+ const topic = resolveConversationWorkQueueTopic(options);
43
+ const client = options.client ?? createVercelQueueClient();
44
+ return {
45
+ async send(message, sendOptions) {
46
+ const result = await client.send(
47
+ topic,
48
+ signConversationQueueMessage(message),
49
+ {
50
+ idempotencyKey: sendOptions?.idempotencyKey,
51
+ delaySeconds: toDelaySeconds(sendOptions),
52
+ retentionSeconds: options.retentionSeconds ?? CONVERSATION_WORK_QUEUE_RETENTION_SECONDS
53
+ }
54
+ );
55
+ return result.messageId ? { messageId: result.messageId } : {};
56
+ }
57
+ };
58
+ }
59
+ function getVercelConversationWorkQueue() {
60
+ defaultQueue ??= createVercelConversationWorkQueue();
61
+ return defaultQueue;
62
+ }
63
+
64
+ export {
65
+ verifyConversationQueueMessage,
66
+ resolveConversationWorkQueueTopic,
67
+ getVercelConversationWorkQueue
68
+ };
@@ -4,11 +4,7 @@ import {
4
4
  import {
5
5
  buildSentryConversationUrl,
6
6
  deleteWebAuthorization
7
- } from "./chunk-FTGD2FBP.js";
8
- import {
9
- ensureConversationWake,
10
- requestConversationWork
11
- } from "./chunk-5IRROPA5.js";
7
+ } from "./chunk-EU7KJDOG.js";
12
8
  import {
13
9
  buildDeliveredTurnStatePatch,
14
10
  finalizeFailedTurnReplyWithEvent,
@@ -18,22 +14,23 @@ import {
18
14
  getTurnUserReplyAttachmentContext,
19
15
  getTurnUserSlackMessageTs,
20
16
  persistAuthPauseTurnState,
21
- requireTurnFailureEventId,
17
+ requireTurnFailureEventId
18
+ } from "./chunk-LZOQFC5F.js";
19
+ import {
22
20
  resolveTurnSessionRouting,
23
21
  scheduleSessionCompletedPluginTasks
24
- } from "./chunk-KJLHIHFF.js";
22
+ } from "./chunk-GWFRPQNP.js";
23
+ import {
24
+ ConversationTurnLifecycleService
25
+ } from "./chunk-M3QYTBQ6.js";
25
26
  import {
26
- ConversationTurnLifecycleService,
27
27
  coerceThreadConversationState,
28
28
  configValueSchema,
29
29
  getLocationConfigurationService,
30
30
  getPersistedSandboxState,
31
31
  getPersistedThreadState,
32
32
  persistThreadStateById
33
- } from "./chunk-CJLBLELR.js";
34
- import {
35
- getVercelConversationWorkQueue
36
- } from "./chunk-WR76IVA5.js";
33
+ } from "./chunk-FWILPBVQ.js";
37
34
  import {
38
35
  createUserTokenStore,
39
36
  deleteMcpAuthSession,
@@ -44,10 +41,7 @@ import {
44
41
  lookupSlackUserProfile,
45
42
  resolvePluginOAuthAccount,
46
43
  runAgentWithTimeout
47
- } from "./chunk-Q5B3WTGG.js";
48
- import {
49
- getTurnRequestDeadline
50
- } from "./chunk-4GWXAILB.js";
44
+ } from "./chunk-3KCQEG6W.js";
51
45
  import {
52
46
  RetryableDeliveryError
53
47
  } from "./chunk-RF6J3DIO.js";
@@ -63,32 +57,38 @@ import {
63
57
  removeReactionFromMessage,
64
58
  resolveBaseUrl,
65
59
  truncateStatusText
66
- } from "./chunk-2HIPYNQI.js";
60
+ } from "./chunk-LG5MYY6U.js";
67
61
  import {
68
62
  parseSlackThreadId,
69
63
  readSlackRawMessageContext,
70
64
  resolveSlackChannelIdFromMessage,
71
65
  resolveSlackChannelIdFromThreadId
72
- } from "./chunk-FAS6AIMF.js";
66
+ } from "./chunk-TDT2R77B.js";
67
+ import {
68
+ ensureConversationWake,
69
+ requestConversationWork
70
+ } from "./chunk-Q2KY27IX.js";
73
71
  import {
74
72
  CooperativeTurnYieldError,
73
+ clearPendingAuth,
74
+ getAssistantReplyText,
75
+ getConversationPendingAuth,
76
+ isCooperativeTurnYieldError,
77
+ isPendingAuthLatestRequest,
78
+ markTurnFailed
79
+ } from "./chunk-HJ27A6YB.js";
80
+ import {
75
81
  TurnSliceLimitExceededError,
76
82
  abandonTurnRecord,
77
83
  buildConversationContext,
78
84
  buildTurnLimitResponse,
79
- clearPendingAuth,
80
85
  commitAcceptedReply,
81
86
  failTurnRecord,
82
- getAssistantReplyText,
83
- getConversationPendingAuth,
84
87
  getTurnRecord,
85
88
  hydrateConversationMessages,
86
- isCooperativeTurnYieldError,
87
- isPendingAuthLatestRequest,
88
89
  loadProjection,
89
90
  loadTurnCheckpoint,
90
91
  markConversationMessage,
91
- markTurnFailed,
92
92
  persistWithRetry,
93
93
  recordAuthenticationLinked,
94
94
  recordAuthorizationCompleted,
@@ -96,7 +96,13 @@ import {
96
96
  recordTurnSummary,
97
97
  saveTurnCheckpoint,
98
98
  turnHasReply
99
- } from "./chunk-FIDMHAO6.js";
99
+ } from "./chunk-NQTA72Q3.js";
100
+ import {
101
+ getVercelConversationWorkQueue
102
+ } from "./chunk-DKIJ2RP5.js";
103
+ import {
104
+ getTurnRequestDeadline
105
+ } from "./chunk-GPA3ZSYY.js";
100
106
  import {
101
107
  SlackActionError,
102
108
  getDashboardConversationLink,
@@ -105,43 +111,46 @@ import {
105
111
  getSlackClient,
106
112
  isDmChannel,
107
113
  normalizeSlackConversationId
108
- } from "./chunk-3I7XE3PA.js";
114
+ } from "./chunk-D6ZD7VXP.js";
109
115
  import {
110
116
  getConversationEventStore,
111
117
  getSqlExecutor,
112
118
  requireSlackDestination,
113
119
  upsertIdentity,
114
120
  upsertLinkedIdentity
115
- } from "./chunk-VP4OVRDD.js";
121
+ } from "./chunk-RNMASWLP.js";
116
122
  import {
117
123
  acquireActiveLock,
118
124
  getStateAdapter
119
- } from "./chunk-3TM3FYLQ.js";
125
+ } from "./chunk-PL57B6NC.js";
120
126
  import {
121
127
  botConfig,
128
+ defaultModelId,
122
129
  escapeXml,
123
130
  getChatConfig,
124
131
  getRuntimeMetadata,
125
- normalizeSlackEmojiName,
126
- standardModelId
127
- } from "./chunk-GENV6KF2.js";
132
+ normalizeSlackEmojiName
133
+ } from "./chunk-XYTJUHRZ.js";
128
134
  import {
129
135
  discoverSkills
130
- } from "./chunk-ZQMG3CL5.js";
136
+ } from "./chunk-EM7EECT5.js";
131
137
  import {
132
138
  pluginCatalogRuntime
133
- } from "./chunk-YFNAMRGE.js";
139
+ } from "./chunk-HEBMSITT.js";
134
140
  import {
135
141
  buildOAuthTokenRequest,
136
142
  hasRequiredOAuthScope,
137
143
  parseOAuthTokenResponse
138
- } from "./chunk-SLGGOASN.js";
144
+ } from "./chunk-4IX32NSL.js";
139
145
  import {
140
146
  createSlackResumeActor,
141
147
  isUserActor,
142
148
  parseSlackMessageTs,
143
149
  parseSlackUserId
144
- } from "./chunk-M63DETLL.js";
150
+ } from "./chunk-N7TMSOZH.js";
151
+ import {
152
+ homeDir
153
+ } from "./chunk-TXKUKMVO.js";
145
154
  import {
146
155
  buildTurnFailureResponse,
147
156
  logException,
@@ -151,10 +160,7 @@ import {
151
160
  setTags,
152
161
  toOptionalString,
153
162
  withLogContext
154
- } from "./chunk-HQNE5APD.js";
155
- import {
156
- homeDir
157
- } from "./chunk-H4HBKISO.js";
163
+ } from "./chunk-EBMRB6Z6.js";
158
164
 
159
165
  // src/chat/slack/assistant-thread/status-render.ts
160
166
  var DEFAULT_STATUS_CONTEXTS = {
@@ -450,7 +456,7 @@ function createSlackWebApiStatusSender(args) {
450
456
  channel_id: normalizedChannelId,
451
457
  thread_ts: threadTs,
452
458
  status: text ? SLACK_ASSISTANT_ACTIVE_STATUS : "",
453
- ...nextLoadingMessages ? { loading_messages: nextLoadingMessages } : {}
459
+ ...nextLoadingMessages ? { loading_messages: nextLoadingMessages } : void 0
454
460
  });
455
461
  } catch (error) {
456
462
  logAssistantStatusFailure({
@@ -536,7 +542,7 @@ function buildSlackReplyFooter(args) {
536
542
  items.push(idItem);
537
543
  }
538
544
  return items.length > 0 || args.replyAttribution ? {
539
- ...args.replyAttribution ? { attribution: args.replyAttribution } : {},
545
+ ...args.replyAttribution ? { attribution: args.replyAttribution } : void 0,
540
546
  items
541
547
  } : void 0;
542
548
  }
@@ -796,7 +802,7 @@ ${escapeSlackMrkdwnText(formatReplyAttribution(args.replyAttribution))}` : text;
796
802
  channelId: args.channelId,
797
803
  threadTs: args.threadTs,
798
804
  text: fallbackText,
799
- ...blocks ? { blocks } : {}
805
+ ...blocks ? { blocks } : void 0
800
806
  });
801
807
  if (response.ts) {
802
808
  messageTs.push(response.ts);
@@ -880,11 +886,11 @@ function isSlackTitlePermissionError(error) {
880
886
  function escapeRegExp(value) {
881
887
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
882
888
  }
883
- function readObjectField(value, key) {
884
- return value[key];
885
- }
886
889
  function readOptionalStringField(value, key) {
887
- return toOptionalString(readObjectField(value, key));
890
+ if (!(key in value)) {
891
+ return void 0;
892
+ }
893
+ return toOptionalString(value[key]);
888
894
  }
889
895
  function stripLeadingBotMention(text, options = {}) {
890
896
  if (!text.trim()) return text;
@@ -1156,7 +1162,7 @@ function getResumeLogContext(args, lockKey) {
1156
1162
  userName: isUserActor(actor) ? actor.userName : void 0,
1157
1163
  destinationName: args.channelId,
1158
1164
  assistantUserName: botConfig.userName,
1159
- modelId: standardModelId(botConfig)
1165
+ modelId: defaultModelId(botConfig)
1160
1166
  };
1161
1167
  }
1162
1168
  async function postResumeFailureReply(args) {
@@ -1184,7 +1190,7 @@ async function handleResumeFailure(args) {
1184
1190
  turnId: args.resumeArgs.turnId,
1185
1191
  createdAtMs: Date.now(),
1186
1192
  failureCode: "persistence_failed",
1187
- ...persistEventId ? { eventId: persistEventId } : {}
1193
+ ...persistEventId ? { eventId: persistEventId } : void 0
1188
1194
  });
1189
1195
  } catch (lifecycleError) {
1190
1196
  logException(
@@ -1214,7 +1220,7 @@ async function handleResumeFailure(args) {
1214
1220
  turnId: args.resumeArgs.turnId,
1215
1221
  createdAtMs: Date.now(),
1216
1222
  failureCode: "delivery_failed",
1217
- ...deliveryEventId ? { eventId: deliveryEventId } : {}
1223
+ ...deliveryEventId ? { eventId: deliveryEventId } : void 0
1218
1224
  });
1219
1225
  } catch (lifecycleError) {
1220
1226
  logException(
@@ -1263,7 +1269,7 @@ function createResumeReplyContext(args, statusSession, delivery) {
1263
1269
  source: source.platform === "slack" ? {
1264
1270
  ...source,
1265
1271
  channelId: args.channelId,
1266
- ...args.threadTs ? { threadTs: args.threadTs } : {}
1272
+ ...args.threadTs ? { threadTs: args.threadTs } : void 0
1267
1273
  } : source,
1268
1274
  deadlineAtMs: replyContext.deadlineAtMs ?? requestDeadline?.deadlineAtMs,
1269
1275
  environment: {
@@ -1380,7 +1386,7 @@ async function resumeSlackTurnInContext(args) {
1380
1386
  return {
1381
1387
  conversation: deliveryConversation,
1382
1388
  sessionId,
1383
- ...userMessageId2 ? { userMessageId: userMessageId2 } : {}
1389
+ ...userMessageId2 ? { userMessageId: userMessageId2 } : void 0
1384
1390
  };
1385
1391
  }
1386
1392
  const persistedState = await getPersistedThreadState(
@@ -1396,7 +1402,7 @@ async function resumeSlackTurnInContext(args) {
1396
1402
  return {
1397
1403
  conversation,
1398
1404
  sessionId,
1399
- ...userMessageId ? { userMessageId } : {}
1405
+ ...userMessageId ? { userMessageId } : void 0
1400
1406
  };
1401
1407
  };
1402
1408
  const deliverAssistantMessage = async (reply) => {
@@ -1444,7 +1450,7 @@ async function resumeSlackTurnInContext(args) {
1444
1450
  const providerConversationIds = runArgs.threadTs ? [runArgs.threadTs] : slackMessageTs;
1445
1451
  await persistWithRetry(
1446
1452
  () => commitAcceptedReply({
1447
- ...message ? { agentMessage: message } : {},
1453
+ ...message ? { agentMessage: message } : void 0,
1448
1454
  conversation: deliveryState2.conversation,
1449
1455
  conversationMessageId: recordedMessageId,
1450
1456
  conversationId,
@@ -1457,7 +1463,7 @@ async function resumeSlackTurnInContext(args) {
1457
1463
  providerConversationId
1458
1464
  })
1459
1465
  )
1460
- } : {}
1466
+ } : void 0
1461
1467
  })
1462
1468
  );
1463
1469
  } catch (error) {
@@ -1524,7 +1530,7 @@ async function resumeSlackTurnInContext(args) {
1524
1530
  deferredAuthInfo = {
1525
1531
  providerDisplayName: outcome.providerDisplayName,
1526
1532
  actorId: isUserActor(resumeActor) ? resumeActor.userId : void 0,
1527
- ...outcome.requestText ? { requestText: outcome.requestText } : {}
1533
+ ...outcome.requestText ? { requestText: outcome.requestText } : void 0
1528
1534
  };
1529
1535
  deferredPauseHandler = async () => {
1530
1536
  await onAuthPause({
@@ -1594,8 +1600,8 @@ async function resumeSlackTurnInContext(args) {
1594
1600
  destinationVisibility: replyContext.destinationVisibility,
1595
1601
  dispatchId: replyContext.dispatch?.id,
1596
1602
  dispatchOutcome: reply.diagnostics.outcome === "success" ? "completed" : "failed",
1597
- ...dispatchErrorMessage ? { errorMessage: dispatchErrorMessage } : {},
1598
- ...acceptedDeliveryId ? { resultMessageId: acceptedDeliveryId } : {},
1603
+ ...dispatchErrorMessage ? { errorMessage: dispatchErrorMessage } : void 0,
1604
+ ...acceptedDeliveryId ? { resultMessageId: acceptedDeliveryId } : void 0,
1599
1605
  source: replyContext.source,
1600
1606
  actor: resumeActor,
1601
1607
  surface: replyContext.surface ?? "slack",
@@ -1608,7 +1614,7 @@ async function resumeSlackTurnInContext(args) {
1608
1614
  destinationVisibility: replyContext.destinationVisibility,
1609
1615
  dispatchId: replyContext.dispatch?.id,
1610
1616
  dispatchOutcome: reply.diagnostics.outcome === "success" ? "completed" : "failed",
1611
- ...acceptedDeliveryId ? { resultMessageId: acceptedDeliveryId } : {},
1617
+ ...acceptedDeliveryId ? { resultMessageId: acceptedDeliveryId } : void 0,
1612
1618
  turnId: runArgs.turnId,
1613
1619
  sliceId: runArgs.sliceId ?? 1,
1614
1620
  source: replyContext.source,
@@ -1630,7 +1636,7 @@ async function resumeSlackTurnInContext(args) {
1630
1636
  turnId: runArgs.turnId,
1631
1637
  createdAtMs: Date.now(),
1632
1638
  failureCode: "model_execution_failed",
1633
- ...finalized.eventId ? { eventId: finalized.eventId } : {}
1639
+ ...finalized.eventId ? { eventId: finalized.eventId } : void 0
1634
1640
  });
1635
1641
  }
1636
1642
  if (reply.diagnostics.outcome === "success") {
@@ -1704,7 +1710,7 @@ async function resumeSlackTurnInContext(args) {
1704
1710
  turnId: runArgs.turnId,
1705
1711
  createdAtMs: Date.now(),
1706
1712
  failureCode: "persistence_failed",
1707
- ...eventId ? { eventId } : {}
1713
+ ...eventId ? { eventId } : void 0
1708
1714
  });
1709
1715
  throw postDeliveryCommitError;
1710
1716
  }
@@ -2269,7 +2275,7 @@ async function GET(request, provider, waitUntil, options) {
2269
2275
  sessionId: authSession.sessionId
2270
2276
  }),
2271
2277
  turnId: authSession.sessionId,
2272
- ...providerLabel ? { providerLabel } : {}
2278
+ ...providerLabel ? { providerLabel } : void 0
2273
2279
  });
2274
2280
  } catch (error2) {
2275
2281
  logException(error2, "mcp.oauth_callback.authentication_event.failed", {
@@ -2507,7 +2513,7 @@ function oauthTokenErrorAttributes(provider, endpoint, status) {
2507
2513
  "app.credential.provider": provider,
2508
2514
  "app.oauth.error.phase": "token_exchange",
2509
2515
  "server.address": new URL(endpoint).hostname,
2510
- ...status !== void 0 ? { "http.response.status_code": status } : {}
2516
+ ...status !== void 0 ? { "http.response.status_code": status } : void 0
2511
2517
  };
2512
2518
  }
2513
2519
  async function persistCompletedOAuthReplyState(args) {
@@ -2596,7 +2602,7 @@ async function resumeOAuthSessionRecordTurn(stored, options) {
2596
2602
  kind: "plugin",
2597
2603
  provider: stored.provider,
2598
2604
  actorId: stored.userId,
2599
- ...stored.scope ? { scope: stored.scope } : {}
2605
+ ...stored.scope ? { scope: stored.scope } : void 0
2600
2606
  });
2601
2607
  const resolvedSessionId = pendingAuth?.sessionId ?? stored.resumeSessionId;
2602
2608
  const userMessage = resolvedSessionId ? getTurnUserMessage(conversation, resolvedSessionId) : void 0;
@@ -2657,7 +2663,7 @@ async function resumeOAuthSessionRecordTurn(stored, options) {
2657
2663
  kind: "plugin",
2658
2664
  provider: stored.provider,
2659
2665
  actorId: stored.userId,
2660
- ...stored.scope ? { scope: stored.scope } : {}
2666
+ ...stored.scope ? { scope: stored.scope } : void 0
2661
2667
  });
2662
2668
  const lockedSessionId = lockedPendingAuth?.sessionId ?? stored.resumeSessionId;
2663
2669
  if (lockedSessionId !== resolvedSessionId) {
@@ -2995,7 +3001,7 @@ async function GET2(request, provider, waitUntil, options) {
2995
3001
  }
2996
3002
  await userTokenStore.set(stored.userId, provider, {
2997
3003
  ...parsedTokenResponse,
2998
- ...account ? { account } : {}
3004
+ ...account ? { account } : void 0
2999
3005
  });
3000
3006
  const slackActor = stored.actor?.platform === "slack" ? stored.actor : void 0;
3001
3007
  if (account && slackActor) {
@@ -3013,7 +3019,7 @@ async function GET2(request, provider, waitUntil, options) {
3013
3019
  providerSubjectId: profile.id,
3014
3020
  displayName: profile.real_name || profile.display_name,
3015
3021
  handle: profile.name,
3016
- ...profile.email ? { email: profile.email, emailVerified: true } : {}
3022
+ ...profile.email ? { email: profile.email, emailVerified: true } : void 0
3017
3023
  });
3018
3024
  if (!slackIdentity.userId) {
3019
3025
  throw new Error("OAuth Slack identity is not linked to a user");
@@ -3039,14 +3045,14 @@ async function GET2(request, provider, waitUntil, options) {
3039
3045
  provider,
3040
3046
  actorId: stored.userId,
3041
3047
  providerLabel,
3042
- ...account?.label ? { accountLabel: account.label } : {},
3048
+ ...account?.label ? { accountLabel: account.label } : void 0,
3043
3049
  ...stored.resumeSessionId ? {
3044
3050
  authorizationId: pluginAuthorizationId({
3045
3051
  provider,
3046
3052
  sessionId: stored.resumeSessionId
3047
3053
  }),
3048
3054
  turnId: stored.resumeSessionId
3049
- } : {}
3055
+ } : void 0
3050
3056
  });
3051
3057
  },
3052
3058
  "oauth.callback.authentication_event.failed",
@@ -4,7 +4,7 @@ import {
4
4
  isFile,
5
5
  isValidPackageName,
6
6
  resolvePackageLocation
7
- } from "./chunk-H4HBKISO.js";
7
+ } from "./chunk-TXKUKMVO.js";
8
8
 
9
9
  // src/chat/plugins/package-discovery.ts
10
10
  import path from "path";