@sentry/junior 0.282.0 → 0.283.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-BAqo7eOH.js → adapter-D8-lqOBF.js} +1 -1
- package/dist/{admin-DbWpMHh6.js → admin-Dnw5SCXp.js} +1 -1
- package/dist/{agent-runner-h4CDcnDV.js → agent-runner-Bj7GhysW.js} +49 -23
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +94 -59
- package/dist/{app-B-0wwAxr.d.ts → app-CMBP-N43.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +30 -30
- package/dist/{assistant-reply-4Wvo95-N.js → assistant-reply-CdYsLbXL.js} +1 -1
- package/dist/{automation-sIsmIXH7.js → automation-MLWOrghe.js} +1 -1
- package/dist/{background-compaction-queue-CoWqScCC.js → background-compaction-queue-Bbsqx8Vm.js} +2 -2
- package/dist/{briefs-CMiotFo9.js → briefs-C4qBY-jb.js} +4 -4
- package/dist/{catalog-runtime-Cpje_Uic.js → catalog-runtime-B7NRB7eH.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-BHgCXeaF.js → client-a3Ib6wxr.js} +2 -2
- package/dist/{config-DBdBimZ9.js → config-DFVlYCeY.js} +97 -4
- package/dist/{connections-DjY72_uF.js → connections-BtnvpBEV.js} +10 -10
- package/dist/{conversation-DNtcULyX.js → conversation-DdT7SNar.js} +3 -1
- package/dist/{conversation-pending-messages-LlFnr9-m.js → conversation-pending-messages-Dct5pheX.js} +1 -1
- package/dist/{conversation-privacy-DiDh9KE4.js → conversation-privacy-DLq-abjU.js} +1 -1
- package/dist/{credential-sync-DUrQwccr.js → credential-sync-B4XFVcjM.js} +13 -13
- package/dist/{db-hQsoB16L.d.ts → db-A_WrTY-s.d.ts} +1 -1
- package/dist/{executor-CGqJCxgR.js → executor-HPgHGAWK.js} +8 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-DapIaJAi.js → logging-2BXvW7Mp.js} +1 -1
- package/dist/{media-Dq9_svfQ.js → media-Bu9C6lz0.js} +3 -1
- package/dist/{message-BjN5sKad.js → message-BG1v1lXX.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-DVHKrjJP.js → oauth-callback-server-CXNZJymo.js} +2 -2
- package/dist/{projection-ii_OYu6z.js → projection-BfKkpOGQ.js} +23 -14
- package/dist/{prompt-DI6KCtwb.js → prompt-CCtaGgbI.js} +1 -1
- package/dist/{registry-DpjG3yS-.js → registry-CLooHPAz.js} +1 -1
- package/dist/{resolve-iMW9Dgo2.js → resolve-D3MK9oRJ.js} +3 -3
- package/dist/{result-BrlvfyIj.js → result-BPCjUefO.js} +9 -9
- package/dist/{runner-Bg9mr2pB.js → runner-Ds31u3rB.js} +11 -11
- package/dist/{sandbox-egress-signals-Bd3lb_Wd.js → sandbox-egress-signals-CLd5RPUw.js} +1 -1
- package/dist/{schema-BN34Jy-U.js → schema-CHNP0GfH.js} +11 -4
- package/dist/{schema-CsqJzkP5.d.ts → schema-jW3ccLjp.d.ts} +22 -1
- package/dist/{service-account-Bd1348kw.js → service-account-CWpTsoIM.js} +3 -3
- package/dist/{service-account-Dfl9Pitm.js → service-account-D6AMahy7.js} +3 -3
- package/dist/{session-stop-CVEEx_YD.js → session-stop-D8LGC3H6.js} +12 -12
- package/dist/{skills-DqUUuf4L.js → skills-DuOKByQH.js} +2 -2
- package/dist/{spawn-e7rQs14T.js → spawn-CNIQGgAS.js} +2 -2
- package/dist/{stop-DtpBUUJq.js → stop-DX2oOIgl.js} +51 -110
- package/dist/{store-nETG4KVg.js → store-61mD4ZSh.js} +4 -4
- package/dist/{store-nu3Xx08K.js → store-DAJntSEv.js} +3 -3
- package/dist/{task-queue-CYje8WKs.js → task-queue-BE70Pb9p.js} +3 -3
- package/dist/{task-runner-CwegN45x.js → task-runner-CmmfddSZ.js} +7 -7
- package/dist/{thread-state-BDaMl9yd.js → thread-state-0UfRMWYd.js} +4 -4
- package/dist/{turn-failure-response-CV06tN_R.js → turn-failure-response-DKdzxJHE.js} +7 -7
- package/dist/{turn-lifecycle-CF2N7ud5.js → turn-lifecycle-24sBZ4Ip.js} +1 -1
- package/dist/{turn-session-routing-BIJGJjVh.js → turn-session-routing-CzCnNAUO.js} +9 -9
- package/dist/{validation-DXvxEEjq.js → validation-Cs_knhR8.js} +1 -1
- package/dist/{version-CzEk1KBX.js → version-ZMC4cXWN.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-C2PztlYX.js → viewer-CYB9T4rm.js} +4 -4
- package/dist/{work-BM_L0Pv9.js → work-J1n6RQkY.js} +11 -11
- package/dist/{worker-2no53G60.js → worker-s1fCvj1z.js} +6 -6
- package/migrations/0081_conversation_pin_position.sql +1 -0
- package/migrations/meta/0081_snapshot.json +4271 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
import { h as startSpan, i as getActiveSpan, r as continueTrace } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $ as completeTurnRecord, $n as takeReviewItem, A as getConversationMessageSlackTs, Aa as createPluginLogger, Ai as removeReactionFromMessage, Ba as conversationPinnedForUser, Ci as addReactionToMessage, D as buildConversationContext, E as appendThreadContextMessages, En as webActorUserIds, F as turnHasReply, Fa as conversationArchivedForUser, Fi as SlackActionError, H as AuthorizationFlowDisabledError, Ha as readConversationViewerMarks, Hi as normalizeSlackConversationId, I as upsertConversationMessage, Ia as conversationHasParticipantUser, Ii as downloadPrivateSlackFile, J as wasPendingAuthStopped, Ja as readConversationEventPageAfter, Jn as getReviewItem, K as clearPendingAuth, Ka as readLatestConversationBrief, La as conversationIsMemberRoot, Ln as getPlugins, Lr as verifyTimerWatchCredentialSubject, M as markConversationMessage, Ma as createConversationAccessReader, N as normalizeConversationText, Na as readConversationAccessFromSql, O as createConversationMemoryService, P as recordDeliveredAssistantMessage, Pa as conversationArchivedForEmail, Q as abandonTurnRecord, Qa as buildSentryConversationUrl, R as PluginCredentialFailureError, Ra as conversationNotArchivedForEmail, Ri as getHeaderString, Rr as JUNIOR_THREAD_STATE_TTL_MS, S as resolveConversationTitle, Si as truncateStatusText, Sn as isExperimentalFeatureEnabled, Ua as viewerConversationMembership, Ut as persistWithRetry, Va as conversationViewerMarks, Vi as isDmChannel, Wi as withSlackRetries, Wn as closeReviewItem, X as loadTurnCheckpoint, Xn as listReplyActionItems, Ya as readConversationEventPageAround, Z as saveTurnCheckpoint, Zn as listWaitingConversations, a as loadProjection, an as trimTrailingAssistantMessages, ao as recordSlackAttachment, ar as isOnlyAssignee, bi as normalizeSlackStatusText, d as recordAuthorizationCompleted, eo as notInheritedByForkChild, et as failTurnRecord, fn as decideSubscribedThreadReply, go as configValueSchema, h as recordSubscribedReplyRoute, i as loadConversationProjection, io as readSlackAttachmentsVersion, ir as canReadReviewItem, j as isHumanConversationMessage, k as estimateConversationContextTokens, ln as buildDeterministicAssistantMessageId, lo as listConversationAnnotations, lr as reviewItemNeedsUser, mn as getThreadStopDecision, mo as createPluginCache, n as commitMessages, nr as canActOnReviewItem, nt as listTurnSummaries, o as loadTurnProjection, pn as getSubscribedReplyPreflightDecision, po as lookupSlackUser, qa as readConversationEventPage, ro as readAttachmentVisionSummary, rt as recordTurnSummary, t as commitAcceptedReply, to as getSlackFileId, tt as getTurnRecord, un as buildDeterministicTurnId, uo as listConversationAnnotationsById, ur as reviewItemReaderForUser, v as hydrateConversationMessages, vo as piMessageFromHistoryItem, w as fallbackShortTitle, wn as createUserTokenStore, x as persistConversationMessageSummaries, xr as cancelSubscriptions, y as persistConversationMessages, za as conversationNotArchivedForUser, zi as getSlackClient, zt as buildTurnErrorResponse } from "./projection-
|
|
3
|
-
import { a as completeText, c as resolveGatewayModel, m as escapeXml, r as completeDecision, x as isProviderRetryError } from "./client-
|
|
4
|
-
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName
|
|
5
|
-
import { E as withSpan, G as toOptionalNumber, K as toOptionalString, S as setTags, T as withLogContext, W 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-
|
|
6
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { $ as completeTurnRecord, $n as takeReviewItem, A as getConversationMessageSlackTs, Aa as createPluginLogger, Ai as removeReactionFromMessage, Ba as conversationPinnedForUser, Ci as addReactionToMessage, D as buildConversationContext, E as appendThreadContextMessages, En as webActorUserIds, F as turnHasReply, Fa as conversationArchivedForUser, Fi as SlackActionError, H as AuthorizationFlowDisabledError, Ha as readConversationViewerMarks, Hi as normalizeSlackConversationId, I as upsertConversationMessage, Ia as conversationHasParticipantUser, Ii as downloadPrivateSlackFile, J as wasPendingAuthStopped, Ja as readConversationEventPageAfter, Jn as getReviewItem, K as clearPendingAuth, Ka as readLatestConversationBrief, La as conversationIsMemberRoot, Ln as getPlugins, Lr as verifyTimerWatchCredentialSubject, M as markConversationMessage, Ma as createConversationAccessReader, N as normalizeConversationText, Na as readConversationAccessFromSql, O as createConversationMemoryService, P as recordDeliveredAssistantMessage, Pa as conversationArchivedForEmail, Q as abandonTurnRecord, Qa as buildSentryConversationUrl, R as PluginCredentialFailureError, Ra as conversationNotArchivedForEmail, Ri as getHeaderString, Rr as JUNIOR_THREAD_STATE_TTL_MS, S as resolveConversationTitle, Si as truncateStatusText, Sn as isExperimentalFeatureEnabled, Ua as viewerConversationMembership, Ut as persistWithRetry, Va as conversationViewerMarks, Vi as isDmChannel, Wi as withSlackRetries, Wn as closeReviewItem, X as loadTurnCheckpoint, Xn as listReplyActionItems, Ya as readConversationEventPageAround, Z as saveTurnCheckpoint, Zn as listWaitingConversations, a as loadProjection, an as trimTrailingAssistantMessages, ao as recordSlackAttachment, ar as isOnlyAssignee, bi as normalizeSlackStatusText, d as recordAuthorizationCompleted, eo as notInheritedByForkChild, et as failTurnRecord, fn as decideSubscribedThreadReply, go as configValueSchema, h as recordSubscribedReplyRoute, i as loadConversationProjection, io as readSlackAttachmentsVersion, ir as canReadReviewItem, j as isHumanConversationMessage, k as estimateConversationContextTokens, ln as buildDeterministicAssistantMessageId, lo as listConversationAnnotations, lr as reviewItemNeedsUser, mn as getThreadStopDecision, mo as createPluginCache, n as commitMessages, nr as canActOnReviewItem, nt as listTurnSummaries, o as loadTurnProjection, pn as getSubscribedReplyPreflightDecision, po as lookupSlackUser, qa as readConversationEventPage, ro as readAttachmentVisionSummary, rt as recordTurnSummary, t as commitAcceptedReply, to as getSlackFileId, tt as getTurnRecord, un as buildDeterministicTurnId, uo as listConversationAnnotationsById, ur as reviewItemReaderForUser, v as hydrateConversationMessages, vo as piMessageFromHistoryItem, w as fallbackShortTitle, wn as createUserTokenStore, x as persistConversationMessageSummaries, xr as cancelSubscriptions, y as persistConversationMessages, za as conversationNotArchivedForUser, zi as getSlackClient, zt as buildTurnErrorResponse } from "./projection-BfKkpOGQ.js";
|
|
3
|
+
import { a as completeText, c as resolveGatewayModel, m as escapeXml, r as completeDecision, x as isProviderRetryError } from "./client-a3Ib6wxr.js";
|
|
4
|
+
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-DFVlYCeY.js";
|
|
5
|
+
import { E as withSpan, G as toOptionalNumber, K as toOptionalString, S as setTags, T as withLogContext, W 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-2BXvW7Mp.js";
|
|
6
|
+
import { t as JUNIOR_VERSION } from "./version-ZMC4cXWN.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-6jsm_v96.js";
|
|
8
|
-
import { $ as agentTurnUsageSchema, A as loadConversationSlackTenantIds, C as getSqlExecutor, I as resolveActorIdentityId, J as nextDetailVersion, K as parseSessionSource, L as saveActorAvatar, N as locationFromRow, S as getDb, X as addAgentTurnUsage, et as hasAgentTurnUsage, f as identityAvatarUrl, h as readUserAvatarUrls, it as requireSlackDestination, k as withConversationEventLock, nt as createSlackDestination, q as conversationDetailTouch, tt as resolveRootConversationId, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
9
|
-
import { A as juniorConversations, C as juniorConversationEvents, E as juniorCodeChanges, M as juniorUsers, N as juniorDestinations, S as isUserInstruction, _ as juniorConversationParticipants, c as juniorReviewItems, g as juniorConversationReadPositions, j as juniorIdentities, k as conversationReadColumns, o as juniorReviewItemConversations, y as juniorConversationBriefs } from "./executor-
|
|
10
|
-
import {
|
|
11
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
12
|
-
import { A as runWithSlackInstallation, At as withoutSavedSteeringMessages, Et as conversationSubtreeColumns, F as resolveSlackChannelIdFromThreadId, I as getConversationInfo, J as readConversationSourceTask, Lt as shouldEmitDevAgentTrace, M as parseSlackThreadId, N as readSlackRawMessageContext, Nt as RetryableDeliveryError, P as resolveSlackChannelIdFromMessage, R as listThreadReplies, S as createSlackReviewItemShow, Tt as conversationSubtree, a as buildAuthPauseResponse, b as renderAttachmentText, dt as recordWebConversationActivity, ft as webActorFromUser, i as measureTurnCompactionWait, kt as buildSteeringPiMessage, lt as createAndEnqueueConversation, m as latestProgressStatus, mt as decodeInputImages, n as executeAgentRun, ot as acceptsWebMessages, pt as resolveConversationDestination, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, ut as createConversationId, vt as storeAttachment, x as renderBlockText, z as resolveDestinationVisibility } from "./agent-runner-
|
|
8
|
+
import { $ as agentTurnUsageSchema, A as loadConversationSlackTenantIds, C as getSqlExecutor, I as resolveActorIdentityId, J as nextDetailVersion, K as parseSessionSource, L as saveActorAvatar, N as locationFromRow, S as getDb, X as addAgentTurnUsage, et as hasAgentTurnUsage, f as identityAvatarUrl, h as readUserAvatarUrls, it as requireSlackDestination, k as withConversationEventLock, nt as createSlackDestination, q as conversationDetailTouch, tt as resolveRootConversationId, x as getConversationStore, y as getConversationEventStore } from "./viewer-CYB9T4rm.js";
|
|
9
|
+
import { A as juniorConversations, C as juniorConversationEvents, E as juniorCodeChanges, M as juniorUsers, N as juniorDestinations, S as isUserInstruction, _ as juniorConversationParticipants, c as juniorReviewItems, g as juniorConversationReadPositions, j as juniorIdentities, k as conversationReadColumns, o as juniorReviewItemConversations, y as juniorConversationBriefs } from "./executor-HPgHGAWK.js";
|
|
10
|
+
import { _ as instructionProvenanceFor, h as contextProvenance, i as isVisionImageMediaType, r as detectImageMediaType } from "./media-Bu9C6lz0.js";
|
|
11
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-CLooHPAz.js";
|
|
12
|
+
import { A as runWithSlackInstallation, At as withoutSavedSteeringMessages, Et as conversationSubtreeColumns, F as resolveSlackChannelIdFromThreadId, I as getConversationInfo, J as readConversationSourceTask, Lt as shouldEmitDevAgentTrace, M as parseSlackThreadId, N as readSlackRawMessageContext, Nt as RetryableDeliveryError, P as resolveSlackChannelIdFromMessage, R as listThreadReplies, S as createSlackReviewItemShow, Tt as conversationSubtree, a as buildAuthPauseResponse, b as renderAttachmentText, dt as recordWebConversationActivity, ft as webActorFromUser, i as measureTurnCompactionWait, kt as buildSteeringPiMessage, lt as createAndEnqueueConversation, m as latestProgressStatus, mt as decodeInputImages, n as executeAgentRun, ot as acceptsWebMessages, pt as resolveConversationDestination, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, ut as createConversationId, vt as storeAttachment, x as renderBlockText, z as resolveDestinationVisibility } from "./agent-runner-Bj7GhysW.js";
|
|
13
13
|
import { a as withLock, n as MUTATION_LOCK_TTL_MS, r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
14
|
-
import { r as getStateAdapter } from "./adapter-
|
|
15
|
-
import { R as readMessageAttachments, c as conversationDetailReportSchema, p as conversationFeedSchema, u as conversationEventPageSchema } from "./conversation-
|
|
16
|
-
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-
|
|
17
|
-
import { $ as markTurnFailed, G as TurnInputCommitLostError, J as isCooperativeTurnYieldError, K as TurnInputDeferredError, Q as markTurnCompleted, U as ConversationTurnBoundaryError, W as CooperativeTurnYieldError, X as isTurnInputDeferredError, Y as isTurnInputCommitLostError, Z as markTurnClosed, et as startActiveTurn, h as getChildAgentLabel, q as getConversationTurnBoundaryError } from "./store-
|
|
18
|
-
import { n as getAssistantReplyText, t as decideReply } from "./assistant-reply-
|
|
19
|
-
import { C as savedTurnInputMessages, E as maybePostAutomatedTurnLimitNotice, I as deliversFinalText, L as finishedRunReply, M as recordFinishedTurnForAutomatedLimit, O as resolveSlackReplyTarget, R as postsRunNotices, S as joinMailboxText, V as runDispatchOutcome, c as isEventMailboxMetadata, i as skipInputBeforeConversationStop, k as sendSlackReply, l as renderEventBatchText, s as eventBatchMessageMeta, u as timerWatchCredentialSubject, w as webConversationMessage } from "./session-stop-
|
|
14
|
+
import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
|
|
15
|
+
import { R as readMessageAttachments, c as conversationDetailReportSchema, p as conversationFeedSchema, u as conversationEventPageSchema } from "./conversation-DdT7SNar.js";
|
|
16
|
+
import { a as EVENT_SYSTEM_ACTOR, o as isEventConversationMessage } from "./prompt-CCtaGgbI.js";
|
|
17
|
+
import { $ as markTurnFailed, G as TurnInputCommitLostError, J as isCooperativeTurnYieldError, K as TurnInputDeferredError, Q as markTurnCompleted, U as ConversationTurnBoundaryError, W as CooperativeTurnYieldError, X as isTurnInputDeferredError, Y as isTurnInputCommitLostError, Z as markTurnClosed, et as startActiveTurn, h as getChildAgentLabel, q as getConversationTurnBoundaryError } from "./store-61mD4ZSh.js";
|
|
18
|
+
import { n as getAssistantReplyText, t as decideReply } from "./assistant-reply-CdYsLbXL.js";
|
|
19
|
+
import { C as savedTurnInputMessages, E as maybePostAutomatedTurnLimitNotice, I as deliversFinalText, L as finishedRunReply, M as recordFinishedTurnForAutomatedLimit, O as resolveSlackReplyTarget, R as postsRunNotices, S as joinMailboxText, V as runDispatchOutcome, c as isEventMailboxMetadata, i as skipInputBeforeConversationStop, k as sendSlackReply, l as renderEventBatchText, s as eventBatchMessageMeta, u as timerWatchCredentialSubject, w as webConversationMessage } from "./session-stop-D8LGC3H6.js";
|
|
20
20
|
import { _ as isEmptyUserInputAnswer, b as webMessageId, v as normalizeUserInputAnswer } from "./reporting-window-B-QP9zX1.js";
|
|
21
|
-
import { g as getTurnRequestDeadline, l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
22
|
-
import { D as stopConversationWork, E as steerWebPendingMessages, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-
|
|
23
|
-
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-
|
|
24
|
-
import { d as apiErrorSchema, f as healthReportSchema, s as conversationPendingMessagesReportSchema } from "./conversation-pending-messages-
|
|
25
|
-
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-
|
|
26
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
27
|
-
import { o as AgentRunError, s as executeTurn } from "./work-
|
|
28
|
-
import { a as persistThreadStateById, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState, t as getLocationConfigurationService } from "./thread-state-
|
|
29
|
-
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, l as getWebAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-
|
|
30
|
-
import { t as bindMessageAgent } from "./message-
|
|
31
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
32
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
33
|
-
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-
|
|
21
|
+
import { g as getTurnRequestDeadline, l as getVercelConversationWorkQueue } from "./background-compaction-queue-Bbsqx8Vm.js";
|
|
22
|
+
import { D as stopConversationWork, E as steerWebPendingMessages, a as cancelHumanFacingPendingMessages, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-DAJntSEv.js";
|
|
23
|
+
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-CzCnNAUO.js";
|
|
24
|
+
import { d as apiErrorSchema, f as healthReportSchema, s as conversationPendingMessagesReportSchema } from "./conversation-pending-messages-Dct5pheX.js";
|
|
25
|
+
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-BPCjUefO.js";
|
|
26
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-24sBZ4Ip.js";
|
|
27
|
+
import { o as AgentRunError, s as executeTurn } from "./work-J1n6RQkY.js";
|
|
28
|
+
import { a as persistThreadStateById, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState, t as getLocationConfigurationService } from "./thread-state-0UfRMWYd.js";
|
|
29
|
+
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, l as getWebAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-BtnvpBEV.js";
|
|
30
|
+
import { t as bindMessageAgent } from "./message-BG1v1lXX.js";
|
|
31
|
+
import { t as bindSpawnAgent } from "./spawn-CNIQGgAS.js";
|
|
32
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CmmfddSZ.js";
|
|
33
|
+
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-DKdzxJHE.js";
|
|
34
34
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
35
35
|
import * as z from "zod";
|
|
36
36
|
import { and, asc, desc, eq, gt, inArray, isNotNull, isNull, lte, max, ne, or, sql } from "drizzle-orm";
|
|
37
37
|
import { conversationSidebarAnnotationSchema, createSlackSource, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
38
38
|
import { alias } from "drizzle-orm/pg-core";
|
|
39
|
-
import { del, get, put } from "@vercel/blob";
|
|
40
39
|
import { HTTPException } from "hono/http-exception";
|
|
41
40
|
import { Message, ThreadImpl, stringifyMarkdown } from "chat";
|
|
42
41
|
import { SlackFormatConverter, createSlackAdapter } from "@chat-adapter/slack";
|
|
@@ -303,83 +302,6 @@ function createAgentDispatchConversationWorker(options) {
|
|
|
303
302
|
}
|
|
304
303
|
};
|
|
305
304
|
}
|
|
306
|
-
// src/chat/attachments/memory.ts
|
|
307
|
-
/**
|
|
308
|
-
* Store attachments in process memory, for tests.
|
|
309
|
-
*
|
|
310
|
-
* Objects are lost when the process stops, and each process has its own
|
|
311
|
-
* copy. Do not use this provider for deployed apps.
|
|
312
|
-
*/
|
|
313
|
-
function createMemoryAttachmentStorage() {
|
|
314
|
-
const objects = /* @__PURE__ */ new Map();
|
|
315
|
-
return {
|
|
316
|
-
objects,
|
|
317
|
-
provider: "memory",
|
|
318
|
-
async put(input) {
|
|
319
|
-
objects.set(input.key, Buffer.from(input.body));
|
|
320
|
-
},
|
|
321
|
-
async get(key) {
|
|
322
|
-
const body = objects.get(key);
|
|
323
|
-
if (!body) return null;
|
|
324
|
-
return new ReadableStream({ start(controller) {
|
|
325
|
-
controller.enqueue(new Uint8Array(body));
|
|
326
|
-
controller.close();
|
|
327
|
-
} });
|
|
328
|
-
},
|
|
329
|
-
async delete(keys) {
|
|
330
|
-
for (const key of keys) objects.delete(key);
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
// src/chat/attachments/vercel.ts
|
|
335
|
-
/** Store private conversation attachments in Vercel Blob. */
|
|
336
|
-
function createVercelAttachmentStorage() {
|
|
337
|
-
return {
|
|
338
|
-
provider: "vercel-blob",
|
|
339
|
-
async put(input) {
|
|
340
|
-
await put(input.key, input.body, {
|
|
341
|
-
access: "private",
|
|
342
|
-
addRandomSuffix: false,
|
|
343
|
-
allowOverwrite: true,
|
|
344
|
-
contentType: input.contentType
|
|
345
|
-
});
|
|
346
|
-
},
|
|
347
|
-
async get(key) {
|
|
348
|
-
const result = await get(key, {
|
|
349
|
-
access: "private",
|
|
350
|
-
useCache: false
|
|
351
|
-
});
|
|
352
|
-
return result?.statusCode === 200 ? result.stream : null;
|
|
353
|
-
},
|
|
354
|
-
async delete(keys) {
|
|
355
|
-
if (keys.length === 0) return;
|
|
356
|
-
await del(keys);
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
// src/chat/attachments/storage.ts
|
|
361
|
-
/**
|
|
362
|
-
* Return attachment storage for the configured provider.
|
|
363
|
-
*
|
|
364
|
-
* Callers do not choose a provider. Chat config decides it.
|
|
365
|
-
*/
|
|
366
|
-
function getAttachmentStorage() {
|
|
367
|
-
return createAttachmentStorage(getChatConfig().attachmentStorage);
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* Create attachment storage for one provider config.
|
|
371
|
-
*
|
|
372
|
-
* Runtime code uses `getAttachmentStorage()`. Call this only to test a
|
|
373
|
-
* provider adapter with its own config.
|
|
374
|
-
*/
|
|
375
|
-
function createAttachmentStorage(config) {
|
|
376
|
-
switch (config.provider) {
|
|
377
|
-
case "vercel-blob": return createVercelAttachmentStorage();
|
|
378
|
-
case "s3": return createS3AttachmentStorage(config.s3);
|
|
379
|
-
case "memory": return createMemoryAttachmentStorage();
|
|
380
|
-
default: throw new Error(`Unsupported attachment storage provider: ${String(config.provider)}`);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
305
|
// src/chat/plugins/unfinished-work.ts
|
|
384
306
|
/**
|
|
385
307
|
* Return assigned and unfinished plugin work for the candidate conversations.
|
|
@@ -7125,6 +7047,7 @@ async function setViewerArchive(args) {
|
|
|
7125
7047
|
set: {
|
|
7126
7048
|
archivedAt,
|
|
7127
7049
|
pinnedAt: null,
|
|
7050
|
+
pinPosition: null,
|
|
7128
7051
|
lastMessageAt: sql`greatest(${juniorConversationParticipants.lastMessageAt}, excluded.last_message_at)`
|
|
7129
7052
|
}
|
|
7130
7053
|
});
|
|
@@ -8355,6 +8278,7 @@ function conversationSummaryFromStoredConversation(args) {
|
|
|
8355
8278
|
...locationUrl ? { locationUrl } : void 0,
|
|
8356
8279
|
archivedAt: args.archivedAtMs === void 0 ? null : new Date(args.archivedAtMs).toISOString(),
|
|
8357
8280
|
pinnedAt: args.pinnedAtMs === void 0 ? null : new Date(args.pinnedAtMs).toISOString(),
|
|
8281
|
+
...args.pinPosition === void 0 ? void 0 : { pinPosition: args.pinPosition },
|
|
8358
8282
|
...slackThread ? { channel: slackThread.channelId } : void 0,
|
|
8359
8283
|
...channelName ? { channelName } : void 0,
|
|
8360
8284
|
...channelNameRedacted ? { channelNameRedacted: true } : void 0,
|
|
@@ -9541,7 +9465,10 @@ async function pinConversation(viewer, conversationId, body) {
|
|
|
9541
9465
|
const rootConversationId = await resolveRootConversationId(executor, conversationId);
|
|
9542
9466
|
const db = executor.db();
|
|
9543
9467
|
if (!body.pinned) {
|
|
9544
|
-
await db.update(juniorConversationParticipants).set({
|
|
9468
|
+
await db.update(juniorConversationParticipants).set({
|
|
9469
|
+
pinnedAt: null,
|
|
9470
|
+
pinPosition: null
|
|
9471
|
+
}).where(and(eq(juniorConversationParticipants.userId, viewer.id), eq(juniorConversationParticipants.rootConversationId, rootConversationId)));
|
|
9545
9472
|
return { pinnedAt: null };
|
|
9546
9473
|
}
|
|
9547
9474
|
const [root] = await db.select({ lastActivityAt: juniorConversations.lastActivityAt }).from(juniorConversations).where(eq(juniorConversations.conversationId, rootConversationId)).limit(1);
|
|
@@ -9556,11 +9483,25 @@ async function pinConversation(viewer, conversationId, body) {
|
|
|
9556
9483
|
target: [juniorConversationParticipants.userId, juniorConversationParticipants.rootConversationId],
|
|
9557
9484
|
set: {
|
|
9558
9485
|
archivedAt: null,
|
|
9559
|
-
pinnedAt
|
|
9486
|
+
pinnedAt,
|
|
9487
|
+
pinPosition: null
|
|
9560
9488
|
}
|
|
9561
9489
|
});
|
|
9562
9490
|
return { pinnedAt: pinnedAt.toISOString() };
|
|
9563
9491
|
}
|
|
9492
|
+
/**
|
|
9493
|
+
* Save the viewer's Pinned order. Each listed pin takes its index as its
|
|
9494
|
+
* place. The update reads only the viewer's own pinned rows, so an id that
|
|
9495
|
+
* the viewer did not pin changes nothing and grants nothing.
|
|
9496
|
+
*/
|
|
9497
|
+
async function reorderPinnedConversations(viewer, body) {
|
|
9498
|
+
const ids = body.conversationIds;
|
|
9499
|
+
const participants = juniorConversationParticipants;
|
|
9500
|
+
const positions = sql.join(ids.map((id, index) => sql`when ${id} then ${index}::integer`), sql` `);
|
|
9501
|
+
const updated = await getDb().update(participants).set({ pinPosition: sql`case ${participants.rootConversationId} ${positions} else ${participants.pinPosition} + ${ids.length}::integer end` }).where(and(eq(participants.userId, viewer.id), isNotNull(participants.pinnedAt))).returning({ rootConversationId: participants.rootConversationId });
|
|
9502
|
+
const updatedIds = new Set(updated.map((row) => row.rootConversationId));
|
|
9503
|
+
return { conversationIds: ids.filter((id) => updatedIds.has(id)) };
|
|
9504
|
+
}
|
|
9564
9505
|
// src/api/conversations/steer-pending-messages.ts
|
|
9565
9506
|
/**
|
|
9566
9507
|
* Steer the viewer's own queued web messages into the conversation now.
|
|
@@ -9632,4 +9573,4 @@ function viewerWebMessages(messages, viewer) {
|
|
|
9632
9573
|
}] : [];
|
|
9633
9574
|
});
|
|
9634
9575
|
}
|
|
9635
|
-
export {
|
|
9576
|
+
export { reviewItemChange as $, createSlackWebApiStatusSender as A, stopSlackThread as B, readConversationPendingMessages as C, createProductionConversationWorkOptions as D, archiveConversation as E, resolveAllowedDomains as F, bindMessageAuthorIdentityId as G, withNormalizedThreadId as H, recordSkippedConversationMessage as I, parseContent as J, startProcessingReaction as K, buildSlackInboundMessage as L, isAllowedDomain as M, isAllowedSignInEmail as N, createProductionSlackWebhookServices as O, readEnvList as P, readReviewItemForUser as Q, clearSlackPendingReactions as R, cancelConversationPendingMessagesForViewer as S, resolveMentions as T, stopConversationTurn as U, normalizeIncomingSlackThreadId as V, THREAD_OPTOUT_ACK as W, actOnReviewItem as X, ReviewItemActionError as Y, closeReviewItemsAnsweredByReply as Z, readFirstHumanMessageTexts as _, readConversationDetail as a, updateUserAutoArchiveSettings as at, decodeConversationCursor as b, forkConversationForViewer as c, throwApiError as ct, readConversationFeed as d, GET as dt, DEFAULT_AUTO_ARCHIVE_SETTINGS as et, readConversationRecordFromSql as f, readHealthReport as ft, conversationSummaryFromStoredConversation as g, readConversationTreeMetricsFromSql as h, reorderPinnedConversations as i, setConversationAutoArchive as it, assertNoLegacyAllowedDomains as j, getProductionSlackAdapter as k, keepQuickQuestionForViewer as l, AGENT_DISPATCH_MAX_AGE_MS as lt, childAgentTotalsReport as m, steerConversationPendingMessagesForViewer as n, readUserAutoArchiveSettings as nt, readConversationDetailEtag as o, emptyResponse as ot, readConversationAuxiliaryCostsFromSql as p, stripLeadingBotMention as q, pinConversation as r, runAutoArchiveSweep as rt, markConversationRead as s, jsonResponse as st, stopConversationTurnForViewer as t, archiveViewerDoneConversations as tt, readConversationEvents as u, enqueueAgentDispatch as ut, appendConversationMessageForViewer as v, requireConversationPendingMessages as w, encodeConversationCursor as x, createConversationForViewer as y, isSlackMessageStopped as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as TURN_REASONING_LEVELS } from "./config-
|
|
2
|
-
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-
|
|
3
|
-
import { h as juniorAgentInvocations, m as juniorAgentBindings } from "./executor-
|
|
4
|
-
import { p as credentialContextSchema } from "./registry-
|
|
1
|
+
import { g as TURN_REASONING_LEVELS } from "./config-DFVlYCeY.js";
|
|
2
|
+
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-CYB9T4rm.js";
|
|
3
|
+
import { h as juniorAgentInvocations, m as juniorAgentBindings } from "./executor-HPgHGAWK.js";
|
|
4
|
+
import { p as credentialContextSchema } from "./registry-CLooHPAz.js";
|
|
5
5
|
import { S as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, x as AGENT_INVOCATION_MAILBOX_STATUSES } from "./reporting-window-B-QP9zX1.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import * as z from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { At as requestAnotherSlice$1, Dt as recordConversationRetry$1, Et as recordAttemptFailure$1, Mt as startConversationWork$1, Nt as steerWebPendingMessages$1, Ot as releaseConversationWork$1, Pt as stopConversationWork$1, Tt as markConversationWorkEnqueued$1, _t as drainConversationMailbox$1, ct as appendInboundMessage, dt as checkInConversationWork$1, ft as clearConsumedConversationWake$1, gt as deadLetterAttempt$1, ht as completeConversationWork$1, jt as requestConversationWork$1, kt as removeActiveConversation$1, lt as beginConversationResume$1, mt as completeConversationStop$1, ot as ackMessages$1, pt as clearExpiredConversationLease$1, st as appendExclusiveInboundMessage, ut as cancelHumanFacingPendingMessages$1, vt as getConversation$1, wt as listActiveConversationIds$1, yt as getConversationWorkState$1 } from "./projection-
|
|
2
|
-
import { x as getConversationStore } from "./viewer-
|
|
3
|
-
import "./background-compaction-queue-
|
|
1
|
+
import { At as requestAnotherSlice$1, Dt as recordConversationRetry$1, Et as recordAttemptFailure$1, Mt as startConversationWork$1, Nt as steerWebPendingMessages$1, Ot as releaseConversationWork$1, Pt as stopConversationWork$1, Tt as markConversationWorkEnqueued$1, _t as drainConversationMailbox$1, ct as appendInboundMessage, dt as checkInConversationWork$1, ft as clearConsumedConversationWake$1, gt as deadLetterAttempt$1, ht as completeConversationWork$1, jt as requestConversationWork$1, kt as removeActiveConversation$1, lt as beginConversationResume$1, mt as completeConversationStop$1, ot as ackMessages$1, pt as clearExpiredConversationLease$1, st as appendExclusiveInboundMessage, ut as cancelHumanFacingPendingMessages$1, vt as getConversation$1, wt as listActiveConversationIds$1, yt as getConversationWorkState$1 } from "./projection-BfKkpOGQ.js";
|
|
2
|
+
import { x as getConversationStore } from "./viewer-CYB9T4rm.js";
|
|
3
|
+
import "./background-compaction-queue-Bbsqx8Vm.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 { _ as runWithTurnRequestDeadline, f as QUEUE_SIGNATURE_MAX_AGE_MS, h as getQueueProvider, m as verifyQueueMessage, p as signQueueMessage } from "./background-compaction-queue-
|
|
1
|
+
import { h as logWarn } from "./logging-2BXvW7Mp.js";
|
|
2
|
+
import { _ as runWithTurnRequestDeadline, f as QUEUE_SIGNATURE_MAX_AGE_MS, h as getQueueProvider, m as verifyQueueMessage, p as signQueueMessage } from "./background-compaction-queue-Bbsqx8Vm.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import * as 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-CmmfddSZ.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 { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Aa as createPluginLogger, Bn as coreTaskRegistrations, Gr as createPluginState, Gt as getPiMessageRole, Ln as getPlugins, Wa as createPluginConversationEvents, Xt as instructionTextForProjection, en as isToolResultError, ga as createPluginModel, ha as createPluginEmbedder, in as stripRuntimeTurnContext, ka as createPluginModelCostRecorder, mo as createPluginCache, nn as normalizeToolNameFromResult, tn as isToolResultMessage, tt as getTurnRecord, v as hydrateConversationMessages } from "./projection-
|
|
2
|
+
import { Aa as createPluginLogger, Bn as coreTaskRegistrations, Gr as createPluginState, Gt as getPiMessageRole, Ln as getPlugins, Wa as createPluginConversationEvents, Xt as instructionTextForProjection, en as isToolResultError, ga as createPluginModel, ha as createPluginEmbedder, in as stripRuntimeTurnContext, ka as createPluginModelCostRecorder, mo as createPluginCache, nn as normalizeToolNameFromResult, tn as isToolResultMessage, tt as getTurnRecord, v as hydrateConversationMessages } from "./projection-BfKkpOGQ.js";
|
|
3
3
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
4
|
-
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
5
|
-
import {
|
|
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-CYB9T4rm.js";
|
|
5
|
+
import { v as sameActorIdentity } from "./media-Bu9C6lz0.js";
|
|
6
|
+
import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
|
|
7
|
+
import { t as resolveConversationRouting, u as getDispatchRecord } from "./turn-session-routing-CzCnNAUO.js";
|
|
8
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-0UfRMWYd.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-BE70Pb9p.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 { Rr as JUNIOR_THREAD_STATE_TTL_MS, ho as createDurableLocationConfigurationService, y as persistConversationMessages } from "./projection-
|
|
2
|
-
import { G as toOptionalNumber, K as toOptionalString, W as isRecord } from "./logging-
|
|
3
|
-
import { S as getDb } from "./viewer-
|
|
4
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { Rr as JUNIOR_THREAD_STATE_TTL_MS, ho as createDurableLocationConfigurationService, y as persistConversationMessages } from "./projection-BfKkpOGQ.js";
|
|
2
|
+
import { G as toOptionalNumber, K as toOptionalString, W as isRecord } from "./logging-2BXvW7Mp.js";
|
|
3
|
+
import { S as getDb } from "./viewer-CYB9T4rm.js";
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
|
|
5
5
|
// src/chat/state/conversation.ts
|
|
6
6
|
function defaultConversationState() {
|
|
7
7
|
return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { K as clearPendingAuth, M as markConversationMessage, lo as listConversationAnnotations, un as buildDeterministicTurnId, v as hydrateConversationMessages } from "./projection-
|
|
2
|
-
import { b as getProviderErrorUserMessage, g as ProviderError, v as findProviderError, y as getProviderErrorAttributes } from "./client-
|
|
3
|
-
import { W as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { K as clearPendingAuth, M as markConversationMessage, lo as listConversationAnnotations, un as buildDeterministicTurnId, v as hydrateConversationMessages } from "./projection-BfKkpOGQ.js";
|
|
2
|
+
import { b as getProviderErrorUserMessage, g as ProviderError, v as findProviderError, y as getProviderErrorAttributes } from "./client-a3Ib6wxr.js";
|
|
3
|
+
import { W as isRecord, t as buildTurnFailureResponse } from "./logging-2BXvW7Mp.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { S as getDb, y as getConversationEventStore } from "./viewer-
|
|
6
|
-
import { M as readMessageCardRefs, N as removedCardSchema, P as resolveMessageCards } from "./conversation-
|
|
7
|
-
import { O as parseAgentInvocationResultMessageId, Q as markTurnCompleted, Z as markTurnClosed, c as getAgentInvocation, m as getAgentInvocationTurnId } 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-CYB9T4rm.js";
|
|
6
|
+
import { M as readMessageCardRefs, N as removedCardSchema, P as resolveMessageCards } from "./conversation-DdT7SNar.js";
|
|
7
|
+
import { O as parseAgentInvocationResultMessageId, Q as markTurnCompleted, Z as markTurnClosed, c as getAgentInvocation, m as getAgentInvocationTurnId } from "./store-61mD4ZSh.js";
|
|
8
|
+
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-0UfRMWYd.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-CYB9T4rm.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,11 +1,11 @@
|
|
|
1
|
-
import { Ei as openSlackDirectMessage, Hr as getDashboardTaskLink, Rr as JUNIOR_THREAD_STATE_TTL_MS, Wr as ToolInputError, _i as escapeSlackMrkdwnText, ki as postSlackMessage, vi as formatSlackLink, w as fallbackShortTitle } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { _ as runBestEffort, h as logWarn } from "./logging-
|
|
4
|
-
import { Q as agentTurnTotalTokens, S as getDb, Z as agentTurnCostUsd } from "./viewer-
|
|
5
|
-
import { A as juniorConversations, d as juniorAutomations, l as juniorAutomationRuns, u as juniorAutomationVersions } from "./executor-
|
|
6
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-
|
|
1
|
+
import { Ei as openSlackDirectMessage, Hr as getDashboardTaskLink, Rr as JUNIOR_THREAD_STATE_TTL_MS, Wr as ToolInputError, _i as escapeSlackMrkdwnText, ki as postSlackMessage, vi as formatSlackLink, w as fallbackShortTitle } from "./projection-BfKkpOGQ.js";
|
|
2
|
+
import { n as botConfig } from "./config-DFVlYCeY.js";
|
|
3
|
+
import { _ as runBestEffort, h as logWarn } from "./logging-2BXvW7Mp.js";
|
|
4
|
+
import { Q as agentTurnTotalTokens, S as getDb, Z as agentTurnCostUsd } from "./viewer-CYB9T4rm.js";
|
|
5
|
+
import { A as juniorConversations, d as juniorAutomations, l as juniorAutomationRuns, u as juniorAutomationVersions } from "./executor-HPgHGAWK.js";
|
|
6
|
+
import { h as credentialSubjectSchema } from "./registry-CLooHPAz.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
|
|
8
|
+
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-MLWOrghe.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import * as z from "zod";
|
|
11
11
|
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-CYB9T4rm.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 { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B7NRB7eH.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.283.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-ZMC4cXWN.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
3
|
-
import { U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-
|
|
2
|
+
import { i as getChatConfig } from "./config-DFVlYCeY.js";
|
|
3
|
+
import { U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-2BXvW7Mp.js";
|
|
4
4
|
import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { A as juniorConversations, C as juniorConversationEvents, M as juniorUsers, N as juniorDestinations, T as juniorConversationAnnotations, _ as juniorConversationParticipants, b as CONVERSATION_METRICS, j as juniorIdentities, k as conversationReadColumns, t as createJuniorSqlExecutor, v as juniorConversationBindings, x as juniorConversationMetrics } from "./executor-
|
|
6
|
-
import { d as
|
|
5
|
+
import { A as juniorConversations, C as juniorConversationEvents, M as juniorUsers, N as juniorDestinations, T as juniorConversationAnnotations, _ as juniorConversationParticipants, b as CONVERSATION_METRICS, j as juniorIdentities, k as conversationReadColumns, t as createJuniorSqlExecutor, v as juniorConversationBindings, x as juniorConversationMetrics } from "./executor-HPgHGAWK.js";
|
|
6
|
+
import { d as historyReplacementSchema, f as newConversationEventSchema, p as encodeHistoryPayload, r as detectImageMediaType, s as conversationEventDataSchema, u as decodeStoredConversationEvent, y as usageSchema } from "./media-Bu9C6lz0.js";
|
|
7
7
|
import { a as withLock } from "./locks-D-0h111u.js";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
9
9
|
import { and, asc, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { $a as loadForkHistory, H as AuthorizationFlowDisabledError, Kt as getTerminalAssistantMessages, Q as abandonTurnRecord, R as PluginCredentialFailureError, Vt as isTurnExecutionLimitExceededError, Z as saveTurnCheckpoint, et as failTurnRecord, s as openConversationProjection, tt as getTurnRecord } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
4
|
-
import {
|
|
5
|
-
import { At as withoutSavedSteeringMessages, It as readBlockedReport, St as recordSubagentStarted, kt as buildSteeringPiMessage, xt as recordSubagentEnded, yt as stopChildAgentsOf } from "./agent-runner-
|
|
6
|
-
import { B as agentTypeInstructions, C as markAgentInvocationMailboxAppended, D as markAgentInvocationSteered, E as markAgentInvocationRunning, G as TurnInputCommitLostError, T as markAgentInvocationPaused, V as agentTypeStartsWithParentHistory, Y as isTurnInputCommitLostError, _ as getLatestAgentInvocationForConversation, b as listAgentInvocationsForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, i as createAgentInvocation, k as reportReplacedAgentInvocation, m as getAgentInvocationTurnId, n as NON_TERMINAL_AGENT_INVOCATION_STATUSES, q as getConversationTurnBoundaryError, r as completeAgentInvocation, s as getActiveAgentInvocationForConversation, t as ACTIVE_AGENT_INVOCATION_STATUSES, y as isTerminalAgentInvocation } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { E as maybePostAutomatedTurnLimitNotice, M as recordFinishedTurnForAutomatedLimit, N as resetAutomatedTurnLimit } 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 { $a as loadForkHistory, H as AuthorizationFlowDisabledError, Kt as getTerminalAssistantMessages, Q as abandonTurnRecord, R as PluginCredentialFailureError, Vt as isTurnExecutionLimitExceededError, Z as saveTurnCheckpoint, et as failTurnRecord, s as openConversationProjection, tt as getTurnRecord } from "./projection-BfKkpOGQ.js";
|
|
2
|
+
import { n as botConfig } from "./config-DFVlYCeY.js";
|
|
3
|
+
import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-CYB9T4rm.js";
|
|
4
|
+
import { m as agentInstructionProvenance, v as sameActorIdentity } from "./media-Bu9C6lz0.js";
|
|
5
|
+
import { At as withoutSavedSteeringMessages, It as readBlockedReport, St as recordSubagentStarted, kt as buildSteeringPiMessage, xt as recordSubagentEnded, yt as stopChildAgentsOf } from "./agent-runner-Bj7GhysW.js";
|
|
6
|
+
import { B as agentTypeInstructions, C as markAgentInvocationMailboxAppended, D as markAgentInvocationSteered, E as markAgentInvocationRunning, G as TurnInputCommitLostError, T as markAgentInvocationPaused, V as agentTypeStartsWithParentHistory, Y as isTurnInputCommitLostError, _ as getLatestAgentInvocationForConversation, b as listAgentInvocationsForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, i as createAgentInvocation, k as reportReplacedAgentInvocation, m as getAgentInvocationTurnId, n as NON_TERMINAL_AGENT_INVOCATION_STATUSES, q as getConversationTurnBoundaryError, r as completeAgentInvocation, s as getActiveAgentInvocationForConversation, t as ACTIVE_AGENT_INVOCATION_STATUSES, y as isTerminalAgentInvocation } from "./store-61mD4ZSh.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-CdYsLbXL.js";
|
|
8
|
+
import { E as maybePostAutomatedTurnLimitNotice, M as recordFinishedTurnForAutomatedLimit, N as resetAutomatedTurnLimit } from "./session-stop-D8LGC3H6.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DAJntSEv.js";
|
|
10
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-24sBZ4Ip.js";
|
|
11
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-0UfRMWYd.js";
|
|
12
12
|
import { isDeepStrictEqual } from "node:util";
|
|
13
13
|
import * as z from "zod";
|
|
14
14
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Ct as isInvalidConversationRecordError, St as isFinalAttempt, bt as hasConversationStop } from "./projection-
|
|
3
|
-
import { x 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 { g as getTurnRequestDeadline, v as ConversationQueueMessageRejectedError } from "./background-compaction-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 isInvalidConversationRecordError, St as isFinalAttempt, bt as hasConversationStop } from "./projection-BfKkpOGQ.js";
|
|
3
|
+
import { x as isProviderRetryError } from "./client-a3Ib6wxr.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-DFVlYCeY.js";
|
|
5
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-2BXvW7Mp.js";
|
|
6
|
+
import { g as getTurnRequestDeadline, v as ConversationQueueMessageRejectedError } from "./background-compaction-queue-Bbsqx8Vm.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-DAJntSEv.js";
|
|
8
8
|
// src/chat/task-execution/attempt-selection.ts
|
|
9
9
|
function selectContiguousTurnBatch(messages) {
|
|
10
10
|
const first = messages[0];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "junior_conversation_participants" ADD COLUMN "pin_position" integer;
|