@sentry/junior 0.193.0 → 0.194.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-DWY3MZZ7.js → agent-hooks-IDX764FD.js} +11 -11
- package/dist/api/conversations/aggregate.d.ts +2 -0
- package/dist/api/conversations/list.d.ts +1 -1
- package/dist/api/conversations/projection.d.ts +1 -1
- package/dist/api/locations/detail.d.ts +1 -1
- package/dist/api/schema/conversation.d.ts +3 -3
- package/dist/api/schema/location.d.ts +1 -1
- package/dist/api/schema/person.d.ts +1 -1
- package/dist/api/schema/task.d.ts +71 -8
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -1
- package/dist/api.js +106 -187
- package/dist/app.js +44 -39
- package/dist/{catalog-runtime-NAD44W5K.js → catalog-runtime-MICXEBLK.js} +4 -4
- package/dist/chat/agent/resume.d.ts +2 -0
- package/dist/chat/config.d.ts +1 -0
- package/dist/chat/conversations/history.d.ts +4 -2
- package/dist/chat/services/turn-limit.d.ts +11 -1
- package/dist/chat/slack/{source-link.d.ts → location-url.d.ts} +1 -1
- package/dist/chat/task-execution/checkpoint.d.ts +2 -0
- package/dist/chat/task-execution/turn-cursor.d.ts +3 -0
- package/dist/chat/tasks/execution-stats.d.ts +13 -1
- package/dist/chat/usage.d.ts +4 -0
- package/dist/{chunk-GTXQHZ2O.js → chunk-2NL3Y47F.js} +5 -5
- package/dist/{chunk-DVU734PI.js → chunk-53IEEFFP.js} +3 -3
- package/dist/{chunk-WH5VV2RW.js → chunk-6H2MKVV5.js} +1 -1
- package/dist/{chunk-42N6CDWF.js → chunk-73JEAQRT.js} +4 -4
- package/dist/{chunk-KWXZMHJS.js → chunk-7ANA7PBB.js} +3 -3
- package/dist/{chunk-2CYWEVOP.js → chunk-ADEACKAH.js} +81 -68
- package/dist/{chunk-D4XQZOHB.js → chunk-AWZS5SVX.js} +8 -8
- package/dist/{chunk-FQ5HFSFR.js → chunk-CCTYK5RH.js} +6 -6
- package/dist/{chunk-N6Q2PNSI.js → chunk-CFGBKPWQ.js} +3 -3
- package/dist/{chunk-5LEVZYXF.js → chunk-E53C73ML.js} +4 -4
- package/dist/{chunk-IBXXTO3J.js → chunk-ELCYG6UU.js} +3 -3
- package/dist/{chunk-COCVPDWX.js → chunk-ENWIHU54.js} +6 -6
- package/dist/{chunk-AZVDODSP.js → chunk-F2KSURTJ.js} +9 -9
- package/dist/{chunk-K47OVEO4.js → chunk-G35QGPO2.js} +1 -1
- package/dist/{chunk-PYBFVK6K.js → chunk-G4RARFNT.js} +50 -24
- package/dist/{chunk-S5HS6WRH.js → chunk-GY5SEFVL.js} +5 -5
- package/dist/{chunk-LG7Q4OW4.js → chunk-H4DCWLTR.js} +8 -8
- package/dist/{chunk-QDU5MW2R.js → chunk-IME5OW4Y.js} +1 -1
- package/dist/{chunk-5E5SLAVD.js → chunk-INTBMGNX.js} +23 -25
- package/dist/{chunk-HMBTX5RK.js → chunk-IOGDKPVU.js} +1 -1
- package/dist/{chunk-OICYQPKP.js → chunk-JOI3DHML.js} +1 -1
- package/dist/{chunk-GUKGU6R7.js → chunk-KNIAWMBU.js} +1 -1
- package/dist/{chunk-4UA5C7AM.js → chunk-NPO24LAN.js} +8 -8
- package/dist/{chunk-IQCL5JGL.js → chunk-NWWDFHXP.js} +1 -1
- package/dist/{chunk-ZFPEPWOO.js → chunk-OEQOAONV.js} +60 -29
- package/dist/{chunk-3YZ2Q6AW.js → chunk-P2P6MUQ4.js} +2 -2
- package/dist/{chunk-LXRTHE43.js → chunk-QMEF4Z7R.js} +5 -5
- package/dist/{chunk-D5YQPCEG.js → chunk-RFE7DCZK.js} +24 -2
- package/dist/{chunk-QWY4KI2V.js → chunk-S7GX44BU.js} +1 -1
- package/dist/{chunk-WJJDQLVL.js → chunk-U76RWMFR.js} +4 -2
- package/dist/{chunk-IOUUS6H4.js → chunk-V4HXV5MY.js} +1 -1
- package/dist/{chunk-GUMBIDDL.js → chunk-VOB2DKO6.js} +174 -34
- package/dist/{chunk-BFP3ZKG6.js → chunk-WMJS5DDV.js} +4 -4
- package/dist/{chunk-DXFUYLHX.js → chunk-WWXJUURQ.js} +1 -1
- package/dist/{chunk-QY2IU47O.js → chunk-X76JVHQ4.js} +1 -1
- package/dist/{chunk-5S6AQFNG.js → chunk-XLWZRHX5.js} +1 -1
- package/dist/{chunk-THYNA2QN.js → chunk-XND3J6AT.js} +1 -1
- package/dist/{chunk-THFNL3TL.js → chunk-XRDSML3K.js} +2 -2
- package/dist/{chunk-EYIMZY5O.js → chunk-YSLIB7ER.js} +18 -3
- 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-H5MDRQEY.js → db-3IEVINAY.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-IOU3NUHT.js → oauth-callback-server-N7L2BB4L.js} +29 -29
- package/dist/{runner-FZ5ZHLFG.js → runner-PTTZV3WU.js} +21 -21
- package/dist/{skills-AR3WD6BX.js → skills-POMWS2RR.js} +5 -5
- package/dist/spawn-R75MXXKE.js +42 -0
- package/dist/task-runner-OQLRHADB.js +36 -0
- package/dist/{validation-VYE7TQY7.js → validation-U6LOMXR7.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-CTQFWYKE.js → work-FHA3BS4L.js} +21 -21
- package/dist/{worker-6WQU3IT5.js → worker-GR4UNVVP.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-ZU6JABR7.js +0 -42
- package/dist/task-runner-EEGGG2PM.js +0 -36
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginCredentialFailureError,
|
|
8
8
|
agentNameSchema,
|
|
9
9
|
createPluginAuthOrchestration
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QMEF4Z7R.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSandboxEgressAuthRequiredSignal,
|
|
13
13
|
parseSandboxEgressPermissionDeniedSignal,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
searchSlackUsers,
|
|
39
39
|
selectPluginGrant,
|
|
40
40
|
toMcpProviderError
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AWZS5SVX.js";
|
|
42
42
|
import {
|
|
43
43
|
RetryableDeliveryError,
|
|
44
44
|
actorFromRun,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
surfaceFromRun,
|
|
53
53
|
toolInvocationDestination,
|
|
54
54
|
uploadFilesToConversation
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ENWIHU54.js";
|
|
56
56
|
import {
|
|
57
57
|
CooperativeTurnYieldError,
|
|
58
58
|
NO_REPLY_MARKER,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
isNoReplyMarker,
|
|
66
66
|
isTurnInputCommitLostError,
|
|
67
67
|
sanitizeAssistantText
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-G35QGPO2.js";
|
|
69
69
|
import {
|
|
70
70
|
AGENTS_REMOVAL_NOTICE,
|
|
71
71
|
AGENTS_REPLACEMENT_NOTICE,
|
|
@@ -74,6 +74,7 @@ import {
|
|
|
74
74
|
RIPGREP_EXCLUDED_GLOBS,
|
|
75
75
|
TURN_CONTEXT_TAG,
|
|
76
76
|
TurnSliceLimitExceededError,
|
|
77
|
+
assertTurnToolCallLimit,
|
|
77
78
|
buildAgentsInstructionsMessage,
|
|
78
79
|
collectFiles,
|
|
79
80
|
continuableMessages,
|
|
@@ -93,6 +94,7 @@ import {
|
|
|
93
94
|
isMissingPathError,
|
|
94
95
|
isToolResultError,
|
|
95
96
|
isToolResultMessage,
|
|
97
|
+
isTurnExecutionLimitExceededError,
|
|
96
98
|
listRepositoryDirectories,
|
|
97
99
|
loadConnectedMcpProviders,
|
|
98
100
|
loadConversationProjection,
|
|
@@ -119,7 +121,7 @@ import {
|
|
|
119
121
|
stripRuntimeTurnContext,
|
|
120
122
|
trimTrailingAssistantMessages,
|
|
121
123
|
truncateText
|
|
122
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-OEQOAONV.js";
|
|
123
125
|
import {
|
|
124
126
|
SCHEDULED_TASK_SYSTEM_ACTOR,
|
|
125
127
|
WORKSPACE_SNAPSHOT_FAILED_EVENT,
|
|
@@ -160,13 +162,13 @@ import {
|
|
|
160
162
|
workspaceSnapshotFinishedEvent,
|
|
161
163
|
workspaceSnapshotWatch,
|
|
162
164
|
writableEventTask
|
|
163
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-WMJS5DDV.js";
|
|
164
166
|
import {
|
|
165
167
|
parseSlackThreadId
|
|
166
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-IOGDKPVU.js";
|
|
167
169
|
import {
|
|
168
170
|
appendAndEnqueueInboundMessage
|
|
169
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-E53C73ML.js";
|
|
170
172
|
import {
|
|
171
173
|
SHORT_TITLE_MAX_LENGTH,
|
|
172
174
|
ToolInputError,
|
|
@@ -174,7 +176,7 @@ import {
|
|
|
174
176
|
generateShortTitle,
|
|
175
177
|
hasAgentTurnUsage,
|
|
176
178
|
resolveTaskTitle
|
|
177
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-RFE7DCZK.js";
|
|
178
180
|
import {
|
|
179
181
|
bindSandboxFileSystem,
|
|
180
182
|
createSandboxSession,
|
|
@@ -185,7 +187,7 @@ import {
|
|
|
185
187
|
resolve,
|
|
186
188
|
setSnapshotSpanAttributes,
|
|
187
189
|
stopSession
|
|
188
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-ELCYG6UU.js";
|
|
189
191
|
import {
|
|
190
192
|
privateTraceResultAttributes
|
|
191
193
|
} from "./chunk-UIE3R5XU.js";
|
|
@@ -195,7 +197,7 @@ import {
|
|
|
195
197
|
} from "./chunk-X6GDDWQH.js";
|
|
196
198
|
import {
|
|
197
199
|
getTurnRequestDeadline
|
|
198
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-NWWDFHXP.js";
|
|
199
201
|
import {
|
|
200
202
|
getVercelConversationWorkQueue
|
|
201
203
|
} from "./chunk-DKIJ2RP5.js";
|
|
@@ -242,19 +244,19 @@ import {
|
|
|
242
244
|
updateWorkspace,
|
|
243
245
|
withSlackRetries,
|
|
244
246
|
workspaceRepoCheckoutPath
|
|
245
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-CCTYK5RH.js";
|
|
246
248
|
import {
|
|
247
249
|
getConversationEventStore,
|
|
248
250
|
getConversationMessageSearchStore,
|
|
249
251
|
getConversationStore,
|
|
250
252
|
getDb,
|
|
251
253
|
getSqlExecutor
|
|
252
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-ADEACKAH.js";
|
|
253
255
|
import {
|
|
254
256
|
juniorArtifacts,
|
|
255
257
|
juniorIdentities,
|
|
256
258
|
juniorSchedulerRuns
|
|
257
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-XLWZRHX5.js";
|
|
258
260
|
import {
|
|
259
261
|
SANDBOX_DATA_ROOT,
|
|
260
262
|
SANDBOX_REPOS_ROOT,
|
|
@@ -285,12 +287,12 @@ import {
|
|
|
285
287
|
throwSandboxOperationError,
|
|
286
288
|
workspaceSnapshotNotReadyUserMessage,
|
|
287
289
|
wrapSandboxSetupError
|
|
288
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-7ANA7PBB.js";
|
|
289
291
|
import {
|
|
290
292
|
fenceLock,
|
|
291
293
|
getStateAdapter,
|
|
292
294
|
withLock
|
|
293
|
-
} from "./chunk-
|
|
295
|
+
} from "./chunk-V4HXV5MY.js";
|
|
294
296
|
import {
|
|
295
297
|
KNOWN_CONVERSATION_EVENT_TYPES,
|
|
296
298
|
contextProvenance,
|
|
@@ -323,7 +325,7 @@ import {
|
|
|
323
325
|
resolveGatewayCredential,
|
|
324
326
|
resolveGatewayModel,
|
|
325
327
|
unwrapCurrentInstruction
|
|
326
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-U76RWMFR.js";
|
|
327
329
|
import {
|
|
328
330
|
ModelProfileNotConfiguredError,
|
|
329
331
|
TURN_REASONING_LEVELS,
|
|
@@ -340,16 +342,16 @@ import {
|
|
|
340
342
|
toGenAiMessagesTraceAttributes,
|
|
341
343
|
toGenAiPayloadMetadata,
|
|
342
344
|
toGenAiPayloadTraceAttributes
|
|
343
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-JOI3DHML.js";
|
|
344
346
|
import {
|
|
345
347
|
discoverSkills,
|
|
346
348
|
findSkillByName,
|
|
347
349
|
loadSkillsByName,
|
|
348
350
|
parseSkillInvocation
|
|
349
|
-
} from "./chunk-
|
|
351
|
+
} from "./chunk-P2P6MUQ4.js";
|
|
350
352
|
import {
|
|
351
353
|
pluginCatalogRuntime
|
|
352
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-WWXJUURQ.js";
|
|
353
355
|
import {
|
|
354
356
|
CredentialUnavailableError,
|
|
355
357
|
OAuthProviderError,
|
|
@@ -357,7 +359,7 @@ import {
|
|
|
357
359
|
getOAuthProviderErrorAttributes,
|
|
358
360
|
resolveAuthTokenPlaceholder,
|
|
359
361
|
resolvePluginCommandEnv
|
|
360
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-S7GX44BU.js";
|
|
361
363
|
import {
|
|
362
364
|
credentialContextForActor,
|
|
363
365
|
credentialUserSubjectId
|
|
@@ -393,7 +395,7 @@ import {
|
|
|
393
395
|
summarizeMessageText,
|
|
394
396
|
withLogContext,
|
|
395
397
|
withSpan
|
|
396
|
-
} from "./chunk-
|
|
398
|
+
} from "./chunk-X76JVHQ4.js";
|
|
397
399
|
import {
|
|
398
400
|
startInactiveSpan,
|
|
399
401
|
withActiveSpan
|
|
@@ -17868,6 +17870,7 @@ function createResumeState(args) {
|
|
|
17868
17870
|
let resumeMessages = [];
|
|
17869
17871
|
let turnContexts = [];
|
|
17870
17872
|
let turnStartMessageIndex;
|
|
17873
|
+
let cumulativeToolCallCount = args.checkpoint.record?.cumulativeToolCallCount ?? 0;
|
|
17871
17874
|
let advancedPastResume = !args.checkpoint.resumed;
|
|
17872
17875
|
let resumedBoundaryKey = "";
|
|
17873
17876
|
if (args.checkpoint.resumed && args.checkpoint.record.piMessages.length) {
|
|
@@ -17884,6 +17887,7 @@ function createResumeState(args) {
|
|
|
17884
17887
|
conversationId: args.conversationId,
|
|
17885
17888
|
turnId: args.turnId,
|
|
17886
17889
|
channelName: args.channelName,
|
|
17890
|
+
cumulativeToolCallCount,
|
|
17887
17891
|
destination: args.destination,
|
|
17888
17892
|
dispatchId: args.dispatchId,
|
|
17889
17893
|
source: args.runSource,
|
|
@@ -17906,6 +17910,12 @@ function createResumeState(args) {
|
|
|
17906
17910
|
setBeforeMessageCount(count) {
|
|
17907
17911
|
beforeMessageCount = count;
|
|
17908
17912
|
},
|
|
17913
|
+
/** Admit one tool call against the durable turn total, or throw the limit. */
|
|
17914
|
+
admitToolCall() {
|
|
17915
|
+
const next = cumulativeToolCallCount + 1;
|
|
17916
|
+
assertTurnToolCallLimit(next, botConfig.maxToolCallsPerTurn);
|
|
17917
|
+
cumulativeToolCallCount = next;
|
|
17918
|
+
},
|
|
17909
17919
|
setTurnContexts(contexts) {
|
|
17910
17920
|
turnContexts = contexts;
|
|
17911
17921
|
},
|
|
@@ -17999,7 +18009,7 @@ function createResumeState(args) {
|
|
|
17999
18009
|
...usage ? { usage } : void 0
|
|
18000
18010
|
};
|
|
18001
18011
|
} catch (error) {
|
|
18002
|
-
if (error instanceof AuthPausePersistenceError || error
|
|
18012
|
+
if (error instanceof AuthPausePersistenceError || isTurnExecutionLimitExceededError(error)) {
|
|
18003
18013
|
throw error;
|
|
18004
18014
|
}
|
|
18005
18015
|
throw new AuthPausePersistenceError(
|
|
@@ -19381,6 +19391,17 @@ async function executeAgentRunInPrivacyContext(run, conversationPrivacy, runLogC
|
|
|
19381
19391
|
reason: `${exclusiveTool} must be the only tool call in its assistant message; reissue it alone`
|
|
19382
19392
|
};
|
|
19383
19393
|
}
|
|
19394
|
+
try {
|
|
19395
|
+
runResume.admitToolCall();
|
|
19396
|
+
} catch (error) {
|
|
19397
|
+
const limitError = error instanceof Error ? error : new Error(String(error));
|
|
19398
|
+
pendingPiHookError ??= limitError;
|
|
19399
|
+
return {
|
|
19400
|
+
block: true,
|
|
19401
|
+
reason: limitError.message,
|
|
19402
|
+
terminate: true
|
|
19403
|
+
};
|
|
19404
|
+
}
|
|
19384
19405
|
return void 0;
|
|
19385
19406
|
},
|
|
19386
19407
|
afterToolCall: async ({ result: result2, toolCall }, signal2) => {
|
|
@@ -19574,6 +19595,11 @@ async function executeAgentRunInPrivacyContext(run, conversationPrivacy, runLogC
|
|
|
19574
19595
|
);
|
|
19575
19596
|
throw pendingAuthPause;
|
|
19576
19597
|
}
|
|
19598
|
+
if (pendingPiHookError) {
|
|
19599
|
+
const hookError = pendingPiHookError;
|
|
19600
|
+
pendingPiHookError = void 0;
|
|
19601
|
+
throw hookError;
|
|
19602
|
+
}
|
|
19577
19603
|
throw error;
|
|
19578
19604
|
} finally {
|
|
19579
19605
|
if (timeoutId) {
|
|
@@ -19783,7 +19809,7 @@ async function executeAgentRunInPrivacyContext(run, conversationPrivacy, runLogC
|
|
|
19783
19809
|
throw error.originalError;
|
|
19784
19810
|
}
|
|
19785
19811
|
const runError = error instanceof AssistantMessageDeliveryError ? error.originalError : error;
|
|
19786
|
-
if (runError instanceof AuthPausePersistenceError || runError
|
|
19812
|
+
if (runError instanceof AuthPausePersistenceError || isTurnExecutionLimitExceededError(runError)) {
|
|
19787
19813
|
throw runError;
|
|
19788
19814
|
}
|
|
19789
19815
|
if (resume && runError instanceof AuthorizationPauseError) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OEQOAONV.js";
|
|
4
4
|
import {
|
|
5
5
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
6
6
|
} from "./chunk-3Y47VMHV.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ADEACKAH.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XLWZRHX5.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-V4HXV5MY.js";
|
|
16
16
|
import {
|
|
17
17
|
juniorDestinations
|
|
18
18
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isRecord,
|
|
21
21
|
toOptionalNumber,
|
|
22
22
|
toOptionalString
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-X76JVHQ4.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -3,39 +3,39 @@ import {
|
|
|
3
3
|
} from "./chunk-RC745GGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
parseSlackThreadId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IOGDKPVU.js";
|
|
7
7
|
import {
|
|
8
8
|
appendAndEnqueueExclusiveInboundMessage,
|
|
9
9
|
appendAndEnqueueInboundMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-E53C73ML.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDeterministicTurnId
|
|
13
13
|
} from "./chunk-DA2KGZZI.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeSlackConversationId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CCTYK5RH.js";
|
|
17
17
|
import {
|
|
18
18
|
getConversationStore,
|
|
19
19
|
getDb
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ADEACKAH.js";
|
|
21
21
|
import {
|
|
22
22
|
juniorConversationParticipants,
|
|
23
23
|
juniorConversations,
|
|
24
24
|
juniorIdentities,
|
|
25
25
|
juniorUsers
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XLWZRHX5.js";
|
|
27
27
|
import {
|
|
28
28
|
juniorDestinations
|
|
29
29
|
} from "./chunk-VFUK3X5B.js";
|
|
30
30
|
import {
|
|
31
31
|
getSlackBotToken
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-U76RWMFR.js";
|
|
33
33
|
import {
|
|
34
34
|
canExposeConversationPayload
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JOI3DHML.js";
|
|
36
36
|
import {
|
|
37
37
|
logWarn
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-X76JVHQ4.js";
|
|
39
39
|
|
|
40
40
|
// src/handlers/health.ts
|
|
41
41
|
function readHealthReport() {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
AgentRunError,
|
|
6
6
|
executeTurn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-53IEEFFP.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
getTurnUserSlackMessageTs,
|
|
16
16
|
persistAuthPauseTurnState,
|
|
17
17
|
requireTurnFailureEventId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2NL3Y47F.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTurnSessionRouting,
|
|
21
21
|
scheduleSessionCompletedPluginTasks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NPO24LAN.js";
|
|
23
23
|
import {
|
|
24
24
|
getTurnLifecycle
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6H2MKVV5.js";
|
|
26
26
|
import {
|
|
27
27
|
coerceThreadConversationState,
|
|
28
28
|
configValueSchema,
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
getPersistedSandboxState,
|
|
31
31
|
getPersistedThreadState,
|
|
32
32
|
persistThreadStateById
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-GY5SEFVL.js";
|
|
34
34
|
import {
|
|
35
35
|
buildSentryConversationUrl,
|
|
36
36
|
deleteWebAuthorization
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XND3J6AT.js";
|
|
38
38
|
import {
|
|
39
39
|
createUserTokenStore,
|
|
40
40
|
deleteMcpAuthSession,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
lookupSlackUserProfile,
|
|
46
46
|
putMcpStoredOAuthCredentials,
|
|
47
47
|
resolvePluginOAuthAccount
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-AWZS5SVX.js";
|
|
49
49
|
import {
|
|
50
50
|
RetryableDeliveryError,
|
|
51
51
|
addReactionToMessage,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
removeReactionFromMessage,
|
|
60
60
|
resolveBaseUrl,
|
|
61
61
|
truncateStatusText
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ENWIHU54.js";
|
|
63
63
|
import {
|
|
64
64
|
CooperativeTurnYieldError,
|
|
65
65
|
clearPendingAuth,
|
|
@@ -68,12 +68,11 @@ import {
|
|
|
68
68
|
isCooperativeTurnYieldError,
|
|
69
69
|
isPendingAuthLatestRequest,
|
|
70
70
|
markTurnFailed
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-G35QGPO2.js";
|
|
72
72
|
import {
|
|
73
|
-
TurnSliceLimitExceededError,
|
|
74
73
|
abandonTurnRecord,
|
|
75
74
|
buildConversationContext,
|
|
76
|
-
|
|
75
|
+
buildTurnErrorResponse,
|
|
77
76
|
commitAcceptedReply,
|
|
78
77
|
failTurnRecord,
|
|
79
78
|
getTurnRecord,
|
|
@@ -88,20 +87,20 @@ import {
|
|
|
88
87
|
recordTurnSummary,
|
|
89
88
|
saveTurnCheckpoint,
|
|
90
89
|
turnHasReply
|
|
91
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-OEQOAONV.js";
|
|
92
91
|
import {
|
|
93
92
|
parseSlackThreadId,
|
|
94
93
|
readSlackRawMessageContext,
|
|
95
94
|
resolveSlackChannelIdFromMessage,
|
|
96
95
|
resolveSlackChannelIdFromThreadId
|
|
97
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-IOGDKPVU.js";
|
|
98
97
|
import {
|
|
99
98
|
ensureConversationWake,
|
|
100
99
|
requestConversationWork
|
|
101
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-E53C73ML.js";
|
|
102
101
|
import {
|
|
103
102
|
getTurnRequestDeadline
|
|
104
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-NWWDFHXP.js";
|
|
105
104
|
import {
|
|
106
105
|
getVercelConversationWorkQueue
|
|
107
106
|
} from "./chunk-DKIJ2RP5.js";
|
|
@@ -113,39 +112,39 @@ import {
|
|
|
113
112
|
getSlackClient,
|
|
114
113
|
isDmChannel,
|
|
115
114
|
normalizeSlackConversationId
|
|
116
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-CCTYK5RH.js";
|
|
117
116
|
import {
|
|
118
117
|
getConversationStore,
|
|
119
118
|
getSqlExecutor,
|
|
120
119
|
requireSlackDestination,
|
|
121
120
|
upsertIdentity,
|
|
122
121
|
upsertLinkedIdentity
|
|
123
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-ADEACKAH.js";
|
|
124
123
|
import {
|
|
125
124
|
acquireActiveLock,
|
|
126
125
|
getStateAdapter
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-V4HXV5MY.js";
|
|
128
127
|
import {
|
|
129
128
|
botConfig,
|
|
130
129
|
escapeXml,
|
|
131
130
|
getChatConfig,
|
|
132
131
|
getRuntimeMetadata,
|
|
133
132
|
normalizeSlackEmojiName
|
|
134
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-U76RWMFR.js";
|
|
135
134
|
import {
|
|
136
135
|
defaultModelId
|
|
137
136
|
} from "./chunk-D4YV5TDV.js";
|
|
138
137
|
import {
|
|
139
138
|
discoverSkills
|
|
140
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-P2P6MUQ4.js";
|
|
141
140
|
import {
|
|
142
141
|
pluginCatalogRuntime
|
|
143
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-WWXJUURQ.js";
|
|
144
143
|
import {
|
|
145
144
|
buildOAuthTokenRequest,
|
|
146
145
|
hasRequiredOAuthScope,
|
|
147
146
|
parseOAuthTokenResponse
|
|
148
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-S7GX44BU.js";
|
|
149
148
|
import {
|
|
150
149
|
createSlackResumeActor,
|
|
151
150
|
isUserActor,
|
|
@@ -156,7 +155,6 @@ import {
|
|
|
156
155
|
homeDir
|
|
157
156
|
} from "./chunk-TXKUKMVO.js";
|
|
158
157
|
import {
|
|
159
|
-
buildTurnFailureResponse,
|
|
160
158
|
logException,
|
|
161
159
|
logInfo,
|
|
162
160
|
logWarn,
|
|
@@ -164,7 +162,7 @@ import {
|
|
|
164
162
|
setTags,
|
|
165
163
|
toOptionalString,
|
|
166
164
|
withLogContext
|
|
167
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-X76JVHQ4.js";
|
|
168
166
|
|
|
169
167
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
170
168
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1171,7 +1169,7 @@ async function postResumeFailureReply(args) {
|
|
|
1171
1169
|
await postSlackMessage({
|
|
1172
1170
|
channelId: args.channelId,
|
|
1173
1171
|
threadTs: args.threadTs,
|
|
1174
|
-
text: args.error
|
|
1172
|
+
text: buildTurnErrorResponse(args.error, args.eventId)
|
|
1175
1173
|
});
|
|
1176
1174
|
}
|
|
1177
1175
|
async function handleResumeFailure(args) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GY5SEFVL.js";
|
|
5
5
|
import {
|
|
6
6
|
recordTaskExecution
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VOB2DKO6.js";
|
|
8
8
|
import {
|
|
9
9
|
pluginTaskId,
|
|
10
10
|
pluginTaskParamsSchema,
|
|
11
11
|
sendVercelPluginTask
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CFGBKPWQ.js";
|
|
13
13
|
import {
|
|
14
14
|
getPiMessageRole,
|
|
15
15
|
getTurnRecord,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isToolResultMessage,
|
|
20
20
|
normalizeToolNameFromResult,
|
|
21
21
|
stripRuntimeTurnContext
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OEQOAONV.js";
|
|
23
23
|
import {
|
|
24
24
|
createPluginConversationEvents,
|
|
25
25
|
createPluginEmbedder,
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
createPluginState,
|
|
29
29
|
getPlugins,
|
|
30
30
|
readActorIdentity
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CCTYK5RH.js";
|
|
32
32
|
import {
|
|
33
33
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
34
34
|
} from "./chunk-3Y47VMHV.js";
|
|
35
35
|
import {
|
|
36
36
|
getConversationStore,
|
|
37
37
|
getDb
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ADEACKAH.js";
|
|
39
39
|
import {
|
|
40
40
|
getStateAdapter
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-V4HXV5MY.js";
|
|
42
42
|
import {
|
|
43
43
|
sameActorIdentity
|
|
44
44
|
} from "./chunk-GFBR4S3Q.js";
|
|
@@ -84,7 +84,7 @@ function slackSourceForDestination(args) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
async function resolveConversationRouting(args) {
|
|
87
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
87
|
+
const conversationStore = args.conversationStore ?? (await import("./db-3IEVINAY.js")).getConversationStore();
|
|
88
88
|
const chain = await loadConversationChain(
|
|
89
89
|
args.conversationId,
|
|
90
90
|
conversationStore
|