@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.
Files changed (71) hide show
  1. package/dist/{adapter-BAqo7eOH.js → adapter-D8-lqOBF.js} +1 -1
  2. package/dist/{admin-DbWpMHh6.js → admin-Dnw5SCXp.js} +1 -1
  3. package/dist/{agent-runner-h4CDcnDV.js → agent-runner-Bj7GhysW.js} +49 -23
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -6
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +94 -59
  8. package/dist/{app-B-0wwAxr.d.ts → app-CMBP-N43.d.ts} +2 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +30 -30
  11. package/dist/{assistant-reply-4Wvo95-N.js → assistant-reply-CdYsLbXL.js} +1 -1
  12. package/dist/{automation-sIsmIXH7.js → automation-MLWOrghe.js} +1 -1
  13. package/dist/{background-compaction-queue-CoWqScCC.js → background-compaction-queue-Bbsqx8Vm.js} +2 -2
  14. package/dist/{briefs-CMiotFo9.js → briefs-C4qBY-jb.js} +4 -4
  15. package/dist/{catalog-runtime-Cpje_Uic.js → catalog-runtime-B7NRB7eH.js} +1 -1
  16. package/dist/cli/chat.js +14 -14
  17. package/dist/cli/check.js +3 -3
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-BHgCXeaF.js → client-a3Ib6wxr.js} +2 -2
  24. package/dist/{config-DBdBimZ9.js → config-DFVlYCeY.js} +97 -4
  25. package/dist/{connections-DjY72_uF.js → connections-BtnvpBEV.js} +10 -10
  26. package/dist/{conversation-DNtcULyX.js → conversation-DdT7SNar.js} +3 -1
  27. package/dist/{conversation-pending-messages-LlFnr9-m.js → conversation-pending-messages-Dct5pheX.js} +1 -1
  28. package/dist/{conversation-privacy-DiDh9KE4.js → conversation-privacy-DLq-abjU.js} +1 -1
  29. package/dist/{credential-sync-DUrQwccr.js → credential-sync-B4XFVcjM.js} +13 -13
  30. package/dist/{db-hQsoB16L.d.ts → db-A_WrTY-s.d.ts} +1 -1
  31. package/dist/{executor-CGqJCxgR.js → executor-HPgHGAWK.js} +8 -2
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-DapIaJAi.js → logging-2BXvW7Mp.js} +1 -1
  34. package/dist/{media-Dq9_svfQ.js → media-Bu9C6lz0.js} +3 -1
  35. package/dist/{message-BjN5sKad.js → message-BG1v1lXX.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +3 -3
  38. package/dist/{oauth-callback-server-DVHKrjJP.js → oauth-callback-server-CXNZJymo.js} +2 -2
  39. package/dist/{projection-ii_OYu6z.js → projection-BfKkpOGQ.js} +23 -14
  40. package/dist/{prompt-DI6KCtwb.js → prompt-CCtaGgbI.js} +1 -1
  41. package/dist/{registry-DpjG3yS-.js → registry-CLooHPAz.js} +1 -1
  42. package/dist/{resolve-iMW9Dgo2.js → resolve-D3MK9oRJ.js} +3 -3
  43. package/dist/{result-BrlvfyIj.js → result-BPCjUefO.js} +9 -9
  44. package/dist/{runner-Bg9mr2pB.js → runner-Ds31u3rB.js} +11 -11
  45. package/dist/{sandbox-egress-signals-Bd3lb_Wd.js → sandbox-egress-signals-CLd5RPUw.js} +1 -1
  46. package/dist/{schema-BN34Jy-U.js → schema-CHNP0GfH.js} +11 -4
  47. package/dist/{schema-CsqJzkP5.d.ts → schema-jW3ccLjp.d.ts} +22 -1
  48. package/dist/{service-account-Bd1348kw.js → service-account-CWpTsoIM.js} +3 -3
  49. package/dist/{service-account-Dfl9Pitm.js → service-account-D6AMahy7.js} +3 -3
  50. package/dist/{session-stop-CVEEx_YD.js → session-stop-D8LGC3H6.js} +12 -12
  51. package/dist/{skills-DqUUuf4L.js → skills-DuOKByQH.js} +2 -2
  52. package/dist/{spawn-e7rQs14T.js → spawn-CNIQGgAS.js} +2 -2
  53. package/dist/{stop-DtpBUUJq.js → stop-DX2oOIgl.js} +51 -110
  54. package/dist/{store-nETG4KVg.js → store-61mD4ZSh.js} +4 -4
  55. package/dist/{store-nu3Xx08K.js → store-DAJntSEv.js} +3 -3
  56. package/dist/{task-queue-CYje8WKs.js → task-queue-BE70Pb9p.js} +3 -3
  57. package/dist/{task-runner-CwegN45x.js → task-runner-CmmfddSZ.js} +7 -7
  58. package/dist/{thread-state-BDaMl9yd.js → thread-state-0UfRMWYd.js} +4 -4
  59. package/dist/{turn-failure-response-CV06tN_R.js → turn-failure-response-DKdzxJHE.js} +7 -7
  60. package/dist/{turn-lifecycle-CF2N7ud5.js → turn-lifecycle-24sBZ4Ip.js} +1 -1
  61. package/dist/{turn-session-routing-BIJGJjVh.js → turn-session-routing-CzCnNAUO.js} +9 -9
  62. package/dist/{validation-DXvxEEjq.js → validation-Cs_knhR8.js} +1 -1
  63. package/dist/{version-CzEk1KBX.js → version-ZMC4cXWN.js} +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/{viewer-C2PztlYX.js → viewer-CYB9T4rm.js} +4 -4
  66. package/dist/{work-BM_L0Pv9.js → work-J1n6RQkY.js} +11 -11
  67. package/dist/{worker-2no53G60.js → worker-s1fCvj1z.js} +6 -6
  68. package/migrations/0081_conversation_pin_position.sql +1 -0
  69. package/migrations/meta/0081_snapshot.json +4271 -0
  70. package/migrations/meta/_journal.json +7 -0
  71. package/package.json +5 -5
package/dist/app.js CHANGED
@@ -1,41 +1,41 @@
1
1
  import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
2
- import { Aa as createPluginLogger, Ar as takeDueTimerWatches, C as settleConversationTitleWork, Cn as setExperimentalFeatures, Co as setConfigDefaults, Cr as collectEventMatchKeys, Ct as isInvalidConversationRecordError, Di as openSlackModal, Dr as findMatchingWatches, Fr as verifyScheduledAutomationCredentialSubject, Gi as getWorkspaceTeamId, Gr as createPluginState, Hn as setBriefsConfig, Hr as getDashboardTaskLink, Ir as verifySlackDirectCredentialSubject, Ja as readConversationEventPageAfter, Ki as runWithWorkspaceTeamId, Kn as dismissOpenReviewItems, Ln as getPlugins, Mn as getPluginRoutes, Mr as bindScheduledAutomationCredentialSubject, Na as readConversationAccessFromSql, Ni as slackEntitySchema, Nr as bindSlackDirectCredentialSubject, Oi as postSlackEphemeralMessage, Pi as slackExternalRefIdSchema, Pr as verifyEventAutomationCredentialSubject, Qn as searchReviewItems, Rn as setPlugins, Sn as isExperimentalFeatureEnabled, So as getConfigDefaults, Ur as setDashboardConversationLinkOptions, Vi as isDmChannel, Vr as getDashboardReviewItemLink, Xa as readConversationLastEventSeq, Za as readConversationMessageEventSeq, _ as appendConversationMessages, aa as parseSandboxEgressCredentialToken, at as CONVERSATION_WORK_STALE_ENQUEUE_MS, b as projectConversationMessages, di as proxyVercelSandboxEgressRequest, dn as SubscribedReplyReason, ha as createPluginEmbedder, hi as resolveBaseUrl, jn as getPluginApiRoutes, jr as bindEventAutomationCredentialSubject, la as normalizeSandboxEgressTracePropagationDomains, lo as listConversationAnnotations, mn as getThreadStopDecision, mo as createPluginCache, na as consumeSandboxEgressAuthRequiredSignal, nr as canActOnReviewItem, oo as resolveRootVisibility, qa as readConversationEventPage, ra as consumeSandboxEgressPermissionDeniedSignal, ta as clearSandboxEgressSignals, ui as isVercelSandboxEgressRequest, ur as reviewItemReaderForUser, wn as createUserTokenStore, xi as slackMention, xn as getExperimentalFeatures, xt as hasRunnableConversationWork, zi as getSlackClient, zn as validatePlugins, zr as getDashboardConversationLink } from "./projection-ii_OYu6z.js";
3
- import { d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig } from "./config-DBdBimZ9.js";
4
- import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-DapIaJAi.js";
5
- import { t as JUNIOR_VERSION } from "./version-CzEk1KBX.js";
2
+ import { Aa as createPluginLogger, Ar as takeDueTimerWatches, C as settleConversationTitleWork, Cn as setExperimentalFeatures, Co as setConfigDefaults, Cr as collectEventMatchKeys, Ct as isInvalidConversationRecordError, Di as openSlackModal, Dr as findMatchingWatches, Fr as verifyScheduledAutomationCredentialSubject, Gi as getWorkspaceTeamId, Gr as createPluginState, Hn as setBriefsConfig, Hr as getDashboardTaskLink, Ir as verifySlackDirectCredentialSubject, Ja as readConversationEventPageAfter, Ki as runWithWorkspaceTeamId, Kn as dismissOpenReviewItems, Ln as getPlugins, Mn as getPluginRoutes, Mr as bindScheduledAutomationCredentialSubject, Na as readConversationAccessFromSql, Ni as slackEntitySchema, Nr as bindSlackDirectCredentialSubject, Oi as postSlackEphemeralMessage, Pi as slackExternalRefIdSchema, Pr as verifyEventAutomationCredentialSubject, Qn as searchReviewItems, Rn as setPlugins, Sn as isExperimentalFeatureEnabled, So as getConfigDefaults, Ur as setDashboardConversationLinkOptions, Vi as isDmChannel, Vr as getDashboardReviewItemLink, Xa as readConversationLastEventSeq, Za as readConversationMessageEventSeq, _ as appendConversationMessages, aa as parseSandboxEgressCredentialToken, at as CONVERSATION_WORK_STALE_ENQUEUE_MS, b as projectConversationMessages, di as proxyVercelSandboxEgressRequest, dn as SubscribedReplyReason, ha as createPluginEmbedder, hi as resolveBaseUrl, jn as getPluginApiRoutes, jr as bindEventAutomationCredentialSubject, la as normalizeSandboxEgressTracePropagationDomains, lo as listConversationAnnotations, mn as getThreadStopDecision, mo as createPluginCache, na as consumeSandboxEgressAuthRequiredSignal, nr as canActOnReviewItem, oo as resolveRootVisibility, qa as readConversationEventPage, ra as consumeSandboxEgressPermissionDeniedSignal, ta as clearSandboxEgressSignals, ui as isVercelSandboxEgressRequest, ur as reviewItemReaderForUser, wn as createUserTokenStore, xi as slackMention, xn as getExperimentalFeatures, xt as hasRunnableConversationWork, zi as getSlackClient, zn as validatePlugins, zr as getDashboardConversationLink } from "./projection-BfKkpOGQ.js";
3
+ import { d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig, y as getAttachmentStorage } from "./config-DFVlYCeY.js";
4
+ import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-2BXvW7Mp.js";
5
+ import { t as JUNIOR_VERSION } from "./version-ZMC4cXWN.js";
6
6
  import { _ as slackMessageTsSchema, f as parseSlackTeamId, g as slackMessageTsFromMs, h as parseSlackMessageTs, m as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-6jsm_v96.js";
7
- import { C as getSqlExecutor, H as recordGoogleSignIn, I as resolveActorIdentityId, M as withConversationMutationLock, S as getDb, Y as touchConversationDetail, _ as closeDb, g as createCache, i as readActorIdentity, k as withConversationEventLock, l as resolveViewerUser, p as parseAvatarUrl, x as getConversationStore, y as getConversationEventStore } from "./viewer-C2PztlYX.js";
8
- import { A as juniorConversations, C as juniorConversationEvents, N as juniorDestinations, c as juniorReviewItems, d as juniorAutomations, h as juniorAgentInvocations, l as juniorAutomationRuns, m as juniorAgentBindings, y as juniorConversationBriefs } from "./executor-CGqJCxgR.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Cpje_Uic.js";
10
- import { $ as readViewerAutomations, A as runWithSlackInstallation, B as logScheduledAutomationRunSkipped, C as readSlackReviewItemCardConversationId, D as parseSlackReviewItemClick, Dt as processWorkspaceSnapshotJob, E as buildSlackReviewItemModal, L as joinPublicChannel, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, Ot as ingestEvent, S as createSlackReviewItemShow, V as scheduledAutomationRunAttributes, Y as readViewerAutomationExecutions, Z as readViewerAutomationSummary, _ as readPublicArtifact, _t as requestAttachmentDeletion, at as reviewItemChangeRecord, bt as stopConversationSession, ct as conversationTurnIdForMessage, dt as recordWebConversationActivity, ft as webActorFromUser, g as publicArtifactHeaders, ht as collectAttachmentGarbage, it as renderReviewItemMessage, j as verifySlackSignature, k as parseSlackUserInputSubmission, n as executeAgentRun, q as ViewerTaskNotFoundError, r as processBackgroundCompaction, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, tt as effectiveTaskOutcomes, v as unpublishedArtifactHeaders, w as syncReviewItemSlackCards, xt as recordSubagentEnded, y as lookupSlackUserProfile } from "./agent-runner-h4CDcnDV.js";
7
+ import { C as getSqlExecutor, H as recordGoogleSignIn, I as resolveActorIdentityId, M as withConversationMutationLock, S as getDb, Y as touchConversationDetail, _ as closeDb, g as createCache, i as readActorIdentity, k as withConversationEventLock, l as resolveViewerUser, p as parseAvatarUrl, x as getConversationStore, y as getConversationEventStore } from "./viewer-CYB9T4rm.js";
8
+ import { A as juniorConversations, C as juniorConversationEvents, N as juniorDestinations, c as juniorReviewItems, d as juniorAutomations, h as juniorAgentInvocations, l as juniorAutomationRuns, m as juniorAgentBindings, y as juniorConversationBriefs } from "./executor-HPgHGAWK.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-B7NRB7eH.js";
10
+ import { $ as readViewerAutomations, A as runWithSlackInstallation, B as logScheduledAutomationRunSkipped, C as readSlackReviewItemCardConversationId, D as parseSlackReviewItemClick, Dt as processWorkspaceSnapshotJob, E as buildSlackReviewItemModal, L as joinPublicChannel, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, Ot as ingestEvent, S as createSlackReviewItemShow, V as scheduledAutomationRunAttributes, Y as readViewerAutomationExecutions, Z as readViewerAutomationSummary, _ as readPublicArtifact, _t as requestAttachmentDeletion, at as reviewItemChangeRecord, bt as stopConversationSession, ct as conversationTurnIdForMessage, dt as recordWebConversationActivity, ft as webActorFromUser, g as publicArtifactHeaders, ht as collectAttachmentGarbage, it as renderReviewItemMessage, j as verifySlackSignature, k as parseSlackUserInputSubmission, n as executeAgentRun, q as ViewerTaskNotFoundError, r as processBackgroundCompaction, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, tt as effectiveTaskOutcomes, v as unpublishedArtifactHeaders, w as syncReviewItemSlackCards, xt as recordSubagentEnded, y as lookupSlackUserProfile } from "./agent-runner-Bj7GhysW.js";
11
11
  import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
12
- import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-BAqo7eOH.js";
12
+ import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-D8-lqOBF.js";
13
13
  import { n as getNextRunAtMs } from "./cadence-R7Em4RjE.js";
14
- import { H as conversationBriefSchema, b as conversationSurfaceSchema, f as conversationFeedQuerySchema, k as annotationCard, v as conversationReportStatusSchema } from "./conversation-DNtcULyX.js";
14
+ import { H as conversationBriefSchema, b as conversationSurfaceSchema, f as conversationFeedQuerySchema, k as annotationCard, v as conversationReportStatusSchema } from "./conversation-DdT7SNar.js";
15
15
  import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
16
- import { S as listPendingAgentInvocationResults, x as listPendingAgentInvocationMailboxAppends } from "./store-nETG4KVg.js";
17
- import { A as renderSlackObjectCard, T as renderTaskInput, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-CVEEx_YD.js";
16
+ import { S as listPendingAgentInvocationResults, x as listPendingAgentInvocationMailboxAppends } from "./store-61mD4ZSh.js";
17
+ import { A as renderSlackObjectCard, T as renderTaskInput, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-D8LGC3H6.js";
18
18
  import { h as buttonUserInputField } from "./reporting-window-B-QP9zX1.js";
19
- import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-iMW9Dgo2.js";
20
- import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, b as isConversationQueueMessageRejectedError, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, h as getQueueProvider, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, y as conversationQueueMessageSchema } from "./background-compaction-queue-CoWqScCC.js";
21
- import { S as removeActiveConversation, _ as hasRunnableConversationWork$1, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-nu3Xx08K.js";
22
- import { B as readScheduledAutomation, G as blockEventAutomation, H as saveScheduledAutomationInLock, K as collectEventAutomationMatchKeys, M as recordAutomationExecution, R as listScheduledAutomationsForTeam, S as existingConversationId, U as scheduledRunId, W as withScheduledAutomationLock, Y as findMatchingEventAutomations, a as confirmDispatchMailboxAppend, b as notifyAutomationBlocked, f as getPluginDispatchProjection, ht as eventGuidance, it as automationVersionOf, m as listPendingDispatchMailboxAppends, nt as eventAutomationRunLimitReason, o as createOrGetDispatch, p as isTerminalDispatchStatus, r as buildDispatchId, s as getDispatchConversationId, tt as admitEventAutomationRun, u as getDispatchRecord, v as markDispatchFailed } from "./turn-session-routing-BIJGJjVh.js";
23
- import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-sIsmIXH7.js";
24
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-DXvxEEjq.js";
19
+ import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-D3MK9oRJ.js";
20
+ import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, b as isConversationQueueMessageRejectedError, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, h as getQueueProvider, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, y as conversationQueueMessageSchema } from "./background-compaction-queue-Bbsqx8Vm.js";
21
+ import { S as removeActiveConversation, _ as hasRunnableConversationWork$1, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-DAJntSEv.js";
22
+ import { B as readScheduledAutomation, G as blockEventAutomation, H as saveScheduledAutomationInLock, K as collectEventAutomationMatchKeys, M as recordAutomationExecution, R as listScheduledAutomationsForTeam, S as existingConversationId, U as scheduledRunId, W as withScheduledAutomationLock, Y as findMatchingEventAutomations, a as confirmDispatchMailboxAppend, b as notifyAutomationBlocked, f as getPluginDispatchProjection, ht as eventGuidance, it as automationVersionOf, m as listPendingDispatchMailboxAppends, nt as eventAutomationRunLimitReason, o as createOrGetDispatch, p as isTerminalDispatchStatus, r as buildDispatchId, s as getDispatchConversationId, tt as admitEventAutomationRun, u as getDispatchRecord, v as markDispatchFailed } from "./turn-session-routing-CzCnNAUO.js";
23
+ import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-MLWOrghe.js";
24
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-Cs_knhR8.js";
25
25
  import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-HYh_JOdw.js";
26
- import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-LlFnr9-m.js";
27
- import { A as assertNoLegacyAllowedDomains, B as normalizeIncomingSlackThreadId, D as createProductionSlackWebhookServices, E as createProductionConversationWorkOptions, F as recordSkippedConversationMessage, G as startProcessingReaction, H as stopConversationTurn, I as buildSlackInboundMessage, J as ReviewItemActionError, K as stripLeadingBotMention, L as clearSlackPendingReactions, M as isAllowedSignInEmail, N as readEnvList, O as getProductionSlackAdapter, P as resolveAllowedDomains, Q as reviewItemChange, R as isSlackMessageStopped, S as readConversationPendingMessages, T as archiveConversation, U as THREAD_OPTOUT_ACK, V as withNormalizedThreadId, W as bindMessageAuthorIdentityId, X as closeReviewItemsAnsweredByReply, Y as actOnReviewItem, Z as readReviewItemForUser, _ as appendConversationMessageForViewer, b as encodeConversationCursor, ct as getAttachmentStorage, d as readConversationRecordFromSql, dt as GET$4, et as archiveViewerDoneConversations, i as readConversationDetail, j as isAllowedDomain, k as createSlackWebApiStatusSender, n as steerConversationPendingMessagesForViewer, nt as runAutoArchiveSweep, o as markConversationRead, q as parseContent, r as pinConversation, rt as setConversationAutoArchive, t as stopConversationTurnForViewer, u as readConversationFeed, ut as enqueueAgentDispatch, v as createConversationForViewer, x as cancelConversationPendingMessagesForViewer, y as decodeConversationCursor, z as stopSlackThread } from "./stop-DtpBUUJq.js";
28
- import { n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId } from "./result-BrlvfyIj.js";
29
- import { i as enqueueAgentInvocation, r as endAgentInvocationsOfStoppedWork } from "./work-BM_L0Pv9.js";
30
- import { o as coerceThreadConversationState } from "./thread-state-BDaMl9yd.js";
31
- import { o as unlinkProvider } from "./connections-DjY72_uF.js";
32
- import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-DUrQwccr.js";
26
+ import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-Dct5pheX.js";
27
+ import { $ as reviewItemChange, A as createSlackWebApiStatusSender, B as stopSlackThread, C as readConversationPendingMessages, D as createProductionConversationWorkOptions, E as archiveConversation, F as resolveAllowedDomains, G as bindMessageAuthorIdentityId, H as withNormalizedThreadId, I as recordSkippedConversationMessage, J as parseContent, K as startProcessingReaction, L as buildSlackInboundMessage, M as isAllowedDomain, N as isAllowedSignInEmail, O as createProductionSlackWebhookServices, P as readEnvList, Q as readReviewItemForUser, R as clearSlackPendingReactions, S as cancelConversationPendingMessagesForViewer, U as stopConversationTurn, V as normalizeIncomingSlackThreadId, W as THREAD_OPTOUT_ACK, X as actOnReviewItem, Y as ReviewItemActionError, Z as closeReviewItemsAnsweredByReply, a as readConversationDetail, b as decodeConversationCursor, d as readConversationFeed, dt as GET$4, f as readConversationRecordFromSql, it as setConversationAutoArchive, j as assertNoLegacyAllowedDomains, k as getProductionSlackAdapter, n as steerConversationPendingMessagesForViewer, q as stripLeadingBotMention, r as pinConversation, rt as runAutoArchiveSweep, s as markConversationRead, t as stopConversationTurnForViewer, tt as archiveViewerDoneConversations, ut as enqueueAgentDispatch, v as appendConversationMessageForViewer, x as encodeConversationCursor, y as createConversationForViewer, z as isSlackMessageStopped } from "./stop-DX2oOIgl.js";
28
+ import { n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId } from "./result-BPCjUefO.js";
29
+ import { i as enqueueAgentInvocation, r as endAgentInvocationsOfStoppedWork } from "./work-J1n6RQkY.js";
30
+ import { o as coerceThreadConversationState } from "./thread-state-0UfRMWYd.js";
31
+ import { o as unlinkProvider } from "./connections-BtnvpBEV.js";
32
+ import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-B4XFVcjM.js";
33
33
  import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
34
- import { a as pluginTaskQueueConsumer, c as queueCallback, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-CYje8WKs.js";
35
- import { t as processConversationWork } from "./worker-2no53G60.js";
36
- import { t as bindMessageAgent } from "./message-BjN5sKad.js";
37
- import { t as bindSpawnAgent } from "./spawn-e7rQs14T.js";
38
- import { t as processPluginTask } from "./task-runner-CwegN45x.js";
34
+ import { a as pluginTaskQueueConsumer, c as queueCallback, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-BE70Pb9p.js";
35
+ import { t as processConversationWork } from "./worker-s1fCvj1z.js";
36
+ import { t as bindMessageAgent } from "./message-BG1v1lXX.js";
37
+ import { t as bindSpawnAgent } from "./spawn-CNIQGgAS.js";
38
+ import { t as processPluginTask } from "./task-runner-CmmfddSZ.js";
39
39
  import { createRequire } from "node:module";
40
40
  import { Hono } from "hono";
41
41
  import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import { Wt as extractAssistantText } from "./projection-ii_OYu6z.js";
1
+ import { Wt as extractAssistantText } from "./projection-BfKkpOGQ.js";
2
2
  // src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
2
- import { r as actorIdentitySchema } from "./conversation-DNtcULyX.js";
2
+ import { r as actorIdentitySchema } from "./conversation-DdT7SNar.js";
3
3
  import * as z from "zod";
4
4
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
5
5
  // src/chat/scheduled-automations/schedule-intent.ts
@@ -1,5 +1,5 @@
1
- import { i as getChatConfig } from "./config-DBdBimZ9.js";
2
- import { E as withSpan, m as logInfo, p as logException } from "./logging-DapIaJAi.js";
1
+ import { i as getChatConfig } from "./config-DFVlYCeY.js";
2
+ import { E as withSpan, m as logInfo, p as logException } from "./logging-2BXvW7Mp.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
5
5
  import * as z from "zod";
@@ -1,6 +1,6 @@
1
- import { i as completeObject } from "./client-BHgCXeaF.js";
2
- import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DNtcULyX.js";
3
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DI6KCtwb.js";
1
+ import { i as completeObject } from "./client-a3Ib6wxr.js";
2
+ import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DdT7SNar.js";
3
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CCtaGgbI.js";
4
4
  import { CLI_USAGE } from "./cli/run.js";
5
5
  import path from "node:path";
6
6
  import * as z from "zod";
@@ -263,7 +263,7 @@ async function parseRunOptions(argv) {
263
263
  * token.
264
264
  */
265
265
  async function configuredBriefModelId() {
266
- const { botConfig } = await import("./config-DBdBimZ9.js").then((n) => n.r);
266
+ const { botConfig } = await import("./config-DFVlYCeY.js").then((n) => n.r);
267
267
  return botConfig.fastModelId;
268
268
  }
269
269
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-DpjG3yS-.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-CLooHPAz.js";
3
3
  // src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-h4CDcnDV.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-Bj7GhysW.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
101
  import("../plugins-HYh_JOdw.js").then((n) => n.o),
102
- import("../projection-ii_OYu6z.js").then((n) => n.kn),
103
- import("../catalog-runtime-Cpje_Uic.js").then((n) => n.t),
104
- import("../validation-DXvxEEjq.js").then((n) => n.r),
105
- import("../viewer-C2PztlYX.js").then((n) => n.v)
102
+ import("../projection-BfKkpOGQ.js").then((n) => n.kn),
103
+ import("../catalog-runtime-B7NRB7eH.js").then((n) => n.t),
104
+ import("../validation-Cs_knhR8.js").then((n) => n.r),
105
+ import("../viewer-CYB9T4rm.js").then((n) => n.v)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,18 +152,18 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../projection-ii_OYu6z.js").then((n) => n.Vn);
155
+ const { setBriefsConfig } = await import("../projection-BfKkpOGQ.js").then((n) => n.Vn);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-Bg9mr2pB.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DVHKrjJP.js");
157
+ const { runLocalAgentTurn } = await import("../runner-Ds31u3rB.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CXNZJymo.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Bd3lb_Wd.js");
161
- const { bindSpawnAgent } = await import("../spawn-e7rQs14T.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-BjN5sKad.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-BrlvfyIj.js").then((n) => n.i);
164
- const { skipInputBeforeConversationStop } = await import("../session-stop-CVEEx_YD.js").then((n) => n.r);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CLd5RPUw.js");
161
+ const { bindSpawnAgent } = await import("../spawn-CNIQGgAS.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-BG1v1lXX.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-BPCjUefO.js").then((n) => n.i);
164
+ const { skipInputBeforeConversationStop } = await import("../session-stop-D8LGC3H6.js").then((n) => n.r);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-2no53G60.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-s1fCvj1z.js").then((n) => n.n);
167
167
  let agentRunner;
168
168
  const localConversationWork = createLocalConversationWork(async (message) => {
169
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-DapIaJAi.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DpjG3yS-.js";
3
- import { i as parseSkillFile } from "../skills-DqUUuf4L.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-2BXvW7Mp.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-CLooHPAz.js";
3
+ import { i as parseSkillFile } from "../skills-DuOKByQH.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-DbWpMHh6.js")).runAdmin(argv);
28
+ return await (await import("../admin-Dnw5SCXp.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-Bd1348kw.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-CWpTsoIM.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-CMiotFo9.js")).runBriefs(argv);
34
+ return await (await import("../briefs-C4qBY-jb.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-ii_OYu6z.js";
2
- import { S as getDb } from "../viewer-C2PztlYX.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Cpje_Uic.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DXvxEEjq.js";
1
+ import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-BfKkpOGQ.js";
2
+ import { S as getDb } from "../viewer-CYB9T4rm.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B7NRB7eH.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-Cs_knhR8.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,7 +1,7 @@
1
- import { ai as create } from "../projection-ii_OYu6z.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Cpje_Uic.js";
3
- import { t as disconnectStateAdapter } from "../adapter-BAqo7eOH.js";
4
- import { n as resolve } from "../resolve-iMW9Dgo2.js";
1
+ import { ai as create } from "../projection-BfKkpOGQ.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-B7NRB7eH.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-D8-lqOBF.js";
4
+ import { n as resolve } from "../resolve-D3MK9oRJ.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_RUNTIME = "node22";
7
7
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import "../db-hQsoB16L.js";
1
+ import "../db-A_WrTY-s.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-DBdBimZ9.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-CGqJCxgR.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-DpjG3yS-.js";
1
+ import { i as getChatConfig } from "../config-DFVlYCeY.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-HPgHGAWK.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-CLooHPAz.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-DapIaJAi.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DiDh9KE4.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-2BXvW7Mp.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DLq-abjU.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,7 +1,96 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-BHgCXeaF.js";
2
+ import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-a3Ib6wxr.js";
3
3
  import { AwsClient } from "aws4fetch";
4
+ import { del, get, put } from "@vercel/blob";
4
5
  import * as z from "zod";
6
+ // src/chat/attachments/memory.ts
7
+ /**
8
+ * Store attachments in process memory, for tests.
9
+ *
10
+ * Objects are lost when the process stops, and each process has its own
11
+ * copy. Do not use this provider for deployed apps.
12
+ */
13
+ function createMemoryAttachmentStorage() {
14
+ const objects = /* @__PURE__ */ new Map();
15
+ return {
16
+ objects,
17
+ provider: "memory",
18
+ async put(input) {
19
+ objects.set(input.key, Buffer.from(input.body));
20
+ },
21
+ async get(key, range) {
22
+ const body = objects.get(key);
23
+ if (!body) return null;
24
+ const bytes = range ? body.subarray(range.start, range.end + 1) : body;
25
+ return new ReadableStream({ start(controller) {
26
+ controller.enqueue(new Uint8Array(bytes));
27
+ controller.close();
28
+ } });
29
+ },
30
+ async delete(keys) {
31
+ for (const key of keys) objects.delete(key);
32
+ }
33
+ };
34
+ }
35
+ // src/chat/attachments/vercel.ts
36
+ /** Store private conversation attachments in Vercel Blob. */
37
+ function createVercelAttachmentStorage() {
38
+ return {
39
+ provider: "vercel-blob",
40
+ async put(input) {
41
+ await put(input.key, input.body, {
42
+ access: "private",
43
+ addRandomSuffix: false,
44
+ allowOverwrite: true,
45
+ contentType: input.contentType
46
+ });
47
+ },
48
+ async get(key, range) {
49
+ const result = await get(key, {
50
+ access: "private",
51
+ useCache: false,
52
+ ...range ? { headers: { range: rangeHeader(range) } } : void 0
53
+ });
54
+ if (result?.statusCode !== 200) return null;
55
+ if (range && !result.headers.get("content-range")) {
56
+ await result.stream.cancel();
57
+ throw new Error("Vercel Blob get ignored the byte range");
58
+ }
59
+ return result.stream;
60
+ },
61
+ async delete(keys) {
62
+ if (keys.length === 0) return;
63
+ await del(keys);
64
+ }
65
+ };
66
+ }
67
+ // src/chat/attachments/storage.ts
68
+ /** Build the HTTP `Range` request header value for one byte range. */
69
+ function rangeHeader(range) {
70
+ return `bytes=${range.start}-${range.end}`;
71
+ }
72
+ /**
73
+ * Return attachment storage for the configured provider.
74
+ *
75
+ * Callers do not choose a provider. Chat config decides it.
76
+ */
77
+ function getAttachmentStorage() {
78
+ return createAttachmentStorage(getChatConfig().attachmentStorage);
79
+ }
80
+ /**
81
+ * Create attachment storage for one provider config.
82
+ *
83
+ * Runtime code uses `getAttachmentStorage()`. Call this only to test a
84
+ * provider adapter with its own config.
85
+ */
86
+ function createAttachmentStorage(config) {
87
+ switch (config.provider) {
88
+ case "vercel-blob": return createVercelAttachmentStorage();
89
+ case "s3": return createS3AttachmentStorage(config.s3);
90
+ case "memory": return createMemoryAttachmentStorage();
91
+ default: throw new Error(`Unsupported attachment storage provider: ${String(config.provider)}`);
92
+ }
93
+ }
5
94
  // src/chat/attachments/s3.ts
6
95
  function readRequiredSetting(env, name) {
7
96
  const value = toOptionalTrimmed(env[name]);
@@ -62,13 +151,17 @@ function createS3AttachmentStorage(config) {
62
151
  method: "PUT"
63
152
  }), "put");
64
153
  },
65
- async get(key) {
66
- const response = await client.fetch(objectUrl(config, key));
154
+ async get(key, range) {
155
+ const response = await client.fetch(objectUrl(config, key), range ? { headers: { range: rangeHeader(range) } } : void 0);
67
156
  if (response.status === 404) {
68
157
  await drain(response);
69
158
  return null;
70
159
  }
71
160
  if (!response.ok) await expectOk(response, "get");
161
+ if (range && response.status !== 206) {
162
+ await drain(response);
163
+ throw new Error(`S3 get ignored the byte range with status ${response.status}`);
164
+ }
72
165
  return response.body;
73
166
  },
74
167
  async delete(keys) {
@@ -483,4 +576,4 @@ function setSlackReactionConfig(overrides) {
483
576
  if (overrides.processingReactionEmoji !== void 0) chatConfig.slack.processingReactionEmoji = parseReactionEmoji("processingReactionEmoji", overrides.processingReactionEmoji, chatConfig.slack.processingReactionEmoji);
484
577
  if (overrides.completedReactionEmoji !== void 0) chatConfig.slack.completedReactionEmoji = parseReactionEmoji("completedReactionEmoji", overrides.completedReactionEmoji, chatConfig.slack.completedReactionEmoji);
485
578
  }
486
- export { toPiReasoningLevel as _, getRuntimeMetadata as a, getSlackClientSecret as c, restoreRuntimeConfig as d, setBotModelConfig as f, TURN_REASONING_LEVELS as g, snapshotRuntimeConfig as h, getChatConfig as i, getSlackSigningSecret as l, setSlackReactionConfig as m, botConfig as n, getSlackBotToken as o, setRuntimeLimits as p, config_exports as r, getSlackClientId as s, DEFAULT_SQL_STATEMENT_TIMEOUT_MS as t, resetRuntimeConfig as u, normalizeSlackEmojiName as v, createS3AttachmentStorage as y };
579
+ export { toPiReasoningLevel as _, getRuntimeMetadata as a, getSlackClientSecret as c, restoreRuntimeConfig as d, setBotModelConfig as f, TURN_REASONING_LEVELS as g, snapshotRuntimeConfig as h, getChatConfig as i, getSlackSigningSecret as l, setSlackReactionConfig as m, botConfig as n, getSlackBotToken as o, setRuntimeLimits as p, config_exports as r, getSlackClientId as s, DEFAULT_SQL_STATEMENT_TIMEOUT_MS as t, resetRuntimeConfig as u, normalizeSlackEmojiName as v, getAttachmentStorage as y };
@@ -1,13 +1,13 @@
1
- import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-ii_OYu6z.js";
2
- import { n as botConfig } from "./config-DBdBimZ9.js";
3
- import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-C2PztlYX.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-DpjG3yS-.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Cpje_Uic.js";
6
- import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-h4CDcnDV.js";
7
- import { r as getStateAdapter } from "./adapter-BAqo7eOH.js";
8
- import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-CoWqScCC.js";
9
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-nu3Xx08K.js";
10
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-BIJGJjVh.js";
1
+ import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-BfKkpOGQ.js";
2
+ import { n as botConfig } from "./config-DFVlYCeY.js";
3
+ import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-CYB9T4rm.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-CLooHPAz.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-B7NRB7eH.js";
6
+ import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-Bj7GhysW.js";
7
+ import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
8
+ import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-Bbsqx8Vm.js";
9
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-DAJntSEv.js";
10
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-CzCnNAUO.js";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
12
12
  import * as z from "zod";
13
13
  // src/chat/task-execution/authorized-turn.ts
@@ -1,4 +1,4 @@
1
- import { c as conversationTurnFailureReasonSchema, s as conversationTurnFailureCodeSchema, t as INPUT_IMAGE_TYPES, v as usageSchema } from "./media-Dq9_svfQ.js";
1
+ import { c as conversationTurnFailureCodeSchema, l as conversationTurnFailureReasonSchema, n as INPUT_IMAGE_TYPES, y as usageSchema } from "./media-Bu9C6lz0.js";
2
2
  import * as z from "zod";
3
3
  import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
4
4
  // src/chat/briefs/schema.ts
@@ -422,6 +422,8 @@ const conversationSummaryReportSchema = z.object({
422
422
  participants: z.array(actorIdentitySchema).optional(),
423
423
  archivedAt: z.string().datetime().nullable().optional(),
424
424
  pinnedAt: z.string().datetime().nullable().optional(),
425
+ /** The viewer's place in Pinned. Unset until they reorder their pins. */
426
+ pinPosition: z.number().int().optional(),
425
427
  channel: z.string().optional(),
426
428
  channelName: z.string().optional(),
427
429
  channelNameRedacted: z.boolean().optional(),
@@ -1,4 +1,4 @@
1
- import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DNtcULyX.js";
1
+ import { L as messageAttachmentSchema, O as reviewItemChangeRecordSchema, c as conversationDetailReportSchema, r as actorIdentitySchema } from "./conversation-DdT7SNar.js";
2
2
  import * as z from "zod";
3
3
  // src/reporting-schema.ts
4
4
  const healthReportSchema = z.object({
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-DapIaJAi.js";
1
+ import { h as logWarn } from "./logging-2BXvW7Mp.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-ii_OYu6z.js";
2
- import { m as escapeXml } from "./client-BHgCXeaF.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-DBdBimZ9.js";
4
- import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DapIaJAi.js";
1
+ import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-BfKkpOGQ.js";
2
+ import { m as escapeXml } from "./client-a3Ib6wxr.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-DFVlYCeY.js";
4
+ import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-2BXvW7Mp.js";
5
5
  import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
6
- import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-C2PztlYX.js";
6
+ import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-CYB9T4rm.js";
7
7
  import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DpjG3yS-.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Cpje_Uic.js";
10
- import { t as discoverSkills } from "./skills-DqUUuf4L.js";
11
- import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-h4CDcnDV.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CLooHPAz.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-B7NRB7eH.js";
10
+ import { t as discoverSkills } from "./skills-DuOKByQH.js";
11
+ import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-Bj7GhysW.js";
12
12
  import { r as acquireActiveLock } from "./locks-D-0h111u.js";
13
- import { r as getStateAdapter } from "./adapter-BAqo7eOH.js";
14
- import { _ as getMcpProviderErrorAttributes } from "./service-account-Dfl9Pitm.js";
15
- import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BDaMl9yd.js";
16
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-DjY72_uF.js";
13
+ import { r as getStateAdapter } from "./adapter-D8-lqOBF.js";
14
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-D6AMahy7.js";
15
+ import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-0UfRMWYd.js";
16
+ import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-BtnvpBEV.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
18
18
  import path from "node:path";
19
19
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -1,4 +1,4 @@
1
- import "./schema-CsqJzkP5.js";
1
+ import "./schema-jW3ccLjp.js";
2
2
  import * as z from "zod";
3
3
  import "drizzle-orm";
4
4
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
@@ -1,5 +1,5 @@
1
- import "./config-DBdBimZ9.js";
2
- import { p as logException } from "./logging-DapIaJAi.js";
1
+ import "./config-DFVlYCeY.js";
2
+ import { p as logException } from "./logging-2BXvW7Mp.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { getTableColumns, sql } from "drizzle-orm";
5
5
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
@@ -370,6 +370,12 @@ const juniorConversationParticipants = pgTable("junior_conversation_participants
370
370
  archivedAt: timestamptz("archived_at"),
371
371
  pinnedAt: timestamptz("pinned_at"),
372
372
  /**
373
+ * The viewer's place for this pin in the Pinned section, from a drag
374
+ * reorder. Null until the first reorder, and cleared on unpin, re-pin,
375
+ * and archive. Null pins sort first, by activity.
376
+ */
377
+ pinPosition: integer("pin_position"),
378
+ /**
373
379
  * Per-conversation auto-archive choice for this user. Null uses the
374
380
  * user's `autoArchiveDefault`.
375
381
  */
@@ -1,6 +1,6 @@
1
1
  import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
2
- import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-DapIaJAi.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DiDh9KE4.js";
2
+ import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-2BXvW7Mp.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DLq-abjU.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
5
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
6
6
  import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
@@ -1,5 +1,5 @@
1
1
  import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
2
- import { t as JUNIOR_VERSION } from "./version-CzEk1KBX.js";
2
+ import { t as JUNIOR_VERSION } from "./version-ZMC4cXWN.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -546,6 +546,8 @@ const INPUT_IMAGE_TYPES = [
546
546
  "image/gif",
547
547
  "image/webp"
548
548
  ];
549
+ /** Video types that browsers play in a `<video>` element. */
550
+ const INLINE_VIDEO_TYPES = ["video/mp4", "video/webm"];
549
551
  /** Leading bytes of each accepted image type. `null` matches any byte. */
550
552
  const IMAGE_SIGNATURES = [
551
553
  {
@@ -621,4 +623,4 @@ function isVisionImageMediaType(mediaType) {
621
623
  const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
622
624
  return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
623
625
  }
624
- export { sameActorIdentity as _, agentHistoryItemSchema as a, conversationTurnFailureReasonSchema as c, newConversationEventSchema as d, encodeHistoryPayload as f, instructionProvenanceFor as g, instructionActors as h, KNOWN_CONVERSATION_EVENT_TYPES as i, decodeStoredConversationEvent as l, contextProvenance as m, detectImageMediaType as n, conversationEventDataSchema as o, agentInstructionProvenance as p, isVisionImageMediaType as r, conversationTurnFailureCodeSchema as s, INPUT_IMAGE_TYPES as t, historyReplacementSchema as u, usageSchema as v };
626
+ export { instructionProvenanceFor as _, KNOWN_CONVERSATION_EVENT_TYPES as a, conversationTurnFailureCodeSchema as c, historyReplacementSchema as d, newConversationEventSchema as f, instructionActors as g, contextProvenance as h, isVisionImageMediaType as i, conversationTurnFailureReasonSchema as l, agentInstructionProvenance as m, INPUT_IMAGE_TYPES as n, agentHistoryItemSchema as o, encodeHistoryPayload as p, detectImageMediaType as r, conversationEventDataSchema as s, INLINE_VIDEO_TYPES as t, decodeStoredConversationEvent as u, sameActorIdentity as v, usageSchema as y };
@@ -1,13 +1,13 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Na as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-ii_OYu6z.js";
3
- import { n as botConfig } from "./config-DBdBimZ9.js";
4
- import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-C2PztlYX.js";
5
- import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-h4CDcnDV.js";
6
- import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-nETG4KVg.js";
7
- import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-CVEEx_YD.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-nu3Xx08K.js";
9
- import { r as enqueueAgentMessageToParent } from "./result-BrlvfyIj.js";
10
- import { i as enqueueAgentInvocation } from "./work-BM_L0Pv9.js";
2
+ import { Na as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-BfKkpOGQ.js";
3
+ import { n as botConfig } from "./config-DFVlYCeY.js";
4
+ import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-CYB9T4rm.js";
5
+ import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-Bj7GhysW.js";
6
+ import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-61mD4ZSh.js";
7
+ import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-D8LGC3H6.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-DAJntSEv.js";
9
+ import { r as enqueueAgentMessageToParent } from "./result-BPCjUefO.js";
10
+ import { i as enqueueAgentInvocation } from "./work-J1n6RQkY.js";
11
11
  // src/chat/agent-invocations/top-level-message.ts
12
12
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
13
13
  /** Event type of a message from another top-level agent. */