@sentry/junior 0.211.0 → 0.213.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-XXC-9m0B.js → agent-I74ocTD9.js} +19 -19
- package/dist/{agent-hooks-7vR8uZw2.js → agent-hooks-CdRPMAIE.js} +207 -47
- package/dist/{agent-runner-CqXaUvvQ.js → agent-runner-B81eojZx.js} +5 -5
- package/dist/api/schema.js +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +72 -33
- package/dist/{app-gyu3D9Gn.d.ts → app-D4nNdzPG.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +31 -31
- package/dist/{auth-pause-state-r-1vEoSX.js → auth-pause-state-BeY0ljFA.js} +6 -6
- package/dist/{briefs-DIj_YgLE.js → briefs-BVIBIvY1.js} +4 -4
- package/dist/{catalog-runtime-BMMLIpxX.js → catalog-runtime-nNOUcF0O.js} +1 -1
- package/dist/{checkpoint-B6jEtGHN.js → checkpoint-BBfOHMai.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.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BBPo9KiG.js → client-HV5MI31k.js} +2 -2
- package/dist/{config-DMq-uJAV.js → config-DFAtlLoY.js} +2 -2
- package/dist/{conversation-AA4R1VUn.js → conversation-CRWntH-A.js} +19 -19
- package/dist/{conversation-privacy-D99FrYrV.js → conversation-privacy-cpqWNIJp.js} +1 -1
- package/dist/{credential-sync-Cz1T9Ws-.js → credential-sync--5BV3QNF.js} +20 -20
- package/dist/{db-D74z7BZH.d.ts → db-Ca9Nt5ci.d.ts} +1 -1
- package/dist/{execution-stats-BkCnuVBv.js → execution-stats-BjUUUOM8.js} +3 -4
- package/dist/{executor-B5VURdwg.js → executor-BTrFBTlg.js} +39 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DUs_jnBa.js → job-queue-CEKc-Fos.js} +1 -1
- package/dist/{logging-CXQcqM-W.js → logging-BBIO8nx4.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-B0KXcd24.js → oauth-callback-server-BDbi0GuG.js} +2 -2
- package/dist/{pending-auth-CxZjizu_.js → pending-auth-YFna7Jtg.js} +2 -2
- package/dist/{profile-8K6D5LHD.js → profile-JxMky6PH.js} +4 -4
- package/dist/{prompt-C1IA4qkj.js → prompt-kRlibHYT.js} +1 -1
- package/dist/{registry-DUa5NdZP.js → registry-BpzPQJAy.js} +1 -1
- package/dist/{resolve-E_-QQ8pM.js → resolve-CygYPkMg.js} +2 -2
- package/dist/{runner-Bf0HnWqY.js → runner-NyIU3zAg.js} +9 -9
- package/dist/{sandbox-egress-signals-BW9FzWoQ.js → sandbox-egress-signals-3UbZEFoN.js} +1 -1
- package/dist/{schema-CwTeb-BF.js → schema-xHUgeh46.js} +1 -1
- package/dist/short-title-CCAI4K8n.js +65 -0
- package/dist/{skills-B1f5Ku_s.js → skills-DqgB34uh.js} +2 -2
- package/dist/{spawn-BsOCLy8T.js → spawn-BUerJdfD.js} +2 -2
- package/dist/{stats-CrITkCy5.js → stats-CAV_taik.js} +5 -5
- package/dist/{store-Det8MQ9g.d.ts → store-DoewL5mG.d.ts} +3 -2
- package/dist/{task-queue-CcqJCAUd.js → task-queue-CcODaB31.js} +3 -3
- package/dist/{task-runner-7IOXx_Uo.js → task-runner-BY358TR3.js} +8 -8
- package/dist/{thread-state-Y3PGLZQa.js → thread-state-DsLsunrt.js} +5 -5
- package/dist/{turn-execution-Bm6Xbaoi.js → turn-execution-CFdT_jiq.js} +3 -3
- package/dist/{turn-lifecycle-Czzk8ila.js → turn-lifecycle-ofsiIkCp.js} +1 -1
- package/dist/{validation-A2SMrAkJ.js → validation-DyZEuf_c.js} +1 -1
- package/dist/{version-CfRx6f_C.js → version-Rvkbcp_Z.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DN3cJuLB.js → web-authorization-BRFPi8xN.js} +1 -1
- package/dist/{web-input-lJH42B_R.js → web-input-PmIax5-U.js} +4 -4
- package/dist/{work-CRHJu3hb.js → work-xudMvrk2.js} +9 -9
- package/dist/{worker-D6oTNemM.js → worker-EwmMphqi.js} +5 -5
- package/migrations/0042_conversation_metrics.sql +26 -0
- package/migrations/meta/0042_snapshot.json +3610 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/usage-DHJ3ng2s.js +0 -166
|
@@ -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-HV5MI31k.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-BBIO8nx4.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-cpqWNIJp.js";
|
|
5
|
+
import { h as normalizeSlackEmojiName, n as botConfig } from "./config-DFAtlLoY.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,
|
|
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-CdRPMAIE.js";
|
|
9
9
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
10
|
-
import { D as
|
|
11
|
-
import { A as briefLinkSchema,
|
|
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-BTrFBTlg.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-CRWntH-A.js";
|
|
12
12
|
import { a as listReferenceFiles, c as soulPathCandidates, l as worldPathCandidates } from "./package-discovery-7a9YqLhE.js";
|
|
13
|
-
import { a as resolvePluginCommandEnv, c as getOAuthProviderErrorAttributes, i as resolveAuthTokenPlaceholder, o as OAuthProviderError, s as fetchWithBoundedOAuthErrorBodies, u as CredentialUnavailableError } from "./registry-
|
|
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 {
|
|
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 resolvePluginCommandEnv, c as getOAuthProviderErrorAttributes, i as resolveAuthTokenPlaceholder, o as OAuthProviderError, s as fetchWithBoundedOAuthErrorBodies, u as CredentialUnavailableError } from "./registry-BpzPQJAy.js";
|
|
14
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-nNOUcF0O.js";
|
|
15
|
+
import { a as parseSkillInvocation, n as findSkillByName, r as loadSkillsByName, t as discoverSkills } from "./skills-DqgB34uh.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-BBfOHMai.js";
|
|
17
|
+
import { n as generateShortTitle, r as resolveTaskTitle } from "./short-title-CCAI4K8n.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-JxMky6PH.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-CAV_taik.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-YFna7Jtg.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-B81eojZx.js";
|
|
22
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-kRlibHYT.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-CygYPkMg.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-CEKc-Fos.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";
|
|
@@ -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-HV5MI31k.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-BBIO8nx4.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-cpqWNIJp.js";
|
|
6
|
+
import { a as getChatConfig, n as botConfig, s as getSlackBotToken } from "./config-DFAtlLoY.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
|
|
11
|
-
import { B as
|
|
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-BTrFBTlg.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-CRWntH-A.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-JxMky6PH.js";
|
|
13
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-kRlibHYT.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";
|
|
@@ -191,6 +191,190 @@ async function recordConversationParticipant(executor, args) {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
|
+
//#region src/chat/usage.ts
|
|
195
|
+
const agentTurnUsageSchema = usageSchema;
|
|
196
|
+
const COMPONENT_USAGE_FIELDS = [
|
|
197
|
+
"inputTokens",
|
|
198
|
+
"outputTokens",
|
|
199
|
+
"cachedInputTokens",
|
|
200
|
+
"cacheCreationTokens"
|
|
201
|
+
];
|
|
202
|
+
const COST_COMPONENT_FIELDS = [
|
|
203
|
+
"input",
|
|
204
|
+
"output",
|
|
205
|
+
"cacheRead",
|
|
206
|
+
"cacheWrite"
|
|
207
|
+
];
|
|
208
|
+
/** Return whether any token counter is present on a usage record. */
|
|
209
|
+
function hasAgentTurnUsage(usage) {
|
|
210
|
+
return Boolean(usage && (Object.entries(usage).some(([field, value]) => field !== "cost" && typeof value === "number" && Number.isFinite(value)) || Object.values(usage.cost ?? {}).some((value) => typeof value === "number" && Number.isFinite(value))));
|
|
211
|
+
}
|
|
212
|
+
function getFiniteCount(value) {
|
|
213
|
+
return typeof value === "number" && Number.isFinite(value) ? Math.max(0, Math.floor(value)) : void 0;
|
|
214
|
+
}
|
|
215
|
+
function getFiniteCost(value) {
|
|
216
|
+
return typeof value === "number" && Number.isFinite(value) ? Math.max(0, value) : void 0;
|
|
217
|
+
}
|
|
218
|
+
function addCost(left, right) {
|
|
219
|
+
return Math.round(((left ?? 0) + right) * 0xe8d4a51000) / 0xe8d4a51000;
|
|
220
|
+
}
|
|
221
|
+
function getComponentTotal(usage) {
|
|
222
|
+
let total;
|
|
223
|
+
for (const field of COMPONENT_USAGE_FIELDS) {
|
|
224
|
+
const value = getFiniteCount(usage[field]);
|
|
225
|
+
if (value === void 0) continue;
|
|
226
|
+
total = (total ?? 0) + value;
|
|
227
|
+
}
|
|
228
|
+
return total;
|
|
229
|
+
}
|
|
230
|
+
/** Estimated total USD cost from one usage record, when any cost field is present. */
|
|
231
|
+
function agentTurnCostUsd(usage) {
|
|
232
|
+
if (!usage?.cost) return void 0;
|
|
233
|
+
const total = getFiniteCost(usage.cost.total);
|
|
234
|
+
if (total !== void 0) return total;
|
|
235
|
+
let componentTotal = 0;
|
|
236
|
+
let hasComponent = false;
|
|
237
|
+
for (const field of COST_COMPONENT_FIELDS) {
|
|
238
|
+
const value = getFiniteCost(usage.cost[field]);
|
|
239
|
+
if (value === void 0) continue;
|
|
240
|
+
hasComponent = true;
|
|
241
|
+
componentTotal = addCost(componentTotal, value);
|
|
242
|
+
}
|
|
243
|
+
return hasComponent ? componentTotal : void 0;
|
|
244
|
+
}
|
|
245
|
+
/** Total token count from one usage record, preferring component counters. */
|
|
246
|
+
function agentTurnTotalTokens(usage) {
|
|
247
|
+
if (!usage) return void 0;
|
|
248
|
+
const componentTotal = getComponentTotal(usage);
|
|
249
|
+
if (componentTotal !== void 0) return componentTotal;
|
|
250
|
+
return getFiniteCount(usage.totalTokens);
|
|
251
|
+
}
|
|
252
|
+
/** Aggregate token usage across slices without double-counting provider totals. */
|
|
253
|
+
function addAgentTurnUsage(...usages) {
|
|
254
|
+
const components = {};
|
|
255
|
+
let componentTotal;
|
|
256
|
+
let totalOnlyTokens;
|
|
257
|
+
let reasoningTokens;
|
|
258
|
+
const cost = {};
|
|
259
|
+
for (const usage of usages) {
|
|
260
|
+
if (!usage) continue;
|
|
261
|
+
const reasoning = getFiniteCount(usage.reasoningTokens);
|
|
262
|
+
if (reasoning !== void 0) reasoningTokens = (reasoningTokens ?? 0) + reasoning;
|
|
263
|
+
if (usage.cost) for (const field of [...COST_COMPONENT_FIELDS, "total"]) {
|
|
264
|
+
const value = getFiniteCost(usage.cost[field]);
|
|
265
|
+
if (value === void 0) continue;
|
|
266
|
+
cost[field] = addCost(cost[field], value);
|
|
267
|
+
}
|
|
268
|
+
const usageComponentTotal = getComponentTotal(usage);
|
|
269
|
+
if (usageComponentTotal !== void 0) {
|
|
270
|
+
componentTotal = (componentTotal ?? 0) + usageComponentTotal;
|
|
271
|
+
for (const field of COMPONENT_USAGE_FIELDS) {
|
|
272
|
+
const value = getFiniteCount(usage[field]);
|
|
273
|
+
if (value === void 0) continue;
|
|
274
|
+
components[field] = (components[field] ?? 0) + value;
|
|
275
|
+
}
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
const totalTokens = getFiniteCount(usage.totalTokens);
|
|
279
|
+
if (totalTokens !== void 0) totalOnlyTokens = (totalOnlyTokens ?? 0) + totalTokens;
|
|
280
|
+
}
|
|
281
|
+
if (totalOnlyTokens !== void 0) return {
|
|
282
|
+
totalTokens: totalOnlyTokens + (componentTotal ?? 0),
|
|
283
|
+
...reasoningTokens !== void 0 ? { reasoningTokens } : void 0,
|
|
284
|
+
...Object.keys(cost).length > 0 ? { cost } : void 0
|
|
285
|
+
};
|
|
286
|
+
const result = {
|
|
287
|
+
...components,
|
|
288
|
+
...reasoningTokens !== void 0 ? { reasoningTokens } : void 0,
|
|
289
|
+
...Object.keys(cost).length > 0 ? { cost } : void 0
|
|
290
|
+
};
|
|
291
|
+
return hasAgentTurnUsage(result) ? result : void 0;
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region src/chat/conversations/metrics.ts
|
|
295
|
+
function finite(value) {
|
|
296
|
+
return value !== void 0 && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
297
|
+
}
|
|
298
|
+
/** Convert one Run summary to metric rows. */
|
|
299
|
+
function conversationMetricValues(args) {
|
|
300
|
+
const usage = args.usage;
|
|
301
|
+
return {
|
|
302
|
+
duration_ms: Math.max(0, args.durationMs),
|
|
303
|
+
total_tokens: agentTurnTotalTokens(usage),
|
|
304
|
+
input_tokens: finite(usage?.inputTokens),
|
|
305
|
+
output_tokens: finite(usage?.outputTokens),
|
|
306
|
+
cached_input_tokens: finite(usage?.cachedInputTokens),
|
|
307
|
+
cache_creation_tokens: finite(usage?.cacheCreationTokens),
|
|
308
|
+
reasoning_tokens: finite(usage?.reasoningTokens),
|
|
309
|
+
cost_usd: agentTurnCostUsd(usage)
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/** Replace one Run's metric rows and refresh its Conversation totals. */
|
|
313
|
+
async function replaceConversationMetrics(executor, args) {
|
|
314
|
+
const [current] = await executor.db().select({ updatedAt: juniorConversationMetrics.updatedAt }).from(juniorConversationMetrics).where(and(eq(juniorConversationMetrics.conversationId, args.conversationId), eq(juniorConversationMetrics.runId, args.runId))).limit(1);
|
|
315
|
+
if (current && current.updatedAt.getTime() > args.updatedAtMs) return;
|
|
316
|
+
await executor.db().delete(juniorConversationMetrics).where(and(eq(juniorConversationMetrics.conversationId, args.conversationId), eq(juniorConversationMetrics.runId, args.runId)));
|
|
317
|
+
const metricValues = conversationMetricValues({
|
|
318
|
+
durationMs: args.durationMs,
|
|
319
|
+
usage: args.usage
|
|
320
|
+
});
|
|
321
|
+
const values = CONVERSATION_METRICS.flatMap((metric) => {
|
|
322
|
+
const value = metricValues[metric];
|
|
323
|
+
return value === void 0 ? [] : [{
|
|
324
|
+
conversationId: args.conversationId,
|
|
325
|
+
runId: args.runId,
|
|
326
|
+
metric,
|
|
327
|
+
value,
|
|
328
|
+
occurredAt: new Date(args.occurredAtMs),
|
|
329
|
+
updatedAt: new Date(args.updatedAtMs)
|
|
330
|
+
}];
|
|
331
|
+
});
|
|
332
|
+
if (values.length > 0) await executor.db().insert(juniorConversationMetrics).values(values);
|
|
333
|
+
const metric = (name) => sql`(
|
|
334
|
+
select sum(${juniorConversationMetrics.value})
|
|
335
|
+
from ${juniorConversationMetrics}
|
|
336
|
+
where ${juniorConversationMetrics.conversationId} = ${args.conversationId}
|
|
337
|
+
and ${juniorConversationMetrics.metric} = ${name}
|
|
338
|
+
)`;
|
|
339
|
+
const totalTokens = metric("total_tokens");
|
|
340
|
+
const componentTokens = sql`
|
|
341
|
+
coalesce(${metric("input_tokens")}, 0)
|
|
342
|
+
+ coalesce(${metric("output_tokens")}, 0)
|
|
343
|
+
+ coalesce(${metric("cached_input_tokens")}, 0)
|
|
344
|
+
+ coalesce(${metric("cache_creation_tokens")}, 0)
|
|
345
|
+
`;
|
|
346
|
+
const hasComponents = sql`
|
|
347
|
+
${metric("input_tokens")} is not null
|
|
348
|
+
or ${metric("output_tokens")} is not null
|
|
349
|
+
or ${metric("cached_input_tokens")} is not null
|
|
350
|
+
or ${metric("cache_creation_tokens")} is not null
|
|
351
|
+
`;
|
|
352
|
+
const cost = sql`case when ${metric("cost_usd")} is null then null
|
|
353
|
+
else jsonb_build_object('total', ${metric("cost_usd")}) end`;
|
|
354
|
+
await executor.db().update(juniorConversations).set({
|
|
355
|
+
durationMs: sql`coalesce(${metric("duration_ms")}, 0)`,
|
|
356
|
+
usage: sql`case
|
|
357
|
+
when ${totalTokens} is not null
|
|
358
|
+
and (${hasComponents})
|
|
359
|
+
and ${totalTokens} <> ${componentTokens}
|
|
360
|
+
then jsonb_strip_nulls(jsonb_build_object(
|
|
361
|
+
'totalTokens', ${totalTokens},
|
|
362
|
+
'reasoningTokens', ${metric("reasoning_tokens")},
|
|
363
|
+
'cost', ${cost}
|
|
364
|
+
))
|
|
365
|
+
else jsonb_strip_nulls(jsonb_build_object(
|
|
366
|
+
'totalTokens', ${totalTokens},
|
|
367
|
+
'inputTokens', ${metric("input_tokens")},
|
|
368
|
+
'outputTokens', ${metric("output_tokens")},
|
|
369
|
+
'cachedInputTokens', ${metric("cached_input_tokens")},
|
|
370
|
+
'cacheCreationTokens', ${metric("cache_creation_tokens")},
|
|
371
|
+
'reasoningTokens', ${metric("reasoning_tokens")},
|
|
372
|
+
'cost', ${cost}
|
|
373
|
+
))
|
|
374
|
+
end`
|
|
375
|
+
}).where(eq(juniorConversations.conversationId, args.conversationId));
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
194
378
|
//#region src/chat/source.ts
|
|
195
379
|
/**
|
|
196
380
|
* Normalize a Turn Source into legacy provider fields stored on a Conversation.
|
|
@@ -522,29 +706,6 @@ function assertSameConversationDestination(args) {
|
|
|
522
706
|
if (!args.current || sameDestination(args.current, args.next)) return;
|
|
523
707
|
throw new Error(`Conversation destination changed for ${args.conversationId}`);
|
|
524
708
|
}
|
|
525
|
-
function tokenTotal(usage) {
|
|
526
|
-
if (!usage) return 0;
|
|
527
|
-
if (usage.totalTokens !== void 0) return usage.totalTokens;
|
|
528
|
-
return (usage.inputTokens ?? 0) + (usage.outputTokens ?? 0) + (usage.cachedInputTokens ?? 0) + (usage.cacheCreationTokens ?? 0);
|
|
529
|
-
}
|
|
530
|
-
function updateConversationUsage(args) {
|
|
531
|
-
const usage = { totalTokens: tokenTotal(args.current) - tokenTotal(args.previousExecution) + tokenTotal(args.nextExecution) };
|
|
532
|
-
if (args.current?.reasoningTokens !== void 0 || args.previousExecution?.reasoningTokens !== void 0 || args.nextExecution.reasoningTokens !== void 0) usage.reasoningTokens = (args.current?.reasoningTokens ?? 0) - (args.previousExecution?.reasoningTokens ?? 0) + (args.nextExecution.reasoningTokens ?? 0);
|
|
533
|
-
const costFields = [
|
|
534
|
-
"input",
|
|
535
|
-
"output",
|
|
536
|
-
"cacheRead",
|
|
537
|
-
"cacheWrite",
|
|
538
|
-
"total"
|
|
539
|
-
];
|
|
540
|
-
const cost = {};
|
|
541
|
-
for (const field of costFields) {
|
|
542
|
-
if (args.current?.cost?.[field] === void 0 && args.previousExecution?.cost?.[field] === void 0 && args.nextExecution.cost?.[field] === void 0) continue;
|
|
543
|
-
cost[field] = Math.round(((args.current?.cost?.[field] ?? 0) - (args.previousExecution?.cost?.[field] ?? 0) + (args.nextExecution.cost?.[field] ?? 0)) * 0xe8d4a51000) / 0xe8d4a51000;
|
|
544
|
-
}
|
|
545
|
-
if (Object.keys(cost).length > 0) usage.cost = cost;
|
|
546
|
-
return usage;
|
|
547
|
-
}
|
|
548
709
|
var SqlStore = class {
|
|
549
710
|
executor;
|
|
550
711
|
constructor(executor) {
|
|
@@ -623,13 +784,13 @@ var SqlStore = class {
|
|
|
623
784
|
});
|
|
624
785
|
}
|
|
625
786
|
async recordExecution(args) {
|
|
787
|
+
if (args.metrics && !args.execution.runId) throw new Error("Conversation Run metrics require a Run id");
|
|
626
788
|
await this.withConversationMutation(args.conversationId, async () => {
|
|
627
789
|
const existingRow = await this.readConversationRow(args.conversationId);
|
|
628
790
|
const existing = existingRow ? conversationFromRow(existingRow) : void 0;
|
|
629
791
|
if (!existing && !args.destination) return;
|
|
630
|
-
const
|
|
631
|
-
const
|
|
632
|
-
const sameRun = Boolean(metricRunId) && metricRunId === args.execution.runId;
|
|
792
|
+
const incomingExecutionAt = args.execution.updatedAtMs ?? args.updatedAtMs;
|
|
793
|
+
const incomingIsFresh = incomingExecutionAt >= (existing?.execution.updatedAtMs ?? existing?.updatedAtMs ?? 0);
|
|
633
794
|
const execution = incomingIsFresh ? args.execution : existing?.execution ?? args.execution;
|
|
634
795
|
await this.upsertConversation({ conversation: {
|
|
635
796
|
schemaVersion: 1,
|
|
@@ -647,19 +808,18 @@ var SqlStore = class {
|
|
|
647
808
|
...args.visibility ? { visibility: args.visibility } : void 0,
|
|
648
809
|
execution
|
|
649
810
|
} });
|
|
650
|
-
if (
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
metricRunId: args.execution.runId ?? null,
|
|
811
|
+
if (args.metrics && args.execution.runId) {
|
|
812
|
+
await replaceConversationMetrics(this.executor, {
|
|
813
|
+
conversationId: args.conversationId,
|
|
814
|
+
runId: args.execution.runId,
|
|
815
|
+
occurredAtMs: args.createdAtMs,
|
|
816
|
+
updatedAtMs: incomingExecutionAt,
|
|
817
|
+
...args.metrics
|
|
818
|
+
});
|
|
819
|
+
if (incomingIsFresh) await this.executor.db().update(juniorConversations).set({
|
|
820
|
+
metricRunId: args.execution.runId,
|
|
661
821
|
executionDurationMs: args.metrics.durationMs,
|
|
662
|
-
executionUsage: args.metrics.usage ??
|
|
822
|
+
executionUsage: args.metrics.usage ?? null
|
|
663
823
|
}).where(eq(juniorConversations.conversationId, args.conversationId));
|
|
664
824
|
}
|
|
665
825
|
});
|
|
@@ -5232,4 +5392,4 @@ function createPluginHookRunner(input = {}) {
|
|
|
5232
5392
|
};
|
|
5233
5393
|
}
|
|
5234
5394
|
//#endregion
|
|
5235
|
-
export { resolveViewerUser as $, parseSessionSource as $t, tryWorkspaceRepoCheckoutPath as A, createPluginConversationEvents as At, downloadPrivateSlackFile as B, authenticationUnlinkedEvent as Bt, invalidateReadySnapshot as C, conversationArchivedForEmail as Ct, SANDBOX_RUNTIME as D, conversationNotArchivedForEmail as Dt, setWorkspaceSnapshotBuild as E, conversationHasParticipantUser as Et, bindSlackDirectCredentialSubject as F, listConversationAnnotations as Ft, isDmChannel as G, getDb as Gt, getHeaderString as H, getConversationEventStore as Ht, verifyEventAutomationCredentialSubject as I, listConversationAnnotationsById as It, withSlackRetries as J, withConversationEventLock as Jt, normalizeSlackConversationId as K, getSqlExecutor as Kt, verifyScheduledAutomationCredentialSubject as L, JUNIOR_NATIVE_EVENT_NAMESPACE as Lt, resolveChannelCapabilities as M, readConversationEventPage as Mt, bindEventAutomationCredentialSubject as N, buildSentryConversationUrl as Nt, deleteWorkspaceSnapshotBuilders as O, conversationNotArchivedForUser as Ot, bindScheduledAutomationCredentialSubject as P, resolveRootVisibility as Pt, readActorIdentity as Q, bindProviderConversation as Qt, verifySlackDirectCredentialSubject as R, agentsInstructionsUpdatedEvent as Rt, WorkspaceValidationError as S, conversationArchiveTimes as St, setWorkspaceSnapshot as T, conversationHasParticipantEmail as Tt, getSlackClient as U, getConversationMessageSearchStore as Ut, getFilePermalink as V, db_exports as Vt, isConversationScopedChannel as W, getConversationStore as Wt, runWithWorkspaceTeamId as X, withConversationMutationLock as Xt, getWorkspaceTeamId as Y, sanitizePostgresJson as Yt, findUserByEmail as Z, locationFromRow as Zt, deleteWorkspace as _, createPluginState as _t, getPluginRoutes as a,
|
|
5395
|
+
export { resolveViewerUser as $, parseSessionSource as $t, tryWorkspaceRepoCheckoutPath as A, createPluginConversationEvents as At, downloadPrivateSlackFile as B, authenticationUnlinkedEvent as Bt, invalidateReadySnapshot as C, conversationArchivedForEmail as Ct, SANDBOX_RUNTIME as D, conversationNotArchivedForEmail as Dt, setWorkspaceSnapshotBuild as E, conversationHasParticipantUser as Et, bindSlackDirectCredentialSubject as F, listConversationAnnotations as Ft, isDmChannel as G, getDb as Gt, getHeaderString as H, getConversationEventStore as Ht, verifyEventAutomationCredentialSubject as I, listConversationAnnotationsById as It, withSlackRetries as J, withConversationEventLock as Jt, normalizeSlackConversationId as K, getSqlExecutor as Kt, verifyScheduledAutomationCredentialSubject as L, JUNIOR_NATIVE_EVENT_NAMESPACE as Lt, resolveChannelCapabilities as M, readConversationEventPage as Mt, bindEventAutomationCredentialSubject as N, buildSentryConversationUrl as Nt, deleteWorkspaceSnapshotBuilders as O, conversationNotArchivedForUser as Ot, bindScheduledAutomationCredentialSubject as P, resolveRootVisibility as Pt, readActorIdentity as Q, bindProviderConversation as Qt, verifySlackDirectCredentialSubject as R, agentsInstructionsUpdatedEvent as Rt, WorkspaceValidationError as S, conversationArchiveTimes as St, setWorkspaceSnapshot as T, conversationHasParticipantEmail as Tt, getSlackClient as U, getConversationMessageSearchStore as Ut, getFilePermalink as V, db_exports as Vt, isConversationScopedChannel as W, getConversationStore as Wt, runWithWorkspaceTeamId as X, withConversationMutationLock as Xt, getWorkspaceTeamId as Y, sanitizePostgresJson as Yt, findUserByEmail as Z, locationFromRow as Zt, deleteWorkspace as _, createPluginState as _t, getPluginRoutes as a, resolveRootConversationId as an, STOP_WATCHING_TOOL_NAME as at, listWorkspaces as b, createPluginLogger as bt, getPluginTools as c, upsertLinkedIdentity as cn, collectEventMatchKeys as ct, setPlugins as d, requireSlackDestination as dn, findMatchingWatches as dt, addAgentTurnUsage as en, updateViewerDisplayName as et, validatePlugins as f, sameDestination as fn, listWatches as ft, createWorkspace as g, setDashboardConversationLinkOptions as gt, setBriefsConfig as h, getDashboardTaskLink as ht, getPluginApiRoutes as i, hasAgentTurnUsage as in, RESOURCE_WATCH_TOOL_SOURCE as it, workspaceRepoCheckoutPath as j, readLatestConversationBrief as jt, getWorkspaceSnapshotBuilder as k, viewerConversationMembership as kt, getPluginUserPromptContributions as l, createSlackDestination as ln, createWatch as lt, registration_exports as m, getDashboardConversationLink as mt, applyPluginFormatMarkdown as n, agentTurnTotalTokens as nn, RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS as nt, getPluginSlackConversationLink as o, deleteProviderIdentityForSlackUser as on, cancelSubscriptions as ot, coreTaskRegistrations as p, JUNIOR_THREAD_STATE_TTL_MS as pt, runWithSlackInstallationToken as q, createSqlConversationEventStore as qt, createPluginHookRunner as r, agentTurnUsageSchema as rn, RESOURCE_SUBSCRIPTION_MAX_TTL_MS as rt, getPluginSystemPromptContributions as s, upsertIdentity as sn, cancelWatch as st, agent_hooks_exports as t, agentTurnCostUsd as tn, getSlackToolContext as tt, getPlugins as u, parseDestination as un, deliverWatch as ut, getWorkspace as v, createPluginEmbedder as vt, loadSnapshotsForProfile as w, conversationArchivedForUser as wt, updateWorkspace as x, readConversationAccessFromSql as xt, getWorkspaceByName as y, createPluginModel as yt, SlackActionError as z, authenticationLinkedEvent as zt };
|
|
@@ -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-BBIO8nx4.js";
|
|
2
|
+
import { h as normalizeSlackEmojiName } from "./config-DFAtlLoY.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,
|
|
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-CdRPMAIE.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-nNOUcF0O.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-JxMky6PH.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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema, O as createConversationMessageBodySchema, R as
|
|
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-CRWntH-A.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-xHUgeh46.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 };
|
package/dist/api.d.ts
CHANGED