@sentry/junior 0.320.0 → 0.321.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 (56) hide show
  1. package/dist/{adapter-DlLLoJKj.js → adapter-BkDQYdg6.js} +1 -1
  2. package/dist/{admin-BzRXDVfh.js → admin-XS3G9BOj.js} +1 -1
  3. package/dist/{agent-DxZ7nHfD.js → agent-CL9ZkOgx.js} +20 -17
  4. package/dist/{agent-update-delivery-CO4FU5Gg.js → agent-update-delivery-t0bXEgPs.js} +4 -4
  5. package/dist/api/schema.d.ts +2 -12
  6. package/dist/api/schema.js +4 -4
  7. package/dist/api.js +21 -21
  8. package/dist/{app-CHCFIIDu.d.ts → app-CwFRvmEH.d.ts} +1 -1
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +21 -21
  11. package/dist/{change-record-K-KsqNhT.d.ts → change-record-CRuG9Mu3.d.ts} +1 -6
  12. package/dist/{channel-access-BghWqlXx.js → channel-access-BUHB0saC.js} +1 -1
  13. package/dist/{chat-core-engine-BgfSLrDu.js → chat-core-engine-DuBaPbqK.js} +4 -4
  14. package/dist/cli/chat.js +16 -16
  15. package/dist/cli/check.js +4 -4
  16. package/dist/cli/main.js +2 -2
  17. package/dist/cli/plugins.js +3 -3
  18. package/dist/cli/snapshot-create.js +4 -4
  19. package/dist/cli/upgrade.js +2 -2
  20. package/dist/{continue-in-slack-DBlQP4PC.js → continue-in-slack-D9naZmqM.js} +3 -3
  21. package/dist/{conversation-feed-DEUdD7mb.js → conversation-feed-B1_1NJc8.js} +2 -12
  22. package/dist/{conversation-privacy-qoh95v90.js → conversation-privacy-C0mixZKx.js} +1 -1
  23. package/dist/{create-jZSaDrCR.js → create-CLV0M1vw.js} +2 -2
  24. package/dist/{credential-sync-Bj9-UlNE.js → credential-sync-DL9r-ry5.js} +11 -11
  25. package/dist/{db-BacvswT0.js → db-CbURDbaB.js} +23 -15
  26. package/dist/{deployment-BoJkRPDt.js → deployment-D9uPRDMD.js} +1 -1
  27. package/dist/{engine-context-Bi3Ync5t.js → engine-context-BP0h6u4m.js} +9 -9
  28. package/dist/{html-DW0pw5Pr.js → html-l4hKICAL.js} +4 -4
  29. package/dist/instrumentation.js +2 -2
  30. package/dist/{list-Dz3CdP3g.js → list-cGaO9_Hf.js} +12 -46
  31. package/dist/{logging-DsTnMqyi.js → logging-CqgOoICc.js} +1 -1
  32. package/dist/{markers-C33gNYNE.js → markers-BtUv4-oc.js} +18 -16
  33. package/dist/nitro.d.ts +1 -1
  34. package/dist/nitro.js +2 -2
  35. package/dist/{oauth-callback-server-C-pEhAQK.js → oauth-callback-server-C3GxhsuB.js} +2 -2
  36. package/dist/{oauth-relay-DIXdH-io.js → oauth-relay-BGm6sLCB.js} +1 -1
  37. package/dist/{profile-v9vA3RvH.js → profile-bLo0h7Le.js} +12 -6
  38. package/dist/{prompt-C5CW2wKO.js → prompt-CX29OGO9.js} +1 -1
  39. package/dist/{reports-eBgrhPXS.js → reports-DeDCCu_H.js} +2 -2
  40. package/dist/{resolve-HVXmbeCr.js → resolve-D9RKNH3v.js} +5 -5
  41. package/dist/{result-BPNzgeTl.js → result-BFBwK1M2.js} +7 -7
  42. package/dist/{runner-aNSDTST6.js → runner-DNdoVQg8.js} +7 -7
  43. package/dist/{sandbox-egress-signals-nzp9Ykf7.js → sandbox-egress-signals-BBcCiEhm.js} +1 -1
  44. package/dist/{schema-BlTO5M1d.js → schema-RzsplzdI.js} +2 -2
  45. package/dist/{service-account-DWIf1t6p.js → service-account-B7E7OIFP.js} +2 -2
  46. package/dist/{skills-50izzzdK.js → skills-DMJsS5e4.js} +4 -4
  47. package/dist/{slack-conversation-unfurl-C6jXhVYg.js → slack-conversation-unfurl-EWYTnBZI.js} +7 -7
  48. package/dist/{storage-BtCxXiNt.js → storage-XD0lB4Gk.js} +2 -2
  49. package/dist/{system-prompt-table-CIR1B44Z.js → system-prompt-table-C886lsT9.js} +4 -4
  50. package/dist/{types-BNHkJrOP.js → types-CGgQ3-Bb.js} +1 -9
  51. package/dist/{users-DOVo9sdU.js → users-DBrcQl47.js} +1 -1
  52. package/dist/{validation-CK0vuEHB.js → validation-CofUHWqz.js} +1 -1
  53. package/dist/{version-BuLVNlxB.js → version-D_vbXyNw.js} +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/{worker-C82kHU1R.js → worker-buhFcpl9.js} +4 -4
  56. package/package.json +6 -6
