@sentry/junior 0.263.0 → 0.264.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-BIacI0Bt.js → adapter-BIbMSKlG.js} +1 -1
- package/dist/{admin-C7vUk7s9.js → admin-D4d0HXax.js} +1 -1
- package/dist/{agent-hooks-CqnZfuCt.js → agent-hooks-D_PbluRX.js} +9 -9
- package/dist/{agent-runner-BUBas7Yy.js → agent-runner-CvRxb09K.js} +59 -66
- package/dist/api/schema.d.ts +1 -1
- package/dist/api.js +25 -25
- package/dist/{app-Bo0kB987.d.ts → app-Buc5gIWz.d.ts} +5 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +61 -41
- package/dist/{assistant-reply-BFmjgJjD.js → assistant-reply-BcJj_ORj.js} +1 -1
- package/dist/{briefs-h55v5lX9.js → briefs-BFfIE5N6.js} +2 -2
- package/dist/{catalog-runtime-Suf-aLlh.js → catalog-runtime-R53MWcMi.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DZBCBj1M.js → client-DpOwh_zX.js} +2 -2
- package/dist/{config-Dnv8KmNs.js → config-BxPrFVJP.js} +2 -2
- package/dist/{connections-Br0_xv27.js → connections-BnTM1nRf.js} +10 -10
- package/dist/{conversation-privacy-FY8yc2q3.js → conversation-privacy-ueJ6i-t9.js} +1 -1
- package/dist/{credential-sync-BvkiyWF5.js → credential-sync-DeDkof_D.js} +14 -14
- package/dist/{executor-J9k2sp9m.js → executor-D3WIS4vl.js} +2 -2
- package/dist/{images-DV2FlEGL.js → images-5VNK_yYC.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-B4yTgklN.js → job-queue-BYHonCAH.js} +1 -1
- package/dist/{logging-Dk_FpF36.js → logging-DNQqsQ57.js} +1 -1
- package/dist/{message-BzseAFH1.js → message-CDTJISxL.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-bTspTMCC.js → oauth-callback-server-Bk4rbLOs.js} +2 -2
- package/dist/{profile-Dq5I7TV1.js → profile-ieODOp4u.js} +3 -3
- package/dist/{registry-BFzQFV_y.js → registry-CfdUEk4N.js} +1 -1
- package/dist/{resolve-CnRHib0U.js → resolve-BXShI336.js} +3 -3
- package/dist/{result-DczfmNBa.js → result-R35jcahx.js} +7 -7
- package/dist/{runner-CJd9Wec-.js → runner-IC4Drh3Y.js} +10 -10
- package/dist/{sandbox-egress-signals-DUmVkOx4.js → sandbox-egress-signals-C4RIfjb8.js} +1 -1
- package/dist/{service-account-x2QZXm4X.js → service-account-DJSRo2cL.js} +3 -3
- package/dist/{service-account-BI2kQDrb.js → service-account-DifohWyX.js} +3 -3
- package/dist/{session-stop-CtyJsnEj.js → session-stop-B9RRGC-P.js} +12 -12
- package/dist/{skills-Dbzx9-rS.js → skills-DVJmS_ZP.js} +2 -2
- package/dist/{spawn-D8WU99UV.js → spawn-DkVYGfSY.js} +2 -2
- package/dist/{store-TKg1HVKx.js → store-BvolNnx4.js} +3 -3
- package/dist/{store-UlOrW6JC.js → store-C_mHwAnR.js} +18 -9
- package/dist/{task-queue-BRB49H-J.js → task-queue-BcEyPhtX.js} +3 -3
- package/dist/{task-runner-C575f2Dd.js → task-runner-CiQj5M_9.js} +10 -10
- package/dist/{tasks-LOItiYgL.js → tasks-OgXmReUv.js} +10 -10
- package/dist/{thread-state-IDHdZA7R.js → thread-state-XFvpWXE9.js} +5 -5
- package/dist/{turn-failure-response-h_LSXJ-M.js → turn-failure-response-BjBAtnVt.js} +7 -7
- package/dist/{turn-lifecycle-Cvi6Sb8Y.js → turn-lifecycle-nvKL2rul.js} +1 -1
- package/dist/{turn-session-routing-5Nyv4fso.js → turn-session-routing-DEMxHySb.js} +1 -1
- package/dist/{validation-BeTriWC2.js → validation-XOFldwvE.js} +1 -1
- package/dist/{version-BQX_hLDC.js → version-C9f5hdHD.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DmNRM88V.js → viewer-BuPwzOC9.js} +3 -3
- package/dist/{web-input-BHcGXSox.js → web-input-4t7TYLsY.js} +26 -26
- package/dist/{work-DLJMV02b.js → work-C_aF6JN5.js} +10 -10
- package/dist/{worker-vfG2ESg1.js → worker-DR633sA-.js} +8 -6
- package/package.json +4 -4
package/dist/app.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { C as automationVersionOf, Cn as resolveSandboxEgressProviderForHost, Dn as clearSandboxEgressSignals, En as SANDBOX_EGRESS_PROXY_PATH, Hn as slackMention, In as resolveBaseUrl, Ln as startOAuthFlow, On as consumeSandboxEgressAuthRequiredSignal, Pn as formatProviderLabel, Q as projectConversationMessages, Tn as shouldPropagateSandboxEgressTrace, Xn as slackEntitySchema, Y as appendConversationMessages, Zn as slackExternalRefIdSchema, _n as isExperimentalFeatureEnabled, ar as setConfigDefaults, b as admitEventAutomationRun, bn as createUserTokenStore, c as withScheduledAutomationLock, fn as getThreadStopDecision, gn as getExperimentalFeatures, i as readScheduledAutomation, ir as getConfigDefaults, jn as parseSandboxEgressCredentialToken, kn as consumeSandboxEgressPermissionDeniedSignal, l as blockEventAutomation, ln as SubscribedReplyReason, n as listScheduledAutomationsForTeam, o as saveScheduledAutomationInLock, p as findMatchingEventAutomations, s as scheduledRunId, tt as settleConversationTitleWork, u as collectEventAutomationMatchKeys, vn as setExperimentalFeatures, wn as normalizeSandboxEgressTracePropagationDomains, x as eventAutomationRunLimitReason, yn as executeCredentialedEgressRequest } from "./tasks-
|
|
2
|
-
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { C as automationVersionOf, Cn as resolveSandboxEgressProviderForHost, Dn as clearSandboxEgressSignals, En as SANDBOX_EGRESS_PROXY_PATH, Hn as slackMention, In as resolveBaseUrl, Ln as startOAuthFlow, On as consumeSandboxEgressAuthRequiredSignal, Pn as formatProviderLabel, Q as projectConversationMessages, Tn as shouldPropagateSandboxEgressTrace, Xn as slackEntitySchema, Y as appendConversationMessages, Zn as slackExternalRefIdSchema, _n as isExperimentalFeatureEnabled, ar as setConfigDefaults, b as admitEventAutomationRun, bn as createUserTokenStore, c as withScheduledAutomationLock, fn as getThreadStopDecision, gn as getExperimentalFeatures, i as readScheduledAutomation, ir as getConfigDefaults, jn as parseSandboxEgressCredentialToken, kn as consumeSandboxEgressPermissionDeniedSignal, l as blockEventAutomation, ln as SubscribedReplyReason, n as listScheduledAutomationsForTeam, o as saveScheduledAutomationInLock, p as findMatchingEventAutomations, s as scheduledRunId, tt as settleConversationTitleWork, u as collectEventAutomationMatchKeys, vn as setExperimentalFeatures, wn as normalizeSandboxEgressTracePropagationDomains, x as eventAutomationRunLimitReason, yn as executeCredentialedEgressRequest } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-DNQqsQ57.js";
|
|
3
3
|
import { n as captureMessage, r as continueTrace } from "./sentry-BBUlHih9.js";
|
|
4
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
5
|
-
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-C9f5hdHD.js";
|
|
5
|
+
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-BxPrFVJP.js";
|
|
6
6
|
import { _ as slackMessageTsSchema, d as parseSlackTeamId, f as parseSlackUserId, h as slackUserIdSchema, m as slackTeamIdSchema, o as parseActorUserId, p as slackChannelIdSchema } from "./actor-tlxzqaRe.js";
|
|
7
|
-
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
7
|
+
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
8
8
|
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
9
|
-
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-
|
|
10
|
-
import { m as credentialLogContext } from "./registry-
|
|
11
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
12
|
-
import { B as stopConversationSession, C as requestAttachmentDeletion, J as ingestEvent, L as effectiveTaskOutcomes, M as logScheduledAutomationRunSkipped, N as scheduledAutomationRunAttributes, T as parseSlackThreadId, V as recordSubagentEnded, _ as unpublishedArtifactHeaders, g as readPublicArtifact, h as publicArtifactHeaders, n as executeAgentRun, q as processWorkspaceSnapshotJob, t as createAgentRunner, v as lookupSlackUserProfile, x as collectAttachmentGarbage } from "./agent-runner-
|
|
13
|
-
import { $ as bindSlackDirectCredentialSubject, $t as createCache, Ct as createPluginState, Dt as readConversationAccessFromSql, Et as createPluginLogger, Q as bindScheduledAutomationCredentialSubject, Qt as createPluginCache, U as collectEventMatchKeys, Wt as resolveRootVisibility, X as takeDueTimerWatches, Z as bindEventAutomationCredentialSubject, _t as getDashboardConversationLink, a as getPluginRoutes, bt as setDashboardConversationLinkOptions, ct as getSlackClient, d as setPlugins, et as verifyEventAutomationCredentialSubject, f as validatePlugins, h as setBriefsConfig, ht as runWithWorkspaceTeamId, i as getPluginApiRoutes, mt as getWorkspaceTeamId, nt as verifySlackDirectCredentialSubject, q as findMatchingWatches, qt as listConversationAnnotations, tt as verifyScheduledAutomationCredentialSubject, u as getPlugins, ut as isDmChannel, yt as getDashboardTaskLink } from "./agent-hooks-
|
|
14
|
-
import { r as getStateAdapter, s as withLock$1 } from "./adapter-
|
|
9
|
+
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-D3WIS4vl.js";
|
|
10
|
+
import { m as credentialLogContext } from "./registry-CfdUEk4N.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
12
|
+
import { B as stopConversationSession, C as requestAttachmentDeletion, J as ingestEvent, L as effectiveTaskOutcomes, M as logScheduledAutomationRunSkipped, N as scheduledAutomationRunAttributes, T as parseSlackThreadId, V as recordSubagentEnded, _ as unpublishedArtifactHeaders, g as readPublicArtifact, h as publicArtifactHeaders, n as executeAgentRun, q as processWorkspaceSnapshotJob, t as createAgentRunner, v as lookupSlackUserProfile, x as collectAttachmentGarbage } from "./agent-runner-CvRxb09K.js";
|
|
13
|
+
import { $ as bindSlackDirectCredentialSubject, $t as createCache, Ct as createPluginState, Dt as readConversationAccessFromSql, Et as createPluginLogger, Q as bindScheduledAutomationCredentialSubject, Qt as createPluginCache, U as collectEventMatchKeys, Wt as resolveRootVisibility, X as takeDueTimerWatches, Z as bindEventAutomationCredentialSubject, _t as getDashboardConversationLink, a as getPluginRoutes, bt as setDashboardConversationLinkOptions, ct as getSlackClient, d as setPlugins, et as verifyEventAutomationCredentialSubject, f as validatePlugins, h as setBriefsConfig, ht as runWithWorkspaceTeamId, i as getPluginApiRoutes, mt as getWorkspaceTeamId, nt as verifySlackDirectCredentialSubject, q as findMatchingWatches, qt as listConversationAnnotations, tt as verifyScheduledAutomationCredentialSubject, u as getPlugins, ut as isDmChannel, yt as getDashboardTaskLink } from "./agent-hooks-D_PbluRX.js";
|
|
14
|
+
import { r as getStateAdapter, s as withLock$1 } from "./adapter-BIbMSKlG.js";
|
|
15
15
|
import { n as getNextRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
16
16
|
import { M as annotationCard } from "./conversation-B0baEwoA.js";
|
|
17
|
-
import { b as listPendingAgentInvocationMailboxAppends, x as listPendingAgentInvocationResults } from "./store-
|
|
18
|
-
import { M as renderTaskInput, S as eventGuidance, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-
|
|
19
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
20
|
-
import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
21
|
-
import { A as hasRunnableConversationWork$1, M as isInvalidConversationRecordError, O as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as removeActiveConversation, _ as hasRunnableConversationWork, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-
|
|
17
|
+
import { b as listPendingAgentInvocationMailboxAppends, x as listPendingAgentInvocationResults } from "./store-BvolNnx4.js";
|
|
18
|
+
import { M as renderTaskInput, S as eventGuidance, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-B9RRGC-P.js";
|
|
19
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-BXShI336.js";
|
|
20
|
+
import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BYHonCAH.js";
|
|
21
|
+
import { A as hasRunnableConversationWork$1, M as isInvalidConversationRecordError, O as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as removeActiveConversation, _ as hasRunnableConversationWork, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-C_mHwAnR.js";
|
|
22
22
|
import { D as scheduledRunSchema } from "./automation-CWX0qL8U.js";
|
|
23
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
23
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-XOFldwvE.js";
|
|
24
24
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-DOm9Y6qI.js";
|
|
25
|
-
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as GET$3 } from "./web-input-
|
|
26
|
-
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-
|
|
27
|
-
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-
|
|
28
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
29
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
30
|
-
import { o as unlinkProvider } from "./connections-
|
|
31
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
32
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
33
|
-
import { t as processConversationWork } from "./worker-
|
|
34
|
-
import { t as bindMessageAgent } from "./message-
|
|
35
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
25
|
+
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as GET$3 } from "./web-input-4t7TYLsY.js";
|
|
26
|
+
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-CiQj5M_9.js";
|
|
27
|
+
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-R35jcahx.js";
|
|
28
|
+
import { r as enqueueAgentInvocation } from "./work-C_aF6JN5.js";
|
|
29
|
+
import { s as coerceThreadConversationState } from "./thread-state-XFvpWXE9.js";
|
|
30
|
+
import { o as unlinkProvider } from "./connections-BnTM1nRf.js";
|
|
31
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DeDkof_D.js";
|
|
32
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BcEyPhtX.js";
|
|
33
|
+
import { t as processConversationWork } from "./worker-DR633sA-.js";
|
|
34
|
+
import { t as bindMessageAgent } from "./message-CDTJISxL.js";
|
|
35
|
+
import { t as bindSpawnAgent } from "./spawn-DkVYGfSY.js";
|
|
36
36
|
import { createRequire } from "node:module";
|
|
37
37
|
import { Hono } from "hono";
|
|
38
38
|
import { z } from "zod";
|
|
@@ -3073,19 +3073,39 @@ function parseConversationQueueMessage(message) {
|
|
|
3073
3073
|
function resolveConversationWorkVisibilityTimeoutSeconds(functionMaxDurationSeconds = getChatConfig().functionMaxDurationSeconds) {
|
|
3074
3074
|
return functionMaxDurationSeconds + 30;
|
|
3075
3075
|
}
|
|
3076
|
-
/**
|
|
3077
|
-
|
|
3076
|
+
/** Queue lag and redelivery attributes for the worker span. */
|
|
3077
|
+
function queueMetadataAttributes(metadata, nowMs) {
|
|
3078
|
+
if (!metadata) return {};
|
|
3079
|
+
return {
|
|
3080
|
+
"app.queue.delivery_count": metadata.deliveryCount,
|
|
3081
|
+
"app.queue.lag_ms": nowMs - metadata.createdAt.getTime()
|
|
3082
|
+
};
|
|
3083
|
+
}
|
|
3084
|
+
/**
|
|
3085
|
+
* Process one Vercel Queue payload with the generic conversation worker.
|
|
3086
|
+
* Pass the queue metadata to record queue lag and redelivery on the span.
|
|
3087
|
+
*/
|
|
3088
|
+
async function processConversationQueueMessage(message, options, metadata) {
|
|
3078
3089
|
const parsed = parseConversationQueueMessage(message);
|
|
3079
3090
|
try {
|
|
3080
|
-
return await
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3091
|
+
return await withSpan("conversation.work.process", "conversation.work.process", { conversationId: parsed.conversationId }, async (setSpanAttributes) => {
|
|
3092
|
+
try {
|
|
3093
|
+
const result = await processConversationWork(parsed, {
|
|
3094
|
+
checkInIntervalMs: options.checkInIntervalMs,
|
|
3095
|
+
conversationStore: options.conversationStore,
|
|
3096
|
+
nowMs: options.nowMs,
|
|
3097
|
+
queue: options.queue ?? getVercelConversationWorkQueue(),
|
|
3098
|
+
run: options.run,
|
|
3099
|
+
softYieldAfterMs: options.softYieldAfterMs,
|
|
3100
|
+
state: options.state
|
|
3101
|
+
});
|
|
3102
|
+
setSpanAttributes({ "app.worker.outcome": result.status });
|
|
3103
|
+
return result;
|
|
3104
|
+
} catch (error) {
|
|
3105
|
+
if (isConversationQueueMessageRejectedError(error)) setSpanAttributes({ "app.worker.outcome": error.reason });
|
|
3106
|
+
throw error;
|
|
3107
|
+
}
|
|
3108
|
+
}, queueMetadataAttributes(metadata, options.nowMs?.() ?? Date.now()));
|
|
3089
3109
|
} finally {
|
|
3090
3110
|
options.waitUntil?.(settleConversationTitleWork(parsed.conversationId));
|
|
3091
3111
|
}
|
|
@@ -3135,8 +3155,8 @@ function conversationWorkCallback(options) {
|
|
|
3135
3155
|
});
|
|
3136
3156
|
return true;
|
|
3137
3157
|
},
|
|
3138
|
-
run: async (message) => {
|
|
3139
|
-
await processConversationQueueMessage(message, options);
|
|
3158
|
+
run: async (message, metadata) => {
|
|
3159
|
+
await processConversationQueueMessage(message, options, metadata);
|
|
3140
3160
|
},
|
|
3141
3161
|
topic: resolveConversationWorkQueueTopic(options),
|
|
3142
3162
|
verify: verifyConversationQueueMessage,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as completeObject } from "./client-
|
|
1
|
+
import { i as completeObject } from "./client-DpOwh_zX.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
3
3
|
import { J as parseBriefInput, W as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-B0baEwoA.js";
|
|
4
4
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CxatQVaj.js";
|
|
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
|
|
|
267
267
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
268
268
|
*/
|
|
269
269
|
async function configuredDefaultModelId() {
|
|
270
|
-
const { botConfig } = await import("./config-
|
|
270
|
+
const { botConfig } = await import("./config-BxPrFVJP.js").then((n) => n.r);
|
|
271
271
|
return defaultModelId(botConfig);
|
|
272
272
|
}
|
|
273
273
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-CfdUEk4N.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-CvRxb09K.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-DOm9Y6qI.js").then((n) => n.o),
|
|
102
|
-
import("../agent-hooks-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../agent-hooks-D_PbluRX.js").then((n) => n.t),
|
|
103
|
+
import("../catalog-runtime-R53MWcMi.js").then((n) => n.t),
|
|
104
|
+
import("../validation-XOFldwvE.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-BuPwzOC9.js").then((n) => n.s)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,19 +152,19 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
155
|
+
const { setBriefsConfig } = await import("../agent-hooks-D_PbluRX.js").then((n) => n.m);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-IC4Drh3Y.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-Bk4rbLOs.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
164
|
-
const { startAgentInvocationsForChildInput } = await import("../result-
|
|
165
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-C4RIfjb8.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-DkVYGfSY.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-CDTJISxL.js").then((n) => n.n);
|
|
163
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-C_aF6JN5.js").then((n) => n.a);
|
|
164
|
+
const { startAgentInvocationsForChildInput } = await import("../result-R35jcahx.js").then((n) => n.r);
|
|
165
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-B9RRGC-P.js").then((n) => n.r);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-DR633sA-.js").then((n) => n.n);
|
|
168
168
|
let agentRunner;
|
|
169
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-DNQqsQ57.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-CfdUEk4N.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DVJmS_ZP.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-D4d0HXax.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-DifohWyX.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-BFfIE5N6.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as getDb } from "../viewer-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { Et as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-BuPwzOC9.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-R53MWcMi.js";
|
|
3
|
+
import { Et as createPluginLogger, d as setPlugins, f as validatePlugins } from "../agent-hooks-D_PbluRX.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-XOFldwvE.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
3
|
-
import { t as create } from "../profile-
|
|
4
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-R53MWcMi.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "../adapter-BIbMSKlG.js";
|
|
3
|
+
import { t as create } from "../profile-ieODOp4u.js";
|
|
4
|
+
import { r as resolve } from "../resolve-BXShI336.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_RUNTIME = "node22";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-BxPrFVJP.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-D3WIS4vl.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-CfdUEk4N.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-DNQqsQ57.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-ueJ6i-t9.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-
|
|
3
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-DpOwh_zX.js";
|
|
3
|
+
import { m as logWarn } from "./logging-DNQqsQ57.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
|
|
5
5
|
// src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Ln as startOAuthFlow, Mt as failTurnRecord, Nt as getTurnRecord, Ot as loadTurnCheckpoint } from "./tasks-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Ln as startOAuthFlow, Mt as failTurnRecord, Nt as getTurnRecord, Ot as loadTurnCheckpoint } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { n as botConfig } from "./config-BxPrFVJP.js";
|
|
3
|
+
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-BuPwzOC9.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-CfdUEk4N.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-CvRxb09K.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
8
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BYHonCAH.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-C_mHwAnR.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DEMxHySb.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { $n as resolvePluginOAuthAccount, Fn as parseOAuthStatePayload, H as recordAuthorizationCompleted, In as resolveBaseUrl, Nt as getTurnRecord, Pn as formatProviderLabel, Tt as getConversationPendingAuth, V as recordAuthenticationLinked, bn as createUserTokenStore, qn as postSlackMessage } from "./tasks-
|
|
2
|
-
import { p as escapeXml } from "./client-
|
|
3
|
-
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-
|
|
4
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
1
|
+
import { $n as resolvePluginOAuthAccount, Fn as parseOAuthStatePayload, H as recordAuthorizationCompleted, In as resolveBaseUrl, Nt as getTurnRecord, Pn as formatProviderLabel, Tt as getConversationPendingAuth, V as recordAuthenticationLinked, bn as createUserTokenStore, qn as postSlackMessage } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { p as escapeXml } from "./client-DpOwh_zX.js";
|
|
3
|
+
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-DNQqsQ57.js";
|
|
4
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-BxPrFVJP.js";
|
|
5
5
|
import { f as parseSlackUserId } from "./actor-tlxzqaRe.js";
|
|
6
|
-
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-
|
|
6
|
+
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-BuPwzOC9.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-
|
|
12
|
-
import { ct as getSlackClient } from "./agent-hooks-
|
|
13
|
-
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CfdUEk4N.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-DVJmS_ZP.js";
|
|
11
|
+
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-CvRxb09K.js";
|
|
12
|
+
import { ct as getSlackClient } from "./agent-hooks-D_PbluRX.js";
|
|
13
|
+
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-DJSRo2cL.js";
|
|
15
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-XFvpWXE9.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-BnTM1nRf.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logException } from "./logging-
|
|
1
|
+
import { f as logException } from "./logging-DNQqsQ57.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import "./config-
|
|
3
|
+
import "./config-BxPrFVJP.js";
|
|
4
4
|
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { f as getSqlExecutor } from "./viewer-
|
|
3
|
-
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-
|
|
2
|
+
import { f as getSqlExecutor } from "./viewer-BuPwzOC9.js";
|
|
3
|
+
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-CvRxb09K.js";
|
|
4
4
|
import { H as detectImageMediaType } from "./conversation-B0baEwoA.js";
|
|
5
5
|
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-DNQqsQ57.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-ueJ6i-t9.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-BxPrFVJP.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-BBUlHih9.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-C9f5hdHD.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $ as toolInvocationDestination, Q as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-
|
|
4
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
5
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { $ as toolInvocationDestination, Q as actorFromRun } from "./agent-runner-CvRxb09K.js";
|
|
3
|
+
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-BvolNnx4.js";
|
|
4
|
+
import { n as enqueueAgentMessageToParent } from "./result-R35jcahx.js";
|
|
5
|
+
import { r as enqueueAgentInvocation } from "./work-C_aF6JN5.js";
|
|
6
6
|
// src/chat/agent-invocations/message.ts
|
|
7
7
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
8
8
|
/**
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { r as JuniorDashboardOptions } from "./app-Buc5gIWz.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
|
4
4
|
export interface JuniorPluginModuleReference {
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-DNQqsQ57.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BYHonCAH.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BcEyPhtX.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bn as createUserTokenStore } from "./tasks-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { bn as createUserTokenStore } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DeDkof_D.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { C as toOptionalTrimmed } from "./client-DpOwh_zX.js";
|
|
2
|
+
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-DNQqsQ57.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-R53MWcMi.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/chat/sandbox/paths.ts
|
|
6
6
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DNQqsQ57.js";
|
|
2
2
|
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
2
|
-
import { r as getStateAdapter } from "./adapter-
|
|
3
|
-
import { C as SANDBOX_COMMAND_PATH, D as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-
|
|
1
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-DNQqsQ57.js";
|
|
2
|
+
import { r as getStateAdapter } from "./adapter-BIbMSKlG.js";
|
|
3
|
+
import { C as SANDBOX_COMMAND_PATH, D as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-ieODOp4u.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
6
6
|
// src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Nt as getTurnRecord, Pt as listTurnSummaries } from "./tasks-
|
|
2
|
+
import { Nt as getTurnRecord, Pt as listTurnSummaries } from "./tasks-OgXmReUv.js";
|
|
3
3
|
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { W as listUnreportedSiblingAgents } from "./agent-runner-
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-CfdUEk4N.js";
|
|
5
|
+
import { W as listUnreportedSiblingAgents } from "./agent-runner-CvRxb09K.js";
|
|
6
6
|
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-CxatQVaj.js";
|
|
7
|
-
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
7
|
+
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-BvolNnx4.js";
|
|
8
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-B9RRGC-P.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-C_mHwAnR.js";
|
|
10
|
+
import { r as enqueueAgentInvocation } from "./work-C_aF6JN5.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as commitAcceptedReply, F as loadProjection, H as recordAuthorizationCompleted, Ut as persistWithRetry, X as hydrateConversationMessages, Z as persistConversationMessages, at as buildConversationContext, dt as normalizeConversationText, ft as recordDeliveredAssistantMessage, kt as saveTurnCheckpoint, mt as upsertConversationMessage, ut as markConversationMessage, vt as authorizationId } from "./tasks-
|
|
2
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
3
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
1
|
+
import { A as commitAcceptedReply, F as loadProjection, H as recordAuthorizationCompleted, Ut as persistWithRetry, X as hydrateConversationMessages, Z as persistConversationMessages, at as buildConversationContext, dt as normalizeConversationText, ft as recordDeliveredAssistantMessage, kt as saveTurnCheckpoint, mt as upsertConversationMessage, ut as markConversationMessage, vt as authorizationId } from "./tasks-OgXmReUv.js";
|
|
2
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-DNQqsQ57.js";
|
|
3
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-BuPwzOC9.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-CfdUEk4N.js";
|
|
5
5
|
import { P as messageCardText } from "./conversation-B0baEwoA.js";
|
|
6
|
-
import { X as markTurnFailed, Z as startActiveTurn } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
6
|
+
import { X as markTurnFailed, Z as startActiveTurn } from "./store-BvolNnx4.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-BcJj_ORj.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CiQj5M_9.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-nvKL2rul.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-XFvpWXE9.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-BjBAtnVt.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mn as sandboxEgressSignalsResponseSchema } from "./tasks-
|
|
1
|
+
import { Mn as sandboxEgressSignalsResponseSchema } from "./tasks-OgXmReUv.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
3
|
-
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
1
|
+
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-DNQqsQ57.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-CfdUEk4N.js";
|
|
3
|
+
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-BIbMSKlG.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|