@sentry/junior 0.285.0 → 0.287.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-DN5AB4VU.js → adapter-CL-HUKgd.js} +1 -1
  2. package/dist/{admin-DOITMKnn.js → admin-C9urXVfi.js} +2 -1
  3. package/dist/{agent-runner-BsWhHe4N.js → agent-runner-Bfnw551N.js} +2174 -1323
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +7 -7
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +73 -112
  8. package/dist/{app-DyMs9330.d.ts → app-DBY5TnfY.d.ts} +2 -3
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +72 -42
  11. package/dist/{assistant-reply-9Jip5bsr.js → assistant-reply-u_PRYzuz.js} +1 -1
  12. package/dist/{automation-Mk8aaHzy.js → automation-DksGNDRO.js} +3 -6
  13. package/dist/{background-compaction-queue-DXkLsWoH.js → background-compaction-queue-CYI909P5.js} +137 -3
  14. package/dist/{briefs-Cl8-nK9B.js → briefs-DaXiMWzT.js} +6 -5
  15. package/dist/{catalog-runtime-Bte6jRB2.js → catalog-runtime-BCIuBe4d.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 +5 -6
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-DDbBucBw.js → config-CkHcUMN7.js} +580 -3
  24. package/dist/{connections-DA4LT9LL.js → connections-BnIj0wtx.js} +16 -50
  25. package/dist/{conversation-D8kVoCrP.js → conversation-E7ZPJx2H.js} +22 -6
  26. package/dist/{conversation-pending-messages-BvROq1bq.js → conversation-pending-messages-DVch6YQw.js} +2 -5
  27. package/dist/{conversation-privacy-D0j_h70R.js → conversation-privacy-DF1hW0ja.js} +1 -1
  28. package/dist/{credential-sync-hcsYatw-.js → credential-sync-CzMar9hq.js} +13 -13
  29. package/dist/{viewer-1Ea81s0b.js → db-DJ11eZqq.js} +64 -367
  30. package/dist/{db-BhHZSuFw.d.ts → db-YDKKDxlh.d.ts} +4 -4
  31. package/dist/{executor-BLEMIgIZ.js → executor-BY9TB31g.js} +20 -19
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{logging-BfORLKoq.js → logging-BO5zU6Mt.js} +1 -1
  34. package/dist/{media-Bu9C6lz0.js → media-Cz1ZiV1U.js} +16 -4
  35. package/dist/{message-DqjuKzUx.js → message-CsUbuEc8.js} +10 -10
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +2 -3
  38. package/dist/{oauth-callback-server-CFSRzu1n.js → oauth-callback-server-hiDKK0_n.js} +2 -2
  39. package/dist/{projection-DliWYrnT.js → projection-CL_YWeGf.js} +352 -356
  40. package/dist/{prompt-BvIUzY4y.js → prompt-BHOEQSmf.js} +182 -2
  41. package/dist/{registry-rC7MCxu8.js → registry-BriFLnaJ.js} +1 -1
  42. package/dist/{reporting-window-B4TwyuJo.js → reporting-window-B3Ze-Qnt.js} +4 -1
  43. package/dist/{resolve-Biu8Qw3u.js → resolve-Bt6GgAiA.js} +3 -3
  44. package/dist/{result-DxJMCX47.js → result-Bo1TZu0Q.js} +8 -8
  45. package/dist/{runner-BQJSFLKg.js → runner-D3YeCQgt.js} +16 -12
  46. package/dist/{sandbox-egress-signals-6aMxJSDn.js → sandbox-egress-signals-CcnSPP4S.js} +1 -1
  47. package/dist/{schema-BasXTvi2.js → schema-BWE3RJEB.js} +19 -7
  48. package/dist/{schema-BUviRAs8.d.ts → schema-C6fsEwjo.d.ts} +90 -8
  49. package/dist/{service-account-BI5Wgx22.js → service-account-DiQQuuw7.js} +3 -3
  50. package/dist/{service-account-CAE-_1dR.js → service-account-r6fl0b-9.js} +3 -3
  51. package/dist/{session-stop-CA-jOJ84.js → session-stop-B2Nut40V.js} +27 -25
  52. package/dist/{skills-B22duVJU.js → skills-CD5aJdzg.js} +2 -2
  53. package/dist/spawn-CalgZQiu.js +79 -0
  54. package/dist/{stop-DioIcEAu.js → stop-kujZLbi0.js} +233 -1127
  55. package/dist/{store-Dn4W7qgH.js → store-DdIEUL1q.js} +3 -3
  56. package/dist/{turn-session-routing-CGMKrYOj.js → task-runner-D_RDr2Hu.js} +1440 -993
  57. package/dist/{store-B26LV6UP.js → turn-failure-response-B5nV1Er-.js} +337 -6
  58. package/dist/{validation-TzhfQABF.js → validation-K4pqwoVZ.js} +1 -1
  59. package/dist/{version-DSk8CFvA.js → version-DBvhk1X9.js} +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/viewer-DrMmFUul.js +337 -0
  62. package/dist/{work-ybG4_q5C.js → work-ljRoODGu.js} +110 -94
  63. package/dist/{worker-ccSyZRNz.js → worker-CYO1Q0Js.js} +5 -6
  64. package/migrations/0086_shared_archive.sql +31 -0
  65. package/migrations/0087_child_location.sql +64 -0
  66. package/migrations/0088_conversation_unsubscribe.sql +1 -0
  67. package/migrations/meta/0086_snapshot.json +4366 -0
  68. package/migrations/meta/0087_snapshot.json +4366 -0
  69. package/migrations/meta/0088_snapshot.json +4372 -0
  70. package/migrations/meta/_journal.json +21 -0
  71. package/package.json +5 -4
  72. package/dist/config-DqFnykQT.js +0 -579
  73. package/dist/spawn-BB2_4VYn.js +0 -31
  74. package/dist/task-queue-Bt0IoR2i.js +0 -139
  75. package/dist/task-runner-D8lddjzp.js +0 -290
  76. package/dist/thread-state-CrFk3K_7.js +0 -173
  77. package/dist/turn-failure-response-DaJ04qVj.js +0 -224
  78. package/dist/turn-lifecycle-C2mXS7AZ.js +0 -58
