@sentry/junior 0.219.0 → 0.221.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/{agent-DFeJ0yVy.js → agent-CFrfUdN5.js} +65 -71
- package/dist/{agent-hooks-CKaIOT4I.js → agent-hooks-kjLDY-Aa.js} +8 -8
- package/dist/{agent-runner-DifJddqY.js → agent-runner-DMMa36Zl.js} +5 -5
- package/dist/api/schema.d.ts +30 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +80 -19
- package/dist/app.js +33 -160
- package/dist/{auth-pause-state-nAyuKldT.js → auth-pause-state-TdhAyYM4.js} +6 -6
- package/dist/{briefs-D2iu2JPg.js → briefs-CIN2DMSo.js} +4 -4
- package/dist/{catalog-runtime-v3x4peOv.js → catalog-runtime-D1v0KsgY.js} +1 -1
- package/dist/{checkpoint-Cc7ba7dw.js → checkpoint-B2-uc-1h.js} +7 -7
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DVKLZG01.js → client-DIe9JhwF.js} +2 -2
- package/dist/{config-BXIOxlCK.js → config-0_JixokJ.js} +2 -2
- package/dist/{conversation-BpqLg4MM.js → conversation-BSRGzJmY.js} +1 -0
- package/dist/{conversation-privacy-8-WR4KBo.js → conversation-privacy-6NLCEkzx.js} +1 -1
- package/dist/{credential-sync-BOcckr3l.js → credential-sync-Dqg2o90r.js} +21 -21
- package/dist/{execution-stats-G61-pwq6.js → execution-stats-vnXVMVeu.js} +3 -3
- package/dist/{executor-D_aAfzGp.js → executor-CmZKtNpH.js} +1 -1
- package/dist/instrumentation.js +8 -6
- package/dist/{job-queue-DjgMEeqJ.js → job-queue-B1k3woMW.js} +1 -1
- package/dist/{logging-1iHJtqBM.js → logging-D2YJv_PA.js} +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-wwYSbTaU.js → oauth-callback-server-BQtO5l5M.js} +2 -2
- package/dist/{pending-auth-B2qOCIx1.js → pending-auth-DuSNoTpn.js} +2 -2
- package/dist/{profile-B4e6XN37.js → profile-C3TEFAVI.js} +4 -4
- package/dist/{prompt-DAoaq0CT.js → prompt-BkaHwBW0.js} +1 -1
- package/dist/{registry-C0DT9wqc.js → registry-Bp0kd2xe.js} +1 -1
- package/dist/{resolve-DugfbPdI.js → resolve-BABNNBLL.js} +2 -2
- package/dist/{runner-RE9Lp-M8.js → runner-Bvn90ijl.js} +10 -10
- package/dist/{sandbox-egress-signals-BqkV7azF.js → sandbox-egress-signals-DLfYAOiO.js} +1 -1
- package/dist/{schema-BMG8MJPJ.js → schema-YPJXVcOW.js} +1 -1
- package/dist/{short-title-C7tWtQQy.js → short-title-C2fM-ERl.js} +2 -2
- package/dist/{skills-B6OcxCOp.js → skills-D1otDVYp.js} +2 -2
- package/dist/{spawn-BmZvmNYc.js → spawn-C-fAS-Rk.js} +2 -2
- package/dist/{stats-BtMLD1n8.js → stats-BfUFTUrM.js} +33 -8
- package/dist/{task-queue-a2aXjkx2.js → task-queue-VdYCCwO0.js} +3 -3
- package/dist/{task-runner-Bg2trvKT.js → task-runner-6tzKHNbM.js} +8 -8
- package/dist/{thread-state-D4zlHEq1.js → thread-state-CD_fsyrM.js} +5 -5
- package/dist/{turn-execution-CgCTt4YP.js → turn-execution-eVhqozjK.js} +3 -3
- package/dist/{turn-lifecycle-ClF1kY55.js → turn-lifecycle-CxAtVANu.js} +1 -1
- package/dist/{validation-CGkLLzS9.js → validation-CMERqrCD.js} +1 -1
- package/dist/{version-CZfM8Kly.js → version-C8XFxpkQ.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DCSwmiua.js → web-authorization-Dq2NDhY0.js} +1 -1
- package/dist/{web-input-CQrFGEv9.js → web-input-Bdh_rCZ7.js} +4 -4
- package/dist/{work-lRFwhKJe.js → work-DCwaUeWu.js} +9 -9
- package/dist/{worker-BV4FekSX.js → worker-grswNVoc.js} +5 -5
- package/migrations/0043_scheduled_automation_channel_destinations.sql +36 -0
- package/migrations/meta/0043_snapshot.json +3610 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +4 -4
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-
|
|
2
|
-
import { C as withSpan, F as isRecord$2, P as normalizeIdentityEmail, S as withLogContext, _ as setSpanAttributes, a as extractGenAiUsageSummary, b as summarizeMessageText, c as getTracePropagationHeaders, d as logInfo, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as logError, p as normalizeGenAiFinishReason, s as getLogContextAttributesForSpan, u as logException, v as setSpanStatus, y as setTags } from "./logging-
|
|
1
|
+
import { C as resolveGatewayCredential, S as getGatewayApiKey, _ as findProviderError, b as isProviderRetryError, c as COMPACTION_SUMMARY_PREFIX, d as isCompactionSummaryText, f as renderCurrentInstruction, g as createProviderError, h as ProviderError, i as completeText, l as MODEL_HANDOFF_SUMMARY_PREFIX, m as escapeXml, n as GEN_AI_SERVER_ADDRESS, o as resolveGatewayModel, p as unwrapCurrentInstruction, r as completeObject, s as ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX, t as GEN_AI_PROVIDER_NAME, u as hasCompactedConversationContext, v as getProviderErrorAttributes, x as MISSING_GATEWAY_CREDENTIALS_ERROR } from "./client-DIe9JhwF.js";
|
|
2
|
+
import { C as withSpan, F as isRecord$2, P as normalizeIdentityEmail, S as withLogContext, _ as setSpanAttributes, a as extractGenAiUsageSummary, b as summarizeMessageText, c as getTracePropagationHeaders, d as logInfo, f as logWarn, h as serializeGenAiAttribute, i as extractGenAiUsageAttributes, l as logError, p as normalizeGenAiFinishReason, s as getLogContextAttributesForSpan, u as logException, v as setSpanStatus, y as setTags } from "./logging-D2YJv_PA.js";
|
|
3
3
|
import { m as startInactiveSpan, v as withActiveSpan } from "./sentry-CgWZM_kV.js";
|
|
4
|
-
import { a as toCanonicalInputMessage, c as toGenAiPayloadMetadata, i as runWithConversationPrivacy, l as toGenAiPayloadTraceAttributes, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes, t as canExposeConversationPayload } from "./conversation-privacy-
|
|
5
|
-
import { h as normalizeSlackEmojiName, n as botConfig } from "./config-
|
|
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-6NLCEkzx.js";
|
|
5
|
+
import { h as normalizeSlackEmojiName, n as botConfig } from "./config-0_JixokJ.js";
|
|
6
6
|
import { a as modelIdForProfile, c as TURN_REASONING_LEVELS, i as formatModelProfiles, o as modelProfileSchema, r as formatModelProfile, s as profileConfig, t as ModelProfileNotConfiguredError } from "./model-profile-CZmVoGdX.js";
|
|
7
7
|
import { _ as parseSlackMessageTs, g as parseSlackUserId, h as parseSlackTeamId, i as credentialUserSubjectId, l as isUserActor, m as parseSlackChannelReferenceId, n as credentialContextSchema, p as parseSlackChannelId, t as credentialContextForActor } from "./context-Bplcgypl.js";
|
|
8
|
-
import { A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild, Gt as getDb, Ht as getConversationEventStore, J as withSlackRetries, K as normalizeSlackConversationId, Kt as getSqlExecutor, M as resolveChannelCapabilities, O as deleteWorkspaceSnapshotBuilders, Q as readActorIdentity, S as WorkspaceValidationError, T as setWorkspaceSnapshot, U as getSlackClient, Ut as getConversationMessageSearchStore, V as getFilePermalink, W as isConversationScopedChannel, Wt as getConversationStore, _ as deleteWorkspace, at as STOP_WATCHING_TOOL_NAME, b as listWorkspaces, bt as createPluginLogger, c as getPluginTools, dt as findMatchingWatches, en as addAgentTurnUsage, ft as listWatches, g as createWorkspace, ht as getDashboardTaskLink, in as hasAgentTurnUsage, it as RESOURCE_WATCH_TOOL_SOURCE, j as workspaceRepoCheckoutPath, k as getWorkspaceSnapshotBuilder, l as getPluginUserPromptContributions, lt as createWatch, mt as getDashboardConversationLink, nt as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as cancelWatch, tt as getSlackToolContext, u as getPlugins, un as parseDestination, ut as deliverWatch, v as getWorkspace, w as loadSnapshotsForProfile, x as updateWorkspace, y as getWorkspaceByName, z as SlackActionError } from "./agent-hooks-
|
|
8
|
+
import { A as tryWorkspaceRepoCheckoutPath, B as downloadPrivateSlackFile, C as invalidateReadySnapshot, D as SANDBOX_RUNTIME, E as setWorkspaceSnapshotBuild, Gt as getDb, Ht as getConversationEventStore, J as withSlackRetries, K as normalizeSlackConversationId, Kt as getSqlExecutor, M as resolveChannelCapabilities, O as deleteWorkspaceSnapshotBuilders, Q as readActorIdentity, S as WorkspaceValidationError, T as setWorkspaceSnapshot, U as getSlackClient, Ut as getConversationMessageSearchStore, V as getFilePermalink, W as isConversationScopedChannel, Wt as getConversationStore, _ as deleteWorkspace, at as STOP_WATCHING_TOOL_NAME, b as listWorkspaces, bt as createPluginLogger, c as getPluginTools, dt as findMatchingWatches, en as addAgentTurnUsage, ft as listWatches, g as createWorkspace, ht as getDashboardTaskLink, in as hasAgentTurnUsage, it as RESOURCE_WATCH_TOOL_SOURCE, j as workspaceRepoCheckoutPath, k as getWorkspaceSnapshotBuilder, l as getPluginUserPromptContributions, lt as createWatch, mt as getDashboardConversationLink, nt as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, ot as cancelSubscriptions, pt as JUNIOR_THREAD_STATE_TTL_MS, r as createPluginHookRunner, s as getPluginSystemPromptContributions, st as cancelWatch, tt as getSlackToolContext, u as getPlugins, un as parseDestination, ut as deliverWatch, v as getWorkspace, w as loadSnapshotsForProfile, x as updateWorkspace, y as getWorkspaceByName, z as SlackActionError } from "./agent-hooks-kjLDY-Aa.js";
|
|
9
9
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
10
|
-
import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-
|
|
11
|
-
import { A as briefLinkSchema, G as sameActorIdentity, H as contextProvenance, M as conversationBriefSchema, P as KNOWN_CONVERSATION_EVENT_TYPES, U as instructionActors, W as instructionProvenanceFor, j as briefOutcomeStatusSchema } from "./conversation-
|
|
10
|
+
import { D as juniorIdentities, E as juniorConversations, a as juniorSchedulerRuns, d as AGENT_INVOCATION_MAILBOX_STATUSES, g as juniorConversationBriefs, k as juniorArtifacts, w as juniorAttachments, x as juniorConversationAnnotations } from "./executor-CmZKtNpH.js";
|
|
11
|
+
import { A as briefLinkSchema, G as sameActorIdentity, H as contextProvenance, M as conversationBriefSchema, P as KNOWN_CONVERSATION_EVENT_TYPES, U as instructionActors, W as instructionProvenanceFor, j as briefOutcomeStatusSchema } from "./conversation-BSRGzJmY.js";
|
|
12
12
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-7a9YqLhE.js";
|
|
13
|
-
import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-
|
|
14
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
15
|
-
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-
|
|
16
|
-
import { A as TURN_CONTEXT_TAG, C as isContinuablePiBoundary, D as retainRuntimeTurnContext, E as normalizeToolNameFromResult, H as recordAuthorizationRequested, I as loadTurnRoute, K as recordToolExecutionStarted, L as openConversationProjection, N as loadConnectedMcpProviders, O as stripRuntimeTurnContext, P as loadConversationProjection, R as recordAgentsInstructionsUpdated, S as isAssistantMessage, T as isToolResultMessage, U as recordGuardianActionReviewed, W as recordMcpProviderConnected, _ as getPiMessageRole, b as hasRuntimeTurnContext, dt as estimateTextTokens, f as TurnSliceLimitExceededError, ft as getAgentContextCompactionTriggerTokens, g as extractAssistantText, h as isTurnExecutionLimitExceededError, ht as piMessageFromHistoryItem, k as trimTrailingAssistantMessages, mt as historyItemFromPiMessage, n as loadTurnCheckpoint, p as assertTurnToolCallLimit, pt as getAgentContextInputLimitTokens, q as recordTurnRoute, r as saveTurnCheckpoint, t as continuableMessages, v as getTerminalAssistantMessages, w as isToolResultError, y as getUserMessageInstructionText, z as recordAttachmentsDelivered } from "./checkpoint-
|
|
17
|
-
import { n as generateShortTitle, r as resolveTaskTitle } from "./short-title-
|
|
18
|
-
import { A as sleep$1, D as fenceLock, E as acquireActiveLock, F as sandboxSkillDir, I as sandboxSkillFile, L as sandboxSkillPathResolution, M as SANDBOX_REPOS_ROOT, N as SANDBOX_SKILLS_ROOT, P as SANDBOX_WORKSPACE_ROOT, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_DATA_ROOT, k as withLock, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-
|
|
19
|
-
import { $ as workspaceSnapshotFinishedEvent, B as createEventAutomation, C as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, D as eventAutomationMatchesDestination, E as eventAutomationListToolResultSchema, F as effectiveTaskOutcomes, Gt as makeStructuredToolOutput, I as moveTaskOutcomes, Jt as ToolInputError, L as resolveTaskOutcomes, M as requireEventAutomationSlackContext, N as requireSupportedEventAutomationTrigger, O as eventAutomationToolResult, P as writableEventAutomation, Q as WORKSPACE_SNAPSHOT_READY_EVENT, R as taskOutcomeInputSchema, T as compactEventAutomation, Ut as injectContinuationToolName, V as deleteEventAutomation, W as getEventAutomation, Wt as juniorToolOutputSchema, X as getEventCatalog, Y as saveEventAutomation, Z as WORKSPACE_SNAPSHOT_FAILED_EVENT, at as normalizeCatalogEventIdentifier, c as parseSlackThreadId, ct as registeredEventTypeSchema, et as workspaceSnapshotWatch, f as createScheduledAutomation, g as listScheduledAutomationsForTeam, i as readLiveAttachment, it as hasPluginEventCatalogEntries, j as registeredEventAutomationTriggerSchema, k as eventAutomationToolResultSchema, lt as registeredResourceTypeSchema, nt as eventNamespaceSchema, ot as pluginSupportsEvent, pt as appendAndEnqueueInboundMessage, q as listEventAutomationsForTeam, rt as hasEventCatalogEntries, s as storeAttachments, st as registeredEventMatchSchema, t as incrementStat, tt as eventGuidance, ut as requireSupportedEventMatch, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-
|
|
20
|
-
import { _ as isTurnInputCommitLostError, c as sanitizeAssistantText, f as CooperativeTurnYieldError, l as NO_REPLY_MARKER, n as canReusePendingAuthLink, o as decideReply, p as TurnInputCommitLostError, s as getAssistantReplyText, t as abandonReplacedPendingAuth, u as isNoReplyMarker } from "./pending-auth-
|
|
21
|
-
import { C as toolInvocationDestination, S as surfaceFromRun, _ as uploadFilesToConversation, b as assertRunConsistency, h as postSlackMessage, i as formatProviderLabel, m as getSlackMessagePermalink, o as resolveBaseUrl, p as addReactionToMessage, r as deliverOAuthAuthorization, s as startOAuthFlow, v as RetryableDeliveryError, x as isAgentRunFeatureDisabled, y as actorFromRun } from "./agent-runner-
|
|
22
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
23
|
-
import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-
|
|
13
|
+
import { a as resolveAuthTokenPlaceholder, c as fetchWithBoundedOAuthErrorBodies, d as CredentialUnavailableError, i as resolvePluginHeaderEnvRefs, l as getOAuthProviderErrorAttributes, o as resolvePluginCommandEnv, s as OAuthProviderError } from "./registry-Bp0kd2xe.js";
|
|
14
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.js";
|
|
15
|
+
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-D1otDVYp.js";
|
|
16
|
+
import { A as TURN_CONTEXT_TAG, C as isContinuablePiBoundary, D as retainRuntimeTurnContext, E as normalizeToolNameFromResult, H as recordAuthorizationRequested, I as loadTurnRoute, K as recordToolExecutionStarted, L as openConversationProjection, N as loadConnectedMcpProviders, O as stripRuntimeTurnContext, P as loadConversationProjection, R as recordAgentsInstructionsUpdated, S as isAssistantMessage, T as isToolResultMessage, U as recordGuardianActionReviewed, W as recordMcpProviderConnected, _ as getPiMessageRole, b as hasRuntimeTurnContext, dt as estimateTextTokens, f as TurnSliceLimitExceededError, ft as getAgentContextCompactionTriggerTokens, g as extractAssistantText, h as isTurnExecutionLimitExceededError, ht as piMessageFromHistoryItem, k as trimTrailingAssistantMessages, mt as historyItemFromPiMessage, n as loadTurnCheckpoint, p as assertTurnToolCallLimit, pt as getAgentContextInputLimitTokens, q as recordTurnRoute, r as saveTurnCheckpoint, t as continuableMessages, v as getTerminalAssistantMessages, w as isToolResultError, y as getUserMessageInstructionText, z as recordAttachmentsDelivered } from "./checkpoint-B2-uc-1h.js";
|
|
17
|
+
import { n as generateShortTitle, r as resolveTaskTitle } from "./short-title-C2fM-ERl.js";
|
|
18
|
+
import { A as sleep$1, D as fenceLock, E as acquireActiveLock, F as sandboxSkillDir, I as sandboxSkillFile, L as sandboxSkillPathResolution, M as SANDBOX_REPOS_ROOT, N as SANDBOX_SKILLS_ROOT, P as SANDBOX_WORKSPACE_ROOT, _ as workspaceSnapshotNotReadyUserMessage, a as isAbortError, b as buildNonInteractiveShellScript, c as isSandboxCommandStreamInterruptedError, d as isSnapshottingError, f as throwSandboxOperationError, g as isWorkspaceSnapshotNotReadyError, h as getWorkspaceSnapshotNotReadyError, i as ensureDockerDaemon, j as SANDBOX_DATA_ROOT, k as withLock, l as isSandboxMissingError, m as WorkspaceSnapshotNotReadyError, n as hash, o as isAlreadyExistsError, p as wrapSandboxSetupError, r as isStale, s as isSandboxApiTransientError, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand, y as buildCommandScript } from "./profile-C3TEFAVI.js";
|
|
19
|
+
import { $ as workspaceSnapshotFinishedEvent, B as createEventAutomation, C as SCHEDULED_AUTOMATION_SYSTEM_ACTOR, D as eventAutomationMatchesDestination, E as eventAutomationListToolResultSchema, F as effectiveTaskOutcomes, Gt as makeStructuredToolOutput, I as moveTaskOutcomes, Jt as ToolInputError, L as resolveTaskOutcomes, M as requireEventAutomationSlackContext, N as requireSupportedEventAutomationTrigger, O as eventAutomationToolResult, P as writableEventAutomation, Q as WORKSPACE_SNAPSHOT_READY_EVENT, R as taskOutcomeInputSchema, T as compactEventAutomation, Ut as injectContinuationToolName, V as deleteEventAutomation, W as getEventAutomation, Wt as juniorToolOutputSchema, X as getEventCatalog, Y as saveEventAutomation, Z as WORKSPACE_SNAPSHOT_FAILED_EVENT, at as normalizeCatalogEventIdentifier, c as parseSlackThreadId, ct as registeredEventTypeSchema, et as workspaceSnapshotWatch, f as createScheduledAutomation, g as listScheduledAutomationsForTeam, i as readLiveAttachment, it as hasPluginEventCatalogEntries, j as registeredEventAutomationTriggerSchema, k as eventAutomationToolResultSchema, lt as registeredResourceTypeSchema, nt as eventNamespaceSchema, ot as pluginSupportsEvent, pt as appendAndEnqueueInboundMessage, q as listEventAutomationsForTeam, rt as hasEventCatalogEntries, s as storeAttachments, st as registeredEventMatchSchema, t as incrementStat, tt as eventGuidance, ut as requireSupportedEventMatch, v as readScheduledAutomation, y as saveScheduledAutomation } from "./stats-BfUFTUrM.js";
|
|
20
|
+
import { _ as isTurnInputCommitLostError, c as sanitizeAssistantText, f as CooperativeTurnYieldError, l as NO_REPLY_MARKER, n as canReusePendingAuthLink, o as decideReply, p as TurnInputCommitLostError, s as getAssistantReplyText, t as abandonReplacedPendingAuth, u as isNoReplyMarker } from "./pending-auth-DuSNoTpn.js";
|
|
21
|
+
import { C as toolInvocationDestination, S as surfaceFromRun, _ as uploadFilesToConversation, b as assertRunConsistency, h as postSlackMessage, i as formatProviderLabel, m as getSlackMessagePermalink, o as resolveBaseUrl, p as addReactionToMessage, r as deliverOAuthAuthorization, s as startOAuthFlow, v as RetryableDeliveryError, x as isAgentRunFeatureDisabled, y as actorFromRun } from "./agent-runner-DMMa36Zl.js";
|
|
22
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-BkaHwBW0.js";
|
|
23
|
+
import { a as createSandboxSession, c as postinstall, d as getSandboxResources, i as bindSandboxFileSystem, l as setSnapshotSpanAttributes, n as isMissingError, o as stopSession, r as resolve$1, s as dependencies } from "./resolve-BABNNBLL.js";
|
|
24
24
|
import { t as getVercelConversationWorkQueue } from "./vercel-queue-DIkVcfK4.js";
|
|
25
|
-
import { a as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-
|
|
25
|
+
import { a as getTurnRequestDeadline, n as sendNextWorkspaceSnapshotJob, r as sendWorkspaceSnapshotJob } from "./job-queue-B1k3woMW.js";
|
|
26
26
|
import { n as privateTraceResultAttributes } from "./private-trace-result-BLvBjy_e.js";
|
|
27
27
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
28
28
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -8680,8 +8680,8 @@ const scheduleListToolResultSchema = juniorToolOutputSchema.extend({
|
|
|
8680
8680
|
function throwToolInputError(error) {
|
|
8681
8681
|
throw new ToolInputError(error);
|
|
8682
8682
|
}
|
|
8683
|
-
/**
|
|
8684
|
-
function
|
|
8683
|
+
/** Resolve the active Slack channel for scheduled automation operations. */
|
|
8684
|
+
function requireActiveChannel(context) {
|
|
8685
8685
|
const parsed = sourceSchema.safeParse(context.source);
|
|
8686
8686
|
if (!parsed.success) {
|
|
8687
8687
|
const source = context.source;
|
|
@@ -8696,8 +8696,7 @@ function requireActiveConversation(context) {
|
|
|
8696
8696
|
return {
|
|
8697
8697
|
platform: "slack",
|
|
8698
8698
|
teamId: parsed.data.teamId,
|
|
8699
|
-
channelId: parsed.data.channelId
|
|
8700
|
-
threadTs: parsed.data.threadTs ?? parsed.data.messageTs
|
|
8699
|
+
channelId: parsed.data.channelId
|
|
8701
8700
|
};
|
|
8702
8701
|
}
|
|
8703
8702
|
/** Require a concrete Slack actor before creating scheduler ownership state. */
|
|
@@ -8729,14 +8728,14 @@ function getConversationAccess(destination, source) {
|
|
|
8729
8728
|
visibility: source?.visibility === "public" ? "public" : "private"
|
|
8730
8729
|
};
|
|
8731
8730
|
}
|
|
8732
|
-
/** Keep scheduler management operations bound to the task's current Slack
|
|
8731
|
+
/** Keep scheduler management operations bound to the task's current Slack channel. */
|
|
8733
8732
|
function sameDestination(task, destination) {
|
|
8734
8733
|
const taskDestination = task.destination;
|
|
8735
8734
|
return taskDestination.platform === "slack" && taskDestination.teamId === destination.teamId && taskDestination.channelId === destination.channelId;
|
|
8736
8735
|
}
|
|
8737
8736
|
/** Look up a mutable task only after enforcing active-conversation ownership. */
|
|
8738
8737
|
async function getWritableTask(args) {
|
|
8739
|
-
const destination =
|
|
8738
|
+
const destination = requireActiveChannel(args.context);
|
|
8740
8739
|
const task = await readScheduledAutomation(getDb(), args.taskId);
|
|
8741
8740
|
if (!task || task.status === "deleted") throwToolInputError("Scheduled automation was not found in the active Slack conversation.");
|
|
8742
8741
|
if (!sameDestination(task, destination)) throwToolInputError("Scheduled automation can only be managed from the Slack destination where it currently delivers.");
|
|
@@ -8767,7 +8766,7 @@ function compactTask(task, requesterSlackUserId) {
|
|
|
8767
8766
|
nextRunAt: task.nextRunAtMs ? new Date(task.nextRunAtMs).toISOString() : null,
|
|
8768
8767
|
destination: {
|
|
8769
8768
|
channel: task.destination.channelId,
|
|
8770
|
-
thread:
|
|
8769
|
+
thread: null
|
|
8771
8770
|
},
|
|
8772
8771
|
conversationAccess: task.conversationAccess,
|
|
8773
8772
|
credentialMode: task.credentialMode,
|
|
@@ -8832,13 +8831,12 @@ function createSlackScheduleCreateAutomationTool(context) {
|
|
|
8832
8831
|
openWorldHint: true,
|
|
8833
8832
|
readOnlyHint: false
|
|
8834
8833
|
},
|
|
8835
|
-
description: "Create a one-time or recurring Junior task in the active Slack
|
|
8834
|
+
description: "Create a one-time or recurring Junior task in the active Slack channel.",
|
|
8836
8835
|
executionMode: "sequential",
|
|
8837
8836
|
inputSchema: z.object({
|
|
8838
8837
|
instruction: z.string().min(1).max(4e3),
|
|
8839
8838
|
title: z.string().trim().min(1).max(60).nullable().describe("Optional short display title. Omit or use null to generate one from the task instruction.").optional(),
|
|
8840
8839
|
schedule: scheduleIntentSchema.describe("When the task runs. The scheduler computes the exact next run from this intent and the server clock."),
|
|
8841
|
-
destination: z.literal("channel").nullable().describe("Set to \"channel\" to post at the active channel top level. Omit to use this Slack conversation.").optional(),
|
|
8842
8840
|
outcomes: z.array(taskOutcomeInputSchema).max(5).describe("Successful work is silent by default. Omit this field or use an empty list when the Automation should act through tools without a status message. Add send_message only when the user asks for a reminder, post, digest, summary, or other visible result.").optional(),
|
|
8843
8841
|
credentialMode: z.enum(["creator", "system"]).nullable().describe("Use creator to make the task creator's connected credentials available, or system when the creator says not to use them. Omit or use null for the creator default.").optional()
|
|
8844
8842
|
}).strict(),
|
|
@@ -8850,12 +8848,7 @@ function createSlackScheduleCreateAutomationTool(context) {
|
|
|
8850
8848
|
},
|
|
8851
8849
|
outputSchema: scheduleAutomationToolResultSchema,
|
|
8852
8850
|
execute: async (input, options) => {
|
|
8853
|
-
const
|
|
8854
|
-
const destination = input.destination === "channel" ? {
|
|
8855
|
-
platform: "slack",
|
|
8856
|
-
teamId: activeDestination.teamId,
|
|
8857
|
-
channelId: activeDestination.channelId
|
|
8858
|
-
} : activeDestination;
|
|
8851
|
+
const destination = requireActiveChannel(context);
|
|
8859
8852
|
const actor = requireActor(context, destination);
|
|
8860
8853
|
const id = buildTaskId({
|
|
8861
8854
|
actor,
|
|
@@ -9007,7 +9000,7 @@ function createSlackScheduleListAutomationsTool(context) {
|
|
|
9007
9000
|
}).strict(),
|
|
9008
9001
|
outputSchema: scheduleListToolResultSchema,
|
|
9009
9002
|
execute: async (input) => {
|
|
9010
|
-
const destination =
|
|
9003
|
+
const destination = requireActiveChannel(context);
|
|
9011
9004
|
const actor = requireActor(context, destination);
|
|
9012
9005
|
let channelId;
|
|
9013
9006
|
if (input.channel_id != null) {
|
|
@@ -9080,7 +9073,7 @@ function createSlackScheduleUpdateAutomationTool(context) {
|
|
|
9080
9073
|
openWorldHint: true,
|
|
9081
9074
|
readOnlyHint: false
|
|
9082
9075
|
},
|
|
9083
|
-
description: "Update a scheduled automation. Set destination to \"here\"
|
|
9076
|
+
description: "Update a scheduled automation. Set destination to \"here\" to move it to the active Slack channel.",
|
|
9084
9077
|
executionMode: "sequential",
|
|
9085
9078
|
inputSchema: z.object({
|
|
9086
9079
|
automationId: z.string().min(1).describe("Scheduled automation ID returned by slackScheduleListAutomations."),
|
|
@@ -9088,12 +9081,12 @@ function createSlackScheduleUpdateAutomationTool(context) {
|
|
|
9088
9081
|
schedule: scheduleIntentSchema.describe("Complete replacement schedule. Omit to keep it unchanged.").nullable().optional(),
|
|
9089
9082
|
outcomes: z.array(taskOutcomeInputSchema).max(5).describe("Replacement messages to send after successful work. Use an empty list to send nothing. Omit to keep unchanged.").optional(),
|
|
9090
9083
|
status: z.enum(["active", "blocked"]).describe("Set active to resume a blocked task, or blocked to stop dispatch.").optional(),
|
|
9091
|
-
destination: z.
|
|
9084
|
+
destination: z.literal("here").nullable().describe("Set to \"here\" to move the creator's task into the active Slack channel. Omit to keep its destination.").optional(),
|
|
9092
9085
|
credentialMode: z.enum(["system", "creator"]).nullable().describe("Use creator credentials or system credentials. Only the task creator may enable creator mode. Omit to keep unchanged.").optional()
|
|
9093
9086
|
}).strict(),
|
|
9094
9087
|
outputSchema: scheduleAutomationToolResultSchema,
|
|
9095
9088
|
execute: async (input) => {
|
|
9096
|
-
const activeDestination =
|
|
9089
|
+
const activeDestination = requireActiveChannel(context);
|
|
9097
9090
|
const actor = requireActor(context, activeDestination);
|
|
9098
9091
|
const db = getDb();
|
|
9099
9092
|
const lookup = await readScheduledAutomation(db, input.automationId);
|
|
@@ -9102,18 +9095,14 @@ function createSlackScheduleUpdateAutomationTool(context) {
|
|
|
9102
9095
|
if (lookup.destination.platform !== "slack") throwToolInputError("Scheduled automation destination is invalid.");
|
|
9103
9096
|
if (lookup.destination.teamId !== activeDestination.teamId) throwToolInputError("Scheduled automations can only be managed within the same Slack workspace.");
|
|
9104
9097
|
const moveDestination = input.destination != null;
|
|
9105
|
-
const requestedDestination =
|
|
9106
|
-
platform: "slack",
|
|
9107
|
-
teamId: activeDestination.teamId,
|
|
9108
|
-
channelId: activeDestination.channelId
|
|
9109
|
-
} : activeDestination;
|
|
9098
|
+
const requestedDestination = activeDestination;
|
|
9110
9099
|
const alreadyHere = sameDestination(lookup, activeDestination);
|
|
9111
9100
|
const isCreator = actor.slackUserId === lookup.createdBy.slackUserId;
|
|
9112
9101
|
if (!alreadyHere && !moveDestination) throwToolInputError("Scheduled automation can only be managed from the Slack destination where it currently delivers. Set destination to \"here\" to move it into this conversation.");
|
|
9113
9102
|
if (moveDestination && !isCreator) throwToolInputError("Only the scheduled automation creator can move this task.");
|
|
9114
9103
|
if (input.credentialMode === "creator" && !isCreator) throwToolInputError("Only the scheduled automation creator can enable creator credential use.");
|
|
9115
9104
|
if (input.outcomes !== void 0 && !isCreator) throwToolInputError("Only the scheduled automation creator can change message destinations.");
|
|
9116
|
-
const changingDestination = moveDestination &&
|
|
9105
|
+
const changingDestination = moveDestination && !alreadyHere;
|
|
9117
9106
|
if (changingDestination) {
|
|
9118
9107
|
if ((await db.select({ id: juniorSchedulerRuns.id }).from(juniorSchedulerRuns).where(and(eq(juniorSchedulerRuns.taskId, lookup.id), inArray(juniorSchedulerRuns.status, ["pending", "running"]))).limit(1)).length > 0) throwToolInputError("Scheduled automation cannot be moved while an occurrence is already running. Try again after the current run finishes.");
|
|
9119
9108
|
}
|
|
@@ -9520,19 +9509,19 @@ function createSlackChannelListMessagesTool(context) {
|
|
|
9520
9509
|
readOnlyHint: true
|
|
9521
9510
|
},
|
|
9522
9511
|
inputSchema: z.object({
|
|
9523
|
-
channel_id: slackChannelRefParam.optional(),
|
|
9524
|
-
limit: z.coerce.number().int().min(1).max(1e3).describe("Maximum number of messages to return across pages.").optional(),
|
|
9525
|
-
cursor: z.string().min(1).describe("
|
|
9526
|
-
oldest: slackTimestampParam("Oldest message timestamp (Slack ts) for range filtering.").optional(),
|
|
9527
|
-
latest: slackTimestampParam("Latest message timestamp (Slack ts) for range filtering.").optional(),
|
|
9528
|
-
inclusive: booleanInput$1("Whether oldest/latest bounds should be inclusive.").optional(),
|
|
9529
|
-
max_pages: z.coerce.number().int().min(1).max(10).describe("Maximum number of API pages to traverse in a single call.").optional()
|
|
9512
|
+
channel_id: slackChannelRefParam.nullable().optional(),
|
|
9513
|
+
limit: z.coerce.number().int().min(1).max(1e3).describe("Maximum number of messages to return across pages.").nullable().optional(),
|
|
9514
|
+
cursor: z.string().min(1).describe("Cursor from `next_cursor` in a prior result. Use null or omit it for the first page; never invent a cursor.").nullable().optional(),
|
|
9515
|
+
oldest: slackTimestampParam("Oldest message timestamp (Slack ts) for range filtering.").nullable().optional(),
|
|
9516
|
+
latest: slackTimestampParam("Latest message timestamp (Slack ts) for range filtering.").nullable().optional(),
|
|
9517
|
+
inclusive: booleanInput$1("Whether oldest/latest bounds should be inclusive.").nullable().optional(),
|
|
9518
|
+
max_pages: z.coerce.number().int().min(1).max(10).describe("Maximum number of API pages to traverse in a single call.").nullable().optional()
|
|
9530
9519
|
}),
|
|
9531
9520
|
outputSchema: juniorToolOutputSchema,
|
|
9532
9521
|
execute: async ({ channel_id, limit, cursor, oldest, latest, inclusive, max_pages }) => {
|
|
9533
9522
|
const target = await resolveOptionalSlackChannelRef({
|
|
9534
9523
|
field: "channel_id",
|
|
9535
|
-
value: channel_id,
|
|
9524
|
+
value: channel_id ?? void 0,
|
|
9536
9525
|
defaultChannelId: context.destinationChannelId,
|
|
9537
9526
|
teamId: context.teamId
|
|
9538
9527
|
});
|
|
@@ -9543,18 +9532,18 @@ function createSlackChannelListMessagesTool(context) {
|
|
|
9543
9532
|
teamId: context.teamId
|
|
9544
9533
|
});
|
|
9545
9534
|
if (!access.allowed) throw new ToolInputError(access.error);
|
|
9546
|
-
const normalizedOldest = normalizeRangeTimestamp("oldest", oldest, targetChannelId);
|
|
9535
|
+
const normalizedOldest = normalizeRangeTimestamp("oldest", oldest ?? void 0, targetChannelId);
|
|
9547
9536
|
if (!normalizedOldest.ok) throw new ToolInputError(normalizedOldest.error);
|
|
9548
|
-
const normalizedLatest = normalizeRangeTimestamp("latest", latest, targetChannelId);
|
|
9537
|
+
const normalizedLatest = normalizeRangeTimestamp("latest", latest ?? void 0, targetChannelId);
|
|
9549
9538
|
if (!normalizedLatest.ok) throw new ToolInputError(normalizedLatest.error);
|
|
9550
9539
|
const readHistory = async () => listChannelMessages({
|
|
9551
9540
|
channelId: targetChannelId,
|
|
9552
9541
|
limit: limit ?? 100,
|
|
9553
|
-
cursor,
|
|
9542
|
+
cursor: cursor ?? void 0,
|
|
9554
9543
|
oldest: normalizedOldest.value,
|
|
9555
9544
|
latest: normalizedLatest.value,
|
|
9556
|
-
inclusive,
|
|
9557
|
-
maxPages: max_pages
|
|
9545
|
+
inclusive: inclusive ?? void 0,
|
|
9546
|
+
maxPages: max_pages ?? void 0
|
|
9558
9547
|
});
|
|
9559
9548
|
let result;
|
|
9560
9549
|
let joined = false;
|
|
@@ -9995,13 +9984,13 @@ function createSlackPublicSearchTool(actionToken) {
|
|
|
9995
9984
|
},
|
|
9996
9985
|
inputSchema: z.object({
|
|
9997
9986
|
query: z.string().trim().min(1).max(500).describe("Slack search query."),
|
|
9998
|
-
content_types: z.array(z.enum(CONTENT_TYPES)).min(1).max(4).describe("Content types to include.
|
|
9999
|
-
after: optionalUnixTimestampParam("Unix timestamp lower bound."),
|
|
10000
|
-
before: optionalUnixTimestampParam("Unix timestamp upper bound."),
|
|
10001
|
-
cursor: z.string().min(1).describe("Cursor for the next result page.").optional(),
|
|
10002
|
-
limit: z.coerce.number().int().min(1).max(20).describe("Maximum results to return; Slack allows at most 20.").optional(),
|
|
10003
|
-
sort: z.enum(["score", "timestamp"]).describe("Rank by relevance or timestamp.").optional(),
|
|
10004
|
-
sort_dir: z.enum(["asc", "desc"]).describe("Sort direction.").optional()
|
|
9987
|
+
content_types: z.array(z.enum(CONTENT_TYPES)).min(1).max(4).nullable().describe("Content types to include. Omit or use null for messages.").optional(),
|
|
9988
|
+
after: optionalUnixTimestampParam("Unix timestamp lower bound.").nullable(),
|
|
9989
|
+
before: optionalUnixTimestampParam("Unix timestamp upper bound.").nullable(),
|
|
9990
|
+
cursor: z.string().min(1).nullable().describe("Cursor for the next result page. Omit or use null for the first page.").optional(),
|
|
9991
|
+
limit: z.coerce.number().int().min(1).max(20).nullable().describe("Maximum results to return; Slack allows at most 20.").optional(),
|
|
9992
|
+
sort: z.enum(["score", "timestamp"]).nullable().describe("Rank by relevance or timestamp.").optional(),
|
|
9993
|
+
sort_dir: z.enum(["asc", "desc"]).nullable().describe("Sort direction.").optional()
|
|
10005
9994
|
}),
|
|
10006
9995
|
outputSchema: publicSearchOutputSchema,
|
|
10007
9996
|
execute: async ({ query, content_types, after, before, cursor, limit, sort, sort_dir }) => {
|
|
@@ -11384,6 +11373,11 @@ function sanitizeMessage(msg, attachmentIdsBySlackFileId) {
|
|
|
11384
11373
|
subtype: msg.subtype,
|
|
11385
11374
|
bot_id: msg.bot_id,
|
|
11386
11375
|
type: msg.type,
|
|
11376
|
+
...msg.reactions?.length ? { reactions: msg.reactions.map((reaction) => ({
|
|
11377
|
+
name: reaction.name,
|
|
11378
|
+
count: reaction.count,
|
|
11379
|
+
users: reaction.users
|
|
11380
|
+
})) } : void 0,
|
|
11387
11381
|
...attachmentText ? { attachment_text: attachmentText } : void 0,
|
|
11388
11382
|
...files.length ? { files: files.map((f) => ({
|
|
11389
11383
|
id: f.id,
|
|
@@ -11415,7 +11409,7 @@ function truncateMessages(messages, maxChars) {
|
|
|
11415
11409
|
/** Create a tool that reads a Slack thread from a shared message URL or explicit coordinates. */
|
|
11416
11410
|
function createSlackThreadReadTool(context, attachmentDeps) {
|
|
11417
11411
|
return zodTool({
|
|
11418
|
-
description: "Read a Slack thread from a shared archive URL or explicit channel + timestamp. Works for the current conversation and public channels.",
|
|
11412
|
+
description: "Read a Slack thread, including message reaction users, from a shared archive URL or explicit channel + timestamp. Works for the current conversation and public channels.",
|
|
11419
11413
|
annotations: {
|
|
11420
11414
|
destructiveHint: false,
|
|
11421
11415
|
idempotentHint: true,
|
|
@@ -11423,11 +11417,11 @@ function createSlackThreadReadTool(context, attachmentDeps) {
|
|
|
11423
11417
|
readOnlyHint: true
|
|
11424
11418
|
},
|
|
11425
11419
|
inputSchema: z.object({
|
|
11426
|
-
url: z.string().min(1).describe("Slack message archive URL.").optional(),
|
|
11427
|
-
channel_id: slackChannelRefParam.optional(),
|
|
11428
|
-
ts: slackTimestampParam("Slack message timestamp. May be the thread root or any message in the thread.").optional(),
|
|
11429
|
-
limit: z.coerce.number().int().min(1).max(1e3).describe("Maximum number of thread messages to fetch.").optional(),
|
|
11430
|
-
max_pages: z.coerce.number().int().min(1).max(10).describe("Maximum number of Slack API pages to traverse.").optional()
|
|
11420
|
+
url: z.string().min(1).describe("Slack message archive URL.").nullable().optional(),
|
|
11421
|
+
channel_id: slackChannelRefParam.nullable().optional(),
|
|
11422
|
+
ts: slackTimestampParam("Slack message timestamp. May be the thread root or any message in the thread.").nullable().optional(),
|
|
11423
|
+
limit: z.coerce.number().int().min(1).max(1e3).describe("Maximum number of thread messages to fetch.").nullable().optional(),
|
|
11424
|
+
max_pages: z.coerce.number().int().min(1).max(10).describe("Maximum number of Slack API pages to traverse.").nullable().optional()
|
|
11431
11425
|
}),
|
|
11432
11426
|
outputSchema: juniorToolOutputSchema,
|
|
11433
11427
|
execute: async ({ url, channel_id, ts, limit, max_pages }) => {
|
|
@@ -11461,7 +11455,7 @@ function createSlackThreadReadTool(context, attachmentDeps) {
|
|
|
11461
11455
|
channelId,
|
|
11462
11456
|
threadTs: lookupTs,
|
|
11463
11457
|
limit: limit ?? 1e3,
|
|
11464
|
-
maxPages: max_pages
|
|
11458
|
+
maxPages: max_pages ?? void 0
|
|
11465
11459
|
});
|
|
11466
11460
|
let replies;
|
|
11467
11461
|
let joined = false;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { a as embedTexts, r as completeObject } from "./client-
|
|
3
|
-
import { C as withSpan, P as normalizeIdentityEmail, _ as setSpanAttributes, d as logInfo, f as logWarn, u as logException, v as setSpanStatus } from "./logging-
|
|
2
|
+
import { a as embedTexts, r as completeObject } from "./client-DIe9JhwF.js";
|
|
3
|
+
import { C as withSpan, P as normalizeIdentityEmail, _ as setSpanAttributes, d as logInfo, f as logWarn, u as logException, v as setSpanStatus } from "./logging-D2YJv_PA.js";
|
|
4
4
|
import { a as getClient$1 } from "./sentry-CgWZM_kV.js";
|
|
5
|
-
import { t as canExposeConversationPayload } from "./conversation-privacy-
|
|
6
|
-
import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-
|
|
5
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-6NLCEkzx.js";
|
|
6
|
+
import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-0_JixokJ.js";
|
|
7
7
|
import { n as defaultModelId } from "./model-profile-CZmVoGdX.js";
|
|
8
8
|
import { _ as parseSlackMessageTs, c as isActorUserId, h as parseSlackTeamId, m as parseSlackChannelReferenceId, u as parseActorUserId } from "./context-Bplcgypl.js";
|
|
9
9
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
10
|
-
import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, _ as CONVERSATION_METRICS, g as juniorConversationBriefs, h as juniorConversationBindings, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as juniorConversationMetrics, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-
|
|
11
|
-
import { B as historyReplacementSchema, C as conversationReportEventSchema, I as conversationEventDataSchema, K as usageSchema, M as conversationBriefSchema, N as parseBriefInput, V as newConversationEventSchema, z as decodeStoredConversationEvent } from "./conversation-
|
|
12
|
-
import { A as sleep$1, P as SANDBOX_WORKSPACE_ROOT, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
13
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
10
|
+
import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, _ as CONVERSATION_METRICS, g as juniorConversationBriefs, h as juniorConversationBindings, i as juniorWorkspaces, m as juniorConversationParticipants, n as juniorSnapshots, r as juniorWorkspaceRepos, t as createJuniorSqlExecutor, v as juniorConversationMetrics, x as juniorConversationAnnotations, y as juniorConversationEvents } from "./executor-CmZKtNpH.js";
|
|
11
|
+
import { B as historyReplacementSchema, C as conversationReportEventSchema, I as conversationEventDataSchema, K as usageSchema, M as conversationBriefSchema, N as parseBriefInput, V as newConversationEventSchema, z as decodeStoredConversationEvent } from "./conversation-BSRGzJmY.js";
|
|
12
|
+
import { A as sleep$1, P as SANDBOX_WORKSPACE_ROOT, l as isSandboxMissingError, n as hash, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-C3TEFAVI.js";
|
|
13
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BkaHwBW0.js";
|
|
14
14
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { F as isRecord, d as logInfo, f as logWarn } from "./logging-
|
|
2
|
-
import { h as normalizeSlackEmojiName } from "./config-
|
|
1
|
+
import { F as isRecord, d as logInfo, f as logWarn } from "./logging-D2YJv_PA.js";
|
|
2
|
+
import { h as normalizeSlackEmojiName } from "./config-0_JixokJ.js";
|
|
3
3
|
import { _ as parseSlackMessageTs, g as parseSlackUserId } from "./context-Bplcgypl.js";
|
|
4
|
-
import { G as isDmChannel, J as withSlackRetries, K as normalizeSlackConversationId, U as getSlackClient, n as applyPluginFormatMarkdown, un as parseDestination, z as SlackActionError } from "./agent-hooks-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { G as isDmChannel, J as withSlackRetries, K as normalizeSlackConversationId, U as getSlackClient, n as applyPluginFormatMarkdown, un as parseDestination, z as SlackActionError } from "./agent-hooks-kjLDY-Aa.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D1v0KsgY.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-C3TEFAVI.js";
|
|
7
7
|
import { r as isExperimentalFeatureEnabled } from "./experimental-CIXf7Uye.js";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
import { actorSchema, sourceSchema } from "@sentry/junior-plugin-api";
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -409,6 +409,12 @@ export declare const conversationSummaryReportSchema: z.ZodObject<{
|
|
|
409
409
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
410
410
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
411
411
|
}, z.core.$strict>>;
|
|
412
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
413
|
+
email: z.ZodOptional<z.ZodString>;
|
|
414
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
415
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
416
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strict>>>;
|
|
412
418
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
413
419
|
channel: z.ZodOptional<z.ZodString>;
|
|
414
420
|
channelName: z.ZodOptional<z.ZodString>;
|
|
@@ -973,6 +979,12 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
973
979
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
974
980
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
975
981
|
}, z.core.$strict>>;
|
|
982
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
983
|
+
email: z.ZodOptional<z.ZodString>;
|
|
984
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
985
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
986
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
987
|
+
}, z.core.$strict>>>;
|
|
976
988
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
977
989
|
channel: z.ZodOptional<z.ZodString>;
|
|
978
990
|
channelName: z.ZodOptional<z.ZodString>;
|
|
@@ -1641,6 +1653,12 @@ export declare const conversationFeedSchema: z.ZodObject<{
|
|
|
1641
1653
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
1642
1654
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
1643
1655
|
}, z.core.$strict>>;
|
|
1656
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1657
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1658
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
1659
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
1661
|
+
}, z.core.$strict>>>;
|
|
1644
1662
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1645
1663
|
channel: z.ZodOptional<z.ZodString>;
|
|
1646
1664
|
channelName: z.ZodOptional<z.ZodString>;
|
|
@@ -2137,6 +2155,12 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
2137
2155
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
2138
2156
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
2139
2157
|
}, z.core.$strict>>;
|
|
2158
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2159
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2160
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
2161
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
2162
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
2163
|
+
}, z.core.$strict>>>;
|
|
2140
2164
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2141
2165
|
channel: z.ZodOptional<z.ZodString>;
|
|
2142
2166
|
channelName: z.ZodOptional<z.ZodString>;
|
|
@@ -2448,6 +2472,12 @@ export declare const locationDetailReportSchema: z.ZodObject<{
|
|
|
2448
2472
|
slackUserId: z.ZodOptional<z.ZodString>;
|
|
2449
2473
|
slackUserName: z.ZodOptional<z.ZodString>;
|
|
2450
2474
|
}, z.core.$strict>>;
|
|
2475
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2476
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2477
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
2478
|
+
slackUserId: z.ZodOptional<z.ZodString>;
|
|
2479
|
+
slackUserName: z.ZodOptional<z.ZodString>;
|
|
2480
|
+
}, z.core.$strict>>>;
|
|
2451
2481
|
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2452
2482
|
channel: z.ZodOptional<z.ZodString>;
|
|
2453
2483
|
channelName: z.ZodOptional<z.ZodString>;
|
package/dist/api/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema, L as conversationTurnFailureCodeSchema, O as createConversationMessageBodySchema, R as conversationTurnFailureReasonSchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, 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-
|
|
1
|
+
import { C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema, L as conversationTurnFailureCodeSchema, O as createConversationMessageBodySchema, R as conversationTurnFailureReasonSchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, 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-BSRGzJmY.js";
|
|
2
2
|
import { a as pluginPackageContentReportSchema, c as runtimeInfoReportSchema, i as pluginPackageContentItemReportSchema, l as skillReportSchema, n as pluginOperationalReportFeedSchema, o as pluginSchema, r as pluginOperationalReportSchema, s as pluginsSchema, t as healthReportSchema, u as skillReportsSchema } from "../reporting-schema-DosTN__Q.js";
|
|
3
|
-
import { A as actorProfileReportSchema, B as dailyConversationActivitySchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, E as personalTokenMetadataSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, H as codeChangeSummaryReportSchema, I as locationParamsSchema, K as codeRepositorySummarySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, S as scheduledAutomationSummarySchema, T as personalTokenListSchema, U as codeChangeSummarySchema, V as codeActivityDaySchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, at as apiErrorSchema, b as automationSummarySchema, c as workspaceRepoSchema, d as automationExecutionSchema, f as automationExecutionStatusDaySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, p as automationExecutionStatusSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as automationExecutionListSchema, v as automationRunSchema, w as createdPersonalTokenSchema, x as eventAutomationSummarySchema, y as automationRunWindowsSchema } from "../schema-
|
|
3
|
+
import { A as actorProfileReportSchema, B as dailyConversationActivitySchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, E as personalTokenMetadataSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, H as codeChangeSummaryReportSchema, I as locationParamsSchema, K as codeRepositorySummarySchema, M as personalSpendReportSchema, N as locationActivityDayReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, S as scheduledAutomationSummarySchema, T as personalTokenListSchema, U as codeChangeSummarySchema, V as codeActivityDaySchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, at as apiErrorSchema, b as automationSummarySchema, c as workspaceRepoSchema, d as automationExecutionSchema, f as automationExecutionStatusDaySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, p as automationExecutionStatusSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as automationExecutionListSchema, v as automationRunSchema, w as createdPersonalTokenSchema, x as eventAutomationSummarySchema, y as automationRunWindowsSchema } from "../schema-YPJXVcOW.js";
|
|
4
4
|
export { acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationSummarySchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|