@sentry/junior 0.122.0 → 0.122.1

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 (39) hide show
  1. package/dist/{agent-hooks-HJMLQLCB.js → agent-hooks-65WXVKKX.js} +7 -7
  2. package/dist/api.js +13 -13
  3. package/dist/app.js +19 -19
  4. package/dist/{catalog-runtime-CYPZUYJD.js → catalog-runtime-VNNMSKCB.js} +5 -5
  5. package/dist/chat/mcp/tool-manager.d.ts +11 -0
  6. package/dist/chat/plugins/agent-hooks.d.ts +8 -0
  7. package/dist/{chunk-NIJG6G6X.js → chunk-3KYLHUVC.js} +27 -14
  8. package/dist/{chunk-4SPRQJOW.js → chunk-4JPJTFUH.js} +1 -1
  9. package/dist/{chunk-GN6WW7WR.js → chunk-4ZV2GNHX.js} +1 -1
  10. package/dist/{chunk-OKUZIXQM.js → chunk-73TQBD5S.js} +1 -1
  11. package/dist/{chunk-NNGYYGX5.js → chunk-BXT63TNS.js} +4 -4
  12. package/dist/{chunk-V6XPIKYA.js → chunk-GPQLJDT5.js} +6 -6
  13. package/dist/{chunk-GFTZKOTP.js → chunk-HGREP4UX.js} +1 -1
  14. package/dist/{chunk-32FPGM2V.js → chunk-IEE5CSAP.js} +1 -1
  15. package/dist/{chunk-ISQYBTPG.js → chunk-LZ4XXS76.js} +1 -1
  16. package/dist/{chunk-DOB5RVMH.js → chunk-M7KAZXTE.js} +2 -2
  17. package/dist/{chunk-CYW4M6IV.js → chunk-MSDKKTRG.js} +4 -4
  18. package/dist/{chunk-BDE5RZVF.js → chunk-PXPBBOIU.js} +1 -1
  19. package/dist/{chunk-L2KJ2GNL.js → chunk-PYS4QZAF.js} +1 -1
  20. package/dist/{chunk-USKP7IM2.js → chunk-QE33ATQW.js} +38 -4
  21. package/dist/{chunk-2RFM7STT.js → chunk-TI7SYDD4.js} +1 -1
  22. package/dist/{chunk-VCC7XFX2.js → chunk-U5PRRZMZ.js} +7 -7
  23. package/dist/{chunk-4TGVC42X.js → chunk-VLRECFIC.js} +11 -11
  24. package/dist/{chunk-TZVZCIYL.js → chunk-WFJ2EG4E.js} +1 -1
  25. package/dist/{chunk-E5SRLZQV.js → chunk-XBYNPBPQ.js} +2 -2
  26. package/dist/cli/chat.js +21 -21
  27. package/dist/cli/check.js +6 -6
  28. package/dist/cli/plugins.js +10 -10
  29. package/dist/cli/snapshot-create.js +8 -8
  30. package/dist/cli/upgrade.js +5 -5
  31. package/dist/{db-E6O2DXUQ.js → db-36HXKAKH.js} +5 -5
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/nitro.js +2 -2
  34. package/dist/{oauth-callback-server-6SCPUFFD.js → oauth-callback-server-UKOO7KKP.js} +14 -14
  35. package/dist/{runner-JFKCMVVY.js → runner-M66KMCQ7.js} +9 -9
  36. package/dist/{skills-RD66F2OB.js → skills-TTXTVFOG.js} +6 -6
  37. package/dist/{validation-XVRNX6IU.js → validation-TGASRGNN.js} +6 -6
  38. package/dist/version.js +1 -1
  39. package/package.json +5 -5
@@ -11,20 +11,20 @@ import {
11
11
  getPlugins,
12
12
  setPlugins,
13
13
  validatePlugins
14
- } from "./chunk-USKP7IM2.js";
15
- import "./chunk-DOB5RVMH.js";
14
+ } from "./chunk-QE33ATQW.js";
15
+ import "./chunk-M7KAZXTE.js";
16
16
  import "./chunk-GCGJGSQL.js";
