@sentry/junior 0.185.0 → 0.187.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-NGZQLL5O.js → agent-hooks-XVAE2554.js} +11 -11
- package/dist/api/schema/conversation.d.ts +8 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +44 -36
- package/dist/app.js +1079 -264
- package/dist/{catalog-runtime-AAEAO2RL.js → catalog-runtime-DWFAC562.js} +4 -4
- package/dist/chat/agent/types.d.ts +16 -13
- package/dist/chat/api-turns/{accepted-reply.d.ts → assistant-message.d.ts} +3 -2
- package/dist/chat/api-turns/cancellation.d.ts +0 -1
- package/dist/chat/api-turns/mailbox-input.d.ts +4 -0
- package/dist/chat/api-turns/routing.d.ts +23 -7
- package/dist/chat/api-turns/work.d.ts +2 -2
- package/dist/chat/conversations/location.d.ts +2 -2
- package/dist/chat/conversations/store.d.ts +13 -0
- package/dist/chat/conversations/turn-lifecycle.d.ts +2 -0
- package/dist/chat/providers/slack/runtime.d.ts +0 -2
- package/dist/chat/providers/slack/turn.d.ts +0 -2
- package/dist/chat/resource-events/actor.d.ts +14 -2
- package/dist/chat/resource-events/app-publisher.d.ts +18 -0
- package/dist/chat/resource-events/catalog.d.ts +19 -0
- package/dist/chat/resource-events/ingest.d.ts +0 -1
- package/dist/chat/resource-events/notification.d.ts +28 -3
- package/dist/chat/resource-events/runtime-catalog.d.ts +7 -2
- package/dist/chat/resource-events/store.d.ts +1 -13
- package/dist/chat/resource-events/workspace.d.ts +7 -3
- package/dist/chat/sandbox/egress/credentials.d.ts +5 -4
- package/dist/chat/sandbox/egress/session.d.ts +9 -9
- package/dist/chat/sandbox/errors.d.ts +1 -1
- package/dist/chat/sandbox/ref.d.ts +1 -1
- package/dist/chat/sandbox/snapshot/events.d.ts +8 -1
- package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +6 -1
- package/dist/chat/sentry-links.d.ts +2 -0
- package/dist/chat/services/turn-session-routing.d.ts +23 -7
- package/dist/chat/task-execution/slack-resource-event.d.ts +47 -0
- package/dist/chat/task-execution/slack-work.d.ts +0 -21
- package/dist/chat/task-input.d.ts +22 -0
- package/dist/chat/tools/event-tasks.d.ts +1 -1
- package/dist/chat/tools/resource-events.d.ts +1 -1
- package/dist/{chunk-Y5G23T2D.js → chunk-27T5HZHO.js} +91 -7
- package/dist/{chunk-TVVAMOLS.js → chunk-2VUDJGB6.js} +2 -2
- package/dist/{chunk-X7NCJQAA.js → chunk-4A2R3AQB.js} +1 -1
- package/dist/{chunk-MWOH6CIK.js → chunk-4YD3DET6.js} +278 -116
- package/dist/{chunk-INQHUE72.js → chunk-6FGN7ZEG.js} +6 -2
- package/dist/{chunk-ZKKGFUWM.js → chunk-6FKNNUSN.js} +6 -6
- package/dist/{chunk-OMQ2J6F6.js → chunk-6YCIYOVA.js} +1 -1
- package/dist/{chunk-7GAP2XG4.js → chunk-7LRRVMPH.js} +1 -1
- package/dist/{chunk-4HA36IWS.js → chunk-BITZUBPJ.js} +8 -8
- package/dist/{chunk-QCT4226Q.js → chunk-D3GDGREI.js} +3 -3
- package/dist/{chunk-WLKWN4CD.js → chunk-D5BWM37G.js} +8 -5
- package/dist/{chunk-VH4IU3UC.js → chunk-DUE4EUNL.js} +19 -45
- package/dist/{chunk-DAPC2HTM.js → chunk-EIWYZXSM.js} +5 -5
- package/dist/{chunk-LVK4WJKM.js → chunk-HXR3FHTE.js} +13 -3
- package/dist/{chunk-UUULGCKK.js → chunk-ITLYUKGZ.js} +14 -4
- package/dist/{chunk-FTVMXDNN.js → chunk-JCRXXEMC.js} +1 -1
- package/dist/{chunk-EJYP3NQ4.js → chunk-JZPDYKRG.js} +37 -3
- package/dist/{chunk-HJPC32TQ.js → chunk-KRYJ5VOD.js} +20 -14
- package/dist/{chunk-QZKHHG3B.js → chunk-MUPPP7A7.js} +436 -283
- package/dist/{chunk-D63IUQQE.js → chunk-NIKLTFBP.js} +12 -9
- package/dist/{chunk-U4CTAVWN.js → chunk-NU775DLU.js} +2 -2
- package/dist/{chunk-W7GCLNIV.js → chunk-OM4SFFJK.js} +3 -3
- package/dist/{chunk-X2SS6BF7.js → chunk-P2VU5JNH.js} +32 -36
- package/dist/{chunk-4K25ODAO.js → chunk-PFAZSRGR.js} +3 -1
- package/dist/{chunk-EIJCPJOY.js → chunk-Q6OCUQ7W.js} +1 -1
- package/dist/{chunk-GJTIZQGJ.js → chunk-QH3I7ZOK.js} +1 -1
- package/dist/{chunk-4S47VHJR.js → chunk-STF4GSK4.js} +3 -3
- package/dist/{chunk-C6TS47CQ.js → chunk-TQHCZXN7.js} +11 -5
- package/dist/{chunk-ZIF2S464.js → chunk-U3KMII5Y.js} +1 -1
- package/dist/{chunk-6DOAUXLD.js → chunk-U5POFCKM.js} +753 -1718
- package/dist/{chunk-PNYJOEVV.js → chunk-U6ZQHRIP.js} +1 -1
- package/dist/{chunk-LRI5IRGY.js → chunk-URZ7UD4P.js} +2 -2
- package/dist/{chunk-6Q7YZLCL.js → chunk-VC343WHM.js} +9 -1
- package/dist/{chunk-ABAX75GG.js → chunk-WKIS4VRK.js} +17 -3
- package/dist/{chunk-FFHXG2FX.js → chunk-WL3R2KTS.js} +11 -29
- package/dist/{chunk-EWEH2PJW.js → chunk-WRDW3A3D.js} +5 -5
- package/dist/{chunk-7MHNIGHP.js → chunk-X5SXFVZT.js} +1 -1
- package/dist/{chunk-ATUWN6Z3.js → chunk-Z6OHCDXP.js} +2 -2
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-TRJ77FAU.js → db-FBHAWVXU.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-XD5SV3MS.js → oauth-callback-server-5HS5ULC6.js} +28 -28
- package/dist/{runner-KFX7NG6D.js → runner-46W6NV6B.js} +19 -19
- package/dist/{skills-J2AH26CW.js → skills-TG3QC4B6.js} +5 -5
- package/dist/spawn-Y6YWBIJS.js +41 -0
- package/dist/task-runner-YSGBPN4U.js +34 -0
- package/dist/{validation-O5J4VOPF.js → validation-GMRIDBC5.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-ECPQTG3U.js → work-W4ULBJTU.js} +21 -21
- package/dist/{worker-RS3DXUDO.js → worker-M6NVACS2.js} +10 -10
- package/package.json +4 -4
- package/dist/spawn-VU3CSRI6.js +0 -41
- package/dist/task-runner-5JG3VIIY.js +0 -34
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WKIS4VRK.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-U6ZQHRIP.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-URZ7UD4P.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-N7TMSOZH.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6YCIYOVA.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -248,9 +248,12 @@ function normalizeConversation(conversationId, value) {
|
|
|
248
248
|
if (storedConversationId !== conversationId || typeof createdAtMs !== "number" || typeof lastActivityAtMs !== "number" || typeof updatedAtMs !== "number" || !execution || value.destination !== void 0 && !destination) {
|
|
249
249
|
return void 0;
|
|
250
250
|
}
|
|
251
|
-
if (execution.pendingMessages.length > 0 && execution.pendingMessages.some(
|
|
252
|
-
(
|
|
253
|
-
|
|
251
|
+
if (execution.pendingMessages.length > 0 && execution.pendingMessages.some((message) => {
|
|
252
|
+
if (!message.destination) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
return !destination || !sameDestination(message.destination, destination);
|
|
256
|
+
})) {
|
|
254
257
|
return void 0;
|
|
255
258
|
}
|
|
256
259
|
return {
|
|
@@ -636,10 +639,10 @@ async function writeConversation(state, lock, conversation) {
|
|
|
636
639
|
});
|
|
637
640
|
}
|
|
638
641
|
function assertSameOptionalConversationDestination(args) {
|
|
639
|
-
if (!args.
|
|
642
|
+
if (!args.next || !args.current) {
|
|
640
643
|
return;
|
|
641
644
|
}
|
|
642
|
-
if (
|
|
645
|
+
if (sameDestination(args.current, args.next)) {
|
|
643
646
|
return;
|
|
644
647
|
}
|
|
645
648
|
throw new Error(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
abandonTurnRecord,
|
|
3
3
|
extractAssistantText
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D5BWM37G.js";
|
|
5
5
|
|
|
6
6
|
// src/chat/state/turn-id.ts
|
|
7
7
|
function buildDeterministicTurnId(messageId) {
|
|
@@ -116,7 +116,7 @@ function decideReply(message) {
|
|
|
116
116
|
}
|
|
117
117
|
const text = sanitizeAssistantText(extractAssistantText(message));
|
|
118
118
|
if (!text) return { kind: "empty" };
|
|
119
|
-
if (isNoReplyMarker(text)
|
|
119
|
+
if (isNoReplyMarker(text)) {
|
|
120
120
|
return { kind: "suppress" };
|
|
121
121
|
}
|
|
122
122
|
return { kind: "deliver", text };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversationTurnLifecycleService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VC343WHM.js";
|
|
4
4
|
import {
|
|
5
5
|
runAgentWithTimeout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6FGN7ZEG.js";
|
|
7
7
|
import {
|
|
8
8
|
getConversationEventStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WKIS4VRK.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/runtime/turn-execution.ts
|
|
12
12
|
var AgentRunError = class extends Error {
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildSentryConversationUrl,
|
|
6
6
|
deleteWebAuthorization
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ITLYUKGZ.js";
|
|
8
8
|
import {
|
|
9
9
|
AgentRunError,
|
|
10
10
|
executeTurn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OM4SFFJK.js";
|
|
12
12
|
import {
|
|
13
13
|
buildDeliveredTurnStatePatch,
|
|
14
14
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -19,22 +19,22 @@ import {
|
|
|
19
19
|
getTurnUserSlackMessageTs,
|
|
20
20
|
persistAuthPauseTurnState,
|
|
21
21
|
requireTurnFailureEventId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EIWYZXSM.js";
|
|
23
23
|
import {
|
|
24
|
-
resolveTurnSessionRouting,
|
|
25
24
|
scheduleSessionCompletedPluginTasks
|
|
26
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WL3R2KTS.js";
|
|
27
26
|
import {
|
|
28
|
-
|
|
29
|
-
} from "./chunk-
|
|
27
|
+
getTurnLifecycle
|
|
28
|
+
} from "./chunk-VC343WHM.js";
|
|
30
29
|
import {
|
|
31
30
|
coerceThreadConversationState,
|
|
32
31
|
configValueSchema,
|
|
33
32
|
getLocationConfigurationService,
|
|
34
33
|
getPersistedSandboxState,
|
|
35
34
|
getPersistedThreadState,
|
|
36
|
-
persistThreadStateById
|
|
37
|
-
|
|
35
|
+
persistThreadStateById,
|
|
36
|
+
resolveTurnSessionRouting
|
|
37
|
+
} from "./chunk-27T5HZHO.js";
|
|
38
38
|
import {
|
|
39
39
|
createUserTokenStore,
|
|
40
40
|
deleteMcpAuthSession,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
getMcpStoredOAuthCredentials,
|
|
45
45
|
lookupSlackUserProfile,
|
|
46
46
|
resolvePluginOAuthAccount
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-BITZUBPJ.js";
|
|
48
48
|
import {
|
|
49
49
|
addReactionToMessage,
|
|
50
50
|
escapeSlackMrkdwnText,
|
|
@@ -57,20 +57,20 @@ import {
|
|
|
57
57
|
removeReactionFromMessage,
|
|
58
58
|
resolveBaseUrl,
|
|
59
59
|
truncateStatusText
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-6FKNNUSN.js";
|
|
61
61
|
import {
|
|
62
62
|
parseSlackThreadId,
|
|
63
63
|
readSlackRawMessageContext,
|
|
64
64
|
resolveSlackChannelIdFromMessage,
|
|
65
65
|
resolveSlackChannelIdFromThreadId
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-4A2R3AQB.js";
|
|
67
67
|
import {
|
|
68
68
|
RetryableDeliveryError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6FGN7ZEG.js";
|
|
70
70
|
import {
|
|
71
71
|
ensureConversationWake,
|
|
72
72
|
requestConversationWork
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-NIKLTFBP.js";
|
|
74
74
|
import {
|
|
75
75
|
CooperativeTurnYieldError,
|
|
76
76
|
clearPendingAuth,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
isCooperativeTurnYieldError,
|
|
80
80
|
isPendingAuthLatestRequest,
|
|
81
81
|
markTurnFailed
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-NU775DLU.js";
|
|
83
83
|
import {
|
|
84
84
|
TurnSliceLimitExceededError,
|
|
85
85
|
abandonTurnRecord,
|
|
@@ -99,13 +99,13 @@ import {
|
|
|
99
99
|
recordTurnSummary,
|
|
100
100
|
saveTurnCheckpoint,
|
|
101
101
|
turnHasReply
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-D5BWM37G.js";
|
|
103
103
|
import {
|
|
104
104
|
getVercelConversationWorkQueue
|
|
105
105
|
} from "./chunk-DKIJ2RP5.js";
|
|
106
106
|
import {
|
|
107
107
|
getTurnRequestDeadline
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-JCRXXEMC.js";
|
|
109
109
|
import {
|
|
110
110
|
SlackActionError,
|
|
111
111
|
getDashboardConversationLink,
|
|
@@ -114,39 +114,38 @@ import {
|
|
|
114
114
|
getSlackClient,
|
|
115
115
|
isDmChannel,
|
|
116
116
|
normalizeSlackConversationId
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-DUE4EUNL.js";
|
|
118
118
|
import {
|
|
119
|
-
getConversationEventStore,
|
|
120
119
|
getSqlExecutor,
|
|
121
120
|
requireSlackDestination,
|
|
122
121
|
upsertIdentity,
|
|
123
122
|
upsertLinkedIdentity
|
|
124
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-WKIS4VRK.js";
|
|
125
124
|
import {
|
|
126
125
|
acquireActiveLock,
|
|
127
126
|
getStateAdapter
|
|
128
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-U6ZQHRIP.js";
|
|
129
128
|
import {
|
|
130
129
|
botConfig,
|
|
131
130
|
escapeXml,
|
|
132
131
|
getChatConfig,
|
|
133
132
|
getRuntimeMetadata,
|
|
134
133
|
normalizeSlackEmojiName
|
|
135
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-URZ7UD4P.js";
|
|
136
135
|
import {
|
|
137
136
|
defaultModelId
|
|
138
137
|
} from "./chunk-D4YV5TDV.js";
|
|
139
138
|
import {
|
|
140
139
|
discoverSkills
|
|
141
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-Z6OHCDXP.js";
|
|
142
141
|
import {
|
|
143
142
|
pluginCatalogRuntime
|
|
144
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-QH3I7ZOK.js";
|
|
145
144
|
import {
|
|
146
145
|
buildOAuthTokenRequest,
|
|
147
146
|
hasRequiredOAuthScope,
|
|
148
147
|
parseOAuthTokenResponse
|
|
149
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-X5SXFVZT.js";
|
|
150
149
|
import {
|
|
151
150
|
createSlackResumeActor,
|
|
152
151
|
isUserActor,
|
|
@@ -165,7 +164,7 @@ import {
|
|
|
165
164
|
setTags,
|
|
166
165
|
toOptionalString,
|
|
167
166
|
withLogContext
|
|
168
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-6YCIYOVA.js";
|
|
169
168
|
|
|
170
169
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
171
170
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1176,6 +1175,7 @@ async function postResumeFailureReply(args) {
|
|
|
1176
1175
|
});
|
|
1177
1176
|
}
|
|
1178
1177
|
async function handleResumeFailure(args) {
|
|
1178
|
+
const turnLifecycle = getTurnLifecycle();
|
|
1179
1179
|
const capturedEventId = logException(args.error, args.eventName);
|
|
1180
1180
|
const eventId = requireTurnFailureEventId(capturedEventId, args.eventName);
|
|
1181
1181
|
let failureStatePersistError;
|
|
@@ -1188,7 +1188,7 @@ async function handleResumeFailure(args) {
|
|
|
1188
1188
|
{ "app.error.original_event_id": eventId }
|
|
1189
1189
|
);
|
|
1190
1190
|
try {
|
|
1191
|
-
await
|
|
1191
|
+
await turnLifecycle.fail({
|
|
1192
1192
|
conversationId: args.resume.conversationId,
|
|
1193
1193
|
turnId: args.resume.turnId,
|
|
1194
1194
|
createdAtMs: Date.now(),
|
|
@@ -1218,7 +1218,7 @@ async function handleResumeFailure(args) {
|
|
|
1218
1218
|
{ "app.error.original_event_id": eventId }
|
|
1219
1219
|
);
|
|
1220
1220
|
try {
|
|
1221
|
-
await
|
|
1221
|
+
await turnLifecycle.fail({
|
|
1222
1222
|
conversationId: args.resume.conversationId,
|
|
1223
1223
|
turnId: args.resume.turnId,
|
|
1224
1224
|
createdAtMs: Date.now(),
|
|
@@ -1237,7 +1237,7 @@ async function handleResumeFailure(args) {
|
|
|
1237
1237
|
if (failureStatePersistError) {
|
|
1238
1238
|
throw failureStatePersistError;
|
|
1239
1239
|
}
|
|
1240
|
-
await
|
|
1240
|
+
await turnLifecycle.fail({
|
|
1241
1241
|
conversationId: args.resume.conversationId,
|
|
1242
1242
|
turnId: args.resume.turnId,
|
|
1243
1243
|
createdAtMs: Date.now(),
|
|
@@ -1324,9 +1324,7 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1324
1324
|
let assistantMessageDelivered = false;
|
|
1325
1325
|
let shouldScheduleCompletedPluginTasks = false;
|
|
1326
1326
|
let postDeliveryCommitError;
|
|
1327
|
-
const turnLifecycle =
|
|
1328
|
-
getConversationEventStore()
|
|
1329
|
-
);
|
|
1327
|
+
const turnLifecycle = getTurnLifecycle();
|
|
1330
1328
|
let failureCode = "agent_run_failed";
|
|
1331
1329
|
let runArgs = args;
|
|
1332
1330
|
try {
|
|
@@ -1609,7 +1607,6 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1609
1607
|
error: new Error("Resumed Run ended suspended without onSuspend"),
|
|
1610
1608
|
eventName: "slack.resume.turn.failed",
|
|
1611
1609
|
failureCode: "agent_run_failed",
|
|
1612
|
-
turnLifecycle,
|
|
1613
1610
|
resume: runArgs
|
|
1614
1611
|
});
|
|
1615
1612
|
};
|
|
@@ -1622,7 +1619,6 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1622
1619
|
),
|
|
1623
1620
|
eventName: "slack.resume.turn.failed",
|
|
1624
1621
|
failureCode: "agent_run_failed",
|
|
1625
|
-
turnLifecycle,
|
|
1626
1622
|
resume: runArgs
|
|
1627
1623
|
});
|
|
1628
1624
|
};
|
|
@@ -1668,7 +1664,6 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1668
1664
|
error: runError,
|
|
1669
1665
|
eventName: "slack.resume.turn.failed",
|
|
1670
1666
|
failureCode,
|
|
1671
|
-
turnLifecycle,
|
|
1672
1667
|
resume: runArgs
|
|
1673
1668
|
});
|
|
1674
1669
|
};
|
|
@@ -1719,7 +1714,6 @@ async function resumeSlackTurnInContext(args) {
|
|
|
1719
1714
|
error: pauseError,
|
|
1720
1715
|
eventName: "slack.resume.pause_handler.failed",
|
|
1721
1716
|
failureCode: "persistence_failed",
|
|
1722
|
-
turnLifecycle,
|
|
1723
1717
|
resume: runArgs
|
|
1724
1718
|
});
|
|
1725
1719
|
return true;
|
|
@@ -2095,6 +2089,7 @@ async function resumeAuthorizedMcpTurn(args) {
|
|
|
2095
2089
|
},
|
|
2096
2090
|
actor,
|
|
2097
2091
|
destination,
|
|
2092
|
+
...routing.location ? { location: routing.location } : void 0,
|
|
2098
2093
|
source: routing.source,
|
|
2099
2094
|
toolChannelId: authSession.toolChannelId ?? authSession.channelId,
|
|
2100
2095
|
environment: {
|
|
@@ -2760,6 +2755,7 @@ async function resumeOAuthSessionRecordTurn(stored, options) {
|
|
|
2760
2755
|
},
|
|
2761
2756
|
actor,
|
|
2762
2757
|
destination,
|
|
2758
|
+
...routing.location ? { location: routing.location } : void 0,
|
|
2763
2759
|
source: routing.source,
|
|
2764
2760
|
toolChannelId: stored.channelId,
|
|
2765
2761
|
environment: {
|
|
@@ -405,7 +405,9 @@ var conversationReportTurnLifecycleEventDataSchema = z3.discriminatedUnion(
|
|
|
405
405
|
turnId: z3.string().min(1),
|
|
406
406
|
state: z3.literal("failed"),
|
|
407
407
|
failureCode: conversationTurnFailureCodeSchema,
|
|
408
|
-
failureReason: conversationTurnFailureReasonSchema.optional()
|
|
408
|
+
failureReason: conversationTurnFailureReasonSchema.optional(),
|
|
409
|
+
eventId: z3.string().regex(/^[a-f0-9]{32}$/i).optional(),
|
|
410
|
+
sentryEventUrl: z3.string().url().optional()
|
|
409
411
|
}).strict()
|
|
410
412
|
]
|
|
411
413
|
);
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-7H2VZTWN.js";
|
|
7
7
|
import {
|
|
8
8
|
runWithTurnRequestDeadline
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JCRXXEMC.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6YCIYOVA.js";
|
|
13
13
|
|
|
14
14
|
// src/chat/plugins/task-queue.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
|
|
|
129
129
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
130
130
|
// Load the runner on first use so this module can send without a cycle.
|
|
131
131
|
run: async (message) => {
|
|
132
|
-
const { processPluginTask } = await import("./task-runner-
|
|
132
|
+
const { processPluginTask } = await import("./task-runner-YSGBPN4U.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -19,23 +19,23 @@ import {
|
|
|
19
19
|
releaseConversationWork,
|
|
20
20
|
requestAnotherSlice,
|
|
21
21
|
startConversationWork
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NIKLTFBP.js";
|
|
23
23
|
import {
|
|
24
24
|
ConversationQueueMessageRejectedError
|
|
25
25
|
} from "./chunk-JAL3CH4G.js";
|
|
26
26
|
import {
|
|
27
27
|
getTurnRequestDeadline
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JCRXXEMC.js";
|
|
29
29
|
import {
|
|
30
30
|
getChatConfig,
|
|
31
31
|
isProviderRetryError
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-URZ7UD4P.js";
|
|
33
33
|
import {
|
|
34
34
|
logException,
|
|
35
35
|
logInfo,
|
|
36
36
|
logWarn,
|
|
37
37
|
withLogContext
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6YCIYOVA.js";
|
|
39
39
|
|
|
40
40
|
// src/chat/task-execution/worker.ts
|
|
41
41
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -276,7 +276,13 @@ async function processConversationWorkInContext(message, options) {
|
|
|
276
276
|
}
|
|
277
277
|
return { status: "no_work" };
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
let destination = initial.destination;
|
|
280
|
+
if (!destination && options.conversationStore) {
|
|
281
|
+
const stored = await options.conversationStore.get({ conversationId });
|
|
282
|
+
if (stored && !stored.lineage) {
|
|
283
|
+
destination = stored.destination;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
280
286
|
const lease = await startConversationWork({
|
|
281
287
|
conversationId,
|
|
282
288
|
conversationStore: options.conversationStore,
|