@sentry/junior 0.304.0 → 0.305.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.
- package/dist/{adapter-context-B1IpoELr.js → adapter-context-BpvbUki8.js} +2 -2
- package/dist/{admin-BnVFGo_z.js → admin-CoDt35ny.js} +2 -2
- package/dist/{agent-runner-CoEeZSRh.js → agent-runner-C5d6rY5g.js} +75 -38
- package/dist/api.js +28 -28
- package/dist/app.js +38 -47
- package/dist/{background-compaction-queue-WLPNSF_b.js → background-compaction-queue-BTqMIfTA.js} +7 -3
- package/dist/{briefs-CagVVefw.js → briefs-BRdznF7c.js} +2 -2
- package/dist/{catalog-runtime-B8ZXvXWm.js → catalog-runtime-J52Tej47.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-DdO1BNcw.js → config-CBZp0udd.js} +2 -2
- package/dist/{connections-D20kp0j5.js → connections-BYmuJ6Vm.js} +6 -6
- package/dist/{continue-in-slack-BKEVMBj1.js → continue-in-slack-Cvot6S38.js} +5 -5
- package/dist/{conversation-privacy-L1SK_v0V.js → conversation-privacy-D2pOzBNl.js} +1 -1
- package/dist/{conversation-turn-BptVJylj.js → conversation-turn-CI8WDpnK.js} +15 -15
- package/dist/{credential-sync-D1J1CGzL.js → credential-sync-COqnZ1Dx.js} +13 -13
- package/dist/{db-EKJnkrIb.js → db-DU84dCVu.js} +3 -3
- package/dist/{executor-CoIZmFK8.js → executor-CFyrgOu1.js} +2 -2
- package/dist/{install-BT2Pf6HP.js → install-CQ76CfRw.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-C5DGQCS_.js → lineage-DLd2UxVP.js} +2 -2
- package/dist/{logging-QSZuMcvo.js → logging-BPNTQVFu.js} +1 -1
- package/dist/{message-TtxftRHj.js → message-BWJLeQ5e.js} +8 -8
- package/dist/{model-input-BHXfA29g.js → model-input-DoM9Ht-d.js} +2 -2
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-B0enqHtZ.js → oauth-callback-server-DeHbnAQl.js} +2 -2
- package/dist/{projection-CNKK7doO.js → projection-CcFBVFUo.js} +15 -12
- package/dist/{prompt-DSjhoKu5.js → prompt-C5LREK2p.js} +3 -3
- package/dist/{queue-CDxkit82.js → queue-B2AAL3ym.js} +4 -4
- package/dist/{registry-DBDNUUmz.js → registry-BjZZqKqi.js} +1 -1
- package/dist/{resolve-CQLhMWSu.js → resolve-CeJgXuH1.js} +3 -3
- package/dist/{result-B-pauj42.js → result-icDrueyB.js} +8 -8
- package/dist/{runner-B3KxKks5.js → runner-nVfMkMMB.js} +8 -8
- package/dist/{sandbox-egress-signals-DJJX9ClG.js → sandbox-egress-signals-H9vQ5qRf.js} +1 -1
- package/dist/{service-account-2HmlNPvy.js → service-account-DU5865XA.js} +5 -5
- package/dist/{service-account-DQLqkSVv.js → service-account-Dw06p3zm.js} +3 -3
- package/dist/{session-stop-DEeZKqbX.js → session-stop-uotLtp4g.js} +79 -22
- package/dist/{skills-2UrD7JkN.js → skills-Bex1EaO5.js} +2 -2
- package/dist/{slack-conversation-unfurl-Dd129Uov.js → slack-conversation-unfurl-EPG3riWF.js} +9 -9
- package/dist/{spawn-eMho9HDJ.js → spawn-CoD3vDuS.js} +6 -6
- package/dist/{state-Bveuc4Zh.js → state-nCR4Muhn.js} +4 -4
- package/dist/{stop-D_ltJLDS.js → stop-BFVd0P0m.js} +29 -30
- package/dist/{store-COeYnPL_.js → store-Ca6G962n.js} +5 -5
- package/dist/{task-queue-CBIDXZpV.js → task-queue-BLPZU6kC.js} +3 -3
- package/dist/{task-runner-CJF7zIJL.js → task-runner-xsOPIxCZ.js} +6 -6
- package/dist/{thread-context-Cg0jt0aE.js → thread-context-BOvZhsKK.js} +7 -7
- package/dist/{turn-session-routing-CaY3Tp8m.js → turn-session-routing-2bW2qfeb.js} +7 -7
- package/dist/{turn-user-message-tcom1RYd.js → turn-user-message-BrhuyYrH.js} +3 -3
- package/dist/{validation-EU91JwIT.js → validation-BnY9K5WB.js} +1 -1
- package/dist/{version-BYRPhY5G.js → version-qROlRQGF.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-Cf8ISkAc.js → viewer-CxUiOraX.js} +3 -3
- package/dist/{warmup-TgY4S1vx.js → warmup--Gkz7iB-.js} +21 -24
- package/dist/{worker-C6Uq4OKD.js → worker-DJ8d9fmD.js} +7 -7
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ls as runWithSlackInstallationToken } from "./projection-
|
|
2
|
-
import { X as getStateAdapter } from "./db-
|
|
1
|
+
import { ls as runWithSlackInstallationToken } from "./projection-CcFBVFUo.js";
|
|
2
|
+
import { X as getStateAdapter } from "./db-DU84dCVu.js";
|
|
3
3
|
// src/chat/slack/adapter-context.ts
|
|
4
4
|
const initializedAdapters = /* @__PURE__ */ new WeakSet();
|
|
5
5
|
async function getConnectedState(stateAdapter) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as getDb } from "./db-
|
|
2
|
-
import { r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-
|
|
1
|
+
import { o as getDb } from "./db-DU84dCVu.js";
|
|
2
|
+
import { r as listAdminUsersFromSql, u as setUserAdminFromSql } from "./viewer-CxUiOraX.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
// src/cli/admin.ts
|
|
5
5
|
/**
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { $ as loadTurnCheckpoint, $o as storeDeferredAttachment, $t as TurnSliceLimitExceededError, Aa as updateSlackMessage, An as isStandaloneRuntimeContextMessage, B as getAgentContextInputLimitTokens, Ba as isWorkspaceSnapshotNotReadyError, Bn as TURN_CONTEXT_TAG, Cn as getTerminalAssistantMessages, Da as postSlackMessage, Ds as credentialAuditAttributes, En as hasTurnInput, Fa as isAlreadyExistsError, Fn as stripRuntimeTurnContext, Fs as getConfigDefaults, G as AuthPausePersistenceError, Ga as createSandboxEgressCredentialToken, H as PluginCredentialFailureError, Ha as clearSandboxEgressSignals, Ia as throwSandboxOperationError, In as trimTrailingAssistantMessages, J as abandonReplacedPendingAuth, Ja as buildSandboxEgressNetworkPolicy, Jo as readLiveAttachment, K as AuthorizationFlowDisabledError, L as calculateContextCompactionTargetTokens, La as wrapSandboxSetupError, Ln as CAPABILITY_SECTION_TAG, Mn as isToolResultMessage, Mr as getReviewItem, Ms as historyItemFromPiMessage, Ni as getDashboardReviewItemLink, Nn as normalizeToolNameFromResult, Ns as piMessageFromHistoryItem, On as isAssistantMessage, Os as credentialAuditSource, Pn as retainRuntimeTurnContext, Ps as projectConversationEvents, Q as continuableMessages, Qa as tryWorkspaceRepoCheckoutPath, Qo as storeAttachments, Qt as TurnBudgetExceededError, R as getAgentBackgroundCompactionMarkTokens, Rn as REQUEST_CONTEXT_SECTION_TAG, Sa as deleteSlackMessage, Sn as getPiMessageRole, T as resolveTaskTitle, U as createPluginAuthOrchestration, Ua as consumeSandboxEgressAuthRequiredSignal, Un as readParentAgentTask, Uo as readSlackAttachmentSource, V as createPluginEgress, Va as workspaceSnapshotNotReadyUserMessage, Vi as renderToolResultNudge, W as authorizationId, Wa as consumeSandboxEgressPermissionDeniedSignal, Wi as getWorkspace, Xt as GATED_TURN_LIMIT_WRAP_UP_MESSAGE, Y as canReusePendingAuthLink, Ya as resolveSandboxCommandEnvironment, Yn as createUserTokenStore, Za as SANDBOX_RUNTIME, Zt as TURN_LIMIT_WRAP_UP_MESSAGE, _n as CODE_MODE_CALL_STATUS_TEXT, ai as resolveChannelCapabilities, an as isAnswerToolName, ao as SANDBOX_COMMAND_PATH, as as isConversationScopedChannel, c as recordAgentsInstructionsUpdated, ca as formatProviderLabel, co as SANDBOX_SKILLS_ROOT, dn as sanitizeAssistantText, do as sandboxSkillFile, en as TurnToolCallLimitExceededError, eo as ToolInputError, es as SlackActionError, f as recordAuthorizationRequested, fn as NO_REPLY_TOOL_NAME, fo as sandboxSkillPathResolution, fs as sleep, g as recordToolExecutionStarted, gn as CODEMODE_TOOL_NAME, ha as normalizeSlackReplyMarkdown, hn as readNoReply, ho as runNonInteractiveCommand, hs as AttachmentSourceUnavailableError, i as loadConversationProjection, ia as getSandboxProvider, in as REPLY_TOOL_NAME, ja as uploadFilesToConversation, jn as isToolResultError, kn as isContinuablePiBoundary, l as recordAttachmentsDelivered, ln as decideReply, lo as SANDBOX_WORKSPACE_ROOT, m as recordMcpProviderConnected, mn as isLegacyNoReplyMarker, mo as buildNonInteractiveShellScript, nn as createTurnLimitGate, no as PluginToolDeniedError, nt as saveTurnCheckpoint, oi as getSlackToolContext, on as readTurnAnswer, oo as SANDBOX_DATA_ROOT, or as getPluginTools, p as recordGuardianActionReviewed, pa as escapeSlackMrkdwnText, po as buildCommandScript, q as AuthorizationPauseError, r as loadConnectedMcpProviders, ra as ensureDockerDaemon, rn as isTurnExecutionLimitExceededError, sa as deliverOAuthAuthorization, sn as remindMissingAnswer, ta as hash, to as isToolInputError, tr as createPluginHookRunner, ua as resolveBaseUrl, un as getAssistantReplyText, uo as sandboxSkillDir, vn as REPORT_BLOCKED_TOOL_NAME, vs as createConversationEmbedder, wn as getUserMessageInstructionText, ws as resolveUserTimezone, xa as addReactionToMessage, xn as extractAssistantText, yn as readBlockedReport, z as getAgentContextCompactionTriggerTokens, za as getWorkspaceSnapshotNotReadyError } from "./projection-
|
|
2
|
-
import { $ as bufferBody, B as unwrapCurrentInstruction, F as textCharsForTokens, G as createProviderError, H as escapeXmlText, I as COMPACTION_SUMMARY_PREFIX, K as findProviderError, L as hasCompactedConversationContext, M as estimateMessagesTokens, N as estimateRequestOverheadTokens, P as estimateTextTokens, R as isCompactionSummaryText, U as ProviderError, V as escapeXml, W as createAssistantProviderError, X as isProviderRetryError, Y as isProviderRefusal, Z as getGatewayApiKey, b as GEN_AI_PROVIDER_NAME, j as requestPrefixAttributes, k as resolveGatewayModel, n as botConfig, q as getProviderErrorAttributes, v as toPiReasoningLevel, x as GEN_AI_SERVER_ADDRESS, y as normalizeSlackEmojiName } from "./config-
|
|
3
|
-
import { C as summarizeMessageText, E as withSpan, H as runWithLogAttributes, S as setTags, T as withLogContext, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, d as logAudit, f as logError, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, l as getLogContextAttributesForSpan, m as logInfo, p as logException, u as getTracePropagationHeaders, v as serializeGenAiAttribute, x as setSpanStatus } from "./logging-
|
|
1
|
+
import { $ as loadTurnCheckpoint, $o as storeDeferredAttachment, $t as TurnSliceLimitExceededError, Aa as updateSlackMessage, An as isStandaloneRuntimeContextMessage, B as getAgentContextInputLimitTokens, Ba as isWorkspaceSnapshotNotReadyError, Bn as TURN_CONTEXT_TAG, Cn as getTerminalAssistantMessages, Da as postSlackMessage, Ds as credentialAuditAttributes, En as hasTurnInput, Fa as isAlreadyExistsError, Fn as stripRuntimeTurnContext, Fs as getConfigDefaults, G as AuthPausePersistenceError, Ga as createSandboxEgressCredentialToken, H as PluginCredentialFailureError, Ha as clearSandboxEgressSignals, Ia as throwSandboxOperationError, In as trimTrailingAssistantMessages, J as abandonReplacedPendingAuth, Ja as buildSandboxEgressNetworkPolicy, Jo as readLiveAttachment, K as AuthorizationFlowDisabledError, L as calculateContextCompactionTargetTokens, La as wrapSandboxSetupError, Ln as CAPABILITY_SECTION_TAG, Mn as isToolResultMessage, Mr as getReviewItem, Ms as historyItemFromPiMessage, Ni as getDashboardReviewItemLink, Nn as normalizeToolNameFromResult, Ns as piMessageFromHistoryItem, On as isAssistantMessage, Os as credentialAuditSource, Pn as retainRuntimeTurnContext, Ps as projectConversationEvents, Q as continuableMessages, Qa as tryWorkspaceRepoCheckoutPath, Qo as storeAttachments, Qt as TurnBudgetExceededError, R as getAgentBackgroundCompactionMarkTokens, Rn as REQUEST_CONTEXT_SECTION_TAG, Sa as deleteSlackMessage, Sn as getPiMessageRole, T as resolveTaskTitle, U as createPluginAuthOrchestration, Ua as consumeSandboxEgressAuthRequiredSignal, Un as readParentAgentTask, Uo as readSlackAttachmentSource, V as createPluginEgress, Va as workspaceSnapshotNotReadyUserMessage, Vi as renderToolResultNudge, W as authorizationId, Wa as consumeSandboxEgressPermissionDeniedSignal, Wi as getWorkspace, Xt as GATED_TURN_LIMIT_WRAP_UP_MESSAGE, Y as canReusePendingAuthLink, Ya as resolveSandboxCommandEnvironment, Yn as createUserTokenStore, Za as SANDBOX_RUNTIME, Zt as TURN_LIMIT_WRAP_UP_MESSAGE, _n as CODE_MODE_CALL_STATUS_TEXT, ai as resolveChannelCapabilities, an as isAnswerToolName, ao as SANDBOX_COMMAND_PATH, as as isConversationScopedChannel, c as recordAgentsInstructionsUpdated, ca as formatProviderLabel, co as SANDBOX_SKILLS_ROOT, dn as sanitizeAssistantText, do as sandboxSkillFile, en as TurnToolCallLimitExceededError, eo as ToolInputError, es as SlackActionError, f as recordAuthorizationRequested, fn as NO_REPLY_TOOL_NAME, fo as sandboxSkillPathResolution, fs as sleep, g as recordToolExecutionStarted, gn as CODEMODE_TOOL_NAME, ha as normalizeSlackReplyMarkdown, hn as readNoReply, ho as runNonInteractiveCommand, hs as AttachmentSourceUnavailableError, i as loadConversationProjection, ia as getSandboxProvider, in as REPLY_TOOL_NAME, ja as uploadFilesToConversation, jn as isToolResultError, kn as isContinuablePiBoundary, l as recordAttachmentsDelivered, ln as decideReply, lo as SANDBOX_WORKSPACE_ROOT, m as recordMcpProviderConnected, mn as isLegacyNoReplyMarker, mo as buildNonInteractiveShellScript, nn as createTurnLimitGate, no as PluginToolDeniedError, nt as saveTurnCheckpoint, oi as getSlackToolContext, on as readTurnAnswer, oo as SANDBOX_DATA_ROOT, or as getPluginTools, p as recordGuardianActionReviewed, pa as escapeSlackMrkdwnText, po as buildCommandScript, q as AuthorizationPauseError, r as loadConnectedMcpProviders, ra as ensureDockerDaemon, rn as isTurnExecutionLimitExceededError, sa as deliverOAuthAuthorization, sn as remindMissingAnswer, ta as hash, to as isToolInputError, tr as createPluginHookRunner, ua as resolveBaseUrl, un as getAssistantReplyText, uo as sandboxSkillDir, vn as REPORT_BLOCKED_TOOL_NAME, vs as createConversationEmbedder, wn as getUserMessageInstructionText, ws as resolveUserTimezone, xa as addReactionToMessage, xn as extractAssistantText, yn as readBlockedReport, z as getAgentContextCompactionTriggerTokens, za as getWorkspaceSnapshotNotReadyError } from "./projection-CcFBVFUo.js";
|
|
2
|
+
import { $ as bufferBody, B as unwrapCurrentInstruction, F as textCharsForTokens, G as createProviderError, H as escapeXmlText, I as COMPACTION_SUMMARY_PREFIX, K as findProviderError, L as hasCompactedConversationContext, M as estimateMessagesTokens, N as estimateRequestOverheadTokens, P as estimateTextTokens, R as isCompactionSummaryText, U as ProviderError, V as escapeXml, W as createAssistantProviderError, X as isProviderRetryError, Y as isProviderRefusal, Z as getGatewayApiKey, b as GEN_AI_PROVIDER_NAME, j as requestPrefixAttributes, k as resolveGatewayModel, n as botConfig, q as getProviderErrorAttributes, v as toPiReasoningLevel, x as GEN_AI_SERVER_ADDRESS, y as normalizeSlackEmojiName } from "./config-CBZp0udd.js";
|
|
3
|
+
import { C as summarizeMessageText, E as withSpan, H as runWithLogAttributes, S as setTags, T as withLogContext, _ as runBestEffort, a as extractGenAiUsageSummary, b as setSpanAttributes, d as logAudit, f as logError, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, l as getLogContextAttributesForSpan, m as logInfo, p as logException, u as getTracePropagationHeaders, v as serializeGenAiAttribute, x as setSpanStatus } from "./logging-BPNTQVFu.js";
|
|
4
4
|
import { g as withActiveSpan, i as getActiveSpan, m as startInactiveSpan } from "./sentry-CPbZjomA.js";
|
|
5
|
-
import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
5
|
+
import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-D2pOzBNl.js";
|
|
6
6
|
import { f as parseSlackTeamId, n as createSlackActor, o as isUserActor, p as parseSlackUserId, v as parseSlackMessageTs } from "./actor-D2iXzvlN.js";
|
|
7
|
-
import { T as isPersonInput, X as getStateAdapter, a as getConversationStore, k as turnBehavior, nt as withLock, o as getDb, ot as addAgentTurnUsage, r as getConversationEventStore, s as getSqlExecutor, st as agentTurnCostUsd, ut as hasAgentTurnUsage, yt as sameDestination } from "./db-
|
|
8
|
-
import { L as juniorArtifacts, c as juniorReviewItemSlackCards, u as juniorAutomationRuns } from "./executor-
|
|
7
|
+
import { T as isPersonInput, X as getStateAdapter, a as getConversationStore, k as turnBehavior, nt as withLock, o as getDb, ot as addAgentTurnUsage, r as getConversationEventStore, s as getSqlExecutor, st as agentTurnCostUsd, ut as hasAgentTurnUsage, yt as sameDestination } from "./db-DU84dCVu.js";
|
|
8
|
+
import { L as juniorArtifacts, c as juniorReviewItemSlackCards, u as juniorAutomationRuns } from "./executor-CFyrgOu1.js";
|
|
9
9
|
import { d as contextProvenance, f as instructionActors, m as sameActorIdentity, p as instructionProvenanceFor } from "./history-m2-ceTTX.js";
|
|
10
10
|
import { a as listReferenceFiles } from "./package-discovery-x4AvVhMj.js";
|
|
11
|
-
import { c as fetchWithBoundedOAuthErrorBodies, d as actorLogContext, g as credentialUserSubjectId, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, s as OAuthProviderError } from "./registry-
|
|
12
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
13
|
-
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-
|
|
14
|
-
import { C as McpProviderError, D as getMcpAwareTelemetryMessage, E as getMcpAwareErrorType, O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, T as McpToolError, _ as getMcpServerSessionId, a as serviceAccountOnly, b as putMcpAuthSession, c as createMcpServiceAccountClientProvider, d as PluginMcpClient, f as deleteMcpAuthSession, g as getMcpAuthSession, i as serviceAccountAllows, k as toMcpProviderError, l as getMcpServiceAccountCredentials, m as deleteMcpServerSessionId, u as McpAuthorizationRequiredError, v as getMcpStoredOAuthCredentials, w as McpServiceAccountRequiredError, x as putMcpServerSessionId, y as patchMcpAuthSession } from "./service-account-
|
|
15
|
-
import { f as generateImages, h as NoAudioError, l as completeObject, m as transcribeFromUrl, u as completeText } from "./prompt-
|
|
16
|
-
import { a as readActorIdentityFromSql, i as readActorIdentity } from "./viewer-
|
|
11
|
+
import { c as fetchWithBoundedOAuthErrorBodies, d as actorLogContext, g as credentialUserSubjectId, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, s as OAuthProviderError } from "./registry-BjZZqKqi.js";
|
|
12
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-J52Tej47.js";
|
|
13
|
+
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-Bex1EaO5.js";
|
|
14
|
+
import { C as McpProviderError, D as getMcpAwareTelemetryMessage, E as getMcpAwareErrorType, O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, T as McpToolError, _ as getMcpServerSessionId, a as serviceAccountOnly, b as putMcpAuthSession, c as createMcpServiceAccountClientProvider, d as PluginMcpClient, f as deleteMcpAuthSession, g as getMcpAuthSession, i as serviceAccountAllows, k as toMcpProviderError, l as getMcpServiceAccountCredentials, m as deleteMcpServerSessionId, u as McpAuthorizationRequiredError, v as getMcpStoredOAuthCredentials, w as McpServiceAccountRequiredError, x as putMcpServerSessionId, y as patchMcpAuthSession } from "./service-account-DU5865XA.js";
|
|
15
|
+
import { f as generateImages, h as NoAudioError, l as completeObject, m as transcribeFromUrl, u as completeText } from "./prompt-C5LREK2p.js";
|
|
16
|
+
import { a as readActorIdentityFromSql, i as readActorIdentity } from "./viewer-CxUiOraX.js";
|
|
17
17
|
import { W as MAX_ATTACHMENT_BYTES } from "./conversation-BOqdRtUx.js";
|
|
18
|
-
import { Q as
|
|
19
|
-
import { $ as createBashTool, $n as createSlackPublicSearchTool, $r as requireToolCreator, A as createWebSearchTool, Ar as createSearchAutomationsTool, B as createSystemTimeTool, Br as automationTriggerChangesSchema, C as incrementStat, Ci as missingAutomationSkillReason, Cr as createSlackCanvasEditTool, D as requireReadyWorkspaceSnapshot, Dr as resolveWorkspacePath, Ei as resolveTaskOutcomes, Er as positiveInteger, F as userLookupIdentityProviders, Fr as zodToolDefinition, Ft as createRunOperatorSqlTool, G as createWriteFileTool, Gr as injectContinuationToolName, H as createSearchEventTypesTool, Hr as editedAutomationTask, Ir as automationIdForToolCall, It as createListWatchesTool, J as sliceFileContent, Jr as getConversationAccess, K as createReadFileTool, Kr as juniorToolOutputSchema, Lr as automationSkillToolSchema, M as createWatchTimerTool, Mr as createDeleteAutomationTool, N as createWatchEventsTool, Nr as AUTOMATIONS_TOOL_SOURCE, O as prepareWorkspaceSnapshot, Or as createOperationKey, P as createUserLookupTool, Pr as zodTool, Pt as createReadConversationEventTool, Q as editFile, Qr as requireToolCaller, R as createUpdateUserCustomizationTool, Rr as automationToolResult, S as createWorkspaceTools, Sr as createSlackCanvasReadTool, T as ensureWorkspaceSnapshotBuild, Ti as moveTaskOutcomes, Tr as isMissingPathError, U as createSearchConversationEventsTool, Ur as newAutomationTask, V as createStopWatchingResourcesTool, Vr as automationTriggerSchema, W as createSearchConversationsTool, Wn as createSetConversationSubscriptionTool, Wr as triggerKind, X as capToolResult, Xr as automationToolsDisabledReason, Y as TOOL_RESULT_MAX_CHARS, Yn as createSlackThreadReadTool, Yr as automationToolContext, Z as createEditFileTool, Zr as requireToolAutomation, _i as changedEventMatch, _t as createUpdateReviewItemTool, a as createCacheWarmingRecorder, ar as createSlackConversationSearchChannelPort, at as createReportBlockedTool, b as coreToolSlots, ct as createMessageAgentTool, dr as resolveSlackChannelRef, ei as requireToolDestination, er as createSlackListUpdateItemTool, et as createUpdatePlanTool, fr as slackChannelRefParam, gi as editEventAutomation, gt as createSearchReviewItemsTool, hi as editScheduledAutomation, ht as createAddReviewItemTool, in as isParentMessageMeta, ir as createSlackConversationMessageSearchTool, it as createReportProgressTool, j as createWebFetchTool, jr as createRunAutomationNowTool, kr as createCanvas, lt as createArchiveAgentTool, mr as joinPublicChannelForRead, ni as automationEditor, nr as createSlackListCreateTool, nt as createSpawnAgentTool, or as createSlackChannelListMessagesTool, ot as createReplyTool, pr as checkSlackChannelReadAccess, q as missingFileResult, qr as makeStructuredToolOutput, qt as listAgentInvocationsForConversation, ri as changeAutomationLifecycle, rr as createSlackListAddItemsTool, rt as createListAgentsTool, st as createNoReplyTool, tr as createSlackListGetItemsTool, tt as createStopAgentTool, ur as createSlackChannelJoinTool, vi as requireEventAutomationTrigger, wr as SLACK_TOOL_SOURCE, x as enabledMode, xi as requireAutomationSkill, xr as createSlackCanvasWriteTool, yi as requireAutomationTaskText, z as createSubmitFeedbackTool, zr as automationToolResultSchema } from "./warmup
|
|
18
|
+
import { Q as getEventCatalog, R as resolveSlackReplyTarget, St as writeAgentHistory, _t as showsAgentsInstructions, bt as readAgentHistory, d as buildPromptInput, dt as AGENTS_REMOVAL_NOTICE, et as requireSlackChannelMessageScope, f as buildSteeringPiMessage, ft as AGENTS_REPLACEMENT_NOTICE, gt as renderAgentsInstructions, h as loadPromptTurnContext, ht as readRepositoryInstructions, it as slackChannelMessageTrigger, mt as findVisibleAgentsInstructions, pt as buildAgentsInstructionsMessage, u as assemblePrompt, ut as JUNIOR_PERSONALITY, vt as foldLeadingSystemMessages, xt as withAgentRequest, yt as foldSystemMessages } from "./session-stop-uotLtp4g.js";
|
|
19
|
+
import { $ as createBashTool, $n as createSlackPublicSearchTool, $r as requireToolCreator, A as createWebSearchTool, Ar as createSearchAutomationsTool, B as createSystemTimeTool, Br as automationTriggerChangesSchema, C as incrementStat, Ci as missingAutomationSkillReason, Cr as createSlackCanvasEditTool, D as requireReadyWorkspaceSnapshot, Dr as resolveWorkspacePath, Ei as resolveTaskOutcomes, Er as positiveInteger, F as userLookupIdentityProviders, Fr as zodToolDefinition, Ft as createRunOperatorSqlTool, G as createWriteFileTool, Gr as injectContinuationToolName, H as createSearchEventTypesTool, Hr as editedAutomationTask, Ir as automationIdForToolCall, It as createListWatchesTool, J as sliceFileContent, Jr as getConversationAccess, K as createReadFileTool, Kr as juniorToolOutputSchema, Lr as automationSkillToolSchema, M as createWatchTimerTool, Mr as createDeleteAutomationTool, N as createWatchEventsTool, Nr as AUTOMATIONS_TOOL_SOURCE, O as prepareWorkspaceSnapshot, Or as createOperationKey, P as createUserLookupTool, Pr as zodTool, Pt as createReadConversationEventTool, Q as editFile, Qr as requireToolCaller, R as createUpdateUserCustomizationTool, Rr as automationToolResult, S as createWorkspaceTools, Sr as createSlackCanvasReadTool, T as ensureWorkspaceSnapshotBuild, Ti as moveTaskOutcomes, Tr as isMissingPathError, U as createSearchConversationEventsTool, Ur as newAutomationTask, V as createStopWatchingResourcesTool, Vr as automationTriggerSchema, W as createSearchConversationsTool, Wn as createSetConversationSubscriptionTool, Wr as triggerKind, X as capToolResult, Xr as automationToolsDisabledReason, Y as TOOL_RESULT_MAX_CHARS, Yn as createSlackThreadReadTool, Yr as automationToolContext, Z as createEditFileTool, Zr as requireToolAutomation, _i as changedEventMatch, _t as createUpdateReviewItemTool, a as createCacheWarmingRecorder, ar as createSlackConversationSearchChannelPort, at as createReportBlockedTool, b as coreToolSlots, ct as createMessageAgentTool, dr as resolveSlackChannelRef, ei as requireToolDestination, er as createSlackListUpdateItemTool, et as createUpdatePlanTool, fr as slackChannelRefParam, gi as editEventAutomation, gt as createSearchReviewItemsTool, hi as editScheduledAutomation, ht as createAddReviewItemTool, in as isParentMessageMeta, ir as createSlackConversationMessageSearchTool, it as createReportProgressTool, j as createWebFetchTool, jr as createRunAutomationNowTool, kr as createCanvas, lt as createArchiveAgentTool, mr as joinPublicChannelForRead, ni as automationEditor, nr as createSlackListCreateTool, nt as createSpawnAgentTool, or as createSlackChannelListMessagesTool, ot as createReplyTool, pr as checkSlackChannelReadAccess, q as missingFileResult, qr as makeStructuredToolOutput, qt as listAgentInvocationsForConversation, ri as changeAutomationLifecycle, rr as createSlackListAddItemsTool, rt as createListAgentsTool, st as createNoReplyTool, tr as createSlackListGetItemsTool, tt as createStopAgentTool, ur as createSlackChannelJoinTool, vi as requireEventAutomationTrigger, wr as SLACK_TOOL_SOURCE, x as enabledMode, xi as requireAutomationSkill, xr as createSlackCanvasWriteTool, yi as requireAutomationTaskText, z as createSubmitFeedbackTool, zr as automationToolResultSchema } from "./warmup--Gkz7iB-.js";
|
|
20
20
|
import { D as automationTitleSchema, E as automationInstructionToolSchema, F as compileScheduleIntent, I as scheduleIntentFromTool, O as taskOutcomeInputSchema, P as ScheduleIntentError, T as automationContextToolSchema, V as automationTaskDescription, j as SCHEDULED_AUTOMATION_SYSTEM_ACTOR } from "./automation-CuA3yEcD.js";
|
|
21
|
-
import { G as readScheduledAutomation, K as saveScheduledAutomation, Q as createEventAutomation, V as createScheduledAutomation, it as saveEventAutomation, mt as automationRevision, t as resolveConversationRouting, tt as getEventAutomation } from "./turn-session-routing-
|
|
21
|
+
import { G as readScheduledAutomation, K as saveScheduledAutomation, Q as createEventAutomation, V as createScheduledAutomation, it as saveEventAutomation, mt as automationRevision, t as resolveConversationRouting, tt as getEventAutomation } from "./turn-session-routing-2bW2qfeb.js";
|
|
22
22
|
import { a as USER_INPUT_LIMITS, i as AGENT_INVOCATION_STATUSES, m as detectImageMediaType, o as USER_INPUT_NOTE, s as buttonUserInputField, u as normalizeUserInputAnswer } from "./web-message-id-lNodcCOI.js";
|
|
23
|
-
import { d as isTurnInputCommitLostError, o as CooperativeTurnYieldError, s as TurnInputCommitLostError } from "./turn-user-message-
|
|
24
|
-
import { l as QUEUE_SIGNATURE_MAX_AGE_MS, n as backgroundCompactionId, o as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
25
|
-
import { o as getSandboxResources, r as setSnapshotSpanAttributes } from "./install-
|
|
26
|
-
import { n as resolve$1 } from "./resolve-
|
|
27
|
-
import { t as runWithSlackInstallation } from "./adapter-context-
|
|
23
|
+
import { d as isTurnInputCommitLostError, o as CooperativeTurnYieldError, s as TurnInputCommitLostError } from "./turn-user-message-BrhuyYrH.js";
|
|
24
|
+
import { l as QUEUE_SIGNATURE_MAX_AGE_MS, n as backgroundCompactionId, o as getVercelConversationWorkQueue } from "./background-compaction-queue-BTqMIfTA.js";
|
|
25
|
+
import { o as getSandboxResources, r as setSnapshotSpanAttributes } from "./install-CQ76CfRw.js";
|
|
26
|
+
import { n as resolve$1 } from "./resolve-CeJgXuH1.js";
|
|
27
|
+
import { t as runWithSlackInstallation } from "./adapter-context-BpvbUki8.js";
|
|
28
28
|
import { n as privateTraceResultAttributes } from "./private-trace-result-CE7_lEdq.js";
|
|
29
29
|
import * as z from "zod";
|
|
30
30
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
@@ -6048,7 +6048,7 @@ function schemaErrorText(schema, value) {
|
|
|
6048
6048
|
}
|
|
6049
6049
|
/** Resolve and validate a catalog executeTool request at runtime. */
|
|
6050
6050
|
function resolveCatalogToolCall(input, catalogTools) {
|
|
6051
|
-
const extraKeys = Object.keys(input).filter((key) => key !== "tool_name" && key !== "arguments");
|
|
6051
|
+
const extraKeys = Object.keys(input).filter((key) => key !== "tool_name" && key !== "arguments" && key !== "intent");
|
|
6052
6052
|
if (extraKeys.length > 0) throw new ToolInputError(`executeTool arguments must be nested under arguments, not top-level fields: ${extraKeys.join(", ")}`);
|
|
6053
6053
|
const toolName = input["tool_name"];
|
|
6054
6054
|
if (typeof toolName !== "string" || toolName.length === 0) throw new ToolInputError("executeTool requires a catalog tool_name.");
|
|
@@ -6558,7 +6558,8 @@ const executeToolDefinition = zodToolDefinition({
|
|
|
6558
6558
|
exposure: "modelOnly",
|
|
6559
6559
|
inputSchema: z.object({
|
|
6560
6560
|
tool_name: z.string().min(1).describe("Exact catalog tool_name, from searchTools or as named by a skill, tool result, or error."),
|
|
6561
|
-
arguments: z.record(z.string(), z.unknown()).describe("Arguments matching the selected catalog tool schema, for example { \"query\": \"...\" }.").optional()
|
|
6561
|
+
arguments: z.record(z.string(), z.unknown()).describe("Arguments matching the selected catalog tool schema, for example { \"query\": \"...\" }.").optional(),
|
|
6562
|
+
intent: z.string().min(1).describe("Optional short purpose of this call. It is not passed to the catalog tool.").optional()
|
|
6562
6563
|
}).strict(),
|
|
6563
6564
|
outputSchema: juniorToolOutputSchema
|
|
6564
6565
|
});
|
|
@@ -6674,6 +6675,40 @@ async function rerankSearchCandidates(args) {
|
|
|
6674
6675
|
telemetry(picked.length > 0 ? "picked" : "none");
|
|
6675
6676
|
return picked;
|
|
6676
6677
|
}
|
|
6678
|
+
// src/chat/tool-support/schema-summary.ts
|
|
6679
|
+
function asSchema(value) {
|
|
6680
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
6681
|
+
}
|
|
6682
|
+
function propertyList(schema) {
|
|
6683
|
+
const properties = asSchema(schema["properties"]);
|
|
6684
|
+
const required = new Set(Array.isArray(schema["required"]) ? schema["required"] : []);
|
|
6685
|
+
return Object.entries(properties).map(([name, property]) => `${name}${required.has(name) ? "" : "?"}: ${schemaType(asSchema(property))}`).join(", ");
|
|
6686
|
+
}
|
|
6687
|
+
function schemaType(schema) {
|
|
6688
|
+
if ("const" in schema) return JSON.stringify(schema["const"]);
|
|
6689
|
+
if (Array.isArray(schema["enum"])) return schema["enum"].map((value) => JSON.stringify(value)).join(" | ");
|
|
6690
|
+
const variants = schema["anyOf"] ?? schema["oneOf"];
|
|
6691
|
+
if (Array.isArray(variants)) return variants.map((variant) => schemaType(asSchema(variant))).join(" | ");
|
|
6692
|
+
return (Array.isArray(schema["type"]) ? schema["type"] : [schema["type"] ?? (schema["properties"] ? "object" : void 0)]).map((type) => {
|
|
6693
|
+
if (type === "array") {
|
|
6694
|
+
const item = schemaType(asSchema(schema["items"]));
|
|
6695
|
+
return item.includes(" | ") ? `(${item})[]` : `${item}[]`;
|
|
6696
|
+
}
|
|
6697
|
+
if (type === "object") {
|
|
6698
|
+
const properties = propertyList(schema);
|
|
6699
|
+
return properties ? `{ ${properties} }` : "object";
|
|
6700
|
+
}
|
|
6701
|
+
return typeof type === "string" ? type : "unknown";
|
|
6702
|
+
}).join(" | ");
|
|
6703
|
+
}
|
|
6704
|
+
/**
|
|
6705
|
+
* Summarize a tool input schema as `name: type` pairs, with `?` on optional
|
|
6706
|
+
* params, so a search result can show how to call a tool without its full
|
|
6707
|
+
* schema.
|
|
6708
|
+
*/
|
|
6709
|
+
function summarizeInputSchema(schema) {
|
|
6710
|
+
return propertyList(schema) || "No arguments.";
|
|
6711
|
+
}
|
|
6677
6712
|
// src/chat/tools/search-tools.ts
|
|
6678
6713
|
const SEARCH_TOOLS_NAME = "searchTools";
|
|
6679
6714
|
const DEFAULT_MAX_RESULTS = 5;
|
|
@@ -6817,9 +6852,9 @@ const searchToolsToolSchema = z.object({
|
|
|
6817
6852
|
tool_name: z.string(),
|
|
6818
6853
|
description: z.string(),
|
|
6819
6854
|
source: z.string().optional(),
|
|
6820
|
-
input_schema: z.unknown(),
|
|
6821
|
-
|
|
6822
|
-
|
|
6855
|
+
input_schema: z.unknown().optional(),
|
|
6856
|
+
params: z.string().optional(),
|
|
6857
|
+
call_notes: z.array(z.string()).optional()
|
|
6823
6858
|
}).strict();
|
|
6824
6859
|
const searchToolsOutputSchema = juniorToolOutputSchema.extend({
|
|
6825
6860
|
query: z.string().nullable(),
|
|
@@ -7041,7 +7076,7 @@ function selectedSourceSummaries(tools, matches, requestedSource, knownSources)
|
|
|
7041
7076
|
return knownSources.filter((source) => matchedSourceIds.has(source.id));
|
|
7042
7077
|
}
|
|
7043
7078
|
function renderSearchToolsDescription(knownSources) {
|
|
7044
|
-
const intro = "Search the executable tool catalog. Deferred tools are grouped by source; use searchTools with source to inspect one source, then executeTool with the exact returned tool_name.";
|
|
7079
|
+
const intro = "Search the executable tool catalog. Deferred tools are grouped by source; use searchTools with source to inspect one source, then executeTool with the exact returned tool_name. The best match has its full input_schema. Other results have params, a preview for choosing a tool: before you call one, search its exact name to get its input_schema.";
|
|
7045
7080
|
if (knownSources.length === 0) return intro;
|
|
7046
7081
|
return [
|
|
7047
7082
|
intro,
|
|
@@ -7050,14 +7085,14 @@ function renderSearchToolsDescription(knownSources) {
|
|
|
7050
7085
|
].join("\n");
|
|
7051
7086
|
}
|
|
7052
7087
|
/** Build the agent-visible catalog tool summary returned by searchTools. */
|
|
7053
|
-
function toolMetadata(name, definition, includeSource) {
|
|
7088
|
+
function toolMetadata(name, definition, includeSource, includeSchema) {
|
|
7089
|
+
const notes = callNotes(definition);
|
|
7054
7090
|
return {
|
|
7055
7091
|
tool_name: name,
|
|
7056
7092
|
description: summarizeModelVisibleDescription(definition.description),
|
|
7057
7093
|
...includeSource && definition.source ? { source: definition.source.id } : void 0,
|
|
7058
|
-
input_schema: definition.inputSchema,
|
|
7059
|
-
call_notes:
|
|
7060
|
-
annotations: definition.annotations ?? {}
|
|
7094
|
+
...includeSchema ? { input_schema: definition.inputSchema } : { params: summarizeInputSchema(definition.inputSchema) },
|
|
7095
|
+
...notes.length > 0 ? { call_notes: notes } : void 0
|
|
7061
7096
|
};
|
|
7062
7097
|
}
|
|
7063
7098
|
/**
|
|
@@ -7084,10 +7119,11 @@ function createSearchToolsTool(allCatalogTools, rerankCost) {
|
|
|
7084
7119
|
max_results: z.number().int().min(1).max(MAX_RESULTS).nullable().describe("Maximum matching catalog tool descriptors to return.").optional()
|
|
7085
7120
|
}).strict(),
|
|
7086
7121
|
outputSchema: searchToolsOutputSchema,
|
|
7087
|
-
privateTraceResult: (result) => ({ tools: result.tools.map(({ tool_name, description, input_schema }) => ({
|
|
7122
|
+
privateTraceResult: (result) => ({ tools: result.tools.map(({ tool_name, description, input_schema, params }) => ({
|
|
7088
7123
|
tool_name,
|
|
7089
7124
|
description,
|
|
7090
|
-
input_schema
|
|
7125
|
+
input_schema,
|
|
7126
|
+
params
|
|
7091
7127
|
})) }),
|
|
7092
7128
|
execute: async ({ query, source, max_results }, { signal }) => {
|
|
7093
7129
|
const maxResults = max_results ?? DEFAULT_MAX_RESULTS;
|
|
@@ -7117,7 +7153,7 @@ function createSearchToolsTool(allCatalogTools, rerankCost) {
|
|
|
7117
7153
|
const sources = !sourceExists ? knownSources : (query ?? "").trim() ? selectedSourceSummaries(catalogTools, matches, requestedSource, knownSources) : requestedSource ? knownSources.filter((candidate) => candidate.id === requestedSource) : knownSources;
|
|
7118
7154
|
const totalEligibleTools = sourceExists ? listCatalogTools(catalogTools, requestedSource).length : 0;
|
|
7119
7155
|
const includePerToolSource = requestedSource === null;
|
|
7120
|
-
const renderedTools = matches.map((name) => toolMetadata(name, catalogTools[name], includePerToolSource));
|
|
7156
|
+
const renderedTools = matches.map((name, index) => toolMetadata(name, catalogTools[name], includePerToolSource, hasQuery && index === 0));
|
|
7121
7157
|
const result = {
|
|
7122
7158
|
query: query ?? null,
|
|
7123
7159
|
source: requestedSource,
|
|
@@ -7629,7 +7665,7 @@ function renderScriptTools(tools) {
|
|
|
7629
7665
|
...shown.map((entry) => entry.text),
|
|
7630
7666
|
"};"
|
|
7631
7667
|
] : [],
|
|
7632
|
-
...omitted > 0 ? [`${omitted} more tools are not declared here. To find one, call ${SEARCH_TOOLS_NAME} directly before the script. Then call each result as \`tools.<tool_name>(args)\`, with its input_schema. A script cannot call ${SEARCH_TOOLS_NAME} or ${EXECUTE_TOOL_NAME}.`] : [],
|
|
7668
|
+
...omitted > 0 ? [`${omitted} more tools are not declared here. To find one, call ${SEARCH_TOOLS_NAME} directly before the script. Then call each result as \`tools.<tool_name>(args)\`, with its input_schema. A result with only params is a preview: search its exact name to get its input_schema before you call it. A script cannot call ${SEARCH_TOOLS_NAME} or ${EXECUTE_TOOL_NAME}.`] : [],
|
|
7633
7669
|
...Object.hasOwn(tools, "callMcpTool") ? ["Call an MCP tool as `tools.callMcpTool({ tool_name, arguments })`. Its `result` field holds the structured content of the MCP tool, or its text. `tools.mcp__<provider>__<tool>` does not exist."] : []
|
|
7634
7670
|
].join("\n");
|
|
7635
7671
|
}
|
|
@@ -9575,7 +9611,7 @@ async function wireAgentTools(args) {
|
|
|
9575
9611
|
function bindAgentTools(run, agents) {
|
|
9576
9612
|
const { bindSpawnAgent, bindMessageAgent } = run.environment ?? {};
|
|
9577
9613
|
if (agents === "none" || !bindSpawnAgent) return {};
|
|
9578
|
-
const spawnAgent =
|
|
9614
|
+
const spawnAgent = agents === "children" || agents === "children_and_parent" && botConfig.maxAgentDepth > 0 ? bindSpawnAgent(run) : void 0;
|
|
9579
9615
|
const messageAgent = spawnAgent || agents === "children_and_parent" ? bindMessageAgent?.(run, agents) : void 0;
|
|
9580
9616
|
return {
|
|
9581
9617
|
...spawnAgent ? { spawnAgent } : void 0,
|
|
@@ -10140,12 +10176,13 @@ async function requestAboveMark(args) {
|
|
|
10140
10176
|
historyVersion,
|
|
10141
10177
|
markSeq
|
|
10142
10178
|
};
|
|
10143
|
-
const {
|
|
10179
|
+
const { messages, thinkingLevel, tools } = args.agent.state;
|
|
10180
|
+
const leading = getInitialSystemMessage(messages);
|
|
10144
10181
|
const snapshot = {
|
|
10145
10182
|
conversationPrivacy: args.conversationPrivacy ?? "private",
|
|
10146
10183
|
inputSize: args.inputSize,
|
|
10147
10184
|
modelId: args.modelId,
|
|
10148
|
-
systemPrompt,
|
|
10185
|
+
systemPrompt: leading ? getSystemMessageText$1(leading) : "",
|
|
10149
10186
|
thinkingLevel,
|
|
10150
10187
|
tools: tools.map((tool) => ({
|
|
10151
10188
|
name: tool.name,
|
|
@@ -12196,7 +12233,7 @@ function createAgentRunner(execute, options) {
|
|
|
12196
12233
|
}
|
|
12197
12234
|
};
|
|
12198
12235
|
const loadStoredAttachments = async (attachments) => {
|
|
12199
|
-
const { loadInputAttachments } = await import("./model-input-
|
|
12236
|
+
const { loadInputAttachments } = await import("./model-input-DoM9Ht-d.js").then((n) => n.r);
|
|
12200
12237
|
const storage = nextRun.environment?.attachmentStorage;
|
|
12201
12238
|
if (!storage) throw new Error("Attachment storage is unavailable.");
|
|
12202
12239
|
return await loadInputAttachments({
|
package/dist/api.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { V as escapeXml, et as getAttachmentStorage, n as botConfig } from "./config-
|
|
2
|
-
import { A as conversationKindFromRow, C as withConversationMutationLock, X as getStateAdapter, a as getConversationStore, mt as nextDetailVersion, o as getDb, q as createCache, s as getSqlExecutor, y as loadConversationSlackTenantIds } from "./db-
|
|
3
|
-
import { Di as countOwnedAutomationsNeedingAttention, Dt as webActorFromUser, Gn as setConversationSubscription, Jn as throwApiError, Kn as emptyResponse, Lt as listOwnedWatches, Nt as writeAttachmentUpload, Rt as listChildAgents, _ as closeBreaker, ai as deleteViewerTask, bi as AutomationEditError, ci as ViewerTaskNotFoundError, di as readViewerAutomationRuns, dt as archiveConversation, fi as readViewerAutomationSummary, g as breakerStates, h as savingsTotals, ii as changeViewerAutomationLifecycle, jt as createAttachmentUpload, kt as AttachmentUploadError, mi as readViewerAutomations, mt as reportConversationRead, oi as readViewerAutomationEdit, pi as readViewerAutomationVersions, qn as jsonResponse, si as updateViewerAutomation, ti as activateViewerAutomationVersion, u as SAVINGS_NAMESPACE, ui as readViewerAutomationExecutions, v as connectedState, w as readStats, xt as acceptsWebMessages } from "./warmup
|
|
1
|
+
import { V as escapeXml, et as getAttachmentStorage, n as botConfig } from "./config-CBZp0udd.js";
|
|
2
|
+
import { A as conversationKindFromRow, C as withConversationMutationLock, X as getStateAdapter, a as getConversationStore, mt as nextDetailVersion, o as getDb, q as createCache, s as getSqlExecutor, y as loadConversationSlackTenantIds } from "./db-DU84dCVu.js";
|
|
3
|
+
import { Di as countOwnedAutomationsNeedingAttention, Dt as webActorFromUser, Gn as setConversationSubscription, Jn as throwApiError, Kn as emptyResponse, Lt as listOwnedWatches, Nt as writeAttachmentUpload, Rt as listChildAgents, _ as closeBreaker, ai as deleteViewerTask, bi as AutomationEditError, ci as ViewerTaskNotFoundError, di as readViewerAutomationRuns, dt as archiveConversation, fi as readViewerAutomationSummary, g as breakerStates, h as savingsTotals, ii as changeViewerAutomationLifecycle, jt as createAttachmentUpload, kt as AttachmentUploadError, mi as readViewerAutomations, mt as reportConversationRead, oi as readViewerAutomationEdit, pi as readViewerAutomationVersions, qn as jsonResponse, si as updateViewerAutomation, ti as activateViewerAutomationVersion, u as SAVINGS_NAMESPACE, ui as readViewerAutomationExecutions, v as connectedState, w as readStats, xt as acceptsWebMessages } from "./warmup--Gkz7iB-.js";
|
|
4
4
|
import { C as createConversationMessageBodySchema, F as renameConversationResponseSchema, I as conversationReadPositionSchema, P as renameConversationBodySchema, S as createConversationBodySchema, T as forkConversationResponseSchema, W as MAX_ATTACHMENT_BYTES, f as conversationEventPageSchema, l as conversationDetailQuerySchema, m as conversationParamsSchema, n as CONVERSATION_VERSION_HEADER, o as conversationAttachmentParamsSchema, p as conversationEventsQuerySchema, r as acceptedConversationMessageSchema, s as conversationAttachmentQuerySchema, t as CONVERSATION_DETAIL_VERSION_HEADER, u as conversationDetailReportSchema, w as forkConversationBodySchema } from "./conversation-BOqdRtUx.js";
|
|
5
5
|
import { $ as testNotificationResponseSchema, A as startServiceAccountSignInResponseSchema, At as conversationOutlineSchema, B as personParamsSchema, Bt as pinConversationResponseSchema, C as cacheWarmingSavingsRefillResponseSchema, Ct as attachObjectLinkBodySchema, D as serviceAccountListSchema, Dt as stopConversationTurnResponseSchema, E as disconnectServiceAccountResponseSchema, Et as objectLinksReportSchema, F as personalTokenParamsSchema, Ft as conversationSubscriptionBodySchema, G as locationParamsSchema, Gt as attachmentUploadParamsSchema, Ht as reorderPinnedConversationsResponseSchema, I as revokePersonalTokenResponseSchema, It as conversationSubscriptionResponseSchema, J as activitySixHours$1, K as activityDays$1, Kt as attachmentUploadSchema, L as actorDirectoryReportSchema, Lt as conversationDeliveryBodySchema, M as createdPersonalTokenSchema, Mt as archiveConversationResponseSchema, N as personalTokenListSchema, Nt as archiveDoneConversationsResponseSchema, O as serviceAccountParamsSchema, Ot as conversationStatsReportSchema, Pt as conversationAutoArchiveSchema, Q as pushSubscriptionDeleteBodySchema, R as actorProfileReportSchema, Rt as conversationDeliveryResponseSchema, S as cacheWarmingSavingsQuerySchema, T as closeCacheWarmingBreakerResponseSchema, Tt as objectLinksQuerySchema, U as locationDetailReportSchema, Ut as conversationCatchUpBodySchema, V as personalSpendReportSchema, Vt as reorderPinnedConversationsBodySchema, W as locationDirectoryReportSchema, Wt as conversationCatchUpSchema, X as notificationSettingsSchema, Z as pushSubscriptionBodySchema, _ as reviewItemParamsSchema, _t as conversationWatchesReportSchema, b as cacheWarmingBreakerListSchema, bt as continueConversationInSlackBodySchema, c as workspaceListSchema, d as workspaceSchema, dt as codeRepositoryParamsSchema, et as connectionListSchema, f as reviewItemActionSchema, ft as codeRepositoryQuerySchema, g as reviewItemListSchema, h as reviewItemListQuerySchema, ht as personCodeQuerySchema, i as statsReportSchema, it as startConnectionResponseSchema, j as createPersonalTokenBodySchema, jt as archiveConversationBodySchema, l as workspaceParamsSchema, lt as codeOverviewReportSchema, m as reviewItemCountSchema, n as versionsSchema, o as deleteWorkspaceResponseSchema, p as reviewItemCountQuerySchema, pt as codeRepositoryReportSchema, q as activityHours$1, qt as createAttachmentUploadBodySchema, rt as disconnectConnectionResponseSchema, s as workspaceBodySchema, t as versionsQuerySchema, tt as connectionParamsSchema, ut as codePersonReportSchema, v as reviewItemSchema, w as cacheWarmingSavingsReportSchema, wt as attachObjectLinkResponseSchema, x as cacheWarmingBreakerParamsSchema, xt as continueConversationInSlackResponseSchema, y as reviewItemWaitingConversationsSchema, yt as conversationChildAgentsReportSchema, z as avatarParamsSchema, zt as pinConversationBodySchema } from "./schema-Bx0Mlo32.js";
|
|
6
6
|
import { S as skillDetailReportSchema, a as cancelConversationPendingMessagesResponseSchema, b as pluginsSchema, d as conversationUnchangedDetailWithMailboxSchema, f as steerConversationPendingMessagesBodySchema, h as pluginOperationalReportFeedSchema, i as cancelConversationPendingMessagesBodySchema, m as healthReportSchema, n as conversationFeedQuerySchema, o as conversationDetailWithMailboxReportSchema, p as steerConversationPendingMessagesResponseSchema, r as conversationFeedSchema, u as conversationPendingMessagesReportSchema, w as skillReportsSchema, x as runtimeInfoReportSchema } from "./conversation-feed-CgpgP7yi.js";
|
|
7
|
-
import {
|
|
8
|
-
import { $a as workspaceRepoCheckoutPath, Cr as isPausedBySlack, Fr as listWaitingConversations, Gr as isOnlyAssignee, Hi as createWorkspace, Ir as reviewItemsNeedingUserVersionQuery, Ji as updateWorkspace, Jo as readLiveAttachment, Ki as listWorkspaces, Kr as itemNeedsUser, Lr as searchReviewItems, Or as countOpenReviewItemsForUser, Pi as getDashboardSettingsLink, Qr as reviewItemReaderForUserInConversation, Sr as savePushSubscription, Ui as deleteWorkspace, Uo as readSlackAttachmentSource, V as createPluginEgress, Vr as canActOnReviewItem, Wi as getWorkspace, Yi as WorkspaceValidationError, Yn as createUserTokenStore, Za as SANDBOX_RUNTIME, Zr as reviewItemReaderForUser, _o as createPluginLogger, _r as resolveNotificationTimezone, bo as createConversationAccessReader, br as readNotificationSchedule, bs as createPluginAnnotations, cr as getPlugins, ea as create, gr as sendPushNotificationToUser, hr as readWebPushConfig, jo as readConversationEventPage, ko as readConversationBriefThrough, kr as countReviewItemsNeedingUserBySubject, ks as createPluginCache, qi as listWorkspacesByRepository, ta as hash, vr as deletePushSubscription, xo as readConversationAccessFromSql, xr as saveNotificationSchedule, xs as listConversationAnnotations, yr as listPushSubscriptions } from "./projection-
|
|
9
|
-
import { $ as readObjectLinkTypes, A as isAllowedSignInEmail, D as resolveMentions, Dt as IMAGE_WIDTHS, E as requireConversationPendingMessages, Et as createViewerMcp, F as actOnReviewItem, G as readSavingsRefill, H as DEFAULT_USER_SETTINGS, L as readReviewItemForUser, Ot as decodeImageId, P as ReviewItemActionError, Q as readLinkObjectType, Tt as readFirstHumanMessageTexts, U as readUserSettings, V as setConversationAutoArchive, W as updateUserSettings, X as readHealthReport, Z as OBJECT_LINK_TTL_MS, _ as readConversationEvents, a as decodePageCursor, b as createConversationForViewer, c as reorderPinnedConversations, d as childAgentTotalsReport, et as resolveObjectLinkNow, f as readConversationTreeMetricsFromSql, g as keepQuickQuestionForViewer, h as forkConversationForViewer, i as readConversationFeed, l as readConversationDetail, m as readConversationDetailEtag, n as steerConversationPendingMessagesForViewer, nt as guardedFetch, o as encodePageCursor, p as conversationVersionQuery, q as startSavingsRefill, r as conversationFeedVersionQuery, s as pinConversation, st as getProductionSlackAdapter, t as stopConversationTurnForViewer, tt as resolveObjectLinks, u as readConversationAuxiliaryCostsFromSql, w as cancelConversationPendingMessagesForViewer, wt as conversationSummaryFromStoredConversation, x as requireWebMessageConversation, y as appendConversationMessageForViewer, z as archiveViewerDoneConversations } from "./stop-
|
|
10
|
-
import { n as briefEntriesFromReportEvents, u as completeText } from "./prompt-
|
|
11
|
-
import { a as resumeConversationDelivery, i as pauseConversationDelivery, r as canPauseConversationDelivery } from "./conversation-turn-
|
|
7
|
+
import { Q as getEventCatalog, X as isExperimentalFeatureEnabled, _ as readUserCustomization, v as saveUserCustomization, y as addConversationNote } from "./session-stop-uotLtp4g.js";
|
|
8
|
+
import { $a as workspaceRepoCheckoutPath, Cr as isPausedBySlack, Fr as listWaitingConversations, Gr as isOnlyAssignee, Hi as createWorkspace, Ir as reviewItemsNeedingUserVersionQuery, Ji as updateWorkspace, Jo as readLiveAttachment, Ki as listWorkspaces, Kr as itemNeedsUser, Lr as searchReviewItems, Or as countOpenReviewItemsForUser, Pi as getDashboardSettingsLink, Qr as reviewItemReaderForUserInConversation, Sr as savePushSubscription, Ui as deleteWorkspace, Uo as readSlackAttachmentSource, V as createPluginEgress, Vr as canActOnReviewItem, Wi as getWorkspace, Yi as WorkspaceValidationError, Yn as createUserTokenStore, Za as SANDBOX_RUNTIME, Zr as reviewItemReaderForUser, _o as createPluginLogger, _r as resolveNotificationTimezone, bo as createConversationAccessReader, br as readNotificationSchedule, bs as createPluginAnnotations, cr as getPlugins, ea as create, gr as sendPushNotificationToUser, hr as readWebPushConfig, jo as readConversationEventPage, ko as readConversationBriefThrough, kr as countReviewItemsNeedingUserBySubject, ks as createPluginCache, qi as listWorkspacesByRepository, ta as hash, vr as deletePushSubscription, xo as readConversationAccessFromSql, xr as saveNotificationSchedule, xs as listConversationAnnotations, yr as listPushSubscriptions } from "./projection-CcFBVFUo.js";
|
|
9
|
+
import { $ as readObjectLinkTypes, A as isAllowedSignInEmail, D as resolveMentions, Dt as IMAGE_WIDTHS, E as requireConversationPendingMessages, Et as createViewerMcp, F as actOnReviewItem, G as readSavingsRefill, H as DEFAULT_USER_SETTINGS, L as readReviewItemForUser, Ot as decodeImageId, P as ReviewItemActionError, Q as readLinkObjectType, Tt as readFirstHumanMessageTexts, U as readUserSettings, V as setConversationAutoArchive, W as updateUserSettings, X as readHealthReport, Z as OBJECT_LINK_TTL_MS, _ as readConversationEvents, a as decodePageCursor, b as createConversationForViewer, c as reorderPinnedConversations, d as childAgentTotalsReport, et as resolveObjectLinkNow, f as readConversationTreeMetricsFromSql, g as keepQuickQuestionForViewer, h as forkConversationForViewer, i as readConversationFeed, l as readConversationDetail, m as readConversationDetailEtag, n as steerConversationPendingMessagesForViewer, nt as guardedFetch, o as encodePageCursor, p as conversationVersionQuery, q as startSavingsRefill, r as conversationFeedVersionQuery, s as pinConversation, st as getProductionSlackAdapter, t as stopConversationTurnForViewer, tt as resolveObjectLinks, u as readConversationAuxiliaryCostsFromSql, w as cancelConversationPendingMessagesForViewer, wt as conversationSummaryFromStoredConversation, x as requireWebMessageConversation, y as appendConversationMessageForViewer, z as archiveViewerDoneConversations } from "./stop-BFVd0P0m.js";
|
|
10
|
+
import { n as briefEntriesFromReportEvents, u as completeText } from "./prompt-C5LREK2p.js";
|
|
11
|
+
import { a as resumeConversationDelivery, i as pauseConversationDelivery, r as canPauseConversationDelivery } from "./conversation-turn-CI8WDpnK.js";
|
|
12
12
|
import { r as notificationScheduleSchema } from "./schedule-cP0AACm1.js";
|
|
13
|
-
import { C as juniorConversationMetrics, E as juniorApiTokens, F as juniorUsers, I as juniorDestinations, N as juniorConversations, O as juniorCodeChanges, P as juniorIdentities, T as juniorConversationEvents, k as juniorCodeRepositories, x as juniorConversationBriefs } from "./executor-
|
|
14
|
-
import { t as runWithSlackInstallation } from "./adapter-context-
|
|
15
|
-
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-
|
|
13
|
+
import { C as juniorConversationMetrics, E as juniorApiTokens, F as juniorUsers, I as juniorDestinations, N as juniorConversations, O as juniorCodeChanges, P as juniorIdentities, T as juniorConversationEvents, k as juniorCodeRepositories, x as juniorConversationBriefs } from "./executor-CFyrgOu1.js";
|
|
14
|
+
import { t as runWithSlackInstallation } from "./adapter-context-BpvbUki8.js";
|
|
15
|
+
import { i as continueConversationInSlack, r as canContinueInSlack, t as BUSY } from "./continue-in-slack-Cvot6S38.js";
|
|
16
16
|
import { f as parseSlackTeamId, u as parseSlackChannelId } from "./actor-D2iXzvlN.js";
|
|
17
17
|
import { A as fillUtcSixHours, D as HOUR_MS$1, E as DAY_MS$2, F as trailingUtcSixHourWindow, I as utcDayKey, L as utcHourKey, M as sumUtcHoursIntoSixHours, N as trailingUtcDayWindow, O as fillUtcDays, P as trailingUtcHourWindow, T as apiErrorSchema, _ as userCustomizationSchema, f as INLINE_VIDEO_TYPES, j as startOfUtcHour, k as fillUtcHours, m as detectImageMediaType, p as INPUT_IMAGE_TYPES } from "./web-message-id-lNodcCOI.js";
|
|
18
|
-
import { D as AttachmentDownloadError, O as readAttachmentContent, _ as createSlackReviewItemShow, k as previewOriginBelongsTo } from "./agent-runner-
|
|
19
|
-
import { F as readAutomationTitlesByConversationId, L as conversationAggregateColumns, R as conversationRangeColumns, _t as automationEventCatalog, pt as AutomationConflictError, z as conversationUsageCostExpr } from "./turn-session-routing-
|
|
20
|
-
import { a as startConnection, n as isConnectableProvider, r as listConnections, s as htmlCallbackResponse, t as disconnectConnection } from "./connections-
|
|
21
|
-
import { h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
22
|
-
import { f as credentialContextForActor } from "./registry-
|
|
23
|
-
import { c as readViewerAvatarUrl, d as updateViewerDisplayName, l as resolveViewerUser, m as readAvatarFetch, t as findUserByEmail } from "./viewer-
|
|
24
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
25
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
18
|
+
import { D as AttachmentDownloadError, O as readAttachmentContent, _ as createSlackReviewItemShow, k as previewOriginBelongsTo } from "./agent-runner-C5d6rY5g.js";
|
|
19
|
+
import { F as readAutomationTitlesByConversationId, L as conversationAggregateColumns, R as conversationRangeColumns, _t as automationEventCatalog, pt as AutomationConflictError, z as conversationUsageCostExpr } from "./turn-session-routing-2bW2qfeb.js";
|
|
20
|
+
import { a as startConnection, n as isConnectableProvider, r as listConnections, s as htmlCallbackResponse, t as disconnectConnection } from "./connections-BYmuJ6Vm.js";
|
|
21
|
+
import { h as logWarn, m as logInfo, p as logException } from "./logging-BPNTQVFu.js";
|
|
22
|
+
import { f as credentialContextForActor } from "./registry-BjZZqKqi.js";
|
|
23
|
+
import { c as readViewerAvatarUrl, d as updateViewerDisplayName, l as resolveViewerUser, m as readAvatarFetch, t as findUserByEmail } from "./viewer-CxUiOraX.js";
|
|
24
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-DU5865XA.js";
|
|
25
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-J52Tej47.js";
|
|
26
26
|
import { F as compileScheduleIntent, P as ScheduleIntentError, U as automationTaskText, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-CuA3yEcD.js";
|
|
27
|
-
import { o as getSandboxResources } from "./install-
|
|
28
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
29
|
-
import { o as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
27
|
+
import { o as getSandboxResources } from "./install-CQ76CfRw.js";
|
|
28
|
+
import { t as getCachedSnapshot } from "./resolve-CeJgXuH1.js";
|
|
29
|
+
import { o as getVercelConversationWorkQueue } from "./background-compaction-queue-BTqMIfTA.js";
|
|
30
30
|
import { Hono } from "hono";
|
|
31
31
|
import * as z from "zod";
|
|
32
32
|
import path from "node:path";
|
|
@@ -2800,7 +2800,7 @@ async function readPeoplePluginReports(args) {
|
|
|
2800
2800
|
reports: [],
|
|
2801
2801
|
source: "plugins"
|
|
2802
2802
|
});
|
|
2803
|
-
const { getPluginProfileReports } = await import("./projection-
|
|
2803
|
+
const { getPluginProfileReports } = await import("./projection-CcFBVFUo.js").then((n) => n.Qn);
|
|
2804
2804
|
return pluginOperationalReportFeedSchema.parse({
|
|
2805
2805
|
generatedAt: new Date(nowMs).toISOString(),
|
|
2806
2806
|
reports: await getPluginProfileReports({
|
|
@@ -3928,7 +3928,7 @@ function readDescriptionText(home) {
|
|
|
3928
3928
|
}
|
|
3929
3929
|
/** Read discovered skills for runtime diagnostics and the Automation editor. */
|
|
3930
3930
|
async function readSkillReports() {
|
|
3931
|
-
const { discoverSkills } = await import("./skills-
|
|
3931
|
+
const { discoverSkills } = await import("./skills-Bex1EaO5.js").then((n) => n.o);
|
|
3932
3932
|
const skills = await discoverSkills();
|
|
3933
3933
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
3934
3934
|
name: skill.name,
|
|
@@ -3942,7 +3942,7 @@ async function readSkillReports() {
|
|
|
3942
3942
|
* what the skill tells Junior. Returns null when no skill has that name.
|
|
3943
3943
|
*/
|
|
3944
3944
|
async function readSkillDetailReport(name) {
|
|
3945
|
-
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-
|
|
3945
|
+
const { discoverSkills, findSkillByName, parseSkillFile } = await import("./skills-Bex1EaO5.js").then((n) => n.o);
|
|
3946
3946
|
const skill = findSkillByName(name, await discoverSkills());
|
|
3947
3947
|
if (!skill) return null;
|
|
3948
3948
|
const parsed = parseSkillFile(await fs.readFile(path.join(skill.skillPath, "SKILL.md"), "utf8"), skill.name);
|
|
@@ -3957,7 +3957,7 @@ async function readSkillDetailReport(name) {
|
|
|
3957
3957
|
}
|
|
3958
3958
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
3959
3959
|
async function readPlugins() {
|
|
3960
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
3960
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-J52Tej47.js").then((n) => n.t);
|
|
3961
3961
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
3962
3962
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
3963
3963
|
description: plugin.manifest.description,
|
|
@@ -3969,7 +3969,7 @@ async function readPlugins() {
|
|
|
3969
3969
|
async function readRuntimeInfoReport() {
|
|
3970
3970
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
3971
3971
|
import("./package-discovery-x4AvVhMj.js").then((n) => n.r),
|
|
3972
|
-
import("./catalog-runtime-
|
|
3972
|
+
import("./catalog-runtime-J52Tej47.js").then((n) => n.t),
|
|
3973
3973
|
readPlugins(),
|
|
3974
3974
|
readSkillReports()
|
|
3975
3975
|
]);
|
|
@@ -3986,7 +3986,7 @@ async function readRuntimeInfoReport() {
|
|
|
3986
3986
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
3987
3987
|
async function readPluginOperationalReportFeed() {
|
|
3988
3988
|
const nowMs = Date.now();
|
|
3989
|
-
const { getPluginOperationalReports } = await import("./projection-
|
|
3989
|
+
const { getPluginOperationalReports } = await import("./projection-CcFBVFUo.js").then((n) => n.Qn);
|
|
3990
3990
|
return pluginOperationalReportFeedSchema.parse({
|
|
3991
3991
|
source: "plugins",
|
|
3992
3992
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Ar as dismissOpenReviewItems, Bi as createPluginState, C as settleConversationTitleWork, Ci as bindSlackDirectCredentialSubject, Ea as postSlackEphemeralMessage, Ei as verifySlackDirectCredentialSubject, Fi as getDashboardTaskLink, Fo as readConversationMessageEventSeq, Fs as getConfigDefaults, Ha as clearSandboxEgressSignals, Is as setConfigDefaults, Ka as parseSandboxEgressCredentialToken, Ko as collectAttachmentGarbage, Lr as searchReviewItems, Ma as slackEntitySchema, Mo as readConversationEventPageAfter, Mt as hasRunnableConversationWork, Na as slackExternalRefIdSchema, Ni as getDashboardReviewItemLink, Po as readConversationLastEventSeq, Pt as isInvalidConversationRecordError, Qr as reviewItemReaderForUserInConversation, Rt as pruneActiveConversation, Si as bindScheduledAutomationCredentialSubject, Ta as openSlackModal, Ti as verifyScheduledAutomationCredentialSubject, Tr as createPluginReviewItems, Ua as consumeSandboxEgressAuthRequiredSignal, Vr as canActOnReviewItem, Wa as consumeSandboxEgressPermissionDeniedSignal, Xa as normalizeSandboxEgressTracePropagationDomains, Xo as requestAttachmentDeletion, Yn as createUserTokenStore, Zr as reviewItemReaderForUser, _ as appendConversationMessages, _a as slackMention, _i as findMatchingWatches, _o as createPluginLogger, aa as isVercelSandboxEgressRequest, bi as takeDueTimerWatches, bs as createPluginAnnotations, cr as getPlugins, dr as validatePlugins, dt as CONVERSATION_WORK_STALE_ENQUEUE_MS, er as createPluginEventPublisher, gs as resolveRootVisibility, ii as createCodeChangePublisher, is as getSlackClient, jo as readConversationEventPage, ki as getDashboardConversationLink, ks as createPluginCache, mr as setBriefsConfig, ms as runWithWorkspaceTeamId, nr as getPluginApiRoutes, oa as proxyVercelSandboxEgressRequest, os as isDmChannel, pi as collectEventMatchKeys, ps as getWorkspaceTeamId, ro as createPluginEmbedder, rr as getPluginRoutes, ua as resolveBaseUrl, ur as setPlugins, wi as verifyEventAutomationCredentialSubject, wr as projectConversationMessages, xi as bindEventAutomationCredentialSubject, xo as readConversationAccessFromSql, xs as listConversationAnnotations, zi as setDashboardConversationLinkOptions } from "./projection-
|
|
2
|
-
import { d as restoreRuntimeConfig, et as getAttachmentStorage, f as setBotModelConfig, g as snapshotRuntimeConfig, h as setSlackReactionConfig, i as getChatConfig, m as setRuntimeLimits, n as botConfig, o as getSlackBotToken, p as setBotName, u as resetRuntimeConfig } from "./config-
|
|
3
|
-
import { $ as MUTATION_LOCK_TTL_MS, C as withConversationMutationLock, H as recordGoogleSignIn, I as resolveActorIdentityId, J as disconnectStateAdapter, X as getStateAdapter, a as getConversationStore, gt as createSlackDestination, ht as touchConversationDetail, m as withConversationEventLock, nt as withLock, o as getDb, p as deleteMessageLinks, q as createCache, r as getConversationEventStore, s as getSqlExecutor, t as closeDb, tt as fenceLock } from "./db-
|
|
4
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, G as normalizeIdentityEmail, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, U as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-
|
|
5
|
-
import { C as parseSlackReviewItemClick, E as parseSlackUserInputSubmission, S as buildSlackReviewItemModal, _ as createSlackReviewItemShow, b as findSlackThreadOwnerId, d as publicArtifactHeaders, f as readPublicArtifact, g as scheduledAutomationRunAttributes, h as logScheduledAutomationRunSkipped, n as executeAgentRun, p as unpublishedArtifactHeaders, r as processBackgroundCompaction, t as createAgentRunner, v as resolveSlackReviewItemCardConversationId, w as parseSlackReviewItemFormTarget, y as syncReviewItemSlackCards } from "./agent-runner-
|
|
6
|
-
import { $ as
|
|
7
|
-
import { a as getSandboxResourceConfig, s as setSandboxResourceConfig } from "./install-
|
|
8
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
9
|
-
import { $ as readObjectLinkTypes, A as isAllowedSignInEmail, B as runAutoArchiveSweep, C as encodeConversationCursor, Ct as getThreadStopDecision, F as actOnReviewItem, I as closeReviewItemsAnsweredByReply, J as backfillCacheWarmingGaps, K as runSavingsRefillSlice, L as readReviewItemForUser, M as resolveAllowedDomains, N as stopConversation, O as assertNoLegacyAllowedDomains, P as ReviewItemActionError, R as reviewItemChange, S as decodeConversationCursor, St as SubscribedReplyReason, T as readConversationPendingMessages, V as setConversationAutoArchive, Y as GET$4, _t as createSlackWebApiStatusSender, at as createProductionConversationWorkOptions, b as createConversationForViewer, bt as stripLeadingBotMention, ct as buildSlackInboundMessage, dt as normalizeIncomingSlackThreadId, ft as withNormalizedThreadId, gt as recordSkippedConversationMessage, ht as failStoppedDispatch, i as readConversationFeed, it as publicAddressLookup, j as readEnvList, k as isAllowedDomain, l as readConversationDetail, lt as clearSlackPendingReactions, mt as enqueueAgentDispatch, n as steerConversationPendingMessagesForViewer, ot as createProductionSlackWebhookServices, rt as isPublicAddress, s as pinConversation, st as getProductionSlackAdapter, t as stopConversationTurnForViewer, ut as slackInboundMessageId, v as readConversationRecordFromSql, vt as bindMessageAuthorIdentityId, w as cancelConversationPendingMessagesForViewer, xt as parseContent, y as appendConversationMessageForViewer, yt as startProcessingReaction, z as archiveViewerDoneConversations } from "./stop-
|
|
10
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
1
|
+
import { Ar as dismissOpenReviewItems, Bi as createPluginState, C as settleConversationTitleWork, Ci as bindSlackDirectCredentialSubject, Ea as postSlackEphemeralMessage, Ei as verifySlackDirectCredentialSubject, Fi as getDashboardTaskLink, Fo as readConversationMessageEventSeq, Fs as getConfigDefaults, Ha as clearSandboxEgressSignals, Is as setConfigDefaults, Ka as parseSandboxEgressCredentialToken, Ko as collectAttachmentGarbage, Lr as searchReviewItems, Ma as slackEntitySchema, Mo as readConversationEventPageAfter, Mt as hasRunnableConversationWork, Na as slackExternalRefIdSchema, Ni as getDashboardReviewItemLink, Po as readConversationLastEventSeq, Pt as isInvalidConversationRecordError, Qr as reviewItemReaderForUserInConversation, Rt as pruneActiveConversation, Si as bindScheduledAutomationCredentialSubject, Ta as openSlackModal, Ti as verifyScheduledAutomationCredentialSubject, Tr as createPluginReviewItems, Ua as consumeSandboxEgressAuthRequiredSignal, Vr as canActOnReviewItem, Wa as consumeSandboxEgressPermissionDeniedSignal, Xa as normalizeSandboxEgressTracePropagationDomains, Xo as requestAttachmentDeletion, Yn as createUserTokenStore, Zr as reviewItemReaderForUser, _ as appendConversationMessages, _a as slackMention, _i as findMatchingWatches, _o as createPluginLogger, aa as isVercelSandboxEgressRequest, bi as takeDueTimerWatches, bs as createPluginAnnotations, cr as getPlugins, dr as validatePlugins, dt as CONVERSATION_WORK_STALE_ENQUEUE_MS, er as createPluginEventPublisher, gs as resolveRootVisibility, ii as createCodeChangePublisher, is as getSlackClient, jo as readConversationEventPage, ki as getDashboardConversationLink, ks as createPluginCache, mr as setBriefsConfig, ms as runWithWorkspaceTeamId, nr as getPluginApiRoutes, oa as proxyVercelSandboxEgressRequest, os as isDmChannel, pi as collectEventMatchKeys, ps as getWorkspaceTeamId, ro as createPluginEmbedder, rr as getPluginRoutes, ua as resolveBaseUrl, ur as setPlugins, wi as verifyEventAutomationCredentialSubject, wr as projectConversationMessages, xi as bindEventAutomationCredentialSubject, xo as readConversationAccessFromSql, xs as listConversationAnnotations, zi as setDashboardConversationLinkOptions } from "./projection-CcFBVFUo.js";
|
|
2
|
+
import { d as restoreRuntimeConfig, et as getAttachmentStorage, f as setBotModelConfig, g as snapshotRuntimeConfig, h as setSlackReactionConfig, i as getChatConfig, m as setRuntimeLimits, n as botConfig, o as getSlackBotToken, p as setBotName, u as resetRuntimeConfig } from "./config-CBZp0udd.js";
|
|
3
|
+
import { $ as MUTATION_LOCK_TTL_MS, C as withConversationMutationLock, H as recordGoogleSignIn, I as resolveActorIdentityId, J as disconnectStateAdapter, X as getStateAdapter, a as getConversationStore, gt as createSlackDestination, ht as touchConversationDetail, m as withConversationEventLock, nt as withLock, o as getDb, p as deleteMessageLinks, q as createCache, r as getConversationEventStore, s as getSqlExecutor, t as closeDb, tt as fenceLock } from "./db-DU84dCVu.js";
|
|
4
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, G as normalizeIdentityEmail, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, U as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-BPNTQVFu.js";
|
|
5
|
+
import { C as parseSlackReviewItemClick, E as parseSlackUserInputSubmission, S as buildSlackReviewItemModal, _ as createSlackReviewItemShow, b as findSlackThreadOwnerId, d as publicArtifactHeaders, f as readPublicArtifact, g as scheduledAutomationRunAttributes, h as logScheduledAutomationRunSkipped, n as executeAgentRun, p as unpublishedArtifactHeaders, r as processBackgroundCompaction, t as createAgentRunner, v as resolveSlackReviewItemCardConversationId, w as parseSlackReviewItemFormTarget, y as syncReviewItemSlackCards } from "./agent-runner-C5d6rY5g.js";
|
|
6
|
+
import { $ as SLACK_EVENT_NAMESPACE, F as renderTaskInput, H as annotationKeyDigest, Q as getEventCatalog, U as decodeAnnotationRef, V as renderSlackObjectCard, X as isExperimentalFeatureEnabled, Y as getExperimentalFeatures, Z as setExperimentalFeatures, b as getAuthPausedConversationTurnId, nt as slackChannelMessageReplyThreadTs, rt as slackChannelMessageRunsAutomation, tt as slackChannelMessageEvent } from "./session-stop-uotLtp4g.js";
|
|
7
|
+
import { a as getSandboxResourceConfig, s as setSandboxResourceConfig } from "./install-CQ76CfRw.js";
|
|
8
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-J52Tej47.js";
|
|
9
|
+
import { $ as readObjectLinkTypes, A as isAllowedSignInEmail, B as runAutoArchiveSweep, C as encodeConversationCursor, Ct as getThreadStopDecision, F as actOnReviewItem, I as closeReviewItemsAnsweredByReply, J as backfillCacheWarmingGaps, K as runSavingsRefillSlice, L as readReviewItemForUser, M as resolveAllowedDomains, N as stopConversation, O as assertNoLegacyAllowedDomains, P as ReviewItemActionError, R as reviewItemChange, S as decodeConversationCursor, St as SubscribedReplyReason, T as readConversationPendingMessages, V as setConversationAutoArchive, Y as GET$4, _t as createSlackWebApiStatusSender, at as createProductionConversationWorkOptions, b as createConversationForViewer, bt as stripLeadingBotMention, ct as buildSlackInboundMessage, dt as normalizeIncomingSlackThreadId, ft as withNormalizedThreadId, gt as recordSkippedConversationMessage, ht as failStoppedDispatch, i as readConversationFeed, it as publicAddressLookup, j as readEnvList, k as isAllowedDomain, l as readConversationDetail, lt as clearSlackPendingReactions, mt as enqueueAgentDispatch, n as steerConversationPendingMessagesForViewer, ot as createProductionSlackWebhookServices, rt as isPublicAddress, s as pinConversation, st as getProductionSlackAdapter, t as stopConversationTurnForViewer, ut as slackInboundMessageId, v as readConversationRecordFromSql, vt as bindMessageAuthorIdentityId, w as cancelConversationPendingMessagesForViewer, xt as parseContent, y as appendConversationMessageForViewer, yt as startProcessingReaction, z as archiveViewerDoneConversations } from "./stop-BFVd0P0m.js";
|
|
10
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-BnY9K5WB.js";
|
|
11
11
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-Bkk0XRo2.js";
|
|
12
|
-
import { At as collectAttachmentUploadGarbage, Ci as missingAutomationSkillReason, Ct as conversationTurnIdForMessage, Dt as webActorFromUser, E as processWorkspaceSnapshotJob, Et as recordWebConversationActivity, Gn as setConversationSubscription, Jt as listPendingAgentInvocationMailboxAppends, L as lookupSlackUserProfile, Si as findAutomationSkill, St as appendAndEnqueueWebMessage, Yt as listPendingAgentInvocationResults, bt as reviewItemChangeRecord, ci as ViewerTaskNotFoundError, dt as archiveConversation, fi as readViewerAutomationSummary, fn as enqueueAgentInvocation, k as ingestEvent, mi as readViewerAutomations, pt as markConversationRead, sr as parseSlackThreadId, ui as readViewerAutomationExecutions, vt as deliverReviewItemChange, wi as effectiveTaskOutcomes, yn as recordSubagentEnded, yr as joinPublicChannel, yt as renderReviewItemMessage } from "./warmup
|
|
12
|
+
import { At as collectAttachmentUploadGarbage, Ci as missingAutomationSkillReason, Ct as conversationTurnIdForMessage, Dt as webActorFromUser, E as processWorkspaceSnapshotJob, Et as recordWebConversationActivity, Gn as setConversationSubscription, Jt as listPendingAgentInvocationMailboxAppends, L as lookupSlackUserProfile, Si as findAutomationSkill, St as appendAndEnqueueWebMessage, Yt as listPendingAgentInvocationResults, bt as reviewItemChangeRecord, ci as ViewerTaskNotFoundError, dt as archiveConversation, fi as readViewerAutomationSummary, fn as enqueueAgentInvocation, k as ingestEvent, mi as readViewerAutomations, pt as markConversationRead, sr as parseSlackThreadId, ui as readViewerAutomationExecutions, vt as deliverReviewItemChange, wi as effectiveTaskOutcomes, yn as recordSubagentEnded, yr as joinPublicChannel, yt as renderReviewItemMessage } from "./warmup--Gkz7iB-.js";
|
|
13
13
|
import { H as automationTaskSchema, N as scheduledRunSchema, U as automationTaskText, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-CuA3yEcD.js";
|
|
14
|
-
import { E as notifyAutomationBlocked, G as readScheduledAutomation, I as recordAutomationExecution, J as scheduledRunId, O as existingConversationId, U as listScheduledAutomationsForTeam, X as blockEventAutomation, Y as withScheduledAutomationLock, Z as collectEventAutomationMatchKeys, b as listPendingDispatchMailboxAppends, bt as eventGuidance, c as coerceThreadConversationState, d as confirmDispatchMailboxAppend, et as findMatchingEventAutomations, f as createOrGetDispatch, g as getDispatchRecord, l as buildDispatchId, lt as automationVersionOf, ot as admitEventAutomationRun, p as getDispatchConversationId, q as saveScheduledAutomationInLock, st as eventAutomationRunLimitReason, v as getPluginDispatchProjection, w as markDispatchFailed, y as isTerminalDispatchStatus } from "./turn-session-routing-
|
|
15
|
-
import { I as juniorDestinations, N as juniorConversations, T as juniorConversationEvents, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, x as juniorConversationBriefs } from "./executor-
|
|
14
|
+
import { E as notifyAutomationBlocked, G as readScheduledAutomation, I as recordAutomationExecution, J as scheduledRunId, O as existingConversationId, U as listScheduledAutomationsForTeam, X as blockEventAutomation, Y as withScheduledAutomationLock, Z as collectEventAutomationMatchKeys, b as listPendingDispatchMailboxAppends, bt as eventGuidance, c as coerceThreadConversationState, d as confirmDispatchMailboxAppend, et as findMatchingEventAutomations, f as createOrGetDispatch, g as getDispatchRecord, l as buildDispatchId, lt as automationVersionOf, ot as admitEventAutomationRun, p as getDispatchConversationId, q as saveScheduledAutomationInLock, st as eventAutomationRunLimitReason, v as getPluginDispatchProjection, w as markDispatchFailed, y as isTerminalDispatchStatus } from "./turn-session-routing-2bW2qfeb.js";
|
|
15
|
+
import { I as juniorDestinations, N as juniorConversations, T as juniorConversationEvents, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, x as juniorConversationBriefs } from "./executor-CFyrgOu1.js";
|
|
16
16
|
import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
17
|
-
import { a as queueCallback, c as verifyConversationQueueMessage, f as getQueueProvider, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyBackgroundCompactionMessage, o as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, s as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-
|
|
18
|
-
import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, y as listActiveConversationIds } from "./store-
|
|
17
|
+
import { a as queueCallback, c as verifyConversationQueueMessage, f as getQueueProvider, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyBackgroundCompactionMessage, o as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, s as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-BTqMIfTA.js";
|
|
18
|
+
import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, y as listActiveConversationIds } from "./store-Ca6G962n.js";
|
|
19
19
|
import { a as getNextRunAtMs } from "./schedule-cP0AACm1.js";
|
|
20
|
-
import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-
|
|
20
|
+
import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-icDrueyB.js";
|
|
21
21
|
import { n as readSchedulerSecret, r as readSignInSecret } from "./secrets-DHaJ5TTn.js";
|
|
22
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
22
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-COqnZ1Dx.js";
|
|
23
23
|
import { t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
24
24
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
25
25
|
import { $ as conversationBriefSchema, N as conversationTitleSchema, R as annotationCard, b as conversationSurfaceSchema, v as conversationReportStatusSchema } from "./conversation-BOqdRtUx.js";
|
|
26
|
-
import { i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-
|
|
26
|
+
import { i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-CxUiOraX.js";
|
|
27
27
|
import { b as slackMessageTsSchema, g as slackTeamIdSchema, h as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId, v as parseSlackMessageTs, y as slackMessageTsFromMs } from "./actor-D2iXzvlN.js";
|
|
28
|
-
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-
|
|
29
|
-
import { o as unlinkProvider } from "./connections-
|
|
28
|
+
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-EPG3riWF.js";
|
|
29
|
+
import { o as unlinkProvider } from "./connections-BYmuJ6Vm.js";
|
|
30
30
|
import { s as buttonUserInputField } from "./web-message-id-lNodcCOI.js";
|
|
31
|
-
import { n as verifySlackSignature, t as runWithSlackInstallation } from "./adapter-context-
|
|
32
|
-
import { a as resumeConversationDelivery } from "./conversation-turn-
|
|
33
|
-
import { t as processConversationWork } from "./worker-
|
|
34
|
-
import { t as bindMessageAgent } from "./message-
|
|
35
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
36
|
-
import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-
|
|
37
|
-
import { t as processPluginTask } from "./task-runner-
|
|
38
|
-
import { i as registerVercelCacheWarmupDevConsumer, l as verifyWorkspaceSnapshotJobMessage, n as cacheWarmupQueueConsumer, o as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, r as createVercelCacheWarmupCallback } from "./queue-
|
|
39
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
31
|
+
import { n as verifySlackSignature, t as runWithSlackInstallation } from "./adapter-context-BpvbUki8.js";
|
|
32
|
+
import { a as resumeConversationDelivery } from "./conversation-turn-CI8WDpnK.js";
|
|
33
|
+
import { t as processConversationWork } from "./worker-DJ8d9fmD.js";
|
|
34
|
+
import { t as bindMessageAgent } from "./message-BWJLeQ5e.js";
|
|
35
|
+
import { t as bindSpawnAgent } from "./spawn-CoD3vDuS.js";
|
|
36
|
+
import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-BLPZU6kC.js";
|
|
37
|
+
import { t as processPluginTask } from "./task-runner-xsOPIxCZ.js";
|
|
38
|
+
import { i as registerVercelCacheWarmupDevConsumer, l as verifyWorkspaceSnapshotJobMessage, n as cacheWarmupQueueConsumer, o as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, r as createVercelCacheWarmupCallback } from "./queue-B2AAL3ym.js";
|
|
39
|
+
import { t as JUNIOR_VERSION } from "./version-qROlRQGF.js";
|
|
40
40
|
import { c as conversationPendingMessageDeliverySchema, n as conversationFeedQuerySchema } from "./conversation-feed-CgpgP7yi.js";
|
|
41
41
|
import { createRequire } from "node:module";
|
|
42
42
|
import { Hono } from "hono";
|
|
@@ -1776,14 +1776,9 @@ const eventSchema = z.object({
|
|
|
1776
1776
|
user: z.string().min(1),
|
|
1777
1777
|
external_ref: z.object({
|
|
1778
1778
|
type: z.literal("annotation"),
|
|
1779
|
-
id: slackExternalRefIdSchema
|
|
1779
|
+
id: slackExternalRefIdSchema
|
|
1780
1780
|
})
|
|
1781
1781
|
});
|
|
1782
|
-
const refSchema = z.tuple([
|
|
1783
|
-
z.string().min(1),
|
|
1784
|
-
z.string().min(1),
|
|
1785
|
-
z.string().min(1)
|
|
1786
|
-
]);
|
|
1787
1782
|
/** Show saved annotation facts only to a viewer who can read their Conversation. */
|
|
1788
1783
|
async function presentSlackAnnotationDetails(event, teamId) {
|
|
1789
1784
|
const triggerId = event["trigger_id"];
|
|
@@ -1798,19 +1793,12 @@ async function presentSlackAnnotationDetails(event, teamId) {
|
|
|
1798
1793
|
await missing();
|
|
1799
1794
|
return;
|
|
1800
1795
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
value = JSON.parse(Buffer.from(parsed.data.external_ref.id, "base64url").toString("utf8"));
|
|
1804
|
-
} catch {
|
|
1805
|
-
await missing();
|
|
1806
|
-
return;
|
|
1807
|
-
}
|
|
1808
|
-
const ref = refSchema.safeParse(value);
|
|
1809
|
-
if (!ref.success) {
|
|
1796
|
+
const ref = decodeAnnotationRef(parsed.data.external_ref.id);
|
|
1797
|
+
if (!ref) {
|
|
1810
1798
|
await missing();
|
|
1811
1799
|
return;
|
|
1812
1800
|
}
|
|
1813
|
-
const
|
|
1801
|
+
const { conversationId, keyDigest } = ref;
|
|
1814
1802
|
const db = getDb();
|
|
1815
1803
|
const identity = await readActorIdentity({
|
|
1816
1804
|
platform: "slack",
|
|
@@ -1833,7 +1821,7 @@ async function presentSlackAnnotationDetails(event, teamId) {
|
|
|
1833
1821
|
await missing();
|
|
1834
1822
|
return;
|
|
1835
1823
|
}
|
|
1836
|
-
const annotation = (await listConversationAnnotations(db, conversationId)).find((item) => item.plugin
|
|
1824
|
+
const annotation = (await listConversationAnnotations(db, conversationId)).find((item) => annotationKeyDigest(item.plugin, item.key) === keyDigest);
|
|
1837
1825
|
if (!annotation) {
|
|
1838
1826
|
await missing();
|
|
1839
1827
|
return;
|
|
@@ -1845,7 +1833,10 @@ async function presentSlackAnnotationDetails(event, teamId) {
|
|
|
1845
1833
|
}
|
|
1846
1834
|
await client.entity.presentDetails({
|
|
1847
1835
|
trigger_id: parsed.data.trigger_id,
|
|
1848
|
-
metadata: slackEntitySchema.parse(
|
|
1836
|
+
metadata: slackEntitySchema.parse({
|
|
1837
|
+
...entity,
|
|
1838
|
+
external_ref: parsed.data.external_ref
|
|
1839
|
+
})
|
|
1849
1840
|
});
|
|
1850
1841
|
}
|
|
1851
1842
|
// src/chat/ingress/slack-payload.ts
|