package/dist/app.js CHANGED
@@ -1,41 +1,39 @@
1
1
  import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
2
- import { $i as slackEntitySchema, $r as verifyEventAutomationCredentialSubject, Ai as isVercelSandboxEgressRequest, Bo as setConfigDefaults, Ca as consumeSandboxEgressPermissionDeniedSignal, Co as resolveRootVisibility, Ct as hasRunnableConversationWork, Eo as listConversationAnnotations, Fa as createPluginEmbedder, Fi as resolveBaseUrl, Hn as getPluginRoutes, Hr as collectEventMatchKeys, Ji as postSlackEphemeralMessage, Jn as setPlugins, Kr as findMatchingWatches, Mn as isExperimentalFeatureEnabled, Nn as setExperimentalFeatures, Pn as createUserTokenStore, Qa as readConversationAccessFromSql, Qn as setBriefsConfig, Qr as bindSlackDirectCredentialSubject, Sa as consumeSandboxEgressAuthRequiredSignal, Ta as parseSandboxEgressCredentialToken, Tt as isInvalidConversationRecordError, Vi as slackMention, Vn as getPluginApiRoutes, Xr as bindEventAutomationCredentialSubject, Ya as createPluginLogger, Yn as validatePlugins, Yr as takeDueTimerWatches, Zr as bindScheduledAutomationCredentialSubject, _ as appendConversationMessages, _r as searchReviewItems, aa as getSlackClient, ci as getDashboardTaskLink, da as getWorkspaceTeamId, di as createPluginState, do as readConversationEventPageAfter, ea as slackExternalRefIdSchema, ei as verifyScheduledAutomationCredentialSubject, fa as runWithWorkspaceTeamId, ii as getDashboardConversationLink, ji as proxyVercelSandboxEgressRequest, jn as getExperimentalFeatures, jo as createPluginCache, ka as normalizeSandboxEgressTracePropagationDomains, kr as reviewItemReaderForUser, li as setDashboardConversationLinkOptions, mo as readConversationMessageEventSeq, oi as getDashboardReviewItemLink, ot as CONVERSATION_WORK_STALE_ENQUEUE_MS, po as readConversationLastEventSeq, qi as openSlackModal, qn as getPlugins, sa as isDmChannel, ti as verifySlackDirectCredentialSubject, uo as readConversationEventPage, ur as dismissOpenReviewItems, w as settleConversationTitleWork, wn as getThreadStopDecision, x as projectConversationMessages, xa as clearSandboxEgressSignals, xn as SubscribedReplyReason, xr as canActOnReviewItem, zo as getConfigDefaults } from "./projection-DliWYrnT.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-DqFnykQT.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-BfORLKoq.js";
5
- import { t as JUNIOR_VERSION } from "./version-DSk8CFvA.js";
2
+ import { $a as createPluginLogger, $n as validatePlugins, $r as takeDueTimerWatches, Da as consumeSandboxEgressPermissionDeniedSignal, Dn as getThreadStopDecision, Dt as isInvalidConversationRecordError, Ea as consumeSandboxEgressAuthRequiredSignal, Eo as resolveRootVisibility, Fi as proxyVercelSandboxEgressRequest, Fn as getExperimentalFeatures, Fo as createPluginCache, Gi as slackMention, Gn as getPluginApiRoutes, Ho as setConfigDefaults, In as isExperimentalFeatureEnabled, Kn as getPluginRoutes, Kr as collectEventMatchKeys, Ln as setExperimentalFeatures, Na as normalizeSandboxEgressTracePropagationDomains, Nr as reviewItemReaderForUser, Pi as isVercelSandboxEgressRequest, Qi as postSlackEphemeralMessage, Qn as setPlugins, Rn as createUserTokenStore, S as projectConversationMessages, Ta as clearSandboxEgressSignals, Tr as canActOnReviewItem, Tt as hasRunnableConversationWork, Vo as getConfigDefaults, Xr as findMatchingWatches, Zi as openSlackModal, Zn as getPlugins, _ as appendConversationMessages, _o as readConversationMessageEventSeq, ai as verifySlackDirectCredentialSubject, ci as getDashboardConversationLink, ct as CONVERSATION_WORK_STALE_ENQUEUE_MS, da as isDmChannel, ei as bindEventAutomationCredentialSubject, fi as getDashboardTaskLink, ga as runWithWorkspaceTeamId, go as readConversationLastEventSeq, ha as getWorkspaceTeamId, hi as createPluginState, ia as slackExternalRefIdSchema, ii as verifyScheduledAutomationCredentialSubject, ka as parseSandboxEgressCredentialToken, ko as listConversationAnnotations, la as getSlackClient, mo as readConversationEventPageAfter, mr as dismissOpenReviewItems, ni as bindSlackDirectCredentialSubject, no as readConversationAccessFromSql, nr as setBriefsConfig, pi as setDashboardConversationLinkOptions, po as readConversationEventPage, ra as slackEntitySchema, ri as verifyEventAutomationCredentialSubject, ti as bindScheduledAutomationCredentialSubject, ui as getDashboardReviewItemLink, w as settleConversationTitleWork, wn as SubscribedReplyReason, xr as searchReviewItems, za as createPluginEmbedder, zi as resolveBaseUrl } from "./projection-CL_YWeGf.js";
3
+ import { H 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-CkHcUMN7.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-BO5zU6Mt.js";
5
+ import { t as JUNIOR_VERSION } from "./version-DBvhk1X9.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, I as withConversationMutationLock, S as getDb, U as resolveActorIdentityId, Y as recordGoogleSignIn, _ as closeDb, g as createCache, i as readActorIdentity, k as withConversationEventLock, l as resolveViewerUser, lt as createSlackDestination, nt as touchConversationDetail, p as parseAvatarUrl, x as getConversationStore, y as getConversationEventStore } from "./viewer-1Ea81s0b.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-BLEMIgIZ.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Bte6jRB2.js";
10
- import { $ as readViewerAutomationSummary, A as runWithSlackInstallation, C as readSlackReviewItemCardConversationId, Ct as recordSubagentEnded, D as parseSlackReviewItemClick, E as buildSlackReviewItemModal, H as logScheduledAutomationRunSkipped, M as parseSlackThreadId, Mt as processWorkspaceSnapshotJob, Nt as ingestEvent, O as parseSlackReviewItemFormTarget, S as createSlackReviewItemShow, U as scheduledAutomationRunAttributes, Y as ViewerTaskNotFoundError, Z as readViewerAutomationExecutions, _ as readPublicArtifact, _t as collectAttachmentGarbage, at as deliverReviewItemChange, g as publicArtifactHeaders, j as verifySlackSignature, k as parseSlackUserInputSubmission, lt as appendAndEnqueueWebMessage, mt as webActorFromUser, n as executeAgentRun, ot as renderReviewItemMessage, pt as recordWebConversationActivity, r as processBackgroundCompaction, rt as effectiveTaskOutcomes, st as reviewItemChangeRecord, t as createAgentRunner, tt as readViewerAutomations, ut as conversationTurnIdForMessage, v as unpublishedArtifactHeaders, w as syncReviewItemSlackCards, y as lookupSlackUserProfile, yt as requestAttachmentDeletion, z as joinPublicChannel } from "./agent-runner-BsWhHe4N.js";
7
+ import { B as touchConversationDetail, D as resolveActorIdentityId, N as recordGoogleSignIn, a as getConversationStore, b as withConversationMutationLock, o as getDb, p as withConversationEventLock, q as createSlackDestination, r as getConversationEventStore, s as getSqlExecutor, t as closeDb } from "./db-DJ11eZqq.js";
8
+ import { A as juniorConversations, N as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-BY9TB31g.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
10
+ import { $ as readViewerAutomationSummary, A as runWithSlackInstallation, C as readSlackReviewItemCardConversationId, Ct as markConversationRead, D as parseSlackReviewItemClick, E as buildSlackReviewItemModal, H as logScheduledAutomationRunSkipped, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, S as createSlackReviewItemShow, U as scheduledAutomationRunAttributes, Xt as ingestEvent, Y as ViewerTaskNotFoundError, Yt as processWorkspaceSnapshotJob, Z as readViewerAutomationExecutions, _ as unpublishedArtifactHeaders, at as deliverReviewItemChange, g as readPublicArtifact, gt as collectAttachmentGarbage, h as publicArtifactHeaders, j as verifySlackSignature, k as parseSlackUserInputSubmission, kt as recordSubagentEnded, lt as appendAndEnqueueWebMessage, mt as webActorFromUser, n as executeAgentRun, ot as renderReviewItemMessage, pt as recordWebConversationActivity, r as processBackgroundCompaction, rt as effectiveTaskOutcomes, st as reviewItemChangeRecord, t as createAgentRunner, tt as readViewerAutomations, ut as conversationTurnIdForMessage, v as setConversationSubscription, vt as requestAttachmentDeletion, w as syncReviewItemSlackCards, xt as archiveConversation, y as lookupSlackUserProfile, z as joinPublicChannel } from "./agent-runner-Bfnw551N.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-DN5AB4VU.js";
12
+ import { g as createCache, i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-DrMmFUul.js";
13
+ import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-CL-HUKgd.js";
13
14
  import { a as getNextRunAtMs } from "./schedule-BTp__wrw.js";
14
- import { G as conversationBriefSchema, j as annotationCard, p as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema } from "./conversation-D8kVoCrP.js";
15
+ import { G as conversationBriefSchema, j as annotationCard, p as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema } from "./conversation-E7ZPJx2H.js";
15
16
  import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
16
- import { f as listPendingAgentInvocationMailboxAppends, p as listPendingAgentInvocationResults } from "./store-B26LV6UP.js";
17
- import { A as slackChannelMessageReplyThreadTs, D as SLACK_EVENT_NAMESPACE, E as getEventCatalog, H as renderSlackObjectCard, L as renderTaskInput, j as slackChannelMessageRunsAutomation, k as slackChannelMessageEvent, u as getAuthPausedConversationTurnId } from "./session-stop-CA-jOJ84.js";
18
- import { g as buttonUserInputField } from "./reporting-window-B4TwyuJo.js";
19
- import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-Biu8Qw3u.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-DXkLsWoH.js";
21
- import { C as removeActiveConversation, _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, v as hasRunnableConversationWork$1, y as listActiveConversationIds } from "./store-Dn4W7qgH.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-CGMKrYOj.js";
23
- import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-Mk8aaHzy.js";
24
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-TzhfQABF.js";
17
+ import { D as listPendingAgentInvocationResults, E as listPendingAgentInvocationMailboxAppends } from "./turn-failure-response-B5nV1Er-.js";
18
+ import { M as slackChannelMessageReplyThreadTs, N as slackChannelMessageRunsAutomation, O as getEventCatalog, W as renderSlackObjectCard, d as getAuthPausedConversationTurnId, j as slackChannelMessageEvent, k as SLACK_EVENT_NAMESPACE, z as renderTaskInput } from "./session-stop-B2Nut40V.js";
19
+ import { _ as buttonUserInputField } from "./reporting-window-B3Ze-Qnt.js";
20
+ import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-Bt6GgAiA.js";
21
+ import { T as isConversationQueueMessageRejectedError, _ as getVercelConversationWorkQueue, f as queueCallback, g as verifyWorkspaceSnapshotJobMessage, i as verifyBackgroundCompactionMessage, l as pluginTaskQueueConsumer, o as createVercelPluginTaskCallback, p as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as registerVercelPluginTaskDevConsumer, v as resolveConversationWorkQueueTopic, w as conversationQueueMessageSchema, x as getQueueProvider, y as verifyConversationQueueMessage } from "./background-compaction-queue-CYI909P5.js";
22
+ import { C as removeActiveConversation, _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, v as hasRunnableConversationWork$1, y as listActiveConversationIds } from "./store-DdIEUL1q.js";
23
+ import { A as withScheduledAutomationLock, E as readScheduledAutomation, F as findMatchingEventAutomations, H as eventAutomationRunLimitReason, M as collectEventAutomationMatchKeys, O as saveScheduledAutomationInLock, Q as existingConversationId, Tt as eventGuidance, V as admitEventAutomationRun, W as automationVersionOf, bt as coerceThreadConversationState, c as getDispatchConversationId, ct as recordAutomationExecution, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, j as blockEventAutomation, k as scheduledRunId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, w as listScheduledAutomationsForTeam, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-D_RDr2Hu.js";
24
+ import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-DksGNDRO.js";
25
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-K4pqwoVZ.js";
25
26
  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-BvROq1bq.js";
27
- import { $ as actOnReviewItem, A as archiveConversation, B as startProcessingReaction, C as createConversationForViewer, D as readConversationPendingMessages, E as cancelConversationPendingMessagesForViewer, F as assertNoLegacyAllowedDomains, G as normalizeIncomingSlackThreadId, H as clearSlackPendingReactions, I as isAllowedDomain, J as stopConversation, K as withNormalizedThreadId, L as isAllowedSignInEmail, M as createProductionConversationWorkOptions, N as createProductionSlackWebhookServices, P as getProductionSlackAdapter, Q as ReviewItemActionError, R as readEnvList, S as appendConversationMessageForViewer, T as encodeConversationCursor, U as slackInboundMessageId, V as buildSlackInboundMessage, W as stripLeadingBotMention, X as recordSkippedConversationMessage, Y as parseContent, Z as bindMessageAuthorIdentityId, a as pinConversation, b as readConversationRecordFromSql, et as closeReviewItemsAnsweredByReply, i as readConversationFeed, it as archiveViewerDoneConversations, j as markConversationRead, mt as GET$4, n as steerConversationPendingMessagesForViewer, nt as reviewItemChange, ot as runAutoArchiveSweep, pt as enqueueAgentDispatch, q as createSlackWebApiStatusSender, s as readConversationDetail, st as setConversationAutoArchive, t as stopConversationTurnForViewer, tt as readReviewItemForUser, w as decodeConversationCursor, z as resolveAllowedDomains } from "./stop-DioIcEAu.js";
28
- import { i as enqueueAgentInvocation, r as endAgentInvocationsOfStoppedWork } from "./work-ybG4_q5C.js";
29
- import { o as coerceThreadConversationState } from "./thread-state-CrFk3K_7.js";
30
- import { n as enqueueAgentInvocationResult } from "./result-DxJMCX47.js";
31
- import { o as unlinkProvider } from "./connections-DA4LT9LL.js";
32
- import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-hcsYatw-.js";
27
+ import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-DVch6YQw.js";
28
+ import { $ as readReviewItemForUser, A as createProductionConversationWorkOptions, B as clearSlackPendingReactions, C as createConversationForViewer, D as readConversationPendingMessages, E as cancelConversationPendingMessagesForViewer, F as isAllowedSignInEmail, G as createSlackWebApiStatusSender, H as stripLeadingBotMention, I as readEnvList, J as recordSkippedConversationMessage, K as stopConversation, L as resolveAllowedDomains, M as getProductionSlackAdapter, N as assertNoLegacyAllowedDomains, P as isAllowedDomain, Q as closeReviewItemsAnsweredByReply, R as startProcessingReaction, S as appendConversationMessageForViewer, T as encodeConversationCursor, U as normalizeIncomingSlackThreadId, V as slackInboundMessageId, W as withNormalizedThreadId, X as ReviewItemActionError, Y as bindMessageAuthorIdentityId, Z as actOnReviewItem, a as pinConversation, at as setConversationAutoArchive, b as readConversationRecordFromSql, ct as enqueueAgentDispatch, et as reviewItemChange, i as readConversationFeed, it as runAutoArchiveSweep, j as createProductionSlackWebhookServices, lt as GET$4, n as steerConversationPendingMessagesForViewer, nt as archiveViewerDoneConversations, q as parseContent, s as readConversationDetail, t as stopConversationTurnForViewer, w as decodeConversationCursor, z as buildSlackInboundMessage } from "./stop-kujZLbi0.js";
29
+ import { a as enqueueAgentInvocation, i as endAgentInvocationsOfStoppedWork } from "./work-ljRoODGu.js";
30
+ import { n as enqueueAgentInvocationResult } from "./result-Bo1TZu0Q.js";
31
+ import { o as unlinkProvider } from "./connections-BnIj0wtx.js";
32
+ import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-CzMar9hq.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-Bt0IoR2i.js";
35
- import { t as processConversationWork } from "./worker-ccSyZRNz.js";
36
- import { t as bindMessageAgent } from "./message-DqjuKzUx.js";
37
- import { t as bindSpawnAgent } from "./spawn-BB2_4VYn.js";
38
- import { t as processPluginTask } from "./task-runner-D8lddjzp.js";
34
+ import { t as processConversationWork } from "./worker-CYO1Q0Js.js";
35
+ import { t as bindMessageAgent } from "./message-CsUbuEc8.js";
36
+ import { t as bindSpawnAgent } from "./spawn-CalgZQiu.js";
39
37
  import { createRequire } from "node:module";
40
38
  import { Hono } from "hono";
41
39
  import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
@@ -45,8 +43,8 @@ import { EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, dispatchOptionsSchema,
45
43
  import { pathToFileURL } from "node:url";
46
44
  import net from "node:net";
47
45
  import { decodeJwt } from "jose";
48
- import https from "node:https";
49
46
  import { HTTPException } from "hono/http-exception";
47
+ import https from "node:https";
50
48
  import { Message, ThreadImpl } from "chat";
51
49
  import * as acp from "@agentclientprotocol/sdk";
52
50
  import dns from "node:dns";
@@ -6038,7 +6036,7 @@ const mcpConversationSchema = z.object({
6038
6036
  locationUrl: z.string().optional().describe("Slack thread link."),
6039
6037
  startedAt: z.string(),
6040
6038
  lastSeenAt: z.string().describe("Time of the newest activity. archiveConversation takes this value."),
6041
- archivedAt: z.string().optional().describe("Set when you archived it, or when anyone archived a Thread."),
6039
+ archivedAt: z.string().optional().describe("Set when anyone archived it. Archive applies to everyone."),
6042
6040
  pinnedAt: z.string().optional().describe("Set when you pinned it."),
6043
6041
  url: z.string().optional().describe("Dashboard link.")
6044
6042
  }).strict();
@@ -6053,7 +6051,7 @@ function mcpConversation(summary) {
6053
6051
  locationUrl: summary.locationUrl,
6054
6052
  startedAt: summary.startedAt,
6055
6053
  lastSeenAt: summary.lastSeenAt,
6056
- archivedAt: (summary.kind !== "root" ? summary.childArchivedAt : summary.archivedAt) ?? void 0,
6054
+ archivedAt: summary.archivedAt ?? void 0,
6057
6055
  pinnedAt: summary.pinnedAt ?? void 0,
6058
6056
  url: getDashboardConversationLink(summary.conversationId)
6059
6057
  };
@@ -6229,17 +6227,17 @@ async function isConversationParticipant(user, conversationId) {
6229
6227
  }
6230
6228
  // src/api/mcp/tools/archive-conversation.ts
6231
6229
  /**
6232
- * Register `archiveConversation`. It archives or restores a root for the
6233
- * user, or a child Conversation and optionally its children for everyone.
6230
+ * Register `archiveConversation`. It archives or restores one Conversation,
6231
+ * and optionally its children, for everyone.
6234
6232
  */
6235
6233
  function registerArchiveConversationTool(server, { user }) {
6236
6234
  server.registerTool("archiveConversation", {
6237
6235
  title: "Archive conversation",
6238
- description: "Archive one of your conversations, or restore it. Archiving a top-level conversation hides it and its child conversations only for you, and writes nothing to the children. Archiving a child conversation, a Thread or a Task, hides it and its children for everyone. A child restore fails while a conversation above it is archived. A new message from a person restores a child and the archived conversations above it.",
6236
+ description: "Archive one of your conversations, or restore it, for everyone in it. Archiving a conversation hides it and its child conversations. A restore fails while a conversation above it is archived. A new message from a person restores the conversation and the archived conversations above it.",
6239
6237
  inputSchema: {
6240
6238
  conversationId: mcpConversationIdSchema,
6241
6239
  archived: z.boolean().default(true).describe("False restores an archived conversation."),
6242
- applyToChildren: z.boolean().default(false).describe("Child conversations only. On archive, true also archives every child of this conversation at any depth; without it, a child archive fails while any of its children is not archived. On restore, true also restores the children that were archived with this conversation. Ignored for a top-level conversation."),
6240
+ applyToChildren: z.boolean().default(false).describe("On archive, true also archives every child of this conversation at any depth; without it, the archive fails while any of its children is not archived. On restore, true also restores the children that were archived with this conversation."),
6243
6241
  lastSeenAt: z.string().datetime().describe("`lastSeenAt` from searchConversations or getConversation. The archive fails when the conversation has newer activity.")
6244
6242
  },
6245
6243
  outputSchema: { archivedAt: z.string().nullable().describe("Null when the conversation is not archived.") },
@@ -6269,7 +6267,7 @@ function registerArchiveConversationTool(server, { user }) {
6269
6267
  function registerArchiveDoneConversationsTool(server, { user }) {
6270
6268
  server.registerTool("archiveDoneConversations", {
6271
6269
  title: "Archive done conversations",
6272
- description: "Archive all of your conversations whose work is done and that stayed quiet for your auto-archive wait time, once. It skips pinned conversations, conversations with auto-archive off, and conversations that wait on you. Archiving hides them only for you.",
6270
+ description: "Archive all of your conversations whose work is done and that stayed quiet for your auto-archive wait time, once. It skips conversations that anyone pinned or turned auto-archive off for, and conversations that wait on a person. Archive applies to everyone in the conversation.",
6273
6271
  inputSchema: {},
6274
6272
  outputSchema: { archived: z.number().int().describe("Conversations archived.") },
6275
6273
  annotations: {
@@ -6745,7 +6743,7 @@ function registerMarkConversationReadTool(server, { user }) {
6745
6743
  function registerPinConversationTool(server, { user }) {
6746
6744
  server.registerTool("pinConversation", {
6747
6745
  title: "Pin conversation",
6748
- description: "Pin one of your conversations, or unpin it. A pin applies only to you, restores an archived conversation, and keeps auto-archive from archiving it.",
6746
+ description: "Pin one of your top-level conversations, or unpin it. A child conversation cannot be pinned or unpinned; it uses the pin of its root. A pin applies only to you, restores an archived conversation, and keeps auto-archive from archiving it.",
6749
6747
  inputSchema: {
6750
6748
  conversationId: mcpConversationIdSchema,
6751
6749
  pinned: z.boolean().default(true).describe("False unpins the conversation.")
@@ -6774,7 +6772,7 @@ function registerSearchConversationsTool(server, { user }) {
6774
6772
  description: "Search your conversations and return up to 50, newest activity first. Only conversations that you started or take part in match.",
6775
6773
  inputSchema: {
6776
6774
  q: feedQuery.q.describe("Text to search for in titles and Briefs."),
6777
- status: feedQuery.status.describe("Return conversations that you have not archived (default) or that you archived. A search ignores this filter.")
6775
+ status: feedQuery.status.describe("Return conversations that are not archived (default) or that are archived. A search ignores this filter.")
6778
6776
  },
6779
6777
  outputSchema: { conversations: z.array(mcpConversationSchema) },
6780
6778
  annotations: {
@@ -6890,7 +6888,7 @@ function registerSetConversationAutoArchiveTool(server, { user }) {
6890
6888
  description: "Turn auto-archive on or off for one of your conversations. This overrides your default for that conversation only.",
6891
6889
  inputSchema: {
6892
6890
  conversationId: mcpConversationIdSchema,
6893
- autoArchive: z.boolean().describe("True archives the conversation for you after its work is done. False keeps it in your list.")
6891
+ autoArchive: z.boolean().describe("True lets auto-archive archive the conversation for everyone after its work is done. False keeps it from auto-archive for everyone.")
6894
6892
  },
6895
6893
  outputSchema: { autoArchive: z.boolean() },
6896
6894
  annotations: {
@@ -6907,6 +6905,37 @@ function registerSetConversationAutoArchiveTool(server, { user }) {
6907
6905
  }
6908
6906
  });
6909
6907
  }
6908
+ // src/api/mcp/tools/set-conversation-subscription.ts
6909
+ /**
6910
+ * Register `setConversationSubscription`, which subscribes or unsubscribes
6911
+ * the user. It never changes another person's subscription.
6912
+ */
6913
+ function registerSetConversationSubscriptionTool(server, { user }) {
6914
+ server.registerTool("setConversationSubscription", {
6915
+ title: "Set conversation subscription",
6916
+ description: "Subscribe to one of your conversations, or unsubscribe from it. Unsubscribe removes it only from your feed and clears your pin. When nobody else is subscribed, it archives the conversation for everyone. Your next mention of the bot in it subscribes you again.",
6917
+ inputSchema: {
6918
+ conversationId: mcpConversationIdSchema,
6919
+ subscribed: z.boolean().describe("False unsubscribes you.")
6920
+ },
6921
+ outputSchema: {
6922
+ archivedAt: z.string().nullable().describe("Set when the conversation is archived for everyone."),
6923
+ subscribed: z.boolean()
6924
+ },
6925
+ annotations: {
6926
+ destructiveHint: false,
6927
+ idempotentHint: true,
6928
+ openWorldHint: false,
6929
+ readOnlyHint: false
6930
+ }
6931
+ }, async ({ conversationId, subscribed }) => {
6932
+ try {
6933
+ return mcpToolResult(await setConversationSubscription(user, conversationId, { subscribed }));
6934
+ } catch (error) {
6935
+ return apiToolError(error);
6936
+ }
6937
+ });
6938
+ }
6910
6939
  // src/api/mcp/tools/stop-conversation.ts
6911
6940
  /**
6912
6941
  * Register `stopConversation`, which stops the Conversation and every child
@@ -6961,6 +6990,7 @@ const TOOLS_BY_SCOPE = {
6961
6990
  registerArchiveDoneConversationsTool,
6962
6991
  registerPinConversationTool,
6963
6992
  registerSetConversationAutoArchiveTool,
6993
+ registerSetConversationSubscriptionTool,
6964
6994
  registerMarkConversationReadTool,
6965
6995
  registerStopConversationTool,
6966
6996
  registerCancelQueuedMessagesTool
@@ -1,4 +1,4 @@
1
- import { Jt as extractAssistantText } from "./projection-DliWYrnT.js";
1
+ import { Xt as extractAssistantText } from "./projection-CL_YWeGf.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 { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-BTp__wrw.js";
2
- import { i as actorIdentitySchema } from "./conversation-D8kVoCrP.js";
2
+ import { i as actorIdentitySchema } from "./conversation-E7ZPJx2H.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
@@ -403,10 +403,7 @@ const automationEditFieldsSchema = z.object({
403
403
  credentialMode: z.enum(["system", "creator"]).optional(),
404
404
  outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
405
405
  });
406
- const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({
407
- schedule: scheduleIntentSchema.optional(),
408
- status: z.enum(["active", "blocked"]).optional()
409
- }).strict();
406
+ const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({ schedule: scheduleIntentSchema.optional() }).strict();
410
407
  const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: eventAutomationTriggerSchema.safeExtend({
411
408
  identifier: z.string().trim().min(1).max(300).optional(),
412
409
  label: z.string().trim().min(1).max(500)
@@ -692,7 +689,7 @@ const automationEditSchema = z.discriminatedUnion("kind", [automationEditBaseSch
692
689
  ])
693
690
  }).strict()]);
694
691
  /** Partial edits require the revision returned by the edit read. */
695
- const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.omit({ status: true }).extend({
692
+ const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.extend({
696
693
  kind: z.literal("scheduled"),
697
694
  revision: automationRevisionSchema
698
695
  }).strict(), eventAutomationEditSchema.extend({
@@ -1,5 +1,5 @@
1
- import { i as getChatConfig } from "./config-DqFnykQT.js";
2
- import { E as withSpan, m as logInfo, p as logException } from "./logging-BfORLKoq.js";
1
+ import { i as getChatConfig } from "./config-CkHcUMN7.js";
2
+ import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-BO5zU6Mt.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";
@@ -381,6 +381,140 @@ async function sendWorkspaceSnapshotJob(message) {
381
381
  async function sendNextWorkspaceSnapshotJob(message) {
382
382
  await send(message);
383
383
  }
384
+ // src/chat/queue/callback.ts
385
+ /** Shared queue callback wiring for signed messages. */
386
+ /** Build the HTTP callback and local-dev consumer for one signed queue. */
387
+ function queueCallback(options) {
388
+ const consume = async (message, metadata) => {
389
+ if (options.skip?.(metadata)) return;
390
+ try {
391
+ await runWithTurnRequestDeadline(() => options.run(message, metadata));
392
+ } catch (error) {
393
+ const reason = options.permanentError?.(error);
394
+ if (!reason) throw error;
395
+ options.onRejected(reason, metadata, error);
396
+ }
397
+ };
398
+ const handler = async (value, metadata) => {
399
+ if (options.skip?.(metadata)) return;
400
+ const checked = options.verify(value);
401
+ if (checked.status === "rejected") {
402
+ options.onRejected(checked.reason, metadata);
403
+ return;
404
+ }
405
+ if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
406
+ await consume(checked.message, metadata);
407
+ };
408
+ const retry = (error, metadata) => {
409
+ const reason = options.permanentError?.(error);
410
+ if (reason) {
411
+ options.onRejected(reason, metadata, error);
412
+ return { acknowledge: true };
413
+ }
414
+ if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
415
+ };
416
+ const consumer = {
417
+ consumerGroup: options.consumerGroup,
418
+ handler,
419
+ retry,
420
+ topic: options.topic,
421
+ visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
422
+ };
423
+ return {
424
+ /** Run a message that an in-process queue already trusts. */
425
+ consume,
426
+ consumer,
427
+ create: () => getQueueProvider().createCallback(consumer),
428
+ registerDev: () => {
429
+ if (process.env.NODE_ENV !== "development") return;
430
+ return getQueueProvider().registerDevConsumer?.(consumer);
431
+ }
432
+ };
433
+ }
434
+ // src/chat/plugins/task-queue.ts
435
+ /**
436
+ * Delivery for plugin-registered tasks.
437
+ *
438
+ * Plugins register named tasks. This module owns the shared signed message,
439
+ * send path, and HTTP/local callback. Core keeps one topic and one runner.
440
+ */
441
+ /** Deploy topic name. Keep stable for Vercel queue wiring. */
442
+ const PLUGIN_TASK_QUEUE_TOPIC = "junior_plugin_tasks";
443
+ const PLUGIN_TASK_DEV_CONSUMER_GROUP = "junior_plugin_tasks_dev";
444
+ const PLUGIN_TASK_MAX_DELIVERIES = 5;
445
+ const PLUGIN_TASK_SIGN_CONTEXT = "junior.plugin_task_queue.v1";
446
+ const PLUGIN_TASK_SIGN_VERSION = "v1";
447
+ const pluginTaskParamsSchema = z.object({
448
+ conversationId: z.string().min(1),
449
+ sessionId: z.string().min(1)
450
+ }).strict();
451
+ const pluginTaskSign = {
452
+ context: PLUGIN_TASK_SIGN_CONTEXT,
453
+ schema: z.object({
454
+ name: z.string().min(1),
455
+ params: pluginTaskParamsSchema,
456
+ plugin: z.string().min(1)
457
+ }).strict(),
458
+ signatureVersion: PLUGIN_TASK_SIGN_VERSION,
459
+ parts: (message) => [
460
+ message.plugin,
461
+ message.name,
462
+ message.params.conversationId,
463
+ message.params.sessionId
464
+ ]
465
+ };
466
+ /** Build the stable id used for delivery dedupe and tracing. */
467
+ function pluginTaskId(args) {
468
+ return `plugin-task_${createHash("sha256").update(args.plugin).update("\0").update(args.name).update("\0").update(args.params.conversationId).update("\0").update(args.params.sessionId).digest("hex").slice(0, 32)}`;
469
+ }
470
+ /** Sign a plugin task message for tests and local checks. */
471
+ function signPluginTaskQueueMessage(message, nowMs = Date.now()) {
472
+ return signQueueMessage(pluginTaskSign, message, nowMs);
473
+ }
474
+ function verifyPluginTaskQueueMessage(value, nowMs = Date.now()) {
475
+ return verifyQueueMessage(pluginTaskSign, value, nowMs);
476
+ }
477
+ function logPluginTaskQueueMessageRejected(reason, metadata) {
478
+ logWarn("plugin.task.queue_message.rejected", {
479
+ "app.queue.consumer_group": metadata.consumerGroup,
480
+ "app.queue.delivery_count": metadata.deliveryCount,
481
+ "app.queue.message_id": metadata.messageId,
482
+ "app.queue.reject_reason": reason,
483
+ "app.queue.topic_name": metadata.topicName
484
+ });
485
+ }
486
+ function pluginTaskCallback() {
487
+ return queueCallback({
488
+ consumerGroup: PLUGIN_TASK_DEV_CONSUMER_GROUP,
489
+ maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
490
+ onRejected: logPluginTaskQueueMessageRejected,
491
+ run: async (message) => {
492
+ const { processPluginTask } = await import("./task-runner-D_RDr2Hu.js").then((n) => n.r);
493
+ await processPluginTask(message);
494
+ },
495
+ topic: PLUGIN_TASK_QUEUE_TOPIC,
496
+ verify: verifyPluginTaskQueueMessage
497
+ });
498
+ }
499
+ /** Send one plugin task through the shared signed delivery path. */
500
+ async function sendVercelPluginTask(message) {
501
+ await getQueueProvider().send(PLUGIN_TASK_QUEUE_TOPIC, signPluginTaskQueueMessage(message), {
502
+ idempotencyKey: pluginTaskId(message),
503
+ retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
504
+ });
505
+ }
506
+ /** Create the HTTP callback for plugin tasks. */
507
+ function createVercelPluginTaskCallback() {
508
+ return pluginTaskCallback().create();
509
+ }
510
+ /** Return the queue consumer for plugin tasks, for a pulling queue worker. */
511
+ function pluginTaskQueueConsumer() {
512
+ return pluginTaskCallback().consumer;
513
+ }
514
+ /** Register the local-dev consumer for plugin tasks. */
515
+ function registerVercelPluginTaskDevConsumer() {
516
+ return pluginTaskCallback().registerDev();
517
+ }
384
518
  // src/chat/services/background-compaction-queue.ts
385
519
  /**
386
520
  * Messages of background compaction jobs.
@@ -420,4 +554,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
420
554
  retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
421
555
  });
422
556
  } };
423
- export { runWithTurnRequestDeadline as _, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as a, isConversationQueueMessageRejectedError as b, verifyWorkspaceSnapshotJobMessage as c, verifyConversationQueueMessage as d, QUEUE_SIGNATURE_MAX_AGE_MS as f, getTurnRequestDeadline as g, getQueueProvider as h, verifyBackgroundCompactionMessage as i, getVercelConversationWorkQueue as l, verifyQueueMessage as m, backgroundCompactionId as n, sendNextWorkspaceSnapshotJob as o, signQueueMessage as p, vercelBackgroundCompactionQueue as r, sendWorkspaceSnapshotJob as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, resolveConversationWorkQueueTopic as u, ConversationQueueMessageRejectedError as v, conversationQueueMessageSchema as y };
557
+ export { ConversationQueueMessageRejectedError as C, getTurnRequestDeadline as S, isConversationQueueMessageRejectedError as T, getVercelConversationWorkQueue as _, PLUGIN_TASK_QUEUE_TOPIC as a, QUEUE_SIGNATURE_MAX_AGE_MS as b, pluginTaskParamsSchema as c, sendVercelPluginTask as d, queueCallback as f, verifyWorkspaceSnapshotJobMessage as g, sendWorkspaceSnapshotJob as h, verifyBackgroundCompactionMessage as i, pluginTaskQueueConsumer as l, sendNextWorkspaceSnapshotJob as m, backgroundCompactionId as n, createVercelPluginTaskCallback as o, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as p, vercelBackgroundCompactionQueue as r, pluginTaskId as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, registerVercelPluginTaskDevConsumer as u, resolveConversationWorkQueueTopic as v, conversationQueueMessageSchema as w, getQueueProvider as x, verifyConversationQueueMessage as y };
@@ -1,6 +1,5 @@
1
- import { i as completeObject } from "./client-DDbBucBw.js";
2
- import { K as parseBriefInput, V as briefCodeChangeSchema, W as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-D8kVoCrP.js";
3
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BvIUzY4y.js";
1
+ import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BHOEQSmf.js";
2
+ import { K as parseBriefInput, V as briefCodeChangeSchema, W as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-E7ZPJx2H.js";
4
3
  import { CLI_USAGE } from "./cli/run.js";
5
4
  import path from "node:path";
6
5
  import * as z from "zod";
@@ -263,7 +262,7 @@ async function parseRunOptions(argv) {
263
262
  * token.
264
263
  */
265
264
  async function configuredBriefModelId() {
266
- const { botConfig } = await import("./config-DqFnykQT.js").then((n) => n.r);
265
+ const { botConfig } = await import("./config-CkHcUMN7.js").then((n) => n.r);
267
266
  return botConfig.fastModelId;
268
267
  }
269
268
  function apiUrl(baseUrl, pathname) {
@@ -335,7 +334,9 @@ async function runSnapshot(snapshotPath, options, prompt) {
335
334
  for (const throughIndex of generationIndexes(snapshot, options.turnByTurn, finalThroughIndex)) versions.push(await generateBrief({
336
335
  completeObject: (request) => completeObject({
337
336
  ...request,
338
- modelId: options.model
337
+ modelId: options.model,
338
+ operation: "brief_update",
339
+ cost: { owner: "caller" }
339
340
  }),
340
341
  input: briefInputFromSnapshot(snapshot, throughIndex),
341
342
  previous: versions.at(-1)?.brief,
@@ -1,5 +1,5 @@
1
1
  import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-rC7MCxu8.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-BriFLnaJ.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-BsWhHe4N.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-Bfnw551N.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-DliWYrnT.js").then((n) => n.zn),
103
- import("../catalog-runtime-Bte6jRB2.js").then((n) => n.t),
104
- import("../validation-TzhfQABF.js").then((n) => n.r),
105
- import("../viewer-1Ea81s0b.js").then((n) => n.v)
102
+ import("../projection-CL_YWeGf.js").then((n) => n.Un),
103
+ import("../catalog-runtime-BCIuBe4d.js").then((n) => n.t),
104
+ import("../validation-K4pqwoVZ.js").then((n) => n.r),
105
+ import("../db-DJ11eZqq.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,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-DliWYrnT.js").then((n) => n.Zn);
155
+ const { setBriefsConfig } = await import("../projection-CL_YWeGf.js").then((n) => n.tr);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-BQJSFLKg.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CFSRzu1n.js");
157
+ const { runLocalAgentTurn } = await import("../runner-D3YeCQgt.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-hiDKK0_n.js");
159
159
  const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-6aMxJSDn.js");
161
- const { bindSpawnAgent } = await import("../spawn-BB2_4VYn.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-DqjuKzUx.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-DxJMCX47.js").then((n) => n.i);
164
- const { skipInputAfterConversationStop } = await import("../session-stop-CA-jOJ84.js").then((n) => n.a);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CcnSPP4S.js");
161
+ const { bindSpawnAgent } = await import("../spawn-CalgZQiu.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-CsUbuEc8.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-Bo1TZu0Q.js").then((n) => n.i);
164
+ const { skipInputAfterConversationStop } = await import("../session-stop-B2Nut40V.js").then((n) => n.a);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-ccSyZRNz.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-CYO1Q0Js.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-BfORLKoq.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-rC7MCxu8.js";
3
- import { i as parseSkillFile } from "../skills-B22duVJU.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-BO5zU6Mt.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BriFLnaJ.js";
3
+ import { i as parseSkillFile } from "../skills-CD5aJdzg.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-DOITMKnn.js")).runAdmin(argv);
28
+ return await (await import("../admin-C9urXVfi.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-CAE-_1dR.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-r6fl0b-9.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-Cl8-nK9B.js")).runBriefs(argv);
34
+ return await (await import("../briefs-DaXiMWzT.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 { Jn as setPlugins, Ya as createPluginLogger, Yn as validatePlugins } from "../projection-DliWYrnT.js";
2
- import { S as getDb } from "../viewer-1Ea81s0b.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Bte6jRB2.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-TzhfQABF.js";
1
+ import { $a as createPluginLogger, $n as validatePlugins, Qn as setPlugins } from "../projection-CL_YWeGf.js";
2
+ import { o as getDb } from "../db-DJ11eZqq.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-BCIuBe4d.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-K4pqwoVZ.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,9 +1,8 @@
1
- import { Ti as create } from "../projection-DliWYrnT.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-Bte6jRB2.js";
3
- import { t as disconnectStateAdapter } from "../adapter-DN5AB4VU.js";
4
- import { n as resolve } from "../resolve-Biu8Qw3u.js";
1
+ import { Pa as SANDBOX_RUNTIME, ki as create } from "../projection-CL_YWeGf.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-BCIuBe4d.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-CL-HUKgd.js";
4
+ import { n as resolve } from "../resolve-Bt6GgAiA.js";
5
5
  // src/cli/snapshot-create.ts
6
- const DEFAULT_RUNTIME = "node22";
7
6
  const DEFAULT_TIMEOUT_MS = 6e5;
8
7
  function progressMessage(phase) {
9
8
  if (phase === "resolve_start") return "Resolving sandbox snapshot profile...";
@@ -49,7 +48,7 @@ async function runSnapshotCreate(log = console.log) {
49
48
  log("Skipping sandbox snapshot create (JUNIOR_SKIP_SNAPSHOT=1)");
50
49
  return;
51
50
  }
52
- const runtime = DEFAULT_RUNTIME;
51
+ const runtime = SANDBOX_RUNTIME;
53
52
  const timeoutMs = DEFAULT_TIMEOUT_MS;
54
53
  try {
55
54
  logSnapshotProfile(runtime, log);
@@ -1,4 +1,4 @@
1
- import "../db-BhHZSuFw.js";
1
+ import "../db-YDKKDxlh.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-DqFnykQT.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-BLEMIgIZ.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-rC7MCxu8.js";
1
+ import { i as getChatConfig } from "../config-CkHcUMN7.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BY9TB31g.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-BriFLnaJ.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";