@sentry/junior 0.187.0 → 0.188.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 (69) hide show
  1. package/dist/{agent-hooks-XVAE2554.js → agent-hooks-5RQEVLQD.js} +11 -11
  2. package/dist/api.js +31 -31
  3. package/dist/app.js +52 -46
  4. package/dist/{catalog-runtime-DWFAC562.js → catalog-runtime-L4A6BJ3U.js} +4 -4
  5. package/dist/chat/agent/types.d.ts +8 -12
  6. package/dist/chat/agent-invocations/types.d.ts +72 -0
  7. package/dist/chat/conversations/location.d.ts +3 -8
  8. package/dist/chat/conversations/store.d.ts +4 -7
  9. package/dist/chat/event-tasks/tool-support.d.ts +6 -0
  10. package/dist/chat/services/turn-session-routing.d.ts +5 -5
  11. package/dist/chat/task-execution/slack-resource-event.d.ts +13 -5
  12. package/dist/{chunk-7LRRVMPH.js → chunk-32XSSFZV.js} +1 -1
  13. package/dist/{chunk-Z6OHCDXP.js → chunk-3HEZWDS5.js} +2 -2
  14. package/dist/{chunk-WRDW3A3D.js → chunk-6JZGXLL2.js} +5 -5
  15. package/dist/{chunk-D5BWM37G.js → chunk-6YGFBU3A.js} +12 -12
  16. package/dist/{chunk-WL3R2KTS.js → chunk-AW77HH54.js} +92 -10
  17. package/dist/{chunk-TQHCZXN7.js → chunk-CDSLOYOR.js} +5 -5
  18. package/dist/{chunk-27T5HZHO.js → chunk-CIG6WI7Q.js} +6 -87
  19. package/dist/{chunk-4A2R3AQB.js → chunk-CVBDVIF4.js} +1 -1
  20. package/dist/{chunk-2VUDJGB6.js → chunk-CZRWU4ZM.js} +1 -1
  21. package/dist/{chunk-OM4SFFJK.js → chunk-ERZMACYA.js} +2 -2
  22. package/dist/{chunk-Q6OCUQ7W.js → chunk-FIUCHYT6.js} +1 -1
  23. package/dist/{chunk-U3KMII5Y.js → chunk-HCIVBCP5.js} +1 -1
  24. package/dist/{chunk-WKIS4VRK.js → chunk-IUUQWIG2.js} +14 -31
  25. package/dist/{chunk-4YD3DET6.js → chunk-LODJKINF.js} +19 -20
  26. package/dist/{chunk-NIKLTFBP.js → chunk-MQDIIFZM.js} +4 -4
  27. package/dist/{chunk-QH3I7ZOK.js → chunk-NZLZ4KYZ.js} +1 -1
  28. package/dist/{chunk-ITLYUKGZ.js → chunk-PSHMPRIU.js} +1 -1
  29. package/dist/{chunk-URZ7UD4P.js → chunk-Q7O74WOO.js} +2 -2
  30. package/dist/{chunk-DUE4EUNL.js → chunk-QCGNHSMA.js} +6 -6
  31. package/dist/{chunk-EIWYZXSM.js → chunk-QDHJTKPE.js} +5 -5
  32. package/dist/{chunk-6YCIYOVA.js → chunk-QIMN3FXL.js} +1 -1
  33. package/dist/{chunk-X5SXFVZT.js → chunk-QIOUTXTZ.js} +1 -1
  34. package/dist/{chunk-HXR3FHTE.js → chunk-QVH6FW3T.js} +1 -1
  35. package/dist/{chunk-U5POFCKM.js → chunk-RMB7CERI.js} +26 -26
  36. package/dist/{chunk-KRYJ5VOD.js → chunk-SC67CH3C.js} +13 -15
  37. package/dist/{chunk-6FKNNUSN.js → chunk-UVUXFRYN.js} +6 -6
  38. package/dist/{chunk-MUPPP7A7.js → chunk-VFZAUQ5V.js} +6 -6
  39. package/dist/{chunk-BITZUBPJ.js → chunk-W2DDJCPS.js} +8 -8
  40. package/dist/{chunk-VC343WHM.js → chunk-W42ENMJW.js} +1 -1
  41. package/dist/{chunk-JCRXXEMC.js → chunk-WGZJ5SU4.js} +1 -1
  42. package/dist/{chunk-P2VU5JNH.js → chunk-WW2Y7JIA.js} +27 -26
  43. package/dist/{chunk-JZPDYKRG.js → chunk-X55FOVZO.js} +3 -3
  44. package/dist/{chunk-STF4GSK4.js → chunk-XI4PVY2T.js} +3 -3
  45. package/dist/{chunk-D3GDGREI.js → chunk-XJIPMHKI.js} +3 -3
  46. package/dist/{chunk-NU775DLU.js → chunk-Z5SKZE5B.js} +1 -1
  47. package/dist/{chunk-U6ZQHRIP.js → chunk-ZX7RSBQ6.js} +1 -1
  48. package/dist/cli/chat.js +32 -32
  49. package/dist/cli/check.js +5 -5
  50. package/dist/cli/plugins.js +12 -12
  51. package/dist/cli/snapshot-create.js +9 -9
  52. package/dist/cli/upgrade.js +6 -6
  53. package/dist/db/schema/agent-invocations.d.ts +36 -0
  54. package/dist/db/schema.d.ts +36 -0
  55. package/dist/{db-FBHAWVXU.js → db-YPRZAA2T.js} +6 -6
  56. package/dist/instrumentation.js +3 -3
  57. package/dist/nitro.js +6 -6
  58. package/dist/{oauth-callback-server-5HS5ULC6.js → oauth-callback-server-DBBIR3XG.js} +27 -27
  59. package/dist/{runner-46W6NV6B.js → runner-FKVFFPLO.js} +20 -20
  60. package/dist/{skills-TG3QC4B6.js → skills-4RBAZEMV.js} +5 -5
  61. package/dist/spawn-CO7QFCNJ.js +41 -0
  62. package/dist/task-runner-DUGZGI7V.js +34 -0
  63. package/dist/{validation-GMRIDBC5.js → validation-E6Z5LHZM.js} +5 -5
  64. package/dist/version.js +1 -1
  65. package/dist/{work-W4ULBJTU.js → work-OFTXWOK4.js} +20 -20
  66. package/dist/{worker-M6NVACS2.js → worker-OMWNOKTJ.js} +10 -10
  67. package/package.json +5 -5
  68. package/dist/spawn-Y6YWBIJS.js +0 -41
  69. package/dist/task-runner-YSGBPN4U.js +0 -34
@@ -7,7 +7,7 @@ import {
7
7
  PluginCredentialFailureError,
8
8
  agentNameSchema,
9
9
  createPluginAuthOrchestration
10
- } from "./chunk-WRDW3A3D.js";
10
+ } from "./chunk-6JZGXLL2.js";
11
11
  import {
12
12
  parseSandboxEgressAuthRequiredSignal,
13
13
  parseSandboxEgressPermissionDeniedSignal,
@@ -38,7 +38,7 @@ import {
38
38
  searchSlackUsers,
39
39
  selectPluginGrant,
40
40
  toMcpProviderError
41
- } from "./chunk-BITZUBPJ.js";
41
+ } from "./chunk-W2DDJCPS.js";
42
42
  import {
43
43
  addReactionToMessage,
44
44
  deliverOAuthAuthorization,
@@ -46,7 +46,7 @@ import {
46
46
  getSlackMessagePermalink,
47
47
  resolveBaseUrl,
48
48
  uploadFilesToConversation
49
- } from "./chunk-6FKNNUSN.js";
49
+ } from "./chunk-UVUXFRYN.js";
50
50
  import {
51
51
  SCHEDULED_TASK_SYSTEM_ACTOR,
52
52
  WORKSPACE_SNAPSHOT_FAILED_EVENT,
@@ -87,10 +87,10 @@ import {
87
87
  workspaceSnapshotFinishedEvent,
88
88
  workspaceSnapshotWatch,
89
89
  writableEventTask
90
- } from "./chunk-MUPPP7A7.js";
90
+ } from "./chunk-VFZAUQ5V.js";
91
91
  import {
92
92
  parseSlackThreadId
93
- } from "./chunk-4A2R3AQB.js";
93
+ } from "./chunk-CVBDVIF4.js";
94
94
  import {
95
95
  RetryableDeliveryError,
96
96
  actorFromRun,
@@ -111,7 +111,7 @@ import {
111
111
  isNoReplyMarker,
112
112
  isTurnInputCommitLostError,
113
113
  sanitizeAssistantText
114
- } from "./chunk-NU775DLU.js";
114
+ } from "./chunk-Z5SKZE5B.js";
115
115
  import {
116
116
  AGENTS_REMOVAL_NOTICE,
117
117
  AGENTS_REPLACEMENT_NOTICE,
@@ -171,7 +171,7 @@ import {
171
171
  stripRuntimeTurnContext,
172
172
  trimTrailingAssistantMessages,
173
173
  truncateText
174
- } from "./chunk-D5BWM37G.js";
174
+ } from "./chunk-6YGFBU3A.js";
175
175
  import {
176
176
  bindSandboxFileSystem,
177
177
  createSandboxSession,
@@ -182,7 +182,7 @@ import {
182
182
  resolve,
183
183
  setSnapshotSpanAttributes,
184
184
  stopSession
185
- } from "./chunk-D3GDGREI.js";
185
+ } from "./chunk-XJIPMHKI.js";
186
186
  import {
187
187
  privateTraceResultAttributes
188
188
  } from "./chunk-UIE3R5XU.js";