17
- import "./chunk-TZVZCIYL.js";
18
- import "./chunk-2RFM7STT.js";
17
+ import "./chunk-WFJ2EG4E.js";
18
+ import "./chunk-TI7SYDD4.js";
19
19
  import "./chunk-VFUK3X5B.js";
20
20
  import "./chunk-S7G34U75.js";
21
21
  import "./chunk-HZF5P5UN.js";
22
- import "./chunk-4SPRQJOW.js";
22
+ import "./chunk-4JPJTFUH.js";
23
23
  import "./chunk-OB42YVAE.js";
24
24
  import "./chunk-F3B2YJ76.js";
25
25
  import "./chunk-6GWA276C.js";
26
- import "./chunk-L2KJ2GNL.js";
27
- import "./chunk-ISQYBTPG.js";
26
+ import "./chunk-PYS4QZAF.js";
27
+ import "./chunk-LZ4XXS76.js";
28
28
  import "./chunk-MLKGABMK.js";
29
29
  export {
30
30
  PluginHookDeniedError,
package/dist/api.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  formatSlackConversationRedactedLabel,
30
30
  readHealthReport,
31
31
  resolveSlackConversationContextFromThreadId
32
- } from "./chunk-BDE5RZVF.js";
32
+ } from "./chunk-PXPBBOIU.js";
33
33
  import {
34
34
  buildSentryConversationUrl
35
35
  } from "./chunk-4CODA7P5.js";
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-PE44LDDQ.js";
43
43
  import {
44
44
  readStats
45
- } from "./chunk-32FPGM2V.js";
45
+ } from "./chunk-IEE5CSAP.js";
46
46
  import {
47
47
  agentTurnUsageSchema,
48
48
  hasAgentTurnUsage
@@ -53,12 +53,12 @@ import {
53
53
  getPlugins,
54
54
  listConversationAnnotations,
55
55
  readViewerActors
56
- } from "./chunk-USKP7IM2.js";
56
+ } from "./chunk-QE33ATQW.js";
57
57
  import {
58
58
  decodeStoredConversationEvent,
59
59
  getDb,
60
60
  getSqlExecutor
61
- } from "./chunk-DOB5RVMH.js";
61
+ } from "./chunk-M7KAZXTE.js";
62
62
  import {
63
63
  juniorApiTokens,
64
64
  juniorConversationEvents,
@@ -66,8 +66,8 @@ import {
66
66
  juniorIdentities,
67
67
  juniorUsers
68
68
  } from "./chunk-GCGJGSQL.js";
69
- import "./chunk-TZVZCIYL.js";
70
- import "./chunk-2RFM7STT.js";
69
+ import "./chunk-WFJ2EG4E.js";
70
+ import "./chunk-TI7SYDD4.js";
71
71
  import {
72
72
  juniorDestinations
73
73
  } from "./chunk-VFUK3X5B.js";
@@ -76,12 +76,12 @@ import {
76
76
  parseSlackThreadId
77
77
  } from "./chunk-S7G34U75.js";
78
78
  import "./chunk-HZF5P5UN.js";
79
- import "./chunk-4SPRQJOW.js";
79
+ import "./chunk-4JPJTFUH.js";
80
80
  import "./chunk-OB42YVAE.js";
81
81
  import "./chunk-F3B2YJ76.js";
82
82
  import "./chunk-6GWA276C.js";
83
- import "./chunk-L2KJ2GNL.js";
84
- import "./chunk-ISQYBTPG.js";
83
+ import "./chunk-PYS4QZAF.js";
84
+ import "./chunk-LZ4XXS76.js";
85
85
  import "./chunk-MLKGABMK.js";
86
86
 
87
87
  // src/api.ts
@@ -1740,7 +1740,7 @@ function readDescriptionText(home) {
1740
1740
  }
1741
1741
  }
