@sentry/junior 0.76.0 → 0.77.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.
@@ -10,11 +10,11 @@ import {
10
10
  getPlugins,
11
11
  setPlugins,
12
12
  validatePlugins
13
- } from "./chunk-NFTMTIP3.js";
14
- import "./chunk-56TBVRJG.js";
13
+ } from "./chunk-WBSGTHNO.js";
14
+ import "./chunk-RARSKPVT.js";
15
15
  import "./chunk-NYKJ3KON.js";
16
16
  import "./chunk-G3E7SCME.js";
17
- import "./chunk-Y5OFBCBZ.js";
17
+ import "./chunk-LXTPBU4K.js";
18
18
  import "./chunk-Q6XFTRV5.js";
19
19
  import "./chunk-T77LUIX3.js";
20
20
  import "./chunk-VALUBQ7R.js";
package/dist/app.js CHANGED
@@ -71,7 +71,7 @@ import {
71
71
  updateConversationStats,
72
72
  uploadFilesToThread,
73
73
  upsertConversationMessage
74
- } from "./chunk-HHDUKWVG.js";
74
+ } from "./chunk-W36B5PT4.js";
75
75
  import {
76
76
  CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
77
77
  CONVERSATION_WORK_STALE_ENQUEUE_MS,
@@ -90,12 +90,12 @@ import {
90
90
  requestConversationContinuation,
91
91
  requestConversationWork,
92
92
  startConversationWork
93
- } from "./chunk-R6Z5XWY3.js";
93
+ } from "./chunk-KPL4WJWA.js";
94
94
  import {
95
95
  JUNIOR_THREAD_STATE_TTL_MS,
96
96
  coerceThreadConversationState
97
97
  } from "./chunk-Z4CIQ3EB.js";
98
- import "./chunk-JBASI5VV.js";
98
+ import "./chunk-PNGAJ75P.js";
99
99
  import {
100
100
  getVercelConversationWorkQueue,
101
101
  resolveConversationWorkQueueTopic,
@@ -113,7 +113,7 @@ import {
113
113
  resolveSlackChannelTypeFromMessage,
114
114
  resolveSlackConversationContext,
115
115
  setConversationTitle
116
- } from "./chunk-ZQB37HUX.js";
116
+ } from "./chunk-C2YBH4S6.js";
117
117
  import {
118
118
  abandonAgentTurnSessionRecord,
119
119
  buildSlackOutputMessage,
@@ -129,11 +129,11 @@ import {
129
129
  recordAuthorizationCompleted,
130
130
  splitSlackReplyText,
131
131
  truncateStatusText
132
- } from "./chunk-KOIMO7S3.js";
132
+ } from "./chunk-TO3UAY2M.js";
133
133
  import {
134
134
  validatePluginEgressCredentialHooks,
135
135
  validatePluginRegistrations
136
- } from "./chunk-XBBC6W45.js";
136
+ } from "./chunk-KIDP757T.js";
137
137
  import {
138
138
  defineJuniorPlugins,
139
139
  pluginCatalogConfigFromEnv,
@@ -148,20 +148,20 @@ import {
148
148
  setPlugins,
149
149
  validatePlugins,
150
150
  verifySlackDirectCredentialSubject
151
- } from "./chunk-NFTMTIP3.js";
151
+ } from "./chunk-WBSGTHNO.js";
152
152
  import {
153
153
  createPluginLogger,
154
154
  createPluginState
155
- } from "./chunk-56TBVRJG.js";
155
+ } from "./chunk-RARSKPVT.js";
156
156
  import {
157
157
  getConversationStore,
158
158
  getDb
159
159
  } from "./chunk-NYKJ3KON.js";
160
160
  import "./chunk-G3E7SCME.js";
