@sentry/junior 0.155.0 → 0.157.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/{agent-hooks-AWVTLAV2.js → agent-hooks-QI5EPOKQ.js} +10 -10
- package/dist/api/conversations/attachments.d.ts +32 -0
- package/dist/api/conversations/priority.d.ts +21 -0
- package/dist/api/conversations/routes.d.ts +4 -1
- package/dist/api/locations/detail.d.ts +4 -1
- package/dist/api/schema/conversation.d.ts +33 -8
- package/dist/api/schema/location.d.ts +4 -1
- package/dist/api/schema/person.d.ts +4 -1
- package/dist/api/schema/task.d.ts +8 -8
- package/dist/api/schema.js +1 -1
- package/dist/api.js +182 -48
- package/dist/app.js +128 -44
- package/dist/{catalog-runtime-V6YD6KH5.js → catalog-runtime-HUGHAFUN.js} +5 -5
- package/dist/chat/agent/types.d.ts +2 -0
- package/dist/chat/agent-invocations/types.d.ts +12 -12
- package/dist/chat/attachments/storage.d.ts +14 -0
- package/dist/chat/attachments/store.d.ts +68 -0
- package/dist/chat/attachments/vercel.d.ts +3 -0
- package/dist/chat/conversations/retention.d.ts +4 -0
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/event-tasks/types.d.ts +1 -1
- package/dist/chat/ingress/bot-mention.d.ts +13 -0
- package/dist/chat/plugins/unfinished-work.d.ts +11 -0
- package/dist/chat/runtime/agent-runner.d.ts +2 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
- package/dist/chat/services/conversation-memory.d.ts +1 -1
- package/dist/chat/slack/tools/send-files.d.ts +17 -11
- package/dist/chat/state/conversation.d.ts +2 -1
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +2 -0
- package/dist/{chunk-773XC7P4.js → chunk-3GS7O66Z.js} +159 -128
- package/dist/{chunk-JFZBGFNX.js → chunk-46ADYIPE.js} +2 -1
- package/dist/{chunk-KTVHAHUV.js → chunk-4M25PSFB.js} +1 -1
- package/dist/{chunk-4K5N6HTX.js → chunk-5TIH5GOE.js} +5 -5
- package/dist/{chunk-TVXAN43I.js → chunk-6MI43QZO.js} +1 -1
- package/dist/{chunk-RN3AWYEP.js → chunk-77QB5FNI.js} +1 -1
- package/dist/{chunk-Y7ZUBP2K.js → chunk-7J65DOBL.js} +6 -6
- package/dist/{chunk-2AHVM3HK.js → chunk-AFQ47JQ7.js} +10 -8
- package/dist/{chunk-ELOTIL5F.js → chunk-BLCVTEE7.js} +4 -4
- package/dist/{chunk-ZLSFOSDK.js → chunk-CZCMFRUQ.js} +18 -1
- package/dist/{chunk-2WLJDM23.js → chunk-D7BNWRYL.js} +1 -1
- package/dist/{chunk-EORR34UB.js → chunk-F7VOY4VQ.js} +1 -1
- package/dist/{chunk-JJX77MB7.js → chunk-G2FN3I66.js} +3 -3
- package/dist/{chunk-J2SYI36O.js → chunk-GEY6IFXH.js} +4 -4
- package/dist/{chunk-37G5HJ2X.js → chunk-GO2W3VZY.js} +4 -4
- package/dist/{chunk-LQT3SWFA.js → chunk-HJ3EZHIX.js} +351 -5
- package/dist/{chunk-SDRJ2LE3.js → chunk-I3OQVVMV.js} +1 -1
- package/dist/{chunk-TKJ7277U.js → chunk-MDZQ62PB.js} +2 -2
- package/dist/{chunk-V57LZDHN.js → chunk-MGJW3SW4.js} +6 -6
- package/dist/{chunk-7NYEB2TM.js → chunk-MKA3T2R6.js} +1 -1
- package/dist/{chunk-RQ62VKM7.js → chunk-MXO6VFB3.js} +1 -1
- package/dist/{chunk-AENPRXCG.js → chunk-OWASYHHV.js} +68 -39
- package/dist/{chunk-UWTXAYBP.js → chunk-PP4UQTH3.js} +9 -9
- package/dist/{chunk-JIC33O5L.js → chunk-RQBRGPUF.js} +2 -2
- package/dist/{chunk-NWSKFYOH.js → chunk-S4PFOWRA.js} +1 -1
- package/dist/{chunk-NKFRRZIT.js → chunk-TA5R6BME.js} +19 -18
- package/dist/{chunk-XFZLQANQ.js → chunk-UJYA75N5.js} +2 -2
- package/dist/{chunk-Y6MVGU7L.js → chunk-VBKFO65J.js} +35 -10
- package/dist/{chunk-KBT2I5ER.js → chunk-VDAEXEBB.js} +6 -6
- package/dist/{chunk-J7MWZFFP.js → chunk-VIBHFGQC.js} +4 -4
- package/dist/{chunk-APHDJYN7.js → chunk-VYDM7HUF.js} +1 -1
- package/dist/{chunk-CPQBTTI6.js → chunk-WNNYOPXX.js} +5 -5
- package/dist/{chunk-MLBH7J7J.js → chunk-XRERMHPN.js} +1 -1
- package/dist/cli/chat.js +30 -30
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/agent-invocations.d.ts +4 -4
- package/dist/db/schema/attachments.d.ts +178 -0
- package/dist/db/schema.d.ts +183 -5
- package/dist/{db-WT7P56AH.js → db-VQAV4PJ3.js} +7 -7
- package/dist/handlers/retention.d.ts +4 -1
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-R2PK2MCA.js → oauth-callback-server-K5KQAAAX.js} +23 -23
- package/dist/{runner-O7YYUIHT.js → runner-U7QI7P4S.js} +14 -15
- package/dist/{skills-S6HLQRH7.js → skills-ENKRBZ7K.js} +6 -6
- package/dist/spawn-4XGNONLS.js +37 -0
- package/dist/{validation-46WD2OAR.js → validation-VKCDVGA6.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-YT5QUBS3.js → work-IBD6PWP2.js} +17 -17
- package/dist/worker-TJFXOZRC.js +24 -0
- package/migrations/0027_attachment_storage.sql +16 -0
- package/migrations/meta/0027_snapshot.json +2554 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -4
- package/dist/spawn-B4SBFFA2.js +0 -37
- package/dist/worker-4C5BEDWN.js +0 -24
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
isConversationScopedChannel,
|
|
5
5
|
isDmChannel,
|
|
6
6
|
normalizeSlackConversationId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MDZQ62PB.js";
|
|
8
8
|
import {
|
|
9
9
|
getConversationEventStore,
|
|
10
10
|
getDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G2FN3I66.js";
|
|
12
12
|
import {
|
|
13
13
|
juniorConversationAnnotations,
|
|
14
14
|
juniorConversationEvents,
|
|
15
15
|
juniorIdentities,
|
|
16
16
|
juniorUsers
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3GS7O66Z.js";
|
|
18
18
|
import {
|
|
19
19
|
SANDBOX_WORKSPACE_ROOT
|
|
20
20
|
} from "./chunk-EM225ITJ.js";
|
|
21
21
|
import {
|
|
22
22
|
getStateAdapter
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-I3OQVVMV.js";
|
|
24
24
|
import {
|
|
25
25
|
botConfig,
|
|
26
26
|
completeObject,
|
|
27
27
|
embedTexts,
|
|
28
28
|
getSlackBotToken,
|
|
29
29
|
standardModelId
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UJYA75N5.js";
|
|
31
31
|
import {
|
|
32
32
|
isActorUserId,
|
|
33
33
|
parseActorUserId,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
logInfo,
|
|
41
41
|
logWarn,
|
|
42
42
|
normalizeIdentityEmail
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MKA3T2R6.js";
|
|
44
44
|
|
|
45
45
|
// src/chat/plugins/agent-hooks.ts
|
|
46
46
|
import {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginCredentialFailureError,
|
|
8
8
|
agentNameSchema,
|
|
9
9
|
createPluginAuthOrchestration
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WNNYOPXX.js";
|
|
11
11
|
import {
|
|
12
12
|
authorizationId
|
|
13
13
|
} from "./chunk-DIB4GX3G.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
searchSlackUsers,
|
|
33
33
|
selectPluginGrant,
|
|
34
34
|
toMcpProviderError
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AFQ47JQ7.js";
|
|
36
36
|
import {
|
|
37
37
|
RetryableDeliveryError,
|
|
38
38
|
actorFromRun,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
getSlackMessagePermalink,
|
|
49
49
|
resolveBaseUrl,
|
|
50
50
|
uploadFilesToConversation
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-VDAEXEBB.js";
|
|
52
52
|
import {
|
|
53
53
|
parseSandboxEgressAuthRequiredSignal,
|
|
54
54
|
parseSandboxEgressPermissionDeniedSignal,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
runNonInteractiveCommand,
|
|
75
75
|
throwSandboxOperationError,
|
|
76
76
|
wrapSandboxSetupError
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-GO2W3VZY.js";
|
|
78
78
|
import {
|
|
79
79
|
SCHEDULED_TASK_SYSTEM_ACTOR,
|
|
80
80
|
compactEventTask,
|
|
@@ -105,11 +105,12 @@ import {
|
|
|
105
105
|
resolveLocalScheduleAtMs,
|
|
106
106
|
saveEventTask,
|
|
107
107
|
scheduledTaskAttributes,
|
|
108
|
+
storeAttachments,
|
|
108
109
|
writableEventTask
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-HJ3EZHIX.js";
|
|
110
111
|
import {
|
|
111
112
|
parseSlackThreadId
|
|
112
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-VYDM7HUF.js";
|
|
113
114
|
import {
|
|
114
115
|
AGENTS_REMOVAL_NOTICE,
|
|
115
116
|
AGENTS_REPLACEMENT_NOTICE,
|
|
@@ -179,7 +180,7 @@ import {
|
|
|
179
180
|
stripRuntimeTurnContext,
|
|
180
181
|
trimTrailingAssistantMessages,
|
|
181
182
|
truncateText
|
|
182
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-GEY6IFXH.js";
|
|
183
184
|
import {
|
|
184
185
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
185
186
|
} from "./chunk-3Y47VMHV.js";
|
|
@@ -195,7 +196,7 @@ import {
|
|
|
195
196
|
getSlackToolContext,
|
|
196
197
|
readActorIdentity,
|
|
197
198
|
resolveChannelCapabilities
|
|
198
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-MGJW3SW4.js";
|
|
199
200
|
import {
|
|
200
201
|
SlackActionError,
|
|
201
202
|
downloadPrivateSlackFile,
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
204
205
|
isConversationScopedChannel,
|
|
205
206
|
normalizeSlackConversationId,
|
|
206
207
|
withSlackRetries
|
|
207
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-MDZQ62PB.js";
|
|
208
209
|
import {
|
|
209
210
|
KNOWN_CONVERSATION_EVENT_TYPES,
|
|
210
211
|
contextProvenance,
|
|
@@ -216,10 +217,10 @@ import {
|
|
|
216
217
|
instructionActors,
|
|
217
218
|
instructionProvenanceFor,
|
|
218
219
|
sameActorIdentity
|
|
219
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-G2FN3I66.js";
|
|
220
221
|
import {
|
|
221
222
|
juniorIdentities
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-3GS7O66Z.js";
|
|
223
224
|
import {
|
|
224
225
|
SANDBOX_DATA_ROOT,
|
|
225
226
|
SANDBOX_SKILLS_ROOT,
|
|
@@ -231,7 +232,7 @@ import {
|
|
|
231
232
|
} from "./chunk-EM225ITJ.js";
|
|
232
233
|
import {
|
|
233
234
|
getStateAdapter
|
|
234
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-I3OQVVMV.js";
|
|
235
236
|
import {
|
|
236
237
|
ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
|
|
237
238
|
COMPACTION_SUMMARY_PREFIX,
|
|
@@ -264,7 +265,7 @@ import {
|
|
|
264
265
|
resolveGatewayCredential,
|
|
265
266
|
resolveGatewayModel,
|
|
266
267
|
unwrapCurrentInstruction
|
|
267
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-UJYA75N5.js";
|
|
268
269
|
import {
|
|
269
270
|
canExposeConversationPayload,
|
|
270
271
|
resolveConversationPrivacy,
|
|
@@ -274,16 +275,16 @@ import {
|
|
|
274
275
|
toGenAiMessagesTraceAttributes,
|
|
275
276
|
toGenAiPayloadMetadata,
|
|
276
277
|
toGenAiPayloadTraceAttributes
|
|
277
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-D7BNWRYL.js";
|
|
278
279
|
import {
|
|
279
280
|
discoverSkills,
|
|
280
281
|
findSkillByName,
|
|
281
282
|
loadSkillsByName,
|
|
282
283
|
parseSkillInvocation
|
|
283
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-RQBRGPUF.js";
|
|
284
285
|
import {
|
|
285
286
|
pluginCatalogRuntime
|
|
286
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-6MI43QZO.js";
|
|
287
288
|
import {
|
|
288
289
|
CredentialUnavailableError,
|
|
289
290
|
OAuthProviderError,
|
|
@@ -291,7 +292,7 @@ import {
|
|
|
291
292
|
getOAuthProviderErrorAttributes,
|
|
292
293
|
resolveAuthTokenPlaceholder,
|
|
293
294
|
resolvePluginCommandEnv
|
|
294
|
-
} from "./chunk-
|
|
295
|
+
} from "./chunk-77QB5FNI.js";
|
|
295
296
|
import {
|
|
296
297
|
credentialUserSubjectId
|
|
297
298
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -319,7 +320,7 @@ import {
|
|
|
319
320
|
summarizeMessageText,
|
|
320
321
|
withLogContext,
|
|
321
322
|
withSpan
|
|
322
|
-
} from "./chunk-
|
|
323
|
+
} from "./chunk-MKA3T2R6.js";
|
|
323
324
|
import {
|
|
324
325
|
startInactiveSpan,
|
|
325
326
|
withActiveSpan
|
|
@@ -10538,12 +10539,13 @@ function createSlackMessageAddReactionTool(context, state) {
|
|
|
10538
10539
|
import { createHash as createHash4 } from "crypto";
|
|
10539
10540
|
import { z as z42 } from "zod";
|
|
10540
10541
|
var sendFilesResultSchema = juniorToolOutputSchema.extend({
|
|
10541
|
-
target: z42.string().min(1),
|
|
10542
|
-
channel_id: z42.string().min(1),
|
|
10543
10542
|
deduplicated: z42.boolean().optional(),
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10543
|
+
attachment_refs: z42.array(
|
|
10544
|
+
z42.object({
|
|
10545
|
+
id: z42.string().min(1),
|
|
10546
|
+
name: z42.string().min(1)
|
|
10547
|
+
})
|
|
10548
|
+
)
|
|
10547
10549
|
});
|
|
10548
10550
|
function normalizeFiles(files) {
|
|
10549
10551
|
return files.map((file) => ({
|
|
@@ -10564,7 +10566,7 @@ function fileOperationInput(files) {
|
|
|
10564
10566
|
sha256: fileContentDigest(file.data)
|
|
10565
10567
|
}));
|
|
10566
10568
|
}
|
|
10567
|
-
function createSendFilesTool(context, state, materializeFile) {
|
|
10569
|
+
function createSendFilesTool(context, state, materializeFile, attachments) {
|
|
10568
10570
|
return zodTool({
|
|
10569
10571
|
annotations: {
|
|
10570
10572
|
destructiveHint: false,
|
|
@@ -10606,22 +10608,26 @@ function createSendFilesTool(context, state, materializeFile) {
|
|
|
10606
10608
|
deduplicated: true
|
|
10607
10609
|
});
|
|
10608
10610
|
}
|
|
10611
|
+
const stored = attachments ? await storeAttachments({
|
|
10612
|
+
conversationId: attachments.conversationId,
|
|
10613
|
+
db: attachments.db,
|
|
10614
|
+
files: materializedFiles,
|
|
10615
|
+
storage: attachments.storage
|
|
10616
|
+
}) : [];
|
|
10609
10617
|
const uploads = materializedFiles.map((file) => ({
|
|
10610
10618
|
data: file.data,
|
|
10611
10619
|
filename: file.filename
|
|
10612
10620
|
}));
|
|
10613
|
-
|
|
10621
|
+
await uploadFilesToConversation({
|
|
10614
10622
|
channelId: activeChannelId,
|
|
10615
10623
|
files: uploads,
|
|
10616
10624
|
threadTs
|
|
10617
10625
|
});
|
|
10618
|
-
const fileIds = uploaded?.files?.map((file) => file.id).filter((id) => Boolean(id));
|
|
10619
10626
|
const response = {
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
...fileIds ? { file_ids: fileIds } : {}
|
|
10627
|
+
attachment_refs: stored.map((attachment, index) => ({
|
|
10628
|
+
id: attachment.id,
|
|
10629
|
+
name: materializedFiles[index].filename
|
|
10630
|
+
}))
|
|
10625
10631
|
};
|
|
10626
10632
|
state.setOperationResult(operationKey, response);
|
|
10627
10633
|
return response;
|
|
@@ -13318,7 +13324,12 @@ function createTools(availableSkills, hooks = {}, context, options = {}) {
|
|
|
13318
13324
|
tools.sendFiles = createSendFilesTool(
|
|
13319
13325
|
slackContext,
|
|
13320
13326
|
state,
|
|
13321
|
-
(input) => readSandboxFileUpload(context.workspace, input)
|
|
13327
|
+
(input) => readSandboxFileUpload(context.workspace, input),
|
|
13328
|
+
context.conversationId && context.attachmentStorage ? {
|
|
13329
|
+
conversationId: context.conversationId,
|
|
13330
|
+
db: getSqlExecutor(),
|
|
13331
|
+
storage: context.attachmentStorage
|
|
13332
|
+
} : void 0
|
|
13322
13333
|
);
|
|
13323
13334
|
}
|
|
13324
13335
|
tools.slackChannelListMessages = createSlackChannelListMessagesTool(slackContext);
|
|
@@ -14995,17 +15006,34 @@ async function requestBodyBytes(request) {
|
|
|
14995
15006
|
}
|
|
14996
15007
|
return await request.arrayBuffer();
|
|
14997
15008
|
}
|
|
14998
|
-
function
|
|
14999
|
-
|
|
15009
|
+
function githubBodyInspection(input) {
|
|
15010
|
+
if (input.provider !== "github" || input.requestMethod.toUpperCase() !== "POST" || input.upstreamUrl.hostname.toLowerCase() !== "api.github.com") {
|
|
15011
|
+
return void 0;
|
|
15012
|
+
}
|
|
15013
|
+
const pathname = input.upstreamUrl.pathname.toLowerCase();
|
|
15014
|
+
if (pathname.endsWith("/graphql")) {
|
|
15015
|
+
return "graphql";
|
|
15016
|
+
}
|
|
15017
|
+
return /^\/repos\/[^/]+\/[^/]+\/pulls\/[^/]+\/reviews(?:\/[^/]+\/events)?$/.test(
|
|
15018
|
+
pathname
|
|
15019
|
+
) ? "pull-request-review" : void 0;
|
|
15020
|
+
}
|
|
15021
|
+
function grantSelectionBodyTooLargeMessage(inspection) {
|
|
15022
|
+
return inspection === "graphql" ? "GitHub GraphQL request body is too large for Junior to inspect before issuing credentials." : "GitHub pull request review request body is too large for Junior to inspect before issuing credentials.";
|
|
15000
15023
|
}
|
|
15001
15024
|
function grantSelectionBodyText(input) {
|
|
15002
15025
|
if (input.body === void 0) {
|
|
15003
15026
|
return void 0;
|
|
15004
15027
|
}
|
|
15005
15028
|
if (input.body.byteLength > GRANT_SELECTION_BODY_TEXT_LIMIT_BYTES) {
|
|
15006
|
-
|
|
15029
|
+
const inspection = githubBodyInspection({
|
|
15030
|
+
provider: input.provider,
|
|
15031
|
+
requestMethod: input.request.method,
|
|
15032
|
+
upstreamUrl: input.upstreamUrl
|
|
15033
|
+
});
|
|
15034
|
+
if (inspection) {
|
|
15007
15035
|
throw new EgressPolicyDenied(
|
|
15008
|
-
|
|
15036
|
+
grantSelectionBodyTooLargeMessage(inspection)
|
|
15009
15037
|
);
|
|
15010
15038
|
}
|
|
15011
15039
|
return void 0;
|
|
@@ -15163,8 +15191,9 @@ async function executeCredentialedEgressRequest(input) {
|
|
|
15163
15191
|
request,
|
|
15164
15192
|
upstreamUrl
|
|
15165
15193
|
} = input;
|
|
15166
|
-
const bodyForGrantSelection =
|
|
15194
|
+
const bodyForGrantSelection = githubBodyInspection({
|
|
15167
15195
|
provider,
|
|
15196
|
+
requestMethod: request.method,
|
|
15168
15197
|
upstreamUrl
|
|
15169
15198
|
}) ? await requestBodyBytes(request) : void 0;
|
|
15170
15199
|
let grantSelection;
|
|
@@ -15172,7 +15201,6 @@ async function executeCredentialedEgressRequest(input) {
|
|
|
15172
15201
|
grantSelection = await selectSandboxEgressGrant({
|
|
15173
15202
|
bodyText: grantSelectionBodyText({
|
|
15174
15203
|
body: bodyForGrantSelection,
|
|
15175
|
-
...operation ? { operation } : {},
|
|
15176
15204
|
provider,
|
|
15177
15205
|
request,
|
|
15178
15206
|
upstreamUrl
|
|
@@ -15940,7 +15968,8 @@ async function wireAgentTools(args) {
|
|
|
15940
15968
|
});
|
|
15941
15969
|
const toolRuntimeContext = {
|
|
15942
15970
|
...commonToolRuntimeContext,
|
|
15943
|
-
...toolRoute
|
|
15971
|
+
...toolRoute,
|
|
15972
|
+
attachmentStorage: args.run.environment?.attachmentStorage
|
|
15944
15973
|
};
|
|
15945
15974
|
const actionReview = createToolActionReview({
|
|
15946
15975
|
context: {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5TIH5GOE.js";
|
|
6
6
|
import {
|
|
7
7
|
pluginTaskId,
|
|
8
8
|
pluginTaskParamsSchema,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
markTurnCompleted,
|
|
23
23
|
normalizeToolNameFromResult,
|
|
24
24
|
stripRuntimeTurnContext
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-GEY6IFXH.js";
|
|
26
26
|
import {
|
|
27
27
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
28
28
|
} from "./chunk-3Y47VMHV.js";
|
|
@@ -33,25 +33,25 @@ import {
|
|
|
33
33
|
createPluginModel,
|
|
34
34
|
createPluginState,
|
|
35
35
|
getPlugins
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-MGJW3SW4.js";
|
|
37
37
|
import {
|
|
38
38
|
getConversationStore,
|
|
39
39
|
getDb,
|
|
40
40
|
sameActorIdentity
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-G2FN3I66.js";
|
|
42
42
|
import {
|
|
43
43
|
juniorConversations,
|
|
44
44
|
juniorTaskExecutions
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3GS7O66Z.js";
|
|
46
46
|
import {
|
|
47
47
|
getStateAdapter
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-I3OQVVMV.js";
|
|
49
49
|
import {
|
|
50
50
|
ProviderError,
|
|
51
51
|
findProviderError,
|
|
52
52
|
getProviderErrorAttributes,
|
|
53
53
|
getProviderErrorUserMessage
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-UJYA75N5.js";
|
|
55
55
|
import {
|
|
56
56
|
credentialSubjectSchema
|
|
57
57
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
buildTurnFailureResponse,
|
|
63
63
|
logWarn
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-MKA3T2R6.js";
|
|
65
65
|
|
|
66
66
|
// src/chat/runtime/delivered-turn-state.ts
|
|
67
67
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
|
87
87
|
|
|
88
88
|
// src/chat/services/turn-session-routing.ts
|
|
89
89
|
async function resolveTurnSessionRouting(args) {
|
|
90
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
90
|
+
const conversationStore = args.conversationStore ?? (await import("./db-VQAV4PJ3.js")).getConversationStore();
|
|
91
91
|
const conversation = await conversationStore.get({
|
|
92
92
|
conversationId: args.conversationId
|
|
93
93
|
});
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-FA6POGLH.js";
|
|
4
4
|
import {
|
|
5
5
|
getTurnRequestDeadline
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S4PFOWRA.js";
|
|
7
7
|
import {
|
|
8
8
|
buildSentryConversationUrl,
|
|
9
9
|
deleteWebAuthorization
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4M25PSFB.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureConversationWake,
|
|
13
13
|
requestConversationWork
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BLCVTEE7.js";
|
|
15
15
|
import {
|
|
16
16
|
buildDeliveredTurnStatePatch,
|
|
17
17
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
requireTurnFailureEventId,
|
|
25
25
|
resolveTurnSessionRouting,
|
|
26
26
|
scheduleSessionCompletedPluginTasks
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PP4UQTH3.js";
|
|
28
28
|
import {
|
|
29
29
|
ConversationTurnLifecycleService,
|
|
30
30
|
coerceThreadConversationState,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
getPersistedSandboxState,
|
|
34
34
|
getPersistedThreadState,
|
|
35
35
|
persistThreadStateById
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5TIH5GOE.js";
|
|
37
37
|
import {
|
|
38
38
|
getVercelConversationWorkQueue
|
|
39
39
|
} from "./chunk-WR76IVA5.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
lookupSlackUserProfile,
|
|
48
48
|
resolvePluginOAuthAccount,
|
|
49
49
|
runAgentWithTimeout
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-AFQ47JQ7.js";
|
|
51
51
|
import {
|
|
52
52
|
RetryableDeliveryError
|
|
53
53
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -63,13 +63,13 @@ import {
|
|
|
63
63
|
removeReactionFromMessage,
|
|
64
64
|
resolveBaseUrl,
|
|
65
65
|
truncateStatusText
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-VDAEXEBB.js";
|
|
67
67
|
import {
|
|
68
68
|
parseSlackThreadId,
|
|
69
69
|
readSlackRawMessageContext,
|
|
70
70
|
resolveSlackChannelIdFromMessage,
|
|
71
71
|
resolveSlackChannelIdFromThreadId
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-VYDM7HUF.js";
|
|
73
73
|
import {
|
|
74
74
|
CooperativeTurnYieldError,
|
|
75
75
|
TurnSliceLimitExceededError,
|
|
@@ -96,29 +96,29 @@ import {
|
|
|
96
96
|
recordTurnSummary,
|
|
97
97
|
saveTurnCheckpoint,
|
|
98
98
|
turnHasReply
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-GEY6IFXH.js";
|
|
100
100
|
import {
|
|
101
101
|
getDashboardConversationLink,
|
|
102
102
|
getPluginSlackConversationLink
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-MGJW3SW4.js";
|
|
104
104
|
import {
|
|
105
105
|
SlackActionError,
|
|
106
106
|
getHeaderString,
|
|
107
107
|
getSlackClient,
|
|
108
108
|
isDmChannel,
|
|
109
109
|
normalizeSlackConversationId
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-MDZQ62PB.js";
|
|
111
111
|
import {
|
|
112
112
|
getConversationEventStore,
|
|
113
113
|
getSqlExecutor,
|
|
114
114
|
requireSlackDestination,
|
|
115
115
|
upsertIdentity,
|
|
116
116
|
upsertLinkedIdentity
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-G2FN3I66.js";
|
|
118
118
|
import {
|
|
119
119
|
acquireActiveLock,
|
|
120
120
|
getStateAdapter
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-I3OQVVMV.js";
|
|
122
122
|
import {
|
|
123
123
|
botConfig,
|
|
124
124
|
escapeXml,
|
|
@@ -126,18 +126,18 @@ import {
|
|
|
126
126
|
getRuntimeMetadata,
|
|
127
127
|
normalizeSlackEmojiName,
|
|
128
128
|
standardModelId
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-UJYA75N5.js";
|
|
130
130
|
import {
|
|
131
131
|
discoverSkills
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-RQBRGPUF.js";
|
|
133
133
|
import {
|
|
134
134
|
pluginCatalogRuntime
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-6MI43QZO.js";
|
|
136
136
|
import {
|
|
137
137
|
buildOAuthTokenRequest,
|
|
138
138
|
hasRequiredOAuthScope,
|
|
139
139
|
parseOAuthTokenResponse
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-77QB5FNI.js";
|
|
141
141
|
import {
|
|
142
142
|
createSlackResumeActor,
|
|
143
143
|
isUserActor,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
setTags,
|
|
154
154
|
toOptionalString,
|
|
155
155
|
withLogContext
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-MKA3T2R6.js";
|
|
157
157
|
import {
|
|
158
158
|
homeDir
|
|
159
159
|
} from "./chunk-H4HBKISO.js";
|
|
@@ -1432,6 +1432,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1432
1432
|
const recordedMessageId = recordDeliveredAssistantMessage({
|
|
1433
1433
|
conversation: deliveryState2.conversation,
|
|
1434
1434
|
sessionId: deliveryState2.sessionId,
|
|
1435
|
+
source: "slack",
|
|
1435
1436
|
text,
|
|
1436
1437
|
userMessageId: deliveryState2.userMessageId
|
|
1437
1438
|
});
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D7BNWRYL.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MKA3T2R6.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|