@sentry/junior 0.274.0 → 0.275.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-4qThDhgF.js → adapter-dE2BiWP_.js} +1 -1
- package/dist/{admin-c7ASvs6x.js → admin-CkPaAYuZ.js} +1 -1
- package/dist/{agent-runner-CLHM48dh.js → agent-runner-bE7aH7ew.js} +877 -217
- package/dist/api.js +22 -22
- package/dist/{app-BlmPpPoR.d.ts → app-CgkquhZ8.d.ts} +16 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +72 -28
- package/dist/{assistant-reply-2IwdFWuQ.js → assistant-reply-CjRU9Z59.js} +1 -1
- package/dist/{job-queue-Bh9sFO9t.js → background-compaction-queue-BYuOt3qK.js} +42 -3
- package/dist/{briefs-C1-NOh8m.js → briefs-6xUvmGos.js} +2 -2
- package/dist/{catalog-runtime-BnIJimKZ.js → catalog-runtime-DcJ5NHDW.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.js +3 -3
- package/dist/{client-C0ZIxoDr.js → client-gnKpkpqP.js} +2 -2
- package/dist/{config-DS-QLVSL.js → config-D0GKc9sC.js} +2 -2
- package/dist/{connections-Djb6ANAh.js → connections-DLqP5Bp1.js} +10 -10
- package/dist/{conversation-privacy-3IMUZSHC.js → conversation-privacy-BCXFshP9.js} +1 -1
- package/dist/{credential-sync-ig88EB_v.js → credential-sync-BjihXFF2.js} +13 -13
- package/dist/{executor-C2moGIHS.js → executor-j8VMt-To.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-DYRS7E8s.js → logging-CFHIO4Vs.js} +3 -2
- package/dist/{message-CicNrhCv.js → message-DH0cqFRS.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +13 -3
- package/dist/{oauth-callback-server-BXyrepfY.js → oauth-callback-server-BgU4EZsJ.js} +2 -2
- package/dist/{projection-CMRrv9Pt.js → projection-CTvLSwcm.js} +20 -10
- package/dist/{registry-D92WLl5I.js → registry-OsyWR4GO.js} +1 -1
- package/dist/{resolve-C-Dh14ps.js → resolve-DCrKjmVP.js} +3 -3
- package/dist/{result-DZ8TCQkd.js → result-Btdt5bSl.js} +8 -8
- package/dist/{runner-BBmhrQTM.js → runner-C1AwS93W.js} +10 -10
- package/dist/{sandbox-egress-signals-Cehpq6hC.js → sandbox-egress-signals-C-5i7Zxm.js} +1 -1
- package/dist/{service-account-Bapo6l0R.js → service-account-CQIW6At4.js} +3 -3
- package/dist/{service-account-Ce1465Fn.js → service-account-DZX1KlQl.js} +3 -3
- package/dist/{session-stop-CI5qJU7a.js → session-stop-DjIyORJw.js} +10 -10
- package/dist/{skills-D-d79XQ6.js → skills-BEfAAT6p.js} +2 -2
- package/dist/{spawn-C_FETz5x.js → spawn-Dgj4xxvO.js} +2 -2
- package/dist/{stop-CmwFHwiN.js → stop-DomyNvuv.js} +53 -64
- package/dist/{store-BIQYXvoV.js → store-B7Z6zIc7.js} +3 -3
- package/dist/{store-BvI3yBGS.js → store-Dp3RMEQd.js} +3 -3
- package/dist/{task-queue-BdB0pab8.js → task-queue-CVQ9cWnC.js} +3 -3
- package/dist/{task-runner-DQr2QfvJ.js → task-runner-DHBG47gS.js} +6 -6
- package/dist/{thread-state-ngCvtWNa.js → thread-state-BF8VwIxd.js} +4 -4
- package/dist/{turn-failure-response-BDT3sT2v.js → turn-failure-response-Di7TbgsF.js} +6 -6
- package/dist/{turn-lifecycle-B7O6rZEX.js → turn-lifecycle-DzXwXmLg.js} +1 -1
- package/dist/{turn-session-routing-DIeqG2pO.js → turn-session-routing-CIWhXKeT.js} +8 -8
- package/dist/{validation-D3Xik64v.js → validation-BRmwRaXc.js} +1 -1
- package/dist/{version-BoWLhNzj.js → version-DBVMsgvA.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-D25XOUHc.js → viewer-BFADRGP8.js} +3 -3
- package/dist/{work-D12-wcf4.js → work-DDaoxZAw.js} +10 -10
- package/dist/{worker-DGxfDtES.js → worker-Bub0fDtW.js} +6 -6
- package/package.json +4 -4
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as loadTurnCheckpoint, $
|
|
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 { E as withSpan, H as
|
|
1
|
+
import { $ as loadTurnCheckpoint, $n as takeReviewItem, A as buildConversationContext, Aa as conversationArchivedForEmail, Ba as buildSentryConversationUrl, D as fallbackShortTitle, Da as createPluginLogger, En as createUserTokenStore, F as markConversationMessage, Fa as conversationNotArchivedForUser, G as AuthorizationFlowDisabledError, Ga as readAttachmentVisionSummary, Gi as SlackActionError, Ha as notInheritedByForkChild, Ht as buildTurnErrorResponse, I as normalizeConversationText, Ia as viewerConversationMembership, Ji as getHeaderString, Jn as getReviewItem, Ka as recordSlackAttachment, Ki as downloadPrivateSlackFile, Kt as persistWithRetry, L as recordDeliveredAssistantMessage, Ln as getPlugins, M as estimateConversationContextTokens, Ma as conversationHasParticipantUser, N as getConversationMessageSlackTs, Na as conversationIsMemberRoot, Oa as readConversationAccessFromSql, Oi as cancelSubscriptions, P as isHumanConversationMessage, Pa as conversationNotArchivedForEmail, Qi as normalizeSlackConversationId, R as turnHasReply, Ra as readLatestConversationBrief, S as persistConversationMessages, T as resolveConversationTitle, Ua as getSlackFileId, Ur as truncateStatusText, V as PluginCredentialFailureError, Vr as normalizeSlackStatusText, Wi as verifyTimerWatchCredentialSubject, Wn as closeReviewItem, Wr as addReactionToMessage, Xa as listConversationAnnotations, Xn as listReplyActionItems, Y as clearPendingAuth, Yi as getSlackClient, Z as wasPendingAuthStopped, Za as listConversationAnnotationsById, Zi as isDmChannel, Zr as removeReactionFromMessage, _ as recordSubscribedReplyRoute, _n as getThreadStopDecision, ao as piMessageFromHistoryItem, ar as isOnlyAssignee, at as listTurnSummaries, cn as trimTrailingAssistantMessages, ea as withSlackRetries, eo as lookupSlackUser, et as saveTurnCheckpoint, fn as buildDeterministicAssistantMessageId, gn as getSubscribedReplyPreflightDecision, hn as decideSubscribedThreadReply, i as loadConversationProjection, ia as JUNIOR_THREAD_STATE_TTL_MS, ir as canReadReviewItem, it as getTurnRecord, j as createConversationMemoryService, ja as conversationArchivedForUser, k as appendThreadContextMessages, ka as conversationArchiveTimes, lr as reviewItemReaderForUser, n as commitMessages, nr as canActOnReviewItem, nt as completeTurnRecord, o as loadProjection, ot as recordTurnSummary, p as recordAuthorizationCompleted, pn as buildDeterministicTurnId, ro as configValueSchema, rt as failTurnRecord, s as loadTurnProjection, t as commitAcceptedReply, to as createPluginCache, tt as abandonTurnRecord, w as persistConversationMessageSummaries, wn as isExperimentalFeatureEnabled, x as hydrateConversationMessages, z as upsertConversationMessage, za as readConversationEventPage } from "./projection-CTvLSwcm.js";
|
|
2
|
+
import { a as completeText, b as isProviderRetryError, c as resolveGatewayModel, m as escapeXml, r as completeDecision } from "./client-gnKpkpqP.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-D0GKc9sC.js";
|
|
4
|
+
import { E as withSpan, H as isRecord, S as setTags, T as withLogContext, U as toOptionalNumber, W as toOptionalString, 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-CFHIO4Vs.js";
|
|
5
5
|
import { i as getActiveSpan, r as continueTrace } from "./sentry-MDkYAVPV.js";
|
|
6
|
-
import { i as defaultModelId
|
|
6
|
+
import { i as defaultModelId } 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-BFADRGP8.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-DstkkoNP.js";
|
|
12
|
-
import { d as actorLogContext, f as credentialContextForActor } from "./registry-
|
|
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,
|
|
10
|
+
import { C as juniorCodeChanges, _ as juniorConversationBriefs, b as juniorConversationEvents, h as juniorConversationParticipants, m as juniorConversationReadPositions } from "./executor-j8VMt-To.js";
|
|
11
|
+
import { g as instructionProvenanceFor, m as contextProvenance, n as detectImageMediaType, r as isVisionImageMediaType } from "./media-DstkkoNP.js";
|
|
12
|
+
import { d as actorLogContext, f as credentialContextForActor } from "./registry-OsyWR4GO.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, rt as deliverReviewItemChange, t as createAgentRunner, ut as recordWebConversationActivity, wt as conversationSubtree, x as renderBlockText, z as resolveDestinationVisibility } from "./agent-runner-bE7aH7ew.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-
|
|
15
|
+
import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
|
|
16
16
|
import { G as readMessageAttachments, d as conversationDetailReportSchema, g as conversationFeedSchema } from "./conversation-BjTo9ZFL.js";
|
|
17
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-
|
|
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-
|
|
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-B7Z6zIc7.js";
|
|
19
|
+
import { n as getAssistantReplyText } from "./assistant-reply-CjRU9Z59.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-DjIyORJw.js";
|
|
21
21
|
import { _ as isEmptyUserInputAnswer, v as normalizeUserInputAnswer } from "./reporting-window-DgHgwQB3.js";
|
|
22
|
-
import {
|
|
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 { g as getTurnRequestDeadline, l as getVercelConversationWorkQueue } from "./background-compaction-queue-BYuOt3qK.js";
|
|
23
|
+
import { D as stopConversationWork, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, w as requestConversationWork } from "./store-Dp3RMEQd.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-CIWhXKeT.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-Btdt5bSl.js";
|
|
27
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-DzXwXmLg.js";
|
|
28
|
+
import { a as AgentRunError, o as executeTurn } from "./work-DDaoxZAw.js";
|
|
29
|
+
import { a as persistThreadStateById, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState, t as getLocationConfigurationService } from "./thread-state-BF8VwIxd.js";
|
|
30
|
+
import { c as deleteWebAuthorization, d as createPausedTurns, f as getPausedTurnRequest, h as getTurnAuthorization, m as wakePausedTurn, s as createWebAuthorization } from "./connections-DLqP5Bp1.js";
|
|
31
|
+
import { t as bindMessageAgent } from "./message-DH0cqFRS.js";
|
|
32
|
+
import { t as bindSpawnAgent } from "./spawn-Dgj4xxvO.js";
|
|
33
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DHBG47gS.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-Di7TbgsF.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";
|
|
@@ -2463,6 +2463,18 @@ function countPotentialImageAttachments(attachments) {
|
|
|
2463
2463
|
function isVisionEnabled() {
|
|
2464
2464
|
return Boolean(botConfig.visionModelId);
|
|
2465
2465
|
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Report whether every profile model accepts image input. The router picks the
|
|
2468
|
+
* profile after attachments resolve, so native images need every profile to
|
|
2469
|
+
* read them.
|
|
2470
|
+
*/
|
|
2471
|
+
function profileModelsAcceptImages() {
|
|
2472
|
+
return Object.values(botConfig.profiles).every((profile) => resolveGatewayModel(profile.modelId).input.includes("image"));
|
|
2473
|
+
}
|
|
2474
|
+
/** Report whether the agent can read current-message images by any path. */
|
|
2475
|
+
function canReadImages() {
|
|
2476
|
+
return isVisionEnabled() || profileModelsAcceptImages();
|
|
2477
|
+
}
|
|
2466
2478
|
var ImageAttachmentProcessingError = class extends Error {
|
|
2467
2479
|
constructor(message) {
|
|
2468
2480
|
super(message);
|
|
@@ -2630,6 +2642,14 @@ async function resolveUserAttachmentsWithDeps(attachments, context, deps) {
|
|
|
2630
2642
|
}
|
|
2631
2643
|
continue;
|
|
2632
2644
|
}
|
|
2645
|
+
const nativeImageMediaType = isImageAttachment && profileModelsAcceptImages() ? detectImageMediaType(data) : void 0;
|
|
2646
|
+
if (nativeImageMediaType) {
|
|
2647
|
+
nextCachedImageSummaryIndex += 1;
|
|
2648
|
+
resolvedAttachment.mediaType = nativeImageMediaType;
|
|
2649
|
+
resolvedAttachment.data = data;
|
|
2650
|
+
results.push(resolvedAttachment);
|
|
2651
|
+
continue;
|
|
2652
|
+
}
|
|
2633
2653
|
if (isImageAttachment && isVisionEnabled()) {
|
|
2634
2654
|
const cachedSummary = (attachmentId ? await readAttachmentVisionSummary({
|
|
2635
2655
|
attachmentId,
|
|
@@ -3094,10 +3114,6 @@ function createSubscribedReplyPolicy(deps) {
|
|
|
3094
3114
|
// src/chat/app/services.ts
|
|
3095
3115
|
function createJuniorRuntimeServices(overrides = {}) {
|
|
3096
3116
|
const conversationMemory = createConversationMemoryService({ completeText: overrides.conversationMemory?.completeText ?? completeText });
|
|
3097
|
-
const contextCompactor = createContextCompactor({
|
|
3098
|
-
completeText: overrides.contextCompactor?.completeText ?? completeText,
|
|
3099
|
-
autoCompactionTriggerTokens: overrides.contextCompactor?.autoCompactionTriggerTokens
|
|
3100
|
-
});
|
|
3101
3117
|
const visionContext = createVisionContextService({
|
|
3102
3118
|
attachmentStorage: overrides.visionContext?.attachmentStorage,
|
|
3103
3119
|
completeText: overrides.visionContext?.completeText ?? completeText,
|
|
@@ -3111,7 +3127,6 @@ function createJuniorRuntimeServices(overrides = {}) {
|
|
|
3111
3127
|
});
|
|
3112
3128
|
return {
|
|
3113
3129
|
conversationMemory,
|
|
3114
|
-
contextCompactor,
|
|
3115
3130
|
executeTurn: async (run, saveResult) => await executeTurn(agentRunner, run, saveResult),
|
|
3116
3131
|
subscribedReplyPolicy: createSubscribedReplyPolicy({ completeDecision: overrides.subscribedReplyPolicy?.completeDecision ?? completeDecision }),
|
|
3117
3132
|
visionContext
|
|
@@ -3637,7 +3652,8 @@ async function persistThreadRuntimeStateWithRetry(conversationId, patch) {
|
|
|
3637
3652
|
}
|
|
3638
3653
|
/**
|
|
3639
3654
|
* Resolve the Pi history for this Slack turn from the most precise durable
|
|
3640
|
-
* boundary available: active turn record first, then
|
|
3655
|
+
* boundary available: active turn record first, then the projection. The
|
|
3656
|
+
* agent compacts it before its first model request.
|
|
3641
3657
|
* Both are SQL-backed; there is no thread-state fallback.
|
|
3642
3658
|
*/
|
|
3643
3659
|
async function loadPiMessagesForTurn(args) {
|
|
@@ -3647,11 +3663,7 @@ async function loadPiMessagesForTurn(args) {
|
|
|
3647
3663
|
if (sessionRecord?.piMessages.length) return { piMessages: trimTrailingAssistantMessages(sessionRecord.piMessages) };
|
|
3648
3664
|
}
|
|
3649
3665
|
const projection = await loadConversationProjection({ conversationId: args.conversationId });
|
|
3650
|
-
if (projection.messages.length > 0) return {
|
|
3651
|
-
canCompact: true,
|
|
3652
|
-
modelProfile: projection.modelProfile,
|
|
3653
|
-
piMessages: projection.messages
|
|
3654
|
-
};
|
|
3666
|
+
if (projection.messages.length > 0) return { piMessages: projection.messages };
|
|
3655
3667
|
return {};
|
|
3656
3668
|
}
|
|
3657
3669
|
/** Build the Slack caller that prepares input and delivers output for a Turn. */
|
|
@@ -3790,7 +3802,7 @@ function createSlackTurn(deps) {
|
|
|
3790
3802
|
provenance: inboundMessageProvenance(queued, teamId),
|
|
3791
3803
|
text: queued.userText,
|
|
3792
3804
|
timestampMs: queued.message.metadata.dateSent.getTime(),
|
|
3793
|
-
omittedImageAttachmentCount: !
|
|
3805
|
+
omittedImageAttachmentCount: !canReadImages() && hasPotentialImageAttachment(attachments) ? countPotentialImageAttachments(attachments) : 0,
|
|
3794
3806
|
attachments: await deps.resolveUserAttachments(attachments, {
|
|
3795
3807
|
conversationId,
|
|
3796
3808
|
threadId,
|
|
@@ -3969,13 +3981,12 @@ function createSlackTurn(deps) {
|
|
|
3969
3981
|
conversation: preparedState.conversation,
|
|
3970
3982
|
messageTs: slackMessageTs
|
|
3971
3983
|
});
|
|
3972
|
-
const omittedImageAttachmentCount = !
|
|
3984
|
+
const omittedImageAttachmentCount = !canReadImages() && hasPotentialImageAttachment(turnAttachments) ? countPotentialImageAttachments(turnAttachments) : 0;
|
|
3973
3985
|
const status = createSlackAdapterAssistantStatusSession({
|
|
3974
3986
|
channelId: assistantThreadContext?.channelId,
|
|
3975
3987
|
threadTs: assistantThreadContext?.threadTs,
|
|
3976
3988
|
getSlackAdapter: deps.getSlackAdapter
|
|
3977
3989
|
});
|
|
3978
|
-
const compactingStatus = { text: "Compacting context" };
|
|
3979
3990
|
let persistedAtLeastOnce = false;
|
|
3980
3991
|
let shouldPersistFailureState = true;
|
|
3981
3992
|
let runResultHandled = false;
|
|
@@ -4114,31 +4125,10 @@ function createSlackTurn(deps) {
|
|
|
4114
4125
|
boundaryFailureCode = "agent_run_failed";
|
|
4115
4126
|
};
|
|
4116
4127
|
try {
|
|
4117
|
-
|
|
4128
|
+
let piMessages = (await loadPiMessagesForTurn({
|
|
4118
4129
|
conversationId,
|
|
4119
4130
|
activeTurnId
|
|
4120
|
-
});
|
|
4121
|
-
let piMessages = loadedPiMessages.piMessages;
|
|
4122
|
-
if (conversationId && loadedPiMessages.canCompact && piMessages?.length) {
|
|
4123
|
-
const compaction = await deps.contextCompactor.maybeCompact({
|
|
4124
|
-
conversation: preparedState.conversation,
|
|
4125
|
-
conversationContext: preparedState.conversationContext,
|
|
4126
|
-
conversationId,
|
|
4127
|
-
metadata: {
|
|
4128
|
-
threadId,
|
|
4129
|
-
actorId: slackActorId,
|
|
4130
|
-
channelId,
|
|
4131
|
-
runId
|
|
4132
|
-
},
|
|
4133
|
-
onCompactionStart: () => status.update(compactingStatus),
|
|
4134
|
-
piMessages,
|
|
4135
|
-
modelId: modelIdForProfile(botConfig, boundProfile(botConfig, loadedPiMessages.modelProfile ?? botConfig.defaultProfile))
|
|
4136
|
-
});
|
|
4137
|
-
if (compaction.compacted) {
|
|
4138
|
-
piMessages = compaction.piMessages;
|
|
4139
|
-
await persistThreadStateById(conversationId, { conversation: preparedState.conversation });
|
|
4140
|
-
}
|
|
4141
|
-
}
|
|
4131
|
+
})).piMessages;
|
|
4142
4132
|
const hasDurablePromptHistory = Boolean(piMessages?.length);
|
|
4143
4133
|
const batchedSteeringMessages = (await resolveSteeringMessages((options.queuedMessages ?? []).filter((queued) => queued.explicitMention))).map((steering) => ({
|
|
4144
4134
|
message: buildSteeringPiMessage(steering),
|
|
@@ -4841,7 +4831,6 @@ function createSlackRuntime(options) {
|
|
|
4841
4831
|
}
|
|
4842
4832
|
});
|
|
4843
4833
|
const executeSlackTurn = createSlackTurn({
|
|
4844
|
-
contextCompactor: services.contextCompactor,
|
|
4845
4834
|
executeTurn: services.executeTurn,
|
|
4846
4835
|
getSlackAdapter: options.getSlackAdapter,
|
|
4847
4836
|
pausedTurns: options.pausedTurns ?? createPausedTurns(),
|
|
@@ -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-BFADRGP8.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-j8VMt-To.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-OsyWR4GO.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 "./
|
|
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-CTvLSwcm.js";
|
|
2
|
+
import { x as getConversationStore } from "./viewer-BFADRGP8.js";
|
|
3
|
+
import "./background-compaction-queue-BYuOt3qK.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 {
|
|
1
|
+
import { h as logWarn } from "./logging-CFHIO4Vs.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-BYuOt3qK.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-DHBG47gS.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 {
|
|
2
|
+
import { $t as instructionTextForProjection, Bn as coreTaskRegistrations, Da as createPluginLogger, Ea as createPluginModel, Jt as getPiMessageRole, La as createPluginConversationEvents, Ln as getPlugins, Ta as createPluginEmbedder, an as normalizeToolNameFromResult, in as isToolResultMessage, it as getTurnRecord, rn as isToolResultError, sn as stripRuntimeTurnContext, to as createPluginCache, wa as createPluginState, x as hydrateConversationMessages } from "./projection-CTvLSwcm.js";
|
|
3
3
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
4
|
-
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
4
|
+
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-BFADRGP8.js";
|
|
5
5
|
import { _ as sameActorIdentity } from "./media-DstkkoNP.js";
|
|
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-
|
|
6
|
+
import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
|
|
7
|
+
import { t as resolveConversationRouting, u as getDispatchRecord } from "./turn-session-routing-CIWhXKeT.js";
|
|
8
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BF8VwIxd.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-CVQ9cWnC.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 {
|
|
2
|
-
import { H as
|
|
3
|
-
import { S as getDb } from "./viewer-
|
|
4
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { S as persistConversationMessages, ia as JUNIOR_THREAD_STATE_TTL_MS, no as createDurableLocationConfigurationService } from "./projection-CTvLSwcm.js";
|
|
2
|
+
import { H as isRecord, U as toOptionalNumber, W as toOptionalString } from "./logging-CFHIO4Vs.js";
|
|
3
|
+
import { S as getDb } from "./viewer-BFADRGP8.js";
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
|
|
5
5
|
// src/chat/state/conversation.ts
|
|
6
6
|
function defaultConversationState() {
|
|
7
7
|
return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as markConversationMessage,
|
|
2
|
-
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-
|
|
3
|
-
import {
|
|
1
|
+
import { F as markConversationMessage, Xa as listConversationAnnotations, Y as clearPendingAuth, pn as buildDeterministicTurnId, x as hydrateConversationMessages } from "./projection-CTvLSwcm.js";
|
|
2
|
+
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-gnKpkpqP.js";
|
|
3
|
+
import { H as isRecord, t as buildTurnFailureResponse } from "./logging-CFHIO4Vs.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
5
|
-
import { S as getDb, y as getConversationEventStore } from "./viewer-
|
|
5
|
+
import { S as getDb, y as getConversationEventStore } from "./viewer-BFADRGP8.js";
|
|
6
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-
|
|
8
|
-
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
7
|
+
import { D as parseAgentInvocationResultMessageId, X as markTurnClosed, Z as markTurnCompleted, p as getAgentInvocationTurnId, s as getAgentInvocation } from "./store-B7Z6zIc7.js";
|
|
8
|
+
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BF8VwIxd.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-BFADRGP8.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 { D as fallbackShortTitle,
|
|
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, Rr as escapeSlackMrkdwnText, Xr as postSlackMessage, ca as getDashboardTaskLink, ia as JUNIOR_THREAD_STATE_TTL_MS, qr as openSlackDirectMessage, ua as ToolInputError, zr as formatSlackLink } from "./projection-CTvLSwcm.js";
|
|
2
|
+
import { n as botConfig } from "./config-D0GKc9sC.js";
|
|
3
|
+
import { _ as runBestEffort, h as logWarn } from "./logging-CFHIO4Vs.js";
|
|
4
|
+
import { G as agentTurnCostUsd, K as agentTurnTotalTokens, S as getDb } from "./viewer-BFADRGP8.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-
|
|
6
|
+
import { d as juniorAutomations, l as juniorAutomationRuns, u as juniorAutomationVersions } from "./executor-j8VMt-To.js";
|
|
7
|
+
import { h as credentialSubjectSchema } from "./registry-OsyWR4GO.js";
|
|
8
|
+
import { r as getStateAdapter } from "./adapter-dE2BiWP_.js";
|
|
9
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";
|
|
@@ -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-BFADRGP8.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-DcJ5NHDW.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.275.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-DBVMsgvA.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
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-D0GKc9sC.js";
|
|
3
|
+
import { V as normalizeIdentityEmail, h as logWarn, z as GOOGLE_IDENTITY_PROVIDER } from "./logging-CFHIO4Vs.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-
|
|
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-j8VMt-To.js";
|
|
7
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";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as AuthorizationFlowDisabledError,
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { G as AuthorizationFlowDisabledError, V as PluginCredentialFailureError, Va as loadForkHistory, Wt as isTurnExecutionLimitExceededError, Yt as getTerminalAssistantMessages, et as saveTurnCheckpoint, it as getTurnRecord, l as openConversationProjection, rt as failTurnRecord, tt as abandonTurnRecord } from "./projection-CTvLSwcm.js";
|
|
2
|
+
import { n as botConfig } from "./config-D0GKc9sC.js";
|
|
3
|
+
import { M as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-BFADRGP8.js";
|
|
4
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-
|
|
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-
|
|
5
|
+
import { Ft as readBlockedReport, Ot as buildSteeringPiMessage, bt as recordSubagentEnded, kt as withoutSavedSteeringMessages, vt as stopChildAgentsOf, xt as recordSubagentStarted } from "./agent-runner-bE7aH7ew.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-B7Z6zIc7.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-CjRU9Z59.js";
|
|
8
|
+
import { A as recordFinishedTurnForAutomatedLimit, j as resetAutomatedTurnLimit, w as maybePostAutomatedTurnLimitNotice } from "./session-stop-DjIyORJw.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dp3RMEQd.js";
|
|
10
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DzXwXmLg.js";
|
|
11
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-BF8VwIxd.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 {
|
|
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-CTvLSwcm.js";
|
|
3
|
+
import { b as isProviderRetryError } from "./client-gnKpkpqP.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-D0GKc9sC.js";
|
|
5
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-CFHIO4Vs.js";
|
|
6
|
+
import { g as getTurnRequestDeadline, v as ConversationQueueMessageRejectedError } from "./background-compaction-queue-BYuOt3qK.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-Dp3RMEQd.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.275.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.275.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.275.0",
|
|
130
130
|
"@sentry/junior-testing": "0.0.0",
|
|
131
|
-
"@sentry/junior-memory": "0.
|
|
131
|
+
"@sentry/junior-memory": "0.275.0"
|
|
132
132
|
},
|
|
133
133
|
"scripts": {
|
|
134
134
|
"build": "tsdown",
|