@sentry/junior 0.258.0 → 0.259.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 (68) hide show
  1. package/dist/adapter-Bn0gFVSF.js +270 -0
  2. package/dist/{admin-My1SLGVO.js → admin-C8xz2f10.js} +1 -1
  3. package/dist/{agent-hooks-BJ_5mlRH.js → agent-hooks-B00FaKdP.js} +9 -8
  4. package/dist/{agent-runner-DGsFQw72.js → agent-runner-CPSd7rKm.js} +87 -308
  5. package/dist/api/schema.d.ts +29 -0
  6. package/dist/api/schema.js +2 -2
  7. package/dist/api.js +93 -22
  8. package/dist/{app-PX2H1PxU.d.ts → app-Bbxrehjf.d.ts} +5 -2
  9. package/dist/app.d.ts +2 -2
  10. package/dist/app.js +30 -28
  11. package/dist/{assistant-reply-H1M-91oF.js → assistant-reply-CqthTerd.js} +1 -1
  12. package/dist/{briefs-vYoK85rJ.js → briefs-DNYbQ9cD.js} +2 -2
  13. package/dist/{catalog-runtime-BN4DVxco.js → catalog-runtime-B8SuFPGb.js} +1 -1
  14. package/dist/cli/chat.d.ts +1 -1
  15. package/dist/cli/chat.js +15 -15
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/main.js +6 -2
  18. package/dist/cli/plugins.d.ts +1 -1
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/run.d.ts +2 -1
  21. package/dist/cli/run.js +2 -1
  22. package/dist/cli/snapshot-create.js +4 -3
  23. package/dist/cli/upgrade.d.ts +1 -1
  24. package/dist/cli/upgrade.js +3 -3
  25. package/dist/{client-DbyHuMFU.js → client-BZdxgKyL.js} +57 -4
  26. package/dist/{config-_WO_AjCB.js → config-Deqpfpg9.js} +5 -2
  27. package/dist/{connections-ag_1JOhB.js → connections-9gJkfS85.js} +174 -10
  28. package/dist/{conversation-privacy-DHP_xnVj.js → conversation-privacy-CFhNKxp-.js} +1 -1
  29. package/dist/{credential-sync-B-CPX_ag.js → credential-sync-BABGymK3.js} +15 -177
  30. package/dist/{executor-RvG6kVe1.js → executor-Bb3eQb8q.js} +2 -2
  31. package/dist/{images-C2J_bj2g.js → images-BbSdVHC6.js} +2 -2
  32. package/dist/instrumentation.js +2 -2
  33. package/dist/{job-queue-DVe37it2.js → job-queue-vdGU-5ge.js} +1 -1
  34. package/dist/{logging-DsHONhVm.js → logging-BStXN56b.js} +1 -1
  35. package/dist/{message-DyitL8no.js → message-DRf6m4uO.js} +3 -3
  36. package/dist/nitro.d.ts +2 -2
  37. package/dist/nitro.js +3 -3
  38. package/dist/{oauth-callback-server-CDby-pCn.js → oauth-callback-server-JmOgLcGl.js} +2 -2
  39. package/dist/{pending-auth-D8J1uJUS.js → pending-auth-rG5U_QS1.js} +62 -62
  40. package/dist/{plugins-B11Mfkmv.d.ts → plugins-B_0Cr0MO.d.ts} +5 -1
  41. package/dist/{profile-DpYjfKke.js → profile-qBM6B_-V.js} +4 -273
  42. package/dist/{registry-Du566MtJ.js → registry-B_M_x_iS.js} +41 -2
  43. package/dist/{resolve-ClCIgh8E.js → resolve-BzpuLh8c.js} +3 -2
  44. package/dist/{result-BBbKA61B.js → result-DEZH_AnZ.js} +6 -6
  45. package/dist/{runner-CCuqFSqx.js → runner-BqQlG10t.js} +9 -9
  46. package/dist/{sandbox-egress-signals-DY1mbKF4.js → sandbox-egress-signals-DCq3WLs5.js} +1 -1
  47. package/dist/{schema-DrMh3NtR.js → schema-CF9HqNRY.js} +15 -1
  48. package/dist/service-account-BqTBkyD7.js +120 -0
  49. package/dist/service-account-BzhW7kXu.js +661 -0
  50. package/dist/{session-stop-CIoFiwwe.js → session-stop-CV65ZlU3.js} +10 -10
  51. package/dist/{skills-DyQBLIrK.js → skills-CiWS5_Ub.js} +2 -2
  52. package/dist/{spawn-Dqfeo7XP.js → spawn-BSAQ7UQZ.js} +2 -2
  53. package/dist/{store-DJLwq4x8.js → store-B1GES4gC.js} +6 -6
  54. package/dist/{task-queue-BzW4MaWU.js → task-queue-BAeGEMjJ.js} +3 -3
  55. package/dist/{task-runner-D3qJh4fK.js → task-runner-BlGhcQPi.js} +10 -10
  56. package/dist/{tasks-CEXKTASS.js → tasks-DieKX3d4.js} +9 -8
  57. package/dist/{thread-state-W3f6kAtz.js → thread-state-DpSWS4Rr.js} +6 -6
  58. package/dist/{turn-failure-response-CWx7aNIh.js → turn-failure-response-DQljogGJ.js} +7 -7
  59. package/dist/{turn-lifecycle-C9JFst7-.js → turn-lifecycle-BLgrkV_L.js} +1 -1
  60. package/dist/{turn-session-routing-CUxtfpr7.js → turn-session-routing-BlajheOU.js} +1 -1
  61. package/dist/{validation-BHRxa5G4.js → validation-23d7K9tX.js} +1 -1
  62. package/dist/{version-C0U6rHg0.js → version-B_XumRx-.js} +1 -1
  63. package/dist/version.js +1 -1
  64. package/dist/{viewer-CGvvRqKp.js → viewer-B2_ABsYi.js} +3 -3
  65. package/dist/{web-input-Keb5GRWj.js → web-input-BZDyxpzR.js} +29 -29
  66. package/dist/{work-DRcsJ3hV.js → work-D3QKiV0O.js} +9 -9
  67. package/dist/{worker-Cjo-QqPq.js → worker-C8mUjYf9.js} +5 -5
  68. package/package.json +7 -7
