@sentry/junior 0.216.0 → 0.217.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 (49) hide show
  1. package/dist/{agent-BFKt9huN.js → agent-CV4MPfCD.js} +100 -33
  2. package/dist/{agent-hooks-pyhfSnAL.js → agent-hooks-BtGATjr2.js} +6 -6
  3. package/dist/{agent-runner-CIiziOcz.js → agent-runner-DCj_cPjl.js} +5 -5
  4. package/dist/api.js +15 -15
  5. package/dist/app.js +29 -29
  6. package/dist/{auth-pause-state-BKGc9Y8O.js → auth-pause-state-C7GMUpb9.js} +6 -6
  7. package/dist/{briefs-Bq5vouaO.js → briefs-eG5Jo1xa.js} +2 -2
  8. package/dist/{catalog-runtime-D3hJdAMz.js → catalog-runtime-LUAIHslF.js} +1 -1
  9. package/dist/{checkpoint-Ja5A32op.js → checkpoint-CmkbGGiR.js} +6 -6
  10. package/dist/cli/chat.js +13 -13
  11. package/dist/cli/check.js +3 -3
  12. package/dist/cli/main.js +1 -1
  13. package/dist/cli/plugins.js +3 -3
  14. package/dist/cli/snapshot-create.js +3 -3
  15. package/dist/cli/upgrade.js +3 -3
  16. package/dist/{client-DqG_LDSH.js → client-ciJRmcY5.js} +2 -2
  17. package/dist/{config-CdS5GQ7W.js → config-BMwzCmw-.js} +2 -2
  18. package/dist/{conversation-privacy-B7844ly7.js → conversation-privacy-CLkpzAlt.js} +1 -1
  19. package/dist/{credential-sync-DLWVq50D.js → credential-sync-BoWHpDBP.js} +22 -22
  20. package/dist/{execution-stats-BbYien1O.js → execution-stats-C-E5FIsT.js} +3 -3
  21. package/dist/{executor-CIl9A6cO.js → executor-D0xETqi8.js} +1 -1
  22. package/dist/instrumentation.js +2 -2
  23. package/dist/{job-queue-CIz2Sij0.js → job-queue-C8FZ3LSY.js} +1 -1
  24. package/dist/{logging-dD_n9Ocp.js → logging-CHZ0aJXO.js} +1 -1
  25. package/dist/nitro.js +3 -3
  26. package/dist/{oauth-callback-server-CBfuGXP0.js → oauth-callback-server-D2JPUvY4.js} +2 -2
  27. package/dist/{pending-auth-KOZWIp4m.js → pending-auth-HNSPyxoN.js} +2 -2
  28. package/dist/{profile-BfWuRDUF.js → profile-6veboDue.js} +4 -4
  29. package/dist/{registry-DYHLzGuO.js → registry-DR6TJe4J.js} +1 -1
  30. package/dist/{resolve-CU8DArbR.js → resolve-DprAzyQN.js} +2 -2
  31. package/dist/{runner-BtHHH38l.js → runner-CV9Wahh9.js} +9 -9
  32. package/dist/{sandbox-egress-signals-BvZZ02w9.js → sandbox-egress-signals-BpRsWlQP.js} +1 -1
  33. package/dist/{short-title-CKnmS3nO.js → short-title-XUBD7AYC.js} +2 -2
  34. package/dist/{skills-CLsaAMtU.js → skills-DeUBvhdn.js} +2 -2
  35. package/dist/{spawn-C6Utdbzm.js → spawn-BFzlrZae.js} +2 -2
  36. package/dist/{stats-D4Ar_7MS.js → stats-BvNqVRdB.js} +5 -5
  37. package/dist/{task-queue-BgOOj26_.js → task-queue-CbxNVEAg.js} +3 -3
  38. package/dist/{task-runner-BfOnhH3C.js → task-runner-BH5M3JHb.js} +7 -7
  39. package/dist/{thread-state-B-jR3Aa8.js → thread-state-Db98GdYL.js} +5 -5
  40. package/dist/{turn-execution-_rlctc-2.js → turn-execution-mZIWtngI.js} +3 -3
  41. package/dist/{turn-lifecycle-CVRu8Hmm.js → turn-lifecycle-CNsgouon.js} +1 -1
  42. package/dist/{validation-5255qF_p.js → validation-Dy7SUhLv.js} +1 -1
  43. package/dist/{version-DS_6p6x1.js → version-Es4nurl1.js} +1 -1
  44. package/dist/version.js +1 -1
  45. package/dist/{web-authorization-TdkXi7XG.js → web-authorization-DG2K_bpi.js} +1 -1
  46. package/dist/{web-input-vHOAXVxj.js → web-input-CZjYeCFh.js} +4 -4
  47. package/dist/{work-NIWYQvh-.js → work-DTqDMGeD.js} +9 -9
  48. package/dist/{worker-BgY7599f.js → worker-BvuVxS4T.js} +5 -5
  49. package/package.json +5 -5
@@ -1,28 +1,28 @@
1
- import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-DqG_LDSH.js";
2
- import { C as withSpan, F as isRecord$2, P as normalizeIdentityEmail, S as withLogContext, _ as setSpanAttributes, a as extractGenAiUsageSummary, b as summarizeMessageText, c as getTracePropagationHeaders, d as logInfo, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as logError, p as normalizeGenAiFinishReason, s as getLogContextAttributesForSpan, u as logException, v as setSpanStatus, y as setTags } from "./logging-dD_n9Ocp.js";
1
+ import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-ciJRmcY5.js";
2
+ import { C as withSpan, F as isRecord$2, P as normalizeIdentityEmail, S as withLogContext, _ as setSpanAttributes, a as extractGenAiUsageSummary, b as summarizeMessageText, c as getTracePropagationHeaders, d as logInfo, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as logError, p as normalizeGenAiFinishReason, s as getLogContextAttributesForSpan, u as logException, v as setSpanStatus, y as setTags } from "./logging-CHZ0aJXO.js";
3
3
  import { m as startInactiveSpan, v as withActiveSpan } from "./sentry-CgWZM_kV.js";
4
- import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-B7844ly7.js";
5
- import { h as normalizeSlackEmojiName, n as botConfig } from "./config-CdS5GQ7W.js";
4
+ import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-CLkpzAlt.js";
5
+ import { h as normalizeSlackEmojiName, n as botConfig } from "./config-BMwzCmw-.js";
6
6
  import { a as modelIdForProfile, c as TURN_REASONING_LEVELS, i as formatModelProfiles, o as modelProfileSchema, r as formatModelProfile, s as profileConfig, t as ModelProfileNotConfiguredError } from "./model-profile-CZmVoGdX.js";
7
7
  import { _ as parseSlackMessageTs, g as parseSlackUserId, h as parseSlackTeamId, i as credentialUserSubjectId, l as isUserActor, m as parseSlackChannelReferenceId, n as credentialContextSchema, p as parseSlackChannelId, t as credentialContextForActor } from "./context-Bplcgypl.js";
8
- import { A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild, Gt as getDb, Ht as getConversationEventStore, J as withSlackRetries, K as normalizeSlackConversationId, Kt as getSqlExecutor, M as resolveChannelCapabilities, O as deleteWorkspaceSnapshotBuilders, Q as readActorIdentity, S as WorkspaceValidationError, T as setWorkspaceSnapshot, U as getSlackClient, Ut as getConversationMessageSearchStore, V as getFilePermalink, W as isConversationScopedChannel, Wt as getConversationStore, _ as deleteWorkspace, at as STOP_WATCHING_TOOL_NAME, b as listWorkspaces, bt as createPluginLogger, c as getPluginTools, dt as findMatchingWatches, en as addAgentTurnUsage, ft as listWatches, g as createWorkspace, ht as getDashboardTaskLink, in as hasAgentTurnUsage, it as RESOURCE_WATCH_TOOL_SOURCE, j as workspaceRepoCheckoutPath, k as getWorkspaceSnapshotBuilder, l as getPluginUserPromptContributions, lt as createWatch, mt as getDashboardConversationLink, nt as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as cancelWatch, tt as getSlackToolContext, u as getPlugins, un as parseDestination, ut as deliverWatch, v as getWorkspace, w as loadSnapshotsForProfile, x as updateWorkspace, y as getWorkspaceByName, z as SlackActionError } from "./agent-hooks-pyhfSnAL.js";
8
+ import { A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild, Gt as getDb, Ht as getConversationEventStore, J as withSlackRetries, K as normalizeSlackConversationId, Kt as getSqlExecutor, M as resolveChannelCapabilities, O as deleteWorkspaceSnapshotBuilders, Q as readActorIdentity, S as WorkspaceValidationError, T as setWorkspaceSnapshot, U as getSlackClient, Ut as getConversationMessageSearchStore, V as getFilePermalink, W as isConversationScopedChannel, Wt as getConversationStore, _ as deleteWorkspace, at as STOP_WATCHING_TOOL_NAME, b as listWorkspaces, bt as createPluginLogger, c as getPluginTools, dt as findMatchingWatches, en as addAgentTurnUsage, ft as listWatches, g as createWorkspace, ht as getDashboardTaskLink, in as hasAgentTurnUsage, it as RESOURCE_WATCH_TOOL_SOURCE, j as workspaceRepoCheckoutPath, k as getWorkspaceSnapshotBuilder, l as getPluginUserPromptContributions, lt as createWatch, mt as getDashboardConversationLink, nt as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as cancelWatch, tt as getSlackToolContext, u as getPlugins, un as parseDestination, ut as deliverWatch, v as getWorkspace, w as loadSnapshotsForProfile, x as updateWorkspace, y as getWorkspaceByName, z as SlackActionError } from "./agent-hooks-BtGATjr2.js";
9
9
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
10
- import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-CIl9A6cO.js";
10
+ import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-D0xETqi8.js";
11
11
  import { A as briefLinkSchema, G as sameActorIdentity, H as contextProvenance, M as conversationBriefSchema, P as KNOWN_CONVERSATION_EVENT_TYPES, U as instructionActors, W as instructionProvenanceFor, j as briefOutcomeStatusSchema } from "./conversation-BpqLg4MM.js";