@@ -1,12 +1,12 @@
1
- import { $ as resolveGatewayModel, L as botConfig, f as credentialContextForActor } from "./adapter-DlLLoJKj.js";
2
- import { $a as usdToMicroUsd, Ed as getGatewayApiKey, Ff as agentTurnCostUsd, Gr as QUEUE_SIGNATURE_MAX_AGE_MS, If as agentTurnTotalTokens, Jr as getQueueProvider, Kr as signQueueMessage, M as locationSchema, N as claimProviderConversation, O as withConversationMutationLock, Op as juniorConversationEvents, Pf as addAgentTurnUsage, Qa as microUsdToUsd, Qn as sendSlackReply, R as replaceConversationMetrics, _ as unseenEvents, a as getDb, d as createSqlConversationEventStore, ep as juniorTurnOutbox, g as readEventCursor, h as insertEventRows, j as startLocationThread, js as resolveRootVisibility, kp as juniorTurns, md as gatewayRoutingAttributes, o as getSqlExecutor, qr as verifyQueueMessage, sd as requestPrefixAttributes, ti as runWithSlackInstallation, tp as juniorTurnInbox, v as withConversationEventLock, zp as juniorConversations } from "./db-BacvswT0.js";
3
- import { St as contextProvenance, dt as agentHistoryFromRow, ft as encodeAgentHistoryPayload, gt as historyItemFromPiMessage, ht as HISTORY_REPLACEMENT_TYPES, mt as AGENT_HISTORY_ITEM_TYPES, qn as usageTokensSchema, vt as isHistoryReplacement, wt as instructionProvenanceFor, yt as piMessageFromHistoryItem } from "./types-BNHkJrOP.js";
4
- import { _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageSummary, m as logWarn, r as extractGenAiUsageAttributes } from "./logging-DsTnMqyi.js";
5
- import { h as SERVICE_INSTANCE_ID } from "./deployment-BoJkRPDt.js";
6
- import { G as mapBounded } from "./prompt-C5CW2wKO.js";
7
- import { a as toCanonicalInputMessage, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-qoh95v90.js";
8
- import { $n as normalizeConversationText, Br as TurnToolCallLimitExceededError, Fr as turnTerminalKey, J as getPersistedThreadState, K as getLocationConfigurationService, Lr as TURN_LIMIT_WRAP_UP_MESSAGE, Pr as turnStartedKey, Rr as TurnBudgetExceededError, Wn as toStoredConversationMessage, Y as persistThreadRuntimeState, Zt as getWorkspace, dn as buildDeploymentSystemPrompt, q as getPersistedSandboxState, ti as reviewToolActions } from "./markers-C33gNYNE.js";
9
- import { A as createBashTool, D as createWriteFileTool, E as createSystemTimeTool, O as createReadFileTool, c as createAgentSandbox, dn as isRetryableSlackPostError, k as createEditFileTool, l as normalizeToolResult, n as buildSandboxInput, u as capToolResult } from "./agent-DxZ7nHfD.js";
1
+ import { $ as resolveGatewayModel, L as botConfig, f as credentialContextForActor } from "./adapter-BkDQYdg6.js";
2
+ import { $a as usdToMicroUsd, $f as juniorTurnOutbox, Dp as juniorConversationEvents, Ff as agentTurnTotalTokens, Gr as QUEUE_SIGNATURE_MAX_AGE_MS, Jr as getQueueProvider, Kr as signQueueMessage, M as locationSchema, N as claimProviderConversation, Nf as addAgentTurnUsage, O as withConversationMutationLock, Op as juniorTurns, Pf as agentTurnCostUsd, Qa as microUsdToUsd, Qn as sendSlackReply, R as replaceConversationMetrics, Rp as juniorConversations, Td as getGatewayApiKey, _ as unseenEvents, a as getDb, d as createSqlConversationEventStore, ep as juniorTurnInbox, g as readEventCursor, h as insertEventRows, j as startLocationThread, js as resolveRootVisibility, o as getSqlExecutor, od as requestPrefixAttributes, pd as gatewayRoutingAttributes, qr as verifyQueueMessage, ti as runWithSlackInstallation, v as withConversationEventLock } from "./db-CbURDbaB.js";
3
+ import { Kn as usageTokensSchema, St as contextProvenance, dt as agentHistoryFromRow, ft as encodeAgentHistoryPayload, gt as historyItemFromPiMessage, ht as HISTORY_REPLACEMENT_TYPES, mt as AGENT_HISTORY_ITEM_TYPES, vt as isHistoryReplacement, wt as instructionProvenanceFor, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
4
+ import { _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageSummary, m as logWarn, r as extractGenAiUsageAttributes } from "./logging-CqgOoICc.js";
5
+ import { h as SERVICE_INSTANCE_ID } from "./deployment-D9uPRDMD.js";
6
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
7
+ import { a as toCanonicalInputMessage, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-C0mixZKx.js";
8
+ import { $n as normalizeConversationText, Br as TurnToolCallLimitExceededError, Fr as turnTerminalKey, J as getPersistedThreadState, K as getLocationConfigurationService, Lr as TURN_LIMIT_WRAP_UP_MESSAGE, Pr as turnStartedKey, Rr as TurnBudgetExceededError, Wn as toStoredConversationMessage, Y as persistThreadRuntimeState, Zt as getWorkspace, dn as buildDeploymentSystemPrompt, q as getPersistedSandboxState, ti as reviewToolActions } from "./markers-BtUv4-oc.js";
9
+ import { A as createBashTool, D as createWriteFileTool, E as createSystemTimeTool, O as createReadFileTool, c as createAgentSandbox, dn as isRetryableSlackPostError, k as createEditFileTool, l as normalizeToolResult, n as buildSandboxInput, u as capToolResult } from "./agent-CL9ZkOgx.js";
10
10
  import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
11
11
  import * as z from "zod";
12
12
  import { streamSimple } from "@earendil-works/pi-ai/compat";
@@ -1,7 +1,7 @@
1
- import { L as botConfig } from "./adapter-DlLLoJKj.js";
2
- import { Pd as getAppContext, Sc as deleteProviderIdentityForUser, Yd as hasRequiredOAuthScope, nf as deleteMcpServerSessionId, o as getSqlExecutor, rf as deleteMcpStoredOAuthCredentials, tf as deleteMcpAuthSessionsForUserProvider, xc as deleteProviderIdentityForSlackUser } from "./db-BacvswT0.js";
3
- import { G as mapBounded } from "./prompt-C5CW2wKO.js";
4
- import { pi as startOAuthFlow } from "./markers-C33gNYNE.js";
1
+ import { L as botConfig } from "./adapter-BkDQYdg6.js";
2
+ import { Jd as hasRequiredOAuthScope, Nd as getAppContext, Sc as deleteProviderIdentityForUser, ef as deleteMcpAuthSessionsForUserProvider, nf as deleteMcpStoredOAuthCredentials, o as getSqlExecutor, tf as deleteMcpServerSessionId, xc as deleteProviderIdentityForSlackUser } from "./db-CbURDbaB.js";
3
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
4
+ import { pi as startOAuthFlow } from "./markers-BtUv4-oc.js";
5
5
  import { randomBytes } from "node:crypto";
6
6
  // src/handlers/oauth-html.ts
7
7
  /** Build pre-escaped callback HTML with the shared response security policy. */
@@ -1,10 +1,10 @@
1
1
  import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData, u as sentry_exports } from "./sentry-CPbZjomA.js";
2
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-qoh95v90.js";
2
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-C0mixZKx.js";
3
3
  import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
5
  import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
6
6
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
7
- import { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-BoJkRPDt.js";
7
+ import { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-D9uPRDMD.js";
8
8
  import { performance } from "node:perf_hooks";
9
9
  import { subscribe, unsubscribe } from "node:diagnostics_channel";
10
10
  // src/chat/pi/gateway-request-timing.ts
@@ -1,16 +1,16 @@
1
- import { $ as resolveGatewayModel, L as botConfig, R as getChatConfig, a as getStateValues, i as getStateAdapter, o as setStateValues } from "./adapter-DlLLoJKj.js";
2
- import { $ as canActOnInboxItem, $s as isDmChannel, Al as parseDashboardConversationLink, Ao as collectEventMatchKeys, Ar as readConversationAccessRows, As as isPublicConversation, Bf as resolveRootConversationId, Bi as slackMentionedUserIds, Bn as pushInboxSnoozeWakes, Bt as setTodoStatusByUser, C as conversationSlackTenantId, Cp as juniorConversationParticipants, Cr as canAddConversationMessages, Cs as conversationAncestorsOrSelf, Ct as inboxItemOwnerConversationId, Dd as JUNIOR_NATIVE_EVENT_NAMESPACE, Dr as createConversationAccessReader, Ds as conversationSearchVector, Er as conversationAccessFromRows, Fr as readMemberParticipants, G as conversationStatusSql, Gc as takeInboxItem, Gi as createPluginState, Go as verifyEventAutomationCredentialSubject, Gp as juniorUsers, Hc as listReplyActionItems, Hi as applyPluginFormatMarkdown, Ho as bindScheduledAutomationCredentialSubject, Hp as juniorIdentities, Ir as rootVisibleToViewer, Ja as readAutomationTitlesByConversationId, Jc as inboxItemRequest, K as conversationTurnFailedSql, Ko as verifyScheduledAutomationCredentialSubject, Kp as juniorDestinations, Kt as cancelHumanFacingPendingMessages, Lc as closeInboxItem, Lf as agentTurnUsageSchema, Lo as listConversationsWithWatches, Lp as juniorAttachments, Lr as viewerMarksFromParticipant, Mr as conversationIsMemberRoot, Nc as waitingConversationIdsQuery, Nr as conversationIsNotUnsubscribedRoot, Oa as admitEventAutomationRun, Op as juniorConversationEvents, Or as leaveEndsAccess, Pc as closeHandledReplyNotices, Pf as addAgentTurnUsage, Po as findMatchingWatches, Pp as juniorCodeChanges, Pr as conversationPinnedForUser, Q as treeAwaitsAuthorization, Qi as basePluginContext, Rc as dismissOpenInboxItems, Rf as hasAgentTurnUsage, Rn as createInboxItemShow, Rp as juniorMessageAttachments, Rr as getVercelConversationWorkQueue, Rs as lookupSlackUser, S as setArchivedAt, Sa as findMatchingEventAutomations, Si as notifyAutomationBlocked, Sl as getDashboardConversationLink, St as inboxItemOwnedByThroughSubject, T as lastMessageAtSql, Ts as conversationSubtreeColumns, Tt as getPlugins, U as conversationIsActiveSql, Uc as ownerConversationId, Uf as nextDetailVersion, Uo as bindSlackDirectCredentialSubject, Vi as wrapBareSlackUserIds, Vo as bindEventAutomationCredentialSubject, Vu as storedMessageJson, X as awaitsAuthorizationFrom, Xc as itemQuestion, Xf as spaceLeadIds, Y as conversationKindFromRow, Ya as recordAutomationExecution, Yn as safeLinkUrl, Yo as updateTimerIndex, Yr as buildSentryConversationUrl, Z as hasUnexpiredAuthorizationRequest, Zc as INBOX_SUBJECT_KINDS, Zf as listedConversation, Zo as canPauseConversationDelivery, _o as slackChannelMessageRunsAutomation, _r as dismissPluginInboxItem, _u as eventGuidance, a as getDb, aa as createPluginCache, ai as buildDispatchId, al as identityAvatarUrl, an as getConversationWorkState, ap as juniorTodos, br as takeOverPluginClose, bs as listConversationAnnotationsById, cc as createPluginUsers, ci as createOrGetDispatch, cp as juniorQuestions, ct as inboxItemNeedsInput, dl as SNOOZE_TIMER_EVENT_TYPE, dp as juniorAutomationRuns, er as createPluginEventPublisher, eu as isThread, fi as getDispatchRecord, fo as getEventCatalog, gl as listFiringInboxSnoozeTriggers, go as slackChannelMessageReplyThreadTs, gr as createPluginInboxItems, gt as isPluginInboxItem, hi as isTerminalDispatchStatus, hr as PLUGIN_CHOICE_FIELD_ID, ht as isOnlyAssignee, i as getConversationStore, il as hasUserPhoto, in as getConversation, it as conversationOwnsInboxItem, ja as automationVersionOf, jp as juniorConversationAnnotations, ka as eventAutomationRunLimitReason, kr as readConversationAccessFromSql, li as getDispatchConversationId, lt as inboxItemPlugin, mf as webActorUserIds, mi as getPluginDispatchProjection, mp as juniorAutomations, mr as createPluginConversationChanges, mt as isInboxItemForEveryone, mu as CORE_EVENT_NAMESPACE, n as getConversationEventStore, no as AUTOMATION_ALERT_STEP_FIELD_ID, ns as annotationMatches, o as getSqlExecutor, ot as inboxItemAddedByAutomation, ou as turnBehavior, p as copyMessageLinks, pt as isAutomationAlertItem, q as conversationWaitsOnUserSql, qc as inboxItemAnswer, qi as createPluginEmbedder, qo as verifySlackDirectCredentialSubject, qu as completeDecision, rl as subjectTodo, rr as createPluginTaskStarter, rs as resolveAnnotationFilter, rt as canUserReadInboxItem, ss as subjectKey, st as inboxItemForUser, to as AUTOMATION_ALERT_STEPS, tt as canAnswerInboxItem, tu as isTopLevel, u as isPostgresErrorCode, ul as userAvatarUrlsFromJoinedPhotos, v as withConversationEventLock, va as blockEventAutomation, vl as settleInboxSnoozes, vr as hasAssigneeRoles, vs as createPluginConversationAnnotations, w as loadConversationSlackTenantIds, wr as canInviteToConversation, ws as conversationSubtree, x as readConversationTrees, xr as createPluginCodeChanges, y as conversationAncestors, ya as collectEventAutomationMatchKeys, yp as juniorInboxItems, yr as leavePluginInboxItem, ys as listConversationAnnotations, z as conversationCostOf, za as existingConversationId, zc as getInboxItem, zi as slackMention, zp as juniorConversations, zs as lookupSlackUserNames } from "./db-BacvswT0.js";
3
- import { $ as activityPreviewText, Lt as conversationTreeStateSchema, St as contextProvenance, Y as conversationReportStatusSchema, Z as conversationSurfaceSchema, Zt as readMessageAttachments, _n as answeredChoices, at as KNOWN_CONVERSATION_EVENT_TYPES, bn as isEmptyUserInputAnswer, kn as automationTaskText, pn as inboxItemQuestion, t as OPEN_TODO_STATUSES, xn as normalizeUserInputAnswer, yt as piMessageFromHistoryItem } from "./types-BNHkJrOP.js";
4
- import { T as withSpan, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
1
+ import { $ as resolveGatewayModel, L as botConfig, R as getChatConfig, a as getStateValues, i as getStateAdapter, o as setStateValues } from "./adapter-BkDQYdg6.js";
2
+ import { $ as canActOnInboxItem, $l as isThread, $s as isDmChannel, Ao as collectEventMatchKeys, Ap as juniorConversationAnnotations, Ar as readConversationAccessRows, As as isPublicConversation, Bi as slackMentionedUserIds, Bn as pushInboxSnoozeWakes, Bt as setTodoStatusByUser, Bu as storedMessageJson, C as conversationSlackTenantId, Cr as canAddConversationMessages, Cs as conversationAncestorsOrSelf, Dp as juniorConversationEvents, Dr as createConversationAccessReader, Ds as conversationSearchVector, Ed as JUNIOR_NATIVE_EVENT_NAMESPACE, Er as conversationAccessFromRows, Fr as readMemberParticipants, G as conversationStatusSql, Gc as takeInboxItem, Gi as createPluginState, Go as verifyEventAutomationCredentialSubject, Gp as juniorDestinations, Hc as listReplyActionItems, Hf as nextDetailVersion, Hi as applyPluginFormatMarkdown, Ho as bindScheduledAutomationCredentialSubject, If as agentTurnUsageSchema, Ip as juniorAttachments, Ir as rootVisibleToViewer, Ja as readAutomationTitlesByConversationId, K as conversationTurnFailedSql, Ko as verifyScheduledAutomationCredentialSubject, Kt as cancelHumanFacingPendingMessages, Ku as completeDecision, Lc as closeInboxItem, Lf as hasAgentTurnUsage, Lo as listConversationsWithWatches, Lp as juniorMessageAttachments, Lr as viewerMarksFromParticipant, Mr as conversationIsMemberRoot, Nc as waitingConversationIdsQuery, Nf as addAgentTurnUsage, Np as juniorCodeChanges, Nr as conversationIsNotUnsubscribedRoot, Oa as admitEventAutomationRun, Or as leaveEndsAccess, Pc as closeHandledReplyNotices, Po as findMatchingWatches, Pr as conversationPinnedForUser, Q as treeAwaitsAuthorization, Qi as basePluginContext, Rc as dismissOpenInboxItems, Rn as createInboxItemShow, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Rs as lookupSlackUser, S as setArchivedAt, Sa as findMatchingEventAutomations, Si as notifyAutomationBlocked, Sp as juniorConversationParticipants, St as inboxItemOwnedByThroughSubject, T as lastMessageAtSql, Ts as conversationSubtreeColumns, Tt as getPlugins, U as conversationIsActiveSql, Uc as ownerConversationId, Uo as bindSlackDirectCredentialSubject, Vi as wrapBareSlackUserIds, Vo as bindEventAutomationCredentialSubject, Vp as juniorIdentities, Wp as juniorUsers, X as awaitsAuthorizationFrom, Xc as INBOX_SUBJECT_KINDS, Xf as listedConversation, Y as conversationKindFromRow, Ya as recordAutomationExecution, Yc as itemQuestion, Yf as spaceLeadIds, Yn as safeLinkUrl, Yo as updateTimerIndex, Yr as buildSentryConversationUrl, Z as hasUnexpiredAuthorizationRequest, Zo as canPauseConversationDelivery, _l as settleInboxSnoozes, _o as slackChannelMessageRunsAutomation, _r as dismissPluginInboxItem, a as getDb, aa as createPluginCache, ai as buildDispatchId, an as getConversationWorkState, au as turnBehavior, br as takeOverPluginClose, bs as listConversationAnnotationsById, cc as createPluginUsers, ci as createOrGetDispatch, ct as inboxItemNeedsInput, er as createPluginEventPublisher, eu as isTopLevel, fi as getDispatchRecord, fo as getEventCatalog, go as slackChannelMessageReplyThreadTs, gr as createPluginInboxItems, gt as isPluginInboxItem, gu as eventGuidance, hi as isTerminalDispatchStatus, hl as listFiringInboxSnoozeTriggers, hr as PLUGIN_CHOICE_FIELD_ID, ht as isOnlyAssignee, i as getConversationStore, il as identityAvatarUrl, in as getConversation, ip as juniorTodos, it as conversationOwnsInboxItem, ja as automationVersionOf, ka as eventAutomationRunLimitReason, kl as parseDashboardConversationLink, kr as readConversationAccessFromSql, li as getDispatchConversationId, ll as userAvatarUrlsFromJoinedPhotos, lt as inboxItemPlugin, mi as getPluginDispatchProjection, mr as createPluginConversationChanges, mt as isInboxItemForEveryone, n as getConversationEventStore, nl as subjectTodo, no as AUTOMATION_ALERT_STEP_FIELD_ID, ns as annotationMatches, o as getSqlExecutor, ot as inboxItemAddedByAutomation, p as copyMessageLinks, pf as webActorUserIds, pp as juniorAutomations, pt as isAutomationAlertItem, pu as CORE_EVENT_NAMESPACE, q as conversationWaitsOnUserSql, qi as createPluginEmbedder, qo as verifySlackDirectCredentialSubject, rl as hasUserPhoto, rr as createPluginTaskStarter, rs as resolveAnnotationFilter, rt as canUserReadInboxItem, sp as juniorQuestions, ss as subjectKey, st as inboxItemForUser, to as AUTOMATION_ALERT_STEPS, tt as canAnswerInboxItem, u as isPostgresErrorCode, ul as SNOOZE_TIMER_EVENT_TYPE, up as juniorAutomationRuns, v as withConversationEventLock, va as blockEventAutomation, vp as juniorInboxItems, vr as hasAssigneeRoles, vs as createPluginConversationAnnotations, w as loadConversationSlackTenantIds, wr as canInviteToConversation, ws as conversationSubtree, x as readConversationTrees, xl as getDashboardConversationLink, xr as createPluginCodeChanges, y as conversationAncestors, ya as collectEventAutomationMatchKeys, yr as leavePluginInboxItem, ys as listConversationAnnotations, z as conversationCostOf, za as existingConversationId, zc as getInboxItem, zf as resolveRootConversationId, zi as slackMention, zs as lookupSlackUserNames } from "./db-CbURDbaB.js";
3
+ import { $ as activityPreviewText, Lt as conversationTreeStateSchema, On as automationTaskText, St as contextProvenance, Y as conversationReportStatusSchema, Z as conversationSurfaceSchema, Zt as readMessageAttachments, at as KNOWN_CONVERSATION_EVENT_TYPES, bn as normalizeUserInputAnswer, pn as inboxItemQuestion, t as OPEN_TODO_STATUSES, yn as isEmptyUserInputAnswer, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
4
+ import { T as withSpan, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-CqgOoICc.js";
5
5
  import { h as startSpan, n as captureMessage } from "./sentry-CPbZjomA.js";
6
- import { t as JUNIOR_VERSION } from "./version-BuLVNlxB.js";
7
- import { G as mapBounded, h as createPluginLogger } from "./prompt-C5CW2wKO.js";
6
+ import { t as JUNIOR_VERSION } from "./version-D_vbXyNw.js";
7
+ import { G as mapBounded, h as createPluginLogger } from "./prompt-CX29OGO9.js";
8
8
  import { o as webMessageId } from "./agent-status-Bq_AIpyp.js";
9
- import { D as notInheritedByForkChild, V as legacyWebMailboxMetadataSchema, _t as resolveBotSlackTeamId, dt as eventAuthorText, et as getWebAuthorization, gt as resolveEventAuthor, jt as renderTaskInput, kn as loadTurnProjection } from "./markers-C33gNYNE.js";
10
- import { An as setConversationTitle, Ar as gapSegment, Bn as isFileAttachment, Bt as conversationRecordColumns, Cn as recordWebConversationActivity, Dr as MINUTE_MS, Et as resolveObjectCards, F as markConversationRead, Fn as jsonResponse, G as getSpaceLead, Gt as conversationEventHistory, H as setConversationSpaceForViewer, Ht as conversationRecordJoins, In as throwApiError, J as getProductionSlackAdapter, Jt as readConversationParticipants, Kt as conversationSummaryFromStoredConversation, L as deliverInboxItemChange, Lt as resolveSlackTeamDomains, Mn as leaveConversation, Nn as setConversationSubscription, On as verifyAttachmentUploads, P as conversationReadPositionQuery, Q as clearSlackPendingReactions, Qn as takeViewerAutomationAlertStep, Rn as slackAttachmentsVersionQuery, Sn as createConversationId, T as ingestEvent, Tn as AttachmentUploadError, Tr as providerCacheTtlMs, Tt as readLiveAnnotationsById, U as readSpaceRefs, Ut as readConversationRecordFromSql, V as requireSpaceForWork, Vt as conversationRecordFromRow, Wt as selectConversationRecords, Yt as readFirstHumanMessageTexts, _ as listConversationWork, _r as historyPeriodSavings, at as enqueueAgentDispatch, cr as AutomationEditError, d as ANSWER_TOOL_ENDINGS, dr as effectiveTaskOutcomes, dt as readConversationEventPage, en as imagePath, er as ViewerTaskNotFoundError, f as CONVERSATION_STATE_TTL_MS, ft as readConversationEventPageAfter, g as isConversationWorkDone, gr as firstLiveSavingsDate, h as segmentGapsKey, hr as addHistoryWarmupCost, j as archiveConversation, kr as NO_REPLY_GAP_MS, lr as findAutomationSkill, m as GLOBAL_GAPS_TTL_MS, mr as addHistoryPeriod, nr as readConversationSourceTask, p as GLOBAL_GAPS_MAX, pt as readConversationEventPageAround, qn as createPluginConversationWatches, qt as readConversationAuthors, rn as readConversationLineage, un as parseContent, ur as missingAutomationSkillReason, v as readLastUserMessageAtByConversation, vn as acceptsWebMessages, vr as replaceHistorySavings, vt as stopConversation, wn as webActorFromUser, wr as connectedState, wt as readLiveAnnotations, xn as createAndEnqueueConversation, yn as appendAndEnqueueWebMessage, zt as conversationFromRecordRow } from "./agent-DxZ7nHfD.js";
11
- import { a as getChildAgentLabel } from "./result-BPNzgeTl.js";
12
- import { C as cancelConversationPendingMessagesBodySchema, D as conversationPendingMessageDeliverySchema, N as healthReportSchema, S as conversationAutoArchiveSchema, b as archiveConversationResponseSchema, c as conversationSubscriptionResponseSchema, g as pinConversationResponseSchema, h as pinConversationBodySchema, l as setConversationSpaceBodySchema, m as renameConversationResponseSchema, o as conversationLeaveResponseSchema, p as renameConversationBodySchema, r as stopConversationTurnResponseSchema, s as conversationSubscriptionBodySchema, u as setConversationSpaceResponseSchema, w as cancelConversationPendingMessagesResponseSchema, x as archiveDoneConversationsResponseSchema, y as archiveConversationBodySchema } from "./conversation-feed-DEUdD7mb.js";
13
- import { r as canContinueInSlack } from "./continue-in-slack-DBlQP4PC.js";
9
+ import { D as notInheritedByForkChild, V as legacyWebMailboxMetadataSchema, _t as resolveBotSlackTeamId, dt as eventAuthorText, et as getWebAuthorization, gt as resolveEventAuthor, jt as renderTaskInput, kn as loadTurnProjection } from "./markers-BtUv4-oc.js";
10
+ import { An as setConversationTitle, Ar as gapSegment, Bn as isFileAttachment, Bt as conversationRecordColumns, Cn as recordWebConversationActivity, Dr as MINUTE_MS, Et as resolveObjectCards, F as markConversationRead, Fn as jsonResponse, G as getSpaceLead, Gt as conversationEventHistory, H as setConversationSpaceForViewer, Ht as conversationRecordJoins, In as throwApiError, J as getProductionSlackAdapter, Jt as readConversationParticipants, Kt as conversationSummaryFromStoredConversation, L as deliverInboxItemChange, Lt as resolveSlackTeamDomains, Mn as leaveConversation, Nn as setConversationSubscription, On as verifyAttachmentUploads, P as conversationReadPositionQuery, Q as clearSlackPendingReactions, Qn as takeViewerAutomationAlertStep, Rn as slackAttachmentsVersionQuery, Sn as createConversationId, T as ingestEvent, Tn as AttachmentUploadError, Tr as providerCacheTtlMs, Tt as readLiveAnnotationsById, U as readSpaceRefs, Ut as readConversationRecordFromSql, V as requireSpaceForWork, Vt as conversationRecordFromRow, Wt as selectConversationRecords, Yt as readFirstHumanMessageTexts, _ as listConversationWork, _r as historyPeriodSavings, at as enqueueAgentDispatch, cr as AutomationEditError, d as ANSWER_TOOL_ENDINGS, dr as effectiveTaskOutcomes, dt as readConversationEventPage, en as imagePath, er as ViewerTaskNotFoundError, f as CONVERSATION_STATE_TTL_MS, ft as readConversationEventPageAfter, g as isConversationWorkDone, gr as firstLiveSavingsDate, h as segmentGapsKey, hr as addHistoryWarmupCost, j as archiveConversation, kr as NO_REPLY_GAP_MS, lr as findAutomationSkill, m as GLOBAL_GAPS_TTL_MS, mr as addHistoryPeriod, nr as readConversationSourceTask, p as GLOBAL_GAPS_MAX, pt as readConversationEventPageAround, qn as createPluginConversationWatches, qt as readConversationAuthors, rn as readConversationLineage, un as parseContent, ur as missingAutomationSkillReason, v as readLastUserMessageAtByConversation, vn as acceptsWebMessages, vr as replaceHistorySavings, vt as stopConversation, wn as webActorFromUser, wr as connectedState, wt as readLiveAnnotations, xn as createAndEnqueueConversation, yn as appendAndEnqueueWebMessage, zt as conversationFromRecordRow } from "./agent-CL9ZkOgx.js";
11
+ import { a as getChildAgentLabel } from "./result-BFBwK1M2.js";
12
+ import { C as cancelConversationPendingMessagesBodySchema, D as conversationPendingMessageDeliverySchema, N as healthReportSchema, S as conversationAutoArchiveSchema, b as archiveConversationResponseSchema, c as conversationSubscriptionResponseSchema, g as pinConversationResponseSchema, h as pinConversationBodySchema, l as setConversationSpaceBodySchema, m as renameConversationResponseSchema, o as conversationLeaveResponseSchema, p as renameConversationBodySchema, r as stopConversationTurnResponseSchema, s as conversationSubscriptionBodySchema, u as setConversationSpaceResponseSchema, w as cancelConversationPendingMessagesResponseSchema, x as archiveDoneConversationsResponseSchema, y as archiveConversationBodySchema } from "./conversation-feed-B1_1NJc8.js";
13
+ import { r as canContinueInSlack } from "./continue-in-slack-D9naZmqM.js";
14
14
  import * as z from "zod";
15
15
  import { and, asc, count, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, min, ne, not, notInArray, or, sql } from "drizzle-orm";
16
16
  import { alias } from "drizzle-orm/pg-core";
@@ -4609,37 +4609,6 @@ function feedMediaSql(db) {
4609
4609
  const files = db.select({ files: sql`jsonb_agg(jsonb_build_object('contentType', ${recentFiles.contentType}, 'filename', ${recentFiles.filename}, 'id', ${recentFiles.id}) order by ${recentFiles.createdAt} desc, ${recentFiles.id} desc)` }).from(recentFiles);
4610
4610
  return sql`(${files})`;
4611
4611
  }
4612
- // src/api/conversations/feed-answer.ts
4613
- /**
4614
- * A feed row column with the viewer's newest answered Inbox item of its
4615
- * Conversation, or null. It is a scalar subquery on the row read, so the
4616
- * answer costs no round trip of its own, however many items the viewer
4617
- * closed since.
4618
- */
4619
- function feedViewerAnswerSql(db, userId) {
4620
- const answered = db.select({
4621
- answer: sql`jsonb_build_object('answer', ${inboxItemAnswer}, 'closedAt', ${juniorInboxItems.closedAt}, 'request', ${inboxItemRequest})`.as("answer"),
4622
- closedAt: juniorInboxItems.closedAt,
4623
- id: juniorInboxItems.id,
4624
- ownerId: inboxItemOwnerConversationId().as("owner_id")
4625
- }).from(juniorInboxItems).leftJoin(juniorQuestions, itemQuestion).where(and(eq(juniorInboxItems.closedByUserId, userId), isNotNull(inboxItemAnswer), isNotNull(inboxItemRequest))).as("viewer_answered");
4626
- const answers = db.selectDistinctOn([answered.ownerId], {
4627
- answer: answered.answer,
4628
- ownerId: answered.ownerId
4629
- }).from(answered).where(isNotNull(answered.ownerId)).orderBy(answered.ownerId, desc(answered.closedAt), desc(answered.id)).as("viewer_answers");
4630
- return sql`((select jsonb_object_agg(${answers.ownerId}, ${answers.answer}) from ${answers}) -> ${juniorConversations.conversationId})`;
4631
- }
4632
- /**
4633
- * Keep only what a row says about the answer: when it closed and the
4634
- * options that the viewer picked. Text answers have no choices.
4635
- */
4636
- function feedViewerAnswer(stored) {
4637
- if (!stored) return void 0;
4638
- return {
4639
- choices: answeredChoices(stored.request, stored.answer),
4640
- closedAt: new Date(stored.closedAt).toISOString()
4641
- };
4642
- }
4643
4612
  // src/api/page-cursor.ts
4644
4613
  /**
4645
4614
  * Encode the position after the last row of a page as an opaque `cursor`
@@ -4711,8 +4680,7 @@ async function conversationRows(db, { codeRepository, conversationIds, cursor, f
4711
4680
  awaitingAuthorization: treeAwaitsAuthorization(juniorConversations.conversationId),
4712
4681
  latestTurnFailed: conversationTurnFailedSql(juniorConversations),
4713
4682
  links: include.includes("links") ? feedLinksSql(db) : sql`null`,
4714
- media: include.includes("media") ? feedMediaSql(db) : sql`null`,
4715
- viewerAnswer: filter?.kind === "viewer" ? feedViewerAnswerSql(db, filter.userId) : sql`null`
4683
+ media: include.includes("media") ? feedMediaSql(db) : sql`null`
4716
4684
  }).from(juniorConversations).leftJoin(juniorDestinations, conversationRecordJoins.location).leftJoin(juniorIdentities, conversationRecordJoins.identity).leftJoin(juniorUsers, conversationRecordJoins.user).where(and(space ? conversationSpaceFilter(space.id, status, space.viewerUserId) : and(listedConversation(), conversationFeedMembershipFilter(status, filter)), conversationIds ? inArray(juniorConversations.conversationId, conversationIds) : void 0, waitingForUserId ? inArray(juniorConversations.conversationId, waitingConversationIdsQuery(db, waitingForUserId)) : void 0, pinnedForUserId ? pinnedForUserId.pinned ? conversationPinnedForUser(pinnedForUserId.userId) : not(conversationPinnedForUser(pinnedForUserId.userId)) : void 0, cursor ? sql`(${juniorConversations.lastActivityAt} < ${cursor.at}::timestamptz or (${juniorConversations.lastActivityAt} = ${cursor.at}::timestamptz and ${juniorConversations.conversationId} > ${cursor.conversationId}))` : void 0, codeRepository ? conversationCodeRepositoryFilter(codeRepository.id, codeRepository.viewerUserId) : void 0, query ? or(sql`strpos(lower(coalesce(${juniorConversations.title}, '')), ${query}) > 0`, and(includePrivateMatches ? void 0 : isPublicConversation(juniorConversations), sql`${conversationSearchVector} @@ websearch_to_tsquery('english', ${query})`), annotationMatch(db, {
4717
4685
  includePrivate: includePrivateMatches,
4718
4686
  query,
@@ -4970,7 +4938,6 @@ async function readConversationFeedFromSql(options = {}) {
4970
4938
  const links = access?.canViewPrivateContent && row.links ? pickFeedLinks(conversation.conversationId, row.links, annotationUrls(visibleAnnotationsByConversation.get(conversation.conversationId))) : [];
4971
4939
  const lastMessageAt = row.lastMessageAt?.toISOString();
4972
4940
  const treeRead = treeStateByConversation.get(conversation.conversationId);
4973
- const viewerAnswer = access?.canViewPrivateContent ? feedViewerAnswer(row.viewerAnswer) : void 0;
4974
4941
  return {
4975
4942
  ...summary,
4976
4943
  ...work,
@@ -4982,7 +4949,6 @@ async function readConversationFeedFromSql(options = {}) {
4982
4949
  ...threads?.omittedThreadCount ? { omittedThreadCount: threads.omittedThreadCount } : void 0,
4983
4950
  ...participants && participants.length > 0 ? { participants } : void 0,
4984
4951
  ...activityPreview ? { activityPreview } : void 0,
4985
- ...viewerAnswer ? { viewerAnswer } : void 0,
4986
4952
  ...media?.length ? { media } : void 0,
4987
4953
  ...links.length > 0 ? { links } : void 0,
4988
4954
  ...sidebarAnnotationsByConversation[conversation.conversationId] ? { sidebarAnnotations: sidebarAnnotationsByConversation[conversation.conversationId] } : void 0,
@@ -1,5 +1,5 @@
1
1
  import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-CPbZjomA.js";
2
- import { _ as getDeploymentTelemetryAttributes } from "./deployment-BoJkRPDt.js";
2
+ import { _ as getDeploymentTelemetryAttributes } from "./deployment-D9uPRDMD.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1,15 +1,15 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
3
- import { $l as isPersonInput, $s as isDmChannel, Ad as conversationNoteEvent, Cc as findLinkedSlackUser, Cd as getProviderErrorUserMessage, Dd as JUNIOR_NATIVE_EVENT_NAMESPACE, Dn as releaseInboundMessage, Du as ToolInputError, Eo as publishAgentUpdate, Et as getRegistrations, Fn as readInboundMessageSender, Gp as juniorUsers, Ii as escapeSlackMrkdwnText, In as isEventMailboxMetadata, Is as findActorTimezone, Jo as verifyTimerWatchCredentialSubject, Kp as juniorDestinations, Li as formatSlackLink, N as claimProviderConversation, Nl as projectConversationMessages, Od as agentsInstructionsUpdatedEvent, Oi as postSlackEphemeralMessage, On as traceContextSchema, Op as juniorConversationEvents, Pd as getAppContext, Pf as addAgentTurnUsage, Pn as readParentMessage, Ql as instructionAuthor, Rr as getVercelConversationWorkQueue, Sd as getProviderErrorAttributes, Ts as conversationSubtreeColumns, Tt as getPlugins, Uf as nextDetailVersion, Ui as getPluginUserPromptContributions, Ut as appendAndEnqueueInboundMessage, W as conversationLastTurnOutcomeSql, Wt as appendInboundMessage, Xl as dispatchInstructionsInvokeSkills, Xo as JUNIOR_THREAD_STATE_TTL_MS, Xs as getSlackClient, Yu as completeText, Zr as formatSentryEventReference, _d as isCompactionSummaryText, _u as eventGuidance, a as getDb, aa as createPluginCache, ac as sleep, an as getConversationWorkState, ao as generateShortTitle, bd as createProviderError, bp as juniorLocationConfigurations, cu as EVENT_AUTHOR_ID, d as createSqlConversationEventStore, dd as estimateTextTokens, dr as readThroughHttpCache, du as eventBotAuthorId, ea as pluginConfigValues, fo as getEventCatalog, gn as takePendingEventMessages, hn as stopConversationWork, i as getConversationStore, ic as withSlackRetries, io as fallbackShortTitle, ip as juniorWorkspaces, j as startLocationThread, kd as authenticationLinkedEvent, ki as postSlackMessage, lu as EVENT_MESSAGE_AUTHOR, n as getConversationEventStore, nn as dropPendingMessages, np as juniorSnapshots, o as getSqlExecutor, oa as getConfigDefaults, od as createCache, on as getConversationWorkStates, pu as isEventConversationMessage, rp as juniorWorkspaceRepos, u as isPostgresErrorCode, uu as EVENT_SYSTEM_ACTOR, v as withConversationEventLock, vc as SYSTEM_IDENTITY_ID, wc as findSlackUserByPrimaryEmail, ws as conversationSubtree, xd as findProviderError, xp as juniorAgentBindings, yc as resolveActorIdentityId, yd as createAssistantProviderError, zc as getInboxItem, zp as juniorConversations } from "./db-BacvswT0.js";
4
- import { Ct as instructionActors, St as contextProvenance, Un as isAgentUpdateEventType, Vt as messageCardRef, bt as piMessageSchema, gt as historyItemFromPiMessage, nt as agentTypeInstructions, pn as inboxItemQuestion, rt as agentTypeSchema, wt as instructionProvenanceFor, xn as normalizeUserInputAnswer, xt as agentInstructionProvenance, yn as formatUserInputAnswer, yt as piMessageFromHistoryItem } from "./types-BNHkJrOP.js";
5
- import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
6
- import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-C5CW2wKO.js";
7
- import { a as toCanonicalInputMessage } from "./conversation-privacy-qoh95v90.js";
8
- import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-50izzzdK.js";
9
- import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-v9vA3RvH.js";
10
- import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-CIR1B44Z.js";
2
+ import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-BkDQYdg6.js";
3
+ import { $s as isDmChannel, Cc as findLinkedSlackUser, Dd as agentsInstructionsUpdatedEvent, Dn as releaseInboundMessage, Dp as juniorConversationEvents, Ed as JUNIOR_NATIVE_EVENT_NAMESPACE, Eo as publishAgentUpdate, Et as getRegistrations, Eu as ToolInputError, Fn as readInboundMessageSender, Gp as juniorDestinations, Hf as nextDetailVersion, Ii as escapeSlackMrkdwnText, In as isEventMailboxMetadata, Is as findActorTimezone, Jo as verifyTimerWatchCredentialSubject, Ju as completeText, Li as formatSlackLink, Ml as projectConversationMessages, N as claimProviderConversation, Nd as getAppContext, Nf as addAgentTurnUsage, Od as authenticationLinkedEvent, Oi as postSlackEphemeralMessage, On as traceContextSchema, Pn as readParentMessage, Ql as isPersonInput, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Sd as getProviderErrorUserMessage, Ts as conversationSubtreeColumns, Tt as getPlugins, Ui as getPluginUserPromptContributions, Ut as appendAndEnqueueInboundMessage, W as conversationLastTurnOutcomeSql, Wp as juniorUsers, Wt as appendInboundMessage, Xo as JUNIOR_THREAD_STATE_TTL_MS, Xs as getSlackClient, Yl as dispatchInstructionsInvokeSkills, Zl as instructionAuthor, Zr as formatSentryEventReference, a as getDb, aa as createPluginCache, ac as sleep, ad as createCache, an as getConversationWorkState, ao as generateShortTitle, bd as findProviderError, bp as juniorAgentBindings, cu as EVENT_MESSAGE_AUTHOR, d as createSqlConversationEventStore, dr as readThroughHttpCache, ea as pluginConfigValues, fo as getEventCatalog, fu as isEventConversationMessage, gd as isCompactionSummaryText, gn as takePendingEventMessages, gu as eventGuidance, hn as stopConversationWork, i as getConversationStore, ic as withSlackRetries, io as fallbackShortTitle, j as startLocationThread, kd as conversationNoteEvent, ki as postSlackMessage, lu as EVENT_SYSTEM_ACTOR, n as getConversationEventStore, nn as dropPendingMessages, np as juniorWorkspaceRepos, o as getSqlExecutor, oa as getConfigDefaults, on as getConversationWorkStates, rp as juniorWorkspaces, su as EVENT_AUTHOR_ID, tp as juniorSnapshots, u as isPostgresErrorCode, ud as estimateTextTokens, uu as eventBotAuthorId, v as withConversationEventLock, vc as SYSTEM_IDENTITY_ID, vd as createAssistantProviderError, wc as findSlackUserByPrimaryEmail, ws as conversationSubtree, xd as getProviderErrorAttributes, yc as resolveActorIdentityId, yd as createProviderError, yp as juniorLocationConfigurations, zc as getInboxItem } from "./db-CbURDbaB.js";
4
+ import { Ct as instructionActors, Hn as isAgentUpdateEventType, St as contextProvenance, Vt as messageCardRef, bn as normalizeUserInputAnswer, bt as piMessageSchema, gt as historyItemFromPiMessage, nt as agentTypeInstructions, pn as inboxItemQuestion, rt as agentTypeSchema, vn as formatUserInputAnswer, wt as instructionProvenanceFor, xt as agentInstructionProvenance, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
5
+ import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-CqgOoICc.js";
6
+ import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-CX29OGO9.js";
7
+ import { a as toCanonicalInputMessage } from "./conversation-privacy-C0mixZKx.js";
8
+ import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-DMJsS5e4.js";
9
+ import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-bLo0h7Le.js";
10
+ import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-C886lsT9.js";
11
11
  import { t as isMissingVirtualModule } from "./virtual-module-BeKA_EII.js";
12
- import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-DOVo9sdU.js";
12
+ import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-DBrcQl47.js";
13
13
  import { r as userCustomizationTextSchema, s as isVisionImageMediaType } from "./user-customization-CvfuY9Eo.js";
14
14
  import * as z from "zod";
15
15
  import { getCurrentSystemMessage, getSystemMessageText } from "@earendil-works/pi-ai/compat";
@@ -786,12 +786,14 @@ var ToolActionReviewLimitError = class extends Error {
786
786
  }
787
787
  };
788
788
  /**
789
- * True when an `auto` action must enter review. Only the annotations that
790
- * Junior or plugin code declares on the tool can skip review: read-only and
791
- * not destructive. Annotations that an MCP server sends reach Guardian only as
792
- * hints, because a server can mark a write as read-only.
789
+ * True when an `auto` action must enter review. Only Junior or plugin code
790
+ * can skip it: annotations that it declares on the tool, read-only and not
791
+ * destructive, or a remote MCP tool that the plugin lists by exact name in
792
+ * `mcp.guardian.skipReview`. Annotations that an MCP server sends reach
793
+ * Guardian only as hints, because a server can mark a write as read-only.
793
794
  */
794
- function autoActionNeedsReview({ annotations }) {
795
+ function autoActionNeedsReview({ annotations }, resolved) {
796
+ if (resolved?.skipReview) return false;
795
797
  return !(annotations?.readOnlyHint === true && annotations.destructiveHint !== true);
796
798
  }
797
799
  function actionActor(actor) {
@@ -932,7 +934,7 @@ async function prepareToolActionReview(action, context, priorRejections) {
932
934
  const { tool, input } = action;
933
935
  if (!mayNeedReview(tool)) return;
934
936
  const resolved = await tool.resolveApprovalMetadata?.(input);
935
- if (tool.approvalMode === "auto" && !autoActionNeedsReview(tool)) return;
937
+ if (tool.approvalMode === "auto" && !autoActionNeedsReview(tool, resolved)) return;
936
938
  assertAuthoritativeContext(context);
937
939
  const proposal = buildProposal(action.toolName, tool, input, resolved, context, priorRejections, await context.rootConversation?.(), action.script);
938
940
  return {
package/dist/nitro.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
2
- import { r as JuniorDashboardOptions } from "./app-CHCFIIDu.js";
2
+ import { r as JuniorDashboardOptions } from "./app-CwFRvmEH.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
5
5
  type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
package/dist/nitro.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { _ as toOptionalTrimmed, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, g as resolvePackageDir, h as isValidPackageName, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as discoverInstalledPluginPackageContent, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-DxuKurCX.js";
2
2
  import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
3
3
  import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
4
- import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-BoJkRPDt.js";
4
+ import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-D9uPRDMD.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-D_Ru4CWc.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
7
7
  import path from "node:path";
@@ -252,7 +252,7 @@ function injectVirtualConfig(nitro, options) {
252
252
  */
253
253
  function injectVirtualSystemPrompts(nitro, options) {
254
254
  nitro.options.virtual["#junior/system-prompts"] = async () => {
255
- const { buildSystemPromptTable } = await import("./system-prompt-table-CIR1B44Z.js").then((n) => n.r);
255
+ const { buildSystemPromptTable } = await import("./system-prompt-table-C886lsT9.js").then((n) => n.r);
256
256
  const table = await buildSystemPromptTable(await options.loadPlugins(), options.botName);
257
257
  return `export const systemPrompts = ${JSON.stringify(table)};`;
258
258
  };
@@ -1,5 +1,5 @@
1
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bj9-UlNE.js";
2
- import { A as createUserTokenStore } from "./profile-v9vA3RvH.js";
1
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DL9r-ry5.js";
2
+ import { A as createUserTokenStore } from "./profile-bLo0h7Le.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
2
+ import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
3
3
  import * as z from "zod";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { SignJWT, jwtVerify } from "jose";
@@ -1,7 +1,7 @@
1
- import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
2
- import { Af as ServiceAccountUnavailableError, Ld as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Nf as workloadIdentityHeader, Of as CredentialMintError, Pd as getAppContext, Rd as resolveAuthTokenPlaceholder, Tt as getPlugins, _f as resolvePluginCommandEnv, a as getDb, aa as createPluginCache, ac as sleep, df as createEncryptedState, ff as readEncryptedState, hf as resolveApiHeaderTransforms, ia as runNonInteractiveCommand, kf as CredentialUnavailableError, pf as findLegacyWebActorUserId, zd as mergeHeaderTransforms } from "./db-BacvswT0.js";
3
- import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-C5CW2wKO.js";
4
- import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
1
+ import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-BkDQYdg6.js";
2
+ import { Df as CredentialMintError, Id as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Ld as resolveAuthTokenPlaceholder, Mf as workloadIdentityHeader, Nd as getAppContext, Of as CredentialUnavailableError, Rd as mergeHeaderTransforms, Tt as getPlugins, a as getDb, aa as createPluginCache, ac as sleep, df as readEncryptedState, ff as findLegacyWebActorUserId, gf as resolvePluginCommandEnv, ia as runNonInteractiveCommand, kf as ServiceAccountUnavailableError, mf as resolveApiHeaderTransforms, uf as createEncryptedState } from "./db-CbURDbaB.js";
3
+ import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-CX29OGO9.js";
4
+ import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-CqgOoICc.js";
5
5
  import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
6
6
  import { r as continueTrace } from "./sentry-CPbZjomA.js";
7
7
  import * as z from "zod";
@@ -1117,12 +1117,18 @@ async function responseTextWithinLimit(upstream, maxBytes) {
1117
1117
  }
1118
1118
  const body = clone.body;
1119
1119
  if (!body) return "";
1120
+ const reader = body.getReader();
1120
1121
  const chunks = [];
1121
1122
  let bytes = 0;
1122
1123
  try {
1123
- for await (const value of body) {
1124
+ while (true) {
1125
+ const { done, value } = await reader.read();
1126
+ if (done) break;
1124
1127
  bytes += value.byteLength;
1125
- if (bytes > limit) return;
1128
+ if (bytes > limit) {
1129
+ reader.cancel().catch(() => void 0);
1130
+ return;
1131
+ }
1126
1132
  chunks.push(value);
1127
1133
  }
1128
1134
  } catch {
@@ -1,4 +1,4 @@
1
- import { f as logException, m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
1
+ import { f as logException, m as logWarn, p as logInfo } from "./logging-CqgOoICc.js";
2
2
  import { escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, openingTag, readTag, renderTag, startsWithTag, stripTags, unescapeClosingTags, unescapeTagText } from "@sentry/junior-plugin-api";
3
3
  import pLimit from "p-limit";
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-BacvswT0.js";
2
- import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-C5CW2wKO.js";
1
+ import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-CbURDbaB.js";
2
+ import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-CX29OGO9.js";
3
3
  // src/chat/plugins/hooks/reports.ts
4
4
  const OPERATIONAL_REPORT_MAX_METRICS = 8;
5
5
  const OPERATIONAL_REPORT_MAX_WIDGETS = 12;
@@ -1,8 +1,8 @@
1
- import { R as getChatConfig, i as getStateAdapter } from "./adapter-DlLLoJKj.js";
2
- import { ac as sleep, ia as runNonInteractiveCommand } from "./db-BacvswT0.js";
3
- import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-C5CW2wKO.js";
4
- import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-v9vA3RvH.js";
5
- import { T as withSpan, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
1
+ import { R as getChatConfig, i as getStateAdapter } from "./adapter-BkDQYdg6.js";
2
+ import { ac as sleep, ia as runNonInteractiveCommand } from "./db-CbURDbaB.js";
3
+ import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-CX29OGO9.js";
4
+ import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-bLo0h7Le.js";
5
+ import { T as withSpan, y as setSpanAttributes } from "./logging-CqgOoICc.js";
6
6
  import * as z from "zod";
7
7
  // src/chat/sandbox/resources.ts
8
8
  /**
@@ -1,8 +1,8 @@
1
- import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, au as remindsNoReplyForChildStatus, i as getConversationStore, mu as CORE_EVENT_NAMESPACE, nu as parentResultActor, uu as EVENT_SYSTEM_ACTOR, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
2
- import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-C33gNYNE.js";
3
- import { H as renderDataTag } from "./prompt-C5CW2wKO.js";
4
- import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-CIR1B44Z.js";
5
- import { Bn as AGENT_UPDATE_EVENT_TYPE, zn as AGENT_MESSAGE_EVENT_TYPE } from "./types-BNHkJrOP.js";
1
+ import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, i as getConversationStore, iu as remindsNoReplyForChildStatus, lu as EVENT_SYSTEM_ACTOR, pu as CORE_EVENT_NAMESPACE, tu as parentResultActor, vc as SYSTEM_IDENTITY_ID } from "./db-CbURDbaB.js";
2
+ import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-BtUv4-oc.js";
3
+ import { H as renderDataTag } from "./prompt-CX29OGO9.js";
4
+ import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-C886lsT9.js";
5
+ import { Rn as AGENT_MESSAGE_EVENT_TYPE, zn as AGENT_UPDATE_EVENT_TYPE } from "./types-CGgQ3-Bb.js";
6
6
  // src/chat/child-agents/child-message.ts
7
7
  /**
8
8
  * List the child replies and results among the ids that reached one
@@ -70,7 +70,7 @@ function renderAgentResult(args) {
70
70
  * Render the parent agent input for one child agent result as one
71
71
  * `<agent-result>`, the agent update that a Watch on the child also gets.
72
72
  * The system prompt says what to do for each status. A Lead's done result
73
- * also reminds it that a status update needs no reply.
73
+ * also reminds it that only a status update with no news needs no reply.
74
74
  */
75
75
  function renderResultInput(sender, result, openSiblings) {
76
76
  const agentResult = renderAgentResult({
@@ -86,7 +86,7 @@ function renderResultInput(sender, result, openSiblings) {
86
86
  });
87
87
  return result.status === "done" ? withNoReplyReminder(sender, agentResult) : agentResult;
88
88
  }
89
- const NO_REPLY_REMINDER = `If this is only a status update with nothing a member needs, end with \`${NO_REPLY_TOOL_NAME}\`.`;
89
+ const NO_REPLY_REMINDER = `If this is only a status update with no news for a member, end with \`${NO_REPLY_TOOL_NAME}\`. A done signal that is now true is news.`;
90
90
  function withNoReplyReminder(sender, input) {
91
91
  return remindsNoReplyForChildStatus(sender.parentKind) ? `${input}\n${NO_REPLY_REMINDER}` : input;
92
92
  }
@@ -1,10 +1,10 @@
1
- import { Ht as messageCardText } from "./types-BNHkJrOP.js";
2
- import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-DxZ7nHfD.js";
3
- import { h as getAssistantReplyText } from "./system-prompt-table-CIR1B44Z.js";
4
- import { f as logException, w as withLogContext, x as setTags } from "./logging-DsTnMqyi.js";
5
- import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-C33gNYNE.js";
6
- import { f as credentialContextForActor } from "./adapter-DlLLoJKj.js";
7
- import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
1
+ import { Ht as messageCardText } from "./types-CGgQ3-Bb.js";
2
+ import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-CL9ZkOgx.js";
3
+ import { h as getAssistantReplyText } from "./system-prompt-table-C886lsT9.js";
4
+ import { f as logException, w as withLogContext, x as setTags } from "./logging-CqgOoICc.js";
5
+ import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-BtUv4-oc.js";
6
+ import { f as credentialContextForActor } from "./adapter-BkDQYdg6.js";
7
+ import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-CbURDbaB.js";
8
8
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
9
9
  import { randomUUID } from "node:crypto";
10
10
  // src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { k as sandboxEgressSignalsResponseSchema } from "./profile-v9vA3RvH.js";
1
+ import { k as sandboxEgressSignalsResponseSchema } from "./profile-bLo0h7Le.js";
2
2
  // src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
@@ -1,7 +1,7 @@
1
1
  import "./user-customization-CvfuY9Eo.js";
2
- import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema, Mn as notificationScheduleSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, Yt as inputFileSchema, et as conversationChildAgentTotalsSchema, fn as inboxItemNoticeRequestSchema, i as TODO_STATUSES, mn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-BNHkJrOP.js";
2
+ import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, Yt as inputFileSchema, et as conversationChildAgentTotalsSchema, fn as inboxItemNoticeRequestSchema, i as TODO_STATUSES, jn as notificationScheduleSchema, mn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-CGgQ3-Bb.js";
3
3
  import { l as fillUtcDays, p as sumUtcHoursIntoSixHours, t as AGENT_STATUSES, u as fillUtcHours, v as CHILD_AGENT_RESULTS } from "./agent-status-Bq_AIpyp.js";
4
- import { f as conversationTitleSchema } from "./conversation-feed-DEUdD7mb.js";
4
+ import { f as conversationTitleSchema } from "./conversation-feed-B1_1NJc8.js";
5
5
  import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
6
6
  import * as z from "zod";
7
7
  import { codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
@@ -1,5 +1,5 @@
1
- import { Bd as disconnectServiceAccount, Gd as serviceAccountPlugins, Hd as getServiceAccountStatus, Kd as startServiceAccountSignIn, Pd as getAppContext, Vd as finishServiceAccountSignIn } from "./db-BacvswT0.js";
2
- import { n as disconnectStateAdapter } from "./adapter-DlLLoJKj.js";
1
+ import { Bd as finishServiceAccountSignIn, Gd as startServiceAccountSignIn, Nd as getAppContext, Vd as getServiceAccountStatus, Wd as serviceAccountPlugins, zd as disconnectServiceAccount } from "./db-CbURDbaB.js";
2
+ import { n as disconnectStateAdapter } from "./adapter-BkDQYdg6.js";
3
3
  import { CLI_USAGE } from "./cli/run.js";
4
4
  import { createServer } from "node:http";
5
5
  // src/cli/service-account.ts
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
2
+ import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
3
3
  import { f as skillRoots } from "./topics-DxuKurCX.js";
4
- import { m as logWarn } from "./logging-DsTnMqyi.js";
5
- import { Pd as getAppContext } from "./db-BacvswT0.js";
6
- import { G as mapBounded } from "./prompt-C5CW2wKO.js";
4
+ import { m as logWarn } from "./logging-CqgOoICc.js";
5
+ import { Nd as getAppContext } from "./db-CbURDbaB.js";
6
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
7
7
  import * as z from "zod";
8
8
  import path from "node:path";
9
9
  import { parse } from "yaml";
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { Al as parseDashboardConversationLink, Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, od as createCache, ti as runWithSlackInstallation } from "./db-BacvswT0.js";
3
- import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-DlLLoJKj.js";
4
- import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DOVo9sdU.js";
5
- import { T as withSpan } from "./logging-DsTnMqyi.js";
6
- import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-DBlQP4PC.js";
7
- import { t as checkSlackChannelReadAccess } from "./channel-access-BghWqlXx.js";
8
- import { G as mapBounded } from "./prompt-C5CW2wKO.js";
2
+ import { Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, ad as createCache, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kl as parseDashboardConversationLink, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, ti as runWithSlackInstallation } from "./db-CbURDbaB.js";
3
+ import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-BkDQYdg6.js";
4
+ import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DBrcQl47.js";
5
+ import { T as withSpan } from "./logging-CqgOoICc.js";
6
+ import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-D9naZmqM.js";
7
+ import { t as checkSlackChannelReadAccess } from "./channel-access-BUHB0saC.js";
8
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
9
9
  import * as z from "zod";
10
10
  // src/chat/ingress/workspace-membership.ts
11
11
  const MEMBER_TTL_MS = 3e5;
@@ -1,5 +1,5 @@
1
- import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
2
- import { G as mapBounded } from "./prompt-C5CW2wKO.js";
1
+ import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
2
+ import { G as mapBounded } from "./prompt-CX29OGO9.js";
3
3
  import * as z from "zod";
4
4
  import { AwsClient } from "aws4fetch";
5
5
  import { del, get, issueSignedToken, presignUrl, put } from "@vercel/blob";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-C5CW2wKO.js";
2
+ import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-CX29OGO9.js";
3
3
  import { m as worldPathCandidates, p as soulPathCandidates, u as listReferenceFiles } from "./topics-DxuKurCX.js";
4
- import { m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
4
+ import { m as logWarn, p as logInfo } from "./logging-CqgOoICc.js";
5
5
  import * as z from "zod";
6
6
  import path from "node:path";
7
7
  import { escapeClosingTag, escapeTagText, escapeTagTextAndQuotes, findTags, indentTagLines, markdownNodes, openingTag, parseMarkdown, promptMessageSchema, renderInlineTag, renderTag, unescapeTagText } from "@sentry/junior-plugin-api";
@@ -333,9 +333,9 @@ const LEAD_RULES = [
333
333
  "- A member who tells you about a problem, a worry, or something they do not understand in the Space's area asks you to deal with it. Start the work that investigates it and delivers the fix or the answer, without asking first.",
334
334
  "- A brief gives the goal, the targets, the facts with their source, the constraints, what done means, and the shape of the result. Hand off only the work that the member asked for, and name other work as a follow-up. When you pass on a member's approval, quote their exact words.",
335
335
  "- When the result of one Thread changes the work of another, such as a renamed function or a moved file, tell the other Thread with `messageAgent`. Tell the members only when it changes what they get.",
336
- "- When the done signal of a Thread's work is true, archive the Thread with `archiveAgent`.",
337
336
  "- A decision is a member's only when it changes what ships or who sees it, and nothing that they said settles it. Look for their earlier words first. A child's question about how to do the work, such as a design detail, is not a member's decision. A confirmation that a child or Guardian asks for before an action is the member's, as `<task-execution>` says. Make every other decision yourself and say that it is your decision. Do not write that a member gave it to you, such as \"they delegated it to me\".",
338
- `- When a child's result changes nothing for the members, end the Turn with \`${NO_REPLY_TOOL_NAME}\`.`,
337
+ "- When a child reports that the done signal of its work is true, such as a merged pull request, archive the child unless it still has open work. Then start the next step that the members agreed to, or tell the member what is done and the one next step that you suggest.",
338
+ `- When a child's result or message has no news for the members, such as checks that still run, end the Turn with \`${NO_REPLY_TOOL_NAME}\`.`,
339
339
  "- When a member asks where the work is, answer from `listAgents` and the live state of its pull requests, which a Task reads for you, in this order: what needs them, what is in flight, what is done.",
340
340
  "- The world section's facts, such as repositories and owners, help you write briefs. Its rules for how to do the work are for the Threads that do it."
341
341
  ];