@sentry/junior 0.68.0 → 0.70.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.
- package/dist/app.js +1779 -746
- package/dist/build/virtual-config.d.ts +2 -2
- package/dist/chat/agent-dispatch/heartbeat.d.ts +2 -2
- package/dist/chat/agent-dispatch/store.d.ts +4 -1
- package/dist/chat/agent-dispatch/types.d.ts +2 -4
- package/dist/chat/agent-dispatch/validation.d.ts +3 -2
- package/dist/chat/credentials/context.d.ts +49 -24
- package/dist/chat/credentials/user-token-store.d.ts +6 -0
- package/dist/chat/destination.d.ts +12 -0
- package/dist/chat/ingress/message-router.d.ts +1 -1
- package/dist/chat/mcp/auth-store.d.ts +2 -0
- package/dist/chat/mcp/oauth.d.ts +2 -0
- package/dist/chat/oauth-flow.d.ts +7 -0
- package/dist/chat/plugins/agent-hooks.d.ts +9 -9
- package/dist/chat/plugins/auth/auth-token-placeholder.d.ts +2 -2
- package/dist/chat/plugins/auth/oauth-request.d.ts +3 -1
- package/dist/chat/plugins/credential-hooks.d.ts +53 -0
- package/dist/chat/plugins/logging.d.ts +1 -1
- package/dist/chat/plugins/state.d.ts +1 -1
- package/dist/chat/plugins/types.d.ts +19 -23
- package/dist/chat/respond.d.ts +2 -0
- package/dist/chat/runtime/reply-executor.d.ts +3 -1
- package/dist/chat/runtime/slack-runtime.d.ts +8 -3
- package/dist/chat/sandbox/egress-credentials.d.ts +34 -0
- package/dist/chat/sandbox/egress-schemas.d.ts +105 -0
- package/dist/chat/sandbox/egress-session.d.ts +17 -17
- package/dist/chat/sandbox/sandbox.d.ts +3 -0
- package/dist/chat/sandbox/session.d.ts +1 -0
- package/dist/chat/services/mcp-auth-orchestration.d.ts +2 -0
- package/dist/chat/services/pending-auth.d.ts +2 -0
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -0
- package/dist/chat/services/provider-retry.d.ts +13 -4
- package/dist/chat/services/timeout-resume.d.ts +2 -0
- package/dist/chat/services/turn-session-record.d.ts +6 -0
- package/dist/chat/slack/attachment-fetchers.d.ts +11 -0
- package/dist/chat/state/conversation-details.d.ts +46 -0
- package/dist/chat/state/conversation.d.ts +1 -0
- package/dist/chat/state/turn-session.d.ts +4 -3
- package/dist/chat/task-execution/queue.d.ts +2 -0
- package/dist/chat/task-execution/store.d.ts +5 -0
- package/dist/chat/task-execution/vercel-callback.d.ts +4 -0
- package/dist/chat/task-execution/vercel-queue.d.ts +2 -0
- package/dist/chat/task-execution/worker.d.ts +4 -2
- package/dist/chat/tools/slack/context.d.ts +3 -0
- package/dist/chat/tools/types.d.ts +21 -2
- package/dist/chunk-76YMBKW7.js +326 -0
- package/dist/{chunk-PIVOJIUD.js → chunk-B5HKWWQB.js} +9 -5
- package/dist/chunk-BBXYXOJW.js +1858 -0
- package/dist/{chunk-V47RLIO2.js → chunk-GT67ZWZQ.js} +4 -4
- package/dist/{chunk-UQQSW7QB.js → chunk-HOGQL2H6.js} +197 -343
- package/dist/{chunk-75UZ4JLC.js → chunk-IGLNC5H6.js} +21 -9
- package/dist/{chunk-EBVQXCD2.js → chunk-JS4HURDT.js} +362 -280
- package/dist/chunk-R62YWUNO.js +264 -0
- package/dist/{chunk-OIIXZOOC.js → chunk-UXG6TU2U.js} +311 -2015
- package/dist/cli/check.js +4 -4
- package/dist/cli/init.js +18 -1
- package/dist/cli/snapshot-warmup.js +5 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +21 -19
- package/dist/plugins.d.ts +2 -2
- package/dist/reporting.d.ts +8 -4
- package/dist/reporting.js +72 -29
- package/package.json +6 -4
- package/dist/chat/plugins/auth/github-app-broker.d.ts +0 -4
- package/dist/chat/plugins/github-permissions.d.ts +0 -11
- package/dist/chat/queue/thread-message-dispatcher.d.ts +0 -33
- package/dist/chunk-KVZL5NZS.js +0 -519
|
@@ -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
|
|
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
|
-
|
|
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 {
|
|
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
|
|
175
|
-
|
|
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 =
|
|
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
|
-
|
|
221
|
+
pluginHookRegistrationsFromPluginSet,
|
|
210
222
|
verifySignedConversationQueueMessage,
|
|
211
|
-
|
|
223
|
+
resolveConversationWorkQueueTopic,
|
|
212
224
|
getVercelConversationWorkQueue
|
|
213
225
|
};
|