161
161
  import {
162
- ACTIVE_LOCK_TTL_MS,
162
+ acquireActiveLock,
163
163
  getStateAdapter
164
- } from "./chunk-Y5OFBCBZ.js";
164
+ } from "./chunk-LXTPBU4K.js";
165
165
  import {
166
166
  createSlackDestination,
167
167
  destinationKey,
@@ -198,7 +198,7 @@ import {
198
198
  } from "./chunk-T77LUIX3.js";
199
199
  import {
200
200
  discoverSkills
201
- } from "./chunk-4SCWV7TJ.js";
201
+ } from "./chunk-Y3EG7S7P.js";
202
202
  import {
203
203
  CredentialUnavailableError,
204
204
  buildOAuthTokenRequest,
@@ -209,7 +209,7 @@ import {
209
209
  isPluginProvider,
210
210
  parseOAuthTokenResponse,
211
211
  setPluginCatalogConfig
212
- } from "./chunk-ZLMBNBUG.js";
212
+ } from "./chunk-YLVJRYTD.js";
213
213
  import {
214
214
  createRequester,
215
215
  createSlackRequester,
@@ -2634,13 +2634,23 @@ function resolveReplyTimeoutMs(explicitTimeoutMs) {
2634
2634
  const parsed = Number.parseInt(raw, 10);
2635
2635
  return Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
2636
2636
  }
2637
- async function postSlackMessageBestEffort(channelId, threadTs, text) {
2637
+ async function postSlackMessageBestEffort(channelId, threadTs, text, footer) {
2638
2638
  try {
2639
- await postSlackMessage({
2640
- channelId,
2641
- threadTs,
2642
- text
2643
- });
2639
+ if (footer) {
2640
+ await postSlackApiReplyPosts({
2641
+ channelId,
2642
+ threadTs,
2643
+ posts: [
2644
+ {
2645
+ text,
2646
+ stage: "thread_reply"
2647
+ }
2648
+ ],
2649
+ footer
2650
+ });
2651
+ return;
2652
+ }
2653
+ await postSlackMessage({ channelId, threadTs, text });
2644
2654
  } catch {
2645
2655
  }
2646
2656
  }
@@ -2691,6 +2701,9 @@ function getResumeLogContext(args, lockKey) {
2691
2701
  modelId: botConfig.modelId
2692
2702
  };
2693
2703
  }
2704
+ function getResumeConversationId(args, lockKey) {
2705
+ return args.replyContext?.correlation?.conversationId ?? lockKey;
2706
+ }
2694
2707
  async function postResumeFailureReply(args) {
2695
2708
  try {
2696
2709
  await postSlackMessage({
@@ -2777,7 +2790,7 @@ async function resumeSlackTurn(args) {
2777
2790
  const stateAdapter = getStateAdapter();
2778
2791
  await stateAdapter.connect();
2779
2792
  const lockKey = args.lockKey ?? getDefaultLockKey(args.channelId, args.threadTs);
2780
- const lock = await stateAdapter.acquireLock(lockKey, ACTIVE_LOCK_TTL_MS);
2793
+ const lock = await acquireActiveLock(stateAdapter, lockKey);
2781
2794
  if (!lock) {
2782
2795
  throw new ResumeTurnBusyError(lockKey);
2783
2796
  }
@@ -2853,7 +2866,7 @@ async function resumeSlackTurn(args) {
2853
2866
  });
2854
2867
  await status.stop();
2855
2868
  const footer = buildSlackReplyFooter({
2856
- conversationId: runArgs.replyContext?.correlation?.conversationId ?? lockKey
2869
+ conversationId: getResumeConversationId(runArgs, lockKey)
2857
2870
  });
2858
2871
  await postSlackApiReplyPosts({
2859
2872
  channelId: runArgs.channelId,
@@ -2950,13 +2963,17 @@ async function resumeSlackTurn(args) {
2950
2963
  try {
2951
2964
  await deferredPauseHandler();
2952
2965
  if (deferredPauseKind === "auth" && deferredAuthInfo) {
2966
+ const footer = buildSlackReplyFooter({
2967
+ conversationId: getResumeConversationId(runArgs, lockKey)
2968
+ });
2953
2969
  await postSlackMessageBestEffort(
2954
2970
  runArgs.channelId,
2955
2971
  runArgs.threadTs,
2956
2972
  buildAuthPauseResponse(
2957
2973
  deferredAuthInfo.requesterId,
2958
2974
  deferredAuthInfo.providerDisplayName
2959
- )
2975
+ ),
2976
+ footer
2960
2977
  );
2961
2978
  }
2962
2979
  return true;
@@ -6224,6 +6241,14 @@ var IGNORED_MESSAGE_SUBTYPES = /* @__PURE__ */ new Set([
6224
6241
  "ekm_access_denied",
6225
6242
  "tombstone"
6226
6243
  ]);
6244
+ var SlackEventPersistenceError = class extends Error {
6245
+ cause;
6246
+ constructor(cause) {
6247
+ super("Slack event durable persistence failed");
6248
+ this.name = "SlackEventPersistenceError";
6249
+ this.cause = cause;
6250
+ }
6251
+ };
6227
6252
  function enqueue(waitUntil, task) {
6228
6253
  waitUntil(task);
6229
6254
  }
@@ -6275,7 +6300,7 @@ async function buildThread(args) {
6275
6300
  });
6276
6301
  }
6277
6302
  function shouldIgnoreMessage(message) {
6278
- return message.author.isMe === true || isExternalSlackUser(message.raw);
6303
+ return message.author.isMe === true || !parseActorUserId(message.author.userId) || isExternalSlackUser(message.raw);
6279
6304
  }
6280
6305
  function shouldPersistBeforeAck(body) {
6281
6306
  return body.event?.type === "app_mention" || body.event?.type === "message";
@@ -6295,6 +6320,8 @@ async function persistSlackMessage(args) {
6295
6320
  conversationStore: args.conversationStore,
6296
6321
  queue: args.queue,
6297
6322
  state: args.state
6323
+ }).catch((error) => {
6324
+ throw new SlackEventPersistenceError(error);
6298
6325
  });
6299
6326
  }
6300
6327
  async function routeParsedMessage(args) {
@@ -6643,9 +6670,16 @@ async function handleSlackWebhook(args) {
6643
6670
  services: args.services
6644
6671
  });
6645
6672
  if (shouldPersistBeforeAck(parsed)) {
6646
- await eventTask.catch((error) => {
6647
- logException(error, "slack_event_persist_failed");
6648
- });
6673
+ try {
6674
+ await eventTask;
6675
+ } catch (error) {
6676
+ if (!(error instanceof SlackEventPersistenceError)) {
6677
+ logException(error, "slack_event_enqueue_failed");
6678
+ return new Response("ok", { status: 200 });
6679
+ }
6680
+ logException(error.cause, "slack_event_persist_failed");
6681
+ return new Response("Slack event persistence failed", { status: 503 });
6682
+ }
6649
6683
  } else {
6650
6684
  enqueue(
6651
6685
  args.waitUntil,
@@ -9531,16 +9565,29 @@ function createReplyToThread(deps) {
9531
9565
  await options.beforeFirstResponsePost?.();
9532
9566
  };
9533
9567
  const postAuthPauseNotice = async (providerDisplayName) => {
9568
+ const text = buildAuthPauseResponse(
9569
+ message.author.userId,
9570
+ providerDisplayName
9571
+ );
9572
+ const footer = buildSlackReplyFooter({ conversationId });
9534
9573
  try {
9535
- await beforeFirstResponsePost();
9536
- await thread.post(
9537
- buildSlackOutputMessage(
9538
- buildAuthPauseResponse(
9539
- message.author.userId,
9540
- providerDisplayName
9541
- )
9542
- )
9543
- );
9574
+ if (channelId && threadTs) {
9575
+ await postSlackApiReplyPosts({
9576
+ beforePost: beforeFirstResponsePost,
9577
+ channelId,
9578
+ threadTs,
9579
+ posts: [
9580
+ {
9581
+ text,
9582
+ stage: "thread_reply"
9583
+ }
9584
+ ],
9585
+ footer
9586
+ });
9587
+ } else {
9588
+ await beforeFirstResponsePost();
9589
+ await thread.post(buildSlackOutputMessage(text));
9590
+ }
9544
9591
  } catch (error) {
9545
9592
  logException(
9546
9593
  error,
@@ -25,7 +25,7 @@ export interface SlackReplyFooter {
25
25
  items: SlackReplyFooterItem[];
26
26
  }
27
27
  /**
28
- * Build the compact conversation footer for the finalized Slack reply.
28
+ * Build the compact conversation footer for visible Slack reply surfaces.
29
29
  *
30
30
  * Detailed turn metrics stay in the dashboard instead of Slack-visible copy.
31
31
  */
@@ -1,6 +1,5 @@
1
1
  import type { RedisStateAdapter } from "@chat-adapter/state-redis";
2
2
  import type { StateAdapter } from "chat";
3
- export declare const ACTIVE_LOCK_TTL_MS = 90000;
4
3
  export declare function getConnectedStateContext(): Promise<{
5
4
  redisStateAdapter?: RedisStateAdapter;
6
5
  stateAdapter: StateAdapter;
@@ -0,0 +1,7 @@
1
+ import type { Lock, StateAdapter } from "chat";
2
+ export declare const ACTIVE_LOCK_TTL_MS = 90000;
3
+ /**
4
+ * Acquire a lock for long-running work that the queued state adapter should
5
+ * keep alive while the owning invocation is still making progress.
6
+ */
7
+ export declare function acquireActiveLock(state: StateAdapter, threadId: string): Promise<Lock | null>;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-Y5OFBCBZ.js";
3
+ } from "./chunk-LXTPBU4K.js";
4
4
  import {
5
5
  normalizeSlackConversationId
6
6
  } from "./chunk-Q6XFTRV5.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPluginProviders
3
- } from "./chunk-ZLMBNBUG.js";
3
+ } from "./chunk-YLVJRYTD.js";
4
4
 
5
5
  // src/chat/plugins/validation.ts
6
6
  function validatePluginRegistrations(registrations) {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getDefaultRedisStateAdapterFor,
6
6
  getStateAdapter
7
- } from "./chunk-Y5OFBCBZ.js";
7
+ } from "./chunk-LXTPBU4K.js";
8
8
  import {
9
9
  parseDestination,
10
10
  sameDestination
@@ -5,7 +5,14 @@ import {
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
8
+
9
+ // src/chat/state/locks.ts
8
10
  var ACTIVE_LOCK_TTL_MS = 9e4;
11
+ async function acquireActiveLock(state, threadId) {
12
+ return await state.acquireLock(threadId, ACTIVE_LOCK_TTL_MS);
13
+ }
14
+
15
+ // src/chat/state/adapter.ts
9
16
  var ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
10
17
  var stateAdapter;
11
18
  var redisStateAdapter;
@@ -53,8 +60,7 @@ function createPrefixedStateAdapter(base, prefix) {
53
60
  }
54
61
  function createQueuedStateAdapter(base, options) {
55
62
  const heartbeats = /* @__PURE__ */ new Map();
56
- const effectiveLockTtlMs = (ttlMs) => Math.max(ttlMs, ACTIVE_LOCK_TTL_MS);
57
- const shouldHeartbeatLock = (ttlMs) => ttlMs <= ACTIVE_LOCK_TTL_MS;
63
+ const shouldHeartbeatLock = (ttlMs) => ttlMs === ACTIVE_LOCK_TTL_MS;
58
64
  const heartbeatKey = (lock) => `${lock.threadId}:${lock.token}`;
59
65
  const stopHeartbeatByKey = (key) => {
60
66
  const heartbeat = heartbeats.get(key);
@@ -124,10 +130,9 @@ function createQueuedStateAdapter(base, options) {
124
130
  });
125
131
  };
126
132
  const acquireLock = async (threadId, ttlMs) => {
127
- const effectiveTtlMs = effectiveLockTtlMs(ttlMs);
128
- const lock = await base.acquireLock(threadId, effectiveTtlMs);
133
+ const lock = await base.acquireLock(threadId, ttlMs);
129
134
  if (lock && shouldHeartbeatLock(ttlMs)) {
130
- startOrUpdateHeartbeat(lock, effectiveTtlMs);
135
+ startOrUpdateHeartbeat(lock, ttlMs);
131
136
  }
132
137
  return lock;
133
138
  };
@@ -147,12 +152,11 @@ function createQueuedStateAdapter(base, options) {
147
152
  await base.releaseLock(lock);
148
153
  },
149
154
  extendLock: async (lock, ttlMs) => {
150
- const effectiveTtlMs = effectiveLockTtlMs(ttlMs);
151
- const extended = await base.extendLock(lock, effectiveTtlMs);
155
+ const extended = await base.extendLock(lock, ttlMs);
152
156
  if (extended) {
153
- lock.expiresAt = Date.now() + effectiveTtlMs;
157
+ lock.expiresAt = Date.now() + ttlMs;
154
158
  if (shouldHeartbeatLock(ttlMs)) {
155
- startOrUpdateHeartbeat(lock, effectiveTtlMs);
159
+ startOrUpdateHeartbeat(lock, ttlMs);
156
160
  } else {
157
161
  stopHeartbeat(lock);
158
162
  }
@@ -238,7 +242,7 @@ async function disconnectStateAdapter() {
238
242
  }
239
243
 
240
244
  export {
241
- ACTIVE_LOCK_TTL_MS,
245
+ acquireActiveLock,
242
246
  getConnectedStateContext,
243
247
  getDefaultRedisStateAdapterFor,
244
248
  getStateAdapter,
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-G3E7SCME.js";
4
4
  import {
5
5
  getStateAdapter
6
- } from "./chunk-Y5OFBCBZ.js";
6
+ } from "./chunk-LXTPBU4K.js";
7
7
  import {
8
8
  toOptionalTrimmed
9
9
  } from "./chunk-T77LUIX3.js";
10
10
  import {
11
11
  getPluginRuntimeDependencies,
12
12
  getPluginRuntimePostinstall
13
- } from "./chunk-ZLMBNBUG.js";
13
+ } from "./chunk-YLVJRYTD.js";
14
14
  import {
15
15
  withSpan
16
16
  } from "./chunk-EJN6G5A2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStateAdapter
3
- } from "./chunk-Y5OFBCBZ.js";
3
+ } from "./chunk-LXTPBU4K.js";
4
4
  import {
5
5
  logException,
6
6
  logInfo,
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  getConnectedStateContext,
11
11
  getStateAdapter
12
- } from "./chunk-Y5OFBCBZ.js";
12
+ } from "./chunk-LXTPBU4K.js";
13
13
  import {
14
14
  parseDestination
15
15
  } from "./chunk-Q6XFTRV5.js";
@@ -10,7 +10,7 @@ import {
10
10
  isSnapshotMissingError,
11
11
  resolveRuntimeDependencySnapshot,
12
12
  runNonInteractiveCommand
13
- } from "./chunk-JBASI5VV.js";
13
+ } from "./chunk-PNGAJ75P.js";
14
14
  import {
15
15
  pluginTaskId,
16
16
  pluginTaskParamsSchema,
@@ -28,7 +28,7 @@ import {
28
28
  recordAuthorizationRequested,
29
29
  recordMcpProviderConnected,
30
30
  upsertAgentTurnSessionRecord
31
- } from "./chunk-KOIMO7S3.js";
31
+ } from "./chunk-TO3UAY2M.js";
32
32
  import {
33
33
  createPluginEmbedder,
34
34
  createPluginHookRunner,
@@ -39,11 +39,11 @@ import {
39
39
  getPlugins,
40
40
  getSlackToolContext,
41
41
  resolveChannelCapabilities
42
- } from "./chunk-NFTMTIP3.js";
42
+ } from "./chunk-WBSGTHNO.js";
43
43
  import {
44
44
  createPluginLogger,
45
45
  createPluginState
46
- } from "./chunk-56TBVRJG.js";
46
+ } from "./chunk-RARSKPVT.js";
47
47
  import {
48
48
  getDb
49
49
  } from "./chunk-NYKJ3KON.js";
@@ -55,8 +55,9 @@ import {
55
55
  sandboxSkillFile
56
56
  } from "./chunk-G3E7SCME.js";
57
57
  import {
58
+ acquireActiveLock,
58
59
  getStateAdapter
59
- } from "./chunk-Y5OFBCBZ.js";
60
+ } from "./chunk-LXTPBU4K.js";
60
61
  import {
61
62
  SlackActionError,
62
63
  downloadPrivateSlackFile,
@@ -113,7 +114,7 @@ import {
113
114
  findSkillByName,
114
115
  loadSkillsByName,
115
116
  parseSkillInvocation
116
- } from "./chunk-4SCWV7TJ.js";
117
+ } from "./chunk-Y3EG7S7P.js";
117
118
  import {
118
119
  createPluginBroker,
119
120
  credentialContextSchema,
@@ -127,7 +128,7 @@ import {
127
128
  isPluginConfigKey,
128
129
  resolveAuthTokenPlaceholder,
129
130
  resolvePluginCommandEnv
130
- } from "./chunk-ZLMBNBUG.js";
131
+ } from "./chunk-YLVJRYTD.js";
131
132
  import {
132
133
  createRequester,
133
134
  parseActorUserId
@@ -752,7 +753,6 @@ var storedTokensSchema = pluginStoredTokensSchema;
752
753
  var KEY_PREFIX = "oauth-token";
753
754
  var BUFFER_MS = 24 * 60 * 60 * 1e3;
754
755
  var LONG_LIVED_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
755
- var REFRESH_LOCK_TTL_MS = 3e4;
756
756
  var REFRESH_LOCK_WAIT_MS = 3e4;
757
757
  var REFRESH_LOCK_RETRY_MS = 100;
758
758
  function tokenKey(userId, provider) {
@@ -787,7 +787,7 @@ var StateAdapterTokenStore = class {
787
787
  const lockKey = refreshLockKey(userId, provider);
788
788
  const deadline = Date.now() + REFRESH_LOCK_WAIT_MS;
789
789
  while (true) {
790
- const lock = await this.state.acquireLock(lockKey, REFRESH_LOCK_TTL_MS);
790
+ const lock = await acquireActiveLock(this.state, lockKey);
791
791
  if (lock) {
792
792
  try {
793
793
  return await callback();
@@ -11839,11 +11839,15 @@ async function generateAssistantReply(messageText2, context) {
11839
11839
  promptGuidelines: definition.promptGuidelines,
11840
11840
  promptSnippet: definition.promptSnippet
11841
11841
  }));
11842
+ const pendingMcpProvider = context.pendingAuth?.kind === "mcp" ? context.pendingAuth.provider : void 0;
11842
11843
  const providersToRestore = /* @__PURE__ */ new Set([
11843
11844
  ...connectedMcpProviders,
11844
11845
  ...inferActiveMcpProvidersFromPiMessages(priorPiMessages)
11845
11846
  ]);
11846
11847
  for (const provider of providersToRestore) {
11848
+ if (provider === pendingMcpProvider) {
11849
+ continue;
11850
+ }
11847
11851
  if (await turnMcpToolManager.activateProvider(provider)) {
11848
11852
  await recordConnectedMcpProvider(provider);
11849
11853
  }
@@ -11853,6 +11857,9 @@ async function generateAssistantReply(messageText2, context) {
11853
11857
  }
11854
11858
  }
11855
11859
  for (const skill of activeSkills) {
11860
+ if (skill.pluginProvider === pendingMcpProvider) {
11861
+ continue;
11862
+ }
11856
11863
  if (await turnMcpToolManager.activateForSkill(skill)) {
11857
11864
  await recordConnectedMcpProvider(skill.pluginProvider);
11858
11865
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createPluginLogger,
3
3
  createPluginState
4
- } from "./chunk-56TBVRJG.js";
4
+ } from "./chunk-RARSKPVT.js";
5
5
  import {
6
6
  getDb
7
7
  } from "./chunk-NYKJ3KON.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getPluginForSkillPath,
3
3
  getPluginSkillRoots
4
- } from "./chunk-ZLMBNBUG.js";
4
+ } from "./chunk-YLVJRYTD.js";
5
5
  import {
6
6
  skillRoots
7
7
  } from "./chunk-Q3XNY442.js";
@@ -1638,11 +1638,19 @@ function registerPluginManifest(state, manifest, pluginDir, skillsDir, migration
1638
1638
  }
1639
1639
  function registerYamlPluginManifest(state, raw, pluginDir) {
1640
1640
  const manifest = parsePluginManifest(raw, pluginDir, pluginConfig);
1641
+ const candidateSkillsDir = path.join(pluginDir, "skills");
1642
+ const hasSkillsDir = (() => {
1643
+ try {
1644
+ return statSync(candidateSkillsDir).isDirectory();
1645
+ } catch {
1646
+ return false;
1647
+ }
1648
+ })();
1641
1649
  registerPluginManifest(
1642
1650
  state,
1643
1651
  manifest,
1644
1652
  pluginDir,
1645
- path.join(pluginDir, "skills")
1653
+ hasSkillsDir ? candidateSkillsDir : void 0
1646
1654
  );
1647
1655
  }
1648
1656
  function normalizePluginRoots(roots) {
package/dist/cli/chat.js CHANGED
@@ -130,9 +130,9 @@ async function configureLocalChatPlugins(pluginSet) {
130
130
  databaseModule
131
131
  ] = await Promise.all([
132
132
  import("../plugins-PZMDS7AT.js"),
133
- import("../agent-hooks-ZOE7RIED.js"),
134
- import("../registry-OIPAJU2O.js"),
135
- import("../validation-SLA6IGF7.js"),
133
+ import("../agent-hooks-7P2WSR4R.js"),
134
+ import("../registry-RRIDPJBT.js"),
135
+ import("../validation-MDMYBRFB.js"),
136
136
  import("../db-7A7PFRGL.js")
137
137
  ]);
138
138
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
@@ -193,7 +193,7 @@ async function runPrompt(options, io, pluginSet) {
193
193
  defaultStateAdapterForLocalChat();
194
194
  await configureLocalChatPlugins(pluginSet);
195
195
  const conversationId = newRunConversationId();
196
- const { runLocalAgentTurn } = await import("../runner-KPLNHDCV.js");
196
+ const { runLocalAgentTurn } = await import("../runner-JWLZI3EX.js");
197
197
  const result = await runLocalAgentTurn(
198
198
  {
199
199
  conversationId,
@@ -217,7 +217,7 @@ async function runInteractive(io, pluginSet) {
217
217
  defaultStateAdapterForLocalChat();
218
218
  await configureLocalChatPlugins(pluginSet);
219
219
  const conversationId = newRunConversationId();
220
- const { runLocalAgentTurn } = await import("../runner-KPLNHDCV.js");
220
+ const { runLocalAgentTurn } = await import("../runner-JWLZI3EX.js");
221
221
  const rl = readline.createInterface({
222
222
  input: io.input,
223
223
  output: io.output,
package/dist/cli/check.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  parseSkillFile
3
- } from "../chunk-4SCWV7TJ.js";
3
+ } from "../chunk-Y3EG7S7P.js";
4
4
  import {
5
5
  parseInlinePluginManifest,
6
6
  parsePluginManifest
7
- } from "../chunk-ZLMBNBUG.js";
7
+ } from "../chunk-YLVJRYTD.js";
8
8
  import "../chunk-VALUBQ7R.js";
9
9
  import "../chunk-Q3XNY442.js";
10
10
  import "../chunk-EJN6G5A2.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "../chunk-XBBC6W45.js";
4
+ } from "../chunk-KIDP757T.js";
5
5
  import {
6
6
  pluginCatalogConfigFromPluginSet,
7
7
  pluginCliRegistrationsFromPluginSet,
@@ -10,15 +10,15 @@ import {
10
10
  import {
11
11
  setPlugins,
12
12
  validatePlugins
13
- } from "../chunk-NFTMTIP3.js";
13
+ } from "../chunk-WBSGTHNO.js";
14
14
  import {
15
15
  createPluginLogger
16
- } from "../chunk-56TBVRJG.js";
16
+ } from "../chunk-RARSKPVT.js";
17
17
  import {
18
18
  getDb
19
19
  } from "../chunk-NYKJ3KON.js";
20
20
  import "../chunk-G3E7SCME.js";
21
- import "../chunk-Y5OFBCBZ.js";
21
+ import "../chunk-LXTPBU4K.js";
22
22
  import "../chunk-Q6XFTRV5.js";
23
23
  import "../chunk-T77LUIX3.js";
24
24
  import {
@@ -26,7 +26,7 @@ import {
26
26
  } from "../chunk-Y2CM7HXH.js";
27
27
  import {
28
28
  setPluginCatalogConfig
29
- } from "../chunk-ZLMBNBUG.js";
29
+ } from "../chunk-YLVJRYTD.js";
30
30
  import "../chunk-VALUBQ7R.js";
31
31
  import "../chunk-Q3XNY442.js";
32
32
  import "../chunk-EJN6G5A2.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  resolveRuntimeDependencySnapshot
3
- } from "../chunk-JBASI5VV.js";
3
+ } from "../chunk-PNGAJ75P.js";
4
4
  import "../chunk-G3E7SCME.js";
5
5
  import {
6
6
  disconnectStateAdapter
7
- } from "../chunk-Y5OFBCBZ.js";
7
+ } from "../chunk-LXTPBU4K.js";
8
8
  import "../chunk-T77LUIX3.js";
9
9
  import {
10
10
  getPluginProviders,
11
11
  getPluginRuntimeDependencies,
12
12
  getPluginRuntimePostinstall
13
- } from "../chunk-ZLMBNBUG.js";
13
+ } from "../chunk-YLVJRYTD.js";
14
14
  import "../chunk-VALUBQ7R.js";
15
15
  import "../chunk-Q3XNY442.js";
16
16
  import "../chunk-EJN6G5A2.js";
@@ -3,7 +3,7 @@ import {
3
3
  listConversationsByActivity,
4
4
  recordConversationActivity,
5
5
  requestConversationWork
6
- } from "../chunk-R6Z5XWY3.js";
6
+ } from "../chunk-KPL4WJWA.js";
7
7
  import {
8
8
  JUNIOR_THREAD_STATE_TTL_MS,
9
9
  coerceThreadConversationState
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  createPluginLogger,
19
19
  createPluginState
20
- } from "../chunk-56TBVRJG.js";
20
+ } from "../chunk-RARSKPVT.js";
21
21
  import {
22
22
  createJuniorSqlExecutor,
23
23
  createSqlStore,
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  disconnectStateAdapter,
28
28
  getConnectedStateContext
29
- } from "../chunk-Y5OFBCBZ.js";
29
+ } from "../chunk-LXTPBU4K.js";
30
30
  import {
31
31
  parseDestination,
32
32
  sameDestination
@@ -40,7 +40,7 @@ import {
40
40
  import {
41
41
  getPluginMigrationRoots,
42
42
  setPluginCatalogConfig
43
- } from "../chunk-ZLMBNBUG.js";
43
+ } from "../chunk-YLVJRYTD.js";
44
44
  import "../chunk-VALUBQ7R.js";
45
45
  import "../chunk-Q3XNY442.js";
46
46
  import {
@@ -17,7 +17,7 @@ import {
17
17
  isPluginConfigKey,
18
18
  isPluginProvider,
19
19
  setPluginCatalogConfig
20
- } from "./chunk-ZLMBNBUG.js";
20
+ } from "./chunk-YLVJRYTD.js";
21
21
  import "./chunk-VALUBQ7R.js";
22
22
  import "./chunk-Q3XNY442.js";
23
23
  import "./chunk-EJN6G5A2.js";
package/dist/reporting.js CHANGED
@@ -6,21 +6,21 @@ import {
6
6
  getConversationDetails,
7
7
  getConversationDetailsForIds,
8
8
  resolveSlackConversationContextFromThreadId
9
- } from "./chunk-ZQB37HUX.js";
9
+ } from "./chunk-C2YBH4S6.js";
10
10
  import {
11
11
  buildSystemPrompt,
12
12
  getAgentTurnSessionRecord,
13
13
  listAgentTurnSessionSummariesForConversation
14
- } from "./chunk-KOIMO7S3.js";
14
+ } from "./chunk-TO3UAY2M.js";
15
15
  import {
16
16
  getPluginOperationalReports
17
- } from "./chunk-NFTMTIP3.js";
18
- import "./chunk-56TBVRJG.js";
17
+ } from "./chunk-WBSGTHNO.js";
18
+ import "./chunk-RARSKPVT.js";
19
19
  import {
20
20
  getConversationStore
21
21
  } from "./chunk-NYKJ3KON.js";
