@sentry/junior 0.67.3 → 0.69.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 (66) hide show
  1. package/dist/app.js +1465 -814
  2. package/dist/build/virtual-config.d.ts +2 -2
  3. package/dist/chat/agent-dispatch/heartbeat.d.ts +2 -2
  4. package/dist/chat/agent-dispatch/store.d.ts +4 -1
  5. package/dist/chat/agent-dispatch/types.d.ts +2 -4
  6. package/dist/chat/agent-dispatch/validation.d.ts +3 -2
  7. package/dist/chat/credentials/context.d.ts +49 -24
  8. package/dist/chat/credentials/user-token-store.d.ts +6 -0
  9. package/dist/chat/destination.d.ts +12 -0
  10. package/dist/chat/ingress/message-router.d.ts +1 -1
  11. package/dist/chat/mcp/auth-store.d.ts +2 -0
  12. package/dist/chat/mcp/oauth.d.ts +2 -0
  13. package/dist/chat/oauth-flow.d.ts +7 -0
  14. package/dist/chat/plugins/agent-hooks.d.ts +9 -9
  15. package/dist/chat/plugins/auth/auth-token-placeholder.d.ts +2 -2
  16. package/dist/chat/plugins/auth/oauth-request.d.ts +3 -1
  17. package/dist/chat/plugins/credential-hooks.d.ts +34 -0
  18. package/dist/chat/plugins/logging.d.ts +1 -1
  19. package/dist/chat/plugins/state.d.ts +1 -1
  20. package/dist/chat/plugins/types.d.ts +19 -23
  21. package/dist/chat/respond.d.ts +2 -0
  22. package/dist/chat/runtime/reply-executor.d.ts +3 -1
  23. package/dist/chat/runtime/slack-runtime.d.ts +8 -3
  24. package/dist/chat/sandbox/egress-credentials.d.ts +33 -0
  25. package/dist/chat/sandbox/egress-schemas.d.ts +105 -0
  26. package/dist/chat/sandbox/egress-session.d.ts +17 -17
  27. package/dist/chat/sandbox/sandbox.d.ts +3 -0
  28. package/dist/chat/sandbox/session.d.ts +1 -0
  29. package/dist/chat/services/mcp-auth-orchestration.d.ts +2 -0
  30. package/dist/chat/services/pending-auth.d.ts +2 -0
  31. package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -0
  32. package/dist/chat/services/provider-retry.d.ts +13 -4
  33. package/dist/chat/services/timeout-resume.d.ts +2 -0
  34. package/dist/chat/services/turn-session-record.d.ts +6 -0
  35. package/dist/chat/slack/attachment-fetchers.d.ts +11 -0
  36. package/dist/chat/slack/footer.d.ts +2 -7
  37. package/dist/chat/state/conversation.d.ts +1 -0
  38. package/dist/chat/state/turn-session.d.ts +4 -0
  39. package/dist/chat/task-execution/queue.d.ts +2 -0
  40. package/dist/chat/task-execution/store.d.ts +5 -0
  41. package/dist/chat/task-execution/vercel-callback.d.ts +4 -0
  42. package/dist/chat/task-execution/vercel-queue.d.ts +2 -0
  43. package/dist/chat/task-execution/worker.d.ts +4 -2
  44. package/dist/chat/tools/slack/context.d.ts +3 -0
  45. package/dist/chat/tools/types.d.ts +21 -2
  46. package/dist/chunk-76YMBKW7.js +326 -0
  47. package/dist/{chunk-PIVOJIUD.js → chunk-B5HKWWQB.js} +9 -5
  48. package/dist/chunk-BBXYXOJW.js +1858 -0
  49. package/dist/{chunk-V47RLIO2.js → chunk-GT67ZWZQ.js} +4 -4
  50. package/dist/{chunk-75UZ4JLC.js → chunk-IGLNC5H6.js} +21 -9
  51. package/dist/{chunk-EBVQXCD2.js → chunk-JS4HURDT.js} +362 -280
  52. package/dist/{chunk-UQQSW7QB.js → chunk-N3MORKTH.js} +74 -331
  53. package/dist/chunk-R62YWUNO.js +264 -0
  54. package/dist/{chunk-OIIXZOOC.js → chunk-UXG6TU2U.js} +311 -2015
  55. package/dist/cli/check.js +4 -4
  56. package/dist/cli/snapshot-warmup.js +5 -4
  57. package/dist/nitro.d.ts +1 -1
  58. package/dist/nitro.js +21 -19
  59. package/dist/plugins.d.ts +2 -2
  60. package/dist/reporting.d.ts +2 -2
  61. package/dist/reporting.js +13 -11
  62. package/package.json +6 -4
  63. package/dist/chat/plugins/auth/github-app-broker.d.ts +0 -4
  64. package/dist/chat/plugins/github-permissions.d.ts +0 -11
  65. package/dist/chat/queue/thread-message-dispatcher.d.ts +0 -33
  66. package/dist/chunk-KVZL5NZS.js +0 -519
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getPluginForSkillPath,
3
- getPluginSkillRoots,
4
- logWarn
5
- } from "./chunk-OIIXZOOC.js";
3
+ getPluginSkillRoots
4
+ } from "./chunk-UXG6TU2U.js";
6
5
  import {
6
+ logWarn,
7
7
  skillRoots
8
- } from "./chunk-KVZL5NZS.js";
8
+ } from "./chunk-BBXYXOJW.js";
9
9
 
