@sentry/junior 0.231.0 → 0.233.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-BxL23rrY.js → agent-hooks-DATy_Hnt.js} +89 -12
- package/dist/{agent-runner-mpzfRAEr.js → agent-runner-BKOtZjez.js} +19 -18
- package/dist/api/schema.d.ts +75 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +18 -18
- package/dist/app.js +22 -22
- package/dist/{briefs-CTIZORAN.js → briefs-ClOTHmQ-.js} +4 -4
- package/dist/{catalog-runtime-RSgQS4lp.js → catalog-runtime-xFtmw3oA.js} +1 -1
- package/dist/{checkpoint-Q4FG2BQc.js → checkpoint-zkEB448J.js} +6 -6
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-Mj9HEEKf.js → client-CJUZHY9Y.js} +2 -2
- package/dist/{config-CkmcoWGB.js → config-XtycpE-i.js} +2 -2
- package/dist/{conversation-DsuDtoYR.js → conversation-CPjHYOV5.js} +13 -2
- package/dist/{conversation-privacy-DGj6F9tc.js → conversation-privacy-B30pEcsR.js} +1 -1
- package/dist/{credential-sync-CHL297BH.js → credential-sync-vufd6gwK.js} +13 -13
- package/dist/{executor-_eMyydh0.js → executor-BGDb_cM-.js} +1 -1
- package/dist/{images-D9gA15-3.js → images-zuEwjVKU.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-Dl1lTGqq.js → job-queue-C5JaRRcE.js} +1 -1
- package/dist/{logging-9VpmxvdL.js → logging-BS563NYn.js} +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-DYZeyL50.js → oauth-authorization-DF2dSmNh.js} +1 -1
- package/dist/{oauth-callback-server-BcVrxzcd.js → oauth-callback-server-CW9COQ9L.js} +2 -2
- package/dist/{pending-auth-mB93uu9V.js → pending-auth-8Kmti8S3.js} +1 -1
- package/dist/{profile-CK1KKKfj.js → profile-C4_njQYA.js} +4 -4
- package/dist/{prompt-D5RPLy92.js → prompt-3D0sSbTC.js} +1 -1
- package/dist/{registry-BzD2Rftl.js → registry-BhiLWAY6.js} +1 -1
- package/dist/{resolve-C3UI1gHN.js → resolve-ZDwJ6a3N.js} +2 -2
- package/dist/{runner-BETWa1Bq.js → runner-D1xeORYM.js} +9 -9
- package/dist/{sandbox-egress-signals-pjWtc_9b.js → sandbox-egress-signals-Dx1PzQpy.js} +1 -1
- package/dist/{schema-B-Taar1W.js → schema-DuGfOm4u.js} +1 -1
- package/dist/{skills-B5o4x78h.js → skills-CN-ye6on.js} +2 -2
- package/dist/{spawn-pwMuB53X.js → spawn-B8KYOBcU.js} +2 -2
- package/dist/{task-queue-Bb71mssX.js → task-queue-DPaZtxld.js} +3 -3
- package/dist/{task-runner-DkaEXCEP.js → task-runner-D23tSETM.js} +9 -9
- package/dist/{thread-state-HHHiwpYG.js → thread-state-BbxSiDa9.js} +5 -5
- package/dist/{turn-failure-response-CtWGQ0fz.js → turn-failure-response-c8irQDMB.js} +8 -8
- package/dist/{turn-lifecycle-Cosdai_3.js → turn-lifecycle-DSVG3u_p.js} +1 -1
- package/dist/{turn-session-routing-DDo6JGTB.js → turn-session-routing-B2hNxu_N.js} +1 -1
- package/dist/{validation-DoceK2VV.js → validation-BrLB5qbC.js} +1 -1
- package/dist/{version-wZ8kdUu1.js → version-B2rspCmP.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-C1coqBWn.js → web-authorization-CVSTvY_D.js} +6 -6
- package/dist/{web-input-clQr4P53.js → web-input-zUQoZMZw.js} +54 -61
- package/dist/{work-BW27hKZB.js → work-BXbJVOZI.js} +7 -7
- package/dist/{worker-DQ-0LzAC.js → worker-ClkQ9S9C.js} +5 -5
- package/package.json +5 -5
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-
|
|
2
|
-
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-
|
|
3
|
-
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-
|
|
4
|
-
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-
|
|
1
|
+
import { $t as recordFinishedTurnForAutomatedLimit, B as isListedScheduledAutomation, Cn as createUserTokenStore, D as renderBlockText, E as renderAttachmentText, F as resolveSlackChannelIdFromThreadId, G as readScheduledAutomation, I as listThreadReplies, K as saveScheduledAutomation, M as parseSlackThreadId, N as readSlackRawMessageContext, On as AuthorizationFlowDisabledError, P as resolveSlackChannelIdFromMessage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, Qt as maybePostAutomatedTurnLimitNotice, Tn as RetryableDeliveryError, V as listPublicScheduledAutomationsForTeams, W as parseScheduledAutomationRow, Z as eventAutomationTriggerAvailable, _n as truncateStatusText, _t as getEventCatalog, a as isExperimentalFeatureEnabled, at as listEventAutomationsCreatedBy, bn as removeReactionFromMessage, bt as appendAndEnqueueExclusiveInboundMessage, c as createContextCompactor, et as deleteEventAutomation, gn as normalizeSlackStatusText, gt as isEventMailboxMetadata, hn as normalizeSlackReplyMarkdown, ht as EVENT_WAIT_MS, it as listDeletedEventAutomationsCreatedBy, j as storeAttachment, kn as shouldEmitDevAgentTrace, mn as formatSlackLink, ot as listPublicEventAutomationsForTeams, pn as escapeSlackMrkdwnText, rt as getEventAutomation, s as executeAgentRun, t as createAgentRunner, tt as eventAutomationBelongsToUser, v as PluginCredentialFailureError, vn as addReactionToMessage, wn as buildSteeringPiMessage, xt as appendAndEnqueueInboundMessage, y as latestProgressStatus, yn as postSlackMessage } from "./agent-runner-BKOtZjez.js";
|
|
2
|
+
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-CJUZHY9Y.js";
|
|
3
|
+
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-BS563NYn.js";
|
|
4
|
+
import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, h as normalizeSlackEmojiName, l as getSlackClientSecret, n as botConfig, s as getSlackBotToken } from "./config-XtycpE-i.js";
|
|
5
5
|
import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
6
6
|
import { a as createActor, b as parseSlackMessageTs, c as isActorUserId, l as isUserActor, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-0Et9iVSB.js";
|
|
7
|
-
import { $t as getConversationStore, B as downloadPrivateSlackFile, Bt as recordSlackAttachment, G as isDmChannel, H as getHeaderString, It as buildSentryConversationUrl, K as normalizeSlackConversationId, Lt as getSlackFileId, U as getSlackClient, Zt as getConversationEventStore, _n as createSlackDestination, _t as getDashboardObjectIconLink, en as getDb, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, o as getPluginSlackConversationLink, ot as cancelSubscriptions, q as runWithSlackInstallationToken, tn as getSqlExecutor, yn as requireSlackDestination, z as SlackActionError, zt as readAttachmentVisionSummary } from "./agent-hooks-
|
|
7
|
+
import { $t as getConversationStore, B as downloadPrivateSlackFile, Bt as recordSlackAttachment, G as isDmChannel, H as getHeaderString, It as buildSentryConversationUrl, K as normalizeSlackConversationId, Lt as getSlackFileId, U as getSlackClient, Zt as getConversationEventStore, _n as createSlackDestination, _t as getDashboardObjectIconLink, en as getDb, gt as getDashboardConversationLink, ht as JUNIOR_THREAD_STATE_TTL_MS, o as getPluginSlackConversationLink, ot as cancelSubscriptions, q as runWithSlackInstallationToken, tn as getSqlExecutor, yn as requireSlackDestination, z as SlackActionError, zt as readAttachmentVisionSummary } from "./agent-hooks-DATy_Hnt.js";
|
|
8
8
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
9
|
-
import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-
|
|
10
|
-
import { N as isVisionImageMediaType, j as readMessageAttachments, nt as instructionProvenanceFor } from "./conversation-
|
|
11
|
-
import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-
|
|
14
|
-
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-
|
|
15
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
16
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
9
|
+
import { D as juniorIdentities, O as juniorUsers, o as juniorSchedulerTasks } from "./executor-BGDb_cM-.js";
|
|
10
|
+
import { N as isVisionImageMediaType, j as readMessageAttachments, nt as instructionProvenanceFor } from "./conversation-CPjHYOV5.js";
|
|
11
|
+
import { $ as fallbackShortTitle, A as commitAcceptedReply, B as recordAuthorizationCompleted, J as hydrateConversationMessages, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as resolveConversationTitle, W as recordSubscribedReplyRoute, Y as persistConversationMessages, Z as persistConversationMessageSummaries, a as completeTurnRecord, at as estimateConversationContextTokens, c as listTurnSummaries, ct as markConversationMessage, dt as turnHasReply, ft as upsertConversationMessage, i as abandonTurnRecord, it as createConversationMemoryService, j as commitMessages, l as recordTurnSummary, lt as normalizeConversationText, n as loadTurnCheckpoint, nt as appendThreadContextMessages, o as failTurnRecord, ot as getConversationMessageSlackTs, p as buildTurnErrorResponse, pt as estimateTextTokens, r as saveTurnCheckpoint, rt as buildConversationContext, s as getTurnRecord, st as isHumanConversationMessage, u as persistWithRetry, ut as recordDeliveredAssistantMessage } from "./checkpoint-zkEB448J.js";
|
|
12
|
+
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-C4_njQYA.js";
|
|
13
|
+
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-8Kmti8S3.js";
|
|
14
|
+
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-DF2dSmNh.js";
|
|
15
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-3D0sSbTC.js";
|
|
16
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-C5JaRRcE.js";
|
|
17
17
|
import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-xPI_EFSC.js";
|
|
18
|
-
import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-
|
|
19
|
-
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-
|
|
20
|
-
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
21
|
-
import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-
|
|
22
|
-
import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-
|
|
23
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
24
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
25
|
-
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-
|
|
26
|
-
import { r as storeInputImages } from "./images-
|
|
18
|
+
import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-D23tSETM.js";
|
|
19
|
+
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-BXbJVOZI.js";
|
|
20
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSVG3u_p.js";
|
|
21
|
+
import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-BbxSiDa9.js";
|
|
22
|
+
import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-CVSTvY_D.js";
|
|
23
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-B2hNxu_N.js";
|
|
24
|
+
import { t as bindSpawnAgent } from "./spawn-B8KYOBcU.js";
|
|
25
|
+
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-c8irQDMB.js";
|
|
26
|
+
import { r as storeInputImages } from "./images-zuEwjVKU.js";
|
|
27
27
|
import { z } from "zod";
|
|
28
28
|
import { createHash } from "node:crypto";
|
|
29
29
|
import { and, desc, eq, inArray, lt, notInArray, or, sql } from "drizzle-orm";
|
|
@@ -334,7 +334,6 @@ function renderSlackAutomationCard(card) {
|
|
|
334
334
|
const text = [
|
|
335
335
|
"Automation",
|
|
336
336
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
337
|
-
card.status ? escapeSlackMrkdwnText(card.status) : null,
|
|
338
337
|
escapeSlackMrkdwnText(trigger),
|
|
339
338
|
warning ? escapeSlackMrkdwnText(warning) : null
|
|
340
339
|
].filter(Boolean).join("\n");
|
|
@@ -360,28 +359,19 @@ function renderSlackAutomationCard(card) {
|
|
|
360
359
|
alt_text: "Automation"
|
|
361
360
|
} : void 0
|
|
362
361
|
},
|
|
363
|
-
custom_fields: [
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
},
|
|
377
|
-
...warning ? [{
|
|
378
|
-
key: "warning",
|
|
379
|
-
label: "Needs attention",
|
|
380
|
-
type: "string",
|
|
381
|
-
value: warning,
|
|
382
|
-
long: true
|
|
383
|
-
}] : []
|
|
384
|
-
]
|
|
362
|
+
custom_fields: [{
|
|
363
|
+
key: "trigger",
|
|
364
|
+
label: "When",
|
|
365
|
+
type: "string",
|
|
366
|
+
value: trigger,
|
|
367
|
+
long: true
|
|
368
|
+
}, ...warning ? [{
|
|
369
|
+
key: "warning",
|
|
370
|
+
label: "Needs attention",
|
|
371
|
+
type: "string",
|
|
372
|
+
value: warning,
|
|
373
|
+
long: true
|
|
374
|
+
}] : []]
|
|
385
375
|
}
|
|
386
376
|
}
|
|
387
377
|
};
|
|
@@ -393,29 +383,32 @@ function descriptionPreview(value) {
|
|
|
393
383
|
const preview = text.split("\n").slice(0, 6).join("\n").slice(0, 500);
|
|
394
384
|
return preview.length < text.length ? `${preview.slice(0, 499).trimEnd()}…` : preview;
|
|
395
385
|
}
|
|
396
|
-
/** Render
|
|
397
|
-
function renderSlackObjectCard(card, conversationId) {
|
|
386
|
+
/** Render a compact Task or Item preview, or the saved facts for its detail panel. */
|
|
387
|
+
function renderSlackObjectCard(card, conversationId, surface = "preview") {
|
|
398
388
|
if (card.objectType === "automation" && card.plugin === "junior") return renderSlackAutomationCard({
|
|
399
389
|
id: card.key,
|
|
400
390
|
title: card.title,
|
|
401
391
|
url: card.url,
|
|
402
392
|
trigger: card.trigger ?? "",
|
|
403
|
-
warning: card.warning ?? null
|
|
404
|
-
status: card.status
|
|
393
|
+
warning: card.warning ?? null
|
|
405
394
|
});
|
|
406
395
|
const presentation = objectPresentation(card);
|
|
407
396
|
const type = card.displayType ?? presentation.label;
|
|
408
397
|
const iconUrl = getDashboardObjectIconLink(presentation.icon);
|
|
409
398
|
const title = card.title.slice(0, 160);
|
|
410
|
-
const
|
|
411
|
-
const
|
|
399
|
+
const details = surface === "details";
|
|
400
|
+
const deployment = card.objectType === "deployment" || card.objectType === "item" && card.facts?.type === "deployment";
|
|
401
|
+
const status = details || deployment ? card.status : void 0;
|
|
402
|
+
const warning = details || deployment ? card.warning : void 0;
|
|
403
|
+
const facts = objectFactFields(card.facts).filter((field) => details || deployment && field.key === "environment");
|
|
404
|
+
const description = details ? card.description?.trim() ?? "" : descriptionPreview(card.description);
|
|
412
405
|
const text = [
|
|
413
406
|
escapeSlackMrkdwnText(type),
|
|
414
407
|
card.url ? formatSlackLink(card.url, title) : escapeSlackMrkdwnText(title),
|
|
415
408
|
escapeSlackMrkdwnText(card.label),
|
|
416
|
-
|
|
409
|
+
status ? escapeSlackMrkdwnText(status) : null,
|
|
417
410
|
description ? escapeSlackMrkdwnText(description) : null,
|
|
418
|
-
|
|
411
|
+
warning ? escapeSlackMrkdwnText(`Needs attention: ${warning}`) : null,
|
|
419
412
|
...facts.map((field) => escapeSlackMrkdwnText(`${field.label}: ${field.value}`))
|
|
420
413
|
].filter(Boolean).join("\n");
|
|
421
414
|
if (!card.url) return {
|
|
@@ -429,7 +422,7 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
429
422
|
display_type: type,
|
|
430
423
|
product_icon: iconUrl ? {
|
|
431
424
|
url: iconUrl,
|
|
432
|
-
alt_text: `${type}${
|
|
425
|
+
alt_text: `${type}${status ? `: ${status}` : ""}`
|
|
433
426
|
} : void 0,
|
|
434
427
|
product_name: card.plugin
|
|
435
428
|
};
|
|
@@ -446,11 +439,11 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
446
439
|
...field,
|
|
447
440
|
type: "string"
|
|
448
441
|
})),
|
|
449
|
-
...
|
|
442
|
+
...warning ? [{
|
|
450
443
|
key: "warning",
|
|
451
444
|
label: "Needs attention",
|
|
452
445
|
type: "string",
|
|
453
|
-
value:
|
|
446
|
+
value: warning
|
|
454
447
|
}] : []
|
|
455
448
|
];
|
|
456
449
|
return {
|
|
@@ -460,20 +453,20 @@ function renderSlackObjectCard(card, conversationId) {
|
|
|
460
453
|
entity_type: "slack#/entities/task",
|
|
461
454
|
entity_payload: {
|
|
462
455
|
attributes,
|
|
463
|
-
display_order: [...
|
|
464
|
-
fields:
|
|
456
|
+
display_order: [...status ? ["status"] : [], ...customFields.map((field) => field.key)],
|
|
457
|
+
fields: status ? { status: { value: status } } : void 0,
|
|
465
458
|
custom_fields: customFields
|
|
466
459
|
}
|
|
467
460
|
} : {
|
|
468
461
|
entity_type: "slack#/entities/item",
|
|
469
462
|
entity_payload: {
|
|
470
463
|
attributes,
|
|
471
|
-
display_order: [...
|
|
472
|
-
custom_fields: [...
|
|
464
|
+
display_order: [...status ? ["status"] : [], ...customFields.map((field) => field.key)],
|
|
465
|
+
custom_fields: [...status ? [{
|
|
473
466
|
key: "status",
|
|
474
467
|
label: "Status",
|
|
475
468
|
type: "string",
|
|
476
|
-
value:
|
|
469
|
+
value: status
|
|
477
470
|
}] : [], ...customFields]
|
|
478
471
|
}
|
|
479
472
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { On as AuthorizationFlowDisabledError, ct as agentInvocationSchema, dt as AgentInvocationLimitError, lt as createAgentInvocationSchema, n as runAgentWithTimeout, st as agentBindingSchema, ut as AgentInvocationBusyError, v as PluginCredentialFailureError, xt as appendAndEnqueueInboundMessage } from "./agent-runner-
|
|
3
|
-
import { $t as getConversationStore, Zt as getConversationEventStore, tn as getSqlExecutor } from "./agent-hooks-
|
|
4
|
-
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-
|
|
5
|
-
import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-
|
|
6
|
-
import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-
|
|
7
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
8
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-
|
|
2
|
+
import { On as AuthorizationFlowDisabledError, ct as agentInvocationSchema, dt as AgentInvocationLimitError, lt as createAgentInvocationSchema, n as runAgentWithTimeout, st as agentBindingSchema, ut as AgentInvocationBusyError, v as PluginCredentialFailureError, xt as appendAndEnqueueInboundMessage } from "./agent-runner-BKOtZjez.js";
|
|
3
|
+
import { $t as getConversationStore, Zt as getConversationEventStore, tn as getSqlExecutor } from "./agent-hooks-DATy_Hnt.js";
|
|
4
|
+
import { f as juniorAgentBindings, p as juniorAgentInvocations } from "./executor-BGDb_cM-.js";
|
|
5
|
+
import { I as openConversationProjection, _ as getTerminalAssistantMessages, o as failTurnRecord, r as saveTurnCheckpoint, s as getTurnRecord } from "./checkpoint-zkEB448J.js";
|
|
6
|
+
import { d as getConversationTurnBoundaryError, l as TurnInputCommitLostError, p as isTurnInputCommitLostError, r as getAssistantReplyText } from "./oauth-authorization-DF2dSmNh.js";
|
|
7
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DSVG3u_p.js";
|
|
8
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState } from "./thread-state-BbxSiDa9.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import { and, asc, count, eq, inArray } from "drizzle-orm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { At as deadLetterAttempt, Dt as completeConversationStop, Lt as recordAttemptFailure, Mt as ensureConversationWake, Ot as completeConversationWork, Pt as getConversationWorkState, Rt as recordConversationRetry, St as beginConversationResume, Tt as clearConsumedConversationWake, Ut as startConversationWork, Vt as requestAnotherSlice, Xt as isInvalidConversationRecordError, Yt as isFinalAttempt, jt as drainConversationMailbox, kt as countPendingConversationMessages, qt as hasConversationStop, wt as checkInConversationWork, yt as ackMessages, zt as releaseConversationWork } from "./agent-runner-
|
|
3
|
-
import { v as isProviderRetryError } from "./client-
|
|
4
|
-
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-
|
|
5
|
-
import { a as getChatConfig } from "./config-
|
|
6
|
-
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-
|
|
2
|
+
import { At as deadLetterAttempt, Dt as completeConversationStop, Lt as recordAttemptFailure, Mt as ensureConversationWake, Ot as completeConversationWork, Pt as getConversationWorkState, Rt as recordConversationRetry, St as beginConversationResume, Tt as clearConsumedConversationWake, Ut as startConversationWork, Vt as requestAnotherSlice, Xt as isInvalidConversationRecordError, Yt as isFinalAttempt, jt as drainConversationMailbox, kt as countPendingConversationMessages, qt as hasConversationStop, wt as checkInConversationWork, yt as ackMessages, zt as releaseConversationWork } from "./agent-runner-BKOtZjez.js";
|
|
3
|
+
import { v as isProviderRetryError } from "./client-CJUZHY9Y.js";
|
|
4
|
+
import { C as withLogContext, d as logException, f as logInfo, p as logWarn } from "./logging-BS563NYn.js";
|
|
5
|
+
import { a as getChatConfig } from "./config-XtycpE-i.js";
|
|
6
|
+
import { f as getTurnRequestDeadline, m as ConversationQueueMessageRejectedError } from "./job-queue-C5JaRRcE.js";
|
|
7
7
|
//#region src/chat/task-execution/worker.ts
|
|
8
8
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.233.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"pg": "^8.16.3",
|
|
88
88
|
"yaml": "^2.9.0",
|
|
89
89
|
"zod": "^4.5.4",
|
|
90
|
-
"@sentry/junior-plugin-api": "0.
|
|
90
|
+
"@sentry/junior-plugin-api": "0.233.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@emnapi/core": "^1.10.0",
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"typescript": "^6.0.3",
|
|
107
107
|
"vercel": "^54.4.0",
|
|
108
108
|
"vitest": "^4.1.7",
|
|
109
|
-
"@sentry/junior-
|
|
110
|
-
"@sentry/junior-
|
|
111
|
-
"@sentry/junior-
|
|
109
|
+
"@sentry/junior-memory": "0.233.0",
|
|
110
|
+
"@sentry/junior-testing": "0.0.0",
|
|
111
|
+
"@sentry/junior-github": "0.233.0"
|
|
112
112
|
},
|
|
113
113
|
"scripts": {
|
|
114
114
|
"build": "tsdown",
|