@sentry/junior 0.299.0 → 0.300.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 (78) hide show
  1. package/dist/{adapter-AgCNqqsG.js → adapter-S5UkjNK3.js} +5 -4
  2. package/dist/{admin-1VwEXztm.js → admin-UrTniSPO.js} +2 -2
  3. package/dist/{agent-runner-Ciet8_nn.js → agent-runner-bY4_0UPm.js} +508 -203
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +293 -61
  8. package/dist/{app--ky-Eu33.d.ts → app-D-AcIcCV.d.ts} +13 -2
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +57 -219
  11. package/dist/{automation-M3RFJUBf.js → automation-Dw82oQ-h.js} +2 -2
  12. package/dist/{background-compaction-queue-CnimvRdk.js → background-compaction-queue-B6U3060-.js} +8 -4
  13. package/dist/{briefs-CwzvgdCa.js → briefs-DqiwWu-n.js} +3 -3
  14. package/dist/{catalog-runtime-DaBaHY7u.js → catalog-runtime-D1oYNv04.js} +1 -1
  15. package/dist/cli/chat.js +16 -16
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +3 -3
  18. package/dist/cli/plugins.js +5 -5
  19. package/dist/cli/snapshot-create.js +4 -4
  20. package/dist/cli/upgrade.d.ts +1 -1
  21. package/dist/cli/upgrade.js +4 -4
  22. package/dist/{config-CAXIpWQb.js → config-9nHoFiJP.js} +39 -8
  23. package/dist/{connections-Dy0hPdUq.js → connections-DZjTN3JC.js} +6 -6
  24. package/dist/{continue-in-slack-DIOjFj76.js → continue-in-slack-Dtv7_U42.js} +6 -6
  25. package/dist/{conversation-fCWD9Az3.js → conversation-Dyjq2CZ8.js} +19 -8
  26. package/dist/{conversation-feed-BPK8vkkZ.js → conversation-feed-CcDxlrlQ.js} +23 -2
  27. package/dist/{conversation-privacy-DUgtRkf8.js → conversation-privacy-D-5HTXjS.js} +1 -1
  28. package/dist/{conversation-turn-DkJB6yMF.js → conversation-turn-Cxl8WZD7.js} +17 -17
  29. package/dist/{credential-sync-RX24Y8aY.js → credential-sync-C49ClwDX.js} +15 -15
  30. package/dist/{db-B07FtU9g.d.ts → db-2resqBh1.d.ts} +1 -1
  31. package/dist/{db-COYOGzYS.js → db-BJNo6fK5.js} +13 -8
  32. package/dist/{executor-BWmAgSyi.js → executor-DBIaOeJ_.js} +9 -4
  33. package/dist/instrumentation.js +14 -5
  34. package/dist/{lineage-D-5jm_oj.js → lineage-0dereG7H.js} +2 -2
  35. package/dist/{logging-DPLEa8Bn.js → logging-BIclibct.js} +1 -1
  36. package/dist/{message-BIHR1yRk.js → message-dkOl-Iii.js} +8 -8
  37. package/dist/{model-input-BPZYH8Nd.js → model-input-CLo9TaUd.js} +4 -4
  38. package/dist/nitro.d.ts +1 -1
  39. package/dist/nitro.js +4 -4
  40. package/dist/{oauth-callback-server-R7qvSzFG.js → oauth-callback-server-WmpjfJgQ.js} +2 -2
  41. package/dist/{plugins-CBW2Prb_.js → plugins-BBX07Jzt.js} +1 -1
  42. package/dist/{projection-DEdP1q6f.js → projection-w_X-zi7v.js} +3742 -3624
  43. package/dist/{prompt-4M98h_tC.js → prompt-B1Xw46-S.js} +4 -4
  44. package/dist/{registry-BTKmKM-r.js → registry-BmP5vnlj.js} +2 -2
  45. package/dist/{resolve-B8hXNVZ3.js → resolve-goo34bJK.js} +3 -3
  46. package/dist/{result-g-XAaOj6.js → result-PVBeU0Wf.js} +9 -9
  47. package/dist/{runner-BlPSA5A8.js → runner-DKrfvNV6.js} +9 -9
  48. package/dist/{sandbox-egress-signals-Pai-MzEY.js → sandbox-egress-signals-DsUcqrI0.js} +1 -1
  49. package/dist/{schema-BNnY_trV.js → schema-C9iNFz5n.js} +20 -16
  50. package/dist/{schema-DbuWR-DN.d.ts → schema-Dns-sTas.d.ts} +219 -6
  51. package/dist/{service-account-BYGZ08DQ.js → service-account-CMAAloAL.js} +3 -3
  52. package/dist/{service-account-9OLNQMyz.js → service-account-CmowamcB.js} +4 -4
  53. package/dist/{session-stop-2XJrcNCy.js → session-stop-BcAXze8a.js} +15 -41
  54. package/dist/{skills-DpBQoeHV.js → skills-DfsazET6.js} +2 -2
  55. package/dist/{slack-conversation-unfurl-BcDIWo67.js → slack-conversation-unfurl-CzQonuWz.js} +7 -7
  56. package/dist/{spawn-09GssFod.js → spawn-C7o0FDDp.js} +6 -6
  57. package/dist/{state-Cufq0_rH.js → state-zSilNpbi.js} +2 -2
  58. package/dist/{statuses-B8mUfghF.js → statuses-Hn-HsOph.js} +86 -2
  59. package/dist/{stop-U7iUrR1g.js → stop-CFOujp8C.js} +2938 -76
  60. package/dist/{store-CSgUTMdv.js → store-Dkeis_8o.js} +9 -9
  61. package/dist/{store-BHiaHCQu.js → store-E3x2Fg_F.js} +5 -5
  62. package/dist/{task-queue-bMNq0clp.js → task-queue-D-hCqdZW.js} +3 -3
  63. package/dist/{task-runner-B__rxwxU.js → task-runner-vohUPLHe.js} +8 -8
  64. package/dist/{thread-context-d0ceWbVT.js → thread-context-BzvdkgI9.js} +8 -8
  65. package/dist/{turn-session-routing-BVZHBFCF.js → turn-session-routing-Bo_LxFum.js} +5 -5
  66. package/dist/{turn-user-message-BEw7acTP.js → turn-user-message-D5RnVmxQ.js} +3 -3
  67. package/dist/{users-BK3dbxZL.js → users-2bggndVg.js} +3 -3
  68. package/dist/{validation-BDVJjO2E.js → validation-BbWikeSa.js} +1 -1
  69. package/dist/{version-DQgZoQ3D.js → version-GVBMW2jA.js} +1 -1
  70. package/dist/version.js +1 -1
  71. package/dist/{viewer-CAWfFo29.js → viewer-BpxRliyO.js} +16 -114
  72. package/dist/{warmup-9ySPacF9.js → warmup-BW2qwnal.js} +18 -16
  73. package/dist/{worker-D8jJO-WO.js → worker-Cbd-iuwZ.js} +24 -20
  74. package/migrations/0107_attachment_deferred_download.sql +2 -0
  75. package/migrations/meta/0107_snapshot.json +4617 -0
  76. package/migrations/meta/_journal.json +7 -0
  77. package/package.json +10 -8
  78. package/dist/media-BAHvgkok.js +0 -85