12
12
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-7a9YqLhE.js";
13
- import { a as resolvePluginCommandEnv, c as getOAuthProviderErrorAttributes, i as resolveAuthTokenPlaceholder, o as OAuthProviderError, s as fetchWithBoundedOAuthErrorBodies, u as CredentialUnavailableError } from "./registry-DYHLzGuO.js";
14
- import { n as pluginCatalogRuntime } from "./catalog-runtime-D3hJdAMz.js";
15
- import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-CLsaAMtU.js";
16
- import { A as TURN_CONTEXT_TAG, C as isContinuablePiBoundary, D as retainRuntimeTurnContext, E as normalizeToolNameFromResult, H as recordAuthorizationRequested, I as loadTurnRoute, K as recordToolExecutionStarted, L as openConversationProjection, N as loadConnectedMcpProviders, O as stripRuntimeTurnContext, P as loadConversationProjection, R as recordAgentsInstructionsUpdated, S as isAssistantMessage, T as isToolResultMessage, U as recordGuardianActionReviewed, W as recordMcpProviderConnected, _ as getPiMessageRole, b as hasRuntimeTurnContext, dt as estimateTextTokens, f as TurnSliceLimitExceededError, ft as getAgentContextCompactionTriggerTokens, g as extractAssistantText, h as isTurnExecutionLimitExceededError, ht as piMessageFromHistoryItem, k as trimTrailingAssistantMessages, mt as historyItemFromPiMessage, n as loadTurnCheckpoint, p as assertTurnToolCallLimit, pt as getAgentContextInputLimitTokens, q as recordTurnRoute, r as saveTurnCheckpoint, t as continuableMessages, v as getTerminalAssistantMessages, w as isToolResultError, y as getUserMessageInstructionText, z as recordAttachmentsDelivered } from "./checkpoint-Ja5A32op.js";
17
- import { n as generateShortTitle, r as resolveTaskTitle } from "./short-title-CKnmS3nO.js";
18
- import { A as sleep$1, D as fenceLock, E as acquireActiveLock, F as sandboxSkillDir, I as sandboxSkillFile, L as sandboxSkillPathResolution, M as SANDBOX_REPOS_ROOT, N as SANDBOX_SKILLS_ROOT, P as SANDBOX_WORKSPACE_ROOT, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_DATA_ROOT, k as withLock, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-BfWuRDUF.js";
19
- import { $ as workspaceSnapshotFinishedEvent, B as createEventAutomation, C as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, D as eventAutomationMatchesDestination, E as eventAutomationListToolResultSchema, F as effectiveTaskOutcomes, Gt as makeStructuredToolOutput, I as moveTaskOutcomes, Jt as ToolInputError, L as resolveTaskOutcomes, M as requireEventAutomationSlackContext, N as requireSupportedEventAutomationTrigger, O as eventAutomationToolResult, P as writableEventAutomation, Q as WORKSPACE_SNAPSHOT_READY_EVENT, R as taskOutcomeInputSchema, T as compactEventAutomation, Ut as injectContinuationToolName, V as deleteEventAutomation, W as getEventAutomation, Wt as juniorToolOutputSchema, X as getEventCatalog, Y as saveEventAutomation, Z as WORKSPACE_SNAPSHOT_FAILED_EVENT, at as normalizeCatalogEventIdentifier, c as parseSlackThreadId, ct as registeredEventTypeSchema, et as workspaceSnapshotWatch, f as createScheduledAutomation, g as listScheduledAutomationsForTeam, i as readLiveAttachment, it as hasPluginEventCatalogEntries, j as registeredEventAutomationTriggerSchema, k as eventAutomationToolResultSchema, lt as registeredResourceTypeSchema, nt as eventNamespaceSchema, ot as pluginSupportsEvent, pt as appendAndEnqueueInboundMessage, q as listEventAutomationsForTeam, rt as hasEventCatalogEntries, s as storeAttachments, st as registeredEventMatchSchema, t as incrementStat, tt as eventGuidance, ut as requireSupportedEventMatch, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-D4Ar_7MS.js";
20
- import { _ as isTurnInputCommitLostError, c as sanitizeAssistantText, f as CooperativeTurnYieldError, l as NO_REPLY_MARKER, n as canReusePendingAuthLink, o as decideReply, p as TurnInputCommitLostError, s as getAssistantReplyText, t as abandonReplacedPendingAuth, u as isNoReplyMarker } from "./pending-auth-KOZWIp4m.js";
21
- import { C as toolInvocationDestination, S as surfaceFromRun, _ as uploadFilesToConversation, b as assertRunConsistency, h as postSlackMessage, i as formatProviderLabel, m as getSlackMessagePermalink, o as resolveBaseUrl, p as addReactionToMessage, r as deliverOAuthAuthorization, s as startOAuthFlow, v as RetryableDeliveryError, x as isAgentRunFeatureDisabled, y as actorFromRun } from "./agent-runner-CIiziOcz.js";
13
+ import { a as resolvePluginCommandEnv, c as getOAuthProviderErrorAttributes, i as resolveAuthTokenPlaceholder, o as OAuthProviderError, s as fetchWithBoundedOAuthErrorBodies, u as CredentialUnavailableError } from "./registry-DR6TJe4J.js";
14
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-LUAIHslF.js";
15
+ import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-DeUBvhdn.js";
16
+ import { A as TURN_CONTEXT_TAG, C as isContinuablePiBoundary, D as retainRuntimeTurnContext, E as normalizeToolNameFromResult, H as recordAuthorizationRequested, I as loadTurnRoute, K as recordToolExecutionStarted, L as openConversationProjection, N as loadConnectedMcpProviders, O as stripRuntimeTurnContext, P as loadConversationProjection, R as recordAgentsInstructionsUpdated, S as isAssistantMessage, T as isToolResultMessage, U as recordGuardianActionReviewed, W as recordMcpProviderConnected, _ as getPiMessageRole, b as hasRuntimeTurnContext, dt as estimateTextTokens, f as TurnSliceLimitExceededError, ft as getAgentContextCompactionTriggerTokens, g as extractAssistantText, h as isTurnExecutionLimitExceededError, ht as piMessageFromHistoryItem, k as trimTrailingAssistantMessages, mt as historyItemFromPiMessage, n as loadTurnCheckpoint, p as assertTurnToolCallLimit, pt as getAgentContextInputLimitTokens, q as recordTurnRoute, r as saveTurnCheckpoint, t as continuableMessages, v as getTerminalAssistantMessages, w as isToolResultError, y as getUserMessageInstructionText, z as recordAttachmentsDelivered } from "./checkpoint-CmkbGGiR.js";
17
+ import { n as generateShortTitle, r as resolveTaskTitle } from "./short-title-XUBD7AYC.js";
18
+ import { A as sleep$1, D as fenceLock, E as acquireActiveLock, F as sandboxSkillDir, I as sandboxSkillFile, L as sandboxSkillPathResolution, M as SANDBOX_REPOS_ROOT, N as SANDBOX_SKILLS_ROOT, P as SANDBOX_WORKSPACE_ROOT, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_DATA_ROOT, k as withLock, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-6veboDue.js";
19
+ import { $ as workspaceSnapshotFinishedEvent, B as createEventAutomation, C as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, D as eventAutomationMatchesDestination, E as eventAutomationListToolResultSchema, F as effectiveTaskOutcomes, Gt as makeStructuredToolOutput, I as moveTaskOutcomes, Jt as ToolInputError, L as resolveTaskOutcomes, M as requireEventAutomationSlackContext, N as requireSupportedEventAutomationTrigger, O as eventAutomationToolResult, P as writableEventAutomation, Q as WORKSPACE_SNAPSHOT_READY_EVENT, R as taskOutcomeInputSchema, T as compactEventAutomation, Ut as injectContinuationToolName, V as deleteEventAutomation, W as getEventAutomation, Wt as juniorToolOutputSchema, X as getEventCatalog, Y as saveEventAutomation, Z as WORKSPACE_SNAPSHOT_FAILED_EVENT, at as normalizeCatalogEventIdentifier, c as parseSlackThreadId, ct as registeredEventTypeSchema, et as workspaceSnapshotWatch, f as createScheduledAutomation, g as listScheduledAutomationsForTeam, i as readLiveAttachment, it as hasPluginEventCatalogEntries, j as registeredEventAutomationTriggerSchema, k as eventAutomationToolResultSchema, lt as registeredResourceTypeSchema, nt as eventNamespaceSchema, ot as pluginSupportsEvent, pt as appendAndEnqueueInboundMessage, q as listEventAutomationsForTeam, rt as hasEventCatalogEntries, s as storeAttachments, st as registeredEventMatchSchema, t as incrementStat, tt as eventGuidance, ut as requireSupportedEventMatch, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-BvNqVRdB.js";
20
+ import { _ as isTurnInputCommitLostError, c as sanitizeAssistantText, f as CooperativeTurnYieldError, l as NO_REPLY_MARKER, n as canReusePendingAuthLink, o as decideReply, p as TurnInputCommitLostError, s as getAssistantReplyText, t as abandonReplacedPendingAuth, u as isNoReplyMarker } from "./pending-auth-HNSPyxoN.js";
21
+ import { C as toolInvocationDestination, S as surfaceFromRun, _ as uploadFilesToConversation, b as assertRunConsistency, h as postSlackMessage, i as formatProviderLabel, m as getSlackMessagePermalink, o as resolveBaseUrl, p as addReactionToMessage, r as deliverOAuthAuthorization, s as startOAuthFlow, v as RetryableDeliveryError, x as isAgentRunFeatureDisabled, y as actorFromRun } from "./agent-runner-DCj_cPjl.js";
22
22
  import { r as EVENT_AUTHOR_ID } from "./prompt-DAoaq0CT.js";
23
- import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-CU8DArbR.js";
23
+ import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-DprAzyQN.js";
24
24
  import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
25
- import { a as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-CIz2Sij0.js";
25
+ import { a as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-C8FZ3LSY.js";
26
26
  import { n as privateTraceResultAttributes } from "./private-trace-result-BLvBjy_e.js";
27
27
  import { streamSimple } from "@earendil-works/pi-ai/compat";
28
28
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1501,13 +1501,13 @@ const SKILL_POLICY_RULES = [
1501
1501
  "- Otherwise, scan `<available-skills>` before acting. Load the most specific skill whose description matches the request; do not answer from memory when one fits. Only call `loadSkill` with an exact listed `<name>`; if none fits, do not load a skill.",
1502
1502
  "- Load one skill at a time. After `loadSkill`, follow the instructions returned by that tool result."
1503
1503
  ];
1504
- const PLANNING_RULES = `You have access to an \`update_plan\` tool which tracks steps and progress and renders them to the user. Using the tool helps demonstrate that you've understood the task and convey how you're approaching it. Plans can help to make complex, ambiguous, or multi-phase work clearer and more collaborative for the user. A good plan should break the task into meaningful, logically ordered steps that are easy to verify as you go.
1504
+ const PLANNING_RULES = `You have access to an \`updatePlan\` tool which tracks steps and progress and renders them to the user. Using the tool helps demonstrate that you've understood the task and convey how you're approaching it. Plans can help to make complex, ambiguous, or multi-phase work clearer and more collaborative for the user. A good plan should break the task into meaningful, logically ordered steps that are easy to verify as you go.
1505
1505
 
1506
1506
  Note that plans are not for padding out simple work with filler steps or stating the obvious. The content of your plan should not involve doing anything that you aren't capable of doing (i.e. don't try to test things that you can't test). Do not use plans for simple or single-step queries that you can just do or answer immediately.
1507
1507
 
1508
- Do not repeat the full contents of the plan after an \`update_plan\` call — the harness already displays it. Instead, summarize the change made and highlight any important context or next step.
1508
+ Do not repeat the full contents of the plan after an \`updatePlan\` call — the harness already displays it. Instead, summarize the change made and highlight any important context or next step.
1509
1509
 
1510
- Before running a command, consider whether or not you have completed the previous step, and make sure to mark it as completed before moving on to the next step. It may be the case that you complete all steps in your plan after a single pass of implementation. If this is the case, you can simply mark all the planned steps as completed. Sometimes, you may need to change plans in the middle of a task: call \`update_plan\` with the updated plan and make sure to provide an \`explanation\` of the rationale when doing so.
1510
+ Before running a command, consider whether or not you have completed the previous step, and make sure to mark it as completed before moving on to the next step. It may be the case that you complete all steps in your plan after a single pass of implementation. If this is the case, you can simply mark all the planned steps as completed. Sometimes, you may need to change plans in the middle of a task: call \`updatePlan\` with the updated plan and make sure to provide an \`explanation\` of the rationale when doing so.
1511
1511
 
1512
1512
  Use a plan when:
1513
1513
 
@@ -1570,13 +1570,13 @@ Example 3:
1570
1570
 
1571
1571
  If you need to write a plan, only write high quality plans, not low quality ones.
1572
1572
  `.split("\n");
1573
- const UPDATE_PLAN_RULES = `A tool named \`update_plan\` is available to you. You can use it to keep an up‑to‑date, step‑by‑step plan for the task.
1573
+ const UPDATE_PLAN_RULES = `A tool named \`updatePlan\` is available to you. You can use it to keep an up‑to‑date, step‑by‑step plan for the task.
1574
1574
 
1575
- To create a new plan, call \`update_plan\` with a short list of 1‑sentence steps (no more than 5-7 words each) with a \`status\` for each step (\`pending\`, \`in_progress\`, or \`completed\`).
1575
+ To create a new plan, call \`updatePlan\` with a short list of 1‑sentence steps (no more than 5-7 words each) with a \`status\` for each step (\`pending\`, \`in_progress\`, or \`completed\`).
1576
1576
 
1577
- When steps have been completed, use \`update_plan\` to mark each finished step as \`completed\` and the next step you are working on as \`in_progress\`. There should always be exactly one \`in_progress\` step until everything is done. You can mark multiple items as complete in a single \`update_plan\` call.
1577
+ When steps have been completed, use \`updatePlan\` to mark each finished step as \`completed\` and the next step you are working on as \`in_progress\`. There should always be exactly one \`in_progress\` step until everything is done. You can mark multiple items as complete in a single \`updatePlan\` call.
1578
1578
 
1579
- If all steps are complete, ensure you call \`update_plan\` to mark all steps as \`completed\`.`.split("\n");
1579
+ If all steps are complete, ensure you call \`updatePlan\` to mark all steps as \`completed\`.`.split("\n");
1580
1580
  const TASK_EXECUTION_RULES = [
1581
1581
  "- Actionable request: act in this turn.",
1582
1582
  "- Continue until done or genuinely blocked. Do not finish with a plan, promise, or offer to check next when an available tool or source can move the request forward.",
@@ -13519,7 +13519,7 @@ function createTools(availableSkills, hooks = {}, context, options = {}) {
13519
13519
  const eventCatalog = getEventCatalog();
13520
13520
  const tools = {
13521
13521
  ...options.includeLoadSkill === false ? void 0 : { loadSkill: createLoadSkillTool(availableSkills, { onSkillLoaded: hooks.onSkillLoaded }) },
13522
- update_plan: createUpdatePlanTool(),
13522
+ updatePlan: createUpdatePlanTool(),
13523
13523
  reportProgress: createReportProgressTool(),
13524
13524
  systemTime: createSystemTimeTool(),
13525
13525
  bash: createBashTool(),
@@ -13626,7 +13626,7 @@ function buildReportedProgressStatus(input) {
13626
13626
  if (!text) return;
13627
13627
  return { text };
13628
13628
  }
13629
- /** Convert an `update_plan` payload into the active assistant status. */
13629
+ /** Convert an `updatePlan` payload into the active assistant status. */
13630
13630
  function buildPlanStatus(input) {
13631
13631
  if (!input || typeof input !== "object") return;
13632
13632
  const plan = input.plan;
@@ -13644,7 +13644,7 @@ function latestProgressStatus(messages) {
13644
13644
  if (!part || typeof part !== "object") continue;
13645
13645
  const toolCall = part;
13646
13646
  if (toolCall.type !== "toolCall") continue;
13647
- if (toolCall.name === "update_plan") return buildPlanStatus(toolCall.arguments);
13647
+ if (toolCall.name === "updatePlan") return buildPlanStatus(toolCall.arguments);
13648
13648
  if (toolCall.name === "reportProgress") {
13649
13649
  const status = buildReportedProgressStatus(toolCall.arguments);
13650
13650
  if (status) return status;
@@ -14585,7 +14585,7 @@ function createPiAgentTools(tools, sandbox, spanContext, onStatus, sandboxTools,
14585
14585
  return normalized;
14586
14586
  };
14587
14587
  const reportStatus = async (executionToolName, params) => {
14588
- const status = executionToolName === "update_plan" ? buildPlanStatus(params) : executionToolName === "reportProgress" ? buildReportedProgressStatus(params) : void 0;
14588
+ const status = executionToolName === "updatePlan" ? buildPlanStatus(params) : executionToolName === "reportProgress" ? buildReportedProgressStatus(params) : void 0;
14589
14589
  if (status) await onStatus?.(status);
14590
14590
  };
14591
14591
  return Object.entries(visibleTools).map(([toolName, toolDef]) => ({
@@ -16655,6 +16655,71 @@ function createResumeState(args) {
16655
16655
  };
16656
16656
  }
16657
16657
  //#endregion
16658
+ //#region src/chat/services/plan-continuation.ts
16659
+ const OPEN_PLAN_TAG = "open-plan";
16660
+ function openItems(input) {
16661
+ const plan = input && typeof input === "object" ? input.plan : void 0;
16662
+ if (!Array.isArray(plan)) return [];
16663
+ return plan.flatMap((value) => {
16664
+ const item = value;
16665
+ if (typeof item?.step !== "string" || item.status !== "pending" && item.status !== "in_progress") return [];
16666
+ return [{
16667
+ step: item.step,
16668
+ status: item.status
16669
+ }];
16670
+ });
16671
+ }
16672
+ function messageText$1(message) {
16673
+ const content = message.content;
16674
+ if (!Array.isArray(content)) return typeof content === "string" ? content : "";
16675
+ return content.flatMap((part) => {
16676
+ const text = part?.text;
16677
+ return typeof text === "string" ? [text] : [];
16678
+ }).join("\n");
16679
+ }
16680
+ function retainedOpenItems(message) {
16681
+ const text = messageText$1(message);
16682
+ if (!isCompactionSummaryText(text)) return;
16683
+ const continuation = unwrapCurrentInstruction(text) ?? text;
16684
+ const open = `<${OPEN_PLAN_TAG}>\n`;
16685
+ const close = `\n</${OPEN_PLAN_TAG}>`;
16686
+ const closeIndex = continuation.lastIndexOf(close);
16687
+ const openIndex = continuation.lastIndexOf(open, closeIndex);
16688
+ if (openIndex < 0 || closeIndex < 0) return;
16689
+ const payload = continuation.slice(openIndex + open.length, closeIndex);
16690
+ try {
16691
+ return openItems({ plan: JSON.parse(payload) });
16692
+ } catch {
16693
+ return;
16694
+ }
16695
+ }
16696
+ /** Read open items from the latest successful plan state. */
16697
+ function latestOpenPlanItems(messages) {
16698
+ const successfulCalls = /* @__PURE__ */ new Set();
16699
+ for (let messageIndex = messages.length - 1; messageIndex >= 0; messageIndex -= 1) {
16700
+ const message = messages[messageIndex];
16701
+ if (message.role === "toolResult" && message.toolName === "updatePlan" && typeof message.toolCallId === "string" && message.isError !== true) {
16702
+ successfulCalls.add(message.toolCallId);
16703
+ continue;
16704
+ }
16705
+ if (message.role === "user") {
16706
+ const retained = retainedOpenItems(messages[messageIndex]);
16707
+ if (retained) return retained;
16708
+ }
16709
+ if (message.role !== "assistant" || !Array.isArray(message.content)) continue;
16710
+ for (let partIndex = message.content.length - 1; partIndex >= 0; partIndex -= 1) {
16711
+ const call = message.content[partIndex];
16712
+ if (call?.type === "toolCall" && call.name === "updatePlan" && typeof call.id === "string" && successfulCalls.has(call.id)) return openItems(call.arguments);
16713
+ }
16714
+ }
16715
+ return [];
16716
+ }
16717
+ /** Append exact open plan state to continuation text. */
16718
+ function appendOpenPlan(continuation, messages) {
16719
+ const plan = latestOpenPlanItems(messages);
16720
+ return plan.length === 0 ? continuation : `${continuation}\n\n<${OPEN_PLAN_TAG}>\n${JSON.stringify(plan)}\n</${OPEN_PLAN_TAG}>`;
16721
+ }
16722
+ //#endregion
16658
16723
  //#region src/chat/services/context-compaction.ts
16659
16724
  const RETAINED_USER_MESSAGE_TOKENS = 2e4;
16660
16725
  const MAX_SUMMARY_CHARS = 6e3;
@@ -16892,7 +16957,8 @@ async function writeCompactedThreadContext(args, sourceMessages, summary, contex
16892
16957
  const eventStore = getConversationEventStore();
16893
16958
  const sourceProjection = await loadConversationProjection({ conversationId: args.conversationId });
16894
16959
  const retained = selectRetainedUserMessageEntries(trimTrailingAssistantMessages(sourceProjection.messages));
16895
- const replacement = [...retained.map((entry) => entry.message), userMessage(`${COMPACTION_SUMMARY_PREFIX}\n${summary}`)];
16960
+ const continuation = appendOpenPlan(summary, sourceMessages);
16961
+ const replacement = [...retained.map((entry) => entry.message), userMessage(`${COMPACTION_SUMMARY_PREFIX}\n${continuation}`)];
16896
16962
  const replacementInputTokens = estimateHistoryTokens(replacement);
16897
16963
  const replacementProvenance = buildReplacementProvenance({
16898
16964
  retained,
@@ -16945,7 +17011,8 @@ async function compactContextForHandoff(args, deps) {
16945
17011
  const contextMessage = runtimeContextMessage(args.runtimeContext);
16946
17012
  if (!contextMessage) throw new Error("Handoff requires the current runtime turn context");
16947
17013
  const generatedSummary = await summarizeContext(args, deps);
16948
- const summary = `${MODEL_HANDOFF_SUMMARY_PREFIX}\n${generatedSummary}`;
17014
+ const continuation = appendOpenPlan(generatedSummary, args.piMessages);
17015
+ const summary = `${MODEL_HANDOFF_SUMMARY_PREFIX}\n${continuation}`;
16949
17016
  const messages = [contextMessage, {
16950
17017
  role: "user",
16951
17018
  content: [{
@@ -16954,7 +17021,6 @@ async function compactContextForHandoff(args, deps) {
16954
17021
  }],
16955
17022
  timestamp: contextMessage.timestamp
16956
17023
  }];
16957
- const replacementMessages = stripRuntimeTurnContext(messages);
16958
17024
  args.signal?.throwIfAborted();
16959
17025
  await getConversationEventStore().replaceHistory(args.conversationId, {
16960
17026
  createdAtMs: Date.now(),
@@ -16965,7 +17031,7 @@ async function compactContextForHandoff(args, deps) {
16965
17031
  ...args.target.reasoningLevel ? { reasoningLevel: args.target.reasoningLevel } : void 0,
16966
17032
  ...args.triggeringToolCallId ? { triggeringToolCallId: args.triggeringToolCallId } : void 0,
16967
17033
  summary: generatedSummary,
16968
- replacementHistory: replacementMessages.map((replacementMessage) => ({ item: historyItemFromPiMessage(replacementMessage, contextProvenance) }))
17034
+ replacementHistory: messages.map((message) => ({ item: historyItemFromPiMessage(message, contextProvenance) }))
16969
17035
  }
16970
17036
  });
16971
17037
  return messages;
@@ -17006,7 +17072,8 @@ async function compactActiveContextIfNeeded(args, deps) {
17006
17072
  reason: "summary_failed"
17007
17073
  };
17008
17074
  }
17009
- const summaryMessage = userMessage(`${ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX}\n${summary}`);
17075
+ const continuation = appendOpenPlan(summary, source.messages);
17076
+ const summaryMessage = userMessage(`${ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX}\n${continuation}`);
17010
17077
  const retainedInstruction = pendingMessages.length === 0 ? await loadLastInstruction(args.conversationId) : void 0;
17011
17078
  const instructionMessages = retainedInstruction ? [retainedInstruction.message] : pendingMessages.map((entry) => entry.message);
17012
17079
  const instructionProvenance = retainedInstruction ? [retainedInstruction.provenance] : pendingMessages.map((entry) => entry.provenance);
@@ -1,15 +1,15 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { a as embedTexts, r as completeObject } from "./client-DqG_LDSH.js";
3
- import { C as withSpan, P as normalizeIdentityEmail, _ as setSpanAttributes, d as logInfo, f as logWarn, u as logException, v as setSpanStatus } from "./logging-dD_n9Ocp.js";
2
+ import { a as embedTexts, r as completeObject } from "./client-ciJRmcY5.js";
3
+ import { C as withSpan, P as normalizeIdentityEmail, _ as setSpanAttributes, d as logInfo, f as logWarn, u as logException, v as setSpanStatus } from "./logging-CHZ0aJXO.js";
4
4
  import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
5
- import { t as canExposeConversationPayload } from "./conversation-privacy-B7844ly7.js";
6
- import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-CdS5GQ7W.js";
5
+ import { t as canExposeConversationPayload } from "./conversation-privacy-CLkpzAlt.js";
6
+ import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-BMwzCmw-.js";
7
7
  import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
8
8
  import { _ as parseSlackMessageTs, c as isActorUserId, h as parseSlackTeamId, m as parseSlackChannelReferenceId, u as parseActorUserId } from "./context-Bplcgypl.js";
9
9
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
10
- import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, _ as CONVERSATION_METRICS, g as juniorConversationBriefs, h as juniorConversationBindings, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as juniorConversationMetrics, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-CIl9A6cO.js";
10
+ import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, _ as CONVERSATION_METRICS, g as juniorConversationBriefs, h as juniorConversationBindings, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as juniorConversationMetrics, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-D0xETqi8.js";
11
11
  import { B as historyReplacementSchema, C as conversationReportEventSchema, I as conversationEventDataSchema, K as usageSchema, M as conversationBriefSchema, N as parseBriefInput, V as newConversationEventSchema, z as decodeStoredConversationEvent } from "./conversation-BpqLg4MM.js";
12
- import { A as sleep$1, P as SANDBOX_WORKSPACE_ROOT, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-BfWuRDUF.js";
12
+ import { A as sleep$1, P as SANDBOX_WORKSPACE_ROOT, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-6veboDue.js";
13
13
  import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DAoaq0CT.js";
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
- import { F as isRecord, d as logInfo, f as logWarn } from "./logging-dD_n9Ocp.js";
2
- import { h as normalizeSlackEmojiName } from "./config-CdS5GQ7W.js";
1
+ import { F as isRecord, d as logInfo, f as logWarn } from "./logging-CHZ0aJXO.js";
2
+ import { h as normalizeSlackEmojiName } from "./config-BMwzCmw-.js";
3
3
  import { _ as parseSlackMessageTs, g as parseSlackUserId } from "./context-Bplcgypl.js";
4
- import { G as isDmChannel, J as withSlackRetries, K as normalizeSlackConversationId, U as getSlackClient, n as applyPluginFormatMarkdown, un as parseDestination, z as SlackActionError } from "./agent-hooks-pyhfSnAL.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-D3hJdAMz.js";
6
- import { w as getStateAdapter } from "./profile-BfWuRDUF.js";
4
+ import { G as isDmChannel, J as withSlackRetries, K as normalizeSlackConversationId, U as getSlackClient, n as applyPluginFormatMarkdown, un as parseDestination, z as SlackActionError } from "./agent-hooks-BtGATjr2.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-LUAIHslF.js";
6
+ import { w as getStateAdapter } from "./profile-6veboDue.js";
7
7
  import { r as isExperimentalFeatureEnabled } from "./experimental-CIXf7Uye.js";
8
8
  import { randomBytes } from "node:crypto";
9
9
  import { actorSchema, sourceSchema } from "@sentry/junior-plugin-api";
package/dist/api.js CHANGED
@@ -1,18 +1,18 @@
1
- import { f as logWarn, u as logException } from "./logging-dD_n9Ocp.js";
1
+ import { f as logWarn, u as logException } from "./logging-CHZ0aJXO.js";
2
2
  import { _ as parseSlackMessageTs, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-Bplcgypl.js";
3
- import { $ as resolveViewerUser, $t as parseSessionSource, Ct as conversationArchivedForEmail, D as SANDBOX_RUNTIME, Dt as conversationNotArchivedForEmail, Et as conversationHasParticipantUser, Ft as listConversationAnnotations, Gt as getDb, It as listConversationAnnotationsById, J as withSlackRetries, Kt as getSqlExecutor, Mt as readConversationEventPage, Nt as buildSentryConversationUrl, Ot as conversationNotArchivedForUser, S as WorkspaceValidationError, St as conversationArchiveTimes, Tt as conversationHasParticipantEmail, U as getSlackClient, Wt as getConversationStore, Z as findUserByEmail, Zt as locationFromRow, _ as deleteWorkspace, an as resolveRootConversationId, b as listWorkspaces, bt as createPluginLogger, et as updateViewerDisplayName, g as createWorkspace, in as hasAgentTurnUsage, j as workspaceRepoCheckoutPath, jt as readLatestConversationBrief, kt as viewerConversationMembership, rn as agentTurnUsageSchema, u as getPlugins, v as getWorkspace, wt as conversationArchivedForUser, x as updateWorkspace, xt as readConversationAccessFromSql } from "./agent-hooks-pyhfSnAL.js";
3
+ import { $ as resolveViewerUser, $t as parseSessionSource, Ct as conversationArchivedForEmail, D as SANDBOX_RUNTIME, Dt as conversationNotArchivedForEmail, Et as conversationHasParticipantUser, Ft as listConversationAnnotations, Gt as getDb, It as listConversationAnnotationsById, J as withSlackRetries, Kt as getSqlExecutor, Mt as readConversationEventPage, Nt as buildSentryConversationUrl, Ot as conversationNotArchivedForUser, S as WorkspaceValidationError, St as conversationArchiveTimes, Tt as conversationHasParticipantEmail, U as getSlackClient, Wt as getConversationStore, Z as findUserByEmail, Zt as locationFromRow, _ as deleteWorkspace, an as resolveRootConversationId, b as listWorkspaces, bt as createPluginLogger, et as updateViewerDisplayName, g as createWorkspace, in as hasAgentTurnUsage, j as workspaceRepoCheckoutPath, jt as readLatestConversationBrief, kt as viewerConversationMembership, rn as agentTurnUsageSchema, u as getPlugins, v as getWorkspace, wt as conversationArchivedForUser, x as updateWorkspace, xt as readConversationAccessFromSql } from "./agent-hooks-BtGATjr2.js";
4
4
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
5
- import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, b as juniorApiTokens, g as juniorConversationBriefs, m as juniorConversationParticipants, o as juniorSchedulerTasks, v as juniorConversationMetrics, y as juniorConversationEvents } from "./executor-CIl9A6cO.js";
5
+ import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, b as juniorApiTokens, g as juniorConversationBriefs, m as juniorConversationParticipants, o as juniorSchedulerTasks, v as juniorConversationMetrics, y as juniorConversationEvents } from "./executor-D0xETqi8.js";
6
6
  import { D as createConversationBodySchema, O as createConversationMessageBodySchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-BpqLg4MM.js";
7
- import { t as fallbackShortTitle } from "./short-title-CKnmS3nO.js";
8
- import { n as hash, t as create } from "./profile-BfWuRDUF.js";
9
- import { A as eventAutomationTriggerAvailable, F as effectiveTaskOutcomes, G as listDeletedEventAutomationsCreatedBy, H as eventAutomationBelongsToUser, J as listPublicEventAutomationsForTeams, K as listEventAutomationsCreatedBy, Tt as getConversation, V as deleteEventAutomation, W as getEventAutomation, X as getEventCatalog, _ as parseScheduledAutomationRow, c as parseSlackThreadId, ht as cancelHumanFacingPendingMessages, i as readLiveAttachment, m as listPublicScheduledAutomationsForTeams, n as readStats, p as isListedScheduledAutomation, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-D4Ar_7MS.js";
10
- import { t as getCachedSnapshot } from "./resolve-CU8DArbR.js";
7
+ import { t as fallbackShortTitle } from "./short-title-XUBD7AYC.js";
8
+ import { n as hash, t as create } from "./profile-6veboDue.js";
9
+ import { A as eventAutomationTriggerAvailable, F as effectiveTaskOutcomes, G as listDeletedEventAutomationsCreatedBy, H as eventAutomationBelongsToUser, J as listPublicEventAutomationsForTeams, K as listEventAutomationsCreatedBy, Tt as getConversation, V as deleteEventAutomation, W as getEventAutomation, X as getEventCatalog, _ as parseScheduledAutomationRow, c as parseSlackThreadId, ht as cancelHumanFacingPendingMessages, i as readLiveAttachment, m as listPublicScheduledAutomationsForTeams, n as readStats, p as isListedScheduledAutomation, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-BvNqVRdB.js";
10
+ import { t as getCachedSnapshot } from "./resolve-DprAzyQN.js";
11
11
  import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
12
12
  import { c as runtimeInfoReportSchema, n as pluginOperationalReportFeedSchema, s as pluginsSchema, t as healthReportSchema, u as skillReportsSchema } from "./reporting-schema-DosTN__Q.js";
13
- import { a as webActorFromEmail, c as formatSlackConversationRedactedLabel, d as resolveSlackConversationContextFromThreadId, f as lookupSlackUser, g as readHealthReport, m as createVercelAttachmentStorage, p as legacyWebMailboxMetadataSchema, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage } from "./web-input-vHOAXVxj.js";
14
- import { a as readAutomationExecutionStatusDays, c as readAutomationExecutions, d as conversationActiveDaysColumn, f as conversationAggregateColumns, i as readAutomationExecutionHours, l as readAutomationRuns, n as readAutomationExecutionByConversationId, o as readAutomationExecutionStatusHours, p as conversationRangeColumns, r as readAutomationExecutionDays, s as readAutomationExecutionSummaries, t as emptyAutomationRunWindows } from "./execution-stats-BbYien1O.js";
15
- import { r as getWebAuthorization } from "./web-authorization-TdkXi7XG.js";
13
+ import { a as webActorFromEmail, c as formatSlackConversationRedactedLabel, d as resolveSlackConversationContextFromThreadId, f as lookupSlackUser, g as readHealthReport, m as createVercelAttachmentStorage, p as legacyWebMailboxMetadataSchema, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage } from "./web-input-CZjYeCFh.js";
14
+ import { a as readAutomationExecutionStatusDays, c as readAutomationExecutions, d as conversationActiveDaysColumn, f as conversationAggregateColumns, i as readAutomationExecutionHours, l as readAutomationRuns, n as readAutomationExecutionByConversationId, o as readAutomationExecutionStatusHours, p as conversationRangeColumns, r as readAutomationExecutionDays, s as readAutomationExecutionSummaries, t as emptyAutomationRunWindows } from "./execution-stats-C-E5FIsT.js";
15
+ import { r as getWebAuthorization } from "./web-authorization-DG2K_bpi.js";
16
16
  import { $ as sumUtcHoursIntoSixHours, A as actorProfileReportSchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, I as locationParamsSchema, J as HOUR_MS$1, L as activityDays$1, M as personalSpendReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, Q as startOfUtcHour, R as activityHours$1, T as personalTokenListSchema, W as codeOverviewReportSchema, X as fillUtcHours, Y as fillUtcDays, Z as fillUtcSixHours, _ as automationRunListSchema, a as workspaceBodySchema, at as apiErrorSchema, et as trailingUtcDayWindow, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, it as utcHourKey, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, nt as trailingUtcSixHourWindow, o as workspaceListSchema, q as DAY_MS$1, rt as utcDayKey, s as workspaceParamsSchema, tt as trailingUtcHourWindow, u as automationExecutionListSchema, w as createdPersonalTokenSchema, z as activitySixHours$1 } from "./schema-BMG8MJPJ.js";
17
17
  import { Hono } from "hono";
18
18
  import path from "node:path";
@@ -3453,7 +3453,7 @@ async function readPeoplePluginReports(args) {
3453
3453
  reports: [],
3454
3454
  source: "plugins"
3455
3455
  });
3456
- const { getPluginProfileReports } = await import("./agent-hooks-pyhfSnAL.js").then((n) => n.t);
3456
+ const { getPluginProfileReports } = await import("./agent-hooks-BtGATjr2.js").then((n) => n.t);
3457
3457
  return pluginOperationalReportFeedSchema.parse({
3458
3458
  generatedAt: new Date(nowMs).toISOString(),
3459
3459
  reports: await getPluginProfileReports({
@@ -4062,7 +4062,7 @@ function readDescriptionText(home) {
4062
4062
  }
4063
4063
  /** Read discovered skill names for authenticated runtime diagnostics. */
4064
4064
  async function readSkillReports() {
4065
- const { discoverSkills } = await import("./skills-CLsaAMtU.js").then((n) => n.o);
4065
+ const { discoverSkills } = await import("./skills-DeUBvhdn.js").then((n) => n.o);
4066
4066
  const skills = await discoverSkills();
4067
4067
  return skillReportsSchema.parse(skills.map((skill) => ({
4068
4068
  name: skill.name,
@@ -4071,7 +4071,7 @@ async function readSkillReports() {
4071
4071
  }
4072
4072
  /** Read safe configured plugin metadata for authenticated runtime diagnostics. */
4073
4073
  async function readPlugins() {
4074
- const { pluginCatalogRuntime } = await import("./catalog-runtime-D3hJdAMz.js").then((n) => n.t);
4074
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-LUAIHslF.js").then((n) => n.t);
4075
4075
  return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
4076
4076
  configKeys: plugin.manifest.configKeys ?? [],
4077
4077
  description: plugin.manifest.description,
@@ -4083,7 +4083,7 @@ async function readPlugins() {
4083
4083
  async function readRuntimeInfoReport() {
4084
4084
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
4085
4085
  import("./package-discovery-7a9YqLhE.js").then((n) => n.r),
4086
- import("./catalog-runtime-D3hJdAMz.js").then((n) => n.t),
4086
+ import("./catalog-runtime-LUAIHslF.js").then((n) => n.t),
4087
4087
  readPlugins(),
4088
4088
  readSkillReports()
4089
4089
  ]);
@@ -4100,7 +4100,7 @@ async function readRuntimeInfoReport() {
4100
4100
  /** Read sanitized operational summaries contributed by plugins. */
4101
4101
  async function readPluginOperationalReportFeed() {
4102
4102
  const nowMs = Date.now();
4103
- const { getPluginOperationalReports } = await import("./agent-hooks-pyhfSnAL.js").then((n) => n.t);
4103
+ const { getPluginOperationalReports } = await import("./agent-hooks-BtGATjr2.js").then((n) => n.t);
4104
4104
  return pluginOperationalReportFeedSchema.parse({
4105
4105
  source: "plugins",
4106
4106
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.js CHANGED
@@ -1,41 +1,41 @@
1
- import { $ as AuthorizationFlowDisabledError, B as recordFinishedTurnForAutomatedLimit, C as renderBlockText, D as getNextRunAtMs, E as scheduledAutomationRunAttributes, F as ingestEvent, G as clearSandboxEgressSignals, H as normalizeSandboxEgressTracePropagationDomains, I as EVENT_WAIT_MS, J as parseSandboxEgressCredentialToken, K as consumeSandboxEgressAuthRequiredSignal, L as isEventMailboxMetadata, P as processWorkspaceSnapshotJob, Q as isVisionImageMediaType, R as renderTaskInput, S as renderAttachmentText, T as logScheduledAutomationRunSkipped, U as shouldPropagateSandboxEgressTrace, V as resolveSandboxEgressProviderForHost, W as SANDBOX_EGRESS_PROXY_PATH, X as createUserTokenStore, Z as buildSteeringPiMessage, _ as readPublicArtifact, b as readAttachmentVisionSummary, c as deleteMcpStoredOAuthCredentials, et as shouldEmitDevAgentTrace, f as PluginCredentialFailureError, g as publicArtifactHeaders, m as latestProgressStatus, n as createContextCompactor, nt as setConfigDefaults, o as deleteMcpAuthSessionsForUserProvider, q as consumeSandboxEgressPermissionDeniedSignal, r as executeCredentialedEgressRequest, s as deleteMcpServerSessionId, t as executeAgentRun, tt as getConfigDefaults, v as unpublishedArtifactHeaders, w as listThreadReplies, x as recordSlackAttachment, z as maybePostAutomatedTurnLimitNotice } from "./agent-BFKt9huN.js";
2
- import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-DqG_LDSH.js";
3
- import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, C as withSpan, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, F as isRecord$1, I as toOptionalNumber, L as toOptionalString, S as withLogContext, _ as setSpanAttributes, d as logInfo, f as logWarn, g as setSentryUser, l as logError, n as createChatSdkLogger, o as getActiveTraceId, r as createRequestContext, t as buildTurnFailureResponse, u as logException, v as setSpanStatus, x as withContext, y as setTags } from "./logging-dD_n9Ocp.js";
1
+ import { $ as AuthorizationFlowDisabledError, B as recordFinishedTurnForAutomatedLimit, C as renderBlockText, D as getNextRunAtMs, E as scheduledAutomationRunAttributes, F as ingestEvent, G as clearSandboxEgressSignals, H as normalizeSandboxEgressTracePropagationDomains, I as EVENT_WAIT_MS, J as parseSandboxEgressCredentialToken, K as consumeSandboxEgressAuthRequiredSignal, L as isEventMailboxMetadata, P as processWorkspaceSnapshotJob, Q as isVisionImageMediaType, R as renderTaskInput, S as renderAttachmentText, T as logScheduledAutomationRunSkipped, U as shouldPropagateSandboxEgressTrace, V as resolveSandboxEgressProviderForHost, W as SANDBOX_EGRESS_PROXY_PATH, X as createUserTokenStore, Z as buildSteeringPiMessage, _ as readPublicArtifact, b as readAttachmentVisionSummary, c as deleteMcpStoredOAuthCredentials, et as shouldEmitDevAgentTrace, f as PluginCredentialFailureError, g as publicArtifactHeaders, m as latestProgressStatus, n as createContextCompactor, nt as setConfigDefaults, o as deleteMcpAuthSessionsForUserProvider, q as consumeSandboxEgressPermissionDeniedSignal, r as executeCredentialedEgressRequest, s as deleteMcpServerSessionId, t as executeAgentRun, tt as getConfigDefaults, v as unpublishedArtifactHeaders, w as listThreadReplies, x as recordSlackAttachment, z as maybePostAutomatedTurnLimitNotice } from "./agent-CV4MPfCD.js";
2
+ import { b as isProviderRetryError, i as completeText, m as escapeXml, r as completeObject } from "./client-ciJRmcY5.js";
3
+ import { A as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, C as withSpan, D as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, F as isRecord$1, I as toOptionalNumber, L as toOptionalString, S as withLogContext, _ as setSpanAttributes, d as logInfo, f as logWarn, g as setSentryUser, l as logError, n as createChatSdkLogger, o as getActiveTraceId, r as createRequestContext, t as buildTurnFailureResponse, u as logException, v as setSpanStatus, x as withContext, y as setTags } from "./logging-CHZ0aJXO.js";
4
4
  import { r as continueTrace } from "./sentry-CgWZM_kV.js";
5
- import { t as JUNIOR_VERSION } from "./version-DS_6p6x1.js";
6
- import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, l as getSlackClientSecret, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-CdS5GQ7W.js";
5
+ import { t as JUNIOR_VERSION } from "./version-Es4nurl1.js";
6
+ import { a as getChatConfig, c as getSlackClientId, d as getSlackSigningSecret, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, l as getSlackClientSecret, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-BMwzCmw-.js";
7
7
  import { a as modelIdForProfile, n as defaultModelId } from "./model-profile-CZmVoGdX.js";
8
8
  import { _ as parseSlackMessageTs, a as createActor, c as isActorUserId, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-Bplcgypl.js";
9
- import { B as downloadPrivateSlackFile, F as bindSlackDirectCredentialSubject, G as isDmChannel, Gt as getDb, Ht as getConversationEventStore, I as verifyEventAutomationCredentialSubject, Jt as withConversationEventLock, K as normalizeSlackConversationId, Kt as getSqlExecutor, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Pt as resolveRootVisibility, R as verifySlackDirectCredentialSubject, U as getSlackClient, Wt as getConversationStore, X as runWithWorkspaceTeamId, Xt as withConversationMutationLock, Y as getWorkspaceTeamId, _t as createPluginState, a as getPluginRoutes, bt as createPluginLogger, ct as collectEventMatchKeys, d as setPlugins, dn as requireSlackDestination, dt as findMatchingWatches, f as validatePlugins, gt as setDashboardConversationLinkOptions, h as setBriefsConfig, i as getPluginApiRoutes, ln as createSlackDestination, on as deleteProviderIdentityForSlackUser, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, q as runWithSlackInstallationToken, u as getPlugins, xt as readConversationAccessFromSql, z as SlackActionError } from "./agent-hooks-pyhfSnAL.js";
9
+ import { B as downloadPrivateSlackFile, F as bindSlackDirectCredentialSubject, G as isDmChannel, Gt as getDb, Ht as getConversationEventStore, I as verifyEventAutomationCredentialSubject, Jt as withConversationEventLock, K as normalizeSlackConversationId, Kt as getSqlExecutor, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Pt as resolveRootVisibility, R as verifySlackDirectCredentialSubject, U as getSlackClient, Wt as getConversationStore, X as runWithWorkspaceTeamId, Xt as withConversationMutationLock, Y as getWorkspaceTeamId, _t as createPluginState, a as getPluginRoutes, bt as createPluginLogger, ct as collectEventMatchKeys, d as setPlugins, dn as requireSlackDestination, dt as findMatchingWatches, f as validatePlugins, gt as setDashboardConversationLinkOptions, h as setBriefsConfig, i as getPluginApiRoutes, ln as createSlackDestination, on as deleteProviderIdentityForSlackUser, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, q as runWithSlackInstallationToken, u as getPlugins, xt as readConversationAccessFromSql, z as SlackActionError } from "./agent-hooks-BtGATjr2.js";
10
10
  import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
11
- import { E as juniorConversations, a as juniorSchedulerRuns, f as juniorAgentBindings, g as juniorConversationBriefs, o as juniorSchedulerTasks, p as juniorAgentInvocations, y as juniorConversationEvents } from "./executor-CIl9A6cO.js";
11
+ import { E as juniorConversations, a as juniorSchedulerRuns, f as juniorAgentBindings, g as juniorConversationBriefs, o as juniorSchedulerTasks, p as juniorAgentInvocations, y as juniorConversationEvents } from "./executor-D0xETqi8.js";
12
12
  import { W as instructionProvenanceFor } from "./conversation-BpqLg4MM.js";
13
- import { n as pluginCatalogRuntime } from "./catalog-runtime-D3hJdAMz.js";
14
- import { $ as resolveConversationTitle, F as loadProjection, G as recordSubscribedReplyRoute, J as appendConversationMessages, M as commitMessages, P as loadConversationProjection, Q as persistConversationMessageSummaries, X as persistConversationMessages, Y as hydrateConversationMessages, Z as projectConversationMessages, a as completeTurnRecord, at as isHumanConversationMessage, c as getTurnRecordForResume, ct as recordDeliveredAssistantMessage, d as persistWithRetry, dt as estimateTextTokens, et as appendThreadContextMessages, i as abandonTurnRecord, it as getConversationMessageSlackTs, j as commitAcceptedReply, k as trimTrailingAssistantMessages, l as listTurnSummaries, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, nt as createConversationMemoryService, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, rt as estimateConversationContextTokens, s as getTurnRecord, st as normalizeConversationText, tt as buildConversationContext, u as recordTurnSummary, ut as upsertConversationMessage } from "./checkpoint-Ja5A32op.js";
15
- import { E as acquireActiveLock, O as withActiveLock, T as MUTATION_LOCK_TTL_MS$1, k as withLock$1, w as getStateAdapter } from "./profile-BfWuRDUF.js";
16
- import { Bt as hasRunnableConversationWork$1, Dt as hasRunnableConversationWork, Et as getConversationWorkState, F as effectiveTaskOutcomes, Ht as isInvalidConversationRecordError, It as stopConversationWork, Kt as buildDeterministicAssistantMessageId, Mt as removeActiveConversation, Ot as listActiveConversationIds, Pt as requestConversationWork, Rt as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as withScheduledAutomationLock, Tt as getConversation, U as findMatchingEventAutomations, X as getEventCatalog, a as requestAttachmentDeletion, b as saveScheduledAutomationInLock, c as parseSlackThreadId, g as listScheduledAutomationsForTeam, h as listScheduledAutomations, o as storeAttachment, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId, r as collectAttachmentGarbage, tt as eventGuidance, v as readScheduledAutomation, vt as clearExpiredConversationLease, w as scheduledRunSchema, wt as ensureConversationWake, x as scheduledRunId, z as collectEventAutomationMatchKeys } from "./stats-D4Ar_7MS.js";
17
- import { S as startActiveTurn, _ as isTurnInputCommitLostError, b as markTurnCompleted, d as ConversationTurnBoundaryError, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, h as getConversationTurnBoundaryError, m as TurnInputDeferredError, p as TurnInputCommitLostError, r as clearPendingAuth, s as getAssistantReplyText, v as isTurnInputDeferredError, x as markTurnFailed, y as markTurnClosed } from "./pending-auth-KOZWIp4m.js";
18
- import { h as postSlackMessage, i as formatProviderLabel, s as startOAuthFlow, t as createAgentRunner, v as RetryableDeliveryError } from "./agent-runner-CIiziOcz.js";
13
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-LUAIHslF.js";
14
+ import { $ as resolveConversationTitle, F as loadProjection, G as recordSubscribedReplyRoute, J as appendConversationMessages, M as commitMessages, P as loadConversationProjection, Q as persistConversationMessageSummaries, X as persistConversationMessages, Y as hydrateConversationMessages, Z as projectConversationMessages, a as completeTurnRecord, at as isHumanConversationMessage, c as getTurnRecordForResume, ct as recordDeliveredAssistantMessage, d as persistWithRetry, dt as estimateTextTokens, et as appendThreadContextMessages, i as abandonTurnRecord, it as getConversationMessageSlackTs, j as commitAcceptedReply, k as trimTrailingAssistantMessages, l as listTurnSummaries, lt as turnHasReply, m as buildTurnErrorResponse, n as loadTurnCheckpoint, nt as createConversationMemoryService, o as failTurnRecord, ot as markConversationMessage, r as saveTurnCheckpoint, rt as estimateConversationContextTokens, s as getTurnRecord, st as normalizeConversationText, tt as buildConversationContext, u as recordTurnSummary, ut as upsertConversationMessage } from "./checkpoint-CmkbGGiR.js";
15
+ import { E as acquireActiveLock, O as withActiveLock, T as MUTATION_LOCK_TTL_MS$1, k as withLock$1, w as getStateAdapter } from "./profile-6veboDue.js";
16
+ import { Bt as hasRunnableConversationWork$1, Dt as hasRunnableConversationWork, Et as getConversationWorkState, F as effectiveTaskOutcomes, Ht as isInvalidConversationRecordError, It as stopConversationWork, Kt as buildDeterministicAssistantMessageId, Mt as removeActiveConversation, Ot as listActiveConversationIds, Pt as requestConversationWork, Rt as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as withScheduledAutomationLock, Tt as getConversation, U as findMatchingEventAutomations, X as getEventCatalog, a as requestAttachmentDeletion, b as saveScheduledAutomationInLock, c as parseSlackThreadId, g as listScheduledAutomationsForTeam, h as listScheduledAutomations, o as storeAttachment, pt as appendAndEnqueueInboundMessage, qt as buildDeterministicTurnId, r as collectAttachmentGarbage, tt as eventGuidance, v as readScheduledAutomation, vt as clearExpiredConversationLease, w as scheduledRunSchema, wt as ensureConversationWake, x as scheduledRunId, z as collectEventAutomationMatchKeys } from "./stats-BvNqVRdB.js";
17
+ import { S as startActiveTurn, _ as isTurnInputCommitLostError, b as markTurnCompleted, d as ConversationTurnBoundaryError, f as CooperativeTurnYieldError, g as isCooperativeTurnYieldError, h as getConversationTurnBoundaryError, m as TurnInputDeferredError, p as TurnInputCommitLostError, r as clearPendingAuth, s as getAssistantReplyText, v as isTurnInputDeferredError, x as markTurnFailed, y as markTurnClosed } from "./pending-auth-HNSPyxoN.js";
18
+ import { h as postSlackMessage, i as formatProviderLabel, s as startOAuthFlow, t as createAgentRunner, v as RetryableDeliveryError } from "./agent-runner-DCj_cPjl.js";
19
19
  import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DAoaq0CT.js";
20
- import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-CU8DArbR.js";
20
+ import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-DprAzyQN.js";
21
21
  import { l as conversationQueueMessageSchema, n as resolveConversationWorkQueueTopic, r as verifyConversationQueueMessage, t as getVercelConversationWorkQueue, u as isConversationQueueMessageRejectedError } from "./vercel-queue-DIkVcfK4.js";
22
- import { a as getTurnRequestDeadline, i as verifyWorkspaceSnapshotJobMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-CIz2Sij0.js";
22
+ import { a as getTurnRequestDeadline, i as verifyWorkspaceSnapshotJobMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-C8FZ3LSY.js";
23
23
  import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-CIXf7Uye.js";
24
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-5255qF_p.js";
24
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-Dy7SUhLv.js";
25
25
  import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
26
- import { a as webActorFromEmail, f as lookupSlackUser, h as GET$3, i as recordWebConversationActivity, l as resolveSlackChannelTypeFromMessage, m as createVercelAttachmentStorage, n as conversationTurnIdForMessage, o as resolveConversationDestination, p as legacyWebMailboxMetadataSchema, s as conversationVisibilityFromSlackChannelType, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContext } from "./web-input-vHOAXVxj.js";
27
- import { u as recordAutomationExecution } from "./execution-stats-BbYien1O.js";
28
- import { _ as markDispatchCompleted, a as claimDispatchMailboxAppend, c as getDispatchConversationId, d as getDispatchTurnId, f as getPluginDispatchProjection, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as resolveTurnSessionRouting, l as getDispatchInputMessageId, m as listPendingDispatchMailboxAppends, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, p as isTerminalDispatchStatus, s as createOrGetDispatch, t as processPluginTask, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./task-runner-BfOnhH3C.js";
29
- import { i as resolveAgentInvocationId, o as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-NIWYQvh-.js";
30
- import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-CVRu8Hmm.js";
31
- import { n as executeTurn, t as AgentRunError } from "./turn-execution-_rlctc-2.js";
32
- import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-B-jR3Aa8.js";
33
- import { a as requireTurnFailureEventId, d as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, t as completeAuthPauseTurn, u as getTurnUserSlackMessageTs } from "./auth-pause-state-BKGc9Y8O.js";
34
- import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BgOOj26_.js";
35
- import { C as isSlackTitlePermissionError, D as createSlackAdapterAssistantStatusSession, E as splitSlackReplyText, S as isRetryableSlackPostError, T as buildSlackOutputMessage, _ as getThreadId, a as GET$4, b as getSlackApiErrorCode, c as wakePausedTurn, d as shouldKeepProcessingReactionForToolInvocation, f as startProcessingReaction, g as getRunId, h as getMessageTs, i as publishAppHomeView, l as resumeSlackTurn, m as getChannelId, o as createPausedTurns, p as getAssistantThreadContext, r as GET$5, s as getPausedTurnRequest, t as receiveLocalOAuthCredential, u as buildAuthPauseResponse, v as getThreadTs, w as sendSlackReply, x as getSlackErrorObservabilityAttributes, y as stripLeadingBotMention } from "./credential-sync-DLWVq50D.js";
36
- import { n as deleteWebAuthorization, t as createWebAuthorization } from "./web-authorization-TdkXi7XG.js";
37
- import { t as processConversationWork } from "./worker-BgY7599f.js";
38
- import { t as bindSpawnAgent } from "./spawn-C6Utdbzm.js";
26
+ import { a as webActorFromEmail, f as lookupSlackUser, h as GET$3, i as recordWebConversationActivity, l as resolveSlackChannelTypeFromMessage, m as createVercelAttachmentStorage, n as conversationTurnIdForMessage, o as resolveConversationDestination, p as legacyWebMailboxMetadataSchema, s as conversationVisibilityFromSlackChannelType, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContext } from "./web-input-CZjYeCFh.js";
27
+ import { u as recordAutomationExecution } from "./execution-stats-C-E5FIsT.js";
28
+ import { _ as markDispatchCompleted, a as claimDispatchMailboxAppend, c as getDispatchConversationId, d as getDispatchTurnId, f as getPluginDispatchProjection, g as markDispatchBlocked, h as markDispatchAwaitingResume, i as resolveTurnSessionRouting, l as getDispatchInputMessageId, m as listPendingDispatchMailboxAppends, n as scheduleSessionCompletedPluginTasks, o as confirmDispatchMailboxAppend, p as isTerminalDispatchStatus, s as createOrGetDispatch, t as processPluginTask, u as getDispatchRecord, v as markDispatchFailed, y as markDispatchRunning } from "./task-runner-BH5M3JHb.js";
29
+ import { i as resolveAgentInvocationId, o as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-DTqDMGeD.js";
30
+ import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-CNsgouon.js";
31
+ import { n as executeTurn, t as AgentRunError } from "./turn-execution-mZIWtngI.js";
32
+ import { a as persistThreadState, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-Db98GdYL.js";
33
+ import { a as requireTurnFailureEventId, d as buildDeliveredTurnStatePatch, i as getAgentTurnDiagnosticsAttributes, l as getTurnUserReplyAttachmentContext, n as persistAuthPauseTurnState, r as finalizeFailedTurnReplyWithEvent, s as getTurnUserMessage, t as completeAuthPauseTurn, u as getTurnUserSlackMessageTs } from "./auth-pause-state-C7GMUpb9.js";
34
+ import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-CbxNVEAg.js";
35
+ import { C as isSlackTitlePermissionError, D as createSlackAdapterAssistantStatusSession, E as splitSlackReplyText, S as isRetryableSlackPostError, T as buildSlackOutputMessage, _ as getThreadId, a as GET$4, b as getSlackApiErrorCode, c as wakePausedTurn, d as shouldKeepProcessingReactionForToolInvocation, f as startProcessingReaction, g as getRunId, h as getMessageTs, i as publishAppHomeView, l as resumeSlackTurn, m as getChannelId, o as createPausedTurns, p as getAssistantThreadContext, r as GET$5, s as getPausedTurnRequest, t as receiveLocalOAuthCredential, u as buildAuthPauseResponse, v as getThreadTs, w as sendSlackReply, x as getSlackErrorObservabilityAttributes, y as stripLeadingBotMention } from "./credential-sync-BoWHpDBP.js";
36
+ import { n as deleteWebAuthorization, t as createWebAuthorization } from "./web-authorization-DG2K_bpi.js";
37
+ import { t as processConversationWork } from "./worker-BvuVxS4T.js";
38
+ import { t as bindSpawnAgent } from "./spawn-BFzlrZae.js";
39
39
  import { createRequire } from "node:module";
40
40
  import { pathToFileURL } from "node:url";
41
41
  import { Hono } from "hono";
@@ -1,10 +1,10 @@
1
- import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-DqG_LDSH.js";
2
- import { t as buildTurnFailureResponse } from "./logging-dD_n9Ocp.js";
1
+ import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-ciJRmcY5.js";
2
+ import { t as buildTurnFailureResponse } from "./logging-CHZ0aJXO.js";
3
3
  import { _ as parseSlackMessageTs } from "./context-Bplcgypl.js";
4
- import { Y as hydrateConversationMessages, ot as markConversationMessage } from "./checkpoint-Ja5A32op.js";
5
- import { qt as buildDeterministicTurnId } from "./stats-D4Ar_7MS.js";
6
- import { b as markTurnCompleted, r as clearPendingAuth, y as markTurnClosed } from "./pending-auth-KOZWIp4m.js";
7
- import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-B-jR3Aa8.js";
4
+ import { Y as hydrateConversationMessages, ot as markConversationMessage } from "./checkpoint-CmkbGGiR.js";
5
+ import { qt as buildDeterministicTurnId } from "./stats-BvNqVRdB.js";
6
+ import { b as markTurnCompleted, r as clearPendingAuth, y as markTurnClosed } from "./pending-auth-HNSPyxoN.js";
7
+ import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Db98GdYL.js";
8
8
  //#region src/chat/runtime/delivered-turn-state.ts
9
9
  /** Build state after destination delivery or intentional no-reply completion. */
10
10
  function buildDeliveredTurnStatePatch(args) {
@@ -1,4 +1,4 @@
1
- import { r as completeObject } from "./client-DqG_LDSH.js";
1
+ import { r as completeObject } from "./client-ciJRmcY5.js";
2
2
  import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
3
3
  import { N as parseBriefInput, d as conversationDetailReportSchema, k as briefCodeChangeSchema, p as conversationEventPageSchema } from "./conversation-BpqLg4MM.js";
4
4
  import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DAoaq0CT.js";
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
269
269
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
270
270
  */
271
271
  async function configuredDefaultModelId() {
272
- const { botConfig } = await import("./config-CdS5GQ7W.js").then((n) => n.r);
272
+ const { botConfig } = await import("./config-BMwzCmw-.js").then((n) => n.r);
273
273
  return defaultModelId(botConfig);
274
274
  }
275
275
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-DYHLzGuO.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-DR6TJe4J.js";
3
3
  //#region src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
@@ -1,11 +1,11 @@
1
- import { i as completeText, m as escapeXml, o as resolveGatewayModel, p as unwrapCurrentInstruction } from "./client-DqG_LDSH.js";
2
- import { _ as setSpanAttributes, f as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, u as logException } from "./logging-dD_n9Ocp.js";
3
- import { n as botConfig } from "./config-CdS5GQ7W.js";
1
+ import { i as completeText, m as escapeXml, o as resolveGatewayModel, p as unwrapCurrentInstruction } from "./client-ciJRmcY5.js";
2
+ import { _ as setSpanAttributes, f as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, u as logException } from "./logging-CHZ0aJXO.js";
3
+ import { n as botConfig } from "./config-BMwzCmw-.js";
4
4
  import { _ as parseSlackMessageTs, f as toStoredSlackActor } from "./context-Bplcgypl.js";
5
- import { Bt as authenticationUnlinkedEvent, Ht as getConversationEventStore, Jt as withConversationEventLock, Kt as getSqlExecutor, Lt as JUNIOR_NATIVE_EVENT_NAMESPACE, Qt as bindProviderConversation, Rt as agentsInstructionsUpdatedEvent, Wt as getConversationStore, Yt as sanitizePostgresJson, en as addAgentTurnUsage, qt as createSqlConversationEventStore, zt as authenticationLinkedEvent } from "./agent-hooks-pyhfSnAL.js";
5
+ import { Bt as authenticationUnlinkedEvent, Ht as getConversationEventStore, Jt as withConversationEventLock, Kt as getSqlExecutor, Lt as JUNIOR_NATIVE_EVENT_NAMESPACE, Qt as bindProviderConversation, Rt as agentsInstructionsUpdatedEvent, Wt as getConversationStore, Yt as sanitizePostgresJson, en as addAgentTurnUsage, qt as createSqlConversationEventStore, zt as authenticationLinkedEvent } from "./agent-hooks-BtGATjr2.js";
6
6
  import { F as agentHistoryItemSchema, H as contextProvenance, U as instructionActors, W as instructionProvenanceFor } from "./conversation-BpqLg4MM.js";
7
- import { n as generateShortTitle, t as fallbackShortTitle } from "./short-title-CKnmS3nO.js";
8
- import { A as sleep, D as fenceLock, T as MUTATION_LOCK_TTL_MS, k as withLock, w as getStateAdapter } from "./profile-BfWuRDUF.js";
7
+ import { n as generateShortTitle, t as fallbackShortTitle } from "./short-title-XUBD7AYC.js";
8
+ import { A as sleep, D as fenceLock, T as MUTATION_LOCK_TTL_MS, k as withLock, w as getStateAdapter } from "./profile-6veboDue.js";
9
9
  import { isDeepStrictEqual } from "node:util";
10
10
  import { z } from "zod";
11
11
  import { createHash } from "node:crypto";