@@ -195,7 +195,7 @@ import {
195
195
  } from "./chunk-DKIJ2RP5.js";
196
196
  import {
197
197
  getTurnRequestDeadline
198
- } from "./chunk-JCRXXEMC.js";
198
+ } from "./chunk-WGZJ5SU4.js";
199
199
  import {
200
200
  RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS,
201
201
  RESOURCE_SUBSCRIPTION_MAX_TTL_MS,
@@ -239,19 +239,19 @@ import {
239
239
  updateWorkspace,
240
240
  withSlackRetries,
241
241
  workspaceRepoCheckoutPath
242
- } from "./chunk-DUE4EUNL.js";
242
+ } from "./chunk-QCGNHSMA.js";
243
243
  import {
244
244
  getConversationEventStore,
245
245
  getConversationMessageSearchStore,
246
246
  getConversationStore,
247
247
  getDb,
248
248
  getSqlExecutor
249
- } from "./chunk-WKIS4VRK.js";
249
+ } from "./chunk-IUUQWIG2.js";
250
250
  import {
251
251
  juniorArtifacts,
252
252
  juniorIdentities,
253
253
  juniorSchedulerRuns
254
- } from "./chunk-HXR3FHTE.js";
254
+ } from "./chunk-QVH6FW3T.js";
255
255
  import {
256
256
  SANDBOX_DATA_ROOT,
257
257
  SANDBOX_REPOS_ROOT,
@@ -282,12 +282,12 @@ import {
282
282
  throwSandboxOperationError,
283
283
  workspaceSnapshotNotReadyUserMessage,
284
284
  wrapSandboxSetupError
285
- } from "./chunk-JZPDYKRG.js";
285
+ } from "./chunk-X55FOVZO.js";
286
286
  import {
287
287
  fenceLock,
288
288
  getStateAdapter,
289
289
  withLock
290
- } from "./chunk-U6ZQHRIP.js";
290
+ } from "./chunk-ZX7RSBQ6.js";
291
291
  import {
292
292
  KNOWN_CONVERSATION_EVENT_TYPES,
293
293
  contextProvenance,
@@ -320,7 +320,7 @@ import {
320
320
  resolveGatewayCredential,
321
321
  resolveGatewayModel,
322
322
  unwrapCurrentInstruction
323
- } from "./chunk-URZ7UD4P.js";
323
+ } from "./chunk-Q7O74WOO.js";
324
324
  import {
325
325
  ModelProfileNotConfiguredError,
326
326
  TURN_REASONING_LEVELS,
@@ -337,16 +337,16 @@ import {
337
337
  toGenAiMessagesTraceAttributes,
338
338
  toGenAiPayloadMetadata,
339
339
  toGenAiPayloadTraceAttributes
340
- } from "./chunk-Q6OCUQ7W.js";
340
+ } from "./chunk-FIUCHYT6.js";
341
341
  import {
342
342
  discoverSkills,
343
343
  findSkillByName,
344
344
  loadSkillsByName,
345
345
  parseSkillInvocation
346
- } from "./chunk-Z6OHCDXP.js";
346
+ } from "./chunk-3HEZWDS5.js";
347
347
  import {
348
348
  pluginCatalogRuntime
349
- } from "./chunk-QH3I7ZOK.js";
349
+ } from "./chunk-NZLZ4KYZ.js";
350
350
  import {
351
351
  CredentialUnavailableError,
352
352
  OAuthProviderError,
@@ -354,7 +354,7 @@ import {
354
354
  getOAuthProviderErrorAttributes,
355
355
  resolveAuthTokenPlaceholder,
356
356
  resolvePluginCommandEnv
357
- } from "./chunk-X5SXFVZT.js";
357
+ } from "./chunk-QIOUTXTZ.js";
358
358
  import {
359
359
  credentialContextForActor,
360
360
  credentialUserSubjectId
@@ -390,7 +390,7 @@ import {
390
390
  summarizeMessageText,
391
391
  withLogContext,
392
392
  withSpan
393
- } from "./chunk-6YCIYOVA.js";
393
+ } from "./chunk-QIMN3FXL.js";
394
394
  import {
395
395
  startInactiveSpan,
396
396
  withActiveSpan
@@ -13505,7 +13505,7 @@ function createSearchConversationEventsTool(context) {
13505
13505
  const targetRootConversationId = await resolveRootConversationId(
13506
13506
  conversationStore,
13507
13507
  conversationId,
13508
- target.lineage?.parentConversationId
13508
+ target.parentConversationId
13509
13509
  );
13510
13510
  const targetRoot = targetRootConversationId === conversationId ? target : await conversationStore.get({
13511
13511
  conversationId: targetRootConversationId
@@ -13543,7 +13543,7 @@ async function resolveAccessScope(conversationStore, context, currentConversatio
13543
13543
  const currentRootConversationId = current ? await resolveRootConversationId(
13544
13544
  conversationStore,
13545
13545
  currentConversationId,
13546
- current.lineage?.parentConversationId
13546
+ current.parentConversationId
13547
13547
  ) : currentConversationId;
13548
13548
  if (context.source.platform === "slack") {
13549
13549
  return {
@@ -13581,10 +13581,10 @@ async function resolveRootConversationId(conversationStore, conversationId, pare
13581
13581
  if (!parent) {
13582
13582
  return conversationId;
13583
13583
  }
13584
- if (!parent.lineage?.parentConversationId) {
13584
+ if (!parent.parentConversationId) {
13585
13585
  return parent.conversationId;
13586
13586
  }
13587
- cursor = parent.lineage.parentConversationId;
13587
+ cursor = parent.parentConversationId;
13588
13588
  }
13589
13589
  return conversationId;
13590
13590
  }
@@ -17476,7 +17476,7 @@ async function wireAgentTools(args) {
17476
17476
  );
17477
17477
  const commonToolRuntimeContext = {
17478
17478
  conversationId: args.run.conversationId,
17479
- ...args.run.location ? { locationId: args.run.location.id } : void 0,
17479
+ ...args.run.source.location ? { locationId: args.run.source.location.id } : void 0,
17480
17480
  userText: args.userInput,
17481
17481
  configuration: args.configurationValues,
17482
17482
  egress: createPluginEgress({
@@ -19125,7 +19125,7 @@ async function executeAgentRunInPrivacyContext(run, conversationPrivacy, runLogC
19125
19125
  return;
19126
19126
  }
19127
19127
  try {
19128
- await delivery(message);
19128
+ await delivery.send(message);
19129
19129
  acceptedToolFreeAssistant = true;
19130
19130
  } catch (error) {
19131
19131
  assistantMessageDeliveryError = new AssistantMessageDeliveryError(
@@ -1,16 +1,15 @@
1
1
  import {
2
2
  AgentRunError,
3
3
  executeTurn
4
- } from "./chunk-OM4SFFJK.js";
4
+ } from "./chunk-ERZMACYA.js";
5
5
  import {
6
6
  ConversationTurnLifecycleService
7
- } from "./chunk-VC343WHM.js";
7
+ } from "./chunk-W42ENMJW.js";
8
8
  import {
9
9
  getPersistedSandboxState,
10
10
  getPersistedThreadState,
11
- persistThreadStateById,
12
- resolveConversationRouting
13
- } from "./chunk-27T5HZHO.js";
11
+ persistThreadStateById
12
+ } from "./chunk-CIG6WI7Q.js";
14
13
  import {
15
14
  AgentInvocationBusyError,
16
15
  AgentInvocationLimitError,
@@ -19,32 +18,32 @@ import {
19
18
  agentBindingSchema,
20
19
  agentInvocationSchema,
21
20
  createAgentInvocationSchema
22
- } from "./chunk-WRDW3A3D.js";
21
+ } from "./chunk-6JZGXLL2.js";
23
22
  import {
24
23
  appendAndEnqueueInboundMessage
25
- } from "./chunk-NIKLTFBP.js";
24
+ } from "./chunk-MQDIIFZM.js";
26
25
  import {
27
26
  TurnInputCommitLostError,
28
27
  getAssistantReplyText,
29
28
  getConversationTurnBoundaryError,
30
29
  isTurnInputCommitLostError
31
- } from "./chunk-NU775DLU.js";
30
+ } from "./chunk-Z5SKZE5B.js";
32
31
  import {
33
32
  failTurnRecord,
34
33
  getTerminalAssistantMessages,
35
34
  getTurnRecord,
36
35
  openConversationProjection,
37
36
  saveTurnCheckpoint
38
- } from "./chunk-D5BWM37G.js";
37
+ } from "./chunk-6YGFBU3A.js";
39
38
  import {
40
39
  getConversationEventStore,
41
40
  getConversationStore,
42
41
  getSqlExecutor
43
- } from "./chunk-WKIS4VRK.js";
42
+ } from "./chunk-IUUQWIG2.js";
44
43
  import {
45
44
  juniorAgentBindings,
46
45
  juniorAgentInvocations
47
- } from "./chunk-HXR3FHTE.js";
46
+ } from "./chunk-QVH6FW3T.js";
48
47
 
49
48
  // src/chat/agent-invocations/work.ts
50
49
  import { z } from "zod";
@@ -558,8 +557,8 @@ function createAgentInvocationWorker(agentRunner) {
558
557
  ]);
559
558
  sandboxRef = getPersistedSandboxState(persisted);
560
559
  history = projection.messages;
561
- location = (await resolveConversationRouting({
562
- conversationId: invocation.childConversationId
560
+ location = (await getConversationStore().get({
561
+ conversationId: invocation.parentConversationId
563
562
  }))?.location;
564
563
  } catch (error) {
565
564
  if (isInvocationInputCommitLost(error)) {
@@ -594,10 +593,9 @@ function createAgentInvocationWorker(agentRunner) {
594
593
  actor: invocation.actor,
595
594
  credentialContext: invocation.credentialContext,
596
595
  destination: invocation.destination,
597
- ...location ? { location } : void 0,
598
596
  destinationVisibility: invocation.destinationVisibility,
599
597
  publishExternally: context.publishExternally,
600
- source: invocation.source,
598
+ source: location ? { ...invocation.source, location } : invocation.source,
601
599
  surface: "internal",
602
600
  // TODO(dcramer): Issues #881 and #883 track a path for child runs to
603
601
  // force interactive auth when a delegated tool requires credentials
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-DUE4EUNL.js";
8
+ } from "./chunk-QCGNHSMA.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-WKIS4VRK.js";
11
+ } from "./chunk-IUUQWIG2.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-U6ZQHRIP.js";
14
+ } from "./chunk-ZX7RSBQ6.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-URZ7UD4P.js";
17
+ } from "./chunk-Q7O74WOO.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-QH3I7ZOK.js";
20
+ } from "./chunk-NZLZ4KYZ.js";
21
21
  import {
22
22
  parseSlackMessageTs,
23
23
  parseSlackUserId
@@ -26,7 +26,7 @@ import {
26
26
  isRecord,
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-6YCIYOVA.js";
29
+ } from "./chunk-QIMN3FXL.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  appendAndEnqueueInboundMessage
3
- } from "./chunk-NIKLTFBP.js";
3
+ } from "./chunk-MQDIIFZM.js";
4
4
  import {
5
5
  NO_REPLY_MARKER
6
- } from "./chunk-NU775DLU.js";
6
+ } from "./chunk-Z5SKZE5B.js";
7
7
  import {
8
8
  ToolInputError
9
- } from "./chunk-D5BWM37G.js";
9
+ } from "./chunk-6YGFBU3A.js";
10
10
  import {
11
11
  getPlugins
12
- } from "./chunk-DUE4EUNL.js";
12
+ } from "./chunk-QCGNHSMA.js";
13
13
  import {
14
14
  getDb
15
- } from "./chunk-WKIS4VRK.js";
15
+ } from "./chunk-IUUQWIG2.js";
16
16
  import {
17
17
  juniorAttachments,
18
18
  juniorConversations,
@@ -20,7 +20,7 @@ import {
20
20
  juniorSchedulerRuns,
21
21
  juniorSchedulerTasks,
22
22
  juniorStats
23
- } from "./chunk-HXR3FHTE.js";
23
+ } from "./chunk-QVH6FW3T.js";
24
24
  import {
25
25
  juniorDestinations
26
26
  } from "./chunk-VFUK3X5B.js";
@@ -1,32 +1,32 @@
1
1
  import {
2
2
  resolveBaseUrl
3
- } from "./chunk-6FKNNUSN.js";
3
+ } from "./chunk-UVUXFRYN.js";
4
4
  import {
5
5
  createPluginLogger,
6
6
  getPlugins,
7
7
  getSlackClient,
8
8
  withSlackRetries
9
- } from "./chunk-DUE4EUNL.js";
9
+ } from "./chunk-QCGNHSMA.js";
10
10
  import {
11
11
  getDb,
12
12
  parseDestination
13
- } from "./chunk-WKIS4VRK.js";
13
+ } from "./chunk-IUUQWIG2.js";
14
14
  import {
15
15
  sleep
16
- } from "./chunk-JZPDYKRG.js";
16
+ } from "./chunk-X55FOVZO.js";
17
17
  import {
18
18
  acquireActiveLock,
19
19
  getStateAdapter
20
- } from "./chunk-U6ZQHRIP.js";
20
+ } from "./chunk-ZX7RSBQ6.js";
21
21
  import {
22
22
  pluginCatalogRuntime
23
- } from "./chunk-QH3I7ZOK.js";
23
+ } from "./chunk-NZLZ4KYZ.js";
24
24
  import {
25
25
  fetchWithBoundedOAuthErrorBodies
26
- } from "./chunk-X5SXFVZT.js";
26
+ } from "./chunk-QIOUTXTZ.js";
27
27
  import {
28
28
  isRecord
29
- } from "./chunk-6YCIYOVA.js";
29
+ } from "./chunk-QIMN3FXL.js";
30
30
 
31
31
  // src/chat/capabilities/router.ts
32
32
  var ProviderCredentialRouter = class {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConversationEventStore
3
- } from "./chunk-WKIS4VRK.js";
3
+ } from "./chunk-IUUQWIG2.js";
4
4
 
5
5
  // src/chat/conversations/turn-lifecycle.ts
6
6
  var ConversationTurnLifecycleService = class {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FUNCTION_TIMEOUT_BUFFER_SECONDS,
3
3
  getChatConfig
4
- } from "./chunk-URZ7UD4P.js";
4
+ } from "./chunk-Q7O74WOO.js";
5
5
 
6
6
  // src/chat/runtime/request-deadline.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -4,11 +4,11 @@ import {
4
4
  import {
5
5
  buildSentryConversationUrl,
6
6
  deleteWebAuthorization
7
- } from "./chunk-ITLYUKGZ.js";
7
+ } from "./chunk-PSHMPRIU.js";
8
8
  import {
9
9
  AgentRunError,
10
10
  executeTurn
11
- } from "./chunk-OM4SFFJK.js";
11
+ } from "./chunk-ERZMACYA.js";
12
12
  import {
13
13
  buildDeliveredTurnStatePatch,
14
14
  finalizeFailedTurnReplyWithEvent,
@@ -19,22 +19,22 @@ import {
19
19
  getTurnUserSlackMessageTs,
20
20
  persistAuthPauseTurnState,
21
21
  requireTurnFailureEventId
22
- } from "./chunk-EIWYZXSM.js";
22
+ } from "./chunk-QDHJTKPE.js";
23
23
  import {
24
+ resolveTurnSessionRouting,
24
25
  scheduleSessionCompletedPluginTasks
25
- } from "./chunk-WL3R2KTS.js";
26
+ } from "./chunk-AW77HH54.js";
26
27
  import {
27
28
  getTurnLifecycle
28
- } from "./chunk-VC343WHM.js";
29
+ } from "./chunk-W42ENMJW.js";
29
30
  import {
30
31
  coerceThreadConversationState,
31
32
  configValueSchema,
32
33
  getLocationConfigurationService,
33
34
  getPersistedSandboxState,
34
35
  getPersistedThreadState,
35
- persistThreadStateById,
36
- resolveTurnSessionRouting
37
- } from "./chunk-27T5HZHO.js";
36
+ persistThreadStateById
37
+ } from "./chunk-CIG6WI7Q.js";
38
38
  import {
39
39
  createUserTokenStore,
40
40
  deleteMcpAuthSession,
@@ -44,7 +44,7 @@ import {
44
44
  getMcpStoredOAuthCredentials,
45
45
  lookupSlackUserProfile,
46
46
  resolvePluginOAuthAccount
47
- } from "./chunk-BITZUBPJ.js";
47
+ } from "./chunk-W2DDJCPS.js";
48
48
  import {
49
49
  addReactionToMessage,
50
50
  escapeSlackMrkdwnText,
@@ -57,20 +57,20 @@ import {
57
57
  removeReactionFromMessage,
58
58
  resolveBaseUrl,
59
59
  truncateStatusText
60
- } from "./chunk-6FKNNUSN.js";
60
+ } from "./chunk-UVUXFRYN.js";
61
61
  import {
62
62
  parseSlackThreadId,
63
63
  readSlackRawMessageContext,
64
64
  resolveSlackChannelIdFromMessage,
65
65
  resolveSlackChannelIdFromThreadId
66
- } from "./chunk-4A2R3AQB.js";
66
+ } from "./chunk-CVBDVIF4.js";
67
67
  import {
68
68
  RetryableDeliveryError
69
69
  } from "./chunk-6FGN7ZEG.js";