package/dist/app.js CHANGED
@@ -1,44 +1,44 @@
1
1
  import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
2
- import { $a as consumeSandboxEgressAuthRequiredSignal, Aa as slackExternalRefIdSchema, Ar as dismissOpenReviewItems, C as settleConversationTitleWork, Ca as postSlackEphemeralMessage, Ci as verifyEventAutomationCredentialSubject, Er as projectConversationMessages, Fa as getSlackClient, Go as readConversationLastEventSeq, Ha as getWorkspaceTeamId, Ho as readConversationEventPage, Ko as readConversationMessageEventSeq, La as isDmChannel, Li as setDashboardConversationLinkOptions, Lr as searchReviewItems, Mi as getDashboardReviewItemLink, Mo as readConversationAccessFromSql, Mt as hasRunnableConversationWork, Oi as getDashboardConversationLink, Oo as createPluginLogger, Pi as getDashboardTaskLink, Pt as isInvalidConversationRecordError, Qa as clearSandboxEgressSignals, Ri as createPluginState, Rt as pruneActiveConversation, Sa as openSlackModal, Si as bindSlackDirectCredentialSubject, Ti as verifySlackDirectCredentialSubject, Ua as runWithWorkspaceTeamId, Uo as readConversationEventPageAfter, Vr as canActOnReviewItem, Xr as reviewItemReaderForUser, Zn as createUserTokenStore, Zr as reviewItemReaderForUserInConversation, _ as appendConversationMessages, ar as getPluginApiRoutes, as as listConversationAnnotations, bi as bindEventAutomationCredentialSubject, bs as setConfigDefaults, ca as resolveBaseUrl, dr as getPlugins, dt as CONVERSATION_WORK_STALE_ENQUEUE_MS, eo as consumeSandboxEgressPermissionDeniedSignal, fi as collectEventMatchKeys, fr as setPlugins, gi as findMatchingWatches, gr as setBriefsConfig, ha as slackMention, ia as proxyVercelSandboxEgressRequest, is as createPluginAnnotations, ka as slackEntitySchema, mo as createPluginEmbedder, no as parseSandboxEgressCredentialToken, ns as resolveRootVisibility, oo as normalizeSandboxEgressTracePropagationDomains, or as getPluginRoutes, pr as validatePlugins, ps as createPluginCache, ra as isVercelSandboxEgressRequest, ri as createCodeChangePublisher, rr as createPluginEventPublisher, wi as verifyScheduledAutomationCredentialSubject, xi as bindScheduledAutomationCredentialSubject, yi as takeDueTimerWatches, ys as getConfigDefaults } from "./projection-DEdP1q6f.js";
3
- import { Y as getAttachmentStorage, 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-CAXIpWQb.js";
4
- import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, H as GOOGLE_IDENTITY_PROVIDER, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, W as normalizeIdentityEmail, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-DPLEa8Bn.js";
5
- import { t as JUNIOR_VERSION } from "./version-DQgZoQ3D.js";
2
+ import { Aa as slackEntitySchema, Ao as readConversationEventPageAfter, Ar as dismissOpenReviewItems, Ba as clearSandboxEgressSignals, C as settleConversationTitleWork, Ca as openSlackModal, Ci as verifyEventAutomationCredentialSubject, Cs as getConfigDefaults, Er as projectConversationMessages, Ha as consumeSandboxEgressPermissionDeniedSignal, Ja as normalizeSandboxEgressTracePropagationDomains, Jo as getSlackClient, Lr as searchReviewItems, Mi as getDashboardReviewItemLink, Mo as readConversationLastEventSeq, Mt as hasRunnableConversationWork, No as readConversationMessageEventSeq, Oi as getDashboardConversationLink, Pi as getDashboardTaskLink, Pt as isInvalidConversationRecordError, Ri as setDashboardConversationLinkOptions, Rt as pruneActiveConversation, Si as bindSlackDirectCredentialSubject, Ti as verifySlackDirectCredentialSubject, Va as consumeSandboxEgressAuthRequiredSignal, Vr as canActOnReviewItem, Wa as parseSandboxEgressCredentialToken, Xo as isDmChannel, Xr as reviewItemReaderForUser, Zn as createUserTokenStore, Zr as reviewItemReaderForUserInConversation, _ as appendConversationMessages, _s as createPluginCache, aa as proxyVercelSandboxEgressRequest, ar as getPluginApiRoutes, bi as bindEventAutomationCredentialSubject, cs as createPluginAnnotations, dr as getPlugins, dt as CONVERSATION_WORK_STALE_ENQUEUE_MS, fi as collectEventMatchKeys, fr as setPlugins, ga as slackMention, gi as findMatchingWatches, gr as setBriefsConfig, ho as createPluginLogger, ia as isVercelSandboxEgressRequest, is as runWithWorkspaceTeamId, ja as slackExternalRefIdSchema, ko as readConversationEventPage, la as resolveBaseUrl, ls as listConversationAnnotations, or as getPluginRoutes, os as resolveRootVisibility, pr as validatePlugins, ri as createCodeChangePublisher, rr as createPluginEventPublisher, rs as getWorkspaceTeamId, to as createPluginEmbedder, wa as postSlackEphemeralMessage, wi as verifyScheduledAutomationCredentialSubject, ws as setConfigDefaults, xi as bindScheduledAutomationCredentialSubject, yi as takeDueTimerWatches, yo as readConversationAccessFromSql, zi as createPluginState } from "./projection-w_X-zi7v.js";
3
+ import { Z as getAttachmentStorage, d as restoreRuntimeConfig, f as setBotModelConfig, g as snapshotRuntimeConfig, h as setSlackReactionConfig, i as getChatConfig, m as setRuntimeLimits, n as botConfig, o as getSlackBotToken, p as setBotName, u as resetRuntimeConfig } from "./config-9nHoFiJP.js";
4
+ import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, H as GOOGLE_IDENTITY_PROVIDER, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, W as normalizeIdentityEmail, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-BIclibct.js";
5
+ import { t as JUNIOR_VERSION } from "./version-GVBMW2jA.js";
6
6
  import { b as slackMessageTsSchema, g as slackTeamIdSchema, h as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId, v as parseSlackMessageTs, y as slackMessageTsFromMs } from "./actor-D2iXzvlN.js";
7
- import { D as conversationKindFromRow, N as resolveActorIdentityId, W as createCache, a as getConversationStore, f as withConversationEventLock, it as createSlackDestination, o as getDb, r as getConversationEventStore, rt as touchConversationDetail, s as getSqlExecutor, t as closeDb, x as withConversationMutationLock, z as recordGoogleSignIn } from "./db-COYOGzYS.js";
8
- import { P as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, j as juniorConversations, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-BWmAgSyi.js";
9
- import { c as fenceLock, l as withLock, o as MUTATION_LOCK_TTL_MS, r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-AgCNqqsG.js";
10
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DaBaHY7u.js";
11
- import { $ as deliverReviewItemChange, A as parseSlackUserInputSubmission, At as missingAutomationSkillReason, C as createSlackReviewItemShow, D as buildSlackReviewItemModal, Dt as processWorkspaceSnapshotJob, G as readViewerAutomationExecutions, I as logScheduledAutomationRunSkipped, L as scheduledAutomationRunAttributes, O as parseSlackReviewItemClick, Ot as ingestEvent, T as syncReviewItemSlackCards, U as ViewerTaskNotFoundError, Y as readViewerAutomations, Z as effectiveTaskOutcomes, _ as readPublicArtifact, _t as requestAttachmentDeletion, ct as webActorFromUser, dt as collectAttachmentUploadGarbage, et as renderReviewItemMessage, g as publicArtifactHeaders, ht as collectAttachmentGarbage, it as conversationTurnIdForMessage, j as parseSlackThreadId, k as parseSlackReviewItemFormTarget, kt as findAutomationSkill, n as executeAgentRun, q as readViewerAutomationSummary, r as processBackgroundCompaction, rt as appendAndEnqueueWebMessage, st as recordWebConversationActivity, t as createAgentRunner, tt as reviewItemChangeRecord, v as unpublishedArtifactHeaders, w as readSlackReviewItemCardConversationId, xt as markConversationRead, y as setConversationSubscription, yt as archiveConversation } from "./agent-runner-Ciet8_nn.js";
7
+ import { D as conversationKindFromRow, N as resolveActorIdentityId, W as createCache, a as getConversationStore, f as withConversationEventLock, it as createSlackDestination, o as getDb, r as getConversationEventStore, rt as touchConversationDetail, s as getSqlExecutor, t as closeDb, x as withConversationMutationLock, z as recordGoogleSignIn } from "./db-BJNo6fK5.js";
8
+ import { P as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, j as juniorConversations, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-DBIaOeJ_.js";
9
+ import { c as fenceLock, l as withLock, o as MUTATION_LOCK_TTL_MS, r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-S5UkjNK3.js";
10
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-D1oYNv04.js";
11
+ import { $ as effectiveTaskOutcomes, A as parseSlackReviewItemClick, At as ingestEvent, Ct as markConversationRead, D as syncReviewItemSlackCards, E as readSlackReviewItemCardConversationId, G as ViewerTaskNotFoundError, M as parseSlackUserInputSubmission, Mt as missingAutomationSkillReason, N as parseSlackThreadId, R as logScheduledAutomationRunSkipped, T as createSlackReviewItemShow, Y as readViewerAutomationSummary, Z as readViewerAutomations, _t as collectAttachmentGarbage, at as appendAndEnqueueWebMessage, b as unpublishedArtifactHeaders, j as parseSlackReviewItemFormTarget, jt as findAutomationSkill, k as buildSlackReviewItemModal, kt as processWorkspaceSnapshotJob, lt as recordWebConversationActivity, n as executeAgentRun, nt as renderReviewItemMessage, ot as conversationTurnIdForMessage, pt as collectAttachmentUploadGarbage, q as readViewerAutomationExecutions, r as processBackgroundCompaction, rt as reviewItemChangeRecord, t as createAgentRunner, tt as deliverReviewItemChange, ut as webActorFromUser, v as publicArtifactHeaders, x as setConversationSubscription, xt as archiveConversation, y as readPublicArtifact, yt as requestAttachmentDeletion, z as scheduledAutomationRunAttributes } from "./agent-runner-bY4_0UPm.js";
12
12
  import { a as getNextRunAtMs } from "./schedule-cP0AACm1.js";
13
- import { i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-CAWfFo29.js";
14
- import { $ as conversationBriefSchema, N as conversationTitleSchema, R as annotationCard, b as conversationSurfaceSchema, p as conversationFeedQuerySchema, v as conversationReportStatusSchema } from "./conversation-fCWD9Az3.js";
13
+ import { i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-BpxRliyO.js";
14
+ import { P as conversationTitleSchema, et as conversationBriefSchema, m as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema, z as annotationCard } from "./conversation-Dyjq2CZ8.js";
15
15
  import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
16
16
  import { n as readSchedulerSecret, r as readSignInSecret } from "./secrets-DebYU866.js";
17
- import { C as getAuthPausedConversationTurnId, H as slackChannelMessageReplyThreadTs, R as getEventCatalog, U as slackChannelMessageRunsAutomation, V as slackChannelMessageEvent, Y as renderTaskInput, b as isExperimentalFeatureEnabled, et as renderSlackObjectCard, x as setExperimentalFeatures, y as getExperimentalFeatures, z as SLACK_EVENT_NAMESPACE } from "./session-stop-2XJrcNCy.js";
18
- import { At as MIN_WARMUP_PREFIX_TOKENS, C as listPendingAgentInvocationMailboxAppends, H as enqueueAgentInvocation, Nt as gapSegment, X as recordSubagentEnded, a as segmentGapsKey, jt as NO_REPLY_GAP_MS, kt as MINUTE_MS, n as GLOBAL_GAPS_MAX, r as GLOBAL_GAPS_TTL_MS, t as CONVERSATION_STATE_TTL_MS, w as listPendingAgentInvocationResults } from "./warmup-9ySPacF9.js";
19
- import { C as queueCallback, T as getQueueProvider, _ as createVercelCacheWarmupCallback, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, g as cacheWarmupQueueConsumer, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, m as isConversationQueueMessageRejectedError, p as conversationQueueMessageSchema, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, v as registerVercelCacheWarmupDevConsumer } from "./background-compaction-queue-CnimvRdk.js";
20
- import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, y as listActiveConversationIds } from "./store-BHiaHCQu.js";
21
- import { c as coerceThreadConversationState, p as eventGuidance } from "./turn-session-routing-BVZHBFCF.js";
22
- import { o as buttonUserInputField } from "./statuses-B8mUfghF.js";
23
- import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-B8hXNVZ3.js";
24
- import { H as automationTaskSchema, N as scheduledRunSchema, U as automationTaskText, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-M3RFJUBf.js";
25
- import { $ as eventAutomationRunLimitReason, B as scheduledRunId, F as listScheduledAutomationsForTeam, H as blockEventAutomation, K as findMatchingEventAutomations, L as readScheduledAutomation, O as recordAutomationExecution, Q as admitEventAutomationRun, U as collectEventAutomationMatchKeys, V as withScheduledAutomationLock, a as getDispatchConversationId, b as existingConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, f as listPendingDispatchMailboxAppends, g as markDispatchFailed, i as createOrGetDispatch, r as confirmDispatchMailboxAppend, t as buildDispatchId, tt as automationVersionOf, u as getPluginDispatchProjection, v as notifyAutomationBlocked, z as saveScheduledAutomationInLock } from "./store-CSgUTMdv.js";
26
- import { a as runWithSlackInstallation, o as verifySlackSignature, p as joinPublicChannel, r as lookupSlackUserProfile } from "./users-BK3dbxZL.js";
27
- import { $ as slackInboundMessageId, A as resolveAllowedDomains, B as runAutoArchiveSweep, C as readConversationPendingMessages, D as isAllowedDomain, E as assertNoLegacyAllowedDomains, F as readReviewItemForUser, I as reviewItemChange, J as createProductionConversationWorkOptions, K as readObjectLinkTypes, M as ReviewItemActionError, N as actOnReviewItem, O as isAllowedSignInEmail, P as closeReviewItemsAnsweredByReply, Q as clearSlackPendingReactions, R as archiveViewerDoneConversations, S as cancelConversationPendingMessagesForViewer, U as GET$4, V as setConversationAutoArchive, X as getProductionSlackAdapter, Y as createProductionSlackWebhookServices, Z as buildSlackInboundMessage, _ as appendConversationMessageForViewer, a as pinConversation, at as createSlackWebApiStatusSender, b as decodeConversationCursor, ct as stripLeadingBotMention, dt as getThreadStopDecision, et as normalizeIncomingSlackThreadId, g as readConversationRecordFromSql, i as readConversationFeed, it as recordSkippedConversationMessage, j as stopConversation, k as readEnvList, lt as parseContent, n as steerConversationPendingMessagesForViewer, ot as bindMessageAuthorIdentityId, rt as enqueueAgentDispatch, s as readConversationDetail, st as startProcessingReaction, t as stopConversationTurnForViewer, tt as withNormalizedThreadId, ut as SubscribedReplyReason, v as createConversationForViewer, x as encodeConversationCursor } from "./stop-U7iUrR1g.js";
28
- import { s as conversationPendingMessageDeliverySchema } from "./conversation-feed-BPK8vkkZ.js";
29
- import { a as resumeConversationDelivery } from "./conversation-turn-DkJB6yMF.js";
30
- import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-g-XAaOj6.js";
31
- import { t as bindMessageAgent } from "./message-BIHR1yRk.js";
32
- import { t as bindSpawnAgent } from "./spawn-09GssFod.js";
33
- import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-bMNq0clp.js";
34
- import { t as processPluginTask } from "./task-runner-B__rxwxU.js";
35
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-BDVJjO2E.js";
36
- import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-CBW2Prb_.js";
37
- import { o as unlinkProvider } from "./connections-Dy0hPdUq.js";
38
- import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-RX24Y8aY.js";
17
+ import { C as getAuthPausedConversationTurnId, H as slackChannelMessageReplyThreadTs, R as getEventCatalog, U as slackChannelMessageRunsAutomation, V as slackChannelMessageEvent, Y as renderTaskInput, b as isExperimentalFeatureEnabled, et as renderSlackObjectCard, x as setExperimentalFeatures, y as getExperimentalFeatures, z as SLACK_EVENT_NAMESPACE } from "./session-stop-BcAXze8a.js";
18
+ import { At as MIN_WARMUP_PREFIX_TOKENS, C as listPendingAgentInvocationMailboxAppends, H as enqueueAgentInvocation, Nt as gapSegment, X as recordSubagentEnded, a as segmentGapsKey, jt as NO_REPLY_GAP_MS, kt as MINUTE_MS, n as GLOBAL_GAPS_MAX, r as GLOBAL_GAPS_TTL_MS, t as CONVERSATION_STATE_TTL_MS, w as listPendingAgentInvocationResults } from "./warmup-BW2qwnal.js";
19
+ import { E as getQueueProvider, _ as cacheWarmupQueueConsumer, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, m as isConversationQueueMessageRejectedError, p as conversationQueueMessageSchema, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, v as createVercelCacheWarmupCallback, w as queueCallback, y as registerVercelCacheWarmupDevConsumer } from "./background-compaction-queue-B6U3060-.js";
20
+ import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, y as listActiveConversationIds } from "./store-E3x2Fg_F.js";
21
+ import { c as coerceThreadConversationState, p as eventGuidance } from "./turn-session-routing-Bo_LxFum.js";
22
+ import { o as buttonUserInputField } from "./statuses-Hn-HsOph.js";
23
+ import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-goo34bJK.js";
24
+ import { H as automationTaskSchema, N as scheduledRunSchema, U as automationTaskText, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-Dw82oQ-h.js";
25
+ import { $ as eventAutomationRunLimitReason, B as scheduledRunId, F as listScheduledAutomationsForTeam, H as blockEventAutomation, K as findMatchingEventAutomations, L as readScheduledAutomation, O as recordAutomationExecution, Q as admitEventAutomationRun, U as collectEventAutomationMatchKeys, V as withScheduledAutomationLock, a as getDispatchConversationId, b as existingConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, f as listPendingDispatchMailboxAppends, g as markDispatchFailed, i as createOrGetDispatch, r as confirmDispatchMailboxAppend, t as buildDispatchId, tt as automationVersionOf, u as getPluginDispatchProjection, v as notifyAutomationBlocked, z as saveScheduledAutomationInLock } from "./store-Dkeis_8o.js";
26
+ import { a as runWithSlackInstallation, o as verifySlackSignature, p as joinPublicChannel, r as lookupSlackUserProfile } from "./users-2bggndVg.js";
27
+ import { A as resolveAllowedDomains, B as runAutoArchiveSweep, C as readConversationPendingMessages, D as isAllowedDomain, E as assertNoLegacyAllowedDomains, F as readReviewItemForUser, I as reviewItemChange, K as readObjectLinkTypes, M as ReviewItemActionError, N as actOnReviewItem, O as isAllowedSignInEmail, P as closeReviewItemsAnsweredByReply, R as archiveViewerDoneConversations, S as cancelConversationPendingMessagesForViewer, U as GET$4, V as setConversationAutoArchive, X as isPublicAddress, Z as publicAddressLookup, _ as appendConversationMessageForViewer, _t as SubscribedReplyReason, a as pinConversation, at as slackInboundMessageId, b as decodeConversationCursor, dt as recordSkippedConversationMessage, et as createProductionConversationWorkOptions, ft as createSlackWebApiStatusSender, g as readConversationRecordFromSql, gt as parseContent, ht as stripLeadingBotMention, i as readConversationFeed, it as clearSlackPendingReactions, j as stopConversation, k as readEnvList, lt as enqueueAgentDispatch, mt as startProcessingReaction, n as steerConversationPendingMessagesForViewer, nt as getProductionSlackAdapter, ot as normalizeIncomingSlackThreadId, pt as bindMessageAuthorIdentityId, rt as buildSlackInboundMessage, s as readConversationDetail, st as withNormalizedThreadId, t as stopConversationTurnForViewer, tt as createProductionSlackWebhookServices, ut as failStoppedDispatch, v as createConversationForViewer, vt as getThreadStopDecision, x as encodeConversationCursor } from "./stop-CFOujp8C.js";
28
+ import { s as conversationPendingMessageDeliverySchema } from "./conversation-feed-CcDxlrlQ.js";
29
+ import { a as resumeConversationDelivery } from "./conversation-turn-Cxl8WZD7.js";
30
+ import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-PVBeU0Wf.js";
31
+ import { t as bindMessageAgent } from "./message-dkOl-Iii.js";
32
+ import { t as bindSpawnAgent } from "./spawn-C7o0FDDp.js";
33
+ import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-D-hCqdZW.js";
34
+ import { t as processPluginTask } from "./task-runner-vohUPLHe.js";
35
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-BbWikeSa.js";
36
+ import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-BBX07Jzt.js";
37
+ import { o as unlinkProvider } from "./connections-DZjTN3JC.js";
38
+ import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-C49ClwDX.js";
39
39
  import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
40
- import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-BcDIWo67.js";
41
- import { t as processConversationWork } from "./worker-D8jJO-WO.js";
40
+ import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-CzQonuWz.js";
41
+ import { t as processConversationWork } from "./worker-Cbd-iuwZ.js";
42
42
  import { createRequire } from "node:module";
43
43
  import { Hono } from "hono";
44
44
  import * as z from "zod";
@@ -54,7 +54,6 @@ import { HTTPException } from "hono/http-exception";
54
54
  import https from "node:https";
55
55
  import { Message, ThreadImpl } from "chat";
56
56
  import * as acp from "@agentclientprotocol/sdk";
57
- import dns from "node:dns";
58
57
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
59
58
  import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
60
59
  import { bodyLimit } from "hono/body-limit";
@@ -1376,7 +1375,17 @@ async function runScheduledAutomationHeartbeat(args) {
1376
1375
  dispatch,
1377
1376
  nowMs: args.nowMs,
1378
1377
  run
1379
- })) processedCount += 1;
1378
+ })) {
1379
+ processedCount += 1;
1380
+ continue;
1381
+ }
1382
+ if (!isTerminalDispatchStatus(dispatch.status) && args.nowMs - (run.startedAtMs ?? run.claimedAtMs) > 864e5) await finishClaimedRun({
1383
+ db,
1384
+ errorMessage: "Scheduled automation run did not finish within 24 hours.",
1385
+ nowMs: args.nowMs,
1386
+ run,
1387
+ status: "failed"
1388
+ });
1380
1389
  }
1381
1390
  for (let index = processedCount; index < SCHEDULED_AUTOMATION_HEARTBEAT_LIMIT; index += 1) {
1382
1391
  const run = await claimDueScheduledRun(db, { nowMs: args.nowMs });
@@ -1568,8 +1577,12 @@ async function recoverPendingAgentInvocationResults(args) {
1568
1577
  async function runHeartbeat(args) {
1569
1578
  const queue = args.conversationWorkQueue ?? getVercelConversationWorkQueue();
1570
1579
  const events = args.events ?? createEventAppPublisher({ conversationWork: () => ({ queue }) });
1580
+ const endStoppedChildWork = createEndStoppedChildWork({ queue });
1571
1581
  await recoverConversationWork({
1572
- beforeWorkStops: createEndStoppedChildWork({ queue }),
1582
+ beforeWorkStops: async (conversationId, inboundMessageIds) => {
1583
+ await endStoppedChildWork(conversationId, inboundMessageIds);
1584
+ await failStoppedDispatch(conversationId);
1585
+ },
1573
1586
  nowMs: args.nowMs,
1574
1587
  queue
1575
1588
  });
@@ -3559,6 +3572,7 @@ async function processConversationQueueMessage(message, options, metadata) {
3559
3572
  return await withSpan("conversation.work.process", "queue.process", { conversationId: parsed.conversationId }, async (setSpanAttributes) => {
3560
3573
  try {
3561
3574
  const result = await processConversationWork(parsed, {
3575
+ beforeWorkStops: options.beforeWorkStops,
3562
3576
  checkInIntervalMs: options.checkInIntervalMs,
3563
3577
  conversationStore: options.conversationStore,
3564
3578
  getSlackAdapter: options.getSlackAdapter,
@@ -3878,7 +3892,7 @@ const LOOPBACK_HOSTNAMES = [
3878
3892
  function resolvePublicOrigin(request, configured) {
3879
3893
  const value = configured?.trim();
3880
3894
  let origin;
3881
- if (value) origin = /^https?:\/\//.test(value) ? value : `https://${value}`;
3895
+ if (value) origin = value.startsWith("https://") || value.startsWith("http://") ? value : `https://${value}`;
3882
3896
  else {
3883
3897
  const requestURL = new URL(request.url);
3884
3898
  if (!LOOPBACK_HOSTNAMES.includes(requestURL.hostname)) return void 0;
@@ -5474,184 +5488,6 @@ ${page.bodyHtml}
5474
5488
  }
5475
5489
  });
5476
5490
  }
5477
- // src/net/public-address.ts
5478
- /**
5479
- * Own the public-address rule for fetches of URLs that any person can submit.
5480
- *
5481
- * Such a fetch must not reach loopback, private, link-local, cloud metadata,
5482
- * or other special addresses. The lookup checks every resolved address at
5483
- * connect time, so a second DNS answer cannot move the request to a blocked
5484
- * address.
5485
- */
5486
- /** Special-use ranges from RFC 6890 and the IANA special-purpose registries. */
5487
- const BLOCKED_SUBNETS = [
5488
- [
5489
- "0.0.0.0",
5490
- 8,
5491
- "ipv4"
5492
- ],
5493
- [
5494
- "10.0.0.0",
5495
- 8,
5496
- "ipv4"
5497
- ],
5498
- [
5499
- "100.64.0.0",
5500
- 10,
5501
- "ipv4"
5502
- ],
5503
- [
5504
- "127.0.0.0",
5505
- 8,
5506
- "ipv4"
5507
- ],
5508
- [
5509
- "169.254.0.0",
5510
- 16,
5511
- "ipv4"
5512
- ],
5513
- [
5514
- "172.16.0.0",
5515
- 12,
5516
- "ipv4"
5517
- ],
5518
- [
5519
- "192.0.0.0",
5520
- 24,
5521
- "ipv4"
5522
- ],
5523
- [
5524
- "192.0.2.0",
5525
- 24,
5526
- "ipv4"
5527
- ],
5528
- [
5529
- "192.168.0.0",
5530
- 16,
5531
- "ipv4"
5532
- ],
5533
- [
5534
- "198.18.0.0",
5535
- 15,
5536
- "ipv4"
5537
- ],
5538
- [
5539
- "198.51.100.0",
5540
- 24,
5541
- "ipv4"
5542
- ],
5543
- [
5544
- "203.0.113.0",
5545
- 24,
5546
- "ipv4"
5547
- ],
5548
- [
5549
- "224.0.0.0",
5550
- 4,
5551
- "ipv4"
5552
- ],
5553
- [
5554
- "240.0.0.0",
5555
- 4,
5556
- "ipv4"
5557
- ],
5558
- [
5559
- "::",
5560
- 96,
5561
- "ipv6"
5562
- ],
5563
- [
5564
- "64:ff9b::",
5565
- 96,
5566
- "ipv6"
5567
- ],
5568
- [
5569
- "64:ff9b:1::",
5570
- 48,
5571
- "ipv6"
5572
- ],
5573
- [
5574
- "100::",
5575
- 64,
5576
- "ipv6"
5577
- ],
5578
- [
5579
- "2001::",
5580
- 32,
5581
- "ipv6"
5582
- ],
5583
- [
5584
- "2001:db8::",
5585
- 32,
5586
- "ipv6"
5587
- ],
5588
- [
5589
- "2002::",
5590
- 16,
5591
- "ipv6"
5592
- ],
5593
- [
5594
- "fc00::",
5595
- 7,
5596
- "ipv6"
5597
- ],
5598
- [
5599
- "fe80::",
5600
- 10,
5601
- "ipv6"
5602
- ],
5603
- [
5604
- "fec0::",
5605
- 10,
5606
- "ipv6"
5607
- ],
5608
- [
5609
- "ff00::",
5610
- 8,
5611
- "ipv6"
5612
- ]
5613
- ];
5614
- function blockedAddressList() {
5615
- const list = new net.BlockList();
5616
- for (const [network, prefix, family] of BLOCKED_SUBNETS) list.addSubnet(network, prefix, family);
5617
- return list;
5618
- }
5619
- const blockedAddresses = blockedAddressList();
5620
- /** Return true only for an IP address outside every blocked range. */
5621
- function isPublicAddress(address) {
5622
- const family = net.isIP(address);
5623
- if (family === 0) return false;
5624
- return !blockedAddresses.check(address, family === 4 ? "ipv4" : "ipv6");
5625
- }
5626
- function blockedAddressError(hostname) {
5627
- return Object.assign(/* @__PURE__ */ new Error(`${hostname} does not resolve to a public address`), { code: "EADDRNOTPUBLIC" });
5628
- }
5629
- /**
5630
- * Resolve a hostname for an outbound socket. Fail when any answer is not a
5631
- * public address.
5632
- */
5633
- const publicAddressLookup = (hostname, options, callback) => {
5634
- dns.lookup(hostname, {
5635
- all: true,
5636
- verbatim: true
5637
- }, (error, addresses) => {
5638
- if (error) {
5639
- callback(error, "", 0);
5640
- return;
5641
- }
5642
- const allowed = addresses.filter((entry) => !options.family || entry.family === options.family || `IPv${entry.family}` === options.family);
5643
- const first = allowed[0];
5644
- if (!first || !addresses.every((entry) => isPublicAddress(entry.address))) {
5645
- callback(blockedAddressError(hostname), "", 0);
5646
- return;
5647
- }
5648
- if (options.all) {
5649
- callback(null, allowed);
5650
- return;
5651
- }
5652
- callback(null, first.address, first.family);
5653
- });
5654
- };
5655
5491
  // src/api/mcp/oauth/state.ts
5656
5492
  /** Return the SHA-256 hex digest of a secret or unbounded value. */
5657
5493
  function sha256Hex(value) {
@@ -7613,7 +7449,7 @@ function trimSlashes(value, leading) {
7613
7449
  return value.slice(start, end);
7614
7450
  }
7615
7451
  function withHttps(host) {
7616
- return /^https?:\/\//.test(host) ? host : `https://${host}`;
7452
+ return host.startsWith("https://") || host.startsWith("http://") ? host : `https://${host}`;
7617
7453
  }
7618
7454
  /** Resolve sign-in settings from dashboard options and environment. */
7619
7455
  function resolveSignInAuthConfig(agentName, allowedDomains, options = {}) {
@@ -7853,6 +7689,7 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
7853
7689
  "/api/connections/*",
7854
7690
  "/api/notifications",
7855
7691
  "/api/notifications/*",
7692
+ "/api/images/*",
7856
7693
  "/api/objects",
7857
7694
  "/api/stats",
7858
7695
  "/api/reply-times",
@@ -7948,7 +7785,7 @@ function resolvePublicBaseURL(dashboard) {
7948
7785
  if (configured) return configured;
7949
7786
  const vercelURL = process.env.VERCEL_PROJECT_PRODUCTION_URL?.trim() || process.env.VERCEL_URL?.trim();
7950
7787
  if (!vercelURL) return void 0;
7951
- return /^https?:\/\//.test(vercelURL) ? vercelURL : `https://${vercelURL}`;
7788
+ return vercelURL.startsWith("https://") || vercelURL.startsWith("http://") ? vercelURL : `https://${vercelURL}`;
7952
7789
  }
7953
7790
  /** Build a `WaitUntilFn`, preferring Vercel's lifetime extension when available. */
7954
7791
  async function defaultWaitUntil() {
@@ -8085,6 +7922,7 @@ async function createApp(options) {
8085
7922
  warnUnregisteredConfigDefaults(options?.configDefaults);
8086
7923
  resetRuntimeConfig(virtualConfig?.functionMaxDurationSeconds);
8087
7924
  setBotModelConfig(options ?? {});
7925
+ setBotName(options?.botName);
8088
7926
  setRuntimeLimits(options?.limits);
8089
7927
  setSlackReactionConfig(options?.slack ?? {});
8090
7928
  assertNoLegacyAllowedDomains(Object.keys(dashboard ?? {}));
@@ -1,5 +1,5 @@
1
1
  import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
2
- import { i as actorIdentitySchema } from "./conversation-fCWD9Az3.js";
2
+ import { i as actorIdentitySchema } from "./conversation-Dyjq2CZ8.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/automations/task.ts
@@ -439,7 +439,7 @@ const automationTitleSchema = z.string().trim().min(1).max(60);
439
439
  */
440
440
  const automationInstructionToolSchema = automationTaskTextSchema.describe("Work to perform when the Automation runs. Say what to do, what to post, and when to post nothing. Do not say where to post: the outcomes set that, a run triggered by a Slack message replies in its thread, and each run ends with one message at most. The run does not see this conversation, so words like \"this channel\" or \"here\" will mean nothing then. Where the run reads or changes something, write the exact target, such as a channel mention, a repo, or a link. Call the person who created the Automation \"the Automation creator\", not \"me\"; each run knows who that is. Name every other person with their Slack mention, such as <@U123>, including a requester who did not create the Automation. Preserve the user's scope, targets, and constraints. Do not add permissions or side effects the user did not request.");
441
441
  /** Context input for agent tools. It follows the same rules as an instruction. */
442
- const automationContextToolSchema = automationTaskTextSchema.describe("What a skill run needs beyond the skill, such as a repo, a threshold, or who to tag. Leave out what the skill already says. Follow the same rules as an instruction: do not say where to post, write exact targets, call the creator \"the Automation creator\", and name other people with their Slack mention.");
442
+ const automationContextToolSchema = automationTaskTextSchema.describe("What a skill run needs beyond the skill, such as a repo, a threshold, or who to tag. Leave out what the skill says. Use instruction rules: do not say where to post, write exact targets, call the creator \"the Automation creator\", and tag others as <@U123>.");
443
443
  const automationEditFieldsSchema = z.object({
444
444
  title: automationTitleSchema.optional(),
445
445
  /** Replaces the whole task, so a mode switch drops the other mode's text. */
@@ -1,5 +1,5 @@
1
- import { i as getChatConfig } from "./config-CAXIpWQb.js";
2
- import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-DPLEa8Bn.js";
1
+ import { i as getChatConfig } from "./config-9nHoFiJP.js";
2
+ import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-BIclibct.js";
3
3
  import { t as readJuniorSecret } from "./secrets-DebYU866.js";
4
4
  import * as z from "zod";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -369,7 +369,7 @@ function cacheWarmupCallback() {
369
369
  maxDeliveries: 1,
370
370
  onRejected: logCacheWarmupRejected,
371
371
  run: async (message) => {
372
- const { runCacheWarmup } = await import("./warmup-9ySPacF9.js").then((n) => n.o);
372
+ const { runCacheWarmup } = await import("./warmup-BW2qwnal.js").then((n) => n.o);
373
373
  await runCacheWarmup(message);
374
374
  },
375
375
  skip: () => !getChatConfig().cacheWarmingEnabled,
@@ -408,6 +408,10 @@ var ConversationQueueMessageRejectedError = class extends Error {
408
408
  function isConversationQueueMessageRejectedError(error) {
409
409
  return error instanceof ConversationQueueMessageRejectedError;
410
410
  }
411
+ /** Build the idempotency key of a wake that one worker event sends. */
412
+ function nudgeIdempotencyKey(reason, conversationId, nowMs) {
413
+ return `${reason}:${conversationId}:${nowMs}`;
414
+ }
411
415
  // src/chat/task-execution/queue-signing.ts
412
416
  const conversationQueueSign = {
413
417
  context: "junior.conversation_work_queue.v2",
@@ -539,4 +543,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
539
543
  retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
540
544
  });
541
545
  } };
542
- export { queueCallback as C, verifyQueueMessage as S, getQueueProvider as T, createVercelCacheWarmupCallback as _, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as a, QUEUE_SIGNATURE_MAX_AGE_MS as b, verifyWorkspaceSnapshotJobMessage as c, verifyConversationQueueMessage as d, ConversationQueueMessageRejectedError as f, cacheWarmupQueueConsumer as g, CACHE_WARMUP_QUEUE_TOPIC as h, verifyBackgroundCompactionMessage as i, getVercelConversationWorkQueue as l, isConversationQueueMessageRejectedError as m, backgroundCompactionId as n, sendNextWorkspaceSnapshotJob as o, conversationQueueMessageSchema as p, vercelBackgroundCompactionQueue as r, sendWorkspaceSnapshotJob as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, resolveConversationWorkQueueTopic as u, registerVercelCacheWarmupDevConsumer as v, getTurnRequestDeadline as w, signQueueMessage as x, sendCacheWarmup as y };
546
+ export { verifyQueueMessage as C, getQueueProvider as E, signQueueMessage as S, getTurnRequestDeadline as T, cacheWarmupQueueConsumer as _, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as a, sendCacheWarmup as b, verifyWorkspaceSnapshotJobMessage as c, verifyConversationQueueMessage as d, ConversationQueueMessageRejectedError as f, CACHE_WARMUP_QUEUE_TOPIC as g, nudgeIdempotencyKey as h, verifyBackgroundCompactionMessage as i, getVercelConversationWorkQueue as l, isConversationQueueMessageRejectedError as m, backgroundCompactionId as n, sendNextWorkspaceSnapshotJob as o, conversationQueueMessageSchema as p, vercelBackgroundCompactionQueue as r, sendWorkspaceSnapshotJob as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, resolveConversationWorkQueueTopic as u, createVercelCacheWarmupCallback as v, queueCallback as w, QUEUE_SIGNATURE_MAX_AGE_MS as x, registerVercelCacheWarmupDevConsumer as y };
@@ -1,5 +1,5 @@
1
- import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-4M98h_tC.js";
2
- import { Q as briefResourceLabel, Y as briefCodeChangeSchema, d as conversationEventPageSchema, et as parseBriefInput, l as conversationDetailReportSchema } from "./conversation-fCWD9Az3.js";
1
+ import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-B1Xw46-S.js";
2
+ import { $ as briefResourceLabel, X as briefCodeChangeSchema, f as conversationEventPageSchema, tt as parseBriefInput, u as conversationDetailReportSchema } from "./conversation-Dyjq2CZ8.js";
3
3
  import { CLI_USAGE } from "./cli/run.js";
4
4
  import * as z from "zod";
5
5
  import path from "node:path";
@@ -262,7 +262,7 @@ async function parseRunOptions(argv) {
262
262
  * token.
263
263
  */
264
264
  async function configuredBriefModelId() {
265
- const { botConfig } = await import("./config-CAXIpWQb.js").then((n) => n.r);
265
+ const { botConfig } = await import("./config-9nHoFiJP.js").then((n) => n.r);
266
266
  return botConfig.fastModelId;
267
267
  }
268
268
  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-BTKmKM-r.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-BmP5vnlj.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-Ciet8_nn.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-bY4_0UPm.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";
@@ -98,11 +98,11 @@ async function loadLocalPluginSet() {
98
98
  /** Configure plugin hooks after local chat has selected its state adapter. */
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
- import("../plugins-CBW2Prb_.js").then((n) => n.o),
102
- import("../projection-DEdP1q6f.js").then((n) => n.nr),
103
- import("../catalog-runtime-DaBaHY7u.js").then((n) => n.t),
104
- import("../validation-BDVJjO2E.js").then((n) => n.r),
105
- import("../db-COYOGzYS.js").then((n) => n.n)
101
+ import("../plugins-BBX07Jzt.js").then((n) => n.o),
102
+ import("../projection-w_X-zi7v.js").then((n) => n.nr),
103
+ import("../catalog-runtime-D1oYNv04.js").then((n) => n.t),
104
+ import("../validation-BbWikeSa.js").then((n) => n.r),
105
+ import("../db-BJNo6fK5.js").then((n) => n.n)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,19 +152,19 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../projection-DEdP1q6f.js").then((n) => n.hr);
155
+ const { setBriefsConfig } = await import("../projection-w_X-zi7v.js").then((n) => n.hr);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-BlPSA5A8.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-R7qvSzFG.js");
157
+ const { runLocalAgentTurn } = await import("../runner-DKrfvNV6.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-WmpjfJgQ.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-DRzq73b6.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Pai-MzEY.js");
161
- const { bindSpawnAgent } = await import("../spawn-09GssFod.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-BIHR1yRk.js").then((n) => n.n);
163
- const { createChildConversationWorker, createDeliverToParent } = await import("../result-g-XAaOj6.js").then((n) => n.o);
164
- const { createConversationTurnWorker } = await import("../conversation-turn-DkJB6yMF.js").then((n) => n.t);
165
- const { skipInputAfterConversationStop } = await import("../session-stop-2XJrcNCy.js").then((n) => n.a);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DsUcqrI0.js");
161
+ const { bindSpawnAgent } = await import("../spawn-C7o0FDDp.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-dkOl-Iii.js").then((n) => n.n);
163
+ const { createChildConversationWorker, createDeliverToParent } = await import("../result-PVBeU0Wf.js").then((n) => n.o);
164
+ const { createConversationTurnWorker } = await import("../conversation-turn-Cxl8WZD7.js").then((n) => n.t);
165
+ const { skipInputAfterConversationStop } = await import("../session-stop-BcAXze8a.js").then((n) => n.a);
166
166
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
167
- const { processConversationWork } = await import("../worker-D8jJO-WO.js").then((n) => n.n);
167
+ const { processConversationWork } = await import("../worker-Cbd-iuwZ.js").then((n) => n.n);
168
168
  let agentRunner;
169
169
  const localConversationWork = createLocalConversationWork(async (message) => {
170
170
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-DPLEa8Bn.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BTKmKM-r.js";
3
- import { i as parseSkillFile } from "../skills-DpBQoeHV.js";
1
+ import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BIclibct.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BmP5vnlj.js";
3
+ import { i as parseSkillFile } from "../skills-DfsazET6.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
@@ -45,13 +45,13 @@ async function runChat(argv, pluginSet) {
45
45
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
46
46
  }
47
47
  async function runAdmin(argv) {
48
- return await (await import("../admin-1VwEXztm.js")).runAdmin(argv);
48
+ return await (await import("../admin-UrTniSPO.js")).runAdmin(argv);
49
49
  }
50
50
  async function runServiceAccount(argv) {
51
- return await (await import("../service-account-BYGZ08DQ.js")).runServiceAccount(argv);
51
+ return await (await import("../service-account-CMAAloAL.js")).runServiceAccount(argv);
52
52
  }
53
53
  async function runBriefs(argv) {
54
- return await (await import("../briefs-CwzvgdCa.js")).runBriefs(argv);
54
+ return await (await import("../briefs-DqiwWu-n.js")).runBriefs(argv);
55
55
  }
56
56
  function topLevelCommand(argv) {
57
57
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,8 +1,8 @@
1
- import { Oo as createPluginLogger, fr as setPlugins, pr as validatePlugins } from "../projection-DEdP1q6f.js";
2
- import { o as getDb } from "../db-COYOGzYS.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DaBaHY7u.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BDVJjO2E.js";
5
- import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-CBW2Prb_.js";
1
+ import { fr as setPlugins, ho as createPluginLogger, pr as validatePlugins } from "../projection-w_X-zi7v.js";
2
+ import { o as getDb } from "../db-BJNo6fK5.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-D1oYNv04.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BbWikeSa.js";
5
+ import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-BBX07Jzt.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
8
8
  import { createJiti } from "jiti";
@@ -1,7 +1,7 @@
1
- import { Qi as create, so as SANDBOX_RUNTIME } from "../projection-DEdP1q6f.js";
2
- import { t as disconnectStateAdapter } from "../adapter-AgCNqqsG.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DaBaHY7u.js";
4
- import { n as resolve } from "../resolve-B8hXNVZ3.js";
1
+ import { $i as create, Ya as SANDBOX_RUNTIME } from "../projection-w_X-zi7v.js";
2
+ import { t as disconnectStateAdapter } from "../adapter-S5UkjNK3.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-D1oYNv04.js";
4
+ import { n as resolve } from "../resolve-goo34bJK.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
7
7
  function progressMessage(phase) {
@@ -1,4 +1,4 @@
1
- import "../db-B07FtU9g.js";
1
+ import "../db-2resqBh1.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,7 +1,7 @@
1
- import { i as getChatConfig } from "../config-CAXIpWQb.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-BWmAgSyi.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-BTKmKM-r.js";
4
- import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-CBW2Prb_.js";
1
+ import { i as getChatConfig } from "../config-9nHoFiJP.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-DBIaOeJ_.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-BmP5vnlj.js";
4
+ import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-BBX07Jzt.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
7
7
  import { createHash } from "node:crypto";