1742
1742
  async function readSkillReports() {
1743
- const { discoverSkills } = await import("./skills-RD66F2OB.js");
1743
+ const { discoverSkills } = await import("./skills-TTXTVFOG.js");
1744
1744
  const skills = await discoverSkills();
1745
1745
  return skillReportsSchema.parse(
1746
1746
  skills.map((skill) => ({
@@ -1750,7 +1750,7 @@ async function readSkillReports() {
1750
1750
  );
1751
1751
  }
1752
1752
  async function readPlugins() {
1753
- const { pluginCatalogRuntime } = await import("./catalog-runtime-CYPZUYJD.js");
1753
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-VNNMSKCB.js");
1754
1754
  return pluginsSchema.parse(
1755
1755
  pluginCatalogRuntime.getProviders().map((plugin) => ({
1756
1756
  configKeys: plugin.manifest.configKeys ?? [],
@@ -1763,7 +1763,7 @@ async function readPlugins() {
1763
1763
  async function readRuntimeInfoReport() {
1764
1764
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
1765
1765
  import("./discovery-GUFTFBTL.js"),
1766
- import("./catalog-runtime-CYPZUYJD.js"),
1766
+ import("./catalog-runtime-VNNMSKCB.js"),
1767
1767
  readPlugins(),
1768
1768
  readSkillReports()
1769
1769
  ]);
@@ -1779,7 +1779,7 @@ async function readRuntimeInfoReport() {
1779
1779
  }
1780
1780
  async function readPluginOperationalReportFeed() {
1781
1781
  const nowMs = Date.now();
1782
- const { getPluginOperationalReports } = await import("./agent-hooks-HJMLQLCB.js");
1782
+ const { getPluginOperationalReports } = await import("./agent-hooks-65WXVKKX.js");
1783
1783
  return pluginOperationalReportFeedSchema.parse({
1784
1784
  source: "plugins",
1785
1785
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  startConversationWork,
51
51
  startSlackProcessingReaction,
52
52
  stripLeadingBotMention
53
- } from "./chunk-4TGVC42X.js";
53
+ } from "./chunk-VLRECFIC.js";
54
54
  import "./chunk-FA6POGLH.js";
55
55
  import {
56
56
  ConversationTurnLifecycleService,
@@ -65,13 +65,13 @@ import {
65
65
  processPluginTask,
66
66
  requireTurnFailureEventId,
67
67
  scheduleSessionCompletedPluginTasks
68
- } from "./chunk-V6XPIKYA.js";
68
+ } from "./chunk-GPQLJDT5.js";
69
69
  import {
70
70
  GET,
71
71
  conversationVisibilityFromSlackChannelType,
72
72
  resolveSlackChannelTypeFromMessage,
73
73
  resolveSlackConversationContext
74
- } from "./chunk-BDE5RZVF.js";
74
+ } from "./chunk-PXPBBOIU.js";
75
75
  import "./chunk-4CODA7P5.js";
76
76
  import "./chunk-PE44LDDQ.js";
77
77
  import {
@@ -90,7 +90,7 @@ import {
90
90
  import {
91
91
  validatePluginEgressCredentialHooks,
92
92
  validatePluginRegistrations
93
- } from "./chunk-GFTZKOTP.js";
93
+ } from "./chunk-HGREP4UX.js";
94
94
  import {
95
95
  defineJuniorPlugins,
96
96
  pluginCatalogConfigFromEnv,
@@ -123,7 +123,7 @@ import {
123
123
  setConfigDefaults,
124
124
  shouldEmitDevAgentTrace,
125
125
  shouldPropagateSandboxEgressTrace
126
- } from "./chunk-NIJG6G6X.js";
126
+ } from "./chunk-3KYLHUVC.js";
127
127
  import "./chunk-DIB4GX3G.js";
128
128
  import {
129
129
  RetryableDeliveryError,
@@ -134,7 +134,7 @@ import {
134
134
  formatProviderLabel,
135
135
  postSlackMessage,
136
136
  startOAuthFlow
137
- } from "./chunk-VCC7XFX2.js";
137
+ } from "./chunk-U5PRRZMZ.js";
138
138
  import {
139
139
  ConversationTurnBoundaryError,
140
140
  CooperativeTurnYieldError,
@@ -190,10 +190,10 @@ import {
190
190
  trimTrailingAssistantMessages,
191
191
  updateConversationStats,
192
192
  upsertConversationMessage
193
- } from "./chunk-NNGYYGX5.js";
193
+ } from "./chunk-BXT63TNS.js";
194
194
  import "./chunk-HDSDCEPK.js";
195
- import "./chunk-CYW4M6IV.js";
196
- import "./chunk-32FPGM2V.js";
195
+ import "./chunk-MSDKKTRG.js";
196
+ import "./chunk-IEE5CSAP.js";
197
197
  import "./chunk-MU6HHZEN.js";
198
198
  import "./chunk-PDO5BLNM.js";
199
199
  import "./chunk-UIE3R5XU.js";
@@ -218,7 +218,7 @@ import {
218
218
  validatePlugins,
219
219
  verifyScheduledTaskCredentialSubject,
220
220
  verifySlackDirectCredentialSubject
221
- } from "./chunk-USKP7IM2.js";
221
+ } from "./chunk-QE33ATQW.js";
222
222
  import {
223
223
  contextProvenance,
224
224
  createSlackDestination,
@@ -229,7 +229,7 @@ import {
229
229
  instructionProvenanceFor,
230
230
  requireSlackDestination,
231
231
  withConversationEventLock
232
- } from "./chunk-DOB5RVMH.js";
232
+ } from "./chunk-M7KAZXTE.js";
233
233
  import {
234
234
  juniorConversationEvents,
235
235
  juniorConversations
@@ -238,7 +238,7 @@ import {
238
238
  acquireActiveLock,
239
239
  getStateAdapter,
240
240
  sleep
241
- } from "./chunk-TZVZCIYL.js";
241
+ } from "./chunk-WFJ2EG4E.js";
242
242
  import {
243
243
  STANDARD_MODEL_PROFILE,
244
244
  botConfig,
@@ -256,18 +256,18 @@ import {
256
256
  modelIdForProfile,
257
257
  setSlackReactionConfig,
258
258
  standardModelId
259
- } from "./chunk-2RFM7STT.js";
259
+ } from "./chunk-TI7SYDD4.js";
260
260
  import {
261
261
  juniorDestinations
262
262
  } from "./chunk-VFUK3X5B.js";
263
263
  import {
264
264
  parseSlackThreadId
265
265
  } from "./chunk-S7G34U75.js";
266
- import "./chunk-E5SRLZQV.js";
266
+ import "./chunk-XBYNPBPQ.js";
267
267
  import {
268
268
  pluginCatalogRuntime
269
- } from "./chunk-OKUZIXQM.js";
270
- import "./chunk-GN6WW7WR.js";
269
+ } from "./chunk-73TQBD5S.js";
270
+ import "./chunk-4ZV2GNHX.js";
271
271
  import {
272
272
  credentialSubjectSchema
273
273
  } from "./chunk-W3U3YQYI.js";
@@ -294,7 +294,7 @@ import {
294
294
  withContext,
295
295
  withLogContext,
296
296
  withSpan
297
- } from "./chunk-4SPRQJOW.js";
297
+ } from "./chunk-4JPJTFUH.js";
298
298
  import {
299
299
  toOptionalString
300
300
  } from "./chunk-OB42YVAE.js";
@@ -309,10 +309,10 @@ import "./chunk-OOUNJNMR.js";
309
309
  import "./chunk-H4HBKISO.js";
310
310
  import {
311
311
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
312
- } from "./chunk-L2KJ2GNL.js";
312
+ } from "./chunk-PYS4QZAF.js";
313
313
  import {
314
314
  JUNIOR_VERSION
315
- } from "./chunk-ISQYBTPG.js";
315
+ } from "./chunk-LZ4XXS76.js";
316
316
  import "./chunk-MLKGABMK.js";
317
317
 
318
318
  // src/app.ts
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-OKUZIXQM.js";
4
- import "./chunk-GN6WW7WR.js";
3
+ } from "./chunk-73TQBD5S.js";
4
+ import "./chunk-4ZV2GNHX.js";
5
5
  import "./chunk-W3U3YQYI.js";
6
6
  import "./chunk-HZF5P5UN.js";
7
- import "./chunk-4SPRQJOW.js";
7
+ import "./chunk-4JPJTFUH.js";
8
8
  import "./chunk-OB42YVAE.js";
9
9
  import "./chunk-F3B2YJ76.js";
10
10
  import "./chunk-6GWA276C.js";
11
11
  import "./chunk-OOUNJNMR.js";
12
12
  import "./chunk-H4HBKISO.js";
13
- import "./chunk-L2KJ2GNL.js";
14
- import "./chunk-ISQYBTPG.js";
13
+ import "./chunk-PYS4QZAF.js";
14
+ import "./chunk-LZ4XXS76.js";
15
15
  import "./chunk-MLKGABMK.js";
16
16
  export {
17
17
  pluginCatalogRuntime
@@ -13,10 +13,21 @@ import type { ConversationPrivacy } from "@/chat/conversation-privacy";
13
13
  import type { SkillMetadata } from "@/chat/skills";
14
14
  import type { PluginDefinition } from "@/chat/plugins/types";
15
15
  import { McpAuthorizationRequiredError } from "./client";
16
+ export interface McpToolSuccessHookInput {
17
+ arguments: Record<string, unknown>;
18
+ provider: string;
19
+ structuredContent?: unknown;
20
+ toolName: string;
21
+ }
16
22
  export interface McpToolManagerOptions {
17
23
  authProviderFactory?: (plugin: PluginDefinition) => OAuthClientProvider | undefined | Promise<OAuthClientProvider | undefined>;
18
24
  fetch?: typeof fetch;
19
25
  onAuthorizationRequired?: (provider: string, error: McpAuthorizationRequiredError) => Promise<boolean | void> | boolean | void;
26
+ /**
27
+ * Optional post-success processor for model-facing MCP tool calls.
28
+ * Failures are logged by the host caller and must not fail the tool result.
29
+ */
30
+ onToolSuccess?: (input: McpToolSuccessHookInput) => Promise<void> | void;
20
31
  }
21
32
  export interface ManagedMcpToolResult {
22
33
  /**
@@ -23,7 +23,15 @@ export interface PluginApiRouteRegistration {
23
23
  app: PluginRouteApp;
24
24
  pluginName: string;
25
25
  }
26
+ export interface AfterMcpToolHookInput {
27
+ arguments: Record<string, unknown>;
28
+ conversationId?: string;
29
+ provider: string;
30
+ structuredContent?: unknown;
31
+ toolName: string;
32
+ }
26
33
  export interface PluginHookRunner {
34
+ afterMcpTool(input: AfterMcpToolHookInput): Promise<void>;
27
35
  beforeToolExecute(input: ToolHookInput): Promise<ToolHookResult>;
28
36
  prepareSandbox(workspace: SandboxWorkspace): Promise<void>;
29
37
  }
@@ -30,7 +30,7 @@ import {
30
30
  toMcpProviderError,
31
31
  toolInvocationDestination,
32
32
  uploadFilesToConversation
33
- } from "./chunk-VCC7XFX2.js";
33
+ } from "./chunk-U5PRRZMZ.js";
34
34
  import {
35
35
  CooperativeTurnYieldError,
36
36
  JUNIOR_THREAD_STATE_TTL_MS,
@@ -77,7 +77,7 @@ import {
77
77
  stripRuntimeTurnContext,
78
78
  trimTrailingAssistantMessages,
79
79
  updateConversationStats
80
- } from "./chunk-NNGYYGX5.js";
80
+ } from "./chunk-BXT63TNS.js";
81
81
  import {
82
82
  parseSandboxEgressAuthRequiredSignal,
83
83
  parseSandboxEgressPermissionDeniedSignal,
@@ -101,10 +101,10 @@ import {
101
101
  runNonInteractiveCommand,
102
102
  throwSandboxOperationError,
103
103
  wrapSandboxSetupError
104
- } from "./chunk-CYW4M6IV.js";
104
+ } from "./chunk-MSDKKTRG.js";
105
105
  import {
106
106
  incrementStat
107
- } from "./chunk-32FPGM2V.js";
107
+ } from "./chunk-IEE5CSAP.js";
108
108
  import {
109
109
  addAgentTurnUsage,
110
110
  hasAgentTurnUsage
@@ -126,7 +126,7 @@ import {
126
126
  normalizeSlackConversationId,
127
127
  resolveChannelCapabilities,
128
128
  withSlackRetries
129
- } from "./chunk-USKP7IM2.js";
129
+ } from "./chunk-QE33ATQW.js";
130
130
  import {
131
131
  KNOWN_CONVERSATION_EVENT_TYPES,
132
132
  contextProvenance,
@@ -135,7 +135,7 @@ import {
135
135
  getConversationStore,
136
136
  instructionActors,
137
137
  instructionProvenanceFor
138
- } from "./chunk-DOB5RVMH.js";
138
+ } from "./chunk-M7KAZXTE.js";
139
139
  import {
140
140
  SANDBOX_DATA_ROOT,
141
141
  SANDBOX_SKILLS_ROOT,
@@ -145,7 +145,7 @@ import {
145
145
  sandboxSkillFile,
146
146
  sandboxSkillPathResolution,
147
147
  sleep
148
- } from "./chunk-TZVZCIYL.js";
148
+ } from "./chunk-WFJ2EG4E.js";
149
149
  import {
150
150
  ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
151
151
  COMPACTION_SUMMARY_PREFIX,
@@ -176,7 +176,7 @@ import {
176
176
  renderCurrentInstruction,
177
177
  resolveGatewayModel,
178
178
  unwrapCurrentInstruction
179
- } from "./chunk-2RFM7STT.js";
179
+ } from "./chunk-TI7SYDD4.js";
180
180
  import {
181
181
  canExposeConversationPayload,
182
182
  parseSlackThreadId,
@@ -193,10 +193,10 @@ import {
193
193
  findSkillByName,
194
194
  loadSkillsByName,
195
195
  parseSkillInvocation
196
- } from "./chunk-E5SRLZQV.js";
196
+ } from "./chunk-XBYNPBPQ.js";
197
197
  import {
198
198
  pluginCatalogRuntime
199
- } from "./chunk-OKUZIXQM.js";
199
+ } from "./chunk-73TQBD5S.js";
200
200
  import {
201
201
  CredentialUnavailableError,
202
202
  OAuthProviderError,
@@ -204,7 +204,7 @@ import {
204
204
  getOAuthProviderErrorAttributes,
205
205
  resolveAuthTokenPlaceholder,
206
206
  resolvePluginCommandEnv
207
- } from "./chunk-GN6WW7WR.js";
207
+ } from "./chunk-4ZV2GNHX.js";
208
208
  import {
209
209
  credentialUserSubjectId
210
210
  } from "./chunk-W3U3YQYI.js";
@@ -228,7 +228,7 @@ import {
228
228
  summarizeMessageText,
229
229
  withLogContext,
230
230
  withSpan
231
- } from "./chunk-4SPRQJOW.js";
231
+ } from "./chunk-4JPJTFUH.js";
232
232
  import {
233
233
  parseSlackChannelId,
234
234
  parseSlackMessageTs,
@@ -6614,11 +6614,18 @@ var McpToolManager = class {
6614
6614
  const providerContent = boundMcpContent(
6615
6615
  toAgentToolContent(result)
6616
6616
  );
6617
- return {
6617
+ const successResult = {
6618
6618
  content: toModelVisibleMcpContent(result),
6619
6619
  providerContent,
6620
6620
  ...result.structuredContent !== void 0 ? { structuredContent: result.structuredContent } : {}
6621
6621
  };
6622
+ await this.options.onToolSuccess?.({
6623
+ arguments: resolvedArgs,
6624
+ provider: plugin.manifest.name,
6625
+ ...result.structuredContent !== void 0 ? { structuredContent: result.structuredContent } : {},
6626
+ toolName: tool.name
6627
+ });
6628
+ return successResult;
6622
6629
  } catch (error) {
6623
6630
  if (error instanceof McpAuthorizationRequiredError && await this.handleAuthorizationRequired(
6624
6631
  plugin.manifest.name,
@@ -13656,7 +13663,13 @@ async function wireAgentTools(args) {
13656
13663
  pluginCatalogRuntime.getMcpProviders(),
13657
13664
  {
13658
13665
  authProviderFactory: mcpAuth.authProviderFactory,
13659
- onAuthorizationRequired: mcpAuth.onAuthorizationRequired
13666
+ onAuthorizationRequired: mcpAuth.onAuthorizationRequired,
13667
+ onToolSuccess: async (input) => {
13668
+ await pluginHooks.afterMcpTool({
13669
+ ...input,
13670
+ conversationId: args.conversationId
13671
+ });
13672
+ }
13660
13673
  }
13661
13674
  );
13662
13675
  const getPendingAuthPause = () => pluginAuth.getPendingPause() ?? mcpAuth.getPendingPause();
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-6GWA276C.js";
14
14
  import {
15
15
  getDeploymentTelemetryAttributes
16
- } from "./chunk-L2KJ2GNL.js";
16
+ } from "./chunk-PYS4QZAF.js";
17
17
 
18
18
  // src/chat/logging.ts
19
19
  import path from "path";
@@ -5,7 +5,7 @@ import {
5
5
  logInfo,
6
6
  logWarn,
7
7
  setSpanAttributes
8
- } from "./chunk-4SPRQJOW.js";
8
+ } from "./chunk-4JPJTFUH.js";
9
9
  import {
10
10
  discoverInstalledPluginPackageContent,
11
11
  normalizePluginPackageNames
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createPluginCatalogRuntime
3
- } from "./chunk-GN6WW7WR.js";
3
+ } from "./chunk-4ZV2GNHX.js";
4
4
 
5
5
  // src/chat/plugins/catalog-runtime.ts
6
6
  var pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -13,17 +13,17 @@ import {
13
13
  instructionProvenanceFor,
14
14
  sanitizePostgresJson,
15
15
  withConversationEventLock
16
- } from "./chunk-DOB5RVMH.js";
16
+ } from "./chunk-M7KAZXTE.js";
17
17
  import {
18
18
  getStateAdapter,
19
19
  sleep
20
- } from "./chunk-TZVZCIYL.js";
20
+ } from "./chunk-WFJ2EG4E.js";
21
21
  import {
22
22
  botConfig,
23
23
  escapeXml,
24
24
  resolveGatewayModel,
25
25
  unwrapCurrentInstruction
26
- } from "./chunk-2RFM7STT.js";
26
+ } from "./chunk-TI7SYDD4.js";
27
27
  import {
28
28
  toStoredSlackActor
29
29
  } from "./chunk-HZF5P5UN.js";
@@ -32,7 +32,7 @@ import {
32
32
  logException,
33
33
  logWarn,
34
34
  setSpanAttributes
35
- } from "./chunk-4SPRQJOW.js";
35
+ } from "./chunk-4JPJTFUH.js";
36
36
  import {
37
37
  isRecord,
38
38
  toOptionalNumber,
@@ -22,28 +22,28 @@ import {
22
22
  persistThreadStateById,
23
23
  stripRuntimeTurnContext,
24
24
  updateConversationStats
25
- } from "./chunk-NNGYYGX5.js";
25
+ } from "./chunk-BXT63TNS.js";
26
26
  import {
27
27
  createPluginEmbedder,
28
28
  createPluginLogger,
29
29
  createPluginModel,
30
30
  createPluginState,
31
31
  getPlugins
32
- } from "./chunk-USKP7IM2.js";
32
+ } from "./chunk-QE33ATQW.js";
33
33
  import {
34
34
  getDb
35
- } from "./chunk-DOB5RVMH.js";
35
+ } from "./chunk-M7KAZXTE.js";
36
36
  import {
37
37
  getStateAdapter
38
- } from "./chunk-TZVZCIYL.js";
38
+ } from "./chunk-WFJ2EG4E.js";
39
39
  import {
40
40
  ProviderError,
41
41
  getProviderErrorAttributes,
42
42
  getProviderErrorUserMessage
43
- } from "./chunk-2RFM7STT.js";
43
+ } from "./chunk-TI7SYDD4.js";
44
44
  import {
45
45
  buildTurnFailureResponse
46
- } from "./chunk-4SPRQJOW.js";
46
+ } from "./chunk-4JPJTFUH.js";
47
47
  import {
48
48
  parseSlackMessageTs
49
49
  } from "./chunk-F3B2YJ76.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-OKUZIXQM.js";
3
+ } from "./chunk-73TQBD5S.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  import { isDeepStrictEqual } from "util";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDb
3
- } from "./chunk-DOB5RVMH.js";
3
+ } from "./chunk-M7KAZXTE.js";
4
4
  import {
5
5
  juniorStats
6
6
  } from "./chunk-GCGJGSQL.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@sentry/junior",
4
- version: "0.122.0",
4
+ version: "0.122.1",
5
5
  private: false,
6
6
  publishConfig: {
7
7
  access: "public"
@@ -9,13 +9,13 @@ import {
9
9
  TURN_REASONING_LEVELS,
10
10
  getChatConfig,
11
11
  modelProfileSchema
12
- } from "./chunk-2RFM7STT.js";
12
+ } from "./chunk-TI7SYDD4.js";
13
13
  import {
14
14
  juniorDestinations
15
15
  } from "./chunk-VFUK3X5B.js";
16
16
  import {
17
17
  normalizeIdentityEmail
18
- } from "./chunk-4SPRQJOW.js";
18
+ } from "./chunk-4JPJTFUH.js";
19
19
  import {
20
20
  parseSlackChannelReferenceId,
21
21
  parseSlackTeamId
@@ -2,18 +2,18 @@ import {
2
2
  SANDBOX_WORKSPACE_ROOT,
3
3
  getStateAdapter,
4
4
  sleep
5
- } from "./chunk-TZVZCIYL.js";
5
+ } from "./chunk-WFJ2EG4E.js";
6
6
  import {
7
7
  toOptionalTrimmed
8
- } from "./chunk-2RFM7STT.js";
8
+ } from "./chunk-TI7SYDD4.js";
9
9
  import {
10
10
  pluginCatalogRuntime
11
- } from "./chunk-OKUZIXQM.js";
11
+ } from "./chunk-73TQBD5S.js";
12
12
  import {
13
13
  setSpanAttributes,
14
14
  setSpanStatus,
15
15
  withSpan
16
- } from "./chunk-4SPRQJOW.js";
16
+ } from "./chunk-4JPJTFUH.js";
17
17
 
18
18
  // src/chat/sandbox/snapshot/profile.ts
19
19
  import { createHash } from "crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-PE44LDDQ.js";
4
4
  import {
5
5
  normalizeSlackConversationId
6
- } from "./chunk-USKP7IM2.js";
6
+ } from "./chunk-QE33ATQW.js";
7
7
  import {
8
8
  parseSlackThreadId
9
9
  } from "./chunk-S7G34U75.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-ISQYBTPG.js";
3
+ } from "./chunk-LZ4XXS76.js";
4
4
 
5
5
  // src/deployment.ts
6
6
  var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";