70
70
  import {
71
71
  ensureConversationWake,
72
72
  requestConversationWork
73
- } from "./chunk-NIKLTFBP.js";
73
+ } from "./chunk-MQDIIFZM.js";
74
74
  import {
75
75
  CooperativeTurnYieldError,
76
76
  clearPendingAuth,
@@ -79,7 +79,7 @@ import {
79
79
  isCooperativeTurnYieldError,
80
80
  isPendingAuthLatestRequest,
81
81
  markTurnFailed
82
- } from "./chunk-NU775DLU.js";
82
+ } from "./chunk-Z5SKZE5B.js";
83
83
  import {
84
84
  TurnSliceLimitExceededError,
85
85
  abandonTurnRecord,
@@ -99,13 +99,13 @@ import {
99
99
  recordTurnSummary,
100
100
  saveTurnCheckpoint,
101
101
  turnHasReply
102
- } from "./chunk-D5BWM37G.js";
102
+ } from "./chunk-6YGFBU3A.js";
103
103
  import {
104
104
  getVercelConversationWorkQueue
105
105
  } from "./chunk-DKIJ2RP5.js";
106
106
  import {
107
107
  getTurnRequestDeadline
108
- } from "./chunk-JCRXXEMC.js";
108
+ } from "./chunk-WGZJ5SU4.js";
109
109
  import {
110
110
  SlackActionError,
111
111
  getDashboardConversationLink,
@@ -114,38 +114,38 @@ import {
114
114
  getSlackClient,
115
115
  isDmChannel,
116
116
  normalizeSlackConversationId
117
- } from "./chunk-DUE4EUNL.js";
117
+ } from "./chunk-QCGNHSMA.js";
118
118
  import {
119
119
  getSqlExecutor,
120
120
  requireSlackDestination,
121
121
  upsertIdentity,
122
122
  upsertLinkedIdentity
123
- } from "./chunk-WKIS4VRK.js";
123
+ } from "./chunk-IUUQWIG2.js";
124
124
  import {
125
125
  acquireActiveLock,
126
126
  getStateAdapter
127
- } from "./chunk-U6ZQHRIP.js";
127
+ } from "./chunk-ZX7RSBQ6.js";
128
128
  import {
129
129
  botConfig,
130
130
  escapeXml,
131
131
  getChatConfig,
132
132
  getRuntimeMetadata,
133
133
  normalizeSlackEmojiName
134
- } from "./chunk-URZ7UD4P.js";
134
+ } from "./chunk-Q7O74WOO.js";
135
135
  import {
136
136
  defaultModelId
137
137
  } from "./chunk-D4YV5TDV.js";