@@ -1,30 +1,32 @@
1
- import { b as getGatewayApiKey, c as hasCompactedConversationContext, d as unwrapCurrentInstruction, f as escapeXml, g as getProviderErrorAttributes, h as findProviderError, i as completeText, l as isCompactionSummaryText, m as createProviderError, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as ProviderError, r as completeObject, s as COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as renderCurrentInstruction, v as isProviderRetryError, x as resolveGatewayCredential, y as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-DbyHuMFU.js";
2
- import { R as normalizeIdentityEmail, S as summarizeMessageText, T as withSpan, V as toOptionalString, _ as serializeGenAiAttribute, a as extractGenAiUsageSummary, b as setSpanStatus, c as getLogContextAttributesForSpan, d as logError, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as logWarn, p as logInfo, u as logAudit, w as withLogContext, x as setTags, y as setSpanAttributes, z as isRecord$4 } from "./logging-DsHONhVm.js";
1
+ import { S as resolveGatewayCredential, _ as getProviderErrorAttributes, a as completeText, b as MISSING_GATEWAY_CREDENTIALS_ERROR, c as COMPACTION_SUMMARY_PREFIX, d as renderCurrentInstruction, f as unwrapCurrentInstruction, g as findProviderError, h as createProviderError, i as completeObject, l as hasCompactedConversationContext, m as ProviderError, n as GEN_AI_SERVER_ADDRESS, p as escapeXml, s as resolveGatewayModel, t as GEN_AI_PROVIDER_NAME, u as isCompactionSummaryText, x as getGatewayApiKey, y as isProviderRetryError } from "./client-BZdxgKyL.js";
2
+ import { R as normalizeIdentityEmail, S as summarizeMessageText, T as withSpan, V as toOptionalString, _ as serializeGenAiAttribute, a as extractGenAiUsageSummary, b as setSpanStatus, c as getLogContextAttributesForSpan, d as logError, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, l as getTracePropagationHeaders, m as logWarn, p as logInfo, u as logAudit, w as withLogContext, x as setTags, y as setSpanAttributes, z as isRecord$4 } from "./logging-BStXN56b.js";
3
3
  import { m as startInactiveSpan, v as withActiveSpan } from "./sentry-BBUlHih9.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-DHP_xnVj.js";
5
- import { n as botConfig, v as normalizeSlackEmojiName } from "./config-_WO_AjCB.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-CFhNKxp-.js";
5
+ import { n as botConfig, v as normalizeSlackEmojiName } from "./config-Deqpfpg9.js";
6
6
  import { a as formatModelProfiles, c as profileConfig, i as formatModelProfile, l as TURN_REASONING_LEVELS, n as ModelProfileNotConfiguredError, o as modelIdForProfile, s as modelProfileSchema } from "./model-profile-Bg8EoCKD.js";
7
7
  import { a as isUserActor, d as parseSlackTeamId, f as parseSlackUserId, g as parseSlackMessageTs, l as parseSlackChannelId, u as parseSlackChannelReferenceId } from "./actor-tlxzqaRe.js";
8
- import { C as addAgentTurnUsage, D as hasAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, l as getConversationMessageSearchStore, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-CGvvRqKp.js";
8
+ import { C as addAgentTurnUsage, D as hasAgentTurnUsage, R as parseDestination, c as getConversationEventStore, d as getDb, f as getSqlExecutor, l as getConversationMessageSearchStore, r as readActorIdentity, u as getConversationStore, w as agentTurnCostUsd } from "./viewer-B2_ABsYi.js";
9
9
  import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, s as juniorConversations, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-Qfz7dWgU.js";
10
- import { _ as juniorConversationAnnotations, a as juniorAutomationRuns, b as juniorAttachments, c as juniorStats, f as juniorConversationBriefs, x as juniorArtifacts } from "./executor-RvG6kVe1.js";
10
+ import { _ as juniorConversationAnnotations, a as juniorAutomationRuns, b as juniorAttachments, c as juniorStats, f as juniorConversationBriefs, x as juniorArtifacts } from "./executor-Bb3eQb8q.js";
11
11
  import { d as contextProvenance, f as instructionActors, m as sameActorIdentity, p as instructionProvenanceFor, t as KNOWN_CONVERSATION_EVENT_TYPES, u as agentInstructionProvenance } from "./history-AY8rs-FR.js";
12
12
  import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-DJBompdd.js";
13
- import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as actorLogContext, f as credentialContextForActor, g as credentialUserSubjectId, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, p as credentialContextSchema, s as OAuthProviderError } from "./registry-Du566MtJ.js";
14
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BN4DVxco.js";
15
- import { a as parseSkillInvocation, i as parseSkillFile, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-DyQBLIrK.js";
16
- import { A as escapeSlackMrkdwnText, B as postSlackMessage, Ct as ToolInputError, Dt as loadConversationProjection, Et as loadConnectedMcpProviders, G as continuableMessages, H as uploadFilesToConversation, Ht as recordTurnRoute, I as addReactionToMessage, K as loadTurnCheckpoint, L as getSlackMessagePermalink, Lt as recordAuthorizationRequested, Mt as openConversationProjection, Nt as recordAgentsInstructionsUpdated, O as automationRevision, Ot as loadLastModelProfile, P as slackMention, Pt as recordAttachmentsDelivered, R as openSlackDirectMessage, Rt as recordGuardianActionReviewed, St as TURN_CONTEXT_TAG, Vt as recordToolExecutionStarted, Xt as fallbackShortTitle, Zt as resolveTaskTitle, _t as isToolResultMessage, a as saveScheduledAutomation, bt as stripRuntimeTurnContext, ct as extractAssistantText, d as createEventAutomation, dn as getAgentContextInputLimitTokens, dt as getUserMessageInstructionText, f as deleteEventAutomation, fn as historyItemFromPiMessage, ft as hasRuntimeTurnContext, g as listEventAutomationsForTeam, gt as isToolResultError, ht as isContinuablePiBoundary, i as readScheduledAutomation, it as TurnToolCallLimitExceededError, j as formatSlackLink, jt as loadTurnRoute, ln as estimateTextTokens, lt as getPiMessageRole, m as getEventAutomation, mt as isAssistantMessage, n as listScheduledAutomationsForTeam, nt as TurnBudgetExceededError, ot as createTurnLimitGate, pn as piMessageFromHistoryItem, q as saveTurnCheckpoint, rt as TurnSliceLimitExceededError, st as isTurnExecutionLimitExceededError, t as createScheduledAutomation, tt as TURN_LIMIT_DISABLED_REASON, un as getAgentContextCompactionTriggerTokens, ut as getTerminalAssistantMessages, v as saveEventAutomation, vt as normalizeToolNameFromResult, xt as trimTrailingAssistantMessages, y as setEventAutomationStatus, yt as retainRuntimeTurnContext, z as postSlackEphemeralMessage, zt as recordMcpProviderConnected } from "./tasks-CEXKTASS.js";
17
- import { A as getWorkspaceSnapshotBuilder, B as STOP_WATCHING_TOOL_NAME, Bt as getFilePermalink, C as WorkspaceValidationError, D as setWorkspaceSnapshotBuild, Dt as matchSlackAttachments, E as setWorkspaceSnapshot, F as isSlackMessageTurn, Ft as defaultTimezone, G as createWatch, Gt as normalizeSlackConversationId, H as cancelWatch, Ht as getSlackClient, I as slackMessageTurnDisabledReason, It as resolveUserTimezone, J as getWatch, K as deliverWatch, L as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, M as workspaceRepoCheckoutPath, Mt as createPluginAnnotations, N as resolveChannelCapabilities, O as SANDBOX_RUNTIME, P as getSlackToolContext, R as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, Rt as SlackActionError, S as updateWorkspace, T as loadSnapshotsForProfile, Ut as isConversationScopedChannel, V as cancelSubscriptions, W as createTimerWatch, Wt as isDmChannel$1, Xt as JUNIOR_NATIVE_EVENT_NAMESPACE, Y as listWatches, _ as deleteWorkspace, at as getDashboardConversationLink, b as listWorkspaces, c as getPluginTools, en as conversationNoteEvent, ft as createPluginLogger, g as createWorkspace, j as tryWorkspaceRepoCheckoutPath, jt as saveObjectAnnotations, k as deleteWorkspaceSnapshotBuilders, l as getPluginUserPromptContributions, q as findMatchingWatches, qt as withSlackRetries, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as getDashboardTaskLink, u as getPlugins, v as getWorkspace, w as invalidateReadySnapshot, y as getWorkspaceByName, z as RESOURCE_WATCH_TOOL_SOURCE, zt as downloadPrivateSlackFile } from "./agent-hooks-BJ_5mlRH.js";
13
+ import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as actorLogContext, f as credentialContextForActor, g as credentialUserSubjectId, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, p as credentialContextSchema, s as OAuthProviderError } from "./registry-B_M_x_iS.js";
14
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-B8SuFPGb.js";
15
+ import { a as parseSkillInvocation, i as parseSkillFile, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-CiWS5_Ub.js";
16
+ import { A as escapeSlackMrkdwnText, B as postSlackMessage, Ct as ToolInputError, Dt as loadConversationProjection, Et as loadConnectedMcpProviders, G as continuableMessages, H as uploadFilesToConversation, Ht as recordTurnRoute, I as addReactionToMessage, K as loadTurnCheckpoint, L as getSlackMessagePermalink, Lt as recordAuthorizationRequested, Mt as openConversationProjection, Nt as recordAgentsInstructionsUpdated, O as automationRevision, Ot as loadLastModelProfile, P as slackMention, Pt as recordAttachmentsDelivered, R as openSlackDirectMessage, Rt as recordGuardianActionReviewed, St as TURN_CONTEXT_TAG, Vt as recordToolExecutionStarted, Xt as fallbackShortTitle, Zt as resolveTaskTitle, _t as isToolResultMessage, a as saveScheduledAutomation, bt as stripRuntimeTurnContext, ct as extractAssistantText, d as createEventAutomation, dn as getAgentContextInputLimitTokens, dt as getUserMessageInstructionText, f as deleteEventAutomation, fn as historyItemFromPiMessage, ft as hasRuntimeTurnContext, g as listEventAutomationsForTeam, gt as isToolResultError, ht as isContinuablePiBoundary, i as readScheduledAutomation, it as TurnToolCallLimitExceededError, j as formatSlackLink, jt as loadTurnRoute, ln as estimateTextTokens, lt as getPiMessageRole, m as getEventAutomation, mt as isAssistantMessage, n as listScheduledAutomationsForTeam, nt as TurnBudgetExceededError, ot as createTurnLimitGate, pn as piMessageFromHistoryItem, q as saveTurnCheckpoint, rt as TurnSliceLimitExceededError, st as isTurnExecutionLimitExceededError, t as createScheduledAutomation, tt as TURN_LIMIT_DISABLED_REASON, un as getAgentContextCompactionTriggerTokens, ut as getTerminalAssistantMessages, v as saveEventAutomation, vt as normalizeToolNameFromResult, xt as trimTrailingAssistantMessages, y as setEventAutomationStatus, yt as retainRuntimeTurnContext, z as postSlackEphemeralMessage, zt as recordMcpProviderConnected } from "./tasks-DieKX3d4.js";
17
+ import { A as getWorkspaceSnapshotBuilder, B as STOP_WATCHING_TOOL_NAME, Bt as getFilePermalink, C as WorkspaceValidationError, D as setWorkspaceSnapshotBuild, Dt as matchSlackAttachments, E as setWorkspaceSnapshot, F as isSlackMessageTurn, Ft as defaultTimezone, G as createWatch, Gt as normalizeSlackConversationId, H as cancelWatch, Ht as getSlackClient, I as slackMessageTurnDisabledReason, It as resolveUserTimezone, J as getWatch, K as deliverWatch, L as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, M as workspaceRepoCheckoutPath, Mt as createPluginAnnotations, N as resolveChannelCapabilities, O as SANDBOX_RUNTIME, P as getSlackToolContext, R as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, Rt as SlackActionError, S as updateWorkspace, T as loadSnapshotsForProfile, Ut as isConversationScopedChannel, V as cancelSubscriptions, W as createTimerWatch, Wt as isDmChannel$1, Xt as JUNIOR_NATIVE_EVENT_NAMESPACE, Y as listWatches, _ as deleteWorkspace, at as getDashboardConversationLink, b as listWorkspaces, c as getPluginTools, en as conversationNoteEvent, ft as createPluginLogger, g as createWorkspace, j as tryWorkspaceRepoCheckoutPath, jt as saveObjectAnnotations, k as deleteWorkspaceSnapshotBuilders, l as getPluginUserPromptContributions, q as findMatchingWatches, qt as withSlackRetries, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as getDashboardTaskLink, u as getPlugins, v as getWorkspace, w as invalidateReadySnapshot, y as getWorkspaceByName, z as RESOURCE_WATCH_TOOL_SOURCE, zt as downloadPrivateSlackFile } from "./agent-hooks-B00FaKdP.js";
18
18
  import { B as briefLinkSchema, H as conversationBriefSchema, J as removedCardSchema, L as detectImageMediaType, R as isVisionImageMediaType, V as briefOutcomeStatusSchema } from "./conversation-DjN3mlog.js";
19
- import { A as SANDBOX_DATA_ROOT, D as fenceLock, E as acquireActiveLock, F as sandboxSkillFile, I as sandboxSkillPathResolution, M as SANDBOX_SKILLS_ROOT, N as SANDBOX_WORKSPACE_ROOT, O as withLock, P as sandboxSkillDir, _ 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_REPOS_ROOT, k as sleep, 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-DpYjfKke.js";
20
- import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-D8J1uJUS.js";
19
+ import { C as SANDBOX_DATA_ROOT, D as sandboxSkillDir, E as SANDBOX_WORKSPACE_ROOT, O as sandboxSkillFile, S as sleep, T as SANDBOX_SKILLS_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, k as sandboxSkillPathResolution, 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 SANDBOX_REPOS_ROOT, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-qBM6B_-V.js";
20
+ import { n as canReusePendingAuthLink, t as abandonReplacedPendingAuth } from "./pending-auth-rG5U_QS1.js";
21
21
  import { c as isTurnInputCommitLostError, i as TurnInputCommitLostError, r as CooperativeTurnYieldError, t as authorizationId } from "./oauth-authorization-djQn5Nhy.js";
22
- import { a as isNoReplyMarker, i as NO_REPLY_MARKER, n as getAssistantReplyText, r as sanitizeAssistantText, t as decideReply } from "./assistant-reply-H1M-91oF.js";
23
- import { C as pluginSupportsEvent, D as requireEventIdentifier, E as registeredResourceTypeSchema, L as readAutomationResult, N as FINISH_AUTOMATION_RUN_TOOL_NAME, O as requireSupportedEventMatch, P as automationResultSchema, R as remindMissingAutomationResult, S as hasEventCatalogEntries, T as registeredEventTypeSchema, _ as workspaceSnapshotFinishedEvent, d as requireSlackChannelMessageScope, g as WORKSPACE_SNAPSHOT_READY_EVENT, h as WORKSPACE_SNAPSHOT_FAILED_EVENT, l as getEventCatalog, n as markConversationsStopped, o as enqueueEventNotification, t as getConversationStoppedAtMs, v as workspaceSnapshotWatch, w as registeredEventMatchSchema, x as eventNamespaceSchema, y as automationEventCatalog } from "./session-stop-CIoFiwwe.js";
22
+ import { a as isNoReplyMarker, i as NO_REPLY_MARKER, n as getAssistantReplyText, r as sanitizeAssistantText, t as decideReply } from "./assistant-reply-CqthTerd.js";
23
+ import { C as pluginSupportsEvent, D as requireEventIdentifier, E as registeredResourceTypeSchema, L as readAutomationResult, N as FINISH_AUTOMATION_RUN_TOOL_NAME, O as requireSupportedEventMatch, P as automationResultSchema, R as remindMissingAutomationResult, S as hasEventCatalogEntries, T as registeredEventTypeSchema, _ as workspaceSnapshotFinishedEvent, d as requireSlackChannelMessageScope, g as WORKSPACE_SNAPSHOT_READY_EVENT, h as WORKSPACE_SNAPSHOT_FAILED_EVENT, l as getEventCatalog, n as markConversationsStopped, o as enqueueEventNotification, t as getConversationStoppedAtMs, v as workspaceSnapshotWatch, w as registeredEventMatchSchema, x as eventNamespaceSchema, y as automationEventCatalog } from "./session-stop-CV65ZlU3.js";
24
+ import { a as acquireActiveLock, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-Bn0gFVSF.js";
24
25
  import { i as isValidTimeZone, r as getZonedDateTimeParts } from "./cadence-R7Em4RjE.js";
25
- 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-ClCIgh8E.js";
26
- import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-DVe37it2.js";
27
- import { E as stopConversationWork } from "./store-DJLwq4x8.js";
26
+ 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-BzpuLh8c.js";
27
+ import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-vdGU-5ge.js";
28
+ import { E as stopConversationWork } from "./store-B1GES4gC.js";
29
+ import { _ as getMcpProviderErrorAttributes, a as serviceAccountOnly, c as createMcpServiceAccountClientProvider, d as PluginMcpClient, f as McpProviderError, g as getMcpAwareTelemetryMessage, h as getMcpAwareErrorType, i as serviceAccountAllows, l as getMcpServiceAccountCredentials, m as McpToolError, p as McpServiceAccountRequiredError, u as McpAuthorizationRequiredError, v as toMcpProviderError } from "./service-account-BzhW7kXu.js";
28
30
  import { F as taskOutcomeInputSchema, M as compileScheduleIntent, N as scheduleIntentSchema, O as automationInstructionToolSchema, T as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, j as ScheduleIntentError, k as automationTitleSchema } from "./automation-DWBFBenG.js";
29
31
  import { r as isExperimentalFeatureEnabled } from "./experimental-BNK1l1jv.js";
30
32
  import { n as privateTraceResultAttributes } from "./private-trace-result-CE7_lEdq.js";
@@ -33,7 +35,6 @@ import { createGatewayProvider } from "@ai-sdk/gateway";
33
35
  import { generateText } from "ai";
34
36
  import path from "node:path";
35
37
  import { isDeepStrictEqual } from "node:util";
36
- import { AsyncLocalStorage } from "node:async_hooks";
37
38
  import { z } from "zod";
38
39
  import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
39
40
  import { and, asc, count, countDistinct, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, ne, notExists, or, sql } from "drizzle-orm";
@@ -47,9 +48,7 @@ import { Kind } from "@sinclair/typebox";
47
48
  import { Sandbox } from "@vercel/sandbox";
48
49
  import { Bash, defineCommand } from "just-bash";
49
50
  import { structuredPatch } from "diff";
50
- import { Client } from "@modelcontextprotocol/sdk/client";
51
- import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js";
52
- import { StreamableHTTPClientTransport, StreamableHTTPError } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
51
+ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
53
52
  import dns from "node:dns/promises";
54
53
  import http from "node:http";
55
54
  import https from "node:https";
@@ -6765,280 +6764,6 @@ function createAgentSandbox(options) {
6765
6764
  }
6766
6765
  };
6767
6766
  }
6768
- // src/chat/mcp/errors.ts
6769
- /** Safe failure at an MCP network or OAuth boundary. */
6770
- var McpProviderError = class extends Error {
6771
- phase;
6772
- provider;
6773
- missingSession;
6774
- resourceHost;
6775
- status;
6776
- constructor(details) {
6777
- super(`MCP provider ${details.phase.replace("_", " ")} failed`);
6778
- this.name = "McpProviderError";
6779
- this.phase = details.phase;
6780
- this.provider = details.provider;
6781
- this.missingSession = details.missingSession;
6782
- this.resourceHost = details.resourceHost;
6783
- this.status = details.status;
6784
- }
6785
- };
6786
- function providerStatus(error) {
6787
- if (!error || typeof error !== "object") return;
6788
- const value = error;
6789
- const status = typeof value.status === "number" ? value.status : typeof value.code === "number" ? value.code : void 0;
6790
- return status !== void 0 && status >= 100 && status <= 599 ? status : void 0;
6791
- }
6792
- /** Replace an external MCP failure without retaining its provider-controlled cause. */
6793
- function toMcpProviderError(error, details) {
6794
- if (error instanceof McpProviderError) return error;
6795
- return new McpProviderError({
6796
- ...details,
6797
- status: details.status ?? providerStatus(error)
6798
- });
6799
- }
6800
- /** Return safe MCP provider fields for logs and spans. */
6801
- function getMcpProviderErrorAttributes(error) {
6802
- if (!(error instanceof McpProviderError)) return {};
6803
- return {
6804
- "app.credential.provider": error.provider,
6805
- "app.mcp.error.phase": error.phase,
6806
- ...error.status !== void 0 ? { "http.response.status_code": error.status } : void 0,
6807
- ...error.resourceHost ? { "server.address": error.resourceHost } : void 0
6808
- };
6809
- }
6810
- /** Thrown when an MCP failure should be returned as a model-visible tool error. */
6811
- var McpToolError = class extends Error {
6812
- constructor(message) {
6813
- super(message);
6814
- this.name = "McpToolError";
6815
- }
6816
- };
6817
- /** Return the OpenTelemetry error.type value for MCP-aware tool failures. */
6818
- function getMcpAwareErrorType(error, fallback) {
6819
- if (error instanceof McpToolError) return "tool_error";
6820
- if (error instanceof McpProviderError) return "mcp_provider_error";
6821
- return error instanceof Error ? error.name : fallback;
6822
- }
6823
- /** Return the display-safe error message for MCP-aware tool failures. */
6824
- function getMcpAwareErrorMessage(error) {
6825
- return error instanceof Error ? error.message : String(error);
6826
- }
6827
- /** Return an error message safe for logs and span attributes. */
6828
- function getMcpAwareTelemetryMessage(error, _privacy) {
6829
- if (error instanceof McpToolError) return "MCP tool call failed";
6830
- if (error instanceof McpProviderError) return error.message;
6831
- return getMcpAwareErrorMessage(error);
6832
- }
6833
- // src/chat/mcp/client.ts
6834
- const MCP_CLIENT_INFO = {
6835
- name: "junior-mcp-client",
6836
- version: "1.0.0"
6837
- };
6838
- const MCP_TOOLS_CALL_METHOD = "tools/call";
6839
- function getDefaultPort(url) {
6840
- if (url.protocol === "https:") return 443;
6841
- if (url.protocol === "http:") return 80;
6842
- }
6843
- function getMcpNetworkAttributes(url) {
6844
- const port = url.port ? Number(url.port) : getDefaultPort(url);
6845
- return {
6846
- "server.address": url.hostname,
6847
- ...port !== void 0 ? { "server.port": port } : void 0,
6848
- ...url.protocol === "http:" || url.protocol === "https:" ? {
6849
- "network.protocol.name": "http",
6850
- "network.transport": "tcp"
6851
- } : void 0
6852
- };
6853
- }
6854
- var McpAuthorizationRequiredError = class extends Error {
6855
- provider;
6856
- constructor(provider, message) {
6857
- super(message);
6858
- this.name = "McpAuthorizationRequiredError";
6859
- this.provider = provider;
6860
- }
6861
- };
6862
- function isMissingSessionError(error) {
6863
- return error instanceof StreamableHTTPError && (error.code === 404 || /Session not found/i.test(error.message));
6864
- }
6865
- var PluginMcpClient = class {
6866
- client;
6867
- clientPromise;
6868
- lastAttemptedTransportSessionId;
6869
- providerStatusStore = new AsyncLocalStorage();
6870
- transport;
6871
- listedTools;
6872
- resourceHost;
6873
- plugin;
6874
- options;
6875
- constructor(plugin, options = {}) {
6876
- this.plugin = plugin;
6877
- this.options = options;
6878
- const url = plugin.manifest.mcp?.url;
6879
- this.resourceHost = url ? new URL(url).hostname : void 0;
6880
- }
6881
- async listTools() {
6882
- if (this.listedTools) return [...this.listedTools];
6883
- return await this.withSessionRecovery(async () => {
6884
- const client = await this.getClient();
6885
- const discovered = [];
6886
- const seen = /* @__PURE__ */ new Set();
6887
- let cursor;
6888
- do {
6889
- const result = await this.wrapAuth(() => client.listTools(cursor ? { cursor } : void 0), "list_tools");
6890
- await this.syncTransportSessionId();
6891
- for (const tool of result.tools) {
6892
- if (seen.has(tool.name)) continue;
6893
- seen.add(tool.name);
6894
- discovered.push(tool);
6895
- }
6896
- cursor = result.nextCursor;
6897
- } while (cursor);
6898
- this.listedTools = discovered.sort((left, right) => left.name.localeCompare(right.name));
6899
- return [...this.listedTools];
6900
- });
6901
- }
6902
- async callTool(name, args, signal) {
6903
- return await this.withSessionRecovery(async () => {
6904
- const client = await this.getClient();
6905
- const mcp = this.plugin.manifest.mcp;
6906
- if (mcp) {
6907
- const url = new URL(mcp.url);
6908
- setSpanAttributes({
6909
- "mcp.method.name": MCP_TOOLS_CALL_METHOD,
6910
- "gen_ai.operation.name": "execute_tool",
6911
- ...this.transport?.sessionId ? { "mcp.session.id": this.transport.sessionId } : void 0,
6912
- ...this.transport?.protocolVersion ? { "mcp.protocol.version": this.transport.protocolVersion } : void 0,
6913
- ...getMcpNetworkAttributes(url)
6914
- });
6915
- }
6916
- const result = await this.wrapAuth(() => client.callTool({
6917
- name,
6918
- arguments: args ?? {}
6919
- }, void 0, signal ? { signal } : void 0), "call_tool");
6920
- await this.syncTransportSessionId();
6921
- return result;
6922
- });
6923
- }
6924
- async close() {
6925
- await this.disposeClient();
6926
- }
6927
- async withSessionRecovery(operation) {
6928
- try {
6929
- return await operation();
6930
- } catch (error) {
6931
- await this.syncTransportSessionId();
6932
- if (!await this.shouldResetMissingSession(error)) throw error;
6933
- await this.clearStoredTransportSessionId();
6934
- await this.cleanupClientAfterFailure();
6935
- return await operation();
6936
- }
6937
- }
6938
- async getClient() {
6939
- if (this.client) return this.client;
6940
- if (this.clientPromise) return await this.clientPromise;
6941
- const clientPromise = this.connectClient();
6942
- this.clientPromise = clientPromise;
6943
- try {
6944
- return await clientPromise;
6945
- } finally {
6946
- if (this.clientPromise === clientPromise) this.clientPromise = void 0;
6947
- }
6948
- }
6949
- async connectClient() {
6950
- const mcp = this.plugin.manifest.mcp;
6951
- if (!mcp) throw new Error(`Plugin "${this.plugin.manifest.name}" does not declare MCP config`);
6952
- const headers = mcp.headers ? resolvePluginHeaderEnvRefs(this.plugin.manifest.name, mcp.headers, "MCP header") : void 0;
6953
- const sessionId = await this.getStoredTransportSessionId();
6954
- this.lastAttemptedTransportSessionId = sessionId;
6955
- const transport = new StreamableHTTPClientTransport(new URL(mcp.url), {
6956
- ...headers ? { requestInit: { headers } } : void 0,
6957
- fetch: fetchWithBoundedOAuthErrorBodies(this.options.fetch, (status) => {
6958
- const store = this.providerStatusStore.getStore();
6959
- if (store) store.status = status;
6960
- }),
6961
- ...this.options.authProvider ? { authProvider: this.options.authProvider } : void 0,
6962
- ...sessionId ? { sessionId } : void 0
6963
- });
6964
- const client = new Client(MCP_CLIENT_INFO, { capabilities: {} });
6965
- this.transport = transport;
6966
- try {
6967
- await this.wrapAuth(() => client.connect(transport), "connect");
6968
- this.client = client;
6969
- await this.syncTransportSessionId();
6970
- return client;
6971
- } catch (error) {
6972
- await this.syncTransportSessionId();
6973
- await this.cleanupClientAfterFailure();
6974
- throw error;
6975
- }
6976
- }
6977
- async wrapAuth(operation, phase) {
6978
- const store = {};
6979
- return await this.providerStatusStore.run(store, async () => {
6980
- try {
6981
- return await operation();
6982
- } catch (error) {
6983
- if (error instanceof McpAuthorizationRequiredError) throw error;
6984
- if (error instanceof UnauthorizedError) throw new McpAuthorizationRequiredError(this.plugin.manifest.name, `MCP authorization required for plugin "${this.plugin.manifest.name}"`);
6985
- throw toMcpProviderError(error, {
6986
- phase,
6987
- provider: this.plugin.manifest.name,
6988
- missingSession: isMissingSessionError(error) || void 0,
6989
- resourceHost: this.resourceHost,
6990
- status: store.status
6991
- });
6992
- }
6993
- });
6994
- }
6995
- async shouldResetMissingSession(error) {
6996
- if (!(error instanceof McpProviderError && error.missingSession || isMissingSessionError(error))) return false;
6997
- return Boolean(this.transport?.sessionId ?? this.lastAttemptedTransportSessionId ?? await this.getStoredTransportSessionId());
6998
- }
6999
- resetClientState() {
7000
- const transport = this.transport;
7001
- this.listedTools = void 0;
7002
- this.transport = void 0;
7003
- this.client = void 0;
7004
- this.clientPromise = void 0;
7005
- return transport;
7006
- }
7007
- async cleanupClientAfterFailure() {
7008
- const transport = this.resetClientState();
7009
- if (!transport) return;
7010
- try {
7011
- await transport.close();
7012
- } catch {}
7013
- }
7014
- async disposeClient() {
7015
- const transport = this.resetClientState();
7016
- if (transport) try {
7017
- await transport.close();
7018
- } catch (error) {
7019
- throw toMcpProviderError(error, {
7020
- phase: "close",
7021
- provider: this.plugin.manifest.name,
7022
- resourceHost: this.resourceHost
7023
- });
7024
- }
7025
- }
7026
- async getStoredTransportSessionId() {
7027
- return await this.options.authProvider?.getMcpServerSessionId?.();
7028
- }
7029
- async clearStoredTransportSessionId() {
7030
- const provider = this.options.authProvider;
7031
- this.lastAttemptedTransportSessionId = void 0;
7032
- await provider?.saveMcpServerSessionId?.(void 0);
7033
- }
7034
- async syncTransportSessionId() {
7035
- const provider = this.options.authProvider;
7036
- const sessionId = this.transport?.sessionId;
7037
- if (!provider?.saveMcpServerSessionId || !sessionId) return;
7038
- this.lastAttemptedTransportSessionId = sessionId;
7039
- await provider.saveMcpServerSessionId(sessionId);
7040
- }
7041
- };
7042
6767
  // src/chat/mcp/tool-manager.ts
7043
6768
  const MAX_TOOL_RESULT_TOKENS = 1e4;
7044
6769
  const MAX_TOOL_RESULT_BYTES = 32768;
@@ -7175,6 +6900,9 @@ var McpToolManager = class {
7175
6900
  activeProviders = /* @__PURE__ */ new Set();
7176
6901
  authorizationPendingProviders = /* @__PURE__ */ new Set();
7177
6902
  clientsByProvider = /* @__PURE__ */ new Map();
6903
+ /** Actor clients for tools that a provider's service account may not call. */
6904
+ actorClientsByProvider = /* @__PURE__ */ new Map();
6905
+ serviceAccountProviders = /* @__PURE__ */ new Set();
7178
6906
  clientPromisesByProvider = /* @__PURE__ */ new Map();
7179
6907
  toolsByProvider = /* @__PURE__ */ new Map();
7180
6908
  options;
@@ -7200,8 +6928,9 @@ var McpToolManager = class {
7200
6928
  if (!plugin?.manifest.mcp) return false;
7201
6929
  try {
7202
6930
  const client = await this.getClient(plugin);
7203
- const tools = this.filterListedTools(plugin, await client.listTools());
7204
- this.assertWrappedToolsAvailable(plugin, tools);
6931
+ const listedTools = this.filterListedTools(plugin, await client.listTools());
6932
+ this.assertWrappedToolsAvailable(plugin, listedTools);
6933
+ const tools = this.filterServiceAccountOnlyTools(plugin, listedTools);
7205
6934
  this.toolsByProvider.set(provider, tools.map((tool) => this.toManagedTool(plugin, client, tool)));
7206
6935
  this.activeProviders.add(provider);
7207
6936
  return true;
@@ -7212,12 +6941,14 @@ var McpToolManager = class {
7212
6941
  }
7213
6942
  async close() {
7214
6943
  let firstError;
7215
- for (const client of this.clientsByProvider.values()) try {
6944
+ for (const client of [...this.clientsByProvider.values(), ...this.actorClientsByProvider.values()]) try {
7216
6945
  await client.close();
7217
6946
  } catch (error) {
7218
6947
  firstError ??= error;
7219
6948
  }
7220
6949
  this.clientsByProvider.clear();
6950
+ this.actorClientsByProvider.clear();
6951
+ this.serviceAccountProviders.clear();
7221
6952
  this.toolsByProvider.clear();
7222
6953
  this.activeProviders.clear();
7223
6954
  this.authorizationPendingProviders.clear();
@@ -7243,6 +6974,14 @@ var McpToolManager = class {
7243
6974
  const missingTools = wrappedTools.filter((toolName) => !availableToolNames.has(toolName));
7244
6975
  if (missingTools.length > 0) throw new Error(`Plugin ${plugin.manifest.name} MCP discovery missing wrapped tools: ${missingTools.join(", ")}`);
7245
6976
  }
6977
+ /**
6978
+ * Hide tools that the service account does not list when no Actor
6979
+ * connection exists to call them.
6980
+ */
6981
+ filterServiceAccountOnlyTools(plugin, tools) {
6982
+ if (!serviceAccountOnly(plugin.manifest)) return tools;
6983
+ return tools.filter((tool) => serviceAccountAllows(plugin.manifest, { tool: tool.name }));
6984
+ }
7246
6985
  async getClient(plugin) {
7247
6986
  const existing = this.clientsByProvider.get(plugin.manifest.name);
7248
6987
  if (existing) return existing;
@@ -7257,13 +6996,30 @@ var McpToolManager = class {
7257
6996
  }
7258
6997
  }
7259
6998
  async createClient(plugin) {
7260
- const authProvider = this.options.authProviderFactory ? await this.options.authProviderFactory(plugin) : void 0;
7261
- const client = new PluginMcpClient(plugin, {
6999
+ const serviceAccount = await this.options.serviceAccountProviderFactory?.(plugin);
7000
+ if (serviceAccount) this.serviceAccountProviders.add(plugin.manifest.name);
7001
+ const client = await this.newClient(plugin, serviceAccount);
7002
+ this.clientsByProvider.set(plugin.manifest.name, client);
7003
+ return client;
7004
+ }
7005
+ async newClient(plugin, serviceAccount) {
7006
+ if (!serviceAccount && serviceAccountOnly(plugin.manifest)) throw new McpServiceAccountRequiredError(plugin.manifest.name, plugin.manifest.displayName);
7007
+ const authProvider = serviceAccount ?? await this.options.authProviderFactory?.(plugin);
7008
+ return new PluginMcpClient(plugin, {
7262
7009
  ...authProvider ? { authProvider } : void 0,
7263
7010
  ...this.options.fetch ? { fetch: this.options.fetch } : void 0
7264
7011
  });
7265
- this.clientsByProvider.set(plugin.manifest.name, client);
7266
- return client;
7012
+ }
7013
+ /** Pick the client for one call: the service account for its tools, else the actor. */
7014
+ async clientForTool(plugin, client, toolName) {
7015
+ const provider = plugin.manifest.name;
7016
+ if (!this.serviceAccountProviders.has(provider) || serviceAccountAllows(plugin.manifest, { tool: toolName })) return client;
7017
+ if (serviceAccountOnly(plugin.manifest)) throw new McpToolError(`${plugin.manifest.displayName} tool ${toolName} is not available: Junior's shared ${plugin.manifest.displayName} account cannot use it`);
7018
+ const existing = this.actorClientsByProvider.get(provider);
7019
+ if (existing) return existing;
7020
+ const actorClient = await this.newClient(plugin);
7021
+ this.actorClientsByProvider.set(provider, actorClient);
7022
+ return actorClient;
7267
7023
  }
7268
7024
  toManagedTool(plugin, client, tool) {
7269
7025
  const outputSchema = toOptionalRecord(tool.outputSchema);
@@ -7299,7 +7055,7 @@ var McpToolManager = class {
7299
7055
  const argumentAttribute = serializeMcpPayload(resolvedArgs, conversationPrivacy, { privateMetadata: true });
7300
7056
  return await withSpan(`execute_tool ${managedToolName}`, "gen_ai.execute_tool", {}, async () => {
7301
7057
  try {
7302
- const result = await client.callTool(tool.name, resolvedArgs, options?.signal);
7058
+ const result = await (await this.clientForTool(plugin, client, tool.name)).callTool(tool.name, resolvedArgs, options?.signal);
7303
7059
  if ("isError" in result && result.isError) throw new McpToolError(extractMcpErrorMessage(result));
7304
7060
  const resultAttribute = serializeMcpPayload(result, conversationPrivacy, { privateMetadata: true });
7305
7061
  if (resultAttribute) setSpanAttributes({ "gen_ai.tool.call.result": resultAttribute });
@@ -7353,13 +7109,23 @@ var McpToolManager = class {
7353
7109
  };
7354
7110
  }
7355
7111
  async handleAuthorizationRequired(provider, error, context) {
7112
+ const plugin = this.pluginsByProvider.get(provider);
7113
+ if (plugin && serviceAccountOnly(plugin.manifest)) {
7114
+ this.forgetProvider(provider);
7115
+ throw new McpServiceAccountRequiredError(provider, plugin.manifest.displayName);
7116
+ }
7356
7117
  if (!this.options.onAuthorizationRequired) return false;
7357
7118
  if (!(await this.options.onAuthorizationRequired(provider, error, context) === true)) return false;
7358
7119
  this.authorizationPendingProviders.add(provider);
7120
+ this.forgetProvider(provider);
7121
+ return true;
7122
+ }
7123
+ forgetProvider(provider) {
7359
7124
  this.clientsByProvider.delete(provider);
7125
+ this.actorClientsByProvider.delete(provider);
7126
+ this.serviceAccountProviders.delete(provider);
7360
7127
  this.toolsByProvider.delete(provider);
7361
7128
  this.activeProviders.delete(provider);
7362
- return true;
7363
7129
  }
7364
7130
  /** Return all active ManagedMcpTool objects, optionally filtered by provider. */
7365
7131
  getResolvedActiveTools(options = {}) {
@@ -16999,6 +16765,13 @@ function createMcpAuthOrchestration(input) {
16999
16765
  authSessionIdsByProvider.set(plugin.manifest.name, provider.authSessionId);
17000
16766
  return provider;
17001
16767
  };
16768
+ const serviceAccountProviderFactory = async (plugin) => {
16769
+ const provider = plugin.manifest.name;
16770
+ if (!plugin.manifest.accounts?.serviceAccount) return;
16771
+ if (!serviceAccountOnly(plugin.manifest) && input.actorId && (await getMcpStoredOAuthCredentials(input.actorId, provider))?.tokens) return;
16772
+ const credentials = await getMcpServiceAccountCredentials(provider);
16773
+ return credentials ? createMcpServiceAccountClientProvider(provider, credentials) : void 0;
16774
+ };
17002
16775
  const onAuthorizationRequired = async (provider, context) => {
17003
16776
  if (botAuthProviders.has(provider)) return false;
17004
16777
  if (pendingPause) return true;
@@ -17079,6 +16852,7 @@ function createMcpAuthOrchestration(input) {
17079
16852
  };
17080
16853
  return {
17081
16854
  authProviderFactory,
16855
+ serviceAccountProviderFactory,
17082
16856
  onAuthorizationRequired,
17083
16857
  getPendingPause: () => pendingPause
17084
16858
  };
@@ -18519,6 +18293,7 @@ async function wireAgentTools(args) {
18519
18293
  });
18520
18294
  const mcpToolManager = new McpToolManager(pluginCatalogRuntime.getMcpProviders(), {
18521
18295
  authProviderFactory: mcpAuth.authProviderFactory,
18296
+ serviceAccountProviderFactory: mcpAuth.serviceAccountProviderFactory,
18522
18297
  onAuthorizationRequired: (provider, _error, context) => mcpAuth.onAuthorizationRequired(provider, context),
18523
18298
  onToolSuccess: async (input) => {
18524
18299
  return await pluginHooks.afterMcpTool({
@@ -18637,7 +18412,11 @@ async function wireAgentTools(args) {
18637
18412
  const pendingMcpProvider = args.state.pendingAuth?.kind === "mcp" ? args.state.pendingAuth.provider : void 0;
18638
18413
  if (credentialUserId) for (const provider of args.connectedMcpProviders) {
18639
18414
  if (provider === pendingMcpProvider) continue;
18640
- if (await mcpToolManager.activateProvider(provider)) await args.recordConnectedMcpProvider(provider);
18415
+ try {
18416
+ if (await mcpToolManager.activateProvider(provider)) await args.recordConnectedMcpProvider(provider);
18417
+ } catch (error) {
18418
+ if (!(error instanceof McpServiceAccountRequiredError)) throw error;
18419
+ }
18641
18420
  if (mcpAuth.getPendingPause()) {
18642
18421
  args.resume.captureHistoryBeforePrompt(args.preAgentPromptMessages());
18643
18422
  throw mcpAuth.getPendingPause();
@@ -20551,7 +20330,7 @@ function createAgentRunner(execute, options) {
20551
20330
  } } : void 0
20552
20331
  };
20553
20332
  if (run.instruction.storedAttachments?.length) {
20554
- const { loadInputImages } = await import("./images-C2J_bj2g.js").then((n) => n.n);
20333
+ const { loadInputImages } = await import("./images-BbSdVHC6.js").then((n) => n.n);
20555
20334
  const storage = nextRun.environment?.attachmentStorage;
20556
20335
  if (!storage) throw new Error("Attachment storage is unavailable.");
20557
20336
  nextRun.instruction = {
@@ -20566,4 +20345,4 @@ function createAgentRunner(execute, options) {
20566
20345
  return await execute(nextRun, streamFn);
20567
20346
  } };
20568
20347
  }
20569
- export { getAgentInvocation as $, resolveSlackChannelIdFromMessage as A, consumeSandboxEgressPermissionDeniedSignal as At, effectiveTaskOutcomes as B, RetryableDeliveryError as Bt, renderBlockText as C, ingestEvent as Ct, storeAttachment as D, SANDBOX_EGRESS_PROXY_PATH as Dt, requestAttachmentDeletion as E, shouldPropagateSandboxEgressTrace as Et, logScheduledAutomationRunSkipped as F, resolveBaseUrl as Ft, recordSubagentStarted as G, shouldEmitDevAgentTrace as Gt, stopChildAgentsOf as H, toolInvocationDestination as Ht, scheduledAutomationRunAttributes as I, startOAuthFlow as It, createAgentInvocation as J, listChildAgents as K, getConfigDefaults as Kt, editEventAutomation as L, createUserTokenStore as Lt, getConversationInfo as M, sandboxEgressSignalsResponseSchema as Mt, listThreadReplies as N, formatProviderLabel as Nt, parseSlackThreadId as O, clearSandboxEgressSignals as Ot, editScheduledAutomation as P, parseOAuthStatePayload as Pt, getActiveAgentInvocationForConversation as Q, AutomationEditError as R, buildSteeringPiMessage as Rt, renderAttachmentText as S, processWorkspaceSnapshotJob as St, readLiveAttachment as T, normalizeSandboxEgressTracePropagationDomains as Tt, stopConversationSession as U, AuthorizationFlowDisabledError as Ut, resolveTaskOutcomes as V, actorFromRun as Vt, recordSubagentEnded as W, readBlockedReport as Wt, createAgentInvocationFromLatest as X, createAgentInvocationForMessage as Y, findChildAgentConversationId as Z, resolvePluginOAuthAccount as _, AgentMessageTargetError as _t, buildAuthPauseResponse as a, getAgentInvocationTurnId as at, unpublishedArtifactHeaders as b, conversationSubtreeColumns as bt, deleteMcpAuthSessionsForUserProvider as c, isTerminalAgentInvocation as ct, getMcpAuthSession as d, markAgentInvocationMailboxAppended as dt, getAgentInvocationIdForEvents as et, getMcpStoredOAuthCredentials as f, markAgentInvocationParentMailboxAppended as ft, readStats as g, reportReplacedAgentInvocation as gt, latestProgressStatus as h, markAgentInvocationSteered as ht, executeCredentialedEgressRequest as i, getAgentInvocationResultMessageId as it, resolveSlackChannelIdFromThreadId as j, parseSandboxEgressCredentialToken as jt, readSlackRawMessageContext as k, consumeSandboxEgressAuthRequiredSignal as kt, deleteMcpServerSessionId as l, listPendingAgentInvocationMailboxAppends as lt, PluginCredentialFailureError as m, markAgentInvocationRunning as mt, executeAgentRun as n, getAgentInvocationIdForResult as nt, finalizeMcpAuthorization as o, getChildAgentLabel as ot, putMcpStoredOAuthCredentials as p, markAgentInvocationPaused as pt, completeAgentInvocation as q, setConfigDefaults as qt, createContextCompactor as r, getAgentInvocationMessageId as rt, deleteMcpAuthSession as s, getLatestAgentInvocationForConversation as st, createAgentRunner as t, getAgentInvocationIdForMessage as tt, deleteMcpStoredOAuthCredentials as u, listPendingAgentInvocationResults as ut, publicArtifactHeaders as v, PARENT_AGENT_TARGET as vt, collectAttachmentGarbage as w, resolveSandboxEgressProviderForHost as wt, lookupSlackUserProfile as x, getMcpProviderErrorAttributes as xt, readPublicArtifact as y, conversationSubtree as yt, eventAutomationTriggerAvailable as z, withoutSavedSteeringMessages as zt };
20348
+ export { getAgentInvocation as $, resolveSlackChannelIdFromMessage as A, parseSandboxEgressCredentialToken as At, effectiveTaskOutcomes as B, actorFromRun as Bt, renderBlockText as C, resolveSandboxEgressProviderForHost as Ct, storeAttachment as D, clearSandboxEgressSignals as Dt, requestAttachmentDeletion as E, SANDBOX_EGRESS_PROXY_PATH as Et, logScheduledAutomationRunSkipped as F, startOAuthFlow as Ft, recordSubagentStarted as G, getConfigDefaults as Gt, stopChildAgentsOf as H, AuthorizationFlowDisabledError as Ht, scheduledAutomationRunAttributes as I, createUserTokenStore as It, createAgentInvocation as J, listChildAgents as K, setConfigDefaults as Kt, editEventAutomation as L, buildSteeringPiMessage as Lt, getConversationInfo as M, formatProviderLabel as Mt, listThreadReplies as N, parseOAuthStatePayload as Nt, parseSlackThreadId as O, consumeSandboxEgressAuthRequiredSignal as Ot, editScheduledAutomation as P, resolveBaseUrl as Pt, getActiveAgentInvocationForConversation as Q, AutomationEditError as R, withoutSavedSteeringMessages as Rt, renderAttachmentText as S, ingestEvent as St, readLiveAttachment as T, shouldPropagateSandboxEgressTrace as Tt, stopConversationSession as U, readBlockedReport as Ut, resolveTaskOutcomes as V, toolInvocationDestination as Vt, recordSubagentEnded as W, shouldEmitDevAgentTrace as Wt, createAgentInvocationFromLatest as X, createAgentInvocationForMessage as Y, findChildAgentConversationId as Z, resolvePluginOAuthAccount as _, AgentMessageTargetError as _t, buildAuthPauseResponse as a, getAgentInvocationTurnId as at, unpublishedArtifactHeaders as b, conversationSubtreeColumns as bt, deleteMcpAuthSessionsForUserProvider as c, isTerminalAgentInvocation as ct, getMcpAuthSession as d, markAgentInvocationMailboxAppended as dt, getAgentInvocationIdForEvents as et, getMcpStoredOAuthCredentials as f, markAgentInvocationParentMailboxAppended as ft, readStats as g, reportReplacedAgentInvocation as gt, latestProgressStatus as h, markAgentInvocationSteered as ht, executeCredentialedEgressRequest as i, getAgentInvocationResultMessageId as it, resolveSlackChannelIdFromThreadId as j, sandboxEgressSignalsResponseSchema as jt, readSlackRawMessageContext as k, consumeSandboxEgressPermissionDeniedSignal as kt, deleteMcpServerSessionId as l, listPendingAgentInvocationMailboxAppends as lt, PluginCredentialFailureError as m, markAgentInvocationRunning as mt, executeAgentRun as n, getAgentInvocationIdForResult as nt, finalizeMcpAuthorization as o, getChildAgentLabel as ot, putMcpStoredOAuthCredentials as p, markAgentInvocationPaused as pt, completeAgentInvocation as q, createContextCompactor as r, getAgentInvocationMessageId as rt, deleteMcpAuthSession as s, getLatestAgentInvocationForConversation as st, createAgentRunner as t, getAgentInvocationIdForMessage as tt, deleteMcpStoredOAuthCredentials as u, listPendingAgentInvocationResults as ut, publicArtifactHeaders as v, PARENT_AGENT_TARGET as vt, collectAttachmentGarbage as w, normalizeSandboxEgressTracePropagationDomains as wt, lookupSlackUserProfile as x, processWorkspaceSnapshotJob as xt, readPublicArtifact as y, conversationSubtree as yt, eventAutomationTriggerAvailable as z, RetryableDeliveryError as zt };
@@ -3572,6 +3572,35 @@ export declare const startConnectionResponseSchema: z.ZodObject<{
3572
3572
  export declare const disconnectConnectionResponseSchema: z.ZodObject<{
3573
3573
  disconnected: z.ZodLiteral<true>;
3574
3574
  }, z.core.$strict>;
3575
+ export declare const serviceAccountSchema: z.ZodObject<{
3576
+ provider: z.ZodString;
3577
+ displayName: z.ZodString;
3578
+ userOAuth: z.ZodBoolean;
3579
+ tools: z.ZodArray<z.ZodString>;
3580
+ connected: z.ZodBoolean;
3581
+ connectedAt: z.ZodOptional<z.ZodString>;
3582
+ connectedBy: z.ZodOptional<z.ZodString>;
3583
+ }, z.core.$strict>;
3584
+ export declare const serviceAccountListSchema: z.ZodObject<{
3585
+ serviceAccounts: z.ZodArray<z.ZodObject<{
3586
+ provider: z.ZodString;
3587
+ displayName: z.ZodString;
3588
+ userOAuth: z.ZodBoolean;
3589
+ tools: z.ZodArray<z.ZodString>;
3590
+ connected: z.ZodBoolean;
3591
+ connectedAt: z.ZodOptional<z.ZodString>;
3592
+ connectedBy: z.ZodOptional<z.ZodString>;
3593
+ }, z.core.$strict>>;
3594
+ }, z.core.$strict>;
3595
+ export declare const serviceAccountParamsSchema: z.ZodObject<{
3596
+ provider: z.ZodString;
3597
+ }, z.core.$strict>;
3598
+ export declare const startServiceAccountSignInResponseSchema: z.ZodObject<{
3599
+ authorizationUrl: z.ZodString;
3600
+ }, z.core.$strict>;
3601
+ export declare const disconnectServiceAccountResponseSchema: z.ZodObject<{
3602
+ disconnected: z.ZodLiteral<true>;
3603
+ }, z.core.$strict>;
3575
3604
  export declare const personalTokenMetadataSchema: z.ZodObject<{
3576
3605
  id: z.ZodString;
3577
3606
  name: z.ZodString;
@@ -2,5 +2,5 @@ import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureC
2
2
  import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, I as INPUT_IMAGE_TYPES, K as messageCardText, M as conversationChildAgentTotalsSchema, N as MAX_INPUT_IMAGES, O as createConversationBodySchema, P as MAX_INPUT_IMAGE_BYTES, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, Y as resolveMessageCards, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-DjN3mlog.js";
3
3
  import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-DWBFBenG.js";
4
4
  import { C as skillReportsSchema, S as skillReportSchema, _ as pluginPackageContentItemReportSchema, b as pluginsSchema, g as pluginOperationalReportSchema, h as pluginOperationalReportFeedSchema, m as healthReportSchema, t as webMessageId, v as pluginPackageContentReportSchema, x as runtimeInfoReportSchema, y as pluginSchema } from "../web-message-id-CJSUiksE.js";
5
- import { A as connectionSchema, B as codeRepositorySummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeChangeSummarySchema, H as conversationChildAgentsReportSchema, I as codeOverviewReportSchema, L as codePersonReportSchema, M as startConnectionResponseSchema, N as codeActivityDaySchema, O as connectionListSchema, P as codeChangeSummaryReportSchema, R as codeRepositoryParamsSchema, S as locationDirectoryReportSchema, U as stopConversationTurnResponseSchema, V as conversationChildAgentSchema, W as apiErrorSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as disconnectConnectionResponseSchema, k as connectionParamsSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema, z as codeRepositoryReportSchema } from "../schema-DrMh3NtR.js";
6
- export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, statSchema, statsReportSchema, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
5
+ import { B as codeChangeSummarySchema, C as personParamsSchema, D as locationDirectoryReportSchema, E as locationDetailReportSchema, F as connectionSchema, G as codeRepositorySummarySchema, H as codePersonReportSchema, I as disconnectConnectionResponseSchema, J as stopConversationTurnResponseSchema, K as conversationChildAgentSchema, L as startConnectionResponseSchema, M as dailyConversationActivitySchema, N as connectionListSchema, O as locationParamsSchema, P as connectionParamsSchema, R as codeActivityDaySchema, S as actorProfileReportSchema, T as locationActivityDayReportSchema, U as codeRepositoryParamsSchema, V as codeOverviewReportSchema, W as codeRepositoryReportSchema, Y as apiErrorSchema, _ as personalTokenListSchema, a as workspaceBodySchema, b as revokePersonalTokenResponseSchema, c as workspaceRepoSchema, d as serviceAccountListSchema, f as serviceAccountParamsSchema, g as createdPersonalTokenSchema, h as createPersonalTokenBodySchema, i as deleteWorkspaceResponseSchema, l as workspaceSchema, m as startServiceAccountSignInResponseSchema, n as statsReportSchema, o as workspaceListSchema, p as serviceAccountSchema, q as conversationChildAgentsReportSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as disconnectServiceAccountResponseSchema, v as personalTokenMetadataSchema, w as personalSpendReportSchema, x as actorDirectoryReportSchema, y as personalTokenParamsSchema, z as codeChangeSummaryReportSchema } from "../schema-CF9HqNRY.js";
6
+ export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, connectionListSchema, connectionParamsSchema, connectionSchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationChildAgentSchema, conversationChildAgentTotalsSchema, conversationChildAgentsReportSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, disconnectConnectionResponseSchema, disconnectServiceAccountResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, serviceAccountListSchema, serviceAccountParamsSchema, serviceAccountSchema, skillReportSchema, skillReportsSchema, startConnectionResponseSchema, startServiceAccountSignInResponseSchema, statSchema, statsReportSchema, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };