@sentry/junior 0.273.0 → 0.274.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/{adapter-umap1cth.js → adapter-4qThDhgF.js} +1 -1
- package/dist/{admin-0o6E_3lo.js → admin-c7ASvs6x.js} +1 -1
- package/dist/{agent-runner-D7Qz-lGO.js → agent-runner-CLHM48dh.js} +285 -120
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +1 -1
- package/dist/api.js +27 -27
- package/dist/{app-BcyhJq8x.d.ts → app-BlmPpPoR.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +29 -29
- package/dist/{assistant-reply-wZ7i4OFa.js → assistant-reply-2IwdFWuQ.js} +1 -1
- package/dist/{automation-yffXcZt9.js → automation-BGrd03QO.js} +1 -1
- package/dist/{briefs-CgMnlpIp.js → briefs-C1-NOh8m.js} +4 -4
- package/dist/{catalog-runtime-TygDsPOU.js → catalog-runtime-BnIJimKZ.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DhqbV0Fe.js → client-C0ZIxoDr.js} +2 -2
- package/dist/{config-C6FTd7PX.js → config-DS-QLVSL.js} +2 -2
- package/dist/{connections-Dq72KajR.js → connections-Djb6ANAh.js} +10 -10
- package/dist/{conversation-T4oabbBi.js → conversation-BjTo9ZFL.js} +1 -1
- package/dist/{conversation-privacy-BeRgrsph.js → conversation-privacy-3IMUZSHC.js} +1 -1
- package/dist/{credential-sync-BmCbHAp4.js → credential-sync-ig88EB_v.js} +13 -13
- package/dist/{db-DOzBGLn5.d.ts → db-BMZhoYKj.d.ts} +1 -1
- package/dist/{executor-BafgvQcc.js → executor-C2moGIHS.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-C4lphW9Y.js → job-queue-Bh9sFO9t.js} +2 -2
- package/dist/{logging-CNs1e04n.js → logging-DYRS7E8s.js} +9 -2
- package/dist/{media-U6Tuz6Mi.js → media-DstkkoNP.js} +21 -2
- package/dist/{message-CETC5lsl.js → message-CicNrhCv.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-DcQZsKMm.js → oauth-callback-server-BXyrepfY.js} +2 -2
- package/dist/{projection-BOpi891B.js → projection-CMRrv9Pt.js} +32 -15
- package/dist/{prompt-B1ySjUyf.js → prompt-JEWUUpLW.js} +1 -1
- package/dist/{registry-B-yUrv3h.js → registry-D92WLl5I.js} +1 -1
- package/dist/{resolve-DqVtd4Q9.js → resolve-C-Dh14ps.js} +3 -3
- package/dist/{result-DQwTiLTw.js → result-DZ8TCQkd.js} +9 -9
- package/dist/{runner-Dco5qMq6.js → runner-BBmhrQTM.js} +11 -11
- package/dist/{sandbox-egress-signals-DFc_9Mcv.js → sandbox-egress-signals-Cehpq6hC.js} +1 -1
- package/dist/{schema-5xHDGlBW.js → schema-CX9XGKCm.js} +11 -4
- package/dist/{schema-9OGdsaxF.d.ts → schema-DfdHlBnb.d.ts} +9 -2
- package/dist/{service-account-smdPFWNy.js → service-account-Bapo6l0R.js} +3 -3
- package/dist/{service-account-CWfk9Cs-.js → service-account-Ce1465Fn.js} +3 -3
- package/dist/{session-stop-DaT_7tYa.js → session-stop-CI5qJU7a.js} +11 -11
- package/dist/{skills-BbtJSF2-.js → skills-D-d79XQ6.js} +2 -2
- package/dist/{spawn-Ceikdjkp.js → spawn-C_FETz5x.js} +2 -2
- package/dist/{stop-dKUc-x2K.js → stop-CmwFHwiN.js} +33 -30
- package/dist/{store-C1xuZcLd.js → store-BIQYXvoV.js} +3 -3
- package/dist/{store-DaxUuOmD.js → store-BvI3yBGS.js} +3 -3
- package/dist/{task-queue-ymAh_-P1.js → task-queue-BdB0pab8.js} +3 -3
- package/dist/{task-runner-vlH6pEm3.js → task-runner-DQr2QfvJ.js} +7 -7
- package/dist/{thread-state-BkUpE9Ae.js → thread-state-ngCvtWNa.js} +4 -4
- package/dist/{turn-failure-response-DIsD7ip_.js → turn-failure-response-BDT3sT2v.js} +7 -7
- package/dist/{turn-lifecycle-BdPKdPS8.js → turn-lifecycle-B7O6rZEX.js} +1 -1
- package/dist/{turn-session-routing-BdCTDq9m.js → turn-session-routing-DIeqG2pO.js} +9 -9
- package/dist/{validation-BQjCfh84.js → validation-D3Xik64v.js} +1 -1
- package/dist/{version-BpiFGZZW.js → version-BoWLhNzj.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-C6Y1aXjZ.js → viewer-D25XOUHc.js} +17 -8
- package/dist/{work-ChPh_YEh.js → work-D12-wcf4.js} +11 -11
- package/dist/{worker-Be_sK_ou.js → worker-DGxfDtES.js} +6 -6
- package/package.json +4 -4
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as loadTurnCheckpoint, $a as configValueSchema, A as buildConversationContext, Aa as conversationNotArchivedForEmail, Bi as verifyTimerWatchCredentialSubject, Bn as closeReviewItem, Br as addReactionToMessage, Ca as createPluginLogger, D as fallbackShortTitle, Da as conversationArchivedForUser, Ea as conversationArchivedForEmail, F as markConversationMessage, Fa as readConversationEventPage, G as AuthorizationFlowDisabledError, Gi as getSlackClient, Ha as recordSlackAttachment, Hi as downloadPrivateSlackFile, Ht as buildTurnErrorResponse, I as normalizeConversationText, Ia as buildSentryConversationUrl, Ji as normalizeSlackConversationId, Ka as listConversationAnnotations, Kn as listReplyActionItems, Kt as persistWithRetry, L as recordDeliveredAssistantMessage, Lr as normalizeSlackStatusText, M as estimateConversationContextTokens, Ma as viewerConversationMembership, N as getConversationMessageSlackTs, Nn as getPlugins, Oa as conversationHasParticipantUser, P as isHumanConversationMessage, Pa as readLatestConversationBrief, Qn as canActOnReviewItem, R as turnHasReply, Ra as notInheritedByForkChild, S as persistConversationMessages, Sn as createUserTokenStore, T as resolveConversationTitle, Ta as conversationArchiveTimes, V as PluginCredentialFailureError, Va as readAttachmentVisionSummary, Vi as SlackActionError, Wi as getHeaderString, Wn as getReviewItem, Xa as lookupSlackUser, Xi as withSlackRetries, Y as clearPendingAuth, Yn as takeReviewItem, Z as wasPendingAuthStopped, Za as createPluginCache, _ as recordSubscribedReplyRoute, ar as reviewItemReaderForUser, at as listTurnSummaries, bn as isExperimentalFeatureEnabled, dn as buildDeterministicTurnId, ea as JUNIOR_THREAD_STATE_TTL_MS, er as canReadReviewItem, et as saveTurnCheckpoint, hn as getThreadStopDecision, i as loadConversationProjection, it as getTurnRecord, j as createConversationMemoryService, ja as conversationNotArchivedForUser, k as appendThreadContextMessages, ka as conversationIsMemberRoot, mn as getSubscribedReplyPreflightDecision, n as commitMessages, nt as completeTurnRecord, o as loadProjection, on as trimTrailingAssistantMessages, ot as recordTurnSummary, p as recordAuthorizationCompleted, pn as decideSubscribedThreadReply, qa as listConversationAnnotationsById, qi as isDmChannel, qr as removeReactionFromMessage, rt as failTurnRecord, s as loadTurnProjection, t as commitAcceptedReply, to as piMessageFromHistoryItem, tr as isOnlyAssignee, tt as abandonTurnRecord, un as buildDeterministicAssistantMessageId, w as persistConversationMessageSummaries, wa as readConversationAccessFromSql, wi as cancelSubscriptions, x as hydrateConversationMessages, z as upsertConversationMessage, za as getSlackFileId, zr as truncateStatusText } from "./projection-
|
|
2
|
-
import { a as completeText, b as isProviderRetryError, m as escapeXml, r as completeDecision } from "./client-
|
|
3
|
-
import { _ as normalizeSlackEmojiName, c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as createS3AttachmentStorage } from "./config-
|
|
4
|
-
import {
|
|
1
|
+
import { $ as loadTurnCheckpoint, $a as configValueSchema, A as buildConversationContext, Aa as conversationNotArchivedForEmail, Bi as verifyTimerWatchCredentialSubject, Bn as closeReviewItem, Br as addReactionToMessage, Ca as createPluginLogger, D as fallbackShortTitle, Da as conversationArchivedForUser, Ea as conversationArchivedForEmail, F as markConversationMessage, Fa as readConversationEventPage, G as AuthorizationFlowDisabledError, Gi as getSlackClient, Ha as recordSlackAttachment, Hi as downloadPrivateSlackFile, Ht as buildTurnErrorResponse, I as normalizeConversationText, Ia as buildSentryConversationUrl, Ji as normalizeSlackConversationId, Ka as listConversationAnnotations, Kn as listReplyActionItems, Kt as persistWithRetry, L as recordDeliveredAssistantMessage, Lr as normalizeSlackStatusText, M as estimateConversationContextTokens, Ma as viewerConversationMembership, N as getConversationMessageSlackTs, Nn as getPlugins, Oa as conversationHasParticipantUser, P as isHumanConversationMessage, Pa as readLatestConversationBrief, Qn as canActOnReviewItem, R as turnHasReply, Ra as notInheritedByForkChild, S as persistConversationMessages, Sn as createUserTokenStore, T as resolveConversationTitle, Ta as conversationArchiveTimes, V as PluginCredentialFailureError, Va as readAttachmentVisionSummary, Vi as SlackActionError, Wi as getHeaderString, Wn as getReviewItem, Xa as lookupSlackUser, Xi as withSlackRetries, Y as clearPendingAuth, Yn as takeReviewItem, Z as wasPendingAuthStopped, Za as createPluginCache, _ as recordSubscribedReplyRoute, ar as reviewItemReaderForUser, at as listTurnSummaries, bn as isExperimentalFeatureEnabled, dn as buildDeterministicTurnId, ea as JUNIOR_THREAD_STATE_TTL_MS, er as canReadReviewItem, et as saveTurnCheckpoint, hn as getThreadStopDecision, i as loadConversationProjection, it as getTurnRecord, j as createConversationMemoryService, ja as conversationNotArchivedForUser, k as appendThreadContextMessages, ka as conversationIsMemberRoot, mn as getSubscribedReplyPreflightDecision, n as commitMessages, nt as completeTurnRecord, o as loadProjection, on as trimTrailingAssistantMessages, ot as recordTurnSummary, p as recordAuthorizationCompleted, pn as decideSubscribedThreadReply, qa as listConversationAnnotationsById, qi as isDmChannel, qr as removeReactionFromMessage, rt as failTurnRecord, s as loadTurnProjection, t as commitAcceptedReply, to as piMessageFromHistoryItem, tr as isOnlyAssignee, tt as abandonTurnRecord, un as buildDeterministicAssistantMessageId, w as persistConversationMessageSummaries, wa as readConversationAccessFromSql, wi as cancelSubscriptions, x as hydrateConversationMessages, z as upsertConversationMessage, za as getSlackFileId, zr as truncateStatusText } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { a as completeText, b as isProviderRetryError, m as escapeXml, r as completeDecision } from "./client-C0ZIxoDr.js";
|
|
3
|
+
import { _ as normalizeSlackEmojiName, c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as createS3AttachmentStorage } from "./config-DS-QLVSL.js";
|
|
4
|
+
import { E as withSpan, H as toOptionalNumber, S as setTags, T as withLogContext, U as toOptionalString, V as isRecord, b as setSpanAttributes, f as logError, h as logWarn, m as logInfo, n as createChatSdkLogger, o as getActiveTraceContext, p as logException, s as getActiveTraceId, t as buildTurnFailureResponse, y as setSentryUser } from "./logging-DYRS7E8s.js";
|
|
5
5
|
import { i as getActiveSpan, r as continueTrace } from "./sentry-MDkYAVPV.js";
|
|
6
6
|
import { i as defaultModelId, r as boundProfile, s as modelIdForProfile } from "./model-profile-B998sjVd.js";
|
|
7
7
|
import { f as parseSlackTeamId, h as parseSlackMessageTs, i as isActorUserId, n as createSlackActor, o as isUserActor, r as createSlackResumeActor, s as parseActorUserId, t as createActor, u as parseSlackChannelId } from "./actor-B4DYygOB.js";
|
|
8
|
-
import { A as locationFromRow, C as getSqlExecutor, D as loadConversationSlackTenantIds, E as withConversationEventLock, J as hasAgentTurnUsage, N as resolveActorIdentityId, P as saveActorAvatar, Q as requireSlackDestination, S as getDb, U as parseSessionSource, W as addAgentTurnUsage, X as createSlackDestination, Y as resolveRootConversationId, f as identityAvatarUrl, h as readUserAvatarUrls, q as agentTurnUsageSchema, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
8
|
+
import { A as locationFromRow, C as getSqlExecutor, D as loadConversationSlackTenantIds, E as withConversationEventLock, J as hasAgentTurnUsage, N as resolveActorIdentityId, P as saveActorAvatar, Q as requireSlackDestination, S as getDb, U as parseSessionSource, W as addAgentTurnUsage, X as createSlackDestination, Y as resolveRootConversationId, f as identityAvatarUrl, h as readUserAvatarUrls, q as agentTurnUsageSchema, x as getConversationStore, y as getConversationEventStore } from "./viewer-D25XOUHc.js";
|
|
9
9
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
|
|
10
|
-
import { C as juniorCodeChanges, _ as juniorConversationBriefs, b as juniorConversationEvents, h as juniorConversationParticipants, m as juniorConversationReadPositions } from "./executor-
|
|
11
|
-
import { g as instructionProvenanceFor, m as contextProvenance, r as isVisionImageMediaType } from "./media-
|
|
12
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
13
|
-
import {
|
|
10
|
+
import { C as juniorCodeChanges, _ as juniorConversationBriefs, b as juniorConversationEvents, h as juniorConversationParticipants, m as juniorConversationReadPositions } from "./executor-C2moGIHS.js";
|
|
11
|
+
import { g as instructionProvenanceFor, m as contextProvenance, r as isVisionImageMediaType } from "./media-DstkkoNP.js";
|
|
12
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-D92WLl5I.js";
|
|
13
|
+
import { A as runWithSlackInstallation, F as resolveSlackChannelIdFromThreadId, I as getConversationInfo, It as shouldEmitDevAgentTrace, J as readConversationSourceTask, M as parseSlackThreadId, Mt as RetryableDeliveryError, N as readSlackRawMessageContext, Ot as buildSteeringPiMessage, P as resolveSlackChannelIdFromMessage, R as listThreadReplies, Tt as conversationSubtreeColumns, _t as storeAttachment, a as buildAuthPauseResponse, b as renderAttachmentText, dt as webActorFromEmail, ft as resolveConversationDestination, i as measureTurnCompactionWait, kt as withoutSavedSteeringMessages, lt as createConversationId, m as latestProgressStatus, n as executeAgentRun, r as createContextCompactor, rt as deliverReviewItemChange, t as createAgentRunner, ut as recordWebConversationActivity, wt as conversationSubtree, x as renderBlockText, z as resolveDestinationVisibility } from "./agent-runner-CLHM48dh.js";
|
|
14
14
|
import { a as withLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
15
|
-
import { r as getStateAdapter } from "./adapter-
|
|
16
|
-
import { G as readMessageAttachments, d as conversationDetailReportSchema, g as conversationFeedSchema } from "./conversation-
|
|
17
|
-
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-
|
|
18
|
-
import { $ as startActiveTurn, G as TurnInputDeferredError, H as ConversationTurnBoundaryError, J as isTurnInputCommitLostError, K as getConversationTurnBoundaryError, Q as markTurnFailed, U as CooperativeTurnYieldError, W as TurnInputCommitLostError, X as markTurnClosed, Y as isTurnInputDeferredError, Z as markTurnCompleted, m as getChildAgentLabel, q as isCooperativeTurnYieldError } from "./store-
|
|
19
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
20
|
-
import { A as recordFinishedTurnForAutomatedLimit, D as sendSlackReply, E as resolveSlackReplyTarget, F as finishedRunReply, I as postsRunNotices, P as deliversFinalText, S as joinMailboxText, c as isEventMailboxMetadata, i as skipInputBeforeConversationStop, l as renderEventBatchText, s as eventBatchMessageEvents, u as timerWatchCredentialSubject, w as maybePostAutomatedTurnLimitNotice, z as runDispatchOutcome } from "./session-stop-
|
|
15
|
+
import { r as getStateAdapter } from "./adapter-4qThDhgF.js";
|
|
16
|
+
import { G as readMessageAttachments, d as conversationDetailReportSchema, g as conversationFeedSchema } from "./conversation-BjTo9ZFL.js";
|
|
17
|
+
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-JEWUUpLW.js";
|
|
18
|
+
import { $ as startActiveTurn, G as TurnInputDeferredError, H as ConversationTurnBoundaryError, J as isTurnInputCommitLostError, K as getConversationTurnBoundaryError, Q as markTurnFailed, U as CooperativeTurnYieldError, W as TurnInputCommitLostError, X as markTurnClosed, Y as isTurnInputDeferredError, Z as markTurnCompleted, m as getChildAgentLabel, q as isCooperativeTurnYieldError } from "./store-BIQYXvoV.js";
|
|
19
|
+
import { n as getAssistantReplyText } from "./assistant-reply-2IwdFWuQ.js";
|
|
20
|
+
import { A as recordFinishedTurnForAutomatedLimit, D as sendSlackReply, E as resolveSlackReplyTarget, F as finishedRunReply, I as postsRunNotices, P as deliversFinalText, S as joinMailboxText, c as isEventMailboxMetadata, i as skipInputBeforeConversationStop, l as renderEventBatchText, s as eventBatchMessageEvents, u as timerWatchCredentialSubject, w as maybePostAutomatedTurnLimitNotice, z as runDispatchOutcome } from "./session-stop-CI5qJU7a.js";
|
|
21
21
|
import { _ as isEmptyUserInputAnswer, v as normalizeUserInputAnswer } from "./reporting-window-DgHgwQB3.js";
|
|
22
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
23
|
-
import { D as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-
|
|
24
|
-
import { _ as markDispatchCompleted, a as confirmDispatchMailboxAppend, d as getDispatchTurnId, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as claimDispatchMailboxAppend, j as readAutomationTitlesByConversationId, l as getDispatchInputMessageId, n as resolveTurnSessionRouting, p as isTerminalDispatchStatus, s as getDispatchConversationId, t as resolveConversationRouting, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./turn-session-routing-
|
|
22
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-Bh9sFO9t.js";
|
|
23
|
+
import { D as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-BvI3yBGS.js";
|
|
24
|
+
import { _ as markDispatchCompleted, a as confirmDispatchMailboxAppend, d as getDispatchTurnId, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as claimDispatchMailboxAppend, j as readAutomationTitlesByConversationId, l as getDispatchInputMessageId, n as resolveTurnSessionRouting, p as isTerminalDispatchStatus, s as getDispatchConversationId, t as resolveConversationRouting, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./turn-session-routing-DIeqG2pO.js";
|
|
25
25
|
import { n as healthReportSchema, t as apiErrorSchema } from "./common-Eu6sx09c.js";
|
|
26
|
-
import { a as withAgentInvocationResultActors, c as listActiveMailboxTurns, d as turnInputFactsFromConversationMessage, f as legacyWebMailboxMetadataSchema, l as resolveMailboxTurnWork, n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as createChildConversationWorker, u as sourceFromTurnInput } from "./result-
|
|
27
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
28
|
-
import { a as AgentRunError, o as executeTurn } from "./work-
|
|
29
|
-
import { a as persistThreadStateById, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState, t as getLocationConfigurationService } from "./thread-state-
|
|
30
|
-
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-
|
|
31
|
-
import { t as bindMessageAgent } from "./message-
|
|
32
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
33
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
34
|
-
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-
|
|
26
|
+
import { a as withAgentInvocationResultActors, c as listActiveMailboxTurns, d as turnInputFactsFromConversationMessage, f as legacyWebMailboxMetadataSchema, l as resolveMailboxTurnWork, n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId, s as getEventBatchDelayMs, t as createChildConversationWorker, u as sourceFromTurnInput } from "./result-DZ8TCQkd.js";
|
|
27
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-B7O6rZEX.js";
|
|
28
|
+
import { a as AgentRunError, o as executeTurn } from "./work-D12-wcf4.js";
|
|
29
|
+
import { a as persistThreadStateById, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState, t as getLocationConfigurationService } from "./thread-state-ngCvtWNa.js";
|
|
30
|
+
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-Djb6ANAh.js";
|
|
31
|
+
import { t as bindMessageAgent } from "./message-CicNrhCv.js";
|
|
32
|
+
import { t as bindSpawnAgent } from "./spawn-C_FETz5x.js";
|
|
33
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DQr2QfvJ.js";
|
|
34
|
+
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-BDT3sT2v.js";
|
|
35
35
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
36
36
|
import { z } from "zod";
|
|
37
37
|
import { and, asc, desc, eq, inArray, isNotNull, isNull, max, or, sql } from "drizzle-orm";
|
|
@@ -932,11 +932,12 @@ function spanLinks({ sentryTrace }) {
|
|
|
932
932
|
*
|
|
933
933
|
* The span links to the other trace contexts and to the span that was active,
|
|
934
934
|
* such as the worker span. Without a trace context, the span is a child of the
|
|
935
|
-
* active span. A malformed trace context starts a new trace.
|
|
935
|
+
* active span. A malformed trace context starts a new trace. The span records
|
|
936
|
+
* how long the Turn waited on context compaction.
|
|
936
937
|
*/
|
|
937
938
|
async function withTurnSpan(context, input, callback) {
|
|
938
939
|
const [parent, ...others] = input?.traceContexts ?? [];
|
|
939
|
-
if (!parent) return await withSpan("chat.turn", "chat.turn", context, callback);
|
|
940
|
+
if (!parent) return await withSpan("chat.turn", "chat.turn", context, (set) => measureTurnCompactionWait(set, () => callback(set)));
|
|
940
941
|
const activeSpan = getActiveSpan();
|
|
941
942
|
const links = [...others.flatMap(spanLinks), ...activeSpan ? [{ context: activeSpan.spanContext() }] : []];
|
|
942
943
|
const { baggage, sentryTrace } = parent;
|
|
@@ -945,7 +946,7 @@ async function withTurnSpan(context, input, callback) {
|
|
|
945
946
|
sentryTrace
|
|
946
947
|
}, () => withSpan("chat.turn", "chat.turn", context, async (setSpanAttributes) => {
|
|
947
948
|
getActiveSpan()?.addLinks(links);
|
|
948
|
-
return await callback(setSpanAttributes);
|
|
949
|
+
return await measureTurnCompactionWait(setSpanAttributes, () => callback(setSpanAttributes));
|
|
949
950
|
}));
|
|
950
951
|
}
|
|
951
952
|
/**
|
|
@@ -7026,6 +7027,8 @@ function notCopiedByFork() {
|
|
|
7026
7027
|
const UNCOPIED_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
7027
7028
|
"authorization_completed",
|
|
7028
7029
|
"authorization_requested",
|
|
7030
|
+
"compaction_prepared",
|
|
7031
|
+
"compaction_requested",
|
|
7029
7032
|
"guardian_action_reviewed",
|
|
7030
7033
|
"mcp_provider_connected",
|
|
7031
7034
|
"mcp_provider_connected_unowned",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as modelProfileSchema, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
|
|
2
|
-
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-
|
|
2
|
+
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-D25XOUHc.js";
|
|
3
3
|
import { a as juniorAgentInvocations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-C1RNOCs8.js";
|
|
4
|
-
import "./executor-
|
|
5
|
-
import { p as credentialContextSchema } from "./registry-
|
|
4
|
+
import "./executor-C2moGIHS.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-D92WLl5I.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { and, asc, count, countDistinct, desc, eq, inArray, lt, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as recordConversationRetry$1, Dt as listActiveConversationIds$1, Ft as startConversationWork$1, It as steerWebPendingMessages$1, Lt as stopConversationWork$1, Mt as removeActiveConversation$1, Nt as requestAnotherSlice$1, Ot as markConversationWorkEnqueued$1, Pt as requestConversationWork$1, St as getConversationWorkState$1, _t as completeConversationStop$1, bt as drainConversationMailbox$1, dt as appendInboundMessage, ft as beginConversationResume$1, gt as clearExpiredConversationLease$1, ht as clearConsumedConversationWake$1, jt as releaseConversationWork$1, kt as recordAttemptFailure$1, lt as ackMessages$1, mt as checkInConversationWork$1, pt as cancelHumanFacingPendingMessages$1, ut as appendExclusiveInboundMessage, vt as completeConversationWork$1, xt as getConversation$1, yt as deadLetterAttempt$1 } from "./projection-
|
|
2
|
-
import { x as getConversationStore } from "./viewer-
|
|
3
|
-
import "./job-queue-
|
|
1
|
+
import { At as recordConversationRetry$1, Dt as listActiveConversationIds$1, Ft as startConversationWork$1, It as steerWebPendingMessages$1, Lt as stopConversationWork$1, Mt as removeActiveConversation$1, Nt as requestAnotherSlice$1, Ot as markConversationWorkEnqueued$1, Pt as requestConversationWork$1, St as getConversationWorkState$1, _t as completeConversationStop$1, bt as drainConversationMailbox$1, dt as appendInboundMessage, ft as beginConversationResume$1, gt as clearExpiredConversationLease$1, ht as clearConsumedConversationWake$1, jt as releaseConversationWork$1, kt as recordAttemptFailure$1, lt as ackMessages$1, mt as checkInConversationWork$1, pt as cancelHumanFacingPendingMessages$1, ut as appendExclusiveInboundMessage, vt as completeConversationWork$1, xt as getConversation$1, yt as deadLetterAttempt$1 } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { x as getConversationStore } from "./viewer-D25XOUHc.js";
|
|
3
|
+
import "./job-queue-Bh9sFO9t.js";
|
|
4
4
|
// src/chat/task-execution/store.ts
|
|
5
5
|
function metadataStore(options) {
|
|
6
6
|
return options.conversationStore ?? getConversationStore();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { h as logWarn } from "./logging-DYRS7E8s.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-Bh9sFO9t.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/chat/queue/callback.ts
|
|
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
|
|
|
110
110
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
111
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
112
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
113
|
+
const { processPluginTask } = await import("./task-runner-DQr2QfvJ.js").then((n) => n.r);
|
|
114
114
|
await processPluginTask(message);
|
|
115
115
|
},
|
|
116
116
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Ca as createPluginLogger, In as coreTaskRegistrations, Jt as getPiMessageRole, Na as createPluginConversationEvents, Nn as getPlugins, Qt as instructionTextForProjection, Sa as createPluginModel, Za as createPluginCache, an as stripRuntimeTurnContext, ba as createPluginState, it as getTurnRecord, nn as isToolResultMessage, rn as normalizeToolNameFromResult, tn as isToolResultError, x as hydrateConversationMessages, xa as createPluginEmbedder } from "./projection-
|
|
2
|
+
import { Ca as createPluginLogger, In as coreTaskRegistrations, Jt as getPiMessageRole, Na as createPluginConversationEvents, Nn as getPlugins, Qt as instructionTextForProjection, Sa as createPluginModel, Za as createPluginCache, an as stripRuntimeTurnContext, ba as createPluginState, it as getTurnRecord, nn as isToolResultMessage, rn as normalizeToolNameFromResult, tn as isToolResultError, x as hydrateConversationMessages, xa as createPluginEmbedder } from "./projection-CMRrv9Pt.js";
|
|
3
3
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
4
|
-
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
5
|
-
import { _ as sameActorIdentity } from "./media-
|
|
6
|
-
import { r as getStateAdapter } from "./adapter-
|
|
7
|
-
import { t as resolveConversationRouting, u as getDispatchRecord } from "./turn-session-routing-
|
|
8
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
9
|
-
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-
|
|
4
|
+
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-D25XOUHc.js";
|
|
5
|
+
import { _ as sameActorIdentity } from "./media-DstkkoNP.js";
|
|
6
|
+
import { r as getStateAdapter } from "./adapter-4qThDhgF.js";
|
|
7
|
+
import { t as resolveConversationRouting, u as getDispatchRecord } from "./turn-session-routing-DIeqG2pO.js";
|
|
8
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-ngCvtWNa.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-BdB0pab8.js";
|
|
10
10
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
11
11
|
// src/chat/plugins/task-runner.ts
|
|
12
12
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Qa as createDurableLocationConfigurationService, S as persistConversationMessages, ea as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-
|
|
2
|
-
import {
|
|
3
|
-
import { S as getDb } from "./viewer-
|
|
4
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { Qa as createDurableLocationConfigurationService, S as persistConversationMessages, ea as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { H as toOptionalNumber, U as toOptionalString, V as isRecord } from "./logging-DYRS7E8s.js";
|
|
3
|
+
import { S as getDb } from "./viewer-D25XOUHc.js";
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-4qThDhgF.js";
|
|
5
5
|
// src/chat/state/conversation.ts
|
|
6
6
|
function defaultConversationState() {
|
|
7
7
|
return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as markConversationMessage, Ka as listConversationAnnotations, Y as clearPendingAuth, dn as buildDeterministicTurnId, x as hydrateConversationMessages } from "./projection-
|
|
2
|
-
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-
|
|
3
|
-
import {
|
|
1
|
+
import { F as markConversationMessage, Ka as listConversationAnnotations, Y as clearPendingAuth, dn as buildDeterministicTurnId, x as hydrateConversationMessages } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-C0ZIxoDr.js";
|
|
3
|
+
import { V as isRecord, t as buildTurnFailureResponse } from "./logging-DYRS7E8s.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
5
|
-
import { S as getDb, y as getConversationEventStore } from "./viewer-
|
|
6
|
-
import { B as readMessageCardRefs, H as resolveMessageCards, V as removedCardSchema } from "./conversation-
|
|
7
|
-
import { D as parseAgentInvocationResultMessageId, X as markTurnClosed, Z as markTurnCompleted, p as getAgentInvocationTurnId, s as getAgentInvocation } from "./store-
|
|
8
|
-
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
5
|
+
import { S as getDb, y as getConversationEventStore } from "./viewer-D25XOUHc.js";
|
|
6
|
+
import { B as readMessageCardRefs, H as resolveMessageCards, V as removedCardSchema } from "./conversation-BjTo9ZFL.js";
|
|
7
|
+
import { D as parseAgentInvocationResultMessageId, X as markTurnClosed, Z as markTurnCompleted, p as getAgentInvocationTurnId, s as getAgentInvocation } from "./store-BIQYXvoV.js";
|
|
8
|
+
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-ngCvtWNa.js";
|
|
9
9
|
// src/chat/conversations/pending-cards.ts
|
|
10
10
|
/**
|
|
11
11
|
* Add the cards that tool results selected since the last visible assistant
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { y as getConversationEventStore } from "./viewer-D25XOUHc.js";
|
|
2
2
|
// src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { D as fallbackShortTitle, Fr as formatSlackLink, Kr as postSlackMessage, Pr as escapeSlackMrkdwnText, Ur as openSlackDirectMessage, ea as JUNIOR_THREAD_STATE_TTL_MS, ia as getDashboardTaskLink, oa as ToolInputError } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { _ as runBestEffort, h as logWarn } from "./logging-
|
|
4
|
-
import { G as agentTurnCostUsd, K as agentTurnTotalTokens, S as getDb } from "./viewer-
|
|
1
|
+
import { D as fallbackShortTitle, Fr as formatSlackLink, Kr as postSlackMessage, Pr as escapeSlackMrkdwnText, Ur as openSlackDirectMessage, ea as JUNIOR_THREAD_STATE_TTL_MS, ia as getDashboardTaskLink, oa as ToolInputError } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { n as botConfig } from "./config-DS-QLVSL.js";
|
|
3
|
+
import { _ as runBestEffort, h as logWarn } from "./logging-DYRS7E8s.js";
|
|
4
|
+
import { G as agentTurnCostUsd, K as agentTurnTotalTokens, S as getDb } from "./viewer-D25XOUHc.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
|
|
6
|
-
import { d as juniorAutomations, l as juniorAutomationRuns, u as juniorAutomationVersions } from "./executor-
|
|
7
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import { r as getStateAdapter } from "./adapter-
|
|
9
|
-
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-
|
|
6
|
+
import { d as juniorAutomations, l as juniorAutomationRuns, u as juniorAutomationVersions } from "./executor-C2moGIHS.js";
|
|
7
|
+
import { h as credentialSubjectSchema } from "./registry-D92WLl5I.js";
|
|
8
|
+
import { r as getStateAdapter } from "./adapter-4qThDhgF.js";
|
|
9
|
+
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-BGrd03QO.js";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, isNull, lte, max, ne, or, sql } from "drizzle-orm";
|
|
@@ -1583,7 +1583,7 @@ function slackSourceForDestination(args) {
|
|
|
1583
1583
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
1584
1584
|
*/
|
|
1585
1585
|
async function resolveConversationRouting(args) {
|
|
1586
|
-
const conversationStore = args.conversationStore ?? (await import("./viewer-
|
|
1586
|
+
const conversationStore = args.conversationStore ?? (await import("./viewer-D25XOUHc.js").then((n) => n.v)).getConversationStore();
|
|
1587
1587
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
1588
1588
|
let destination;
|
|
1589
1589
|
let source;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BnIJimKZ.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
// src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.274.0";
|
|
3
3
|
// src/version.ts
|
|
4
4
|
/** Installed Junior package version, or `unknown` when package metadata is unavailable. */
|
|
5
5
|
const JUNIOR_VERSION = typeof version === "string" && version.trim() ? version : "unknown";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
export { t as JUNIOR_VERSION } from "./version-BoWLhNzj.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
3
|
-
import {
|
|
2
|
+
import { i as getChatConfig } from "./config-DS-QLVSL.js";
|
|
3
|
+
import { B as normalizeIdentityEmail, R as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-DYRS7E8s.js";
|
|
4
4
|
import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-B4DYygOB.js";
|
|
5
5
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
|
|
6
|
-
import { S as juniorConversationAnnotations, b as juniorConversationEvents, g as juniorConversationBindings, h as juniorConversationParticipants, t as createJuniorSqlExecutor, v as CONVERSATION_METRICS, y as juniorConversationMetrics } from "./executor-
|
|
7
|
-
import { d as newConversationEventSchema, f as encodeHistoryPayload, l as decodeStoredConversationEvent, n as detectImageMediaType, o as conversationEventDataSchema, u as historyReplacementSchema, v as usageSchema } from "./media-
|
|
6
|
+
import { S as juniorConversationAnnotations, b as juniorConversationEvents, g as juniorConversationBindings, h as juniorConversationParticipants, t as createJuniorSqlExecutor, v as CONVERSATION_METRICS, y as juniorConversationMetrics } from "./executor-C2moGIHS.js";
|
|
7
|
+
import { d as newConversationEventSchema, f as encodeHistoryPayload, l as decodeStoredConversationEvent, n as detectImageMediaType, o as conversationEventDataSchema, u as historyReplacementSchema, v as usageSchema } from "./media-DstkkoNP.js";
|
|
8
8
|
import { a as withLock } from "./locks-D-0h111u.js";
|
|
9
9
|
import { createHash, randomUUID } from "node:crypto";
|
|
10
10
|
import { and, asc, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1436,13 +1436,22 @@ var SqlConversationEventStore = class {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
async replaceHistory(conversationId, replacement) {
|
|
1439
|
+
async replaceHistory(conversationId, replacement, options = {}) {
|
|
1440
1440
|
const parsed = historyReplacementSchema.parse(replacement);
|
|
1441
|
-
|
|
1442
|
-
await ensureConversationRow(this.executor, conversationId, Date.now());
|
|
1441
|
+
return withConversationEventLock(this.executor, conversationId, async () => {
|
|
1443
1442
|
const cursor = await this.readCursor(conversationId);
|
|
1444
|
-
const
|
|
1443
|
+
const currentHistoryVersion = cursor.maxHistoryVersion ?? 0;
|
|
1444
|
+
if (options.expectedHistoryVersion !== void 0 && options.expectedHistoryVersion !== currentHistoryVersion) return {
|
|
1445
|
+
status: "conflict",
|
|
1446
|
+
historyVersion: currentHistoryVersion
|
|
1447
|
+
};
|
|
1448
|
+
await ensureConversationRow(this.executor, conversationId, Date.now());
|
|
1449
|
+
const historyVersion = currentHistoryVersion + 1;
|
|
1445
1450
|
await this.executor.db().insert(juniorConversationEvents).values(insertFromEvent(conversationId, cursor.nextSeq, historyVersion, parsed));
|
|
1451
|
+
return {
|
|
1452
|
+
status: "replaced",
|
|
1453
|
+
historyVersion
|
|
1454
|
+
};
|
|
1446
1455
|
});
|
|
1447
1456
|
}
|
|
1448
1457
|
async loadCurrentHistoryVersion(conversationId) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as AuthorizationFlowDisabledError, La as loadForkHistory, V as PluginCredentialFailureError, Wt as isTurnExecutionLimitExceededError, Yt as getTerminalAssistantMessages, et as saveTurnCheckpoint, it as getTurnRecord, l as openConversationProjection, rt as failTurnRecord, tt as abandonTurnRecord } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
4
|
-
import { _ as sameActorIdentity, p as agentInstructionProvenance } from "./media-
|
|
5
|
-
import {
|
|
6
|
-
import { B as agentTypeStartsWithParentHistory, E as markAgentInvocationSteered, J as isTurnInputCommitLostError, K as getConversationTurnBoundaryError, O as reportReplacedAgentInvocation, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as TurnInputCommitLostError, d as getAgentInvocationMessageId, g as getLatestAgentInvocationForConversation, n as completeAgentInvocation, o as getActiveAgentInvocationForConversation, p as getAgentInvocationTurnId, r as createAgentInvocation, s as getAgentInvocation, v as isTerminalAgentInvocation, w as markAgentInvocationPaused, y as listActiveAgentInvocationsForConversation, z as agentTypeInstructions } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { A as recordFinishedTurnForAutomatedLimit, j as resetAutomatedTurnLimit, w as maybePostAutomatedTurnLimitNotice } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
11
|
-
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-
|
|
1
|
+
import { G as AuthorizationFlowDisabledError, La as loadForkHistory, V as PluginCredentialFailureError, Wt as isTurnExecutionLimitExceededError, Yt as getTerminalAssistantMessages, et as saveTurnCheckpoint, it as getTurnRecord, l as openConversationProjection, rt as failTurnRecord, tt as abandonTurnRecord } from "./projection-CMRrv9Pt.js";
|
|
2
|
+
import { n as botConfig } from "./config-DS-QLVSL.js";
|
|
3
|
+
import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-D25XOUHc.js";
|
|
4
|
+
import { _ as sameActorIdentity, p as agentInstructionProvenance } from "./media-DstkkoNP.js";
|
|
5
|
+
import { Ft as readBlockedReport, Ot as buildSteeringPiMessage, bt as recordSubagentEnded, kt as withoutSavedSteeringMessages, vt as stopChildAgentsOf, xt as recordSubagentStarted } from "./agent-runner-CLHM48dh.js";
|
|
6
|
+
import { B as agentTypeStartsWithParentHistory, E as markAgentInvocationSteered, J as isTurnInputCommitLostError, K as getConversationTurnBoundaryError, O as reportReplacedAgentInvocation, S as markAgentInvocationMailboxAppended, T as markAgentInvocationRunning, W as TurnInputCommitLostError, d as getAgentInvocationMessageId, g as getLatestAgentInvocationForConversation, n as completeAgentInvocation, o as getActiveAgentInvocationForConversation, p as getAgentInvocationTurnId, r as createAgentInvocation, s as getAgentInvocation, v as isTerminalAgentInvocation, w as markAgentInvocationPaused, y as listActiveAgentInvocationsForConversation, z as agentTypeInstructions } from "./store-BIQYXvoV.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-2IwdFWuQ.js";
|
|
8
|
+
import { A as recordFinishedTurnForAutomatedLimit, j as resetAutomatedTurnLimit, w as maybePostAutomatedTurnLimitNotice } from "./session-stop-CI5qJU7a.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-BvI3yBGS.js";
|
|
10
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-B7O6rZEX.js";
|
|
11
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-ngCvtWNa.js";
|
|
12
12
|
import { isDeepStrictEqual } from "node:util";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Ct as hasConversationStop, Et as isInvalidConversationRecordError, Tt as isFinalAttempt } from "./projection-
|
|
3
|
-
import { b as isProviderRetryError } from "./client-
|
|
4
|
-
import { i as getChatConfig } from "./config-
|
|
5
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
6
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
7
|
-
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { Ct as hasConversationStop, Et as isInvalidConversationRecordError, Tt as isFinalAttempt } from "./projection-CMRrv9Pt.js";
|
|
3
|
+
import { b as isProviderRetryError } from "./client-C0ZIxoDr.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-DS-QLVSL.js";
|
|
5
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-DYRS7E8s.js";
|
|
6
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-Bh9sFO9t.js";
|
|
7
|
+
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-BvI3yBGS.js";
|
|
8
8
|
// src/chat/task-execution/attempt-selection.ts
|
|
9
9
|
function selectContiguousTurnBatch(messages) {
|
|
10
10
|
const first = messages[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.274.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"sharp": "^0.35.3",
|
|
92
92
|
"yaml": "^2.9.0",
|
|
93
93
|
"zod": "^4.5.4",
|
|
94
|
-
"@sentry/junior-plugin-api": "0.
|
|
94
|
+
"@sentry/junior-plugin-api": "0.274.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"bullmq": "^6.5.0",
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"typescript": "^7.0.2",
|
|
127
127
|
"vercel": "^54.4.0",
|
|
128
128
|
"vitest": "^4.1.12",
|
|
129
|
-
"@sentry/junior-github": "0.
|
|
129
|
+
"@sentry/junior-github": "0.274.0",
|
|
130
130
|
"@sentry/junior-testing": "0.0.0",
|
|
131
|
-
"@sentry/junior-memory": "0.
|
|
131
|
+
"@sentry/junior-memory": "0.274.0"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|
|
134
134
|
"build": "tsdown",
|