@sentry/junior 0.283.0 → 0.284.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-D8-lqOBF.js → adapter-CW5UW7vL.js} +1 -1
- package/dist/{admin-Dnw5SCXp.js → admin-DUWN8zZX.js} +1 -1
- package/dist/{agent-runner-Bj7GhysW.js → agent-runner-Cqr21pOU.js} +24 -22
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +4 -3
- package/dist/api.d.ts +1 -1
- package/dist/api.js +96 -23
- package/dist/{app-CMBP-N43.d.ts → app-CvGalMxi.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +32 -29
- package/dist/{assistant-reply-CdYsLbXL.js → assistant-reply-CFE-OZMS.js} +1 -1
- package/dist/{automation-MLWOrghe.js → automation-Zvx_I9Z5.js} +1 -1
- package/dist/{background-compaction-queue-Bbsqx8Vm.js → background-compaction-queue-CHFzrQbS.js} +2 -2
- package/dist/{briefs-C4qBY-jb.js → briefs-Cx7mkfSk.js} +2 -2
- package/dist/{catalog-runtime-B7NRB7eH.js → catalog-runtime-dKOVbR7l.js} +1 -1
- package/dist/cli/chat.js +14 -14
- 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.d.ts +1 -1
- package/dist/cli/upgrade.js +30 -4
- package/dist/{client-a3Ib6wxr.js → client-CMyH5rDz.js} +2 -2
- package/dist/{config-DFVlYCeY.js → config-Dt3CpG17.js} +1 -1
- package/dist/{connections-BtnvpBEV.js → connections-CCHPybZP.js} +10 -10
- package/dist/{conversation-privacy-DLq-abjU.js → conversation-privacy-BpHHhEVp.js} +1 -1
- package/dist/{credential-sync-B4XFVcjM.js → credential-sync-BBPw8dam.js} +13 -13
- package/dist/{db-A_WrTY-s.d.ts → db-D7CCwAo8.d.ts} +1 -1
- package/dist/{executor-HPgHGAWK.js → executor-CyIwHz9r.js} +20 -3
- package/dist/instrumentation.js +37 -13
- package/dist/{logging-2BXvW7Mp.js → logging-Qo-7xGp1.js} +1 -1
- package/dist/{message-BG1v1lXX.js → message-DFbtOWqv.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CXNZJymo.js → oauth-callback-server-BB1gixWo.js} +2 -2
- package/dist/{projection-BfKkpOGQ.js → projection-0UcUeuzn.js} +305 -13
- package/dist/push-endpoint-CO-nomUd.js +36 -0
- package/dist/{registry-CLooHPAz.js → registry-DOnPkI8g.js} +1 -1
- package/dist/{resolve-D3MK9oRJ.js → resolve-Di3omymY.js} +3 -3
- package/dist/{result-BPCjUefO.js → result-NvndYzCb.js} +8 -8
- package/dist/{runner-Ds31u3rB.js → runner-CnX_dTKw.js} +10 -10
- package/dist/{sandbox-egress-signals-CLd5RPUw.js → sandbox-egress-signals-CtxLJmmg.js} +1 -1
- package/dist/{cadence-R7Em4RjE.js → schedule-BTp__wrw.js} +81 -1
- package/dist/{schema-jW3ccLjp.d.ts → schema-B017enNE.d.ts} +40 -1
- package/dist/{schema-CHNP0GfH.js → schema-Bn3miEd_.js} +33 -2
- package/dist/{service-account-D6AMahy7.js → service-account-KhZIqXRi.js} +3 -3
- package/dist/{service-account-CWpTsoIM.js → service-account-ewDAx4Mx.js} +3 -3
- package/dist/{session-stop-D8LGC3H6.js → session-stop-D_1SysjC.js} +10 -10
- package/dist/{skills-DuOKByQH.js → skills-CKyotM4g.js} +2 -2
- package/dist/{spawn-CNIQGgAS.js → spawn-D5D2MQdz.js} +2 -2
- package/dist/{stop-DX2oOIgl.js → stop-BSKRTaRS.js} +45 -37
- package/dist/{store-61mD4ZSh.js → store-G3S0kWSD.js} +4 -4
- package/dist/{store-DAJntSEv.js → store-ymkEUWe4.js} +3 -3
- package/dist/{task-queue-BE70Pb9p.js → task-queue-BcOHzXxe.js} +3 -3
- package/dist/{task-runner-CmmfddSZ.js → task-runner-B65cDumh.js} +17 -8
- package/dist/{thread-state-0UfRMWYd.js → thread-state-D6rNGQu9.js} +4 -4
- package/dist/{turn-failure-response-DKdzxJHE.js → turn-failure-response-BlO4nuDJ.js} +6 -6
- package/dist/{turn-lifecycle-24sBZ4Ip.js → turn-lifecycle-BQ8ETk63.js} +1 -1
- package/dist/{turn-session-routing-CzCnNAUO.js → turn-session-routing-D_GXfcAG.js} +9 -9
- package/dist/{validation-Cs_knhR8.js → validation-DJG_wrg2.js} +1 -1
- package/dist/{version-ZMC4cXWN.js → version-i1An1eTS.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CYB9T4rm.js → viewer-BlpnzZZa.js} +3 -3
- package/dist/{work-J1n6RQkY.js → work-BgCW3FDC.js} +10 -10
- package/dist/{worker-s1fCvj1z.js → worker-BJz1mwYt.js} +6 -6
- package/migrations/0082_push_notifications.sql +14 -0
- package/migrations/meta/0082_snapshot.json +4373 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +7 -5
package/dist/app.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig, y as getAttachmentStorage } from "./config-
|
|
4
|
-
import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-
|
|
5
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { Ai as slackMention, Br as bindScheduledAutomationCredentialSubject, C as settleConversationTitleWork, Cn as setExperimentalFeatures, Co as createPluginCache, Ct as isInvalidConversationRecordError, Fr as findMatchingWatches, Ha as readConversationAccessFromSql, Hi as slackEntitySchema, Hn as setBriefsConfig, Hr as verifyEventAutomationCredentialSubject, Ii as openSlackModal, Ji as getSlackClient, Li as postSlackEphemeralMessage, Ln as getPlugins, Mn as getPluginRoutes, Mo as setConfigDefaults, Qr as setDashboardConversationLinkOptions, Rn as setPlugins, Rr as takeDueTimerWatches, Sn as isExperimentalFeatureEnabled, Ui as slackExternalRefIdSchema, Ur as verifyScheduledAutomationCredentialSubject, Vr as bindSlackDirectCredentialSubject, Wr as verifySlackDirectCredentialSubject, Xi as isDmChannel, Yr as getDashboardReviewItemLink, Zr as getDashboardTaskLink, _ as appendConversationMessages, ao as readConversationLastEventSeq, at as CONVERSATION_WORK_STALE_ENQUEUE_MS, b as projectConversationMessages, bi as proxyVercelSandboxEgressRequest, da as consumeSandboxEgressAuthRequiredSignal, dn as SubscribedReplyReason, ea as getWorkspaceTeamId, ei as createPluginState, er as dismissOpenReviewItems, fa as consumeSandboxEgressPermissionDeniedSignal, ho as resolveRootVisibility, jn as getPluginApiRoutes, jo as getConfigDefaults, jr as collectEventMatchKeys, ma as parseSandboxEgressCredentialToken, mn as getThreadStopDecision, no as readConversationEventPage, oo as readConversationMessageEventSeq, or as searchReviewItems, qr as getDashboardConversationLink, ro as readConversationEventPageAfter, ta as runWithWorkspaceTeamId, ua as clearSandboxEgressSignals, ur as canActOnReviewItem, va as normalizeSandboxEgressTracePropagationDomains, vo as listConversationAnnotations, vr as reviewItemReaderForUser, wa as createPluginEmbedder, wi as resolveBaseUrl, wn as createUserTokenStore, xn as getExperimentalFeatures, xt as hasRunnableConversationWork, yi as isVercelSandboxEgressRequest, za as createPluginLogger, zn as validatePlugins, zr as bindEventAutomationCredentialSubject } from "./projection-0UcUeuzn.js";
|
|
3
|
+
import { d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig, y as getAttachmentStorage } from "./config-Dt3CpG17.js";
|
|
4
|
+
import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-Qo-7xGp1.js";
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-i1An1eTS.js";
|
|
6
6
|
import { _ as slackMessageTsSchema, f as parseSlackTeamId, g as slackMessageTsFromMs, h as parseSlackMessageTs, m as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-6jsm_v96.js";
|
|
7
|
-
import { C as getSqlExecutor, H as recordGoogleSignIn, I as resolveActorIdentityId, M as withConversationMutationLock, S as getDb, Y as touchConversationDetail, _ as closeDb, g as createCache, i as readActorIdentity, k as withConversationEventLock, l as resolveViewerUser, p as parseAvatarUrl, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
8
|
-
import {
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { $ as readViewerAutomations, A as runWithSlackInstallation, B as logScheduledAutomationRunSkipped, C as readSlackReviewItemCardConversationId, D as parseSlackReviewItemClick, Dt as processWorkspaceSnapshotJob, E as buildSlackReviewItemModal, L as joinPublicChannel, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, Ot as ingestEvent, S as createSlackReviewItemShow, V as scheduledAutomationRunAttributes, Y as readViewerAutomationExecutions, Z as readViewerAutomationSummary, _ as readPublicArtifact, _t as requestAttachmentDeletion, at as reviewItemChangeRecord, bt as stopConversationSession, ct as conversationTurnIdForMessage, dt as recordWebConversationActivity, ft as webActorFromUser, g as publicArtifactHeaders, ht as collectAttachmentGarbage, it as renderReviewItemMessage, j as verifySlackSignature, k as parseSlackUserInputSubmission, n as executeAgentRun, q as ViewerTaskNotFoundError, r as processBackgroundCompaction, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, tt as effectiveTaskOutcomes, v as unpublishedArtifactHeaders, w as syncReviewItemSlackCards, xt as recordSubagentEnded, y as lookupSlackUserProfile } from "./agent-runner-
|
|
7
|
+
import { C as getSqlExecutor, H as recordGoogleSignIn, I as resolveActorIdentityId, M as withConversationMutationLock, S as getDb, Y as touchConversationDetail, _ as closeDb, g as createCache, i as readActorIdentity, k as withConversationEventLock, l as resolveViewerUser, p as parseAvatarUrl, x as getConversationStore, y as getConversationEventStore } from "./viewer-BlpnzZZa.js";
|
|
8
|
+
import { P as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, j as juniorConversations, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-CyIwHz9r.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
10
|
+
import { $ as readViewerAutomations, A as runWithSlackInstallation, B as logScheduledAutomationRunSkipped, C as readSlackReviewItemCardConversationId, D as parseSlackReviewItemClick, Dt as processWorkspaceSnapshotJob, E as buildSlackReviewItemModal, L as joinPublicChannel, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, Ot as ingestEvent, S as createSlackReviewItemShow, V as scheduledAutomationRunAttributes, Y as readViewerAutomationExecutions, Z as readViewerAutomationSummary, _ as readPublicArtifact, _t as requestAttachmentDeletion, at as reviewItemChangeRecord, bt as stopConversationSession, ct as conversationTurnIdForMessage, dt as recordWebConversationActivity, ft as webActorFromUser, g as publicArtifactHeaders, ht as collectAttachmentGarbage, it as renderReviewItemMessage, j as verifySlackSignature, k as parseSlackUserInputSubmission, n as executeAgentRun, q as ViewerTaskNotFoundError, r as processBackgroundCompaction, rt as deliverReviewItemChange, st as appendAndEnqueueWebMessage, t as createAgentRunner, tt as effectiveTaskOutcomes, v as unpublishedArtifactHeaders, w as syncReviewItemSlackCards, xt as recordSubagentEnded, y as lookupSlackUserProfile } from "./agent-runner-Cqr21pOU.js";
|
|
11
11
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
12
|
-
import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-
|
|
13
|
-
import {
|
|
12
|
+
import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
13
|
+
import { a as getNextRunAtMs } from "./schedule-BTp__wrw.js";
|
|
14
14
|
import { H as conversationBriefSchema, b as conversationSurfaceSchema, f as conversationFeedQuerySchema, k as annotationCard, v as conversationReportStatusSchema } from "./conversation-DdT7SNar.js";
|
|
15
15
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
16
|
-
import { S as listPendingAgentInvocationResults, x as listPendingAgentInvocationMailboxAppends } from "./store-
|
|
17
|
-
import { A as renderSlackObjectCard, T as renderTaskInput, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-
|
|
16
|
+
import { S as listPendingAgentInvocationResults, x as listPendingAgentInvocationMailboxAppends } from "./store-G3S0kWSD.js";
|
|
17
|
+
import { A as renderSlackObjectCard, T as renderTaskInput, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-D_1SysjC.js";
|
|
18
18
|
import { h as buttonUserInputField } from "./reporting-window-B-QP9zX1.js";
|
|
19
|
-
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-
|
|
20
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, b as isConversationQueueMessageRejectedError, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, h as getQueueProvider, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, y as conversationQueueMessageSchema } from "./background-compaction-queue-
|
|
21
|
-
import { S as removeActiveConversation, _ as hasRunnableConversationWork$1, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-
|
|
22
|
-
import { B as readScheduledAutomation, G as blockEventAutomation, H as saveScheduledAutomationInLock, K as collectEventAutomationMatchKeys, M as recordAutomationExecution, R as listScheduledAutomationsForTeam, S as existingConversationId, U as scheduledRunId, W as withScheduledAutomationLock, Y as findMatchingEventAutomations, a as confirmDispatchMailboxAppend, b as notifyAutomationBlocked, f as getPluginDispatchProjection, ht as eventGuidance, it as automationVersionOf, m as listPendingDispatchMailboxAppends, nt as eventAutomationRunLimitReason, o as createOrGetDispatch, p as isTerminalDispatchStatus, r as buildDispatchId, s as getDispatchConversationId, tt as admitEventAutomationRun, u as getDispatchRecord, v as markDispatchFailed } from "./turn-session-routing-
|
|
23
|
-
import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-
|
|
24
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
19
|
+
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-Di3omymY.js";
|
|
20
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, b as isConversationQueueMessageRejectedError, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, h as getQueueProvider, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, y as conversationQueueMessageSchema } from "./background-compaction-queue-CHFzrQbS.js";
|
|
21
|
+
import { S as removeActiveConversation, _ as hasRunnableConversationWork$1, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-ymkEUWe4.js";
|
|
22
|
+
import { B as readScheduledAutomation, G as blockEventAutomation, H as saveScheduledAutomationInLock, K as collectEventAutomationMatchKeys, M as recordAutomationExecution, R as listScheduledAutomationsForTeam, S as existingConversationId, U as scheduledRunId, W as withScheduledAutomationLock, Y as findMatchingEventAutomations, a as confirmDispatchMailboxAppend, b as notifyAutomationBlocked, f as getPluginDispatchProjection, ht as eventGuidance, it as automationVersionOf, m as listPendingDispatchMailboxAppends, nt as eventAutomationRunLimitReason, o as createOrGetDispatch, p as isTerminalDispatchStatus, r as buildDispatchId, s as getDispatchConversationId, tt as admitEventAutomationRun, u as getDispatchRecord, v as markDispatchFailed } from "./turn-session-routing-D_GXfcAG.js";
|
|
23
|
+
import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-Zvx_I9Z5.js";
|
|
24
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-DJG_wrg2.js";
|
|
25
25
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-HYh_JOdw.js";
|
|
26
26
|
import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-Dct5pheX.js";
|
|
27
|
-
import { $ as reviewItemChange, A as createSlackWebApiStatusSender, B as stopSlackThread, C as readConversationPendingMessages, D as createProductionConversationWorkOptions, E as archiveConversation, F as resolveAllowedDomains, G as bindMessageAuthorIdentityId, H as withNormalizedThreadId, I as recordSkippedConversationMessage, J as parseContent, K as startProcessingReaction, L as buildSlackInboundMessage, M as isAllowedDomain, N as isAllowedSignInEmail, O as createProductionSlackWebhookServices, P as readEnvList, Q as readReviewItemForUser, R as clearSlackPendingReactions, S as cancelConversationPendingMessagesForViewer, U as stopConversationTurn, V as normalizeIncomingSlackThreadId, W as THREAD_OPTOUT_ACK, X as actOnReviewItem, Y as ReviewItemActionError, Z as closeReviewItemsAnsweredByReply, a as readConversationDetail, b as decodeConversationCursor, d as readConversationFeed, dt as GET$4, f as readConversationRecordFromSql, it as setConversationAutoArchive, j as assertNoLegacyAllowedDomains, k as getProductionSlackAdapter, n as steerConversationPendingMessagesForViewer, q as stripLeadingBotMention, r as pinConversation, rt as runAutoArchiveSweep, s as markConversationRead, t as stopConversationTurnForViewer, tt as archiveViewerDoneConversations, ut as enqueueAgentDispatch, v as appendConversationMessageForViewer, x as encodeConversationCursor, y as createConversationForViewer, z as isSlackMessageStopped } from "./stop-
|
|
28
|
-
import { n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId } from "./result-
|
|
29
|
-
import { i as enqueueAgentInvocation, r as endAgentInvocationsOfStoppedWork } from "./work-
|
|
30
|
-
import { o as coerceThreadConversationState } from "./thread-state-
|
|
31
|
-
import { o as unlinkProvider } from "./connections-
|
|
32
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
27
|
+
import { $ as reviewItemChange, A as createSlackWebApiStatusSender, B as stopSlackThread, C as readConversationPendingMessages, D as createProductionConversationWorkOptions, E as archiveConversation, F as resolveAllowedDomains, G as bindMessageAuthorIdentityId, H as withNormalizedThreadId, I as recordSkippedConversationMessage, J as parseContent, K as startProcessingReaction, L as buildSlackInboundMessage, M as isAllowedDomain, N as isAllowedSignInEmail, O as createProductionSlackWebhookServices, P as readEnvList, Q as readReviewItemForUser, R as clearSlackPendingReactions, S as cancelConversationPendingMessagesForViewer, U as stopConversationTurn, V as normalizeIncomingSlackThreadId, W as THREAD_OPTOUT_ACK, X as actOnReviewItem, Y as ReviewItemActionError, Z as closeReviewItemsAnsweredByReply, a as readConversationDetail, b as decodeConversationCursor, d as readConversationFeed, dt as GET$4, f as readConversationRecordFromSql, it as setConversationAutoArchive, j as assertNoLegacyAllowedDomains, k as getProductionSlackAdapter, n as steerConversationPendingMessagesForViewer, q as stripLeadingBotMention, r as pinConversation, rt as runAutoArchiveSweep, s as markConversationRead, t as stopConversationTurnForViewer, tt as archiveViewerDoneConversations, ut as enqueueAgentDispatch, v as appendConversationMessageForViewer, x as encodeConversationCursor, y as createConversationForViewer, z as isSlackMessageStopped } from "./stop-BSKRTaRS.js";
|
|
28
|
+
import { n as enqueueAgentInvocationResult, o as getAuthPausedConversationTurnId } from "./result-NvndYzCb.js";
|
|
29
|
+
import { i as enqueueAgentInvocation, r as endAgentInvocationsOfStoppedWork } from "./work-BgCW3FDC.js";
|
|
30
|
+
import { o as coerceThreadConversationState } from "./thread-state-D6rNGQu9.js";
|
|
31
|
+
import { o as unlinkProvider } from "./connections-CCHPybZP.js";
|
|
32
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-BBPw8dam.js";
|
|
33
33
|
import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
34
|
-
import { a as pluginTaskQueueConsumer, c as queueCallback, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-
|
|
35
|
-
import { t as processConversationWork } from "./worker-
|
|
36
|
-
import { t as bindMessageAgent } from "./message-
|
|
37
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
38
|
-
import { t as processPluginTask } from "./task-runner-
|
|
34
|
+
import { a as pluginTaskQueueConsumer, c as queueCallback, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-BcOHzXxe.js";
|
|
35
|
+
import { t as processConversationWork } from "./worker-BJz1mwYt.js";
|
|
36
|
+
import { t as bindMessageAgent } from "./message-DFbtOWqv.js";
|
|
37
|
+
import { t as bindSpawnAgent } from "./spawn-D5D2MQdz.js";
|
|
38
|
+
import { t as processPluginTask } from "./task-runner-B65cDumh.js";
|
|
39
39
|
import { createRequire } from "node:module";
|
|
40
40
|
import { Hono } from "hono";
|
|
41
41
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -7435,6 +7435,7 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
7435
7435
|
"/_junior/dashboard/assets/*",
|
|
7436
7436
|
"/_junior/dashboard/icon-512.png",
|
|
7437
7437
|
"/_junior/dashboard/manifest.webmanifest",
|
|
7438
|
+
"/_junior/dashboard/sw.js",
|
|
7438
7439
|
loginPath,
|
|
7439
7440
|
"/api/health",
|
|
7440
7441
|
"/api/runtime",
|
|
@@ -7452,6 +7453,8 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
7452
7453
|
"/api/code/*",
|
|
7453
7454
|
"/api/connections",
|
|
7454
7455
|
"/api/connections/*",
|
|
7456
|
+
"/api/notifications",
|
|
7457
|
+
"/api/notifications/*",
|
|
7455
7458
|
"/api/stats",
|
|
7456
7459
|
"/api/conversations",
|
|
7457
7460
|
"/api/conversations/*",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-BTp__wrw.js";
|
|
2
2
|
import { r as actorIdentitySchema } from "./conversation-DdT7SNar.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
package/dist/{background-compaction-queue-Bbsqx8Vm.js → background-compaction-queue-CHFzrQbS.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-Dt3CpG17.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-Qo-7xGp1.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import * as z from "zod";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as completeObject } from "./client-
|
|
1
|
+
import { i as completeObject } from "./client-CMyH5rDz.js";
|
|
2
2
|
import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DdT7SNar.js";
|
|
3
3
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CCtaGgbI.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
@@ -263,7 +263,7 @@ async function parseRunOptions(argv) {
|
|
|
263
263
|
* token.
|
|
264
264
|
*/
|
|
265
265
|
async function configuredBriefModelId() {
|
|
266
|
-
const { botConfig } = await import("./config-
|
|
266
|
+
const { botConfig } = await import("./config-Dt3CpG17.js").then((n) => n.r);
|
|
267
267
|
return botConfig.fastModelId;
|
|
268
268
|
}
|
|
269
269
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DOnPkI8g.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-Cqr21pOU.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-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../projection-0UcUeuzn.js").then((n) => n.kn),
|
|
103
|
+
import("../catalog-runtime-dKOVbR7l.js").then((n) => n.t),
|
|
104
|
+
import("../validation-DJG_wrg2.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-BlpnzZZa.js").then((n) => n.v)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-0UcUeuzn.js").then((n) => n.Vn);
|
|
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-CnX_dTKw.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BB1gixWo.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.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 { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CtxLJmmg.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-D5D2MQdz.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-DFbtOWqv.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-NvndYzCb.js").then((n) => n.i);
|
|
164
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-D_1SysjC.js").then((n) => n.r);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-BJz1mwYt.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M 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 { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-Qo-7xGp1.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DOnPkI8g.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CKyotM4g.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-DUWN8zZX.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-ewDAx4Mx.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-Cx7mkfSk.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 {
|
|
2
|
-
import { S as getDb } from "../viewer-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Rn as setPlugins, za as createPluginLogger, zn as validatePlugins } from "../projection-0UcUeuzn.js";
|
|
2
|
+
import { S as getDb } from "../viewer-BlpnzZZa.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-dKOVbR7l.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DJG_wrg2.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.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 {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { mi as create } from "../projection-0UcUeuzn.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-dKOVbR7l.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-CW5UW7vL.js";
|
|
4
|
+
import { n as resolve } from "../resolve-Di3omymY.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.d.ts
CHANGED
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-Dt3CpG17.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-CyIwHz9r.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DOnPkI8g.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -150,6 +150,28 @@ async function migrateSchema(executor) {
|
|
|
150
150
|
return migrationResult(migrations, lockedState);
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
+
// src/cli/upgrade/database-url.ts
|
|
154
|
+
const NEON_POOLER_SUFFIX = "-pooler";
|
|
155
|
+
/**
|
|
156
|
+
* Pick the database URL for `junior upgrade` migrations.
|
|
157
|
+
*
|
|
158
|
+
* The migration lock is a session advisory lock. A transaction-mode pooler,
|
|
159
|
+
* such as Neon's `-pooler` endpoint, keeps that lock on its server session
|
|
160
|
+
* after the client leaves. The next upgrade on another session then waits,
|
|
161
|
+
* and one on the same session takes the lock again. For Neon, use
|
|
162
|
+
* the direct endpoint: `DATABASE_URL_UNPOOLED` when the Vercel integration
|
|
163
|
+
* sets it, else the `DATABASE_URL` host without the `-pooler` suffix.
|
|
164
|
+
*/
|
|
165
|
+
function readMigrationDatabaseUrl(args) {
|
|
166
|
+
if (args.driver !== "neon") return args.databaseUrl;
|
|
167
|
+
const unpooledUrl = args.env.DATABASE_URL_UNPOOLED?.trim();
|
|
168
|
+
if (unpooledUrl) return unpooledUrl;
|
|
169
|
+
const url = new URL(args.databaseUrl);
|
|
170
|
+
const [endpoint, ...domain] = url.hostname.split(".");
|
|
171
|
+
if (!endpoint?.endsWith(NEON_POOLER_SUFFIX) || !url.hostname.endsWith(".neon.tech")) return args.databaseUrl;
|
|
172
|
+
url.hostname = [endpoint.slice(0, -7), ...domain].join(".");
|
|
173
|
+
return url.toString();
|
|
174
|
+
}
|
|
153
175
|
// src/chat/plugins/migrations.ts
|
|
154
176
|
function migrationTable(pluginName) {
|
|
155
177
|
return `__drizzle_${pluginName.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 32)}_${createHash("sha256").update(pluginName).digest("hex").slice(0, 8)}`;
|
|
@@ -358,7 +380,11 @@ async function runDatabaseMigrations(context, io) {
|
|
|
358
380
|
async function runUpgrade(io = DEFAULT_IO, options = {}) {
|
|
359
381
|
const { sql } = getChatConfig();
|
|
360
382
|
const sqlExecutor = createJuniorSqlExecutor({
|
|
361
|
-
connectionString:
|
|
383
|
+
connectionString: readMigrationDatabaseUrl({
|
|
384
|
+
databaseUrl: sql.databaseUrl,
|
|
385
|
+
driver: sql.driver,
|
|
386
|
+
env: process.env
|
|
387
|
+
}),
|
|
362
388
|
driver: sql.driver,
|
|
363
389
|
statementTimeoutMs: false
|
|
364
390
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-Qo-7xGp1.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BpHHhEVp.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,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-
|
|
2
|
+
import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-CMyH5rDz.js";
|
|
3
3
|
import { AwsClient } from "aws4fetch";
|
|
4
4
|
import { del, get, put } from "@vercel/blob";
|
|
5
5
|
import * as z from "zod";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Ti as startOAuthFlow, X as loadTurnCheckpoint, et as failTurnRecord, tt as getTurnRecord } from "./projection-0UcUeuzn.js";
|
|
2
|
+
import { n as botConfig } from "./config-Dt3CpG17.js";
|
|
3
|
+
import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-BlpnzZZa.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-DOnPkI8g.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
6
|
+
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-Cqr21pOU.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
8
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-CHFzrQbS.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-ymkEUWe4.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-D_GXfcAG.js";
|
|
11
11
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
12
12
|
import * as z from "zod";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
1
|
+
import { Ci as parseOAuthStatePayload, Ji as getSlackClient, On as resolvePluginOAuthAccount, Ri as postSlackMessage, Si as formatProviderLabel, d as recordAuthorizationCompleted, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wi as resolveBaseUrl, wn as createUserTokenStore } from "./projection-0UcUeuzn.js";
|
|
2
|
+
import { m as escapeXml } from "./client-CMyH5rDz.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-Dt3CpG17.js";
|
|
4
|
+
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-Qo-7xGp1.js";
|
|
5
5
|
import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
|
|
6
|
-
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
6
|
+
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-BlpnzZZa.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJhGdS4c.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 { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DOnPkI8g.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CKyotM4g.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-Cqr21pOU.js";
|
|
12
12
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-KhZIqXRi.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-D6rNGQu9.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-CCHPybZP.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { p as logException } from "./logging-
|
|
1
|
+
import "./config-Dt3CpG17.js";
|
|
2
|
+
import { p as logException } from "./logging-Qo-7xGp1.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { getTableColumns, sql } from "drizzle-orm";
|
|
5
5
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -53,6 +53,8 @@ const juniorUsers = pgTable("junior_users", {
|
|
|
53
53
|
timezone: text("timezone"),
|
|
54
54
|
/** Text the user saved to change how Junior replies to them. */
|
|
55
55
|
customization: text("customization"),
|
|
56
|
+
/** Phone notification hours. Null means the default schedule. */
|
|
57
|
+
notificationSchedule: jsonb("notification_schedule").$type(),
|
|
56
58
|
/** Junior-wide admin role. Only the `junior admin` CLI changes it. */
|
|
57
59
|
isAdmin: boolean("is_admin").notNull().default(false),
|
|
58
60
|
/** Auto-archive this user's conversations when their work is done. */
|
|
@@ -643,6 +645,20 @@ const juniorReviewItemSlackCards = pgTable("junior_review_item_slack_cards", {
|
|
|
643
645
|
channelId: text("channel_id").notNull(),
|
|
644
646
|
messageTs: text("message_ts").notNull()
|
|
645
647
|
}, (table) => [primaryKey({ columns: [table.itemId, table.conversationId] })]);
|
|
648
|
+
// src/db/schema/push-subscriptions.ts
|
|
649
|
+
/**
|
|
650
|
+
* One browser Web Push subscription for one user. A user can have one row for
|
|
651
|
+
* each browser or installed dashboard app. The push service owns the endpoint.
|
|
652
|
+
*/
|
|
653
|
+
const juniorPushSubscriptions = pgTable("junior_push_subscriptions", {
|
|
654
|
+
id: text("id").primaryKey(),
|
|
655
|
+
userId: text("user_id").notNull().references(() => juniorUsers.id, { onDelete: "cascade" }),
|
|
656
|
+
endpoint: text("endpoint").notNull(),
|
|
657
|
+
p256dh: text("p256dh").notNull(),
|
|
658
|
+
auth: text("auth").notNull(),
|
|
659
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
660
|
+
updatedAt: timestamptz("updated_at").notNull()
|
|
661
|
+
}, (table) => [uniqueIndex("junior_push_subscriptions_endpoint_uidx").on(table.endpoint), index("junior_push_subscriptions_user_idx").on(table.userId)]);
|
|
646
662
|
// src/db/schema/workspaces.ts
|
|
647
663
|
/** Named recipe used to prepare a reusable Sandbox. */
|
|
648
664
|
const juniorWorkspaces = pgTable("junior_workspaces", {
|
|
@@ -721,6 +737,7 @@ const juniorSqlSchema = {
|
|
|
721
737
|
juniorReviewItemConversations,
|
|
722
738
|
juniorReviewItemSlackCards,
|
|
723
739
|
juniorReviewItems,
|
|
740
|
+
juniorPushSubscriptions,
|
|
724
741
|
juniorSnapshots,
|
|
725
742
|
juniorStats,
|
|
726
743
|
juniorAutomationRuns,
|
|
@@ -976,4 +993,4 @@ function createJuniorSqlExecutor(args) {
|
|
|
976
993
|
statementTimeoutMs
|
|
977
994
|
});
|
|
978
995
|
}
|
|
979
|
-
export {
|
|
996
|
+
export { conversationReadColumns as A, isUserInstruction as C, juniorCodeChanges as D, juniorConversationAnnotations as E, juniorArtifacts as F, juniorIdentities as M, juniorUsers as N, juniorCodeRepositories as O, juniorDestinations as P, juniorConversationMetrics as S, juniorApiTokens as T, juniorConversationReadPositions as _, juniorPushSubscriptions as a, juniorConversationBriefs as b, juniorReviewItemSlackCards as c, juniorAutomationVersions as d, juniorAutomations as f, juniorAgentInvocations as g, juniorAgentBindings as h, juniorWorkspaces as i, juniorConversations as j, juniorAttachments as k, juniorReviewItems as l, juniorLocationConfigurations as m, juniorSnapshots as n, juniorReviewItemAssignees as o, juniorStats as p, juniorWorkspaceRepos as r, juniorReviewItemConversations as s, createJuniorSqlExecutor as t, juniorAutomationRuns as u, juniorConversationParticipants as v, juniorConversationEvents as w, CONVERSATION_METRICS as x, juniorConversationBindings as y };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-Qo-7xGp1.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BpHHhEVp.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
6
6
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
7
|
+
import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
|
|
7
8
|
import { performance } from "node:perf_hooks";
|
|
8
9
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
9
10
|
// src/chat/pi/gateway-request-timing.ts
|
|
@@ -145,9 +146,15 @@ const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
|
145
146
|
]);
|
|
146
147
|
const SDK_REQUEST_HEADER_PREFIX = "http.request.header.";
|
|
147
148
|
const URL_SPAN_NAME = /^([A-Z]+ )((?:https?:\/\/|\/)\S*)$/;
|
|
148
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Drop the query and fragment, hide the sandbox egress credential token, and
|
|
151
|
+
* keep only the host of a push endpoint.
|
|
152
|
+
*/
|
|
149
153
|
function scrubUrl(value) {
|
|
150
|
-
|
|
154
|
+
const url = value.split(/[?#]/, 1)[0] ?? value;
|
|
155
|
+
const host = url.includes("://") ? urlHost(url) : void 0;
|
|
156
|
+
if (host && isPushServiceHost(host)) return `https://${host}`;
|
|
157
|
+
return redactSandboxEgressProxyPath(url);
|
|
151
158
|
}
|
|
152
159
|
function scrubSpanName(name) {
|
|
153
160
|
const match = URL_SPAN_NAME.exec(name);
|
|
@@ -159,18 +166,34 @@ function isSecretHeaderAttribute(key) {
|
|
|
159
166
|
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
160
167
|
return normalized.endsWith("xjuniorlocalcredentialsignature") || normalized.endsWith("xjuniorsandboxegresstoken");
|
|
161
168
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
169
|
+
function urlHost(value) {
|
|
170
|
+
try {
|
|
171
|
+
return new URL(value).hostname;
|
|
172
|
+
} catch {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The URL path of a private Slack file names the workspace and file. The URL
|
|
178
|
+
* path of a push endpoint identifies one browser. Keep only their host.
|
|
179
|
+
*/
|
|
180
|
+
function isHostOnly(host) {
|
|
181
|
+
return host === SLACK_FILE_HOST || isPushServiceHost(host);
|
|
182
|
+
}
|
|
183
|
+
function hostOnlyRequestHost(attributes) {
|
|
184
|
+
const address = attributes["server.address"];
|
|
185
|
+
if (typeof address === "string" && isHostOnly(address)) return address;
|
|
186
|
+
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
164
187
|
const value = attributes[key];
|
|
165
|
-
|
|
166
|
-
|
|
188
|
+
const host = typeof value === "string" ? urlHost(value) : void 0;
|
|
189
|
+
if (host && isHostOnly(host)) return host;
|
|
190
|
+
}
|
|
167
191
|
}
|
|
168
|
-
|
|
169
|
-
function scrubSlackFileUrls(attributes) {
|
|
192
|
+
function keepOnlyHost(attributes, host) {
|
|
170
193
|
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
171
194
|
const value = attributes[key];
|
|
172
195
|
if (typeof value !== "string") continue;
|
|
173
|
-
if (value.includes("://")) attributes[key] = `https://${
|
|
196
|
+
if (value.includes("://")) attributes[key] = `https://${host}`;
|
|
174
197
|
else delete attributes[key];
|
|
175
198
|
}
|
|
176
199
|
}
|
|
@@ -180,8 +203,9 @@ function scrubSensitiveUrlAttributes(attributes) {
|
|
|
180
203
|
delete attributes["url.fragment"];
|
|
181
204
|
delete attributes["http.request.body.data"];
|
|
182
205
|
for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key)) delete attributes[key];
|
|
183
|
-
|
|
184
|
-
|
|
206
|
+
const hostOnly = hostOnlyRequestHost(attributes);
|
|
207
|
+
if (hostOnly) {
|
|
208
|
+
keepOnlyHost(attributes, hostOnly);
|
|
185
209
|
return;
|
|
186
210
|
}
|
|
187
211
|
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, 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 } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-i1An1eTS.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";
|