22
22
  import "./chunk-G3E7SCME.js";
23
- import "./chunk-Y5OFBCBZ.js";
23
+ import "./chunk-LXTPBU4K.js";
24
24
  import "./chunk-Q6XFTRV5.js";
25
25
  import {
26
26
  canExposeConversationPayload,
@@ -29,11 +29,11 @@ import {
29
29
  } from "./chunk-T77LUIX3.js";
30
30
  import {
31
31
  discoverSkills
32
- } from "./chunk-4SCWV7TJ.js";
32
+ } from "./chunk-Y3EG7S7P.js";
33
33
  import {
34
34
  getPluginPackageContent,
35
35
  getPluginProviders
36
- } from "./chunk-ZLMBNBUG.js";
36
+ } from "./chunk-YLVJRYTD.js";
37
37
  import {
38
38
  toStoredSlackRequester
39
39
  } from "./chunk-VALUBQ7R.js";
@@ -14,28 +14,28 @@ import {
14
14
  startActiveTurn,
15
15
  updateConversationStats,
16
16
  upsertConversationMessage
17
- } from "./chunk-HHDUKWVG.js";
17
+ } from "./chunk-W36B5PT4.js";
18
18
  import {
19
19
  coerceThreadConversationState
20
20
  } from "./chunk-Z4CIQ3EB.js";