138
138
  import {
139
139
  discoverSkills
140
- } from "./chunk-Z6OHCDXP.js";
140
+ } from "./chunk-3HEZWDS5.js";
141
141
  import {
142
142
  pluginCatalogRuntime
143
- } from "./chunk-QH3I7ZOK.js";
143
+ } from "./chunk-NZLZ4KYZ.js";
144
144
  import {
145
145
  buildOAuthTokenRequest,
146
146
  hasRequiredOAuthScope,
147
147
  parseOAuthTokenResponse
148
- } from "./chunk-X5SXFVZT.js";
148
+ } from "./chunk-QIOUTXTZ.js";
149
149
  import {
150
150
  createSlackResumeActor,
151
151
  isUserActor,
@@ -164,7 +164,7 @@ import {
164
164
  setTags,
165
165
  toOptionalString,
166
166
  withLogContext
167
- } from "./chunk-6YCIYOVA.js";
167
+ } from "./chunk-QIMN3FXL.js";
168
168
 
169
169
  // src/chat/slack/assistant-thread/status-render.ts
170
170
  var DEFAULT_STATUS_CONTEXTS = {
@@ -1502,7 +1502,10 @@ async function resumeSlackTurnInContext(args) {
1502
1502
  deliveryState.conversation,
1503
1503
  sessionId
1504
1504
  );
1505
- const run = buildResumedRun(runArgs, status, deliverAssistantMessage);
1505
+ const run = buildResumedRun(runArgs, status, {
1506
+ ...runArgs.run?.publishExternally !== false && runArgs.run?.source.location ? { location: runArgs.run.source.location } : void 0,
1507
+ send: deliverAssistantMessage
1508
+ });
1506
1509
  if (runArgs.inputMessageIds?.length) {
1507
1510
  await turnLifecycle.start({
1508
1511
  conversationId: runArgs.conversationId,
@@ -2089,7 +2092,6 @@ async function resumeAuthorizedMcpTurn(args) {
2089
2092
  },
2090
2093
  actor,
2091
2094
  destination,
2092
- ...routing.location ? { location: routing.location } : void 0,
2093
2095
  source: routing.source,
2094
2096
  toolChannelId: authSession.toolChannelId ?? authSession.channelId,
2095
2097
  environment: {
@@ -2755,7 +2757,6 @@ async function resumeOAuthSessionRecordTurn(stored, options) {
2755
2757
  },
2756
2758
  actor,
2757
2759
  destination,
2758
- ...routing.location ? { location: routing.location } : void 0,
2759
2760
  source: routing.source,
2760
2761
  toolChannelId: stored.channelId,
2761
2762
  environment: {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  toOptionalTrimmed
3
- } from "./chunk-URZ7UD4P.js";
3
+ } from "./chunk-Q7O74WOO.js";
4
4
  import {
5
5
  pluginCatalogRuntime
6
- } from "./chunk-QH3I7ZOK.js";
6
+ } from "./chunk-NZLZ4KYZ.js";
7
7
  import {
8
8
  setSpanAttributes,
9
9
  setSpanStatus
10
- } from "./chunk-6YCIYOVA.js";
10
+ } from "./chunk-QIMN3FXL.js";
11
11
 
12
12
  // src/chat/sandbox/paths.ts
13
13
  function normalizeWorkspaceRoot(input) {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-7H2VZTWN.js";
7
7
  import {
8
8
  runWithTurnRequestDeadline
9
- } from "./chunk-JCRXXEMC.js";
9
+ } from "./chunk-WGZJ5SU4.js";
10
10
  import {
11
11
  logWarn
12
- } from "./chunk-6YCIYOVA.js";
12
+ } from "./chunk-QIMN3FXL.js";
13
13
 
14
14
  // src/chat/plugins/task-queue.ts
15
15
  import { createHash } from "crypto";
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
129
129
  onRejected: logPluginTaskQueueMessageRejected,
130
130
  // Load the runner on first use so this module can send without a cycle.
131
131
  run: async (message) => {
132
- const { processPluginTask } = await import("./task-runner-YSGBPN4U.js");
132
+ const { processPluginTask } = await import("./task-runner-DUGZGI7V.js");
133
133
  await processPluginTask(message);
134
134
  },
135
135
  topic: PLUGIN_TASK_QUEUE_TOPIC,
@@ -6,14 +6,14 @@ import {
6
6
  isStale,
7
7
  runNonInteractiveCommand,
8
8
  sleep
9
- } from "./chunk-JZPDYKRG.js";
9
+ } from "./chunk-X55FOVZO.js";
10
10
  import {
11
11
  getStateAdapter
12
- } from "./chunk-U6ZQHRIP.js";
12
+ } from "./chunk-ZX7RSBQ6.js";
13
13
  import {
14
14
  setSpanAttributes,
15
15
  withSpan
16
- } from "./chunk-6YCIYOVA.js";
16
+ } from "./chunk-QIMN3FXL.js";
17
17
 
18
18
  // src/chat/sandbox/resources.ts
19
19
  var configuredResources;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  abandonTurnRecord,
3
3
  extractAssistantText
4
- } from "./chunk-D5BWM37G.js";
4
+ } from "./chunk-6YGFBU3A.js";
5
5
 
6
6
  // src/chat/state/turn-id.ts
7
7
  function buildDeterministicTurnId(messageId) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-URZ7UD4P.js";
3
+ } from "./chunk-Q7O74WOO.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";