10
10
  // src/chat/skills.ts
11
11
  import fs from "fs/promises";
@@ -1,3 +1,8 @@
1
+ import {
2
+ destinationKey,
3
+ parseDestination
4
+ } from "./chunk-76YMBKW7.js";
5
+
1
6
  // src/plugins.ts
2
7
  function cloneManifests(manifests) {
3
8
  return manifests ? structuredClone(manifests) : void 0;
@@ -91,7 +96,7 @@ function pluginCatalogConfigFromPluginSet(pluginSet) {
91
96
  ...manifests ? { manifests } : {}
92
97
  };
93
98
  }
94
- function trustedPluginRegistrationsFromPluginSet(pluginSet) {
99
+ function pluginHookRegistrationsFromPluginSet(pluginSet) {
95
100
  return pluginSet?.registrations.filter(
96
101
  (plugin) => plugin.hooks || plugin.legacyStatePrefixes
97
102
  ) ?? [];
@@ -112,7 +117,8 @@ function buildSignedPayload(message, signedAtMs) {
112
117
  return [
113
118
  CONVERSATION_WORK_QUEUE_SIGNATURE_CONTEXT,
114
119
  signedAtMs,
115
- message.conversationId
120
+ message.conversationId,
121
+ destinationKey(message.destination)
116
122
  ].join(":");
117
123
  }
118
124
  function signPayload(message, signedAtMs, secret) {
@@ -131,11 +137,13 @@ function parseSignedConversationQueueMessage(value) {
131
137
  return void 0;
132
138
  }
133
139
  const record = value;
134
- if (typeof record.conversationId !== "string" || !record.conversationId.trim() || record.signatureVersion !== CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION || typeof record.signedAtMs !== "number" || !Number.isFinite(record.signedAtMs) || typeof record.signature !== "string" || !record.signature.trim()) {
140
+ const destination = parseDestination(record.destination);
141
+ if (typeof record.conversationId !== "string" || !record.conversationId.trim() || !destination || record.signatureVersion !== CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION || typeof record.signedAtMs !== "number" || !Number.isFinite(record.signedAtMs) || typeof record.signature !== "string" || !record.signature.trim()) {
135
142
  return void 0;
136
143
  }
137
144
  return {
138
145
  conversationId: record.conversationId,
146
+ destination,
139
147
  signature: record.signature,
140
148
  signatureVersion: CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION,
141
149
  signedAtMs: record.signedAtMs
@@ -165,14 +173,18 @@ function verifySignedConversationQueueMessage(value, nowMs = Date.now()) {
165
173
  if (!timingSafeMatch(expected, message.signature)) {
166
174
  return void 0;
167
175
  }
168
- return { conversationId: message.conversationId };
176
+ return {
177
+ conversationId: message.conversationId,
178
+ destination: message.destination
179
+ };
169
180
  }
170
181
 
171
182
  // src/chat/task-execution/vercel-queue.ts
172
183
  var DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC = "junior_conversation_work";
173
184
  var defaultQueue;
174
- function getTopic(options) {
175
- return options.topic || process.env.JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC?.trim() || DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC;
185
+ function resolveConversationWorkQueueTopic(options = {}) {
186
+ const topic = options.topic?.trim();
187
+ return topic || process.env.JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC?.trim() || DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC;
176
188
  }
177
189
  function toDelaySeconds(options) {
178
190
  if (!options?.delayMs || options.delayMs <= 0) {
@@ -181,7 +193,7 @@ function toDelaySeconds(options) {
181
193
  return Math.ceil(options.delayMs / 1e3);
182
194
  }
183
195
  function createVercelConversationWorkQueue(options = {}) {
184
- const topic = getTopic(options);
196
+ const topic = resolveConversationWorkQueueTopic(options);
185
197
  const client = options.client ?? new QueueClient();
186
198
  return {
187
199
  async send(message, sendOptions) {
@@ -206,8 +218,8 @@ function getVercelConversationWorkQueue() {
206
218
  export {
207
219
  defineJuniorPlugins,
208
220
  pluginCatalogConfigFromPluginSet,
209
- trustedPluginRegistrationsFromPluginSet,
221
+ pluginHookRegistrationsFromPluginSet,
210
222
  verifySignedConversationQueueMessage,
211
- DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC,
223
+ resolveConversationWorkQueueTopic,
212
224
  getVercelConversationWorkQueue
213
225
  };