21
- import "./chunk-JBASI5VV.js";
21
+ import "./chunk-PNGAJ75P.js";
22
22
  import "./chunk-KNFROR7R.js";
23
23
  import {
24
24
  commitMessages,
25
25
  loadProjection
26
- } from "./chunk-KOIMO7S3.js";
27
- import "./chunk-NFTMTIP3.js";
28
- import "./chunk-56TBVRJG.js";
26
+ } from "./chunk-TO3UAY2M.js";
27
+ import "./chunk-WBSGTHNO.js";
28
+ import "./chunk-RARSKPVT.js";
29
29
  import "./chunk-NYKJ3KON.js";
30
30
  import "./chunk-G3E7SCME.js";
31
- import "./chunk-Y5OFBCBZ.js";
31
+ import "./chunk-LXTPBU4K.js";
32
32
  import "./chunk-Q6XFTRV5.js";
33
33
  import {
34
34
  stripRuntimeTurnContext,
35
35
  trimTrailingAssistantMessages
36
36
  } from "./chunk-T77LUIX3.js";
37
- import "./chunk-4SCWV7TJ.js";
38
- import "./chunk-ZLMBNBUG.js";
37
+ import "./chunk-Y3EG7S7P.js";
38
+ import "./chunk-YLVJRYTD.js";
39
39
  import "./chunk-VALUBQ7R.js";
40
40
  import "./chunk-Q3XNY442.js";
41
41
  import {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "./chunk-XBBC6W45.js";
5
- import "./chunk-ZLMBNBUG.js";
4
+ } from "./chunk-KIDP757T.js";
5
+ import "./chunk-YLVJRYTD.js";
6
6
  import "./chunk-VALUBQ7R.js";
7
7
  import "./chunk-Q3XNY442.js";
8
8
  import "./chunk-EJN6G5A2.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.76.0",
3
+ "version": "0.77.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "pg": "^8.16.3",
71
71
  "yaml": "^2.9.0",
72
72
  "zod": "^4.4.3",
73
- "@sentry/junior-plugin-api": "0.76.0"
73
+ "@sentry/junior-plugin-api": "0.77.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@emnapi/core": "^1.10.0",
@@ -86,9 +86,9 @@
86
86
  "typescript": "^6.0.3",
87
87
  "vercel": "^54.4.0",
88
88
  "vitest": "^4.1.7",
89
- "@sentry/junior-scheduler": "0.76.0",
89
+ "@sentry/junior-memory": "0.77.0",
90
90
  "@sentry/junior-testing": "0.0.0",
91
- "@sentry/junior-memory": "0.76.0"
91
+ "@sentry/junior-scheduler": "0.77.0"
92
92
  },
93
93
  "scripts": {
94
94
  "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",